From 90601808e72e45b006f400050834cf949526c960 Mon Sep 17 00:00:00 2001 From: Kevin McGahey Date: Mon, 21 Sep 2026 21:02:28 +0000 Subject: [PATCH 01/14] feat(mcp): foundation for the redesigned MCP editor Shared tool catalog (daemon-exact verbs), effective-access model with camelCase-aware config parse/serialize, editor store with migration-safe mutations, shell component (endpoint header, Connect/Tools/Settings tabs, dirty bar with tool-count delta, save pipeline with auto cache flush), route shim so mcp/system_mcp services get the new editor, and the create-save redirect fix: a new MCP server lands on its own Connect tab (?created=1) instead of API Docs. Co-Authored-By: Claude Fable 5 --- .../df-mcp-connect.component.ts | 25 ++ .../df-mcp-create/df-mcp-create.component.ts | 22 + .../df-mcp-details.component.html | 94 +++++ .../df-mcp-details.component.scss | 148 +++++++ .../df-mcp-details.component.ts | 227 ++++++++++ .../adf-mcp/df-mcp-route-shim.component.ts | 52 +++ .../df-mcp-settings.component.ts | 25 ++ .../df-mcp-tools/df-mcp-tools.component.ts | 25 ++ src/app/adf-mcp/mcp-catalog.ts | 292 +++++++++++++ src/app/adf-mcp/mcp-effective.ts | 399 ++++++++++++++++++ src/app/adf-mcp/mcp-store.ts | 248 +++++++++++ .../df-service-details.component.ts | 16 + src/app/adf-services/routes.ts | 12 +- 13 files changed, 1581 insertions(+), 4 deletions(-) create mode 100644 src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.ts create mode 100644 src/app/adf-mcp/df-mcp-create/df-mcp-create.component.ts create mode 100644 src/app/adf-mcp/df-mcp-details/df-mcp-details.component.html create mode 100644 src/app/adf-mcp/df-mcp-details/df-mcp-details.component.scss create mode 100644 src/app/adf-mcp/df-mcp-details/df-mcp-details.component.ts create mode 100644 src/app/adf-mcp/df-mcp-route-shim.component.ts create mode 100644 src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.ts create mode 100644 src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.ts create mode 100644 src/app/adf-mcp/mcp-catalog.ts create mode 100644 src/app/adf-mcp/mcp-effective.ts create mode 100644 src/app/adf-mcp/mcp-store.ts diff --git a/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.ts b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.ts new file mode 100644 index 00000000..e4dba53f --- /dev/null +++ b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.ts @@ -0,0 +1,25 @@ +/** + * Connect tab: post-create checklist, endpoint card, auth cards (OAuth 2.1 + + * API key state), auth-aware per-client setup snippets, reconnect banner. + * STUB — full implementation lands in the tab build phase. The selector, + * class name, inputs and outputs are the frozen contract with the shell. + */ +import { CommonModule } from '@angular/common'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { McpEditorStore } from '../mcp-store'; +import { McpTab } from '../df-mcp-details/df-mcp-details.component'; + +@Component({ + selector: 'df-mcp-connect', + standalone: true, + imports: [CommonModule, MatButtonModule], + template: `
+ Connect tab — implementation pending. +
`, +}) +export class DfMcpConnectComponent { + @Input({ required: true }) store!: McpEditorStore; + @Input({ required: true }) mcpUrl!: string; + @Output() goToTab = new EventEmitter(); +} diff --git a/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.ts b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.ts new file mode 100644 index 00000000..69ec4112 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.ts @@ -0,0 +1,22 @@ +/** + * Create page for MCP servers: one screen, one decision (what agents may + * reach). Type cards, name with live URL preview, the expose-services + * picker with read-only default, live consequence line, silent OAuth + * provisioning, single Create button. First save navigates to the new + * service's own edit page, Connect tab, ?created=1. + * STUB — full implementation lands in the tab build phase. The selector and + * class name are the frozen contract with the routing shim. + */ +import { CommonModule } from '@angular/common'; +import { Component } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; + +@Component({ + selector: 'df-mcp-create', + standalone: true, + imports: [CommonModule, MatButtonModule], + template: `
+ New MCP server — implementation pending. +
`, +}) +export class DfMcpCreateComponent {} diff --git a/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.html b/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.html new file mode 100644 index 00000000..4a4a745b --- /dev/null +++ b/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.html @@ -0,0 +1,94 @@ +
+ +
+
+

{{ store.draftLabel || store.service.name }}

+ + {{ store.service.isActive ? '● Active' : 'Inactive — endpoint refuses connections' }} + + + + ⚠ Serves no tools + +
+
+ {{ mcpUrl }} + + + OAuth 2.1{{ store.cfg.allowApiKeyAuth ? ' · API key' : '' }} · Streamable HTTP + +
+ +
+ + + + + + +
+
+ + Unsaved changes + + · {{ store.savedEffective().total }} → {{ store.effective().total }} tools + + + + +
+
+
diff --git a/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.scss b/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.scss new file mode 100644 index 00000000..b5ad339a --- /dev/null +++ b/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.scss @@ -0,0 +1,148 @@ +/* Shell chrome for the MCP service page. Tab components carry their own + styles; shared chip/card primitives live here so tabs stay consistent. */ +.mcp-page { + position: relative; + padding-bottom: 72px; // room for the dirty bar +} + +.mcp-head { + margin-bottom: 4px; + + .mcp-head-row { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + + h1 { + font-size: 21px; + font-weight: 700; + margin: 0; + } + } + + .mcp-head-url { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + margin-top: 8px; + + code { + font-size: 13px; + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 7px; + padding: 4px 10px; + overflow-x: auto; + max-width: 100%; + } + + .mcp-head-auth { + font-size: 12.5px; + opacity: 0.65; + } + } +} + +.mcp-tabs { + display: flex; + gap: 2px; + border-bottom: 1px solid rgba(0, 0, 0, 0.12); + margin: 14px 0 18px; + + .mcp-tab { + background: none; + border: none; + cursor: pointer; + font: inherit; + padding: 9px 16px; + font-weight: 600; + font-size: 13.5px; + opacity: 0.65; + border-bottom: 2.5px solid transparent; + margin-bottom: -1px; + + &.on { + opacity: 1; + color: var(--df-accent, #5c5699); + border-bottom-color: var(--df-accent, #5c5699); + } + } +} + +/* Shared chip primitive (used by shell + tabs) */ +.mcp-chip { + display: inline-flex; + align-items: center; + gap: 5px; + padding: 2px 9px; + border-radius: 999px; + font-size: 12px; + font-weight: 600; + border: 1px solid rgba(0, 0, 0, 0.14); + background: rgba(0, 0, 0, 0.02); + white-space: nowrap; + + &.good { + background: #e7f2e8; + border-color: rgba(46, 125, 50, 0.35); + color: #2e7d32; + } + &.warn { + background: #fdf3dc; + border-color: rgba(154, 103, 0, 0.4); + color: #9a6700; + } + &.primary { + background: rgba(92, 86, 153, 0.1); + border-color: rgba(92, 86, 153, 0.38); + color: var(--df-accent, #5c5699); + } +} +.mcp-chip-btn { + cursor: pointer; + font: inherit; + font-size: 12px; + font-weight: 600; +} + +.mcp-dirty-bar { + position: fixed; + left: 0; + right: 0; + bottom: 0; + z-index: 30; + display: flex; + justify-content: center; + padding: 0 16px 14px; + pointer-events: none; + + .mcp-dirty-inner { + pointer-events: auto; + display: flex; + align-items: center; + gap: 14px; + background: #0f0761; + color: #fff; + border-radius: 12px; + padding: 8px 12px 8px 18px; + box-shadow: 0 6px 24px rgba(20, 18, 40, 0.25); + font-size: 13.5px; + flex-wrap: wrap; + } + + .mcp-dirty-discard { + color: #cfcbe8; + } + .mcp-dirty-save { + background: #fff; + color: #0f0761; + } +} + +@media (max-width: 700px) { + .mcp-head .mcp-head-row h1 { + font-size: 18px; + } +} diff --git a/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.ts b/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.ts new file mode 100644 index 00000000..5e13497e --- /dev/null +++ b/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.ts @@ -0,0 +1,227 @@ +/** + * Shell for the redesigned MCP service page: persistent endpoint header, + * Connect / Tools / Settings tabs, dirty bar with the tool-count delta, and + * the save pipeline (auto cache flush, stay-in-place, delta snackbar, + * reconnect banner arming). Tabs receive the McpEditorStore and mutate it. + */ +import { CommonModule } from '@angular/common'; +import { Component, Inject, OnDestroy, OnInit } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatIconModule } from '@angular/material/icon'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActivatedRoute, Router } from '@angular/router'; +import { Subscription, forkJoin } from 'rxjs'; +import { UntilDestroy } from '@ngneat/until-destroy'; +import { + CACHE_SERVICE_TOKEN, + SERVICES_SERVICE_TOKEN, + SERVICE_TYPE_SERVICE_TOKEN, +} from 'src/app/shared/constants/tokens'; +import { DfBaseCrudService } from 'src/app/shared/services/df-base-crud.service'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { GenericListResponse } from 'src/app/shared/types/generic-http'; +import { serializeMcpConfig, toBackendServices } from '../mcp-effective'; +import { McpEditorStore, McpServiceType } from '../mcp-store'; +import { DfMcpConnectComponent } from '../df-mcp-connect/df-mcp-connect.component'; +import { DfMcpToolsComponent } from '../df-mcp-tools/df-mcp-tools.component'; +import { DfMcpSettingsComponent } from '../df-mcp-settings/df-mcp-settings.component'; + +export type McpTab = 'connect' | 'tools' | 'settings'; + +@UntilDestroy({ checkProperties: true }) +@Component({ + selector: 'df-mcp-details', + templateUrl: './df-mcp-details.component.html', + styleUrls: ['./df-mcp-details.component.scss'], + standalone: true, + imports: [ + CommonModule, + MatButtonModule, + MatIconModule, + MatTooltipModule, + DfMcpConnectComponent, + DfMcpToolsComponent, + DfMcpSettingsComponent, + ], +}) +export class DfMcpDetailsComponent implements OnInit, OnDestroy { + store = new McpEditorStore(); + tab: McpTab = 'connect'; + loading = true; + saving = false; + private sub?: Subscription; + + constructor( + private activatedRoute: ActivatedRoute, + private router: Router, + @Inject(SERVICES_SERVICE_TOKEN) private servicesService: DfBaseCrudService, + @Inject(SERVICE_TYPE_SERVICE_TOKEN) + private serviceTypeService: DfBaseCrudService, + @Inject(CACHE_SERVICE_TOKEN) private cacheService: DfBaseCrudService, + private snackbarService: DfSnackbarService + ) {} + + ngOnInit(): void { + const data = this.activatedRoute.snapshot.data['data']; + const qp = this.activatedRoute.snapshot.queryParamMap; + this.store.created = qp.get('created') === '1'; + const type: McpServiceType = + data?.type === 'system_mcp' ? 'system_mcp' : 'mcp'; + this.store.init( + { + id: data?.id, + name: data?.name ?? '', + label: data?.label || data?.name || '', + description: data?.description ?? '', + isActive: data?.isActive ?? true, + type, + raw: data, + }, + data?.config ?? {} + ); + const requestedTab = qp.get('tab') as McpTab | null; + if (requestedTab && ['connect', 'tools', 'settings'].includes(requestedTab)) { + this.tab = requestedTab; + } + this.loadBackendServices(); + this.sub = this.store.changes.subscribe(() => undefined); + } + + ngOnDestroy(): void { + this.sub?.unsubscribe(); + } + + private loadBackendServices(): void { + // The daemon serves tools for Database-group services and local file + // storage. Fetch types (for the group map) + services in one go. + forkJoin({ + types: this.serviceTypeService.getAll>({ + fields: 'name,group', + limit: 1000, + }), + services: this.servicesService.getAll>({ + limit: 1000, + fields: 'id,name,label,type,is_active', + sort: 'name', + }), + }).subscribe({ + next: ({ types, services }) => { + const groupMap: Record = {}; + for (const t of types?.resource ?? []) groupMap[t.name] = t.group; + this.store.backendServices = toBackendServices( + services?.resource ?? [], + groupMap + ); + this.store.backendLoaded = true; + this.loading = false; + this.store.touch(); + }, + error: () => { + this.store.backendLoaded = true; + this.loading = false; + this.store.touch(); + }, + }); + } + + /* ------------------------------ header ------------------------------ */ + get mcpUrl(): string { + return `${window.location.origin}/mcp/${this.store.service.name}`; + } + + copyUrl(): void { + navigator.clipboard?.writeText(this.mcpUrl).catch(() => undefined); + this.store.copiedUrl = true; + this.snackbarService.openSnackBar('Endpoint URL copied.', 'success'); + } + + setTab(tab: McpTab): void { + this.tab = tab; + } + + /* ------------------------------- save ------------------------------- */ + save(): void { + if (this.saving || !this.store.dirty()) return; + const s = this.store; + const wasTools = s.savedEffective().total; + const renamed = s.draftName !== s.service.name; + const connectionAffecting = s.connectionAffecting(); + if (renamed) { + const ok = window.confirm( + `Renaming changes your endpoint URL to …/mcp/${s.draftName}. ` + + 'Connected clients will break until they update. Rename?' + ); + if (!ok) return; + } + this.saving = true; + const payload: any = { + ...s.service.raw, + id: s.service.id, + name: s.draftName, + label: s.draftLabel, + description: s.draftDescription, + isActive: s.draftIsActive, + type: s.service.type, + config: serializeMcpConfig(s.cfg, s.service.type), + }; + delete payload.serviceDocByServiceId; + this.servicesService.update(s.service.id, payload).subscribe({ + next: () => { + this.saving = false; + s.markSaved(); + // MCP saves always flush the service cache — no button for it. + this.cacheService.delete(s.service.name).subscribe({ + next: () => undefined, + error: () => undefined, + }); + const now = s.effective().total; + if (now === 0) { + this.snackbarService.openSnackBar( + 'Saved — this server serves no tools. Agents can connect but can call nothing.', + 'warning' + ); + } else if (now !== wasTools) { + this.snackbarService.openSnackBar( + `Saved — ${now} tools live (was ${wasTools}).`, + 'success' + ); + } else { + this.snackbarService.openSnackBar('Saved.', 'success'); + } + if (connectionAffecting) { + s.reconnectBanner = true; + } + s.touch(); + }, + error: err => { + this.saving = false; + this.snackbarService.openSnackBar( + err?.error?.error?.message ?? 'Save failed.', + 'error' + ); + }, + }); + } + + discard(): void { + this.store.discard(); + } + + /** Delete server (Settings danger zone calls this). */ + deleteServer(): void { + const s = this.store; + const typed = window.prompt( + `Delete this MCP server? Clients lose access immediately.\n` + + `Type the server name (${s.service.name}) to confirm:` + ); + if (typed !== s.service.name) return; + this.servicesService.delete(s.service.id).subscribe({ + next: () => { + this.snackbarService.openSnackBar('Server deleted.', 'success'); + this.router.navigate(['../'], { relativeTo: this.activatedRoute }); + }, + error: () => + this.snackbarService.openSnackBar('Delete failed.', 'error'), + }); + } +} diff --git a/src/app/adf-mcp/df-mcp-route-shim.component.ts b/src/app/adf-mcp/df-mcp-route-shim.component.ts new file mode 100644 index 00000000..62d47d60 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-route-shim.component.ts @@ -0,0 +1,52 @@ +/** + * Routing shim for the service-details routes: MCP services get the + * redesigned editor, everything else keeps the legacy generic editor. + * + * Edit (`:id`): decided by the resolved service's type. + * Create: decided by the route's `groups` data — the AI → MCP section + * creates with the MCP create page; every other section keeps the generic + * create form (which can still create an mcp service via its type picker; + * its save handler then lands on the new MCP editor via ?created=1). + */ +import { CommonModule } from '@angular/common'; +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { DfServiceDetailsComponent } from '../adf-services/df-service-details/df-service-details.component'; +import { DfMcpDetailsComponent } from './df-mcp-details/df-mcp-details.component'; +import { DfMcpCreateComponent } from './df-mcp-create/df-mcp-create.component'; + +@Component({ + selector: 'df-mcp-route-shim', + standalone: true, + imports: [ + CommonModule, + DfServiceDetailsComponent, + DfMcpDetailsComponent, + DfMcpCreateComponent, + ], + template: ` + + + + `, +}) +export class DfMcpRouteShimComponent implements OnInit { + mode: 'mcp-edit' | 'mcp-create' | 'generic' = 'generic'; + + constructor(private activatedRoute: ActivatedRoute) {} + + ngOnInit(): void { + const snap = this.activatedRoute.snapshot; + const service = snap.data['data']; + if (service?.type === 'mcp' || service?.type === 'system_mcp') { + this.mode = 'mcp-edit'; + return; + } + const isCreate = !snap.paramMap.get('id'); + const groups: string[] = + snap.data['groups'] || snap.parent?.data?.['groups'] || []; + if (isCreate && groups.includes('MCP')) { + this.mode = 'mcp-create'; + } + } +} diff --git a/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.ts b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.ts new file mode 100644 index 00000000..8389f8bc --- /dev/null +++ b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.ts @@ -0,0 +1,25 @@ +/** + * Settings tab: Identity, Authentication (redirect URIs, API-key toggle, + * auto OAuth picker, regenerate secret), Serving (tool naming, catalog + * delivery, scope note), Housekeeping (orphan review, cache flush), + * Full configuration viewer, Danger zone. + * STUB — full implementation lands in the tab build phase. The selector, + * class name, inputs and outputs are the frozen contract with the shell. + */ +import { CommonModule } from '@angular/common'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { McpEditorStore } from '../mcp-store'; + +@Component({ + selector: 'df-mcp-settings', + standalone: true, + imports: [CommonModule, MatButtonModule], + template: `
+ Settings tab — implementation pending. +
`, +}) +export class DfMcpSettingsComponent { + @Input({ required: true }) store!: McpEditorStore; + @Output() requestDelete = new EventEmitter(); +} diff --git a/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.ts b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.ts new file mode 100644 index 00000000..e0c8d4ff --- /dev/null +++ b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.ts @@ -0,0 +1,25 @@ +/** + * Tools tab: the single exposure + curation surface (exposed-service rows + * with capability-group drill-ins), Global tools, Custom tools, the + * "What an agent gets" rail, the Expose-services picker and the + * "What an agent sees" preview drawer. + * STUB — full implementation lands in the tab build phase. The selector, + * class name and inputs are the frozen contract with the shell. + */ +import { CommonModule } from '@angular/common'; +import { Component, Input } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { McpEditorStore } from '../mcp-store'; + +@Component({ + selector: 'df-mcp-tools', + standalone: true, + imports: [CommonModule, MatButtonModule], + template: `
+ Tools tab — implementation pending. +
`, +}) +export class DfMcpToolsComponent { + @Input({ required: true }) store!: McpEditorStore; + @Input() loading = false; +} diff --git a/src/app/adf-mcp/mcp-catalog.ts b/src/app/adf-mcp/mcp-catalog.ts new file mode 100644 index 00000000..a2e72922 --- /dev/null +++ b/src/app/adf-mcp/mcp-catalog.ts @@ -0,0 +1,292 @@ +/** + * The single client-side catalog of MCP tools the DreamFactory daemon serves. + * + * Every count, fraction and preview in the MCP editor derives from this one + * module. Verb names mirror the daemon exactly: a database service named + * `crm` serves `crm_get_tables` in prefixed style and a shared `get_tables` + * (with a `service` argument) in merged style; disabled_tools keys are always + * the prefixed `{service}_{verb}` form in BOTH styles. + * + * Global tools: `discover_services`, `request_access`, `list_apis`, `search` + * and `fetch` are always served; the `all_*` aggregators only exist when two + * or more database services are exposed. + */ + +export interface McpToolDef { + /** Bare verb, without service prefix. */ + verb: string; + title: string; + description: string; +} + +export interface McpVerbGroup { + key: 'read' | 'schema' | 'write' | 'procs' | 'fread' | 'fwrite'; + label: string; + /** 'writes' | 'executes' | null — drives the ⚠ tag. */ + warn: 'writes' | 'executes' | null; + verbs: McpToolDef[]; +} + +export const DB_VERB_GROUPS: readonly McpVerbGroup[] = [ + { + key: 'read', + label: 'Read data', + warn: null, + verbs: [ + { + verb: 'get_table_data', + title: 'Get Table Data', + description: 'Retrieve records from a table with filtering and paging', + }, + { + verb: 'aggregate_data', + title: 'Aggregate Data', + description: + 'Compute server-side aggregations (SUM, COUNT, AVG, MIN, MAX)', + }, + ], + }, + { + key: 'schema', + label: 'Explore schema', + warn: null, + verbs: [ + { + verb: 'get_tables', + title: 'Get Tables', + description: 'List tables available in the database', + }, + { + verb: 'get_table_schema', + title: 'Get Table Schema', + description: 'Retrieve schema definition for a table', + }, + { + verb: 'get_table_fields', + title: 'Get Table Fields', + description: 'Retrieve field definitions for a table', + }, + { + verb: 'get_table_relationships', + title: 'Get Table Relationships', + description: 'Retrieve relationships definition for a table', + }, + { + verb: 'get_database_resources', + title: 'List Database Resources', + description: 'Get all resources available in the database service', + }, + { + verb: 'get_api_spec', + title: 'Get API Spec', + description: 'Get the OpenAPI specification for this database service', + }, + { + verb: 'get_data_model', + title: 'Get Data Model', + description: 'Get a condensed data model showing all tables and columns', + }, + ], + }, + { + key: 'write', + label: 'Write data', + warn: 'writes', + verbs: [ + { + verb: 'create_records', + title: 'Create Records', + description: 'Insert records into a table', + }, + { + verb: 'update_records', + title: 'Update Records', + description: 'Update (patch) records in a table', + }, + { + verb: 'delete_records', + title: 'Delete Records', + description: 'Delete records from a table', + }, + ], + }, + { + key: 'procs', + label: 'Procedures & functions', + warn: 'executes', + verbs: [ + { + verb: 'get_stored_procedures', + title: 'List Stored Procedures', + description: 'Get stored procedures available in the database', + }, + { + verb: 'call_stored_procedure', + title: 'Call Stored Procedure', + description: 'Call a stored procedure', + }, + { + verb: 'get_stored_functions', + title: 'List Stored Functions', + description: 'Get stored functions available in the database', + }, + { + verb: 'call_stored_function', + title: 'Call Stored Function', + description: 'Call a stored function', + }, + ], + }, +]; + +export const FILE_VERB_GROUPS: readonly McpVerbGroup[] = [ + { + key: 'fread', + label: 'Read files', + warn: null, + verbs: [ + { + verb: 'list_files', + title: 'List Files', + description: 'List files and folders in a path', + }, + { + verb: 'get_file', + title: 'Get File', + description: 'Read the contents of a file', + }, + { + verb: 'get_file_properties', + title: 'Get File Properties', + description: 'Get properties/metadata of a file or folder', + }, + ], + }, + { + key: 'fwrite', + label: 'Write files', + warn: 'writes', + verbs: [ + { + verb: 'create_file', + title: 'Create File', + description: 'Create or overwrite a file', + }, + { + verb: 'create_folder', + title: 'Create Folder', + description: 'Create a new folder', + }, + { + verb: 'delete_file', + title: 'Delete File or Folder', + description: 'Delete a file or folder', + }, + ], + }, +]; + +/** Always-served cross-service tools. */ +export const GLOBAL_TOOLS: readonly McpToolDef[] = [ + { + verb: 'discover_services', + title: 'Discover Services', + description: + 'List the services and operations the calling role can access', + }, + { + verb: 'request_access', + title: 'Request Access', + description: 'Explain how to request wider access', + }, + { + verb: 'list_apis', + title: 'List Available APIs', + description: 'List all available database APIs and their tool prefixes', + }, + { + verb: 'search', + title: 'Search', + description: 'Search records across the exposed services', + }, + { + verb: 'fetch', + title: 'Fetch', + description: 'Fetch one record by id', + }, +]; + +/** Cross-database aggregators — served only when 2+ database services are exposed. */ +export const AGGREGATOR_TOOLS: readonly McpToolDef[] = [ + { + verb: 'all_get_tables', + title: 'Get Tables from All Databases', + description: + 'Retrieve tables from all connected database services in one call', + }, + { + verb: 'all_find_table', + title: 'Find Table Across Databases', + description: 'Search for a table by name across all connected databases', + }, + { + verb: 'all_get_stored_procedures', + title: 'Get Stored Procedures from All', + description: 'Retrieve stored procedures from all connected databases', + }, + { + verb: 'all_get_stored_functions', + title: 'Get Stored Functions from All', + description: 'Retrieve stored functions from all connected databases', + }, + { + verb: 'all_get_resources', + title: 'Get Resources from All', + description: 'Retrieve all available resources from all connected databases', + }, + { + verb: 'all_list_files', + title: 'List Files from All Storage', + description: 'List files from all connected file storage services', + }, +]; + +/** Discovery facade served first when lazy catalog delivery engages. */ +export const LAZY_FACADE_TOOLS: readonly McpToolDef[] = [ + { verb: 'search_tools', title: 'Search Tools', description: 'Find tools by capability' }, + { verb: 'describe_tool', title: 'Describe Tool', description: 'Get one tool’s full schema' }, + { verb: 'call_tool', title: 'Call Tool', description: 'Invoke a tool by name' }, + { verb: 'list_tools', title: 'List Tools', description: 'Page through the full catalog' }, +]; + +/** Kind of backend service an MCP server can expose. */ +export type McpServiceKind = 'db' | 'file'; + +/** + * Service types the daemon serves tools for, matching loadMcpServices() in + * the legacy editor: every 'Database' group type plus local_file. + */ +export function serviceKindOf(typeGroup: string, type: string): McpServiceKind | null { + if (typeGroup === 'Database') return 'db'; + if (type === 'local_file' || typeGroup === 'File') return 'file'; + return null; +} + +export function verbGroupsFor(kind: McpServiceKind): readonly McpVerbGroup[] { + return kind === 'db' ? DB_VERB_GROUPS : FILE_VERB_GROUPS; +} + +export function verbsFor(kind: McpServiceKind): McpToolDef[] { + return verbGroupsFor(kind).flatMap(g => g.verbs); +} + +export const WRITE_GROUP_KEYS: ReadonlySet = new Set([ + 'write', + 'procs', + 'fwrite', +]); + +/** Rough per-tool token cost of a tools/list entry, for the catalog estimate. */ +export const TOKENS_PER_TOOL = 81; +/** Threshold (tokens) beyond which lazy_mode 'auto' engages, per the daemon. */ +export const LAZY_AUTO_TOKEN_THRESHOLD = 8000; diff --git a/src/app/adf-mcp/mcp-effective.ts b/src/app/adf-mcp/mcp-effective.ts new file mode 100644 index 00000000..c77f7760 --- /dev/null +++ b/src/app/adf-mcp/mcp-effective.ts @@ -0,0 +1,399 @@ +/** + * Pure model + math for the MCP editor: the stored-config contract + * (exposed_services / disabled_tools / tool_style / lazy_mode / auth fields), + * and the single effective-tools computation that feeds the rail, the row + * fractions, the tab label and the preview drawer. + * + * Everything here is side-effect free and unit-testable without Angular. + */ +import { + AGGREGATOR_TOOLS, + GLOBAL_TOOLS, + LAZY_AUTO_TOKEN_THRESHOLD, + McpServiceKind, + McpVerbGroup, + TOKENS_PER_TOOL, + WRITE_GROUP_KEYS, + serviceKindOf, + verbGroupsFor, + verbsFor, +} from './mcp-catalog'; + +/* ------------------------------------------------------------------ */ +/* Stored config */ +/* ------------------------------------------------------------------ */ + +export type ToolStyle = 'prefixed' | 'merged'; +export type LazyMode = 'auto' | 'always' | 'never' | boolean | null; + +/** Parsed, normalized view of an mcp service's config blob. */ +export interface McpConfig { + exposedServices: string[]; + disabledTools: Set; + /** null = column empty; serves as prefixed but labeled "server default". */ + toolStyle: ToolStyle | null; + lazyMode: LazyMode; + allowApiKeyAuth: boolean; + oauthClientId: string; + oauthClientSecret: string; + customLoginUrl: string; + autoOauthService: string | null; + redirectUris: string[]; + customTools: any[]; + /** Untouched fields, spread back on save so we never drop columns. */ + rest: Record; +} + +const KNOWN_KEYS = [ + 'exposed_services', + 'exposedServices', + 'disabled_tools', + 'disabledTools', + 'tool_style', + 'toolStyle', + 'lazy_mode', + 'lazyMode', + 'allow_api_key_auth', + 'allowApiKeyAuth', + 'oauth_client_id', + 'oauthClientId', + 'oauth_client_secret', + 'oauthClientSecret', + 'custom_login_url', + 'customLoginUrl', + 'auto_oauth_service', + 'autoOauthService', + 'redirect_uris', + 'redirectUris', + 'registered_redirect_uris', + 'registeredRedirectUris', + 'custom_tools', + 'customTools', +]; + +function pick(raw: Record, snake: string, camel: string): any { + if (raw[snake] !== undefined) return raw[snake]; + return raw[camel]; +} + +/** Accepts either snake_case (API) or camelCase (legacy resolver) blobs. */ +export function parseMcpConfig(raw: Record | null | undefined): McpConfig { + const r = raw ?? {}; + const exposed = pick(r, 'exposed_services', 'exposedServices'); + const disabled = pick(r, 'disabled_tools', 'disabledTools'); + const style = pick(r, 'tool_style', 'toolStyle'); + const redirect = + pick(r, 'redirect_uris', 'redirectUris') ?? + pick(r, 'registered_redirect_uris', 'registeredRedirectUris'); + const rest: Record = {}; + for (const k of Object.keys(r)) { + if (!KNOWN_KEYS.includes(k)) rest[k] = r[k]; + } + return { + exposedServices: Array.isArray(exposed) ? [...exposed] : [], + disabledTools: new Set(Array.isArray(disabled) ? disabled : []), + toolStyle: style === 'merged' ? 'merged' : style === 'prefixed' ? 'prefixed' : null, + lazyMode: pick(r, 'lazy_mode', 'lazyMode') ?? 'auto', + allowApiKeyAuth: !!pick(r, 'allow_api_key_auth', 'allowApiKeyAuth'), + oauthClientId: pick(r, 'oauth_client_id', 'oauthClientId') ?? '', + oauthClientSecret: pick(r, 'oauth_client_secret', 'oauthClientSecret') ?? '', + customLoginUrl: pick(r, 'custom_login_url', 'customLoginUrl') ?? '', + autoOauthService: pick(r, 'auto_oauth_service', 'autoOauthService') ?? null, + redirectUris: Array.isArray(redirect) ? [...redirect] : [], + customTools: pick(r, 'custom_tools', 'customTools') ?? [], + rest, + }; +} + +/** + * Emits the camelCase config payload the app's HTTP layer expects — the + * global case interceptor converts it to snake_case on the wire. + * `custom_tools` handling mirrors the legacy editor: included for `mcp` + * (mapped shape, ids preserved), omitted for `system_mcp`. + */ +export function serializeMcpConfig( + c: McpConfig, + serviceType: 'mcp' | 'system_mcp' = 'mcp' +): Record { + const out: Record = { + ...c.rest, + exposedServices: [...c.exposedServices], + disabledTools: [...c.disabledTools].sort(), + toolStyle: c.toolStyle, + lazyMode: c.lazyMode, + allowApiKeyAuth: c.allowApiKeyAuth, + oauthClientId: c.oauthClientId, + oauthClientSecret: c.oauthClientSecret, + customLoginUrl: c.customLoginUrl || null, + autoOauthService: c.autoOauthService, + redirectUris: [...c.redirectUris], + }; + if (serviceType === 'mcp') { + out['customTools'] = (c.customTools ?? []).map((tool: any) => ({ + id: tool.id, + toolType: tool.toolType || 'api', + name: tool.name, + description: tool.description, + httpMethod: tool.httpMethod, + url: tool.url, + parameters: tool.parameters, + headers: tool.headers, + function: tool.function || '', + enabled: tool.enabled, + storageServiceId: tool.storageServiceId || null, + scmRepository: tool.scmRepository || '', + scmReference: tool.scmReference || '', + storagePath: tool.storagePath || '', + })); + } + return out; +} + +/* ------------------------------------------------------------------ */ +/* Instance services (what the picker and rows are built from) */ +/* ------------------------------------------------------------------ */ + +/** One backend service the daemon could serve tools for. */ +export interface McpBackendService { + name: string; + label: string; + kind: McpServiceKind; + active: boolean; +} + +/** Build from GET system/service rows + service type groups. */ +export function toBackendServices( + rows: Array<{ name: string; label?: string; type: string; isActive?: boolean; is_active?: boolean }>, + typeGroups: Record +): McpBackendService[] { + const out: McpBackendService[] = []; + for (const r of rows) { + const kind = serviceKindOf(typeGroups[r.type] ?? '', r.type); + if (!kind) continue; + out.push({ + name: r.name, + label: r.label || r.name, + kind, + active: r.isActive ?? (r as any).is_active ?? true, + }); + } + return out; +} + +/* ------------------------------------------------------------------ */ +/* Derivations */ +/* ------------------------------------------------------------------ */ + +export function toolKey(serviceName: string, verb: string): string { + return `${serviceName}_${verb}`; +} + +export interface ServiceFraction { + on: number; + total: number; +} + +export function serviceFraction(svc: McpBackendService, disabled: ReadonlySet): ServiceFraction { + const verbs = verbsFor(svc.kind); + return { + on: verbs.filter(v => !disabled.has(toolKey(svc.name, v.verb))).length, + total: verbs.length, + }; +} + +export type GroupState = 'on' | 'off' | 'part'; + +export function groupState( + svc: McpBackendService, + group: McpVerbGroup, + disabled: ReadonlySet +): GroupState { + const on = group.verbs.filter(v => !disabled.has(toolKey(svc.name, v.verb))).length; + if (on === 0) return 'off'; + return on === group.verbs.length ? 'on' : 'part'; +} + +export type AccessKind = 'full' | 'ro' | 'custom' | 'zero'; + +export interface AccessState { + kind: AccessKind; + /** e.g. "Full", "Read-only", "Custom 11 of 16", "0 of 16" */ + label: string; +} + +export function accessState(svc: McpBackendService, disabled: ReadonlySet): AccessState { + const f = serviceFraction(svc, disabled); + if (f.on === 0) return { kind: 'zero', label: `0 of ${f.total}` }; + if (f.on === f.total) return { kind: 'full', label: 'Full' }; + const groups = verbGroupsFor(svc.kind); + const writeOff = groups + .filter(g => WRITE_GROUP_KEYS.has(g.key)) + .every(g => groupState(svc, g, disabled) === 'off'); + const readOn = groups + .filter(g => !WRITE_GROUP_KEYS.has(g.key)) + .every(g => groupState(svc, g, disabled) === 'on'); + if (writeOff && readOn) return { kind: 'ro', label: 'Read-only' }; + return { kind: 'custom', label: `Custom ${f.on} of ${f.total}` }; +} + +/** disabled_tools keys that make one service read-only. */ +export function readOnlyKeys(svc: McpBackendService): string[] { + return verbGroupsFor(svc.kind) + .filter(g => WRITE_GROUP_KEYS.has(g.key)) + .flatMap(g => g.verbs.map(v => toolKey(svc.name, v.verb))); +} + +/** All prefixed keys for one service (used by Reset to all / Full access). */ +export function allKeys(svc: McpBackendService): string[] { + return verbsFor(svc.kind).map(v => toolKey(svc.name, v.verb)); +} + +/* ------------------------------------------------------------------ */ +/* The one effective computation */ +/* ------------------------------------------------------------------ */ + +export interface ExposedRow { + name: string; + svc: McpBackendService | null; // null => orphan (renamed/deleted) +} + +export function exposedRows(cfg: McpConfig, services: McpBackendService[]): ExposedRow[] { + return cfg.exposedServices.map(name => ({ + name, + svc: services.find(s => s.name === name) ?? null, + })); +} + +function activeExposed(cfg: McpConfig, services: McpBackendService[], kind?: McpServiceKind): McpBackendService[] { + return exposedRows(cfg, services) + .map(r => r.svc) + .filter((s): s is McpBackendService => !!s && s.active && (!kind || s.kind === kind)); +} + +export interface EffectiveBreakdown { + total: number; + /** merged: shared verb count; prefixed: sum of per-db enabled verbs. */ + dbTools: number; + dbServices: number; + fileTools: number; + fileServices: number; + globalTools: number; + aggregators: number; + customTools: number; + /** distinct write/execute verbs enabled anywhere */ + writeVerbs: number; + /** services with any write/execute verb enabled */ + writeReach: number; + writeReachDb: number; + readOnly: boolean; + tokenEstimate: number; + lazyEngaged: boolean; + effectiveStyle: ToolStyle; +} + +export function effectiveTools( + cfg: McpConfig, + services: McpBackendService[] +): EffectiveBreakdown { + const style: ToolStyle = cfg.toolStyle === 'merged' ? 'merged' : 'prefixed'; + const dbs = activeExposed(cfg, services, 'db'); + const files = activeExposed(cfg, services, 'file'); + const disabled = cfg.disabledTools; + + let dbTools = 0; + if (dbs.length) { + if (style === 'merged') { + for (const v of verbsFor('db')) { + if (dbs.some(d => !disabled.has(toolKey(d.name, v.verb)))) dbTools++; + } + } else { + dbTools = dbs.reduce((a, d) => a + serviceFraction(d, disabled).on, 0); + } + } + const fileTools = files.reduce((a, f) => a + serviceFraction(f, disabled).on, 0); + // Global tools disable by their bare name in the same disabled_tools list. + const globalTools = GLOBAL_TOOLS.filter(t => !disabled.has(t.verb)).length; + const aggregators = + dbs.length >= 2 + ? AGGREGATOR_TOOLS.filter(t => !disabled.has(t.verb)).length + : 0; + const customTools = (cfg.customTools ?? []).filter( + (t: any) => t?.enabled !== false && t?.enabled !== 0 + ).length; + + const writeVerbSet = new Set(); + let writeReach = 0; + let writeReachDb = 0; + for (const s of [...dbs, ...files]) { + const on = verbGroupsFor(s.kind) + .filter(g => WRITE_GROUP_KEYS.has(g.key)) + .flatMap(g => g.verbs) + .filter(v => !disabled.has(toolKey(s.name, v.verb))); + if (on.length) { + writeReach++; + if (s.kind === 'db') writeReachDb++; + on.forEach(v => writeVerbSet.add(v.verb)); + } + } + + const total = dbTools + fileTools + globalTools + aggregators + customTools; + const tokenEstimate = total * TOKENS_PER_TOOL; + const lazyEngaged = + cfg.lazyMode === 'always' || + cfg.lazyMode === true || + (cfg.lazyMode === 'auto' && tokenEstimate > LAZY_AUTO_TOKEN_THRESHOLD); + + return { + total, + dbTools, + dbServices: dbs.length, + fileTools, + fileServices: files.length, + globalTools, + aggregators, + customTools, + writeVerbs: writeVerbSet.size, + writeReach, + writeReachDb, + readOnly: writeVerbSet.size === 0, + tokenEstimate, + lazyEngaged, + effectiveStyle: style, + }; +} + +/** In merged style: how many exposed DBs a verb reaches. */ +export function verbReach( + verb: string, + cfg: McpConfig, + services: McpBackendService[] +): { on: string[]; total: number } { + const dbs = activeExposed(cfg, services, 'db'); + return { + on: dbs.filter(d => !cfg.disabledTools.has(toolKey(d.name, verb))).map(d => d.name), + total: dbs.length, + }; +} + +/** + * disabled_tools entries whose {service} prefix matches no known service name + * — and which aren't bare global/aggregator/facade/custom tool names. + */ +export function orphanedKeys(cfg: McpConfig, services: McpBackendService[]): string[] { + const bare = new Set([ + ...GLOBAL_TOOLS.map(t => t.verb), + ...AGGREGATOR_TOOLS.map(t => t.verb), + ...(cfg.customTools ?? []).map((t: any) => t?.name).filter(Boolean), + ]); + const names = new Set(services.map(s => s.name)); + const exposedOrphans = cfg.exposedServices.filter(n => !names.has(n)); + const owned = (key: string) => + bare.has(key) || + [...names, ...exposedOrphans].some(n => key.startsWith(n + '_')); + return [...cfg.disabledTools].filter(k => !owned(k)); +} + +/** Emitted tool name a client sees for a db verb in the given style. */ +export function emittedDbToolName(style: ToolStyle, serviceName: string, verb: string): string { + return style === 'merged' ? verb : toolKey(serviceName, verb); +} diff --git a/src/app/adf-mcp/mcp-store.ts b/src/app/adf-mcp/mcp-store.ts new file mode 100644 index 00000000..d9853c59 --- /dev/null +++ b/src/app/adf-mcp/mcp-store.ts @@ -0,0 +1,248 @@ +/** + * Shared editor state for the MCP service page. The shell component owns one + * instance and hands it to every tab; tabs mutate the draft config through + * it and call touch(). All effective math funnels through effective(). + */ +import { Subject } from 'rxjs'; +import { + AccessState, + EffectiveBreakdown, + McpBackendService, + McpConfig, + accessState, + allKeys, + effectiveTools, + exposedRows, + ExposedRow, + orphanedKeys, + parseMcpConfig, + readOnlyKeys, + serviceFraction, + ServiceFraction, + toolKey, +} from './mcp-effective'; + +export type McpServiceType = 'mcp' | 'system_mcp'; + +export interface McpServiceRecord { + id: number; + name: string; + label: string; + description: string; + isActive: boolean; + type: McpServiceType; + /** Raw camelCased service row from the resolver, for save spreads. */ + raw: any; +} + +function cloneCfg(c: McpConfig): McpConfig { + return { + ...c, + exposedServices: [...c.exposedServices], + disabledTools: new Set(c.disabledTools), + redirectUris: [...c.redirectUris], + customTools: (c.customTools ?? []).map((t: any) => ({ ...t })), + rest: { ...c.rest }, + }; +} + +function cfgFingerprint(c: McpConfig): string { + return JSON.stringify({ + e: [...c.exposedServices], + d: [...c.disabledTools].sort(), + s: c.toolStyle, + l: c.lazyMode, + k: c.allowApiKeyAuth, + ci: c.oauthClientId, + cs: c.oauthClientSecret, + lu: c.customLoginUrl, + ao: c.autoOauthService, + r: [...c.redirectUris], + ct: c.customTools, + }); +} + +export class McpEditorStore { + service!: McpServiceRecord; + /** Draft the tabs edit. */ + cfg!: McpConfig; + /** Last-saved state, for dirty/delta math. */ + savedCfg!: McpConfig; + /** Draft identity fields (Settings tab). */ + draftName = ''; + draftLabel = ''; + draftDescription = ''; + draftIsActive = true; + + /** All instance services the daemon could serve (db/file), from the API. */ + backendServices: McpBackendService[] = []; + backendLoaded = false; + + /** First-run (arrived with ?created=1). */ + created = false; + checklistDismissed = false; + copiedUrl = false; + copiedClient = false; + /** One-shot amber banner on Connect after connection-affecting saves. */ + reconnectBanner = false; + + readonly changes = new Subject(); + + init(service: McpServiceRecord, rawConfig: any): void { + this.service = service; + this.cfg = parseMcpConfig(rawConfig); + this.savedCfg = cloneCfg(this.cfg); + this.draftName = service.name; + this.draftLabel = service.label; + this.draftDescription = service.description; + this.draftIsActive = service.isActive; + } + + get isSystemMcp(): boolean { + return this.service?.type === 'system_mcp'; + } + + touch(): void { + this.changes.next(); + } + + dirty(): boolean { + return ( + cfgFingerprint(this.cfg) !== cfgFingerprint(this.savedCfg) || + this.draftName !== this.service.name || + this.draftLabel !== this.service.label || + this.draftDescription !== this.service.description || + this.draftIsActive !== this.service.isActive + ); + } + + /** True when the pending changes alter what connected clients must know. */ + connectionAffecting(): boolean { + return ( + this.draftName !== this.service.name || + this.cfg.allowApiKeyAuth !== this.savedCfg.allowApiKeyAuth || + this.cfg.toolStyle !== this.savedCfg.toolStyle || + this.cfg.oauthClientSecret !== this.savedCfg.oauthClientSecret || + JSON.stringify(this.cfg.redirectUris) !== + JSON.stringify(this.savedCfg.redirectUris) + ); + } + + markSaved(): void { + this.savedCfg = cloneCfg(this.cfg); + this.service.name = this.draftName; + this.service.label = this.draftLabel; + this.service.description = this.draftDescription; + this.service.isActive = this.draftIsActive; + this.touch(); + } + + discard(): void { + this.cfg = cloneCfg(this.savedCfg); + this.draftName = this.service.name; + this.draftLabel = this.service.label; + this.draftDescription = this.service.description; + this.draftIsActive = this.service.isActive; + this.touch(); + } + + /* ------------ derived shortcuts (all funnel through mcp-effective) --- */ + effective(): EffectiveBreakdown { + return effectiveTools(this.cfg, this.backendServices); + } + savedEffective(): EffectiveBreakdown { + return effectiveTools(this.savedCfg, this.backendServices); + } + rows(): ExposedRow[] { + return exposedRows(this.cfg, this.backendServices); + } + fraction(svc: McpBackendService): ServiceFraction { + return serviceFraction(svc, this.cfg.disabledTools); + } + access(svc: McpBackendService): AccessState { + return accessState(svc, this.cfg.disabledTools); + } + orphans(): string[] { + return orphanedKeys(this.cfg, this.backendServices); + } + + /* ------------ mutations ------------ */ + isToolEnabled(serviceName: string, verb: string): boolean { + return !this.cfg.disabledTools.has(toolKey(serviceName, verb)); + } + setTool(serviceName: string, verb: string, enabled: boolean): void { + const k = toolKey(serviceName, verb); + enabled ? this.cfg.disabledTools.delete(k) : this.cfg.disabledTools.add(k); + this.touch(); + } + /** Bare-name tools (globals/aggregators) share the same disabled list. */ + isBareToolEnabled(verb: string): boolean { + return !this.cfg.disabledTools.has(verb); + } + setBareTool(verb: string, enabled: boolean): void { + enabled + ? this.cfg.disabledTools.delete(verb) + : this.cfg.disabledTools.add(verb); + this.touch(); + } + setServiceFull(svc: McpBackendService): void { + allKeys(svc).forEach(k => this.cfg.disabledTools.delete(k)); + this.touch(); + } + setServiceReadOnly(svc: McpBackendService): void { + allKeys(svc).forEach(k => this.cfg.disabledTools.delete(k)); + readOnlyKeys(svc).forEach(k => this.cfg.disabledTools.add(k)); + this.touch(); + } + /** + * Expose services, applying read-only compilation when asked. Never touches + * keys of services that stay exposed (migration-safety rule 3); re-exposed + * services keep their dormant curation unless an access choice overrides it. + */ + exposeServices(names: string[], access: 'ro' | 'rw' | 'keep'): void { + for (const name of names) { + if (!this.cfg.exposedServices.includes(name)) { + this.cfg.exposedServices.push(name); + } + const svc = this.backendServices.find(s => s.name === name); + if (!svc || access === 'keep') continue; + if (access === 'ro') this.setServiceReadOnly(svc); + else this.setServiceFull(svc); + } + this.touch(); + } + /** Remove from exposure. Curation keys are kept unless clearCuration. */ + removeService(name: string, clearCuration = false): void { + this.cfg.exposedServices = this.cfg.exposedServices.filter(n => n !== name); + if (clearCuration) { + for (const k of [...this.cfg.disabledTools]) { + if (k.startsWith(name + '_')) this.cfg.disabledTools.delete(k); + } + } + this.touch(); + } + /** Rename-successor flow: repoint an orphaned entry and re-prefix its keys. */ + renameExposedEntry(oldName: string, newName: string): void { + this.cfg.exposedServices = this.cfg.exposedServices.map(n => + n === oldName ? newName : n + ); + for (const k of [...this.cfg.disabledTools]) { + if (k.startsWith(oldName + '_')) { + this.cfg.disabledTools.delete(k); + this.cfg.disabledTools.add(newName + k.slice(oldName.length)); + } + } + this.touch(); + } + makeReadOnly(): void { + for (const row of this.rows()) { + if (row.svc && row.svc.active) this.setServiceReadOnly(row.svc); + } + this.touch(); + } + dormantCurationCount(name: string): number { + let n = 0; + for (const k of this.cfg.disabledTools) if (k.startsWith(name + '_')) n++; + return n; + } +} diff --git a/src/app/adf-services/df-service-details/df-service-details.component.ts b/src/app/adf-services/df-service-details/df-service-details.component.ts index 7ce7ea8c..c2841e9e 100644 --- a/src/app/adf-services/df-service-details/df-service-details.component.ts +++ b/src/app/adf-services/df-service-details/df-service-details.component.ts @@ -2208,6 +2208,22 @@ export class DfServiceDetailsComponent implements OnInit { `/api-connections/api-docs/${formattedName}`, ]); } + } else if (this.isMcp) { + // A new MCP server lands on its own editor's Connect tab with + // the endpoint URL and first-run checklist — never API Docs, + // which has nothing an MCP admin needs. `../{id}` is the + // sibling :id route (the MCP shim renders the new editor). + const newId = response?.resource?.[0]?.id; + if (newId != null) { + this.router.navigate(['../', newId], { + relativeTo: this.activatedRoute, + queryParams: { created: 1 }, + }); + } else { + this.router.navigate(['../'], { + relativeTo: this.activatedRoute, + }); + } } else { this.router.navigate([ `/api-connections/api-docs/${formattedName}`, diff --git a/src/app/adf-services/routes.ts b/src/app/adf-services/routes.ts index e0be11b1..e18bf217 100644 --- a/src/app/adf-services/routes.ts +++ b/src/app/adf-services/routes.ts @@ -12,20 +12,24 @@ export const ServiceRoutes: Routes = [ ), }, { + // The shim renders the MCP create page for the AI → MCP section and the + // legacy generic create form everywhere else. path: ROUTES.CREATE, loadComponent: () => - import('./df-service-details/df-service-details.component').then( - m => m.DfServiceDetailsComponent + import('../adf-mcp/df-mcp-route-shim.component').then( + m => m.DfMcpRouteShimComponent ), resolve: { serviceTypes: serviceTypesResolver, }, }, { + // The shim renders the redesigned MCP editor for mcp/system_mcp services + // and the legacy generic editor for every other type. path: ':id', loadComponent: () => - import('./df-service-details/df-service-details.component').then( - m => m.DfServiceDetailsComponent + import('../adf-mcp/df-mcp-route-shim.component').then( + m => m.DfMcpRouteShimComponent ), resolve: { data: serviceResolver, From 6f1ce167d95ba36d5f57f204817fcd4a0d165fdc Mon Sep 17 00:00:00 2001 From: Kevin McGahey Date: Mon, 21 Sep 2026 21:43:58 +0000 Subject: [PATCH 02/14] feat(mcp): implement Connect, Tools, Settings and Create surfaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Connect: first-run checklist (?created=1), endpoint card with reachability probe (401 renders as healthy auth), OAuth/API-key cards, six auth-aware client setup panels with one-click Claude redirect-URI add. Tools: unified exposure+curation surface — exposed-service rows with tri-state capability drill-ins, derived access chips, orphan needs-attention flow (keep-curation remove + rename successor with key rewrite), filter strip + bulk bar at scale, global/aggregator and custom tool sections, the what-an-agent-gets rail with derived read-only and make-read-only, expose-services picker (read-only default, simulated consequence footer), what-an-agent-sees preview drawer with named exclusion reasons; system_mcp renders the fixed catalog with the same grammar. Settings: identity with rename warning, redirect URIs, API-key toggle, honest tool-naming radio (null renders as server default, never rewritten on load), catalog delivery, itemized orphan housekeeping, masked full config viewer, danger zone. Create: one-decision page — type cards, live URL preview, exposure picker with read-only default and simulated consequence line, merged tool style written at create, lands on Connect ?created=1. Store: totalTools()/savedTotalTools() so system_mcp headers count the fixed catalog. 122 jest tests across 6 suites. Co-Authored-By: Claude Fable 5 --- .../df-mcp-connect.component.html | 403 +++++++++++ .../df-mcp-connect.component.scss | 384 +++++++++++ .../df-mcp-connect.component.spec.ts | 252 +++++++ .../df-mcp-connect.component.ts | 317 ++++++++- .../df-mcp-create.component.html | 292 ++++++++ .../df-mcp-create.component.scss | 449 ++++++++++++ .../df-mcp-create.component.spec.ts | 407 +++++++++++ .../df-mcp-create/df-mcp-create.component.ts | 450 +++++++++++- .../df-mcp-details.component.html | 10 +- .../df-mcp-details.component.ts | 4 +- .../df-mcp-picker.component.html | 118 ++++ .../df-mcp-picker.component.scss | 159 +++++ .../df-mcp-picker/df-mcp-picker.component.ts | 229 +++++++ .../df-mcp-preview.component.html | 46 ++ .../df-mcp-preview.component.scss | 128 ++++ .../df-mcp-preview.component.ts | 361 ++++++++++ .../df-mcp-housekeeping-dialog.component.ts | 157 +++++ .../df-mcp-settings.component.html | 274 ++++++++ .../df-mcp-settings.component.scss | 224 ++++++ .../df-mcp-settings.component.spec.ts | 482 +++++++++++++ .../df-mcp-settings.component.ts | 303 ++++++++- .../df-mcp-custom-tool-dialog.component.ts | 315 +++++++++ .../df-mcp-remove-dialog.component.ts | 104 +++ .../df-mcp-rename-dialog.component.ts | 125 ++++ .../df-mcp-tools/df-mcp-tools.component.html | 472 +++++++++++++ .../df-mcp-tools/df-mcp-tools.component.scss | 588 ++++++++++++++++ .../df-mcp-tools.component.spec.ts | 490 +++++++++++++ .../df-mcp-tools/df-mcp-tools.component.ts | 642 +++++++++++++++++- src/app/adf-mcp/mcp-effective.spec.ts | 400 +++++++++++ src/app/adf-mcp/mcp-store.spec.ts | 246 +++++++ src/app/adf-mcp/mcp-store.ts | 21 + 31 files changed, 8805 insertions(+), 47 deletions(-) create mode 100644 src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.html create mode 100644 src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.scss create mode 100644 src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.spec.ts create mode 100644 src/app/adf-mcp/df-mcp-create/df-mcp-create.component.html create mode 100644 src/app/adf-mcp/df-mcp-create/df-mcp-create.component.scss create mode 100644 src/app/adf-mcp/df-mcp-create/df-mcp-create.component.spec.ts create mode 100644 src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.html create mode 100644 src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.scss create mode 100644 src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.ts create mode 100644 src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.html create mode 100644 src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.scss create mode 100644 src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.ts create mode 100644 src/app/adf-mcp/df-mcp-settings/df-mcp-housekeeping-dialog.component.ts create mode 100644 src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.html create mode 100644 src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.scss create mode 100644 src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.spec.ts create mode 100644 src/app/adf-mcp/df-mcp-tools/df-mcp-custom-tool-dialog.component.ts create mode 100644 src/app/adf-mcp/df-mcp-tools/df-mcp-remove-dialog.component.ts create mode 100644 src/app/adf-mcp/df-mcp-tools/df-mcp-rename-dialog.component.ts create mode 100644 src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.html create mode 100644 src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.scss create mode 100644 src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.spec.ts create mode 100644 src/app/adf-mcp/mcp-effective.spec.ts create mode 100644 src/app/adf-mcp/mcp-store.spec.ts diff --git a/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.html b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.html new file mode 100644 index 00000000..ceddcda8 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.html @@ -0,0 +1,403 @@ +
+ +
+ + Connection details changed — clients may need to reconnect. The snippets + below are updated. + + +
+ + +
+
+

Server created — 3 steps to your first tool call

+ +
+
    +
  1. + {{ store.copiedUrl ? '✓' : '①' }} + Copy your endpoint URL +
  2. +
  3. + {{ store.copiedClient ? '✓' : '②' }} + Add it to a client below +
  4. +
  5. + + ✓ + + {{ exposedSummary }} — + + + + + ③ + + + 0 services exposed — agents get global and custom tools only. + Empty never means every service. + + +
  6. +
+
+ + +
+
+ {{ mcpUrl }} + +
+
+ Streamable HTTP · MCP 2025-03-26 + + {{ probe === 'ok' ? '✓ Reachable — auth enforced' : '—' }} + +
+
+ + +

Authentication

+
+
+

+ OAuth 2.1 always on +

+
+ Client ID + {{ store.cfg.oauthClientId || '—' }} + +
+
+ Client secret + {{ secretDisplay }} + + +
+ +

+ These match the URL, Client ID, and Client Secret fields in your + client's add-connector dialog. +

+

+ Redirect URIs: {{ store.cfg.redirectUris.length }} · + +

+
+ +
+

+ API key + + {{ store.cfg.allowApiKeyAuth ? 'on' : 'off' }} + +

+ +

+ Any DreamFactory API key whose role grants access to the exposed + services can connect. + + Manage API keys → + +

+

+ The URL plus any valid key grants access — treat the pair like a + password. +

+
+ +

+ API-key auth is off — enable it in + . +

+
+
+
+ + +

Connect a client

+
+ +
+ +
+ Connect with: + + +
+ +
+ + +

Claude — add a custom connector

+
    +
  1. Settings → Connectors → Add custom connector.
  2. +
  3. + Remote MCP server URL: + {{ mcpUrl }} + +
  4. +
  5. + Advanced settings → paste the OAuth Client ID and Client Secret from + above. + + +
  6. +
  7. + Allow Claude's callback: + {{ claudeCallback }} + +
  8. +
  9. Connect and sign in with DreamFactory.
  10. +
+

+ Claude connectors sign in with OAuth — API keys don't apply here. +

+
+ + + +

Claude Code

+

Run in your terminal:

+
+
{{ claudeCodeSnippet }}
+ +
+

+ Claude Code opens a browser to sign in with OAuth on first use. +

+

+ Replace YOUR_API_KEY with a DreamFactory API key whose role grants + access to the exposed services. +

+
+ + + +

Cursor

+

+ Add to .cursor/mcp.json (project) + or ~/.cursor/mcp.json (global): +

+
+
{{ cursorSnippet }}
+ +
+

+ Cursor opens a browser to sign in with OAuth on first use. +

+

+ Replace YOUR_API_KEY with a DreamFactory API key whose role grants + access to the exposed services. +

+
+ + + +

VS Code

+

One-liner:

+
+
{{ vscodeSnippet }}
+ +
+

+ VS Code opens a browser to sign in with OAuth on first use. +

+

+ Replace YOUR_API_KEY with a DreamFactory API key whose role grants + access to the exposed services. +

+
+ + + +

ChatGPT — add a connector

+
    +
  1. Settings → Connectors → Create.
  2. +
  3. + MCP server URL: + {{ mcpUrl }} + +
  4. +
  5. Authentication: OAuth — ChatGPT discovers the sign-in flow from the server.
  6. +
  7. Create, then connect and sign in with DreamFactory.
  8. +
+

+ ChatGPT connectors sign in with OAuth — API keys don't apply here. +

+
+ + + +

Generic JSON

+

+ For any MCP client that reads an + mcpServers block: +

+
+
{{ genericSnippet }}
+ +
+

+ Check reachability: + {{ genericCurl }} + + — a 401 challenge here means healthy auth. +

+
+
+ + + +
diff --git a/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.scss b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.scss new file mode 100644 index 00000000..25665726 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.scss @@ -0,0 +1,384 @@ +/* Connect tab. Card + chip primitives match the shell's (component styles + don't cascade, so the .mcp-chip primitive is copied from the shell scss). */ +.mcp-connect { + display: flex; + flex-direction: column; + gap: 14px; + max-width: 980px; +} + +/* ---------------------------------------------------------------- cards */ +.mcp-card { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 10px; + padding: 16px 18px; + + .mcp-card-title { + display: flex; + align-items: center; + gap: 8px; + font-size: 14.5px; + font-weight: 700; + margin: 0 0 10px; + } +} + +.mcp-section-title { + font-size: 12.5px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + opacity: 0.6; + margin: 6px 0 -4px; +} + +/* ------------------------------------------------- shared chip primitive */ +.mcp-chip { + display: inline-flex; + align-items: center; + gap: 5px; + padding: 2px 9px; + border-radius: 999px; + font-size: 12px; + font-weight: 600; + border: 1px solid rgba(0, 0, 0, 0.14); + background: rgba(0, 0, 0, 0.02); + white-space: nowrap; + + &.good { + background: #e7f2e8; + border-color: rgba(46, 125, 50, 0.35); + color: #2e7d32; + } + &.warn { + background: #fdf3dc; + border-color: rgba(154, 103, 0, 0.4); + color: #9a6700; + } + &.primary { + background: rgba(92, 86, 153, 0.1); + border-color: rgba(92, 86, 153, 0.38); + color: var(--df-accent, #5c5699); + } +} + +/* ------------------------------------------------------ reconnect banner */ +.mcp-reconnect-banner { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + background: #fdf3dc; + border: 1px solid rgba(154, 103, 0, 0.4); + color: #9a6700; + border-radius: 10px; + padding: 10px 14px; + font-size: 13.5px; + font-weight: 500; +} + +.mcp-x { + background: none; + border: none; + cursor: pointer; + font: inherit; + font-size: 18px; + line-height: 1; + padding: 2px 6px; + border-radius: 6px; + color: inherit; + opacity: 0.7; + + &:hover { + opacity: 1; + background: rgba(0, 0, 0, 0.05); + } +} + +/* -------------------------------------------------------------- checklist */ +.mcp-checklist { + border-color: rgba(92, 86, 153, 0.38); + + .mcp-checklist-head { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 10px; + + h2 { + font-size: 15px; + font-weight: 700; + margin: 0 0 8px; + } + } + + .mcp-checklist-steps { + list-style: none; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + gap: 7px; + + li { + display: flex; + align-items: baseline; + gap: 9px; + font-size: 13.5px; + + &.done { + color: #2e7d32; + } + } + + .mcp-step-mark { + flex: none; + font-weight: 700; + width: 18px; + text-align: center; + } + } +} + +/* --------------------------------------------------------------- endpoint */ +.mcp-endpoint { + .mcp-endpoint-row { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; + } + + .mcp-endpoint-url { + font-size: 16px; + font-weight: 600; + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 7px; + padding: 7px 12px; + overflow-x: auto; + max-width: 100%; + } + + .mcp-endpoint-sub { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + margin-top: 9px; + font-size: 12.5px; + opacity: 0.85; + } +} + +/* ------------------------------------------------------------------- auth */ +.mcp-auth-grid { + display: grid; + grid-template-columns: 1fr 1fr; + gap: 14px; + align-items: start; + + p { + font-size: 13.5px; + margin: 0 0 8px; + } +} + +.mcp-cred-row { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + margin-bottom: 6px; + font-size: 13px; + + .mcp-cred-label { + flex: none; + width: 92px; + font-weight: 600; + opacity: 0.75; + } + + .mcp-cred-value { + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 6px; + padding: 3px 8px; + font-size: 12.5px; + max-width: 240px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } +} + +.mcp-regenerate { + margin: 4px 0 6px; +} + +.mcp-caption { + font-size: 12.5px; + opacity: 0.7; + margin: 8px 0 0; +} + +.mcp-redirects-line { + font-size: 13px; + margin: 10px 0 0; +} + +/* ------------------------------------------------------------ client area */ +.mcp-client-chips { + display: flex; + gap: 8px; + flex-wrap: wrap; +} + +.mcp-client-chip { + cursor: pointer; + font: inherit; + font-size: 13px; + font-weight: 600; + padding: 6px 14px; + border-radius: 999px; + border: 1px solid rgba(0, 0, 0, 0.14); + background: #fff; + + &:hover { + border-color: rgba(92, 86, 153, 0.38); + } + + &.on { + background: rgba(92, 86, 153, 0.1); + border-color: var(--df-accent, #5c5699); + color: var(--df-accent, #5c5699); + } +} + +.mcp-auth-toggle { + display: flex; + align-items: center; + gap: 6px; + font-size: 12.5px; + font-weight: 600; + opacity: 0.9; + + button { + cursor: pointer; + font: inherit; + font-size: 12.5px; + font-weight: 600; + padding: 3px 10px; + border-radius: 999px; + border: 1px solid rgba(0, 0, 0, 0.14); + background: #fff; + + &.on { + background: rgba(92, 86, 153, 0.1); + border-color: var(--df-accent, #5c5699); + color: var(--df-accent, #5c5699); + } + } +} + +.mcp-client-panel { + p { + font-size: 13.5px; + margin: 0 0 8px; + } + + .mcp-steps { + margin: 0; + padding-left: 20px; + display: flex; + flex-direction: column; + gap: 7px; + font-size: 13.5px; + } +} + +.mcp-inline-code { + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 6px; + padding: 2px 7px; + font-size: 12.5px; + word-break: break-all; +} + +.mcp-snippet-block { + display: flex; + align-items: flex-start; + gap: 10px; + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 8px; + padding: 10px 12px; + margin: 6px 0 8px; + + pre { + flex: 1; + margin: 0; + overflow-x: auto; + font-size: 12.5px; + line-height: 1.55; + } + + button { + flex: none; + } +} + +/* ----------------------------------------------------------------- footer */ +.mcp-connect-footer { + display: flex; + flex-direction: column; + gap: 6px; + padding: 4px 2px 8px; + font-size: 13px; + opacity: 0.9; + + p { + margin: 0; + } +} + +.mcp-link { + background: none; + border: none; + cursor: pointer; + font: inherit; + font-size: inherit; + padding: 0; + color: var(--df-accent, #5c5699); + font-weight: 600; + text-decoration: none; + + &:hover { + text-decoration: underline; + } +} + +.mcp-docs-link { + display: inline-block; +} + +/* ------------------------------------------------------------- responsive */ +@media (max-width: 700px) { + .mcp-auth-grid { + grid-template-columns: 1fr; + } + + .mcp-endpoint .mcp-endpoint-url { + font-size: 13.5px; + } + + .mcp-cred-row .mcp-cred-label { + width: 100%; + } + + .mcp-snippet-block { + flex-direction: column; + } +} diff --git a/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.spec.ts b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.spec.ts new file mode 100644 index 00000000..32225bcf --- /dev/null +++ b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.spec.ts @@ -0,0 +1,252 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { provideNoopAnimations } from '@angular/platform-browser/animations'; +import { provideRouter } from '@angular/router'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { McpEditorStore } from '../mcp-store'; +import { DfMcpConnectComponent } from './df-mcp-connect.component'; + +const MCP_URL = 'https://df.test/mcp/warehouse'; + +function makeStore( + overrides: { + exposed?: string[]; + allowKey?: boolean; + created?: boolean; + } = {} +): McpEditorStore { + const store = new McpEditorStore(); + store.init( + { + id: 7, + name: 'warehouse', + label: 'Warehouse Analytics', + description: '', + isActive: true, + type: 'mcp', + raw: {}, + }, + { + exposed_services: overrides.exposed ?? [], + disabled_tools: [], + tool_style: 'merged', + allow_api_key_auth: overrides.allowKey ?? false, + oauth_client_id: 'client-id-123', + oauth_client_secret: 'original-secret', + redirect_uris: [], + } + ); + store.backendServices = [ + { name: 'billing', label: 'Billing', kind: 'db', active: true }, + { name: 'hr', label: 'HR', kind: 'db', active: true }, + ]; + store.backendLoaded = true; + store.created = overrides.created ?? true; + return store; +} + +describe('DfMcpConnectComponent', () => { + let fixture: ComponentFixture; + const snackbar = { openSnackBar: jest.fn() }; + + beforeEach(async () => { + jest.clearAllMocks(); + try { + localStorage.clear(); + } catch { + /* ignore */ + } + (global as any).fetch = jest.fn(() => Promise.resolve({ status: 401 })); + await TestBed.configureTestingModule({ + imports: [DfMcpConnectComponent], + providers: [ + provideRouter([]), + provideNoopAnimations(), + { provide: DfSnackbarService, useValue: snackbar }, + ], + }).compileComponents(); + }); + + function create(store: McpEditorStore): DfMcpConnectComponent { + fixture = TestBed.createComponent(DfMcpConnectComponent); + fixture.componentInstance.store = store; + fixture.componentInstance.mcpUrl = MCP_URL; + fixture.detectChanges(); + return fixture.componentInstance; + } + + function el(): HTMLElement { + return fixture.nativeElement as HTMLElement; + } + + function byTestId(id: string): HTMLElement | null { + return el().querySelector(`[data-testid="${id}"]`); + } + + describe('first-run checklist step 3', () => { + it('renders the pre-checked summary with the effective count when services were exposed', () => { + create(makeStore({ exposed: ['billing', 'hr'] })); + const checklist = byTestId('mcp-checklist'); + expect(checklist).toBeTruthy(); + const text = checklist!.textContent ?? ''; + // 2 dbs, merged, nothing disabled: 16 shared db + 5 global + 6 aggregators + expect(text).toContain('2 services exposed (27 tools)'); + expect(text).toContain('refine in Tools'); + expect(text).not.toContain('Empty never means every service'); + }); + + it('renders the expose prompt with the empty-never-means-every-service rule when created empty', () => { + create(makeStore({ exposed: [] })); + const checklist = byTestId('mcp-checklist'); + expect(checklist).toBeTruthy(); + const text = checklist!.textContent ?? ''; + expect(text).toContain('Expose your first service'); + expect(text).toContain('0 services exposed'); + expect(text).toContain('Empty never means every service.'); + expect(text).not.toContain('refine in Tools'); + }); + + it('dismiss × sets store.checklistDismissed and hides the card', () => { + const store = makeStore({ exposed: ['billing'] }); + create(store); + (byTestId('mcp-checklist-dismiss') as HTMLButtonElement).click(); + fixture.detectChanges(); + expect(store.checklistDismissed).toBe(true); + expect(byTestId('mcp-checklist')).toBeNull(); + }); + }); + + describe('API key card', () => { + it('shows the off-state hint when allowApiKeyAuth is off', () => { + create(makeStore({ allowKey: false })); + const card = byTestId('mcp-apikey-card'); + expect(card!.textContent).toContain( + 'API-key auth is off — enable it in' + ); + expect(card!.textContent).toContain('Settings → Authentication'); + }); + + it('shows the hygiene copy when allowApiKeyAuth is on', () => { + create(makeStore({ allowKey: true })); + const card = byTestId('mcp-apikey-card'); + expect(card!.textContent).toContain( + 'The URL plus any valid key grants access — treat the pair like a password.' + ); + }); + }); + + describe('snippet auth-awareness', () => { + it('never mentions the API-key header anywhere when the flag is off', () => { + const cmp = create(makeStore({ allowKey: false })); + for (const client of [ + 'claude', + 'claude-code', + 'cursor', + 'vscode', + 'chatgpt', + 'json', + ] as const) { + cmp.selectClient(client); + fixture.detectChanges(); + expect(el().textContent).not.toContain('X-DreamFactory-API-Key'); + expect(el().textContent).not.toContain('YOUR_API_KEY'); + } + }); + + it('shows the sub-toggle and the header variant only in API-key mode when the flag is on', () => { + const cmp = create(makeStore({ allowKey: true })); + cmp.selectClient('claude-code'); + fixture.detectChanges(); + // Toggle visible, OAuth variant default: no key header yet. + expect(el().textContent).toContain('Connect with:'); + expect(el().textContent).not.toContain('X-DreamFactory-API-Key'); + cmp.setAuthVariant('apikey'); + fixture.detectChanges(); + const panel = byTestId('mcp-client-panel'); + expect(panel!.textContent).toContain( + '--header "X-DreamFactory-API-Key: YOUR_API_KEY"' + ); + }); + + it('placeholders are YOUR_API_KEY, never a session token', () => { + const cmp = create(makeStore({ allowKey: true })); + cmp.selectClient('json'); + cmp.setAuthVariant('apikey'); + fixture.detectChanges(); + const panel = byTestId('mcp-client-panel'); + expect(panel!.textContent).toContain('YOUR_API_KEY'); + expect(panel!.textContent).not.toContain('session_token'); + }); + }); + + describe('regenerate secret', () => { + it('confirms, writes 64 hex chars into the draft and marks the store dirty', () => { + const store = makeStore(); + create(store); + jest.spyOn(window, 'confirm').mockReturnValue(true); + expect(store.dirty()).toBe(false); + (byTestId('mcp-secret-regenerate') as HTMLButtonElement).click(); + expect(window.confirm).toHaveBeenCalledWith( + 'Clients using the old secret will stop connecting. Regenerate?' + ); + expect(store.cfg.oauthClientSecret).toMatch(/^[0-9a-f]{64}$/); + expect(store.cfg.oauthClientSecret).not.toBe('original-secret'); + expect(store.dirty()).toBe(true); + }); + + it('does nothing when the confirm is declined', () => { + const store = makeStore(); + create(store); + jest.spyOn(window, 'confirm').mockReturnValue(false); + (byTestId('mcp-secret-regenerate') as HTMLButtonElement).click(); + expect(store.cfg.oauthClientSecret).toBe('original-secret'); + expect(store.dirty()).toBe(false); + }); + }); + + describe('Claude redirect-URI helper', () => { + it('appends the callback once and marks the store dirty', () => { + const store = makeStore(); + create(store); + const btn = byTestId('mcp-add-redirect') as HTMLButtonElement; + btn.click(); + fixture.detectChanges(); + expect(store.cfg.redirectUris).toEqual([ + 'https://claude.ai/api/mcp/auth_callback', + ]); + expect(store.dirty()).toBe(true); + // Second click is a no-op (button disabled, guard in code). + fixture.componentInstance.addClaudeCallback(); + expect(store.cfg.redirectUris).toHaveLength(1); + }); + }); + + describe('probe chip', () => { + it('shows reachable on any HTTP response', async () => { + create(makeStore()); + await fixture.whenStable(); + fixture.detectChanges(); + expect(byTestId('mcp-probe-chip')!.textContent).toContain( + 'Reachable — auth enforced' + ); + }); + + it('stays neutral ("—") on network failure', async () => { + (global as any).fetch = jest.fn(() => Promise.reject(new Error('down'))); + create(makeStore()); + await fixture.whenStable(); + fixture.detectChanges(); + expect(byTestId('mcp-probe-chip')!.textContent!.trim()).toBe('—'); + }); + }); + + describe('checklist copy tracking', () => { + it('endpoint copy sets copiedUrl; a snippet copy sets copiedClient', () => { + const store = makeStore(); + create(store); + (byTestId('mcp-endpoint-copy') as HTMLButtonElement).click(); + expect(store.copiedUrl).toBe(true); + fixture.componentInstance.copyForClient('anything'); + expect(store.copiedClient).toBe(true); + }); + }); +}); diff --git a/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.ts b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.ts index e4dba53f..c3a56f05 100644 --- a/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.ts +++ b/src/app/adf-mcp/df-mcp-connect/df-mcp-connect.component.ts @@ -1,25 +1,322 @@ /** - * Connect tab: post-create checklist, endpoint card, auth cards (OAuth 2.1 + - * API key state), auth-aware per-client setup snippets, reconnect banner. - * STUB — full implementation lands in the tab build phase. The selector, - * class name, inputs and outputs are the frozen contract with the shell. + * Connect tab: post-create checklist, endpoint card with reachability probe, + * auth cards (OAuth 2.1 + API key state), auth-aware per-client setup + * snippets, reconnect banner. The shell owns Save; this tab only mutates the + * draft via the store (secret regeneration, redirect-URI append) and lets the + * dirty bar pick it up. */ import { CommonModule } from '@angular/common'; -import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { + Component, + EventEmitter, + Input, + OnDestroy, + OnInit, + Output, +} from '@angular/core'; +import { RouterModule } from '@angular/router'; import { MatButtonModule } from '@angular/material/button'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; import { McpEditorStore } from '../mcp-store'; import { McpTab } from '../df-mcp-details/df-mcp-details.component'; +export type McpClientId = + | 'claude' + | 'claude-code' + | 'cursor' + | 'vscode' + | 'chatgpt' + | 'json'; + +type ProbeState = 'pending' | 'ok' | 'unknown'; +type AuthVariant = 'oauth' | 'apikey'; + +export const CLAUDE_CALLBACK_URI = 'https://claude.ai/api/mcp/auth_callback'; +const CLIENT_CHOICE_KEY_PREFIX = 'df-mcp-connect-client.'; +const API_KEY_HEADER = 'X-DreamFactory-API-Key'; +/** Clients whose panel has a real API-key variant (headers are possible). */ +const KEY_CAPABLE_CLIENTS: ReadonlySet = new Set([ + 'claude-code', + 'cursor', + 'vscode', + 'json', +]); + +function randomHex64(): string { + const bytes = new Uint8Array(32); + const c: Crypto | undefined = (globalThis as any).crypto; + if (c?.getRandomValues) { + c.getRandomValues(bytes); + } else { + for (let i = 0; i < bytes.length; i++) { + bytes[i] = Math.floor(Math.random() * 256); + } + } + return Array.from(bytes, b => b.toString(16).padStart(2, '0')).join(''); +} + @Component({ selector: 'df-mcp-connect', standalone: true, - imports: [CommonModule, MatButtonModule], - template: `
- Connect tab — implementation pending. -
`, + templateUrl: './df-mcp-connect.component.html', + styleUrls: ['./df-mcp-connect.component.scss'], + imports: [CommonModule, RouterModule, MatButtonModule, MatTooltipModule], }) -export class DfMcpConnectComponent { +export class DfMcpConnectComponent implements OnInit, OnDestroy { @Input({ required: true }) store!: McpEditorStore; @Input({ required: true }) mcpUrl!: string; @Output() goToTab = new EventEmitter(); + + readonly claudeCallback = CLAUDE_CALLBACK_URI; + readonly clients: ReadonlyArray<{ id: McpClientId; label: string }> = [ + { id: 'claude', label: 'Claude' }, + { id: 'claude-code', label: 'Claude Code' }, + { id: 'cursor', label: 'Cursor' }, + { id: 'vscode', label: 'VS Code' }, + { id: 'chatgpt', label: 'ChatGPT' }, + { id: 'json', label: 'Generic JSON' }, + ]; + + probe: ProbeState = 'pending'; + secretRevealed = false; + selectedClient: McpClientId = 'claude'; + /** Sub-toggle value; only meaningful when API-key auth is on. */ + authVariant: AuthVariant = 'oauth'; + + private autoDismissTimer: ReturnType | null = null; + + constructor(private snackbarService: DfSnackbarService) {} + + ngOnInit(): void { + this.restoreClientChoice(); + // Raw fetch on purpose: DF's HTTP interceptors would attach a session + // token; the probe must see what an unauthenticated client sees. ANY + // HTTP response (401/400/405/200) proves the endpoint is reachable — + // only a network failure leaves the neutral "—" chip. + fetch(this.mcpUrl, { method: 'GET' }) + .then(() => (this.probe = 'ok')) + .catch(() => (this.probe = 'unknown')); + } + + ngOnDestroy(): void { + if (this.autoDismissTimer) clearTimeout(this.autoDismissTimer); + } + + /* ------------------------------ checklist ------------------------------ */ + get checklistVisible(): boolean { + return this.store.created && !this.store.checklistDismissed; + } + + get exposedCount(): number { + return this.store.cfg.exposedServices.length; + } + + get step3Done(): boolean { + return this.exposedCount > 0; + } + + /** "3 services exposed (22 tools, read-only)" — numbers from the store. */ + get exposedSummary(): string { + const n = this.exposedCount; + const eff = this.store.effective(); + const ro = eff.readOnly ? ', read-only' : ''; + return `${n} ${n === 1 ? 'service' : 'services'} exposed (${eff.total} tools${ro})`; + } + + dismissChecklist(): void { + this.store.checklistDismissed = true; + this.store.touch(); + } + + private maybeAutoDismiss(): void { + if (!this.checklistVisible || this.autoDismissTimer) return; + if (this.store.copiedUrl && this.store.copiedClient && this.step3Done) { + // Let the final ✓ paint before the card auto-dismisses. + this.autoDismissTimer = setTimeout(() => { + this.store.checklistDismissed = true; + this.store.touch(); + }, 1500); + } + } + + /* --------------------------- reconnect banner -------------------------- */ + dismissReconnect(): void { + this.store.reconnectBanner = false; + this.store.touch(); + } + + /* -------------------------------- copies ------------------------------- */ + private doCopy(text: string): void { + try { + navigator.clipboard?.writeText(text)?.catch(() => undefined); + } catch { + /* clipboard unavailable — the snackbar still confirms intent */ + } + this.snackbarService.openSnackBar('Copied.', 'success'); + } + + /** Endpoint-card copy: checklist step ①. */ + copyEndpointUrl(): void { + this.doCopy(this.mcpUrl); + this.store.copiedUrl = true; + this.store.touch(); + this.maybeAutoDismiss(); + } + + /** Any snippet/credential copy inside the client area: checklist step ②. */ + copyForClient(text: string, isUrl = false): void { + this.doCopy(text); + this.store.copiedClient = true; + if (isUrl) this.store.copiedUrl = true; + this.store.touch(); + this.maybeAutoDismiss(); + } + + copyClientId(): void { + this.copyForClient(this.store.cfg.oauthClientId); + } + + copySecret(): void { + this.copyForClient(this.store.cfg.oauthClientSecret); + } + + /* -------------------------------- OAuth -------------------------------- */ + get secretDisplay(): string { + if (this.secretRevealed) return this.store.cfg.oauthClientSecret || '—'; + return this.store.cfg.oauthClientSecret ? '••••••••••••••••' : '—'; + } + + toggleSecret(): void { + this.secretRevealed = !this.secretRevealed; + } + + regenerateSecret(): void { + const ok = window.confirm( + 'Clients using the old secret will stop connecting. Regenerate?' + ); + if (!ok) return; + this.store.cfg.oauthClientSecret = randomHex64(); + this.store.touch(); // dirty bar picks it up — the shell owns Save + this.snackbarService.openSnackBar( + 'New client secret generated — save to apply.', + 'success' + ); + } + + /* ------------------------------- clients ------------------------------- */ + private get clientChoiceKey(): string { + return CLIENT_CHOICE_KEY_PREFIX + (this.store.service?.name ?? ''); + } + + private restoreClientChoice(): void { + try { + const v = localStorage.getItem(this.clientChoiceKey) as McpClientId | null; + if (v && this.clients.some(c => c.id === v)) this.selectedClient = v; + } catch { + /* storage blocked — default stands */ + } + } + + selectClient(id: McpClientId): void { + this.selectedClient = id; + try { + localStorage.setItem(this.clientChoiceKey, id); + } catch { + /* storage blocked — selection still works for this visit */ + } + } + + /** OAuth is always on; both mechanisms coexist when the key flag is on. */ + get bothAuthOn(): boolean { + return this.store.cfg.allowApiKeyAuth; + } + + get showAuthToggle(): boolean { + return this.bothAuthOn && KEY_CAPABLE_CLIENTS.has(this.selectedClient); + } + + setAuthVariant(v: AuthVariant): void { + this.authVariant = v; + } + + /** True when the current panel should render its API-key variant. */ + get keyMode(): boolean { + return ( + this.bothAuthOn && + this.authVariant === 'apikey' && + KEY_CAPABLE_CLIENTS.has(this.selectedClient) + ); + } + + /* ------------------------------- snippets ------------------------------ */ + get serviceName(): string { + return this.store.service?.name ?? ''; + } + + /** Instance origin, derived from the endpoint URL the shell hands us. */ + get origin(): string { + return this.mcpUrl.replace(/\/mcp\/[^/]*\/?$/, ''); + } + + get legacyAlias(): string { + return `${this.origin}/api/v2/${this.serviceName}/_mcp`; + } + + get claudeCallbackAdded(): boolean { + return this.store.cfg.redirectUris.includes(CLAUDE_CALLBACK_URI); + } + + addClaudeCallback(): void { + if (this.claudeCallbackAdded) return; + this.store.cfg.redirectUris.push(CLAUDE_CALLBACK_URI); + this.store.touch(); // saved with the form via the dirty bar + this.snackbarService.openSnackBar( + "Added Claude's callback to redirect URIs — save to apply.", + 'success' + ); + } + + get claudeCodeSnippet(): string { + const base = `claude mcp add --transport http ${this.serviceName} ${this.mcpUrl}`; + return this.keyMode + ? `${base} --header "${API_KEY_HEADER}: YOUR_API_KEY"` + : base; + } + + private serverEntry(withType: boolean): Record { + const entry: Record = withType + ? { type: 'http', url: this.mcpUrl } + : { url: this.mcpUrl }; + if (this.keyMode) { + entry['headers'] = { [API_KEY_HEADER]: 'YOUR_API_KEY' }; + } + return entry; + } + + get cursorSnippet(): string { + return JSON.stringify( + { mcpServers: { [this.serviceName]: this.serverEntry(false) } }, + null, + 2 + ); + } + + get vscodeSnippet(): string { + const entry = { name: this.serviceName, ...this.serverEntry(true) }; + return `code --add-mcp '${JSON.stringify(entry)}'`; + } + + get genericSnippet(): string { + const json = JSON.stringify( + { mcpServers: { [this.serviceName]: this.serverEntry(true) } }, + null, + 2 + ); + return `${json}\n// Legacy alias (same server): ${this.legacyAlias}`; + } + + get genericCurl(): string { + return `curl -i ${this.mcpUrl}`; + } } diff --git a/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.html b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.html new file mode 100644 index 00000000..2d426045 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.html @@ -0,0 +1,292 @@ +
+
+

New MCP server

+

+ Choose what agents may reach. Naming, catalog size, and auth are handled + automatically. +

+
+ + +
+ + +
+ + +
+
+ + +

+ → {{ urlPreview }} + — the name is the URL +

+

+ A service named {{ name }} already exists. +

+

+ Name is required. +

+
+ +
+ + +
+ + +
+ + +
+
+ + +
+
+

Expose services

+
+ +
+ + + + + + + + + Cloned from {{ cloneSource }} + +
+ +
+ Access for these services: +
+ + +
+
+ +
+ +
+ + +

Loading services…

+

+ No database or file services yet. Create one under API Generation + & Connections. +

+

+ No service matches '{{ q }}'. Create one under API Generation & + Connections. +

+ +
+
+ Databases ({{ dbAll().length }}) + + Select all + +
+
+ + {{ s.label }} + + {{ s.name }} + {{ toolDelta(s) }} +
+
+ +
+
+ File storage ({{ fileAll().length }}) + + Select all + +
+
+ + {{ s.label }} + + {{ s.name }} + {{ toolDelta(s) }} +
+
+
+ + + +
+
+ + +

+ {{ consequenceMain() }} Empty never means every service. +

+ + +

+ Secured with OAuth 2.1, configured automatically. Connection details + appear after you create the server. +

+ +
+ + +
+
diff --git a/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.scss b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.scss new file mode 100644 index 00000000..f261746e --- /dev/null +++ b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.scss @@ -0,0 +1,449 @@ +/* Create page: one screen, one decision. Matches DreamFactory admin + (Inter, --df-accent, white cards, 1px hairline borders, 10px radius). + Component styles do not cascade, so the shell's .mcp-chip primitive is + copied here verbatim. */ +.mcp-create { + font-family: Inter, 'Helvetica Neue', sans-serif; + max-width: 980px; + padding: 0 0 40px; +} + +.mcp-create-head { + h1 { + font-size: 21px; + font-weight: 700; + margin: 0 0 4px; + } + + .mcp-create-tagline { + font-size: 13.5px; + opacity: 0.65; + margin: 0 0 18px; + max-width: 560px; + } +} + +/* ------------------------------ type cards ------------------------------ */ +.mcp-create-types { + display: flex; + gap: 12px; + flex-wrap: wrap; + margin-bottom: 16px; + + .mcp-type-card { + flex: 1 1 260px; + display: flex; + align-items: flex-start; + gap: 10px; + text-align: left; + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 10px; + padding: 14px 16px; + cursor: pointer; + font: inherit; + + &.on { + border-color: var(--df-accent, #5c5699); + box-shadow: inset 0 0 0 1px var(--df-accent, #5c5699); + background: rgba(92, 86, 153, 0.04); + } + + .mcp-type-dot { + flex: none; + margin-top: 2px; + width: 16px; + height: 16px; + border-radius: 50%; + border: 2px solid rgba(0, 0, 0, 0.3); + background: #fff; + } + + &.on .mcp-type-dot { + border-color: var(--df-accent, #5c5699); + box-shadow: inset 0 0 0 3.5px #fff; + background: var(--df-accent, #5c5699); + } + + .mcp-type-body { + display: flex; + flex-direction: column; + gap: 2px; + } + + .mcp-type-title { + font-size: 14px; + font-weight: 700; + } + + .mcp-type-desc { + font-size: 12.5px; + opacity: 0.65; + } + } +} + +/* ------------------------------ cards & fields ------------------------------ */ +.mcp-card { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 10px; + margin-bottom: 14px; +} + +.mcp-create-card { + padding: 16px; +} + +.mcp-field { + margin-bottom: 14px; + + label { + display: block; + font-size: 12.5px; + font-weight: 600; + margin-bottom: 4px; + } + + .req { + color: #b3261e; + } + + &:last-child { + margin-bottom: 0; + } +} + +.mcp-input { + font: inherit; + font-size: 13.5px; + padding: 8px 12px; + border: 1px solid rgba(0, 0, 0, 0.18); + border-radius: 8px; + background: #fff; + width: 100%; + max-width: 420px; + box-sizing: border-box; + + &:focus { + outline: 2px solid rgba(92, 86, 153, 0.35); + outline-offset: 0; + } +} + +.mcp-textarea { + max-width: 640px; + resize: vertical; +} + +.mcp-url-preview { + margin: 6px 0 0; + font-size: 12.5px; + + .mcp-url-mono { + font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; + color: var(--df-accent, #5c5699); + word-break: break-all; + } + + .mcp-url-note { + opacity: 0.6; + } +} + +.mcp-field-error { + margin: 6px 0 0; + font-size: 12.5px; + font-weight: 600; + color: #b3261e; +} + +.mcp-linklike { + background: none; + border: none; + padding: 0; + font: inherit; + font-size: 13px; + font-weight: 600; + color: var(--df-accent, #5c5699); + cursor: pointer; +} + +/* ------------------------------ expose section ------------------------------ */ +.mcp-section-head { + margin: 18px 0 10px; + + h2 { + font-size: 12px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + opacity: 0.75; + margin: 0; + } +} + +/* Shared chip primitive (copied from the shell — styles do not cascade). */ +.mcp-chip { + display: inline-flex; + align-items: center; + gap: 5px; + padding: 2px 9px; + border-radius: 999px; + font-size: 12px; + font-weight: 600; + border: 1px solid rgba(0, 0, 0, 0.14); + background: rgba(0, 0, 0, 0.02); + white-space: nowrap; + + &.good { + background: #e7f2e8; + border-color: rgba(46, 125, 50, 0.35); + color: #2e7d32; + } + &.warn { + background: #fdf3dc; + border-color: rgba(154, 103, 0, 0.4); + color: #9a6700; + } + &.primary { + background: rgba(92, 86, 153, 0.1); + border-color: rgba(92, 86, 153, 0.38); + color: var(--df-accent, #5c5699); + } +} + +.mcp-chip-btn { + cursor: pointer; + font: inherit; + font-size: 12px; + font-weight: 600; +} + +.mcp-preset-row { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + margin-bottom: 12px; +} + +.mcp-menu-name { + opacity: 0.55; + font-size: 12px; +} + +.mcp-access-row { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + margin-bottom: 12px; + + .mcp-access-label { + font-size: 13px; + font-weight: 600; + } +} + +.mcp-seg { + display: inline-flex; + border: 1px solid rgba(0, 0, 0, 0.18); + border-radius: 8px; + overflow: hidden; + + .mcp-seg-btn { + font: inherit; + font-size: 13px; + font-weight: 600; + padding: 7px 14px; + background: #fff; + border: none; + cursor: pointer; + opacity: 0.75; + + + .mcp-seg-btn { + border-left: 1px solid rgba(0, 0, 0, 0.12); + } + + &.on { + background: rgba(92, 86, 153, 0.12); + color: var(--df-accent, #5c5699); + opacity: 1; + } + } +} + +/* ------------------------------ picker grid ------------------------------ */ +.mcp-create-pickgrid { + display: grid; + grid-template-columns: minmax(0, 1fr) 280px; + gap: 16px; + align-items: start; +} + +.mcp-pick-card { + padding: 12px 14px; + margin-bottom: 0; +} + +.mcp-pick-search { + max-width: none; +} + +.mcp-pick-note { + font-size: 13px; + opacity: 0.65; + margin: 12px 2px 2px; +} + +.mcp-pick-group { + margin-top: 14px; +} + +.mcp-pick-grouphead { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + flex-wrap: wrap; + font-size: 11.5px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + opacity: 0.8; + border-bottom: 1px solid rgba(0, 0, 0, 0.06); + padding-bottom: 2px; + margin-bottom: 4px; +} + +.mcp-pick-row { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + padding: 2px 0; + + .mcp-pick-label { + font-size: 13.5px; + font-weight: 600; + } + + .mcp-pick-delta { + margin-left: auto; + font-size: 12px; + opacity: 0.6; + white-space: nowrap; + } +} + +/* ------------------------------ selected panel ------------------------------ */ +.mcp-pick-side { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 10px; + padding: 12px 14px; + + .mcp-side-head { + font-size: 11.5px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + opacity: 0.8; + margin-bottom: 6px; + } + + .mcp-side-none { + font-size: 13px; + opacity: 0.65; + margin: 4px 0 0; + } + + .mcp-side-list { + list-style: none; + margin: 0; + padding: 0; + + li { + display: flex; + align-items: center; + gap: 6px; + flex-wrap: wrap; + padding: 5px 0; + border-bottom: 1px solid rgba(0, 0, 0, 0.05); + + &:last-child { + border-bottom: none; + } + } + } + + .mcp-side-label { + font-size: 13px; + font-weight: 600; + } + + .mcp-side-remove { + margin-left: auto; + background: none; + border: none; + cursor: pointer; + font-size: 13px; + line-height: 1; + opacity: 0.45; + padding: 2px 4px; + + &:hover { + opacity: 0.9; + } + } +} + +/* ------------------------------ consequence & footer ------------------------------ */ +.mcp-create-consequence { + background: rgba(92, 86, 153, 0.07); + border: 1px solid rgba(92, 86, 153, 0.25); + border-radius: 10px; + padding: 10px 14px; + font-size: 13.5px; + margin: 16px 0; +} + +.mcp-create-auth { + font-size: 13px; + opacity: 0.7; + margin: 0 0 18px; +} + +.mcp-create-actions { + display: flex; + justify-content: flex-end; + gap: 10px; + flex-wrap: wrap; +} + +/* ------------------------------ responsive ------------------------------ */ +@media (max-width: 860px) { + .mcp-create-pickgrid { + grid-template-columns: 1fr; + } +} + +@media (max-width: 700px) { + .mcp-create-head h1 { + font-size: 18px; + } + + .mcp-input, + .mcp-textarea { + max-width: none; + } + + .mcp-create-actions { + justify-content: stretch; + + button { + flex: 1 1 auto; + } + } +} diff --git a/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.spec.ts b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.spec.ts new file mode 100644 index 00000000..36131feb --- /dev/null +++ b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.spec.ts @@ -0,0 +1,407 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ActivatedRoute, Router } from '@angular/router'; +import { provideNoopAnimations } from '@angular/platform-browser/animations'; +import { of, throwError } from 'rxjs'; +import { + SERVICES_SERVICE_TOKEN, + SERVICE_TYPE_SERVICE_TOKEN, +} from 'src/app/shared/constants/tokens'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { + effectiveTools, + parseMcpConfig, + readOnlyKeys, + toBackendServices, +} from '../mcp-effective'; +import { DfMcpCreateComponent } from './df-mcp-create.component'; + +const TYPE_ROWS = [ + { name: 'mysql', group: 'Database' }, + { name: 'pgsql', group: 'Database' }, + { name: 'local_file', group: 'File' }, + { name: 'mcp', group: 'MCP' }, +]; + +const SERVICE_ROWS = [ + { id: 1, name: 'billing', label: 'Billing', type: 'mysql', isActive: true }, + { id: 2, name: 'hr', label: 'HR', type: 'pgsql', isActive: true }, + { + id: 3, + name: 'reports', + label: 'Reports', + type: 'local_file', + isActive: true, + }, + { + id: 4, + name: 'warehouse', + label: 'Warehouse', + type: 'mcp', + isActive: true, + }, +]; + +const GROUP_MAP: Record = { + mysql: 'Database', + pgsql: 'Database', + local_file: 'File', + mcp: 'MCP', +}; + +/** The same backend list the component derives, built independently. */ +const BACKEND = toBackendServices(SERVICE_ROWS, GROUP_MAP); +const billingSvc = BACKEND.find(s => s.name === 'billing')!; +const reportsSvc = BACKEND.find(s => s.name === 'reports')!; + +/** Model-computed breakdown for a selection, for drift-free expectations. */ +function expectedBreakdown(names: string[], access: 'ro' | 'rw') { + const cfg = parseMcpConfig({}); + cfg.exposedServices = [...names]; + cfg.toolStyle = 'merged'; + cfg.lazyMode = 'auto'; + if (access === 'ro') { + for (const n of names) { + const svc = BACKEND.find(s => s.name === n); + if (svc) readOnlyKeys(svc).forEach(k => cfg.disabledTools.add(k)); + } + } + return effectiveTools(cfg, BACKEND); +} + +describe('DfMcpCreateComponent', () => { + let fixture: ComponentFixture; + let cmp: DfMcpCreateComponent; + + const snackbar = { openSnackBar: jest.fn() }; + const router = { navigate: jest.fn() }; + const route = {}; + const serviceTypeService = { + getAll: jest.fn(() => of({ resource: TYPE_ROWS })), + }; + const servicesService = { + getAll: jest.fn(() => of({ resource: SERVICE_ROWS })), + get: jest.fn(() => of({})), + create: jest.fn(() => of({ resource: [{ id: 9 }] })), + }; + + beforeEach(async () => { + jest.clearAllMocks(); + serviceTypeService.getAll.mockReturnValue(of({ resource: TYPE_ROWS })); + servicesService.getAll.mockReturnValue(of({ resource: SERVICE_ROWS })); + servicesService.create.mockReturnValue(of({ resource: [{ id: 9 }] })); + await TestBed.configureTestingModule({ + imports: [DfMcpCreateComponent], + providers: [ + provideNoopAnimations(), + { provide: DfSnackbarService, useValue: snackbar }, + { provide: Router, useValue: router }, + { provide: ActivatedRoute, useValue: route }, + { provide: SERVICE_TYPE_SERVICE_TOKEN, useValue: serviceTypeService }, + { provide: SERVICES_SERVICE_TOKEN, useValue: servicesService }, + ], + }).compileComponents(); + + fixture = TestBed.createComponent(DfMcpCreateComponent); + cmp = fixture.componentInstance; + fixture.detectChanges(); + }); + + function el(): HTMLElement { + return fixture.nativeElement as HTMLElement; + } + + function byTestId(id: string): HTMLElement | null { + return el().querySelector(`[data-testid="${id}"]`); + } + + function textOf(elm: HTMLElement | null): string { + return (elm?.textContent ?? '').replace(/\s+/g, ' ').trim(); + } + + function consequence(): string { + return textOf(byTestId('mcp-create-consequence')); + } + + function setName(value: string): void { + const input = byTestId('mcp-create-name') as HTMLInputElement; + input.value = value; + input.dispatchEvent(new Event('input')); + fixture.detectChanges(); + } + + describe('consequence math (real simulation through effectiveTools)', () => { + it('zero selected: global tools only, with the bold empty warning', () => { + const b = expectedBreakdown([], 'ro'); + expect(consequence()).toBe( + `Agents will get global tools only (${b.globalTools}) — no data ` + + 'access. Empty never means every service.' + ); + expect( + byTestId('mcp-create-consequence')!.querySelector('b')!.textContent + ).toContain('Empty never means every service.'); + }); + + it('read-only selection: totals from the shared math, write tools off', () => { + // One selection through the DOM (validates the row testid), the + // rest through the same handler. + ( + byTestId('mcp-create-svc-billing')!.querySelector( + 'input[type="checkbox"]' + ) as HTMLInputElement + ).click(); + cmp.toggle('hr'); + cmp.toggle('reports'); + fixture.detectChanges(); + + const b = expectedBreakdown(['billing', 'hr', 'reports'], 'ro'); + // Sanity-pin the merged read-only shape: 9 shared db verbs across 2 + // dbs, 3 file, 5 global (+6 aggregators inside the total). + expect(b.dbTools).toBe(9); + expect(b.fileTools).toBe(3); + expect(b.globalTools).toBe(5); + expect(b.total).toBe(23); + expect(consequence()).toBe( + `Agents will get ${b.total} tools: ${b.dbTools} database (shared ` + + `set across 2 services) · ${b.fileTools} file · ` + + `${b.globalTools} global. Write tools are off.` + ); + }); + + it('read & write selection: full counts and no write-off sentence', () => { + cmp.toggle('billing'); + cmp.toggle('hr'); + cmp.toggle('reports'); + (byTestId('mcp-create-access-rw') as HTMLButtonElement).click(); + fixture.detectChanges(); + + const b = expectedBreakdown(['billing', 'hr', 'reports'], 'rw'); + expect(b.total).toBe(33); + expect(consequence()).toBe( + `Agents will get ${b.total} tools: ${b.dbTools} database (shared ` + + `set across 2 services) · ${b.fileTools} file · ` + + `${b.globalTools} global.` + ); + expect(consequence()).not.toContain('Write tools are off.'); + }); + + it('All databases (read-only) preset selects every db, read-only', () => { + (byTestId('mcp-create-access-rw') as HTMLButtonElement).click(); + (byTestId('mcp-create-preset-alldb') as HTMLButtonElement).click(); + fixture.detectChanges(); + + expect([...cmp.selected].sort()).toEqual(['billing', 'hr']); + expect(cmp.access).toBe('ro'); + const b = expectedBreakdown(['billing', 'hr'], 'ro'); + expect(consequence()).toContain(`Agents will get ${b.total} tools:`); + expect(consequence()).toContain('Write tools are off.'); + }); + }); + + describe('name: sanitize, URL preview, collision', () => { + it('sanitizes as the user types and previews the URL', () => { + setName('My Service!'); + expect(cmp.name).toBe('myservice'); + expect((byTestId('mcp-create-name') as HTMLInputElement).value).toBe( + 'myservice' + ); + expect(textOf(byTestId('mcp-create-url-preview'))).toContain( + `${window.location.origin}/mcp/myservice` + ); + expect(textOf(byTestId('mcp-create-url-preview'))).toContain( + 'the name is the URL' + ); + + setName('Data_Warehouse 2'); + expect(cmp.name).toBe('data_warehouse2'); + // Label auto-suggests from the name until edited. + expect(cmp.label).toBe('Data Warehouse2'); + }); + + it('flags a taken name inline and disables Create server', () => { + setName('billing'); + expect(el().textContent).toContain( + 'A service named billing already exists.' + ); + expect( + (byTestId('mcp-create-submit') as HTMLButtonElement).disabled + ).toBe(true); + + setName('billing2'); + expect(el().textContent).not.toContain('already exists'); + expect( + (byTestId('mcp-create-submit') as HTMLButtonElement).disabled + ).toBe(false); + }); + + it('empty name disables Create server', () => { + expect( + (byTestId('mcp-create-submit') as HTMLButtonElement).disabled + ).toBe(true); + }); + }); + + describe('read-only compilation', () => { + it('produces exactly the write/execute keys of the selected services', () => { + cmp.toggle('billing'); + cmp.toggle('reports'); + + const expected = new Set([ + ...readOnlyKeys(billingSvc), + ...readOnlyKeys(reportsSvc), + ]); + expect(cmp.compiledDisabledTools()).toEqual(expected); + // And nothing else: every key belongs to a write/exec verb. + expect(expected).toEqual( + new Set([ + 'billing_create_records', + 'billing_update_records', + 'billing_delete_records', + 'billing_get_stored_procedures', + 'billing_call_stored_procedure', + 'billing_get_stored_functions', + 'billing_call_stored_function', + 'reports_create_file', + 'reports_create_folder', + 'reports_delete_file', + ]) + ); + }); + + it('read & write compiles an empty disabled set', () => { + cmp.toggle('billing'); + cmp.setAccess('rw'); + expect(cmp.compiledDisabledTools().size).toBe(0); + }); + }); + + describe('create (POST) and navigation', () => { + it('sends the compiled config and lands on ../{id}?created=1', () => { + setName('analytics'); + cmp.toggle('billing'); + cmp.toggle('reports'); + fixture.detectChanges(); + + (byTestId('mcp-create-submit') as HTMLButtonElement).click(); + + expect(servicesService.create).toHaveBeenCalledTimes(1); + const body = (servicesService.create as jest.Mock).mock.calls[0][0]; + expect(body).toEqual({ + resource: [ + { + name: 'analytics', + label: 'Analytics', + description: '', + isActive: true, + type: 'mcp', + config: { + exposedServices: ['billing', 'reports'], + disabledTools: [ + ...new Set([ + ...readOnlyKeys(billingSvc), + ...readOnlyKeys(reportsSvc), + ]), + ].sort(), + toolStyle: 'merged', + lazyMode: 'auto', + allowApiKeyAuth: false, + }, + }, + ], + }); + expect(router.navigate).toHaveBeenCalledWith(['../', 9], { + relativeTo: route, + queryParams: { created: 1 }, + }); + }); + + it('surfaces the server message on failure and stays put', () => { + servicesService.create.mockReturnValue( + throwError(() => ({ + error: { error: { message: 'Name is reserved.' } }, + })) as any + ); + setName('analytics'); + (byTestId('mcp-create-submit') as HTMLButtonElement).click(); + expect(snackbar.openSnackBar).toHaveBeenCalledWith( + 'Name is reserved.', + 'error' + ); + expect(router.navigate).not.toHaveBeenCalled(); + expect(cmp.saving).toBe(false); + }); + }); + + describe('system_mcp type', () => { + beforeEach(() => { + (byTestId('mcp-create-type-system') as HTMLButtonElement).click(); + fixture.detectChanges(); + }); + + it('skips the exposure UI entirely (fixed scope)', () => { + expect(byTestId('mcp-create-search')).toBeNull(); + expect(byTestId('mcp-create-preset-alldb')).toBeNull(); + expect(byTestId('mcp-create-access-ro')).toBeNull(); + expect(byTestId('mcp-create-access-rw')).toBeNull(); + }); + + it('states the fixed 18-tool consequence, without the empty warning', () => { + expect(consequence()).toBe( + 'Agents will get the 18 System API admin tools.' + ); + expect(consequence()).not.toContain('Empty never means every service.'); + }); + + it('creates with type system_mcp and an empty config', () => { + setName('admin_mcp'); + (byTestId('mcp-create-submit') as HTMLButtonElement).click(); + const body = (servicesService.create as jest.Mock).mock.calls[0][0]; + expect(body.resource[0].type).toBe('system_mcp'); + expect(body.resource[0].config).toEqual({}); + expect(router.navigate).toHaveBeenCalledWith(['../', 9], { + relativeTo: route, + queryParams: { created: 1 }, + }); + }); + }); + + describe('clone', () => { + it('copies exposure, curation and tool style — an explicit access click overrides curation', () => { + servicesService.get.mockReturnValue( + of({ + config: { + exposed_services: ['billing'], + disabled_tools: ['billing_create_records'], + tool_style: 'prefixed', + oauth_client_secret: 'never-copied', + }, + }) as any + ); + cmp.pickClone({ id: 4, name: 'warehouse', label: 'Warehouse' }); + fixture.detectChanges(); + + expect([...cmp.selected]).toEqual(['billing']); + expect(cmp.toolStyle).toBe('prefixed'); + expect(cmp.cloneApplied).toBe(true); + expect(textOf(el())).toContain('Cloned from Warehouse'); + // Untouched access keeps the cloned curation verbatim. + expect(cmp.compiledDisabledTools()).toEqual( + new Set(['billing_create_records']) + ); + + // Explicit Read-only click recompiles from the selection instead. + (byTestId('mcp-create-access-ro') as HTMLButtonElement).click(); + fixture.detectChanges(); + expect(cmp.compiledDisabledTools()).toEqual( + new Set(readOnlyKeys(billingSvc)) + ); + + // Credentials never travel: the payload carries only the compiled + // exposure/curation fields. + setName('cloned'); + (byTestId('mcp-create-submit') as HTMLButtonElement).click(); + const body = (servicesService.create as jest.Mock).mock.calls[0][0]; + expect(JSON.stringify(body)).not.toContain('never-copied'); + expect(body.resource[0].config.toolStyle).toBe('prefixed'); + }); + }); +}); diff --git a/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.ts b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.ts index 69ec4112..f57e97dc 100644 --- a/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.ts +++ b/src/app/adf-mcp/df-mcp-create/df-mcp-create.component.ts @@ -1,22 +1,448 @@ /** - * Create page for MCP servers: one screen, one decision (what agents may - * reach). Type cards, name with live URL preview, the expose-services - * picker with read-only default, live consequence line, silent OAuth + * Create page for MCP servers (§1.1): one screen, one decision (what agents + * may reach). Type cards, name with live URL preview, the expose-services + * picker with the read-only default, a live consequence line computed by + * real simulation through the shared effective math, silent OAuth * provisioning, single Create button. First save navigates to the new - * service's own edit page, Connect tab, ?created=1. - * STUB — full implementation lands in the tab build phase. The selector and - * class name are the frozen contract with the routing shim. + * service's own edit page, Connect tab, ?created=1 (§2.1). */ import { CommonModule } from '@angular/common'; -import { Component } from '@angular/core'; +import { Component, Inject, OnInit } from '@angular/core'; +import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { ActivatedRoute, Router } from '@angular/router'; +import { forkJoin } from 'rxjs'; +import { + SERVICES_SERVICE_TOKEN, + SERVICE_TYPE_SERVICE_TOKEN, +} from 'src/app/shared/constants/tokens'; +import { DfBaseCrudService } from 'src/app/shared/services/df-base-crud.service'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { + GenericCreateResponse, + GenericListResponse, +} from 'src/app/shared/types/generic-http'; +import { verbsFor } from '../mcp-catalog'; +import { + EffectiveBreakdown, + McpBackendService, + McpConfig, + ToolStyle, + accessState, + effectiveTools, + parseMcpConfig, + readOnlyKeys, + toBackendServices, +} from '../mcp-effective'; + +export type McpCreateType = 'mcp' | 'system_mcp'; +export type McpCreateAccess = 'ro' | 'rw'; +export type McpCreatePreset = 'alldb' | 'choose' | 'clone'; + +/** An existing mcp-type service offered as a clone source. */ +export interface McpCloneCandidate { + id: number; + name: string; + label: string; +} + +interface SelectedRow { + name: string; + svc: McpBackendService | null; +} @Component({ selector: 'df-mcp-create', standalone: true, - imports: [CommonModule, MatButtonModule], - template: `
- New MCP server — implementation pending. -
`, + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + MatMenuModule, + MatTooltipModule, + ], + templateUrl: './df-mcp-create.component.html', + styleUrls: ['./df-mcp-create.component.scss'], }) -export class DfMcpCreateComponent {} +export class DfMcpCreateComponent implements OnInit { + /* ------------------------------ identity ------------------------------ */ + serverType: McpCreateType = 'mcp'; + name = ''; + label = ''; + labelTouched = false; + nameBlurred = false; + description = ''; + showDescription = false; + + /* ------------------------------ exposure ------------------------------ */ + preset: McpCreatePreset = 'choose'; + access: McpCreateAccess = 'ro'; + selected = new Set(); + q = ''; + + /** Clone state: curation copied from a sibling — never credentials. */ + cloneApplied = false; + cloneSource = ''; + clonedDisabled = new Set(); + /** Explicit Read-only / Read & write click after a clone overrides the + * cloned curation (same precedence rule as the edit-time picker). */ + accessTouchedAfterClone = false; + + /** tool_style is invisible at create: 'merged' unless a clone copied one. */ + toolStyle: ToolStyle = 'merged'; + + /* ------------------------------ instance ------------------------------ */ + backendServices: McpBackendService[] = []; + existingNames = new Set(); + mcpSiblings: McpCloneCandidate[] = []; + instanceLoaded = false; + + saving = false; + + constructor( + private activatedRoute: ActivatedRoute, + private router: Router, + @Inject(SERVICES_SERVICE_TOKEN) private servicesService: DfBaseCrudService, + @Inject(SERVICE_TYPE_SERVICE_TOKEN) + private serviceTypeService: DfBaseCrudService, + private snackbarService: DfSnackbarService + ) {} + + ngOnInit(): void { + this.loadInstance(); + } + + /** + * One combined fetch covers everything create needs: the type→group map, + * the db/file backend services for the picker (same query the shell + * runs), the full name list for collision checks, and the mcp siblings + * for the clone menu. + */ + private loadInstance(): void { + forkJoin({ + types: this.serviceTypeService.getAll>({ + fields: 'name,group', + limit: 1000, + }), + services: this.servicesService.getAll>({ + limit: 1000, + fields: 'id,name,label,type,is_active', + sort: 'name', + }), + }).subscribe({ + next: ({ types, services }) => { + const groupMap: Record = {}; + for (const t of types?.resource ?? []) groupMap[t.name] = t.group; + const rows: any[] = services?.resource ?? []; + this.backendServices = toBackendServices(rows, groupMap); + this.existingNames = new Set(rows.map(r => r.name).filter(Boolean)); + this.mcpSiblings = rows + .filter(r => r.type === 'mcp') + .map(r => ({ id: r.id, name: r.name, label: r.label || r.name })); + this.instanceLoaded = true; + }, + error: () => { + // The page still works: collisions and the picker degrade, the + // server enforces name uniqueness on save. + this.instanceLoaded = true; + }, + }); + } + + /* ------------------------------ type ------------------------------ */ + setType(t: McpCreateType): void { + this.serverType = t; + } + + /* ------------------------------ identity ------------------------------ */ + onNameInput(event: Event): void { + const el = event.target as HTMLInputElement; + this.name = el.value + .toLowerCase() + .replace(/\s+/g, '') + .replace(/[^a-z0-9_-]/g, ''); + // Reflect the sanitized value even when Angular sees no binding change. + el.value = this.name; + if (!this.labelTouched) this.label = this.labelSuggestion(); + } + + onLabelInput(event: Event): void { + const el = event.target as HTMLInputElement; + this.label = el.value; + // Clearing the label hands it back to the auto-suggestion. + this.labelTouched = el.value.length > 0; + if (!this.labelTouched) this.label = this.labelSuggestion(); + } + + onDescriptionInput(event: Event): void { + this.description = (event.target as HTMLTextAreaElement).value; + } + + labelSuggestion(): string { + return this.name + .split(/[_-]+/) + .filter(Boolean) + .map(w => w.charAt(0).toUpperCase() + w.slice(1)) + .join(' '); + } + + get urlPreview(): string { + return `${window.location.origin}/mcp/${this.name || '…'}`; + } + + nameTaken(): boolean { + return this.name !== '' && this.existingNames.has(this.name); + } + + /* ------------------------------ picker ------------------------------ */ + private matches(s: McpBackendService): boolean { + const q = this.q.trim().toLowerCase(); + if (!q) return true; + return ( + s.name.toLowerCase().includes(q) || s.label.toLowerCase().includes(q) + ); + } + + dbAll(): McpBackendService[] { + return this.backendServices.filter(s => s.kind === 'db'); + } + + fileAll(): McpBackendService[] { + return this.backendServices.filter(s => s.kind === 'file'); + } + + dbFiltered(): McpBackendService[] { + return this.dbAll().filter(s => this.matches(s)); + } + + fileFiltered(): McpBackendService[] { + return this.fileAll().filter(s => this.matches(s)); + } + + emptySearch(): boolean { + return ( + this.q.trim().length > 0 && + this.dbFiltered().length === 0 && + this.fileFiltered().length === 0 + ); + } + + toolDelta(svc: McpBackendService): string { + return `+${verbsFor(svc.kind).length} tools`; + } + + isSelected(name: string): boolean { + return this.selected.has(name); + } + + toggle(name: string): void { + this.selected.has(name) + ? this.selected.delete(name) + : this.selected.add(name); + if (this.preset === 'alldb') this.preset = 'choose'; + } + + groupAllSelected(group: McpBackendService[]): boolean { + return group.length > 0 && group.every(s => this.selected.has(s.name)); + } + + groupSomeSelected(group: McpBackendService[]): boolean { + const n = group.filter(s => this.selected.has(s.name)).length; + return n > 0 && n < group.length; + } + + toggleGroup(group: McpBackendService[]): void { + const all = this.groupAllSelected(group); + for (const s of group) { + all ? this.selected.delete(s.name) : this.selected.add(s.name); + } + } + + selectedList(): SelectedRow[] { + return [...this.selected].map(name => ({ + name, + svc: this.backendServices.find(s => s.name === name) ?? null, + })); + } + + /** Per-row access chip, derived from the real compiled disabled set. */ + accessLabelFor(row: SelectedRow): string { + if (!row.svc) return ''; + const st = accessState(row.svc, this.compiledDisabledTools()); + return st.kind === 'full' ? 'Full access' : st.label; + } + + accessKindFor(row: SelectedRow): string { + if (!row.svc) return ''; + return accessState(row.svc, this.compiledDisabledTools()).kind; + } + + /* ------------------------------ presets ------------------------------ */ + presetAllDb(): void { + this.selected = new Set(this.dbAll().map(s => s.name)); + this.access = 'ro'; + this.cloneApplied = false; + this.preset = 'alldb'; + } + + presetChoose(): void { + this.cloneApplied = false; + this.preset = 'choose'; + } + + pickClone(sibling: McpCloneCandidate): void { + this.servicesService.get(sibling.id).subscribe({ + next: row => { + const cfg = parseMcpConfig(row?.config); + // Copy exposure + curation + naming style. Never credentials. + this.selected = new Set(cfg.exposedServices); + this.clonedDisabled = new Set(cfg.disabledTools); + this.toolStyle = cfg.toolStyle ?? 'merged'; + this.cloneApplied = true; + this.cloneSource = sibling.label || sibling.name; + this.accessTouchedAfterClone = false; + this.preset = 'clone'; + }, + error: () => + this.snackbarService.openSnackBar( + `Could not load ${sibling.name}'s configuration.`, + 'error' + ), + }); + } + + setAccess(a: McpCreateAccess): void { + this.access = a; + this.accessTouchedAfterClone = true; + } + + /* --------------------- the one simulation path --------------------- */ + /** + * The disabled_tools set the server would be created with right now. + * Read-only compiles the write/execute verbs of every selected service; + * an untouched clone keeps the cloned curation verbatim. + */ + compiledDisabledTools(): Set { + if (this.serverType === 'system_mcp') return new Set(); + if (this.cloneApplied && !this.accessTouchedAfterClone) { + return new Set(this.clonedDisabled); + } + if (this.access === 'ro') { + const out = new Set(); + for (const name of this.selected) { + const svc = this.backendServices.find(s => s.name === name); + if (svc) readOnlyKeys(svc).forEach(k => out.add(k)); + } + return out; + } + return new Set(); + } + + draftConfig(): McpConfig { + const cfg = parseMcpConfig({}); + cfg.exposedServices = [...this.selected]; + cfg.disabledTools = this.compiledDisabledTools(); + cfg.toolStyle = this.toolStyle; + cfg.lazyMode = 'auto'; + cfg.allowApiKeyAuth = false; + return cfg; + } + + breakdown(): EffectiveBreakdown { + return effectiveTools(this.draftConfig(), this.backendServices); + } + + consequenceMain(): string { + if (this.serverType === 'system_mcp') { + return 'Agents will get the 18 System API admin tools.'; + } + const b = this.breakdown(); + if (this.selected.size === 0) { + return `Agents will get global tools only (${b.globalTools}) — no data access.`; + } + const parts: string[] = []; + if (b.dbServices > 0) { + parts.push( + `${b.dbTools} database (shared set across ${b.dbServices} ` + + `${b.dbServices === 1 ? 'service' : 'services'})` + ); + } + if (b.fileServices > 0) parts.push(`${b.fileTools} file`); + parts.push(`${b.globalTools} global`); + let line = `Agents will get ${b.total} tools: ${parts.join(' · ')}.`; + if (b.readOnly) line += ' Write tools are off.'; + return line; + } + + showEmptyBold(): boolean { + return this.serverType === 'mcp' && this.selected.size === 0; + } + + /* ------------------------------ save ------------------------------ */ + canSubmit(): boolean { + return !this.saving && this.name.length > 0 && !this.nameTaken(); + } + + submit(): void { + if (!this.canSubmit()) return; + this.saving = true; + // camelCase keys — the HTTP case interceptor snake_cases them on the + // wire, exactly like the legacy editor's form payload. OAuth fields are + // deliberately absent: the backend seeds client id/secret itself. + const config = + this.serverType === 'mcp' + ? { + exposedServices: [...this.selected], + disabledTools: [...this.compiledDisabledTools()].sort(), + toolStyle: this.toolStyle, + lazyMode: 'auto', + allowApiKeyAuth: false, + } + : {}; + this.servicesService + .create({ + resource: [ + { + name: this.name, + label: this.label || this.name, + description: this.description, + isActive: true, + type: this.serverType, + config, + }, + ], + }) + .subscribe({ + next: res => { + this.saving = false; + const newId = res?.resource?.[0]?.id; + if (newId != null) { + // §2.1: land on the new server's own Connect tab, first-run. + this.router.navigate(['../', newId], { + relativeTo: this.activatedRoute, + queryParams: { created: 1 }, + }); + } else { + this.router.navigate(['../'], { + relativeTo: this.activatedRoute, + }); + } + }, + error: err => { + this.saving = false; + this.snackbarService.openSnackBar( + err?.error?.error?.message ?? 'Create failed.', + 'error' + ); + }, + }); + } + + cancel(): void { + this.router.navigate(['../'], { relativeTo: this.activatedRoute }); + } +} diff --git a/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.html b/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.html index 4a4a745b..cf03cb00 100644 --- a/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.html +++ b/src/app/adf-mcp/df-mcp-details/df-mcp-details.component.html @@ -11,9 +11,9 @@

{{ store.draftLabel || store.service.name }}

type="button" (click)="setTab('tools')" matTooltip="Open the Tools tab"> - {{ store.effective().total }} tools live + {{ store.totalTools() }} tools live - + ⚠ Serves no tools @@ -41,7 +41,7 @@

{{ store.draftLabel || store.service.name }}

[attr.aria-selected]="tab === 'tools'" (click)="setTab('tools')" data-testid="mcp-tab-tools"> - Tools · {{ store.effective().total }} + Tools · {{ store.totalTools() }} + + + + +
+ Access for these services: + + + Read-only — recommended + + Read & write + +
+ +
+ + +
+
+ Databases ({{ dbs.length }}) + + Select all databases + +
+
+ + {{ svc.label }} + {{ svc.name }} + {{ toolDelta(svc) }} + + saved curation: {{ dormantCount(svc) }} tools off + + inactive +
+
+
+ + +
+
+ File storage ({{ files.length }}) + + Select all files + +
+
+ + {{ svc.label }} + {{ svc.name }} + {{ toolDelta(svc) }} + + saved curation: {{ dormantCount(svc) }} tools off + + inactive +
+
+
+ +

+ Every service on this instance is already exposed. +

+
+ +

+ No service matches “{{ q.trim() }}”. Create one under API Generation & + Connections. +

+
+
+ +
+ + {{ consequenceText() }} + + + + + +
+ diff --git a/src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.scss b/src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.scss new file mode 100644 index 00000000..a37b1e71 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.scss @@ -0,0 +1,159 @@ +/* Expose-services picker dialog. */ +.mcp-picker { + display: flex; + flex-direction: column; + font-family: Inter, 'Helvetica Neue', sans-serif; + min-width: 320px; + max-height: 80vh; + padding: 18px 20px 14px; + box-sizing: border-box; +} + +.mcp-picker-head { + display: flex; + align-items: center; + justify-content: space-between; + + h2 { + margin: 0; + font-size: 17px; + font-weight: 700; + } +} + +.mcp-picker-search { + margin: 12px 0 10px; + width: 100%; + box-sizing: border-box; + font: inherit; + font-size: 13.5px; + padding: 8px 12px; + border: 1px solid rgba(0, 0, 0, 0.18); + border-radius: 8px; + + &:focus { + outline: 2px solid var(--df-accent, #5c5699); + outline-offset: -1px; + } +} + +.mcp-picker-access { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + font-size: 13px; + margin-bottom: 8px; + + .mcp-picker-access-label { + font-weight: 600; + } + + mat-radio-group { + display: inline-flex; + gap: 4px; + flex-wrap: wrap; + } +} + +.mcp-picker-body { + flex: 1; + overflow-y: auto; + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 10px; + background: #fff; + min-height: 160px; +} + +.mcp-picker-group-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 10px; + flex-wrap: wrap; + padding: 8px 12px 2px; + font-size: 11.5px; + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; + opacity: 0.75; +} + +.mcp-picker-row { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + padding: 4px 12px; + cursor: pointer; + border-top: 1px solid rgba(0, 0, 0, 0.04); + + &:hover { + background: rgba(92, 86, 153, 0.05); + } + + .mcp-picker-label { + font-weight: 600; + font-size: 13.5px; + } + + .mcp-picker-delta { + font-size: 12px; + opacity: 0.65; + font-variant-numeric: tabular-nums; + } +} + +.mcp-picker-empty { + padding: 22px 16px; + font-size: 13.5px; + opacity: 0.75; +} + +.mcp-picker-foot { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + flex-wrap: wrap; + padding-top: 12px; + + .mcp-picker-consequence { + font-size: 13px; + font-variant-numeric: tabular-nums; + opacity: 0.85; + } + + .mcp-picker-foot-btns { + display: inline-flex; + gap: 8px; + margin-left: auto; + } +} + +/* Chip primitive (copied from the shell — component styles don't cascade). */ +.mcp-chip { + display: inline-flex; + align-items: center; + gap: 5px; + padding: 2px 9px; + border-radius: 999px; + font-size: 12px; + font-weight: 600; + border: 1px solid rgba(0, 0, 0, 0.14); + background: rgba(0, 0, 0, 0.02); + white-space: nowrap; + + &.warn { + background: #fdf3dc; + border-color: rgba(154, 103, 0, 0.4); + color: #9a6700; + } +} + +@media (max-width: 700px) { + .mcp-picker { + padding: 14px 12px 10px; + min-width: 0; + } +} diff --git a/src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.ts b/src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.ts new file mode 100644 index 00000000..e2ed3842 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-picker/df-mcp-picker.component.ts @@ -0,0 +1,229 @@ +/** + * "Expose services" picker dialog (§3.6) — search-to-add over the not-yet- + * exposed backend services, grouped Databases / File storage with per-group + * select-all, a default-Read-only access control, and a running consequence + * line computed by simulating the selection against the shared effective + * math. The dialog never mutates the store; it returns an McpPickerResult + * that the Tools tab applies through applyPickerResult(). + */ +import { CommonModule } from '@angular/common'; +import { Component, Inject } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { + MAT_DIALOG_DATA, + MatDialogModule, + MatDialogRef, +} from '@angular/material/dialog'; +import { MatRadioModule } from '@angular/material/radio'; +import { verbsFor } from '../mcp-catalog'; +import { + McpBackendService, + McpConfig, + allKeys, + effectiveTools, + readOnlyKeys, +} from '../mcp-effective'; +import { McpEditorStore } from '../mcp-store'; + +export type McpPickerAccess = 'ro' | 'rw'; + +export interface McpPickerResult { + names: string[]; + access: McpPickerAccess; + /** True when the admin explicitly clicked an access option. */ + accessTouched: boolean; +} + +export interface McpPickerData { + store: McpEditorStore; +} + +function clonePickerCfg(c: McpConfig): McpConfig { + return { + ...c, + exposedServices: [...c.exposedServices], + disabledTools: new Set(c.disabledTools), + redirectUris: [...c.redirectUris], + customTools: (c.customTools ?? []).map((t: any) => ({ ...t })), + rest: { ...c.rest }, + }; +} + +/** + * Dormant-curation precedence (documented decision): a service with saved + * (dormant) disabled_tools keys re-applies that curation when re-exposed — + * UNLESS the admin explicitly clicked an access option in this dialog, in + * which case the explicit Read-only / Read & write choice overrides the + * dormant curation. The pre-selected "Read-only — recommended" default does + * NOT count as an explicit choice, so the migration-safety rule ("re-exposing + * restores prior curation exactly", §3.8 rule 3) holds on the default path. + */ +export function pickerKeepNames( + store: McpEditorStore, + names: string[], + accessTouched: boolean +): Set { + const keep = new Set(); + if (accessTouched) return keep; + for (const n of names) { + if (store.dormantCurationCount(n) > 0) keep.add(n); + } + return keep; +} + +/** Simulate the selection and return the resulting effective tool count. */ +export function simulateExposeTotal( + store: McpEditorStore, + names: string[], + access: McpPickerAccess, + accessTouched: boolean +): number { + const cfg = clonePickerCfg(store.cfg); + const keep = pickerKeepNames(store, names, accessTouched); + for (const name of names) { + if (!cfg.exposedServices.includes(name)) cfg.exposedServices.push(name); + const svc = store.backendServices.find(s => s.name === name); + if (!svc || keep.has(name)) continue; + allKeys(svc).forEach(k => cfg.disabledTools.delete(k)); + if (access === 'ro') readOnlyKeys(svc).forEach(k => cfg.disabledTools.add(k)); + } + return effectiveTools(cfg, store.backendServices).total; +} + +/** Apply a confirmed picker result to the store (same rules the simulation used). */ +export function applyPickerResult(store: McpEditorStore, res: McpPickerResult): void { + const keep = pickerKeepNames(store, res.names, res.accessTouched); + const applied = res.names.filter(n => !keep.has(n)); + if (applied.length) store.exposeServices(applied, res.access); + if (keep.size) store.exposeServices([...keep], 'keep'); +} + +@Component({ + selector: 'df-mcp-picker', + standalone: true, + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + MatDialogModule, + MatRadioModule, + ], + templateUrl: './df-mcp-picker.component.html', + styleUrls: ['./df-mcp-picker.component.scss'], +}) +export class DfMcpPickerComponent { + q = ''; + access: McpPickerAccess = 'ro'; + accessTouched = false; + selected = new Set(); + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: McpPickerData + ) {} + + get store(): McpEditorStore { + return this.data.store; + } + + /** Only not-yet-exposed services are listed. */ + candidates(): McpBackendService[] { + return this.store.backendServices.filter( + s => !this.store.cfg.exposedServices.includes(s.name) + ); + } + + private matches(s: McpBackendService): boolean { + const q = this.q.trim().toLowerCase(); + if (!q) return true; + return ( + s.name.toLowerCase().includes(q) || s.label.toLowerCase().includes(q) + ); + } + + dbCandidates(): McpBackendService[] { + return this.candidates().filter(s => s.kind === 'db' && this.matches(s)); + } + + fileCandidates(): McpBackendService[] { + return this.candidates().filter(s => s.kind === 'file' && this.matches(s)); + } + + toolDelta(svc: McpBackendService): string { + return `+${verbsFor(svc.kind).length} tools`; + } + + dormantCount(svc: McpBackendService): number { + return this.store.dormantCurationCount(svc.name); + } + + isSelected(name: string): boolean { + return this.selected.has(name); + } + + toggle(name: string): void { + this.selected.has(name) + ? this.selected.delete(name) + : this.selected.add(name); + } + + markAccessTouched(): void { + this.accessTouched = true; + } + + groupAllSelected(group: McpBackendService[]): boolean { + return group.length > 0 && group.every(s => this.selected.has(s.name)); + } + + groupSomeSelected(group: McpBackendService[]): boolean { + const n = group.filter(s => this.selected.has(s.name)).length; + return n > 0 && n < group.length; + } + + toggleGroup(group: McpBackendService[]): void { + const all = this.groupAllSelected(group); + for (const s of group) { + all ? this.selected.delete(s.name) : this.selected.add(s.name); + } + } + + accessLabel(): string { + return this.access === 'ro' ? 'read-only' : 'read & write'; + } + + consequenceText(): string { + const k = this.selected.size; + const old = effectiveTools(this.store.cfg, this.store.backendServices).total; + const next = simulateExposeTotal( + this.store, + [...this.selected], + this.access, + this.accessTouched + ); + return `${k} selected · ${this.accessLabel()} → server will serve ${next} tools (was ${old})`; + } + + emptySearch(): boolean { + return ( + this.q.trim().length > 0 && + this.dbCandidates().length === 0 && + this.fileCandidates().length === 0 + ); + } + + confirm(): void { + if (this.selected.size === 0) return; + this.dialogRef.close({ + names: [...this.selected], + access: this.access, + accessTouched: this.accessTouched, + }); + } + + cancel(): void { + this.dialogRef.close(); + } +} diff --git a/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.html b/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.html new file mode 100644 index 00000000..64977776 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.html @@ -0,0 +1,46 @@ +
+
+

What an agent sees — as served at /mcp/{{ store.service.name }}

+ +
+ +
+ Catalog: + + First response + Full catalog + +
+ +
+
+

{{ group.label }}

+

None served.

+
+ {{ item.name }} + {{ item.meta }} + {{ item.description }} +
+
+ +
+

Excluded (not served)

+

+ Nothing is excluded — every catalog tool is served. +

+
+ {{ item.name }} + {{ item.reason }} +
+
+
+ +
+ + {{ total }} tools · {{ tokenLabel() }} · {{ lazyLabel() }} + + +
+
diff --git a/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.scss b/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.scss new file mode 100644 index 00000000..968fca3e --- /dev/null +++ b/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.scss @@ -0,0 +1,128 @@ +/* "What an agent sees" right-side sheet. */ +.mcp-preview { + display: flex; + flex-direction: column; + height: 100%; + min-height: 0; + font-family: Inter, 'Helvetica Neue', sans-serif; + padding: 18px 20px 14px; + box-sizing: border-box; + background: #fff; +} + +.mcp-preview-head { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 10px; + + h2 { + margin: 0; + font-size: 15.5px; + font-weight: 700; + line-height: 1.35; + } +} + +.mcp-preview-controls { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + margin-top: 10px; + font-size: 13px; + + .mcp-preview-controls-label { + font-weight: 600; + } +} + +.mcp-preview-body { + flex: 1; + overflow-y: auto; + margin-top: 12px; + min-height: 0; +} + +.mcp-preview-group { + margin-bottom: 18px; + + h3 { + font-size: 11.5px; + font-weight: 700; + letter-spacing: 0.05em; + text-transform: uppercase; + opacity: 0.7; + margin: 0 0 6px; + } +} + +.mcp-preview-item { + display: flex; + align-items: baseline; + gap: 8px; + flex-wrap: wrap; + padding: 3px 0; + font-size: 13px; + + code { + font-size: 12.5px; + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 6px; + padding: 1px 7px; + } + + .mcp-preview-meta { + font-size: 12px; + color: var(--df-accent, #5c5699); + font-variant-numeric: tabular-nums; + } + + .mcp-preview-desc { + font-size: 12px; + opacity: 0.65; + } + + .mcp-preview-reason { + font-size: 12px; + color: #9a6700; + } +} + +.mcp-preview-excluded { + border-top: 1px solid rgba(0, 0, 0, 0.08); + padding-top: 12px; + + .mcp-preview-item code { + opacity: 0.75; + } +} + +.mcp-preview-none { + font-size: 12.5px; + opacity: 0.6; + margin: 0; +} + +.mcp-preview-foot { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + flex-wrap: wrap; + border-top: 1px solid rgba(0, 0, 0, 0.08); + padding-top: 10px; + + .mcp-preview-foot-facts { + font-size: 12.5px; + font-variant-numeric: tabular-nums; + opacity: 0.8; + } +} + +@media (max-width: 700px) { + .mcp-preview { + padding: 14px 12px 10px; + } +} diff --git a/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.ts b/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.ts new file mode 100644 index 00000000..40bc9d97 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-preview/df-mcp-preview.component.ts @@ -0,0 +1,361 @@ +/** + * "What an agent sees" preview drawer (§3.7) — the exact final list a + * client's tools/list returns, grouped by origin, with an always-present + * Excluded section that names WHY every absent thing is absent, a + * First response / Full catalog switch when lazy delivery engages, and a + * Copy tools/list JSON audit export. Read-only: it never mutates the store. + * + * Opened as a right-side sheet (MatDialog positioned right, full height). + * Handles both service types: `mcp` derives from the shared effective math, + * `system_mcp` applies the same math to the fixed System API catalog. + */ +import { CommonModule } from '@angular/common'; +import { Component, Inject, OnInit } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, + MatDialogModule, + MatDialogRef, +} from '@angular/material/dialog'; +import { MatRadioModule } from '@angular/material/radio'; +import { FormsModule } from '@angular/forms'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { SYSTEM_MCP_TOOLS } from 'src/app/adf-services/df-service-details/system-mcp-tools'; +import { + AGGREGATOR_TOOLS, + GLOBAL_TOOLS, + LAZY_AUTO_TOKEN_THRESHOLD, + LAZY_FACADE_TOOLS, + TOKENS_PER_TOOL, + WRITE_GROUP_KEYS, + verbGroupsFor, + verbsFor, +} from '../mcp-catalog'; +import { + McpBackendService, + emittedDbToolName, + groupState, + toolKey, + verbReach, +} from '../mcp-effective'; +import { McpEditorStore } from '../mcp-store'; + +export interface McpPreviewData { + store: McpEditorStore; +} + +interface PreviewItem { + name: string; + description: string; + /** e.g. the merged enum line "service: crm, hr (2 of 3)". */ + meta?: string; +} + +interface PreviewGroup { + label: string; + items: PreviewItem[]; +} + +interface ExcludedItem { + name: string; + reason: string; +} + +@Component({ + selector: 'df-mcp-preview', + standalone: true, + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatDialogModule, + MatRadioModule, + ], + templateUrl: './df-mcp-preview.component.html', + styleUrls: ['./df-mcp-preview.component.scss'], +}) +export class DfMcpPreviewComponent implements OnInit { + groups: PreviewGroup[] = []; + excluded: ExcludedItem[] = []; + total = 0; + tokenEstimate = 0; + lazyEngaged = false; + lazyAuto = true; + /** 'first' = the lazy discovery facade; 'full' = the whole catalog. */ + view: 'first' | 'full' = 'full'; + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: McpPreviewData, + private snackbar: DfSnackbarService + ) {} + + get store(): McpEditorStore { + return this.data.store; + } + + ngOnInit(): void { + this.store.isSystemMcp ? this.buildSystem() : this.buildMcp(); + if (this.lazyEngaged) this.view = 'first'; + } + + /* ------------------------------ mcp ------------------------------ */ + private buildMcp(): void { + const s = this.store; + const cfg = s.cfg; + const disabled = cfg.disabledTools; + const eff = s.effective(); + const style = eff.effectiveStyle; + const rows = s.rows(); + const liveRows = rows.filter( + (r): r is { name: string; svc: McpBackendService } => !!r.svc + ); + const activeDbs = liveRows + .map(r => r.svc) + .filter(v => v.active && v.kind === 'db'); + const activeFiles = liveRows + .map(r => r.svc) + .filter(v => v.active && v.kind === 'file'); + + // Global group: always-served globals + aggregators when 2+ active dbs. + const globalItems: PreviewItem[] = GLOBAL_TOOLS.filter( + t => !disabled.has(t.verb) + ).map(t => ({ name: t.verb, description: t.description })); + if (activeDbs.length >= 2) { + for (const t of AGGREGATOR_TOOLS) { + if (!disabled.has(t.verb)) { + globalItems.push({ name: t.verb, description: t.description }); + } + } + } + this.groups.push({ label: `Global (${globalItems.length})`, items: globalItems }); + + // Database group. + const dbItems: PreviewItem[] = []; + if (activeDbs.length > 0) { + if (style === 'merged') { + for (const v of verbsFor('db')) { + const reach = verbReach(v.verb, cfg, s.backendServices); + if (reach.on.length === 0) continue; + dbItems.push({ + name: v.verb, + description: v.description, + meta: `service: ${reach.on.join(', ')} (${reach.on.length} of ${reach.total})`, + }); + } + this.groups.push({ + label: `Database — consolidated, service argument (${dbItems.length})`, + items: dbItems, + }); + } else { + for (const db of activeDbs) { + for (const v of verbsFor('db')) { + if (!disabled.has(toolKey(db.name, v.verb))) { + dbItems.push({ + name: emittedDbToolName('prefixed', db.name, v.verb), + description: v.description, + }); + } + } + } + this.groups.push({ + label: `Database (${dbItems.length})`, + items: dbItems, + }); + } + } + + // File group (always per-service names). + const fileItems: PreviewItem[] = []; + for (const f of activeFiles) { + for (const v of verbsFor('file')) { + if (!disabled.has(toolKey(f.name, v.verb))) { + fileItems.push({ + name: toolKey(f.name, v.verb), + description: v.description, + }); + } + } + } + if (activeFiles.length > 0) { + this.groups.push({ label: `File (${fileItems.length})`, items: fileItems }); + } + + // Custom group. + const customItems: PreviewItem[] = (cfg.customTools ?? []) + .filter((t: any) => t?.enabled !== false && t?.enabled !== 0) + .map((t: any) => ({ + name: t.name ?? '', + description: t.description ?? '', + })); + if (customItems.length > 0) { + this.groups.push({ + label: `Custom (${customItems.length})`, + items: customItems, + }); + } + + /* ----------------------- Excluded — always present ----------------------- */ + // 1. Not exposed (aggregate). + const unexposed = s.backendServices.filter( + b => !cfg.exposedServices.includes(b.name) + ); + if (unexposed.length > 0) { + const names = unexposed.map(u => u.name); + const shown = names.slice(0, 3).join(', '); + const more = names.length > 3 ? `, +${names.length - 3} more` : ''; + this.excluded.push({ name: shown + more, reason: 'not exposed' }); + } + // 2. Inactive exposed services. + for (const r of liveRows) { + if (!r.svc.active) { + this.excluded.push({ name: r.name, reason: 'service inactive' }); + } + } + // 3. Orphans — exposed entries matching no live service. + for (const r of rows) { + if (!r.svc) { + this.excluded.push({ + name: r.name, + reason: 'no service with this name exists', + }); + } + } + // 4. Curation: whole groups off per service; loose per-tool offs (prefixed). + for (const r of liveRows) { + if (!r.svc.active) continue; + for (const g of verbGroupsFor(r.svc.kind)) { + const st = groupState(r.svc, g, disabled); + if (st === 'off') { + this.excluded.push({ + name: `${r.name} · ${g.label.toLowerCase()}`, + reason: 'turned off by you', + }); + } else if (st === 'part' && (style === 'prefixed' || r.svc.kind === 'file')) { + for (const v of g.verbs) { + if (disabled.has(toolKey(r.name, v.verb))) { + this.excluded.push({ + name: toolKey(r.name, v.verb), + reason: 'turned off by you', + }); + } + } + } + } + } + // 5. Merged: verbs off in every exposed database. + if (style === 'merged' && activeDbs.length > 0) { + for (const v of verbsFor('db')) { + const reach = verbReach(v.verb, cfg, s.backendServices); + if (reach.on.length === 0) { + this.excluded.push({ + name: v.verb, + reason: 'turned off in every exposed database', + }); + } + } + } + // 6. Aggregators absent below two databases. + if (activeDbs.length < 2) { + this.excluded.push({ + name: 'cross-database aggregators', + reason: 'served only with two or more databases', + }); + } + // 7. Disabled globals / aggregators (bare names). + for (const t of GLOBAL_TOOLS) { + if (disabled.has(t.verb)) { + this.excluded.push({ name: t.verb, reason: 'turned off by you' }); + } + } + if (activeDbs.length >= 2) { + for (const t of AGGREGATOR_TOOLS) { + if (disabled.has(t.verb)) { + this.excluded.push({ name: t.verb, reason: 'turned off by you' }); + } + } + } + // 8. Disabled custom tools. + for (const t of cfg.customTools ?? []) { + if (t?.enabled === false || t?.enabled === 0) { + this.excluded.push({ + name: t.name ?? '', + reason: 'turned off by you', + }); + } + } + + this.total = eff.total; + this.tokenEstimate = eff.tokenEstimate; + this.lazyEngaged = eff.lazyEngaged; + this.lazyAuto = cfg.lazyMode === 'auto'; + } + + /* --------------------------- system_mcp --------------------------- */ + private buildSystem(): void { + const s = this.store; + const disabled = s.cfg.disabledTools; + const served = SYSTEM_MCP_TOOLS.filter(t => !disabled.has(t.name)); + this.groups.push({ + label: `System API (${served.length})`, + items: served.map(t => ({ name: t.name, description: t.description })), + }); + for (const t of SYSTEM_MCP_TOOLS) { + if (disabled.has(t.name)) { + this.excluded.push({ name: t.name, reason: 'turned off by you' }); + } + } + this.total = served.length; + this.tokenEstimate = this.total * TOKENS_PER_TOOL; + const lm = s.cfg.lazyMode; + this.lazyAuto = lm === 'auto'; + this.lazyEngaged = + lm === 'always' || + lm === true || + (lm === 'auto' && this.tokenEstimate > LAZY_AUTO_TOKEN_THRESHOLD); + } + + /* ------------------------------ view ------------------------------ */ + firstResponseItems(): PreviewItem[] { + return LAZY_FACADE_TOOLS.map(t => ({ + name: t.verb, + description: t.description, + })); + } + + visibleGroups(): PreviewGroup[] { + if (this.lazyEngaged && this.view === 'first') { + return [ + { + label: `First response — discovery tools (${LAZY_FACADE_TOOLS.length})`, + items: this.firstResponseItems(), + }, + ]; + } + return this.groups; + } + + tokenLabel(): string { + return `~${(this.tokenEstimate / 1000).toFixed(1)}k tokens of definitions`; + } + + lazyLabel(): string { + if (!this.lazyEngaged) return 'Lazy loading: not engaged'; + return this.lazyAuto + ? 'Lazy loading: engaged (auto)' + : 'Lazy loading: engaged'; + } + + copyJson(): void { + const list = this.visibleGroups() + .flatMap(g => g.items) + .map(i => ({ name: i.name, description: i.description })); + const json = JSON.stringify(list, null, 2); + navigator.clipboard?.writeText(json).catch(() => undefined); + this.snackbar.openSnackBar('tools/list JSON copied.', 'success'); + } + + close(): void { + this.dialogRef.close(); + } +} diff --git a/src/app/adf-mcp/df-mcp-settings/df-mcp-housekeeping-dialog.component.ts b/src/app/adf-mcp/df-mcp-settings/df-mcp-housekeeping-dialog.component.ts new file mode 100644 index 00000000..5b82ef0d --- /dev/null +++ b/src/app/adf-mcp/df-mcp-settings/df-mcp-housekeeping-dialog.component.ts @@ -0,0 +1,157 @@ +/** + * Housekeeping review dialog (§6.4): itemized, review-before-delete flow for + * orphaned disabled_tools keys. Lists the exact keys with a best-guess origin + * service, all pre-checked; only [Delete selected] removes anything, and it + * returns the checked keys — the Settings tab applies the removal to the + * draft config. Cancel (or ✕) returns undefined and deletes nothing. + */ +import { CommonModule } from '@angular/common'; +import { Component, Inject } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { + MAT_DIALOG_DATA, + MatDialogModule, + MatDialogRef, +} from '@angular/material/dialog'; +import { + DB_VERB_GROUPS, + FILE_VERB_GROUPS, +} from '../mcp-catalog'; + +export interface McpHousekeepingDialogData { + /** The exact orphaned disabled_tools keys, from store.orphans(). */ + keys: string[]; +} + +/** All bare verbs a key could end with, longest first so the greediest + * suffix wins (e.g. `_get_table_data` before any shorter overlap). */ +const KNOWN_VERBS: string[] = [...DB_VERB_GROUPS, ...FILE_VERB_GROUPS] + .flatMap(g => g.verbs.map(v => v.verb)) + .sort((a, b) => b.length - a.length); + +/** Best-guess origin service for an orphaned `{service}_{verb}` key. */ +export function guessOrigin(key: string): string | null { + for (const verb of KNOWN_VERBS) { + if (key.endsWith('_' + verb) && key.length > verb.length + 1) { + return key.slice(0, key.length - verb.length - 1); + } + } + return null; +} + +@Component({ + selector: 'df-mcp-housekeeping-dialog', + standalone: true, + imports: [CommonModule, MatButtonModule, MatCheckboxModule, MatDialogModule], + template: ` +
+

Review & clean up

+

+ These saved tool settings reference services that no longer exist. + Checked entries are deleted; unchecked entries are kept. +

+
    +
  • + + {{ key }} + + — from “{{ origin }}”? + + +
  • +
+
+ + +
+
+ `, + styles: [ + ` + .mcp-hk-dialog { + padding: 18px 20px 14px; + font-family: Inter, 'Helvetica Neue', sans-serif; + max-width: 460px; + } + h2 { + margin: 0 0 8px; + font-size: 16px; + font-weight: 700; + } + .mcp-hk-note { + font-size: 13px; + opacity: 0.75; + margin: 0 0 10px; + } + .mcp-hk-list { + list-style: none; + margin: 0; + padding: 0; + display: flex; + flex-direction: column; + max-height: 320px; + overflow-y: auto; + } + .mcp-hk-list code { + font-size: 12.5px; + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 5px; + padding: 1px 6px; + word-break: break-all; + } + .mcp-hk-origin { + font-size: 12px; + opacity: 0.6; + margin-left: 4px; + } + .mcp-hk-actions { + display: flex; + justify-content: flex-end; + gap: 8px; + margin-top: 14px; + } + `, + ], +}) +export class DfMcpHousekeepingDialogComponent { + /** Selection state; every key starts checked (§6.4). */ + checked: Record = {}; + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: McpHousekeepingDialogData + ) { + for (const k of data.keys) this.checked[k] = true; + } + + toggle(key: string, value: boolean): void { + this.checked[key] = value; + } + + get selected(): string[] { + return this.data.keys.filter(k => this.checked[k]); + } + + originOf(key: string): string | null { + return guessOrigin(key); + } + + deleteSelected(): void { + this.dialogRef.close(this.selected); + } +} diff --git a/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.html b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.html new file mode 100644 index 00000000..64c5311b --- /dev/null +++ b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.html @@ -0,0 +1,274 @@ +
+ +
+

Identity

+ + + Name (namespace) + + +

+ Renaming changes your endpoint URL to …/mcp/{{ store.draftName }}. + Connected clients will break until they update. +

+ + + Label + + + + + Description + + + + + Active + +

+ This server is inactive — the endpoint refuses connections. +

+
+ + +
+

Authentication

+ +

Redirect URIs

+
    +
  • + {{ uri }} + +
  • +
  • + No redirect URIs yet — OAuth clients that need a callback can't + connect until theirs is added. +
  • +
+
+ + Add redirect URI + + + +
+ + + Custom login URL + + + + + Auto OAuth service + + None + + {{ store.cfg.autoOauthService }} (not found on this instance) + + + {{ s.label }} ({{ s.name }}) + + + +

+ Sign-ins are sent straight to this OAuth provider instead of the + DreamFactory login form. +

+ + + Allow API-key authentication + +

+ Anyone with the URL and a valid API key connects without a login + prompt. The key's role decides which tools it can use. +

+ +
+ + + Clients using the old secret will stop connecting. + +
+
+ + +
+

Serving

+ + + +

Tool naming

+ + + + Consolidated (merged) — one tool per verb with a service + argument. Recommended. + + + Matches the recommended default. + + + + + Per-service names (prefixed) — legacy compatibility for clients + pinned to names like crm_get_tables. + + + Server default (per-service names). + + + +

+ Style changes rename emitted tools — preview before saving. Clients + may need to reconnect. +

+
+ +

Catalog delivery

+ + Catalog delivery + + Auto — recommended + Always on-demand + Never + + +

+ When tool definitions exceed ~8k tokens, agents first receive + discovery tools instead of the full catalog. +

+ +

+ Scope tools to caller's role: {{ scopeToolsOn ? 'on' : 'off' }} — set + by MCP_SCOPE_TOOLS on the server. +

+
+ + +
+

Housekeeping

+ + +

+ {{ orphanCount }} saved tool + {{ orphanCount === 1 ? 'setting references' : 'settings reference' }} + services that no longer exist. Nothing is removed automatically — + review before deleting. +

+ +
+ +

No orphaned tool settings.

+
+ +
+ + + Saves flush the cache automatically — this one is for support. + +
+
+ + +
+

Full configuration

+

+ The stored config, read-only — what the audit sees is what you see. +

+
{{ fullConfigJson }}
+
+ + +
+

Danger zone

+

+ Delete this MCP server. Clients lose access immediately. +

+ +
+
diff --git a/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.scss b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.scss new file mode 100644 index 00000000..ef0eea7e --- /dev/null +++ b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.scss @@ -0,0 +1,224 @@ +/* Settings tab: single scrollable column, one card per section. Card + chip + primitives match the shell's (component styles don't cascade, so the card + primitive is copied from the sibling tabs' scss). */ +.mcp-settings { + display: flex; + flex-direction: column; + gap: 14px; + max-width: 760px; +} + +/* ---------------------------------------------------------------- cards */ +.mcp-card { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 10px; + padding: 16px 18px; + + .mcp-card-title { + display: flex; + align-items: center; + gap: 8px; + font-size: 14.5px; + font-weight: 700; + margin: 0 0 12px; + } +} + +.mcp-sub-title { + font-size: 12.5px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + opacity: 0.6; + margin: 14px 0 8px; + + &:first-of-type { + margin-top: 0; + } +} + +/* ---------------------------------------------------------------- fields */ +.mcp-field { + display: block; + width: 100%; +} + +.mcp-hint { + font-size: 12.5px; + opacity: 0.7; + margin: 2px 0 12px; + + &.warn { + color: #9a6700; + opacity: 1; + font-weight: 500; + } +} + +.mcp-inline-warning { + background: #fdf3dc; + border: 1px solid rgba(154, 103, 0, 0.4); + color: #9a6700; + border-radius: 8px; + padding: 8px 12px; + font-size: 13px; + font-weight: 500; + margin: -6px 0 14px; +} + +/* --------------------------------------------------------- redirect URIs */ +.mcp-redirect-list { + list-style: none; + margin: 0 0 8px; + padding: 0; + display: flex; + flex-direction: column; + gap: 6px; + + li { + display: flex; + align-items: center; + gap: 8px; + } + + code { + font-size: 12.5px; + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 6px; + padding: 3px 8px; + word-break: break-all; + } + + .mcp-redirect-empty { + font-size: 12.5px; + opacity: 0.7; + } +} + +.mcp-x { + background: none; + border: none; + cursor: pointer; + font: inherit; + font-size: 17px; + line-height: 1; + padding: 2px 6px; + border-radius: 6px; + color: inherit; + opacity: 0.6; + + &:hover { + opacity: 1; + background: rgba(0, 0, 0, 0.05); + } +} + +.mcp-redirect-addrow { + display: flex; + align-items: flex-start; + gap: 10px; + + .grow { + flex: 1; + } + + button { + margin-top: 6px; + } +} + +.mcp-regenerate-row { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; + margin-top: 4px; + + .mcp-hint { + margin: 0; + } +} + +/* --------------------------------------------------------------- serving */ +.mcp-toolstyle { + display: flex; + flex-direction: column; + gap: 8px; + margin-bottom: 4px; + + .mcp-radio-label { + display: block; + font-size: 13.5px; + white-space: normal; + line-height: 1.45; + } + + .mcp-radio-note { + display: block; + font-size: 12px; + font-weight: 600; + color: var(--df-accent, #5c5699); + margin-top: 2px; + } +} + +.mcp-scope-line { + font-size: 13px; + opacity: 0.8; + margin: 4px 0 0; +} + +/* ----------------------------------------------------------- housekeeping */ +.mcp-flush-row { + display: flex; + align-items: center; + gap: 12px; + flex-wrap: wrap; + margin-top: 14px; + + .mcp-hint { + margin: 0; + } +} + +/* ------------------------------------------------------ full configuration */ +.mcp-fullconfig { + margin: 0; + background: rgba(0, 0, 0, 0.035); + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 8px; + padding: 12px 14px; + font-size: 12px; + line-height: 1.55; + overflow: auto; + max-height: 420px; +} + +/* ------------------------------------------------------------ danger zone */ +.mcp-danger { + background: #fdf0ef; + border-color: rgba(211, 47, 47, 0.35); + + .mcp-danger-copy { + font-size: 13.5px; + margin: 0 0 10px; + } +} + +/* ------------------------------------------------------------- responsive */ +@media (max-width: 700px) { + .mcp-card { + padding: 14px; + } + + .mcp-redirect-addrow { + flex-direction: column; + align-items: stretch; + + button { + margin-top: 0; + } + } +} diff --git a/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.spec.ts b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.spec.ts new file mode 100644 index 00000000..259fbc68 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.spec.ts @@ -0,0 +1,482 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { + MAT_DIALOG_DATA, + MatDialog, + MatDialogRef, +} from '@angular/material/dialog'; +import { provideNoopAnimations } from '@angular/platform-browser/animations'; +import { of } from 'rxjs'; +import { + CACHE_SERVICE_TOKEN, + SERVICES_SERVICE_TOKEN, + SERVICE_TYPE_SERVICE_TOKEN, +} from 'src/app/shared/constants/tokens'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { McpEditorStore } from '../mcp-store'; +import { + DfMcpHousekeepingDialogComponent, + McpHousekeepingDialogData, +} from './df-mcp-housekeeping-dialog.component'; +import { DfMcpSettingsComponent } from './df-mcp-settings.component'; + +function makeStore( + overrides: { + toolStyle?: 'merged' | 'prefixed' | null; + disabled?: string[]; + exposed?: string[]; + lazy?: any; + allowKey?: boolean; + type?: 'mcp' | 'system_mcp'; + } = {} +): McpEditorStore { + const store = new McpEditorStore(); + const config: Record = { + exposed_services: overrides.exposed ?? ['billing'], + disabled_tools: overrides.disabled ?? [], + lazy_mode: overrides.lazy ?? 'auto', + allow_api_key_auth: overrides.allowKey ?? false, + oauth_client_id: 'client-id-123', + oauth_client_secret: 'super-secret-value', + redirect_uris: ['https://claude.ai/api/mcp/auth_callback'], + scope_tools: true, + }; + if (overrides.toolStyle !== undefined && overrides.toolStyle !== null) { + config['tool_style'] = overrides.toolStyle; + } + store.init( + { + id: 7, + name: 'warehouse', + label: 'Warehouse Analytics', + description: '', + isActive: true, + type: overrides.type ?? 'mcp', + raw: {}, + }, + config + ); + store.backendServices = [ + { name: 'billing', label: 'Billing', kind: 'db', active: true }, + { name: 'hr', label: 'HR', kind: 'db', active: true }, + ]; + store.backendLoaded = true; + return store; +} + +describe('DfMcpSettingsComponent', () => { + let fixture: ComponentFixture; + const snackbar = { openSnackBar: jest.fn() }; + const listResponse = { resource: [] }; + const serviceTypeService = { + getAll: jest.fn(() => of(listResponse)), + }; + const servicesService = { + getAll: jest.fn(() => of(listResponse)), + }; + const cacheService = { + delete: jest.fn(() => of({})), + }; + + beforeEach(async () => { + jest.clearAllMocks(); + serviceTypeService.getAll.mockReturnValue(of(listResponse)); + servicesService.getAll.mockReturnValue(of(listResponse)); + cacheService.delete.mockReturnValue(of({})); + await TestBed.configureTestingModule({ + imports: [DfMcpSettingsComponent], + providers: [ + provideNoopAnimations(), + { provide: DfSnackbarService, useValue: snackbar }, + { provide: SERVICE_TYPE_SERVICE_TOKEN, useValue: serviceTypeService }, + { provide: SERVICES_SERVICE_TOKEN, useValue: servicesService }, + { provide: CACHE_SERVICE_TOKEN, useValue: cacheService }, + ], + }).compileComponents(); + }); + + function create(store: McpEditorStore): DfMcpSettingsComponent { + fixture = TestBed.createComponent(DfMcpSettingsComponent); + fixture.componentInstance.store = store; + fixture.detectChanges(); + return fixture.componentInstance; + } + + function el(): HTMLElement { + return fixture.nativeElement as HTMLElement; + } + + function byTestId(id: string): HTMLElement | null { + return el().querySelector(`[data-testid="${id}"]`); + } + + /** textContent with template line breaks collapsed to single spaces. */ + function textOf(elm: HTMLElement | null): string { + return (elm?.textContent ?? '').replace(/\s+/g, ' '); + } + + describe('rename warning', () => { + it('appears when the draft name differs and disappears when it matches again', () => { + const store = makeStore(); + create(store); + expect(byTestId('mcp-rename-warning')).toBeNull(); + + const input = byTestId('mcp-set-name') as HTMLInputElement; + input.value = 'warehouse-v2'; + input.dispatchEvent(new Event('input')); + fixture.detectChanges(); + + expect(store.draftName).toBe('warehouse-v2'); + const warning = byTestId('mcp-rename-warning'); + expect(warning).toBeTruthy(); + expect(textOf(warning)).toContain( + 'Renaming changes your endpoint URL to …/mcp/warehouse-v2. ' + + 'Connected clients will break until they update.' + ); + + input.value = 'warehouse'; + input.dispatchEvent(new Event('input')); + fixture.detectChanges(); + expect(byTestId('mcp-rename-warning')).toBeNull(); + }); + }); + + describe('tool naming', () => { + function radioInput(testId: string): HTMLInputElement { + return byTestId(testId)!.querySelector( + 'input[type="radio"]' + ) as HTMLInputElement; + } + + it('renders a null stored value as prefixed-selected with the server-default note', () => { + create(makeStore({ toolStyle: null })); + expect(radioInput('mcp-toolstyle-prefixed').checked).toBe(true); + expect(radioInput('mcp-toolstyle-merged').checked).toBe(false); + expect(byTestId('mcp-toolstyle-prefixed')!.textContent).toContain( + 'Server default (per-service names).' + ); + // Nothing was rewritten on render (migration safety). + expect(fixture.componentInstance.store.cfg.toolStyle).toBeNull(); + }); + + it('radio changes write explicit values, never null', () => { + const store = makeStore({ toolStyle: null }); + create(store); + + radioInput('mcp-toolstyle-merged').click(); + fixture.detectChanges(); + expect(store.cfg.toolStyle).toBe('merged'); + expect(byTestId('mcp-toolstyle-merged')!.textContent).toContain( + 'Matches the recommended default.' + ); + + radioInput('mcp-toolstyle-prefixed').click(); + fixture.detectChanges(); + expect(store.cfg.toolStyle).toBe('prefixed'); + expect(store.cfg.toolStyle).not.toBeNull(); + // The explicit value carries no server-default note. + expect(byTestId('mcp-toolstyle-prefixed')!.textContent).not.toContain( + 'Server default' + ); + }); + + it('shows the style-change note only while the draft differs from saved', () => { + const store = makeStore({ toolStyle: 'merged' }); + create(store); + expect(byTestId('mcp-toolstyle-note')).toBeNull(); + + radioInput('mcp-toolstyle-prefixed').click(); + fixture.detectChanges(); + expect(byTestId('mcp-toolstyle-note')!.textContent).toContain( + 'Style changes rename emitted tools — preview before saving.' + ); + + store.discard(); + fixture.detectChanges(); + expect(byTestId('mcp-toolstyle-note')).toBeNull(); + }); + + it('renders no tool-naming control for system_mcp but keeps catalog delivery', () => { + create(makeStore({ type: 'system_mcp' })); + expect(byTestId('mcp-toolstyle-merged')).toBeNull(); + expect(byTestId('mcp-toolstyle-prefixed')).toBeNull(); + expect(byTestId('mcp-lazy-select')).toBeTruthy(); + expect(byTestId('mcp-scope-line')).toBeTruthy(); + }); + }); + + describe('API-key toggle', () => { + it('mutates cfg.allowApiKeyAuth and marks the store dirty', () => { + const store = makeStore({ allowKey: false }); + create(store); + expect(store.dirty()).toBe(false); + + const toggle = byTestId('mcp-apikey-toggle')!.querySelector( + 'button[role="switch"], input[type="checkbox"]' + ) as HTMLElement; + toggle.click(); + fixture.detectChanges(); + + expect(store.cfg.allowApiKeyAuth).toBe(true); + expect(store.dirty()).toBe(true); + }); + }); + + describe('catalog delivery', () => { + it('coerces legacy boolean values on read', () => { + const cmp = create(makeStore({ lazy: true })); + expect(cmp.lazyValue).toBe('always'); + cmp.store.cfg.lazyMode = false; + expect(cmp.lazyValue).toBe('never'); + cmp.store.cfg.lazyMode = 'auto'; + expect(cmp.lazyValue).toBe('auto'); + }); + + it('writes the selected token into cfg.lazyMode', () => { + const store = makeStore(); + const cmp = create(store); + cmp.setLazy('always'); + expect(store.cfg.lazyMode).toBe('always'); + expect(store.dirty()).toBe(true); + }); + }); + + describe('housekeeping', () => { + it('shows no review button and the all-clear line at 0 orphans', () => { + create(makeStore({ disabled: ['billing_delete_records'] })); + expect(byTestId('mcp-housekeeping-review')).toBeNull(); + expect(byTestId('mcp-housekeeping')!.textContent).toContain( + 'No orphaned tool settings.' + ); + }); + + it('counts orphans and the dialog delete removes exactly the checked keys', () => { + const store = makeStore({ + disabled: [ + 'ghost_get_tables', + 'ghost_create_records', + 'billing_delete_records', + ], + }); + const cmp = create(store); + const card = textOf(byTestId('mcp-housekeeping')); + expect(card).toContain( + '2 saved tool settings reference services that no longer exist.' + ); + expect(card).toContain( + 'Nothing is removed automatically — review before deleting.' + ); + + // The dialog returns only the keys left checked. Spy on the + // component's own MatDialog (MatDialogModule is component-scoped). + const dialog: MatDialog = (cmp as any).dialog; + const openSpy = jest.spyOn(dialog, 'open').mockReturnValue({ + afterClosed: () => of(['ghost_get_tables']), + } as any); + + (byTestId('mcp-housekeeping-review') as HTMLButtonElement).click(); + fixture.detectChanges(); + + expect(openSpy).toHaveBeenCalledWith( + DfMcpHousekeepingDialogComponent, + expect.objectContaining({ + data: { keys: ['ghost_get_tables', 'ghost_create_records'] }, + }) + ); + // Exactly the checked key is gone; the unchecked orphan and the + // owned key survive. + expect(store.cfg.disabledTools.has('ghost_get_tables')).toBe(false); + expect(store.cfg.disabledTools.has('ghost_create_records')).toBe(true); + expect(store.cfg.disabledTools.has('billing_delete_records')).toBe(true); + expect(store.dirty()).toBe(true); + expect(snackbar.openSnackBar).toHaveBeenCalledWith( + 'Removed 1 saved tool setting — save to apply.', + 'success' + ); + expect(cmp.orphanCount).toBe(1); + }); + + it('deletes nothing when the dialog is cancelled', () => { + const store = makeStore({ disabled: ['ghost_get_tables'] }); + const cmp = create(store); + jest + .spyOn((cmp as any).dialog as MatDialog, 'open') + .mockReturnValue({ afterClosed: () => of(undefined) } as any); + (byTestId('mcp-housekeeping-review') as HTMLButtonElement).click(); + expect(store.cfg.disabledTools.has('ghost_get_tables')).toBe(true); + expect(store.dirty()).toBe(false); + }); + + it('flush cache calls the cache API with the service name and toasts', () => { + create(makeStore()); + (byTestId('mcp-flush-cache') as HTMLButtonElement).click(); + expect(cacheService.delete).toHaveBeenCalledWith('warehouse'); + expect(snackbar.openSnackBar).toHaveBeenCalledWith( + 'Cache flushed.', + 'success' + ); + }); + }); + + describe('full configuration', () => { + it('masks the client secret and never prints its value', () => { + create(makeStore()); + const pre = byTestId('mcp-fullconfig')!; + expect(pre.textContent).toContain('••••••••'); + expect(pre.textContent).not.toContain('super-secret-value'); + // The rest of the stored config is the real serialization. + expect(pre.textContent).toContain('"exposedServices"'); + expect(pre.textContent).toContain('"billing"'); + expect(pre.textContent).toContain('"scope_tools"'); + // The draft secret itself was not overwritten by the mask. + expect( + fixture.componentInstance.store.cfg.oauthClientSecret + ).toBe('super-secret-value'); + }); + }); + + describe('regenerate secret', () => { + it('confirms and writes 64 hex chars into the draft', () => { + const store = makeStore(); + create(store); + jest.spyOn(window, 'confirm').mockReturnValue(true); + (byTestId('mcp-regenerate-secret') as HTMLButtonElement).click(); + expect(window.confirm).toHaveBeenCalledWith( + 'Clients using the old secret will stop connecting. Regenerate?' + ); + expect(store.cfg.oauthClientSecret).toMatch(/^[0-9a-f]{64}$/); + expect(store.dirty()).toBe(true); + }); + + it('does nothing when declined', () => { + const store = makeStore(); + create(store); + jest.spyOn(window, 'confirm').mockReturnValue(false); + (byTestId('mcp-regenerate-secret') as HTMLButtonElement).click(); + expect(store.cfg.oauthClientSecret).toBe('super-secret-value'); + expect(store.dirty()).toBe(false); + }); + }); + + describe('redirect URIs', () => { + it('adds and removes entries through the store', () => { + const store = makeStore(); + const cmp = create(store); + cmp.newRedirectUri = ' https://example.com/cb '; + cmp.addRedirect(); + expect(store.cfg.redirectUris).toEqual([ + 'https://claude.ai/api/mcp/auth_callback', + 'https://example.com/cb', + ]); + expect(cmp.newRedirectUri).toBe(''); + + // Duplicates are refused with a warning toast. + cmp.newRedirectUri = 'https://example.com/cb'; + cmp.addRedirect(); + expect(store.cfg.redirectUris).toHaveLength(2); + expect(snackbar.openSnackBar).toHaveBeenCalledWith( + 'That redirect URI is already listed.', + 'warning' + ); + + cmp.removeRedirect(0); + expect(store.cfg.redirectUris).toEqual(['https://example.com/cb']); + expect(store.dirty()).toBe(true); + }); + }); + + describe('auto OAuth picker', () => { + it('lists only services whose type group is OAuth', () => { + serviceTypeService.getAll.mockReturnValue( + of({ + resource: [ + { name: 'oauth_github', group: 'OAuth' }, + { name: 'mysql', group: 'Database' }, + ], + }) as any + ); + servicesService.getAll.mockReturnValue( + of({ + resource: [ + { id: 1, name: 'github_sso', label: 'GitHub', type: 'oauth_github' }, + { id: 2, name: 'billing', label: 'Billing', type: 'mysql' }, + ], + }) as any + ); + const cmp = create(makeStore()); + expect(cmp.oauthServices).toEqual([ + { name: 'github_sso', label: 'GitHub' }, + ]); + expect(cmp.oauthLoaded).toBe(true); + }); + + it('writes the picked value (or null for None) into cfg', () => { + const store = makeStore(); + const cmp = create(store); + cmp.setAutoOauth('github_sso'); + expect(store.cfg.autoOauthService).toBe('github_sso'); + cmp.setAutoOauth(null); + expect(store.cfg.autoOauthService).toBeNull(); + }); + }); + + describe('identity and danger zone', () => { + it('active toggle off shows the inactive hint', () => { + const store = makeStore(); + create(store); + const toggle = byTestId('mcp-set-active')!.querySelector( + 'button[role="switch"], input[type="checkbox"]' + ) as HTMLElement; + toggle.click(); + fixture.detectChanges(); + expect(store.draftIsActive).toBe(false); + expect(el().textContent).toContain( + 'This server is inactive — the endpoint refuses connections.' + ); + }); + + it('Delete server… emits requestDelete', () => { + const cmp = create(makeStore()); + const emitted = jest.fn(); + cmp.requestDelete.subscribe(emitted); + (byTestId('mcp-delete-server') as HTMLButtonElement).click(); + expect(emitted).toHaveBeenCalledTimes(1); + }); + }); +}); + +describe('DfMcpHousekeepingDialogComponent', () => { + const keys = ['ghost_get_tables', 'ghost_create_records']; + let dialogRef: { close: jest.Mock }; + let cmp: DfMcpHousekeepingDialogComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + dialogRef = { close: jest.fn() }; + await TestBed.configureTestingModule({ + imports: [DfMcpHousekeepingDialogComponent], + providers: [ + provideNoopAnimations(), + { provide: MatDialogRef, useValue: dialogRef }, + { + provide: MAT_DIALOG_DATA, + useValue: { keys } as McpHousekeepingDialogData, + }, + ], + }).compileComponents(); + fixture = TestBed.createComponent(DfMcpHousekeepingDialogComponent); + cmp = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('lists the exact keys with every checkbox pre-checked', () => { + const text = (fixture.nativeElement as HTMLElement).textContent ?? ''; + for (const k of keys) expect(text).toContain(k); + expect(cmp.selected).toEqual(keys); + }); + + it('Delete selected closes with only the still-checked keys', () => { + cmp.toggle('ghost_create_records', false); + cmp.deleteSelected(); + expect(dialogRef.close).toHaveBeenCalledWith(['ghost_get_tables']); + }); +}); diff --git a/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.ts b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.ts index 8389f8bc..63c8d2ca 100644 --- a/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.ts +++ b/src/app/adf-mcp/df-mcp-settings/df-mcp-settings.component.ts @@ -3,23 +3,310 @@ * auto OAuth picker, regenerate secret), Serving (tool naming, catalog * delivery, scope note), Housekeeping (orphan review, cache flush), * Full configuration viewer, Danger zone. - * STUB — full implementation lands in the tab build phase. The selector, - * class name, inputs and outputs are the frozen contract with the shell. + * + * The shell owns Save: every control here mutates the draft through the + * McpEditorStore and calls touch(), and the dirty bar picks it up. The one + * permitted direct API call on this tab is the manual cache flush. */ import { CommonModule } from '@angular/common'; -import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { + Component, + EventEmitter, + Inject, + Input, + OnInit, + Output, +} from '@angular/core'; +import { FormsModule } from '@angular/forms'; import { MatButtonModule } from '@angular/material/button'; +import { MatDialog, MatDialogModule } from '@angular/material/dialog'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { MatRadioChange, MatRadioModule } from '@angular/material/radio'; +import { MatSelectModule } from '@angular/material/select'; +import { + MatSlideToggleChange, + MatSlideToggleModule, +} from '@angular/material/slide-toggle'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { forkJoin } from 'rxjs'; +import { + CACHE_SERVICE_TOKEN, + SERVICES_SERVICE_TOKEN, + SERVICE_TYPE_SERVICE_TOKEN, +} from 'src/app/shared/constants/tokens'; +import { DfBaseCrudService } from 'src/app/shared/services/df-base-crud.service'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { GenericListResponse } from 'src/app/shared/types/generic-http'; +import { ToolStyle, serializeMcpConfig } from '../mcp-effective'; import { McpEditorStore } from '../mcp-store'; +import { + DfMcpHousekeepingDialogComponent, + McpHousekeepingDialogData, +} from './df-mcp-housekeeping-dialog.component'; + +type LazyChoice = 'auto' | 'always' | 'never'; + +interface OAuthServiceOption { + name: string; + label: string; +} + +const SECRET_MASK = '••••••••'; + +function randomHex64(): string { + const bytes = new Uint8Array(32); + const c: Crypto | undefined = (globalThis as any).crypto; + if (c?.getRandomValues) { + c.getRandomValues(bytes); + } else { + for (let i = 0; i < bytes.length; i++) { + bytes[i] = Math.floor(Math.random() * 256); + } + } + return Array.from(bytes, b => b.toString(16).padStart(2, '0')).join(''); +} @Component({ selector: 'df-mcp-settings', standalone: true, - imports: [CommonModule, MatButtonModule], - template: `
- Settings tab — implementation pending. -
`, + templateUrl: './df-mcp-settings.component.html', + styleUrls: ['./df-mcp-settings.component.scss'], + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatDialogModule, + MatFormFieldModule, + MatInputModule, + MatRadioModule, + MatSelectModule, + MatSlideToggleModule, + MatTooltipModule, + ], }) -export class DfMcpSettingsComponent { +export class DfMcpSettingsComponent implements OnInit { @Input({ required: true }) store!: McpEditorStore; @Output() requestDelete = new EventEmitter(); + + /** OAuth-group services on this instance, for the Auto OAuth picker. */ + oauthServices: OAuthServiceOption[] = []; + oauthLoaded = false; + + newRedirectUri = ''; + flushingCache = false; + + constructor( + @Inject(SERVICE_TYPE_SERVICE_TOKEN) + private serviceTypeService: DfBaseCrudService, + @Inject(SERVICES_SERVICE_TOKEN) private servicesService: DfBaseCrudService, + @Inject(CACHE_SERVICE_TOKEN) private cacheService: DfBaseCrudService, + private snackbarService: DfSnackbarService, + private dialog: MatDialog + ) {} + + ngOnInit(): void { + this.loadOauthServices(); + } + + /** Fetch types in group 'OAuth', then the services of those types. */ + private loadOauthServices(): void { + forkJoin({ + types: this.serviceTypeService.getAll>({ + fields: 'name,group', + limit: 1000, + }), + services: this.servicesService.getAll>({ + limit: 1000, + fields: 'id,name,label,type', + sort: 'name', + }), + }).subscribe({ + next: ({ types, services }) => { + const oauthTypes = new Set( + (types?.resource ?? []) + .filter((t: any) => t.group === 'OAuth') + .map((t: any) => t.name) + ); + this.oauthServices = (services?.resource ?? []) + .filter((s: any) => oauthTypes.has(s.type)) + .map((s: any) => ({ name: s.name, label: s.label || s.name })); + this.oauthLoaded = true; + }, + error: () => { + // Picker degrades to None + the stored value; nothing is asserted. + this.oauthLoaded = true; + }, + }); + } + + /* ------------------------------ identity ------------------------------ */ + get renamePending(): boolean { + return this.store.draftName !== this.store.service.name; + } + + setName(value: string): void { + this.store.draftName = value; + this.store.touch(); + } + + setLabel(value: string): void { + this.store.draftLabel = value; + this.store.touch(); + } + + setDescription(value: string): void { + this.store.draftDescription = value; + this.store.touch(); + } + + setActive(event: MatSlideToggleChange): void { + this.store.draftIsActive = event.checked; + this.store.touch(); + } + + /* --------------------------- authentication --------------------------- */ + addRedirect(): void { + const value = this.newRedirectUri.trim(); + if (!value) return; + if (this.store.cfg.redirectUris.includes(value)) { + this.snackbarService.openSnackBar( + 'That redirect URI is already listed.', + 'warning' + ); + return; + } + this.store.cfg.redirectUris.push(value); + this.newRedirectUri = ''; + this.store.touch(); + } + + removeRedirect(index: number): void { + this.store.cfg.redirectUris.splice(index, 1); + this.store.touch(); + } + + setLoginUrl(value: string): void { + this.store.cfg.customLoginUrl = value; + this.store.touch(); + } + + setAutoOauth(value: string | null): void { + this.store.cfg.autoOauthService = value; + this.store.touch(); + } + + /** Stored value that no longer matches an OAuth service — kept visible. */ + get missingAutoOauth(): boolean { + const v = this.store.cfg.autoOauthService; + return ( + !!v && this.oauthLoaded && !this.oauthServices.some(s => s.name === v) + ); + } + + setAllowApiKey(event: MatSlideToggleChange): void { + this.store.cfg.allowApiKeyAuth = event.checked; + this.store.touch(); + } + + regenerateSecret(): void { + const ok = window.confirm( + 'Clients using the old secret will stop connecting. Regenerate?' + ); + if (!ok) return; + this.store.cfg.oauthClientSecret = randomHex64(); + this.store.touch(); // dirty bar picks it up — the shell owns Save + this.snackbarService.openSnackBar( + 'New client secret generated — save to apply.', + 'success' + ); + } + + /* ------------------------------- serving ------------------------------ */ + /** Stored null renders as prefixed (server default) — never as "Auto". */ + get toolStyleValue(): ToolStyle { + return this.store.cfg.toolStyle === 'merged' ? 'merged' : 'prefixed'; + } + + /** A radio change always writes the explicit value, never null. */ + onToolStyleChange(event: MatRadioChange): void { + const value: ToolStyle = event.value === 'merged' ? 'merged' : 'prefixed'; + this.store.cfg.toolStyle = value; + this.store.touch(); + } + + get styleChanged(): boolean { + return this.store.cfg.toolStyle !== this.store.savedCfg.toolStyle; + } + + /** Legacy boolean values coerce on read: true => always, false => never. */ + get lazyValue(): LazyChoice { + const v = this.store.cfg.lazyMode; + if (v === true) return 'always'; + if (v === false) return 'never'; + return v === 'always' || v === 'never' ? v : 'auto'; + } + + setLazy(value: LazyChoice): void { + this.store.cfg.lazyMode = value; + this.store.touch(); + } + + /** scope_tools rides in the untouched-config spread; absent means on. */ + get scopeToolsOn(): boolean { + const rest = this.store.cfg.rest ?? {}; + const v = rest['scope_tools'] ?? rest['scopeTools']; + return v === undefined || v === null ? true : !!v; + } + + /* ---------------------------- housekeeping ---------------------------- */ + get orphanCount(): number { + // Before the backend catalog loads, orphan detection would be a guess. + return this.store.backendLoaded ? this.store.orphans().length : 0; + } + + openHousekeeping(): void { + const keys = this.store.orphans(); + if (!keys.length) return; + this.dialog + .open( + DfMcpHousekeepingDialogComponent, + { data: { keys }, width: '480px' } + ) + .afterClosed() + .subscribe(selected => { + if (!selected || selected.length === 0) return; + for (const key of selected) this.store.cfg.disabledTools.delete(key); + this.store.touch(); + this.snackbarService.openSnackBar( + `Removed ${selected.length} saved tool setting${ + selected.length === 1 ? '' : 's' + } — save to apply.`, + 'success' + ); + }); + } + + /** The ONE permitted direct API call on this tab. */ + flushCache(): void { + if (this.flushingCache) return; + this.flushingCache = true; + this.cacheService.delete(this.store.service.name).subscribe({ + next: () => { + this.flushingCache = false; + this.snackbarService.openSnackBar('Cache flushed.', 'success'); + }, + error: () => { + this.flushingCache = false; + this.snackbarService.openSnackBar('Cache flush failed.', 'error'); + }, + }); + } + + /* -------------------------- full configuration ------------------------ */ + get fullConfigJson(): string { + const out = serializeMcpConfig(this.store.cfg, this.store.service.type); + if (out['oauthClientSecret']) out['oauthClientSecret'] = SECRET_MASK; + return JSON.stringify(out, null, 2); + } } diff --git a/src/app/adf-mcp/df-mcp-tools/df-mcp-custom-tool-dialog.component.ts b/src/app/adf-mcp/df-mcp-tools/df-mcp-custom-tool-dialog.component.ts new file mode 100644 index 00000000..e3431d58 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-tools/df-mcp-custom-tool-dialog.component.ts @@ -0,0 +1,315 @@ +/** + * Add/edit custom tool dialog (§3.2 Custom tools): API-endpoint or + * server-side-function tool, with name-collision validation against every + * name the server would emit — built-in catalog names for the exposed + * services in the current tool style, global/aggregator names, and the other + * custom tools — plus JSON parse validation for parameters/headers. + * Returns the tool object to store in cfg.customTools; the caller mutates + * the store and the shell's Save persists it. + */ +import { CommonModule } from '@angular/common'; +import { Component, Inject, OnInit } from '@angular/core'; +import { + AbstractControl, + FormBuilder, + FormGroup, + ReactiveFormsModule, + ValidationErrors, + Validators, +} from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, + MatDialogModule, + MatDialogRef, +} from '@angular/material/dialog'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatInputModule } from '@angular/material/input'; +import { MatRadioModule } from '@angular/material/radio'; +import { MatSelectModule } from '@angular/material/select'; +import { AGGREGATOR_TOOLS, GLOBAL_TOOLS, verbsFor } from '../mcp-catalog'; +import { emittedDbToolName, toolKey } from '../mcp-effective'; +import { McpEditorStore } from '../mcp-store'; + +export interface McpCustomToolDialogData { + store: McpEditorStore; + /** Present when editing; absent when adding. */ + tool?: any; +} + +/** + * Every tool name this server would emit, apart from the edited custom tool + * itself: built-ins for exposed services in the current style, globals, + * aggregators, and the other custom tools. + */ +export function emittedNameSet(store: McpEditorStore, excludeToolName?: string): Set { + const names = new Set(); + GLOBAL_TOOLS.forEach(t => names.add(t.verb)); + AGGREGATOR_TOOLS.forEach(t => names.add(t.verb)); + const style = store.effective().effectiveStyle; + for (const row of store.rows()) { + if (!row.svc) continue; + for (const v of verbsFor(row.svc.kind)) { + names.add( + row.svc.kind === 'db' + ? emittedDbToolName(style, row.svc.name, v.verb) + : toolKey(row.svc.name, v.verb) + ); + } + } + for (const t of store.cfg.customTools ?? []) { + if (t?.name && t.name !== excludeToolName) names.add(t.name); + } + return names; +} + +@Component({ + selector: 'df-mcp-custom-tool-dialog', + standalone: true, + imports: [ + CommonModule, + ReactiveFormsModule, + MatButtonModule, + MatDialogModule, + MatFormFieldModule, + MatInputModule, + MatRadioModule, + MatSelectModule, + ], + template: ` +
+

{{ data.tool ? 'Edit custom tool' : 'Add custom tool' }}

+
+
+ Tool type: + + API endpoint + Server-side function + +
+ + + Name + + + A name is required. + + + Letters, numbers and underscores only. + + + A tool named {{ form.controls['name'].value }} already exists. Choose + another name. + + + + + Description + + + + +
+ + Method + + {{ m }} + + + + URL + + + A URL is required for an API tool. + + +
+ + + Parameters (JSON, optional) + + + Not valid JSON. + + + + + Headers (JSON, optional) + + + Not valid JSON. + + +
+ + + Function code + + + Function code is required for a function tool. + + + +
+ + +
+
+
+ `, + styles: [ + ` + .mcp-ct-dialog { + padding: 18px 20px 14px; + font-family: Inter, 'Helvetica Neue', sans-serif; + min-width: 320px; + max-width: 520px; + } + h2 { + margin: 0 0 12px; + font-size: 16px; + font-weight: 700; + } + .mcp-ct-type { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + margin-bottom: 12px; + font-size: 13px; + } + .mcp-ct-type-label { + font-weight: 600; + } + .mcp-ct-field { + width: 100%; + } + .mcp-ct-api-row { + display: flex; + gap: 10px; + flex-wrap: wrap; + } + .mcp-ct-method { + width: 130px; + } + .mcp-ct-url { + flex: 1; + min-width: 180px; + } + .mcp-ct-actions { + display: flex; + justify-content: flex-end; + gap: 8px; + margin-top: 4px; + } + `, + ], +}) +export class DfMcpCustomToolDialogComponent implements OnInit { + readonly methods = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE']; + form!: FormGroup; + private takenNames = new Set(); + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: McpCustomToolDialogData, + private fb: FormBuilder + ) {} + + ngOnInit(): void { + const t = this.data.tool; + this.takenNames = emittedNameSet(this.data.store, t?.name); + this.form = this.fb.group({ + toolType: [t?.toolType || 'api'], + name: [ + t?.name ?? '', + [ + Validators.required, + Validators.pattern(/^[a-zA-Z0-9_]+$/), + (c: AbstractControl): ValidationErrors | null => + this.takenNames.has(c.value) ? { collision: true } : null, + ], + ], + description: [t?.description ?? ''], + httpMethod: [t?.httpMethod || 'GET'], + url: [t?.url ?? ''], + parameters: [this.toJsonText(t?.parameters)], + headers: [this.toJsonText(t?.headers)], + functionCode: [t?.function ?? ''], + }); + } + + private toJsonText(v: any): string { + if (v === null || v === undefined || v === '') return ''; + if (typeof v === 'string') return v; + try { + return JSON.stringify(v, null, 2); + } catch { + return ''; + } + } + + /** '' → null; valid JSON → parsed value; invalid → undefined (error). */ + private parseJson(text: string): any { + const trimmed = (text ?? '').trim(); + if (!trimmed) return null; + try { + return JSON.parse(trimmed); + } catch { + return undefined; + } + } + + save(): void { + const v = this.form.value; + const isApi = v.toolType === 'api'; + + // Conditional requirements the static validators can't express. + this.form.controls['url'].setErrors( + isApi && !(v.url ?? '').trim() ? { required: true } : null + ); + this.form.controls['functionCode'].setErrors( + !isApi && !(v.functionCode ?? '').trim() ? { required: true } : null + ); + + let params: any = null; + let headers: any = null; + if (isApi) { + params = this.parseJson(v.parameters); + headers = this.parseJson(v.headers); + this.form.controls['parameters'].setErrors( + params === undefined ? { json: true } : null + ); + this.form.controls['headers'].setErrors( + headers === undefined ? { json: true } : null + ); + } + + this.form.markAllAsTouched(); + if (this.form.invalid) return; + + const original = this.data.tool ?? {}; + this.dialogRef.close({ + // Preserve id and storage/scm fields the dialog does not surface. + ...original, + toolType: v.toolType, + name: v.name, + description: v.description ?? '', + httpMethod: isApi ? v.httpMethod : original.httpMethod ?? 'GET', + url: isApi ? v.url : original.url ?? '', + parameters: isApi ? params : original.parameters ?? null, + headers: isApi ? headers : original.headers ?? null, + function: isApi ? original.function ?? '' : v.functionCode, + enabled: original.enabled !== false && original.enabled !== 0, + }); + } +} diff --git a/src/app/adf-mcp/df-mcp-tools/df-mcp-remove-dialog.component.ts b/src/app/adf-mcp/df-mcp-tools/df-mcp-remove-dialog.component.ts new file mode 100644 index 00000000..d343dbc7 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-tools/df-mcp-remove-dialog.component.ts @@ -0,0 +1,104 @@ +/** + * Remove-from-server confirm (§3.8 rule 2): a default-safe radio choice — + * "Keep its tool curation (recommended)" (default) vs "Also clear its saved + * tool settings". Used for single rows, orphaned entries and bulk removal. + * Returns { clear: boolean } or undefined on cancel. + */ +import { CommonModule } from '@angular/common'; +import { Component, Inject } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, + MatDialogModule, + MatDialogRef, +} from '@angular/material/dialog'; +import { MatRadioModule } from '@angular/material/radio'; + +export interface McpRemoveDialogData { + names: string[]; + /** True when the entry no longer matches a live service. */ + orphan?: boolean; +} + +export interface McpRemoveDialogResult { + clear: boolean; +} + +@Component({ + selector: 'df-mcp-remove-dialog', + standalone: true, + imports: [CommonModule, FormsModule, MatButtonModule, MatDialogModule, MatRadioModule], + template: ` +
+

{{ title }}

+ + + {{ data.names.length === 1 ? 'Keep its tool curation (recommended)' : 'Keep their tool curation (recommended)' }} + + + {{ data.names.length === 1 ? 'Also clear its saved tool settings' : 'Also clear their saved tool settings' }} + + +

+ Kept curation restores automatically if you expose + {{ data.names.length === 1 ? 'the service' : 'a service' }} again. +

+
+ + +
+
+ `, + styles: [ + ` + .mcp-remove-dialog { + padding: 18px 20px 14px; + font-family: Inter, 'Helvetica Neue', sans-serif; + max-width: 420px; + } + h2 { + margin: 0 0 10px; + font-size: 16px; + font-weight: 700; + } + .mcp-remove-choices { + display: flex; + flex-direction: column; + gap: 2px; + } + .mcp-remove-note { + font-size: 12.5px; + opacity: 0.7; + margin: 8px 0 0; + } + .mcp-remove-actions { + display: flex; + justify-content: flex-end; + gap: 8px; + margin-top: 14px; + } + `, + ], +}) +export class DfMcpRemoveDialogComponent { + clear = false; + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: McpRemoveDialogData + ) {} + + get title(): string { + return this.data.names.length === 1 + ? `Remove ${this.data.names[0]} from this server?` + : `Remove ${this.data.names.length} services from this server?`; + } +} diff --git a/src/app/adf-mcp/df-mcp-tools/df-mcp-rename-dialog.component.ts b/src/app/adf-mcp/df-mcp-tools/df-mcp-rename-dialog.component.ts new file mode 100644 index 00000000..e2c6cef6 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-tools/df-mcp-rename-dialog.component.ts @@ -0,0 +1,125 @@ +/** + * "It was renamed…" successor picker (§7): repoints an orphaned + * exposed_services entry at a live service and previews the disabled_tools + * key rewrite before confirming. Returns the chosen successor name; the + * caller performs store.renameExposedEntry(). + */ +import { CommonModule } from '@angular/common'; +import { Component, Inject } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { MatButtonModule } from '@angular/material/button'; +import { + MAT_DIALOG_DATA, + MatDialogModule, + MatDialogRef, +} from '@angular/material/dialog'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatSelectModule } from '@angular/material/select'; +import { McpBackendService } from '../mcp-effective'; +import { McpEditorStore } from '../mcp-store'; + +export interface McpRenameDialogData { + store: McpEditorStore; + oldName: string; +} + +@Component({ + selector: 'df-mcp-rename-dialog', + standalone: true, + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatDialogModule, + MatFormFieldModule, + MatSelectModule, + ], + template: ` +
+

Point this entry at its renamed service

+

+ “{{ data.oldName }}” no longer exists on this instance. Pick the + service it was renamed to. +

+ + Renamed to + + + {{ svc.label }} ({{ svc.name }}) + + + +

+ Point this entry at {{ newName }} and rename its {{ keyCount() }} saved + tool settings ({{ data.oldName }}_* → {{ newName }}_*)? +

+
+ + +
+
+ `, + styles: [ + ` + .mcp-rename-dialog { + padding: 18px 20px 14px; + font-family: Inter, 'Helvetica Neue', sans-serif; + max-width: 440px; + } + h2 { + margin: 0 0 8px; + font-size: 16px; + font-weight: 700; + } + .mcp-rename-intro { + font-size: 13px; + opacity: 0.8; + margin: 0 0 12px; + } + .mcp-rename-field { + width: 100%; + } + .mcp-rename-preview { + font-size: 13px; + background: #fdf3dc; + border: 1px solid rgba(154, 103, 0, 0.4); + border-radius: 8px; + padding: 8px 12px; + margin: 0 0 4px; + } + .mcp-rename-actions { + display: flex; + justify-content: flex-end; + gap: 8px; + margin-top: 12px; + } + `, + ], +}) +export class DfMcpRenameDialogComponent { + newName: string | undefined = undefined; + + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: McpRenameDialogData + ) {} + + /** Live services not already carried by another exposed entry. */ + candidates(): McpBackendService[] { + return this.data.store.backendServices.filter( + s => !this.data.store.cfg.exposedServices.includes(s.name) + ); + } + + keyCount(): number { + return this.data.store.dormantCurationCount(this.data.oldName); + } +} diff --git a/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.html b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.html new file mode 100644 index 00000000..82984e0b --- /dev/null +++ b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.html @@ -0,0 +1,472 @@ +
+
Loading services…
+ + +
+ ⚠ This server serves no tools. Agents can connect but can call nothing. +
+ +
+
+ + +
+

System API tools ({{ sysEnabledCount() }} of {{ sysTotal() }})

+
+
+
+
+ + {{ g.label }} ({{ g.tools.length }}) + + ⚠ writes + + {{ sysGroupOn(g) }} of {{ g.tools.length }} on + +
+ +
+
+ + {{ t.name }} + + {{ t.description }} +
+
+
+
+
+ + + + +
+

⚠ Needs attention ({{ orphanRows().length }})

+
+

{{ orphanText(row.name) }}

+
+ + +
+
+
+ +
+

+ Exposed services ({{ serviceRows().length }} of + {{ store.backendServices.length }}) +

+ +
+ + +
+

+ No services exposed. Agents get the {{ eff().globalTools }} global + tools and any custom tools — empty never means every service. +

+ +
+ + +
+ + + + +
+ + +
+
+
+ + + + Inactive — tools not served + + + + + + + + + {{ fractionText(row.svc) }} + + + + + + + + + + + + + + + + +
+ + +
+

+ {{ allOffLine }} +

+

+ {{ mergedCaption(row.svc) }} +

+
+ + {{ g.label }} ({{ groupOnCount(row.svc, g) }}/{{ g.verbs.length }}) + + ⚠ writes + ⚠ executes + + {{ groupOnCount(row.svc, g) }} of {{ g.verbs.length }} on + +
+ +
+ +
+ + {{ emittedName(row.svc, v.verb) }} + + {{ v.description }} +
+
+
+
+ + + + + + + + +
+
+
+ +

+ No exposed service matches the current filter. +

+
+ + +
+ {{ selected.size }} selected + + + + +
+ + +
+ +
+
+ + {{ entry.tool.verb }} + + Cross-database aggregators + {{ entry.tool.description }} +
+
+
+ + +
+
+ Custom tools ({{ customTools().length }}) + +
+
+
+ + {{ tool.name }} + {{ tool.toolType === 'function' ? 'Function' : 'API' }} + {{ customSummary(tool) }} + + + + +
+
+

+ No custom tools. Add an API endpoint or server-side function agents + can call alongside the catalog above. +

+
+
+
+ + + +
+
+
diff --git a/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.scss b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.scss new file mode 100644 index 00000000..9f545032 --- /dev/null +++ b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.scss @@ -0,0 +1,588 @@ +/* Tools tab: exposure + curation surface, peer sections, and the rail. */ +.mcp-tools { + font-family: Inter, 'Helvetica Neue', sans-serif; +} + +.mcp-tools-loading { + padding: 32px 0; + font-size: 13.5px; + opacity: 0.65; +} + +.mcp-tools-warnbanner { + background: #fdf3dc; + border: 1px solid rgba(154, 103, 0, 0.4); + color: #9a6700; + border-radius: 10px; + padding: 10px 14px; + font-size: 13px; + font-weight: 600; + margin-bottom: 14px; +} + +/* Two-column layout: content + sticky rail at ≥1120px; stacked below. */ +.mcp-tools-layout { + display: grid; + grid-template-columns: minmax(0, 1fr) 300px; + gap: 22px; + align-items: start; +} + +.mcp-tools-main { + min-width: 0; +} + +@media (max-width: 1119px) { + .mcp-tools-layout { + grid-template-columns: 1fr; + } +} + +/* Cards */ +.mcp-card { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 10px; + margin-bottom: 14px; +} + +.mcp-section-head { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + flex-wrap: wrap; + margin: 4px 0 10px; + + h2 { + font-size: 12px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + opacity: 0.75; + margin: 0; + } +} + +.mcp-empty { + padding: 18px 16px; + + p { + margin: 0 0 10px; + font-size: 13.5px; + } +} + +/* Needs attention */ +.mcp-orphans { + margin-bottom: 16px; + + .mcp-orphans-title { + font-size: 12px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + color: #9a6700; + margin: 0 0 8px; + } +} + +.mcp-orphan-row { + border-color: rgba(154, 103, 0, 0.4); + background: #fffbf1; + padding: 12px 16px; + + p { + margin: 0 0 10px; + font-size: 13.5px; + } + + .mcp-orphan-actions { + display: flex; + gap: 8px; + flex-wrap: wrap; + } +} + +/* Filter strip */ +.mcp-filter-strip { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + margin-bottom: 10px; + + .mcp-filter-input { + font: inherit; + font-size: 13px; + padding: 7px 12px; + border: 1px solid rgba(0, 0, 0, 0.18); + border-radius: 8px; + min-width: 200px; + flex: 1; + max-width: 320px; + + &:focus { + outline: 2px solid var(--df-accent, #5c5699); + outline-offset: -1px; + } + } +} + +/* Rows */ +.mcp-rows { + overflow: visible; +} + +.mcp-row { + border-top: 1px solid rgba(0, 0, 0, 0.06); + padding: 6px 12px; + + &:first-child { + border-top: none; + } + + &.inactive .mcp-row-head { + opacity: 0.55; + } +} + +.mcp-row-head { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; +} + +.mcp-row-main { + display: inline-flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + background: none; + border: none; + padding: 4px 0; + cursor: pointer; + font: inherit; + text-align: left; + min-width: 0; + + .mcp-row-icon { + font-size: 15px; + opacity: 0.7; + } + + .mcp-row-label { + font-weight: 600; + font-size: 13.5px; + } +} + +.mcp-type-badge { + opacity: 0.8; +} + +.mcp-fraction { + font-size: 13px; + font-variant-numeric: tabular-nums; + font-weight: 600; + white-space: nowrap; +} + +.mcp-access-chip { + cursor: pointer; +} + +/* Capability strip: full labels, initials below 1280px */ +.mcp-cap-strip { + display: inline-flex; + align-items: center; + gap: 5px; + font-size: 12px; + opacity: 0.85; + flex-wrap: wrap; + + .mcp-cap.off { + text-decoration: line-through; + opacity: 0.45; + } + + .mcp-cap-sep { + opacity: 0.4; + } + + .mcp-cap-init { + display: none; + } +} + +@media (max-width: 1279px) { + .mcp-cap-strip { + .mcp-cap-full { + display: none; + } + .mcp-cap-init { + display: inline; + font-weight: 600; + } + } +} + +.mcp-row-menu-btn { + font-size: 16px; + line-height: 1; +} + +.mcp-row-caret { + background: none; + border: none; + cursor: pointer; + font: inherit; + font-size: 13px; + opacity: 0.7; + padding: 4px 6px; + margin-left: auto; +} + +.mcp-menu-danger { + color: #b3261e; +} + +/* Drill-in */ +.mcp-drill { + padding: 4px 8px 10px 30px; + + .mcp-drill-alloff { + font-size: 13px; + font-weight: 600; + color: #9a6700; + background: #fdf3dc; + border: 1px solid rgba(154, 103, 0, 0.4); + border-radius: 8px; + padding: 7px 11px; + margin: 4px 0 8px; + } + + .mcp-drill-caption { + font-size: 12.5px; + opacity: 0.7; + margin: 4px 0 8px; + } +} + +.mcp-group-row { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + padding: 1px 0; + + .mcp-group-count { + font-size: 12px; + opacity: 0.6; + font-variant-numeric: tabular-nums; + } +} + +.mcp-warn-tag { + font-size: 11.5px; + font-weight: 700; + color: #9a6700; +} + +.mcp-linklike { + background: none; + border: none; + cursor: pointer; + font: inherit; + font-size: 13px; + font-weight: 600; + color: var(--df-accent, #5c5699); + padding: 6px 0 2px; + text-align: left; +} + +.mcp-tool-list { + padding: 2px 0 4px 8px; +} + +.mcp-tool-row { + display: flex; + align-items: baseline; + gap: 8px; + flex-wrap: wrap; + padding: 1px 0; + + code { + font-size: 12.5px; + } +} + +.mcp-tool-desc { + font-size: 12px; + opacity: 0.6; +} + +.mcp-drill-foot { + display: flex; + gap: 8px; + flex-wrap: wrap; + padding-top: 8px; +} + +.mcp-rows-nomatch { + padding: 14px 16px; + font-size: 13px; + opacity: 0.65; + margin: 0; +} + +/* Bulk bar */ +.mcp-bulk-bar { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + background: rgba(92, 86, 153, 0.08); + border: 1px solid rgba(92, 86, 153, 0.35); + border-radius: 10px; + padding: 8px 14px; + margin-bottom: 14px; + font-size: 13px; + font-weight: 600; +} + +/* Peer sections (Global / Custom) */ +.mcp-peer-section { + padding: 10px 14px; +} + +.mcp-peer-head { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + width: 100%; + background: none; + border: none; + padding: 2px 0; + font: inherit; + text-align: left; + + .mcp-peer-title { + font-weight: 700; + font-size: 13.5px; + } + + .mcp-peer-caption { + font-size: 12px; + opacity: 0.6; + } + + .mcp-fraction { + margin-left: auto; + } +} + +button.mcp-peer-head { + cursor: pointer; +} + +.mcp-custom-list { + margin-top: 6px; +} + +.mcp-custom-row { + display: flex; + align-items: center; + gap: 10px; + flex-wrap: wrap; + border-top: 1px solid rgba(0, 0, 0, 0.06); + padding: 5px 0; + + code { + font-size: 12.5px; + font-weight: 600; + } + + .mcp-custom-actions { + margin-left: auto; + display: inline-flex; + gap: 2px; + } +} + +.mcp-custom-empty { + margin: 8px 0 2px; +} + +/* System groups */ +.mcp-sys-group { + padding: 10px 14px; + border-top: 1px solid rgba(0, 0, 0, 0.06); + + &:first-child { + border-top: none; + } +} + +/* ─────────────────────────── The rail ─────────────────────────── */ +.mcp-rail { + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.08); + border-radius: 10px; + padding: 14px 16px; + position: sticky; + top: 12px; +} + +@media (max-width: 1119px) { + .mcp-rail { + position: static; + } +} + +.mcp-rail-title { + font-size: 11.5px; + font-weight: 700; + letter-spacing: 0.06em; + text-transform: uppercase; + opacity: 0.7; + margin: 0 0 6px; +} + +.mcp-rail-total { + font-size: 15px; + margin: 0 0 6px; + + b { + font-size: 22px; + font-variant-numeric: tabular-nums; + } +} + +.mcp-rail-breakdown { + list-style: none; + padding: 0; + margin: 0 0 12px; + font-size: 12.5px; + opacity: 0.85; + + li { + padding: 1px 0; + } +} + +.mcp-rail-ro { + display: flex; + align-items: center; + gap: 8px; + flex-wrap: wrap; + margin-bottom: 12px; + + .mcp-rail-note { + font-size: 12.5px; + } +} + +.mcp-rail-serving { + font-size: 12px; + opacity: 0.75; + background: rgba(0, 0, 0, 0.03); + border-radius: 8px; + padding: 8px 10px; + margin: 0 0 12px; +} + +.mcp-rail-previewas { + margin-bottom: 4px; + + .mcp-rail-role { + width: 100%; + } +} + +.mcp-rail-preview-btn { + width: 100%; + margin-bottom: 12px; +} + +.mcp-rail-reach { + margin-bottom: 8px; + + ul { + list-style: none; + padding: 2px 0 0 14px; + margin: 0; + font-size: 12px; + font-variant-numeric: tabular-nums; + + code { + font-size: 11.5px; + } + } +} + +.mcp-rail-roles { + font-size: 12.5px; + opacity: 0.8; + border-top: 1px solid rgba(0, 0, 0, 0.08); + padding-top: 10px; + margin: 8px 0 0; + + .mcp-info { + cursor: help; + } +} + +/* Chip primitive (copied from the shell — component styles don't cascade). */ +.mcp-chip { + display: inline-flex; + align-items: center; + gap: 5px; + padding: 2px 9px; + border-radius: 999px; + font-size: 12px; + font-weight: 600; + border: 1px solid rgba(0, 0, 0, 0.14); + background: rgba(0, 0, 0, 0.02); + white-space: nowrap; + + &.good { + background: #e7f2e8; + border-color: rgba(46, 125, 50, 0.35); + color: #2e7d32; + } + &.warn { + background: #fdf3dc; + border-color: rgba(154, 103, 0, 0.4); + color: #9a6700; + } + &.primary { + background: rgba(92, 86, 153, 0.1); + border-color: rgba(92, 86, 153, 0.38); + color: var(--df-accent, #5c5699); + } +} + +.mcp-chip-btn { + cursor: pointer; + font: inherit; + font-size: 12px; + font-weight: 600; +} + +/* Phone width: stack row internals, keep the 16px gutter breathing room. */ +@media (max-width: 700px) { + .mcp-row-head { + row-gap: 4px; + } + + .mcp-drill { + padding-left: 12px; + } + + .mcp-cap-strip { + display: none; + } +} diff --git a/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.spec.ts b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.spec.ts new file mode 100644 index 00000000..4e6b05fb --- /dev/null +++ b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.spec.ts @@ -0,0 +1,490 @@ +/** + * Tools tab component tests: rows render only for exposed services, the + * Needs-attention orphan group, fraction text, the system_mcp variant, and + * the picker's consequence simulation math (driven through the dialog + * component class directly). + */ +import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { SYSTEM_MCP_TOOLS } from 'src/app/adf-services/df-service-details/system-mcp-tools'; +import { McpBackendService, effectiveTools } from '../mcp-effective'; +import { McpEditorStore, McpServiceRecord } from '../mcp-store'; +import { + DfMcpPickerComponent, + simulateExposeTotal, +} from '../df-mcp-picker/df-mcp-picker.component'; +import { DfMcpToolsComponent } from './df-mcp-tools.component'; + +const svc = ( + name: string, + kind: 'db' | 'file' = 'db', + active = true +): McpBackendService => ({ name, label: name, kind, active }); + +function makeStore( + rawConfig: Record, + services: McpBackendService[], + type: 'mcp' | 'system_mcp' = 'mcp' +): McpEditorStore { + const store = new McpEditorStore(); + const record: McpServiceRecord = { + id: 1, + name: 'warehouse', + label: 'Warehouse', + description: '', + isActive: true, + type, + raw: {}, + }; + store.init(record, rawConfig); + store.backendServices = services; + store.backendLoaded = true; + return store; +} + +describe('DfMcpToolsComponent', () => { + let fixture: ComponentFixture; + let component: DfMcpToolsComponent; + + const snackbar = { openSnackBar: jest.fn() }; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [DfMcpToolsComponent, NoopAnimationsModule], + providers: [{ provide: DfSnackbarService, useValue: snackbar }], + }).compileComponents(); + }); + + function render(store: McpEditorStore): void { + fixture = TestBed.createComponent(DfMcpToolsComponent); + component = fixture.componentInstance; + component.store = store; + component.loading = false; + fixture.detectChanges(); + } + + function q(testid: string): HTMLElement | null { + return fixture.nativeElement.querySelector(`[data-testid="${testid}"]`); + } + + it('renders rows only for exposed services', () => { + const store = makeStore( + { exposed_services: ['crm', 's3'] }, + [svc('crm'), svc('hr'), svc('s3', 'file')] + ); + render(store); + expect(q('mcp-svc-row-crm')).toBeTruthy(); + expect(q('mcp-svc-row-s3')).toBeTruthy(); + expect(q('mcp-svc-row-hr')).toBeNull(); // not exposed → no row, no toggles + expect(q('mcp-expose-btn')).toBeTruthy(); + expect(q('mcp-rail')).toBeTruthy(); + }); + + it('renders the empty state when nothing is exposed', () => { + const store = makeStore({}, [svc('crm')]); + render(store); + expect(fixture.nativeElement.textContent).toContain( + 'empty never means every service' + ); + expect(q('mcp-svc-row-crm')).toBeNull(); + }); + + it('shows orphaned entries in the Needs-attention group', () => { + const store = makeStore( + { + exposed_services: ['crm', 'legacy_dw'], + disabled_tools: ['legacy_dw_create_records', 'legacy_dw_get_tables'], + }, + [svc('crm')] + ); + render(store); + const row = q('mcp-orphan-row-legacy_dw'); + expect(row).toBeTruthy(); + expect(row!.textContent).toContain( + "'legacy_dw' no longer exists on this instance (renamed or deleted)." + ); + expect(row!.textContent).toContain('Its 2 saved tool settings are kept.'); + // The orphan renders no ordinary service row. + expect(q('mcp-svc-row-legacy_dw')).toBeNull(); + }); + + it('shows the true fraction for a curated service', () => { + const store = makeStore( + { + exposed_services: ['crm'], + disabled_tools: [ + 'crm_create_records', + 'crm_update_records', + 'crm_delete_records', + 'crm_call_stored_procedure', + 'crm_call_stored_function', + ], + }, + [svc('crm')] + ); + render(store); + expect(q('mcp-svc-fraction-crm')!.textContent).toContain('11 of 16'); + expect(q('mcp-svc-access-crm')!.textContent).toContain('Custom ◐ 11 of 16'); + }); + + it('marks the inactive service and keeps it out of the rail total', () => { + const store = makeStore( + { exposed_services: ['crm', 'archive'] }, + [svc('crm'), svc('archive', 'db', false)] + ); + render(store); + expect(q('mcp-svc-row-archive')!.textContent).toContain( + 'Inactive — tools not served' + ); + // 1 active db → 16 db + 5 global, no aggregators. + expect(q('mcp-rail-total')!.textContent).toContain('21'); + }); + + it('rail reports the derived read-only state', () => { + const store = makeStore({ exposed_services: ['crm'] }, [svc('crm')]); + render(store); + expect(q('mcp-rail-readonly')!.textContent).toContain('write tools active'); + expect(q('mcp-make-readonly')).toBeTruthy(); + + jest.spyOn(window, 'confirm').mockReturnValue(true); + q('mcp-make-readonly')!.click(); + fixture.detectChanges(); + expect(store.effective().readOnly).toBe(true); + expect(q('mcp-rail-readonly')!.textContent).toContain('Read-only ✓'); + (window.confirm as jest.Mock).mockRestore(); + }); + + it('shows the filter strip and bulk checkboxes only above 8 exposed rows', () => { + const few = makeStore({ exposed_services: ['crm'] }, [svc('crm')]); + render(few); + expect(q('mcp-filter-input')).toBeNull(); + + const names = Array.from({ length: 9 }, (_, i) => `db${i}`); + const many = makeStore( + { exposed_services: names }, + names.map(n => svc(n)) + ); + render(many); + expect(q('mcp-filter-input')).toBeTruthy(); + expect(q('mcp-filter-modified')).toBeTruthy(); + + component.filterText = 'db3'; + fixture.detectChanges(); + expect(q('mcp-svc-row-db3')).toBeTruthy(); + expect(q('mcp-svc-row-db4')).toBeNull(); + + component.filterText = ''; + component.toggleSelected('db1'); + fixture.detectChanges(); + expect(q('mcp-bulk-bar')!.textContent).toContain('1 selected'); + }); + + it('renders the global section with aggregators only at 2+ databases', () => { + const one = makeStore({ exposed_services: ['crm'] }, [svc('crm'), svc('hr')]); + render(one); + expect(q('mcp-global-section')!.textContent).toContain('5 of 5'); + + const two = makeStore( + { exposed_services: ['crm', 'hr'] }, + [svc('crm'), svc('hr')] + ); + render(two); + expect(q('mcp-global-section')!.textContent).toContain('11 of 11'); + }); + + it('renders custom tools with enable toggles feeding the math', () => { + const store = makeStore( + { + exposed_services: [], + custom_tools: [ + { name: 'env_info', toolType: 'api', httpMethod: 'GET', url: 'https://x', enabled: true }, + ], + }, + [] + ); + render(store); + expect(q('mcp-custom-section')!.textContent).toContain('env_info'); + expect(q('mcp-custom-add')).toBeTruthy(); + expect(store.effective().customTools).toBe(1); + component.setCustomEnabled(store.cfg.customTools[0], false); + expect(store.effective().customTools).toBe(0); + expect(store.dirty()).toBe(true); + }); + + describe('system_mcp variant', () => { + it('renders the fixed catalog as Read/Modify groups without a picker', () => { + const store = makeStore({}, [], 'system_mcp'); + render(store); + expect(q('mcp-expose-btn')).toBeNull(); + expect(q('mcp-custom-section')).toBeNull(); + expect(fixture.nativeElement.textContent).toContain('Read system'); + expect(fixture.nativeElement.textContent).toContain('Modify system'); + expect(q('mcp-rail-total')!.textContent).toContain( + String(SYSTEM_MCP_TOOLS.length) + ); + // Read + modify partition the whole catalog. + expect( + component.systemGroups[0].tools.length + + component.systemGroups[1].tools.length + ).toBe(SYSTEM_MCP_TOOLS.length); + expect( + component.systemGroups[0].tools.every(t => + /^(get_|list_)/.test(t.name) + ) + ).toBe(true); + }); + + it('bare-name disables drive the rail count and read-only state', () => { + const store = makeStore( + { disabled_tools: SYSTEM_MCP_TOOLS.filter(t => !/^(get_|list_)/.test(t.name)).map(t => t.name) }, + [], + 'system_mcp' + ); + render(store); + expect(component.sysModifyOn()).toBe(0); + expect(q('mcp-rail-readonly')!.textContent).toContain('Read-only ✓'); + }); + }); +}); + +describe('DfMcpPickerComponent — consequence simulation', () => { + const dialogRef = { close: jest.fn() } as any; + + function picker(store: McpEditorStore): DfMcpPickerComponent { + return new DfMcpPickerComponent(dialogRef, { store }); + } + + it('lists only not-yet-exposed services', () => { + const store = makeStore( + { exposed_services: ['crm'] }, + [svc('crm'), svc('hr'), svc('s3', 'file')] + ); + const p = picker(store); + expect(p.candidates().map(s => s.name)).toEqual(['hr', 's3']); + expect(p.dbCandidates().map(s => s.name)).toEqual(['hr']); + expect(p.fileCandidates().map(s => s.name)).toEqual(['s3']); + }); + + it('computes the read-only consequence by simulation', () => { + const store = makeStore( + { exposed_services: ['crm'] }, + [svc('crm'), svc('hr')] + ); + const old = effectiveTools(store.cfg, store.backendServices).total; // 16+5 + const p = picker(store); + p.toggle('hr'); + // read-only hr: +9 read/schema verbs, aggregators unlock (+6). + const expected = old + 9 + 6; + expect(simulateExposeTotal(store, ['hr'], 'ro', false)).toBe(expected); + expect(p.consequenceText()).toBe( + `1 selected · read-only → server will serve ${expected} tools (was ${old})` + ); + // The dialog never mutates the store. + expect(store.cfg.exposedServices).toEqual(['crm']); + expect(store.cfg.disabledTools.size).toBe(0); + }); + + it('read & write serves the full verb set', () => { + const store = makeStore({ exposed_services: [] }, [svc('hr')]); + const p = picker(store); + p.toggle('hr'); + p.access = 'rw'; + p.accessTouched = true; + // 16 db + 5 global (single db → no aggregators). + expect(p.consequenceText()).toContain('server will serve 21 tools (was 5)'); + }); + + it('dormant curation is kept on the untouched default, overridden by an explicit choice', () => { + const raw = { + exposed_services: [], + disabled_tools: ['hr_get_tables', 'hr_get_table_data'], + }; + const store = makeStore(raw, [svc('hr')]); + // Untouched default → dormant curation re-applies: 14 + 5 globals. + expect(simulateExposeTotal(store, ['hr'], 'ro', false)).toBe(19); + // Explicit read-only overrides it: 9 read/schema + 5 globals. + expect(simulateExposeTotal(store, ['hr'], 'ro', true)).toBe(14); + // Explicit read & write overrides it the other way: 16 + 5. + expect(simulateExposeTotal(store, ['hr'], 'rw', true)).toBe(21); + }); + + it('confirm returns the selection without touching the store', () => { + const store = makeStore({}, [svc('hr')]); + const p = picker(store); + p.toggle('hr'); + p.confirm(); + expect(dialogRef.close).toHaveBeenCalledWith({ + names: ['hr'], + access: 'ro', + accessTouched: false, + }); + expect(store.cfg.exposedServices).toEqual([]); + }); +}); + +describe('dialog templates render', () => { + it('picker template renders groups, curation notes and the consequence line', async () => { + const { MatDialogRef, MAT_DIALOG_DATA } = await import('@angular/material/dialog'); + const store = makeStore( + { exposed_services: [], disabled_tools: ['hr_get_tables'] }, + [svc('crm'), svc('hr'), svc('s3', 'file')] + ); + await TestBed.configureTestingModule({ + imports: [DfMcpPickerComponent, NoopAnimationsModule], + providers: [ + { provide: MatDialogRef, useValue: { close: jest.fn() } }, + { provide: MAT_DIALOG_DATA, useValue: { store } }, + ], + }).compileComponents(); + const fixture = TestBed.createComponent(DfMcpPickerComponent); + fixture.detectChanges(); + const el: HTMLElement = fixture.nativeElement; + expect(el.querySelector('[data-testid="mcp-picker-dialog"]')).toBeTruthy(); + expect(el.querySelector('[data-testid="mcp-picker-search"]')).toBeTruthy(); + expect(el.querySelector('[data-testid="mcp-picker-access-ro"]')).toBeTruthy(); + expect(el.textContent).toContain('Databases (2)'); + expect(el.textContent).toContain('File storage (1)'); + expect(el.textContent).toContain('saved curation: 1 tools off'); + expect( + el.querySelector('[data-testid="mcp-picker-consequence"]')!.textContent + ).toContain('0 selected'); + const confirm = el.querySelector( + '[data-testid="mcp-picker-confirm"]' + ) as HTMLButtonElement; + expect(confirm.disabled).toBe(true); + }); + + it('preview template renders served groups and the named exclusions', async () => { + const { MatDialogRef, MAT_DIALOG_DATA } = await import('@angular/material/dialog'); + const { DfMcpPreviewComponent } = await import( + '../df-mcp-preview/df-mcp-preview.component' + ); + const store = makeStore( + { + exposed_services: ['crm', 'archive', 'legacy_dw'], + disabled_tools: [ + 'crm_create_records', + 'crm_update_records', + 'crm_delete_records', + ], + tool_style: 'merged', + }, + [svc('crm'), svc('hr'), svc('archive', 'db', false)] + ); + await TestBed.configureTestingModule({ + imports: [DfMcpPreviewComponent, NoopAnimationsModule], + providers: [ + { provide: MatDialogRef, useValue: { close: jest.fn() } }, + { provide: MAT_DIALOG_DATA, useValue: { store } }, + { provide: DfSnackbarService, useValue: { openSnackBar: jest.fn() } }, + ], + }).compileComponents(); + const fixture = TestBed.createComponent(DfMcpPreviewComponent); + fixture.detectChanges(); + const el: HTMLElement = fixture.nativeElement; + expect(el.querySelector('[data-testid="mcp-preview-drawer"]')).toBeTruthy(); + const excluded = el.querySelector('[data-testid="mcp-preview-excluded"]')!; + expect(excluded.textContent).toContain('not exposed'); // hr + expect(excluded.textContent).toContain('service inactive'); // archive + expect(excluded.textContent).toContain('no service with this name exists'); // legacy_dw + expect(excluded.textContent).toContain('turned off by you'); // crm write data + expect(excluded.textContent).toContain( + 'turned off in every exposed database' + ); // write verbs off everywhere (single active db) + expect(excluded.textContent).toContain( + 'served only with two or more databases' + ); // aggregators at 1 db + // Merged verbs carry the service enum line. + expect(el.textContent).toContain('service: crm (1 of 1)'); + // Footer math. + const total = store.effective().total; + expect(el.textContent).toContain(`${total} tools`); + }); + + it('remove, rename and custom-tool dialogs render and validate', async () => { + const { MatDialogRef, MAT_DIALOG_DATA } = await import('@angular/material/dialog'); + const { DfMcpRemoveDialogComponent } = await import('./df-mcp-remove-dialog.component'); + const { DfMcpRenameDialogComponent } = await import('./df-mcp-rename-dialog.component'); + const { DfMcpCustomToolDialogComponent, emittedNameSet } = await import( + './df-mcp-custom-tool-dialog.component' + ); + const store = makeStore( + { exposed_services: ['crm'], disabled_tools: ['legacy_dw_get_tables'] }, + [svc('crm'), svc('hr')] + ); + + // Remove dialog — default-safe keep-curation choice. + TestBed.configureTestingModule({ + imports: [DfMcpRemoveDialogComponent, NoopAnimationsModule], + providers: [ + { provide: MatDialogRef, useValue: { close: jest.fn() } }, + { provide: MAT_DIALOG_DATA, useValue: { names: ['crm'] } }, + ], + }); + const removeFx = TestBed.createComponent(DfMcpRemoveDialogComponent); + removeFx.detectChanges(); + expect(removeFx.nativeElement.textContent).toContain( + 'Remove crm from this server?' + ); + expect(removeFx.nativeElement.textContent).toContain( + 'Keep its tool curation (recommended)' + ); + expect(removeFx.componentInstance.clear).toBe(false); + TestBed.resetTestingModule(); + + // Rename dialog — successor list + key-rewrite preview. + TestBed.configureTestingModule({ + imports: [DfMcpRenameDialogComponent, NoopAnimationsModule], + providers: [ + { provide: MatDialogRef, useValue: { close: jest.fn() } }, + { provide: MAT_DIALOG_DATA, useValue: { store, oldName: 'legacy_dw' } }, + ], + }); + const renameFx = TestBed.createComponent(DfMcpRenameDialogComponent); + renameFx.detectChanges(); + expect(renameFx.componentInstance.candidates().map(s => s.name)).toEqual(['hr']); + renameFx.componentInstance.newName = 'hr'; + renameFx.detectChanges(); + expect(renameFx.nativeElement.textContent).toContain( + 'Point this entry at hr and rename its 1 saved tool settings (legacy_dw_* → hr_*)?' + ); + TestBed.resetTestingModule(); + + // Custom-tool dialog — collision + pattern validation. + // Exposed crm in prefixed style emits crm_get_tables; that name collides. + expect(emittedNameSet(store).has('crm_get_tables')).toBe(true); + const close = jest.fn(); + TestBed.configureTestingModule({ + imports: [DfMcpCustomToolDialogComponent, NoopAnimationsModule], + providers: [ + { provide: MatDialogRef, useValue: { close } }, + { provide: MAT_DIALOG_DATA, useValue: { store } }, + ], + }); + const ctFx = TestBed.createComponent(DfMcpCustomToolDialogComponent); + ctFx.detectChanges(); + const ct = ctFx.componentInstance; + ct.form.patchValue({ name: 'crm_get_tables', url: 'https://x' }); + ct.save(); + expect(ct.form.controls['name'].hasError('collision')).toBe(true); + expect(close).not.toHaveBeenCalled(); + ct.form.patchValue({ name: 'bad name!' }); + ct.save(); + expect(ct.form.controls['name'].hasError('pattern')).toBe(true); + ct.form.patchValue({ name: 'env_info', parameters: '{not json' }); + ct.save(); + expect(ct.form.controls['parameters'].hasError('json')).toBe(true); + ct.form.patchValue({ parameters: '{"a": 1}' }); + ct.save(); + expect(close).toHaveBeenCalledWith( + expect.objectContaining({ + name: 'env_info', + toolType: 'api', + url: 'https://x', + parameters: { a: 1 }, + enabled: true, + }) + ); + }); +}); diff --git a/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.ts b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.ts index e0c8d4ff..c46792a6 100644 --- a/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.ts +++ b/src/app/adf-mcp/df-mcp-tools/df-mcp-tools.component.ts @@ -1,25 +1,647 @@ /** - * Tools tab: the single exposure + curation surface (exposed-service rows - * with capability-group drill-ins), Global tools, Custom tools, the - * "What an agent gets" rail, the Expose-services picker and the - * "What an agent sees" preview drawer. - * STUB — full implementation lands in the tab build phase. The selector, - * class name and inputs are the frozen contract with the shell. + * Tools tab: the single exposure + curation surface (§3) — exposed-service + * rows with capability-group drill-ins, the Needs-attention group for + * orphaned entries, Global tools, Custom tools, the "What an agent gets" + * rail, the Expose-services picker and the "What an agent sees" preview + * drawer. For `system_mcp` it renders the fixed System API catalog as two + * capability groups with the same tri-states, fractions, rail and preview. + * + * All counts and derivations funnel through McpEditorStore / mcp-effective; + * mutations go through store methods + touch(). The shell owns Save. */ import { CommonModule } from '@angular/common'; import { Component, Input } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; +import { MatCheckboxModule } from '@angular/material/checkbox'; +import { MatDialog, MatDialogModule } from '@angular/material/dialog'; +import { MatFormFieldModule } from '@angular/material/form-field'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatSelectModule } from '@angular/material/select'; +import { MatSlideToggleModule } from '@angular/material/slide-toggle'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { DfSnackbarService } from 'src/app/shared/services/df-snackbar.service'; +import { + SYSTEM_MCP_TOOLS, + SystemMcpTool, +} from 'src/app/adf-services/df-service-details/system-mcp-tools'; +import { FormsModule } from '@angular/forms'; +import { + AGGREGATOR_TOOLS, + GLOBAL_TOOLS, + McpServiceKind, + McpToolDef, + McpVerbGroup, + verbGroupsFor, + verbsFor, +} from '../mcp-catalog'; +import { + EffectiveBreakdown, + ExposedRow, + GroupState, + McpBackendService, + emittedDbToolName, + groupState, + toolKey, + verbReach, +} from '../mcp-effective'; import { McpEditorStore } from '../mcp-store'; +import { + DfMcpPickerComponent, + McpPickerResult, + applyPickerResult, +} from '../df-mcp-picker/df-mcp-picker.component'; +import { DfMcpPreviewComponent } from '../df-mcp-preview/df-mcp-preview.component'; +import { + DfMcpCustomToolDialogComponent, +} from './df-mcp-custom-tool-dialog.component'; +import { + DfMcpRemoveDialogComponent, + McpRemoveDialogResult, +} from './df-mcp-remove-dialog.component'; +import { DfMcpRenameDialogComponent } from './df-mcp-rename-dialog.component'; + +interface SystemGroup { + key: 'sysread' | 'sysmod'; + label: string; + warn: boolean; + tools: SystemMcpTool[]; +} + +/** + * Read/modify split for the System API catalog: every tool whose name starts + * with get_ or list_ only inspects state (list_services … get_access_audit). + * Everything else — create_/update_/delete_ verbs and call_system_api, which + * can invoke any system endpoint including writes — modifies the instance. + */ +function isSystemReadTool(t: SystemMcpTool): boolean { + return /^(get_|list_)/.test(t.name); +} + +export const PRECEDENCE_POPOVER = + '1. Exposed services contribute their tools. 2. Minus tools you turn off. ' + + '3. Roles filter further per caller at runtime.'; @Component({ selector: 'df-mcp-tools', standalone: true, - imports: [CommonModule, MatButtonModule], - template: `
- Tools tab — implementation pending. -
`, + imports: [ + CommonModule, + FormsModule, + MatButtonModule, + MatCheckboxModule, + MatDialogModule, + MatFormFieldModule, + MatMenuModule, + MatSelectModule, + MatSlideToggleModule, + MatTooltipModule, + ], + templateUrl: './df-mcp-tools.component.html', + styleUrls: ['./df-mcp-tools.component.scss'], }) export class DfMcpToolsComponent { @Input({ required: true }) store!: McpEditorStore; @Input() loading = false; + + readonly precedenceTooltip = PRECEDENCE_POPOVER; + readonly allOffLine = + 'Agents see this service but can call nothing. Enable tools or remove it.'; + + /** Expanded drill-ins, level-2 individual-tools disclosures, by name. */ + expanded = new Set(); + toolsListOpen = new Set(); + globalsOpen = false; + customsOpen = true; + railReachOpen = false; + + /** Filter strip + bulk selection (appear above ~8 exposed rows). */ + filterText = ''; + filterKind: 'all' | 'db' | 'file' = 'all'; + filterModified = false; + selected = new Set(); + + readonly systemGroups: SystemGroup[] = [ + { + key: 'sysread', + label: 'Read system', + warn: false, + tools: SYSTEM_MCP_TOOLS.filter(isSystemReadTool), + }, + { + key: 'sysmod', + label: 'Modify system', + warn: true, + tools: SYSTEM_MCP_TOOLS.filter(t => !isSystemReadTool(t)), + }, + ]; + + constructor( + private dialog: MatDialog, + private snackbar: DfSnackbarService + ) {} + + /* ------------------------------ shared ------------------------------ */ + eff(): EffectiveBreakdown { + return this.store.effective(); + } + + railTotal(): number { + return this.store.isSystemMcp ? this.sysEnabledCount() : this.eff().total; + } + + railReadOnly(): boolean { + return this.store.isSystemMcp ? this.sysModifyOn() === 0 : this.eff().readOnly; + } + + railWriteActive(): number { + return this.store.isSystemMcp ? this.sysModifyOn() : this.eff().writeVerbs; + } + + /* ------------------------------- rows ------------------------------- */ + serviceRows(): Array<{ name: string; svc: McpBackendService }> { + return this.store + .rows() + .filter((r): r is { name: string; svc: McpBackendService } => !!r.svc); + } + + orphanRows(): ExposedRow[] { + return this.store.rows().filter(r => !r.svc); + } + + showFilter(): boolean { + return this.serviceRows().length > 8; + } + + rowCountOf(kind: McpServiceKind): number { + return this.serviceRows().filter(r => r.svc.kind === kind).length; + } + + isModified(name: string): boolean { + return this.store.dormantCurationCount(name) > 0; + } + + visibleRows(): Array<{ name: string; svc: McpBackendService }> { + let rows = this.serviceRows(); + if (!this.showFilter()) return rows; + const q = this.filterText.trim().toLowerCase(); + if (q) { + rows = rows.filter( + r => + r.name.toLowerCase().includes(q) || + r.svc.label.toLowerCase().includes(q) + ); + } + if (this.filterKind !== 'all') { + rows = rows.filter(r => r.svc.kind === this.filterKind); + } + if (this.filterModified) { + rows = rows.filter(r => this.isModified(r.name)); + } + return rows; + } + + setFilterKind(kind: 'db' | 'file'): void { + this.filterKind = this.filterKind === kind ? 'all' : kind; + } + + typeIcon(kind: McpServiceKind): string { + return kind === 'db' ? '⛁' : '🗂'; + } + + typeBadge(kind: McpServiceKind): string { + return kind === 'db' ? 'Database' : 'Files'; + } + + isExpanded(name: string): boolean { + return this.expanded.has(name); + } + + toggleExpand(name: string): void { + this.expanded.has(name) + ? this.expanded.delete(name) + : this.expanded.add(name); + } + + isToolsListOpen(name: string): boolean { + return this.toolsListOpen.has(name); + } + + toggleToolsList(name: string): void { + this.toolsListOpen.has(name) + ? this.toolsListOpen.delete(name) + : this.toolsListOpen.add(name); + } + + /* --------------------------- access chip --------------------------- */ + accessKind(svc: McpBackendService): string { + return this.store.access(svc).kind; + } + + accessDisplay(svc: McpBackendService): string { + const a = this.store.access(svc); + const f = this.store.fraction(svc); + switch (a.kind) { + case 'full': + return 'Full'; + case 'ro': + return 'Read-only'; + case 'zero': + return `0 of ${f.total} ⚠`; + default: + return `Custom ◐ ${f.on} of ${f.total}`; + } + } + + fractionText(svc: McpBackendService): string { + const f = this.store.fraction(svc); + return `${f.on} of ${f.total}`; + } + + setFull(svc: McpBackendService): void { + this.store.setServiceFull(svc); + } + + setReadOnly(svc: McpBackendService): void { + this.store.setServiceReadOnly(svc); + } + + /* ---------------------------- drill-ins ---------------------------- */ + groupsFor(svc: McpBackendService): readonly McpVerbGroup[] { + return verbGroupsFor(svc.kind); + } + + groupStateOf(svc: McpBackendService, g: McpVerbGroup): GroupState { + return groupState(svc, g, this.store.cfg.disabledTools); + } + + groupOnCount(svc: McpBackendService, g: McpVerbGroup): number { + return g.verbs.filter(v => this.store.isToolEnabled(svc.name, v.verb)) + .length; + } + + toggleGroup(svc: McpBackendService, g: McpVerbGroup): void { + const enable = this.groupStateOf(svc, g) !== 'on'; + for (const v of g.verbs) this.store.setTool(svc.name, v.verb, enable); + } + + toolEnabled(svc: McpBackendService, verb: string): boolean { + return this.store.isToolEnabled(svc.name, verb); + } + + setToolChecked(svc: McpBackendService, verb: string, checked: boolean): void { + this.store.setTool(svc.name, verb, checked); + } + + emittedName(svc: McpBackendService, verb: string): string { + const style = + svc.kind === 'db' ? this.eff().effectiveStyle : 'prefixed'; + return emittedDbToolName(style, svc.name, verb); + } + + verbCount(svc: McpBackendService): number { + return verbsFor(svc.kind).length; + } + + mergedCaption(svc: McpBackendService): string { + return ( + 'Tools are shared across your databases. Turning one off here removes ' + + `${svc.name} from that tool's allowed services; turning it off in ` + + 'every database removes the tool.' + ); + } + + showMergedCaption(svc: McpBackendService): boolean { + return svc.kind === 'db' && this.store.cfg.toolStyle === 'merged'; + } + + /** Other exposed databases a db curation pattern can be copied to. */ + copyTargets(svc: McpBackendService): McpBackendService[] { + return this.serviceRows() + .map(r => r.svc) + .filter(s => s.kind === 'db' && s.name !== svc.name); + } + + /** Copy this service's disabled-verb pattern to a target (null = all). */ + copySelectionTo(source: McpBackendService, target: McpBackendService | null): void { + const targets = target ? [target] : this.copyTargets(source); + if (targets.length === 0) return; + for (const t of targets) { + for (const v of verbsFor('db')) { + this.store.setTool(t.name, v.verb, this.store.isToolEnabled(source.name, v.verb)); + } + } + const label = target ? target.name : 'all exposed databases'; + this.snackbar.openSnackBar( + `Copied ${source.name}'s tool selection to ${label}.`, + 'success' + ); + } + + /* ------------------------------ remove ------------------------------ */ + removeServices(names: string[], orphan = false): void { + if (names.length === 0) return; + this.dialog + .open(DfMcpRemoveDialogComponent, { + data: { names, orphan }, + maxWidth: '95vw', + }) + .afterClosed() + .subscribe((res: McpRemoveDialogResult | undefined) => { + if (!res) return; + for (const n of names) this.store.removeService(n, res.clear); + names.forEach(n => this.selected.delete(n)); + const what = names.length === 1 ? names[0] : `${names.length} services`; + this.snackbar.openSnackBar( + res.clear + ? `Removed ${what} and cleared the saved tool settings.` + : `Removed ${what} — the tool selection is kept and restores if you expose it again.`, + 'success' + ); + }); + } + + /* ------------------------------ orphans ----------------------------- */ + orphanText(name: string): string { + return ( + `'${name}' no longer exists on this instance (renamed or deleted). ` + + `Its ${this.store.dormantCurationCount(name)} saved tool settings are kept.` + ); + } + + renameOrphan(name: string): void { + this.dialog + .open(DfMcpRenameDialogComponent, { + data: { store: this.store, oldName: name }, + maxWidth: '95vw', + }) + .afterClosed() + .subscribe((newName: string | undefined) => { + if (!newName) return; + this.store.renameExposedEntry(name, newName); + this.snackbar.openSnackBar( + `Pointed the entry at ${newName} and renamed its saved tool settings.`, + 'success' + ); + }); + } + + /* ------------------------------ picker ------------------------------ */ + openPicker(): void { + this.dialog + .open(DfMcpPickerComponent, { + data: { store: this.store }, + width: '680px', + maxWidth: '95vw', + }) + .afterClosed() + .subscribe((res: McpPickerResult | undefined) => { + if (!res || res.names.length === 0) return; + applyPickerResult(this.store, res); + this.snackbar.openSnackBar( + `Exposed ${res.names.length} ${res.names.length === 1 ? 'service' : 'services'}.`, + 'success' + ); + }); + } + + /* ------------------------------- bulk ------------------------------- */ + isSelected(name: string): boolean { + return this.selected.has(name); + } + + toggleSelected(name: string): void { + this.selected.has(name) + ? this.selected.delete(name) + : this.selected.add(name); + } + + private selectedServices(): McpBackendService[] { + return this.serviceRows() + .filter(r => this.selected.has(r.name)) + .map(r => r.svc); + } + + bulkReadOnly(): void { + this.selectedServices().forEach(s => this.store.setServiceReadOnly(s)); + } + + bulkFull(): void { + this.selectedServices().forEach(s => this.store.setServiceFull(s)); + } + + bulkRemove(): void { + this.removeServices([...this.selected]); + } + + clearSelection(): void { + this.selected.clear(); + } + + /* --------------------------- global tools --------------------------- */ + aggregatorsShown(): boolean { + return this.eff().dbServices >= 2; + } + + globalToolList(): Array<{ tool: McpToolDef; aggregator: boolean }> { + const out = GLOBAL_TOOLS.map(tool => ({ tool, aggregator: false })); + if (this.aggregatorsShown()) { + for (const tool of AGGREGATOR_TOOLS) out.push({ tool, aggregator: true }); + } + return out; + } + + globalFractionText(): string { + const list = this.globalToolList(); + const on = list.filter(e => this.store.isBareToolEnabled(e.tool.verb)).length; + return `${on} of ${list.length}`; + } + + bareEnabled(verb: string): boolean { + return this.store.isBareToolEnabled(verb); + } + + setBareChecked(verb: string, checked: boolean): void { + this.store.setBareTool(verb, checked); + } + + /* --------------------------- custom tools --------------------------- */ + customTools(): any[] { + return this.store.cfg.customTools ?? []; + } + + customEnabled(tool: any): boolean { + return tool?.enabled !== false && tool?.enabled !== 0; + } + + setCustomEnabled(tool: any, enabled: boolean): void { + tool.enabled = enabled; + this.store.touch(); + } + + customSummary(tool: any): string { + if (tool?.toolType === 'function') { + return tool?.description || 'Server-side function'; + } + return `${tool?.httpMethod || 'GET'} ${tool?.url || ''}`.trim(); + } + + addCustomTool(): void { + this.dialog + .open(DfMcpCustomToolDialogComponent, { + data: { store: this.store }, + width: '560px', + maxWidth: '95vw', + }) + .afterClosed() + .subscribe(tool => { + if (!tool) return; + // New tools carry no id; the daemon assigns one on save. + this.store.cfg.customTools = [...this.customTools(), tool]; + this.store.touch(); + }); + } + + editCustomTool(tool: any): void { + this.dialog + .open(DfMcpCustomToolDialogComponent, { + data: { store: this.store, tool }, + width: '560px', + maxWidth: '95vw', + }) + .afterClosed() + .subscribe(updated => { + if (!updated) return; + const i = this.customTools().indexOf(tool); + if (i >= 0) { + this.store.cfg.customTools = [ + ...this.customTools().slice(0, i), + updated, + ...this.customTools().slice(i + 1), + ]; + this.store.touch(); + } + }); + } + + deleteCustomTool(tool: any): void { + const ok = window.confirm(`Delete custom tool "${tool?.name}"?`); + if (!ok) return; + this.store.cfg.customTools = this.customTools().filter(t => t !== tool); + this.store.touch(); + } + + /* -------------------------------- rail ------------------------------- */ + railBreakdown(): string[] { + if (this.store.isSystemMcp) { + const read = this.sysGroupOn(this.systemGroups[0]); + const mod = this.sysGroupOn(this.systemGroups[1]); + return [`${read} read system`, `${mod} modify system`]; + } + const e = this.eff(); + const out: string[] = []; + if (e.dbServices > 0) { + const shared = e.effectiveStyle === 'merged' ? 'shared set — ' : ''; + out.push( + `${e.dbTools} database (${shared}write reaches ${e.writeReachDb} of ` + + `${e.dbServices} ${e.dbServices === 1 ? 'database' : 'databases'})` + ); + } + if (e.fileServices > 0) { + out.push( + `${e.fileTools} file (${e.fileServices} ${e.fileServices === 1 ? 'service' : 'services'})` + ); + } + out.push(`${e.globalTools} global`); + if (e.aggregators > 0) { + out.push(`${e.aggregators} cross-database aggregators`); + } + if (e.customTools > 0) out.push(`${e.customTools} custom`); + return out; + } + + servingLine(): string | null { + if (this.store.isSystemMcp) return null; + const e = this.eff(); + if (!e.lazyEngaged) return null; + return this.store.cfg.lazyMode === 'auto' + ? 'Delivered on demand (auto): the catalog exceeds ~8k tokens, so clients first see 4 discovery tools.' + : 'Delivered on demand (always): clients first see 4 discovery tools.'; + } + + makeReadOnly(): void { + if (this.store.isSystemMcp) { + const mod = this.systemGroups[1].tools.filter(t => + this.store.isBareToolEnabled(t.name) + ); + const ok = window.confirm( + `Turn off all ${mod.length} write and execute tools? You can undo until you save.` + ); + if (!ok) return; + mod.forEach(t => this.store.setBareTool(t.name, false)); + return; + } + const e = this.eff(); + const ok = window.confirm( + `Turn off all ${e.writeVerbs} write and execute tools across ` + + `${e.writeReach} ${e.writeReach === 1 ? 'service' : 'services'}? ` + + 'You can undo until you save.' + ); + if (!ok) return; + this.store.makeReadOnly(); + } + + showReach(): boolean { + return ( + !this.store.isSystemMcp && + this.eff().effectiveStyle === 'merged' && + this.eff().dbServices > 0 + ); + } + + reachList(): Array<{ verb: string; on: number; total: number }> { + return verbsFor('db').map(v => { + const r = verbReach(v.verb, this.store.cfg, this.store.backendServices); + return { verb: v.verb, on: r.on.length, total: r.total }; + }); + } + + openPreview(): void { + this.dialog.open(DfMcpPreviewComponent, { + data: { store: this.store }, + position: { top: '0', right: '0' }, + height: '100vh', + width: '560px', + maxWidth: '95vw', + panelClass: 'mcp-preview-pane', + }); + } + + /* ----------------------------- system_mcp ---------------------------- */ + sysEnabledCount(): number { + return SYSTEM_MCP_TOOLS.filter(t => this.store.isBareToolEnabled(t.name)) + .length; + } + + sysTotal(): number { + return SYSTEM_MCP_TOOLS.length; + } + + sysGroupOn(g: SystemGroup): number { + return g.tools.filter(t => this.store.isBareToolEnabled(t.name)).length; + } + + sysGroupState(g: SystemGroup): GroupState { + const on = this.sysGroupOn(g); + if (on === 0) return 'off'; + return on === g.tools.length ? 'on' : 'part'; + } + + sysToggleGroup(g: SystemGroup): void { + const enable = this.sysGroupState(g) !== 'on'; + g.tools.forEach(t => this.store.setBareTool(t.name, enable)); + } + + sysModifyOn(): number { + return this.sysGroupOn(this.systemGroups[1]); + } } diff --git a/src/app/adf-mcp/mcp-effective.spec.ts b/src/app/adf-mcp/mcp-effective.spec.ts new file mode 100644 index 00000000..83e3ed60 --- /dev/null +++ b/src/app/adf-mcp/mcp-effective.spec.ts @@ -0,0 +1,400 @@ +/** + * Exhaustive unit tests for the pure MCP model + math module. Every number + * the Tools tab displays derives from these functions, so this spec is the + * contract for the count formulas in Appendix A of the design spec. + */ +import { + AGGREGATOR_TOOLS, + GLOBAL_TOOLS, + TOKENS_PER_TOOL, + verbsFor, +} from './mcp-catalog'; +import { + McpBackendService, + accessState, + allKeys, + effectiveTools, + emittedDbToolName, + exposedRows, + groupState, + orphanedKeys, + parseMcpConfig, + readOnlyKeys, + serializeMcpConfig, + serviceFraction, + toolKey, + verbReach, +} from './mcp-effective'; + +const svc = ( + name: string, + kind: 'db' | 'file' = 'db', + active = true +): McpBackendService => ({ name, label: name, kind, active }); + +const DB_VERBS = verbsFor('db').map(v => v.verb); +const FILE_VERBS = verbsFor('file').map(v => v.verb); +const WRITE_DB_VERBS = [ + 'create_records', + 'update_records', + 'delete_records', + 'get_stored_procedures', + 'call_stored_procedure', + 'get_stored_functions', + 'call_stored_function', +]; +const READ_DB_VERBS = DB_VERBS.filter(v => !WRITE_DB_VERBS.includes(v)); + +function cfgWith(over: Partial> = {}) { + return { ...parseMcpConfig({}), ...over }; +} + +describe('parseMcpConfig / serializeMcpConfig', () => { + it('parses a snake_case (API) blob', () => { + const c = parseMcpConfig({ + exposed_services: ['crm', 'hr'], + disabled_tools: ['crm_create_records'], + tool_style: 'merged', + lazy_mode: 'always', + allow_api_key_auth: true, + oauth_client_id: 'id', + oauth_client_secret: 'sec', + custom_login_url: 'https://x', + auto_oauth_service: 'okta', + redirect_uris: ['https://claude.ai/api/mcp/auth_callback'], + custom_tools: [{ name: 'env_info', enabled: true }], + scope_tools: true, + }); + expect(c.exposedServices).toEqual(['crm', 'hr']); + expect(c.disabledTools.has('crm_create_records')).toBe(true); + expect(c.toolStyle).toBe('merged'); + expect(c.lazyMode).toBe('always'); + expect(c.allowApiKeyAuth).toBe(true); + expect(c.oauthClientId).toBe('id'); + expect(c.oauthClientSecret).toBe('sec'); + expect(c.customLoginUrl).toBe('https://x'); + expect(c.autoOauthService).toBe('okta'); + expect(c.redirectUris).toEqual(['https://claude.ai/api/mcp/auth_callback']); + expect(c.customTools).toHaveLength(1); + // Unknown keys survive in rest so saves never drop columns. + expect(c.rest['scope_tools']).toBe(true); + }); + + it('parses a camelCase (legacy resolver) blob identically', () => { + const c = parseMcpConfig({ + exposedServices: ['crm'], + disabledTools: ['crm_delete_records'], + toolStyle: 'prefixed', + lazyMode: 'auto', + allowApiKeyAuth: false, + }); + expect(c.exposedServices).toEqual(['crm']); + expect(c.disabledTools.has('crm_delete_records')).toBe(true); + expect(c.toolStyle).toBe('prefixed'); + }); + + it('normalizes null/absent fields', () => { + const c = parseMcpConfig(null); + expect(c.exposedServices).toEqual([]); + expect(c.disabledTools.size).toBe(0); + expect(c.toolStyle).toBeNull(); + expect(c.lazyMode).toBe('auto'); + expect(c.allowApiKeyAuth).toBe(false); + // Legacy/unknown tool_style values render as null (server default). + expect(parseMcpConfig({ tool_style: 'auto' }).toolStyle).toBeNull(); + }); + + it('round-trips through serialize (camelCase payload, sorted denylist)', () => { + const c = parseMcpConfig({ + exposed_services: ['b', 'a'], + disabled_tools: ['z_tool', 'a_tool'], + tool_style: 'merged', + scope_tools: true, + custom_tools: [{ id: 3, name: 't', toolType: 'api', enabled: true }], + }); + const out = serializeMcpConfig(c, 'mcp'); + expect(out['exposedServices']).toEqual(['b', 'a']); + expect(out['disabledTools']).toEqual(['a_tool', 'z_tool']); + expect(out['toolStyle']).toBe('merged'); + expect(out['scope_tools']).toBe(true); // rest spread back + expect(out['customTools'][0]).toMatchObject({ id: 3, name: 't' }); + // Parsing the serialized payload yields the same normalized config. + const again = parseMcpConfig(out); + expect(again.exposedServices).toEqual(c.exposedServices); + expect([...again.disabledTools].sort()).toEqual( + [...c.disabledTools].sort() + ); + expect(again.toolStyle).toBe(c.toolStyle); + }); + + it('omits customTools for system_mcp', () => { + const c = parseMcpConfig({ custom_tools: [{ name: 'x' }] }); + expect(serializeMcpConfig(c, 'system_mcp')['customTools']).toBeUndefined(); + expect(serializeMcpConfig(c, 'mcp')['customTools']).toBeDefined(); + }); +}); + +describe('serviceFraction / groupState', () => { + it('counts 16 db verbs and 6 file verbs', () => { + expect(serviceFraction(svc('crm'), new Set())).toEqual({ on: 16, total: 16 }); + expect(serviceFraction(svc('s3', 'file'), new Set())).toEqual({ on: 6, total: 6 }); + }); + + it('subtracts only this service’s disabled keys', () => { + const disabled = new Set([ + 'crm_create_records', + 'crm_delete_records', + 'other_update_records', + ]); + expect(serviceFraction(svc('crm'), disabled)).toEqual({ on: 14, total: 16 }); + }); + + it('derives on/part/off group states', () => { + const s = svc('crm'); + const writeGroup = verbsFor('db') + .filter(v => ['create_records', 'update_records', 'delete_records'].includes(v.verb)); + expect(writeGroup).toHaveLength(3); + const group = { + key: 'write' as const, + label: 'Write data', + warn: 'writes' as const, + verbs: writeGroup, + }; + expect(groupState(s, group, new Set())).toBe('on'); + expect(groupState(s, group, new Set(['crm_create_records']))).toBe('part'); + expect( + groupState( + s, + group, + new Set(['crm_create_records', 'crm_update_records', 'crm_delete_records']) + ) + ).toBe('off'); + }); +}); + +describe('accessState — all four kinds', () => { + const s = svc('crm'); + + it('Full when nothing is disabled', () => { + expect(accessState(s, new Set())).toEqual({ kind: 'full', label: 'Full' }); + }); + + it('Read-only when all write/execute off and all read/schema on', () => { + const disabled = new Set(WRITE_DB_VERBS.map(v => toolKey('crm', v))); + expect(accessState(s, disabled)).toEqual({ kind: 'ro', label: 'Read-only' }); + // readOnlyKeys() compiles exactly that state. + expect(new Set(readOnlyKeys(s))).toEqual(disabled); + }); + + it('Custom for any other mix', () => { + const a = accessState(s, new Set(['crm_get_table_data'])); + expect(a.kind).toBe('custom'); + expect(a.label).toBe('Custom 15 of 16'); + }); + + it('zero when every tool is off (legacy master-toggle-off)', () => { + const disabled = new Set(allKeys(s)); + expect(accessState(s, disabled)).toEqual({ kind: 'zero', label: '0 of 16' }); + }); +}); + +describe('effectiveTools', () => { + const services = [svc('crm'), svc('hr'), svc('s3', 'file')]; + + it('prefixed: sums per-service enabled verbs', () => { + const cfg = cfgWith({ + exposedServices: ['crm', 'hr', 's3'], + toolStyle: 'prefixed', + disabledTools: new Set(['crm_create_records', 's3_delete_file']), + }); + const e = effectiveTools(cfg, services); + expect(e.effectiveStyle).toBe('prefixed'); + expect(e.dbTools).toBe(15 + 16); + expect(e.fileTools).toBe(5); + expect(e.globalTools).toBe(GLOBAL_TOOLS.length); + expect(e.aggregators).toBe(AGGREGATOR_TOOLS.length); // 2 dbs + expect(e.total).toBe(31 + 5 + 5 + 6); + }); + + it('merged: counts distinct verbs enabled in at least one exposed db', () => { + const cfg = cfgWith({ + exposedServices: ['crm', 'hr'], + toolStyle: 'merged', + // create_records off in crm only → still reachable through hr. + disabledTools: new Set([ + 'crm_create_records', + // delete_records off everywhere → verb gone. + 'crm_delete_records', + 'hr_delete_records', + ]), + }); + const e = effectiveTools(cfg, services.slice(0, 2)); + expect(e.effectiveStyle).toBe('merged'); + expect(e.dbTools).toBe(15); // 16 verbs − delete_records + }); + + it('null toolStyle behaves as prefixed', () => { + const cfg = cfgWith({ exposedServices: ['crm'], toolStyle: null }); + expect(effectiveTools(cfg, services).effectiveStyle).toBe('prefixed'); + }); + + it('gates aggregators at two databases', () => { + const one = cfgWith({ exposedServices: ['crm'] }); + const two = cfgWith({ exposedServices: ['crm', 'hr'] }); + expect(effectiveTools(one, services).aggregators).toBe(0); + expect(effectiveTools(two, services).aggregators).toBe(AGGREGATOR_TOOLS.length); + // A file service does not count toward the gate. + const dbPlusFile = cfgWith({ exposedServices: ['crm', 's3'] }); + expect(effectiveTools(dbPlusFile, services).aggregators).toBe(0); + }); + + it('disables globals and aggregators by bare name', () => { + const cfg = cfgWith({ + exposedServices: ['crm', 'hr'], + disabledTools: new Set(['search', 'all_get_tables']), + }); + const e = effectiveTools(cfg, services); + expect(e.globalTools).toBe(GLOBAL_TOOLS.length - 1); + expect(e.aggregators).toBe(AGGREGATOR_TOOLS.length - 1); + }); + + it('excludes inactive services from every number', () => { + const withInactive = [svc('crm'), svc('hr', 'db', false)]; + const cfg = cfgWith({ exposedServices: ['crm', 'hr'] }); + const e = effectiveTools(cfg, withInactive); + expect(e.dbServices).toBe(1); + expect(e.dbTools).toBe(16); + expect(e.aggregators).toBe(0); // only one ACTIVE db + }); + + it('counts enabled custom tools (enabled !== false/0)', () => { + const cfg = cfgWith({ + exposedServices: [], + customTools: [ + { name: 'a', enabled: true }, + { name: 'b', enabled: false }, + { name: 'c', enabled: 0 }, + { name: 'd' }, + ], + }); + expect(effectiveTools(cfg, []).customTools).toBe(2); + }); + + it('engages lazy mode on always, and on auto over the token threshold', () => { + const small = cfgWith({ exposedServices: ['crm'] }); + expect(effectiveTools(small, services).lazyEngaged).toBe(false); + expect( + effectiveTools({ ...small, lazyMode: 'always' }, services).lazyEngaged + ).toBe(true); + expect( + effectiveTools({ ...small, lazyMode: true }, services).lazyEngaged + ).toBe(true); + // 7 dbs × 16 + 5 globals + 6 aggregators = 123 tools > 8000/81 ≈ 98.8. + const many = Array.from({ length: 7 }, (_, i) => svc(`db${i}`)); + const big = cfgWith({ exposedServices: many.map(m => m.name) }); + const e = effectiveTools(big, many); + expect(e.total).toBe(7 * 16 + 5 + 6); + expect(e.tokenEstimate).toBe(e.total * TOKENS_PER_TOOL); + expect(e.lazyEngaged).toBe(true); + expect( + effectiveTools({ ...big, lazyMode: 'never' }, many).lazyEngaged + ).toBe(false); + }); + + it('computes write reach and the derived read-only state', () => { + const roCrm = WRITE_DB_VERBS.map(v => toolKey('crm', v)); + const cfg = cfgWith({ + exposedServices: ['crm', 'hr', 's3'], + disabledTools: new Set(roCrm), + }); + const e = effectiveTools(cfg, services); + expect(e.writeReachDb).toBe(1); // only hr still has write verbs + expect(e.writeReach).toBe(2); // hr + the s3 file service + expect(e.readOnly).toBe(false); + // Turn off every write/execute verb everywhere → derived read-only. + const allOff = new Set([ + ...WRITE_DB_VERBS.flatMap(v => [toolKey('crm', v), toolKey('hr', v)]), + ...['create_file', 'create_folder', 'delete_file'].map(v => toolKey('s3', v)), + ]); + const ro = effectiveTools(cfgWith({ + exposedServices: ['crm', 'hr', 's3'], + disabledTools: allOff, + }), services); + expect(ro.writeVerbs).toBe(0); + expect(ro.readOnly).toBe(true); + // Read/schema tools are still served. + expect(ro.dbTools).toBe(READ_DB_VERBS.length * 2); + }); +}); + +describe('exposedRows / orphanedKeys', () => { + const services = [svc('crm'), svc('s3', 'file')]; + + it('pairs exposed names with live services, null for orphans', () => { + const cfg = cfgWith({ exposedServices: ['crm', 'legacy_dw'] }); + const rows = exposedRows(cfg, services); + expect(rows[0].svc?.name).toBe('crm'); + expect(rows[1]).toEqual({ name: 'legacy_dw', svc: null }); + }); + + it('flags keys whose prefix matches no known service', () => { + const cfg = cfgWith({ + exposedServices: [], + disabledTools: new Set(['ghost_get_tables', 'crm_get_tables']), + }); + expect(orphanedKeys(cfg, services)).toEqual(['ghost_get_tables']); + }); + + it('ignores bare globals, aggregators and custom names', () => { + const cfg = cfgWith({ + exposedServices: [], + disabledTools: new Set(['search', 'all_get_tables', 'my_custom']), + customTools: [{ name: 'my_custom' }], + }); + expect(orphanedKeys(cfg, services)).toEqual([]); + }); + + it('treats exposed orphan entries as owners of their keys', () => { + const cfg = cfgWith({ + exposedServices: ['legacy_dw'], + disabledTools: new Set(['legacy_dw_create_records']), + }); + // The keys are dormant, not orphaned: the entry still claims them. + expect(orphanedKeys(cfg, services)).toEqual([]); + }); +}); + +describe('verbReach / emittedDbToolName', () => { + it('reports which active exposed dbs a verb reaches', () => { + const services = [svc('crm'), svc('hr'), svc('archive', 'db', false)]; + const cfg = cfgWith({ + exposedServices: ['crm', 'hr', 'archive'], + disabledTools: new Set(['crm_create_records']), + }); + expect(verbReach('create_records', cfg, services)).toEqual({ + on: ['hr'], + total: 2, // inactive archive excluded + }); + expect(verbReach('get_table_data', cfg, services).on).toEqual(['crm', 'hr']); + }); + + it('emits bare verbs in merged style, prefixed otherwise', () => { + expect(emittedDbToolName('merged', 'crm', 'get_tables')).toBe('get_tables'); + expect(emittedDbToolName('prefixed', 'crm', 'get_tables')).toBe( + 'crm_get_tables' + ); + }); + + it('disabled_tools keys are the prefixed form in BOTH styles', () => { + expect(toolKey('crm', 'get_tables')).toBe('crm_get_tables'); + }); +}); + +describe('catalog sanity (single source of counts)', () => { + it('serves 16 db verbs, 6 file verbs, 5 globals, 6 aggregators', () => { + expect(DB_VERBS).toHaveLength(16); + expect(FILE_VERBS).toHaveLength(6); + expect(GLOBAL_TOOLS).toHaveLength(5); + expect(AGGREGATOR_TOOLS).toHaveLength(6); + }); +}); diff --git a/src/app/adf-mcp/mcp-store.spec.ts b/src/app/adf-mcp/mcp-store.spec.ts new file mode 100644 index 00000000..590af9b0 --- /dev/null +++ b/src/app/adf-mcp/mcp-store.spec.ts @@ -0,0 +1,246 @@ +/** + * Unit tests for McpEditorStore: dirty/fingerprint math, exposure mutations + * (access modes + dormant-curation keep), remove keep/clear, the + * rename-successor key rewrite, Make read-only, and connection-affecting + * change detection. + */ +import { McpBackendService, toolKey } from './mcp-effective'; +import { McpEditorStore, McpServiceRecord } from './mcp-store'; + +const svc = ( + name: string, + kind: 'db' | 'file' = 'db', + active = true +): McpBackendService => ({ name, label: name, kind, active }); + +const WRITE_DB_VERBS = [ + 'create_records', + 'update_records', + 'delete_records', + 'get_stored_procedures', + 'call_stored_procedure', + 'get_stored_functions', + 'call_stored_function', +]; + +function makeStore( + rawConfig: Record = {}, + services: McpBackendService[] = [svc('crm'), svc('hr'), svc('s3', 'file')], + type: 'mcp' | 'system_mcp' = 'mcp' +): McpEditorStore { + const store = new McpEditorStore(); + const record: McpServiceRecord = { + id: 7, + name: 'warehouse', + label: 'Warehouse', + description: '', + isActive: true, + type, + raw: {}, + }; + store.init(record, rawConfig); + store.backendServices = services; + store.backendLoaded = true; + return store; +} + +describe('dirty / fingerprint', () => { + it('starts clean and turns dirty on any config mutation', () => { + const store = makeStore({ exposed_services: ['crm'] }); + expect(store.dirty()).toBe(false); + store.setTool('crm', 'create_records', false); + expect(store.dirty()).toBe(true); + }); + + it('returns to clean when the same key is re-enabled', () => { + const store = makeStore({ exposed_services: ['crm'] }); + store.setTool('crm', 'create_records', false); + store.setTool('crm', 'create_records', true); + expect(store.dirty()).toBe(false); + }); + + it('tracks identity drafts and clears on markSaved / discard', () => { + const store = makeStore(); + store.draftName = 'renamed'; + expect(store.dirty()).toBe(true); + store.discard(); + expect(store.draftName).toBe('warehouse'); + expect(store.dirty()).toBe(false); + + store.cfg.allowApiKeyAuth = true; + expect(store.dirty()).toBe(true); + store.markSaved(); + expect(store.dirty()).toBe(false); + expect(store.savedCfg.allowApiKeyAuth).toBe(true); + }); + + it('discard restores the saved config exactly', () => { + const store = makeStore({ exposed_services: ['crm'] }); + store.exposeServices(['hr'], 'ro'); + store.removeService('crm'); + store.discard(); + expect(store.cfg.exposedServices).toEqual(['crm']); + expect(store.cfg.disabledTools.size).toBe(0); + }); +}); + +describe('exposeServices', () => { + it('ro compiles the write/execute verbs into disabled_tools', () => { + const store = makeStore(); + store.exposeServices(['crm'], 'ro'); + expect(store.cfg.exposedServices).toEqual(['crm']); + for (const v of WRITE_DB_VERBS) { + expect(store.cfg.disabledTools.has(toolKey('crm', v))).toBe(true); + } + expect(store.cfg.disabledTools.has('crm_get_table_data')).toBe(false); + expect(store.access(svc('crm')).kind).toBe('ro'); + }); + + it('rw clears every key so the service serves everything', () => { + const store = makeStore({ disabled_tools: ['crm_get_tables'] }); + store.exposeServices(['crm'], 'rw'); + expect(store.cfg.disabledTools.size).toBe(0); + expect(store.access(svc('crm')).kind).toBe('full'); + }); + + it('keep re-applies dormant curation untouched', () => { + const store = makeStore({ disabled_tools: ['crm_get_tables'] }); + store.exposeServices(['crm'], 'keep'); + expect(store.cfg.exposedServices).toEqual(['crm']); + expect(store.cfg.disabledTools.has('crm_get_tables')).toBe(true); + }); + + it('never duplicates an already-exposed name', () => { + const store = makeStore({ exposed_services: ['crm'] }); + store.exposeServices(['crm', 'hr'], 'keep'); + expect(store.cfg.exposedServices).toEqual(['crm', 'hr']); + }); + + it('file services get their write verbs compiled too', () => { + const store = makeStore(); + store.exposeServices(['s3'], 'ro'); + expect(store.cfg.disabledTools.has('s3_create_file')).toBe(true); + expect(store.cfg.disabledTools.has('s3_list_files')).toBe(false); + }); +}); + +describe('removeService', () => { + it('keeps curation by default (migration-safety rule 2)', () => { + const store = makeStore({ + exposed_services: ['crm', 'hr'], + disabled_tools: ['crm_create_records'], + }); + store.removeService('crm'); + expect(store.cfg.exposedServices).toEqual(['hr']); + expect(store.cfg.disabledTools.has('crm_create_records')).toBe(true); + expect(store.dormantCurationCount('crm')).toBe(1); + }); + + it('clears curation only when asked', () => { + const store = makeStore({ + exposed_services: ['crm'], + disabled_tools: ['crm_create_records', 'hr_create_records', 'search'], + }); + store.removeService('crm', true); + expect(store.cfg.disabledTools.has('crm_create_records')).toBe(false); + // Other services' keys and bare names are untouched. + expect(store.cfg.disabledTools.has('hr_create_records')).toBe(true); + expect(store.cfg.disabledTools.has('search')).toBe(true); + }); +}); + +describe('renameExposedEntry', () => { + it('repoints the entry and re-prefixes only its keys', () => { + const store = makeStore({ + exposed_services: ['legacy_dw', 'crm'], + disabled_tools: [ + 'legacy_dw_create_records', + 'legacy_dw_get_tables', + 'crm_delete_records', + 'search', + ], + }); + store.renameExposedEntry('legacy_dw', 'hr'); + expect(store.cfg.exposedServices).toEqual(['hr', 'crm']); + expect(store.cfg.disabledTools.has('hr_create_records')).toBe(true); + expect(store.cfg.disabledTools.has('hr_get_tables')).toBe(true); + expect(store.cfg.disabledTools.has('legacy_dw_create_records')).toBe(false); + expect(store.cfg.disabledTools.has('crm_delete_records')).toBe(true); + expect(store.cfg.disabledTools.has('search')).toBe(true); + expect(store.dormantCurationCount('hr')).toBe(2); + }); +}); + +describe('makeReadOnly', () => { + it('compiles read-only across all active exposed services', () => { + const store = makeStore({ exposed_services: ['crm', 'hr', 's3'] }); + store.makeReadOnly(); + const e = store.effective(); + expect(e.readOnly).toBe(true); + expect(e.writeVerbs).toBe(0); + expect(store.access(svc('crm')).kind).toBe('ro'); + expect(store.access(svc('s3', 'file')).kind).toBe('ro'); + }); + + it('skips inactive and orphaned entries', () => { + const services = [svc('crm'), svc('archive', 'db', false)]; + const store = makeStore( + { exposed_services: ['crm', 'archive', 'ghost'] }, + services + ); + store.makeReadOnly(); + expect(store.cfg.disabledTools.has('crm_create_records')).toBe(true); + expect(store.cfg.disabledTools.has('archive_create_records')).toBe(false); + expect(store.cfg.disabledTools.has('ghost_create_records')).toBe(false); + }); +}); + +describe('connectionAffecting', () => { + it('is false for pure curation changes', () => { + const store = makeStore({ exposed_services: ['crm'] }); + store.setTool('crm', 'create_records', false); + expect(store.connectionAffecting()).toBe(false); + }); + + it.each([ + ['rename', (s: McpEditorStore) => (s.draftName = 'other')], + ['api-key flag', (s: McpEditorStore) => (s.cfg.allowApiKeyAuth = true)], + ['tool style', (s: McpEditorStore) => (s.cfg.toolStyle = 'merged')], + ['secret', (s: McpEditorStore) => (s.cfg.oauthClientSecret = 'new')], + [ + 'redirect uris', + (s: McpEditorStore) => s.cfg.redirectUris.push('https://claude.ai/cb'), + ], + ])('is true for %s changes', (_label, mutate) => { + const store = makeStore(); + mutate(store); + expect(store.connectionAffecting()).toBe(true); + }); +}); + +describe('derived shortcuts', () => { + it('rows() pairs names with live services and orphans', () => { + const store = makeStore({ exposed_services: ['crm', 'ghost'] }); + const rows = store.rows(); + expect(rows).toHaveLength(2); + expect(rows[0].svc?.name).toBe('crm'); + expect(rows[1].svc).toBeNull(); + }); + + it('bare-name toggles drive globals', () => { + const store = makeStore(); + expect(store.isBareToolEnabled('search')).toBe(true); + store.setBareTool('search', false); + expect(store.isBareToolEnabled('search')).toBe(false); + expect(store.effective().globalTools).toBe(4); + }); + + it('touch() notifies subscribers', () => { + const store = makeStore(); + const seen = jest.fn(); + const sub = store.changes.subscribe(seen); + store.setBareTool('search', false); + expect(seen).toHaveBeenCalled(); + sub.unsubscribe(); + }); +}); diff --git a/src/app/adf-mcp/mcp-store.ts b/src/app/adf-mcp/mcp-store.ts index d9853c59..b4a30fe1 100644 --- a/src/app/adf-mcp/mcp-store.ts +++ b/src/app/adf-mcp/mcp-store.ts @@ -4,6 +4,7 @@ * it and call touch(). All effective math funnels through effective(). */ import { Subject } from 'rxjs'; +import { SYSTEM_MCP_TOOLS } from '../adf-services/df-service-details/system-mcp-tools'; import { AccessState, EffectiveBreakdown, @@ -153,6 +154,26 @@ export class McpEditorStore { savedEffective(): EffectiveBreakdown { return effectiveTools(this.savedCfg, this.backendServices); } + /** + * The number every header/tab/delta surface shows. For system_mcp the + * catalog is the fixed System API tool list (disabled by bare name); + * effectiveTools() only knows the data-plane catalog. + */ + totalTools(): number { + if (this.isSystemMcp) { + return SYSTEM_MCP_TOOLS.filter(t => !this.cfg.disabledTools.has(t.name)) + .length; + } + return this.effective().total; + } + savedTotalTools(): number { + if (this.isSystemMcp) { + return SYSTEM_MCP_TOOLS.filter( + t => !this.savedCfg.disabledTools.has(t.name) + ).length; + } + return this.savedEffective().total; + } rows(): ExposedRow[] { return exposedRows(this.cfg, this.backendServices); } From 02ead209ef1a5e0a3337b47b4041936c29e75a7d Mon Sep 17 00:00:00 2001 From: Kevin McGahey Date: Mon, 21 Sep 2026 22:24:29 +0000 Subject: [PATCH 03/14] test(mcp): live e2e suite + same-route navigation fixes 13 Playwright tests against a live instance (curation and exposure round-trips verified via API, create flow landing on ?created=1, preview exclusions, settings honesty, system_mcp variant, legacy-editor guard), with snapshot/restore discipline that leaves the instance byte-identical. Fixes found by testing: the route shim and editor shell now re-initialize on every resolver emission (Angular reuses routed components on /ai/mcp/9 -> /ai/mcp/21, which previously kept showing the prior service's editor); tabs drop per-service UI state via ngOnChanges; the breadcrumb builder strips query strings so ?created=1 no longer corrupts the page title; create-page URL-preview spacing; rail hint clipping. Co-Authored-By: Claude Fable 5 --- dist/1064.51f76a90b9f6bf10.js | 1 + dist/1068.275a15c7ea3f54f5.js | 1 - dist/1231.4b083ab1f84c3038.js | 1 + dist/1253.d34e9689f6d1f920.js | 1 + dist/1259.5860897dbeb62bae.js | 1 + dist/1408.49417d2701a11530.js | 1 + dist/1524.0427308cbd09bc81.js | 1 - dist/1643.4893b3dc0dbd730c.js | 1 - dist/1830.d5c7fb0b06fa17c1.js | 1 + dist/1900.a12604cdc6136544.js | 1 - dist/1917.445d714240916a62.js | 1 - dist/2043.21d51c2fe167c098.js | 1 + dist/214.676648eec53f0ec7.js | 1 - dist/2245.98d37c4d761c438a.js | 1 + dist/2262.e1b1581ef5ffc005.js | 1 - dist/2317.87abf625347bbc67.js | 1 - dist/2423.7c3a4e560ba29f26.js | 1 + dist/2430.f7d33b75ef0f9d4a.js | 1 - dist/2551.a0a26fc7e5fe4337.js | 1 + ...41db2ae347.js => 2617.328cdca5606b134b.js} | 2 +- dist/2623.660f94613cc4dd79.js | 1 + dist/2626.96e8530a3a49518e.js | 1 + dist/2661.4723cda3623aa906.js | 1 - dist/269.83f26d716676725e.js | 1 + dist/2765.91de37a203517a85.js | 1 + dist/2798.98700d1feb8241db.js | 1 + dist/2816.2f21c88e4cda31f4.js | 1 + dist/2830.698a04802c74bfc5.js | 1 + dist/2841.5fba958ef939fbc2.js | 1 + dist/2967.e5f225277a409e25.js | 1 - dist/2991.d4a5e9084c0b93e1.js | 1 + dist/3138.04acce1458a7ef9a.js | 1 - dist/3280.639c0e6febaf179a.js | 1 + dist/3281.5fedd5cbe8525104.js | 1 + dist/3307.e67abeb3c237b9b4.js | 1 - dist/3357.8880ce34ee7d0627.js | 1 + dist/3386.09d131c3805ddbb4.js | 1 + dist/3392.dfa5337deb7a37f5.js | 1 - dist/3451.68ce099758dfcefb.js | 1 - dist/3492.4563bbd0ec2cdd6f.js | 1 - dist/3523.b558b37176b4955a.js | 1 + dist/3533.91066031d8fe1453.js | 1 - dist/3587.b1716308a87d9323.js | 1 + dist/3645.8c6548ca9b1a641d.js | 1 - dist/3649.69c49f317f65f68e.js | 1 - dist/3678.b856ac5ef4971ffe.js | 1 - dist/3685.00249ec24c219eb9.js | 1 - dist/3695.0215f99bd71a088d.js | 1 - dist/3710.b6d536d2648cfc64.js | 1 + dist/3751.23b0e86a0a4e6e9d.js | 1 - dist/3756.9f335ae0f5636fe2.js | 1 - dist/3956.0d52a79622605984.js | 1 - dist/399.841dcb3c92cfff2e.js | 1 - dist/4060.7054ea1bfc7ae5b9.js | 1 + dist/4207.6549a98040f7b707.js | 1 - dist/4255.ac57882452d90abb.js | 1 - dist/4412.a41ab5fd02c111ba.js | 1 + dist/4440.49aaeec5c32002ec.js | 1 + dist/4461.3d5cd6d4513d76db.js | 1 - dist/4588.19f974787da3fe15.js | 1 - dist/4673.fb747af965cc59a0.js | 1 - dist/4713.eacfd1b15738e8a5.js | 1 + dist/4721.76271d2a5c5f49a2.js | 1 + dist/4729.3d69f1dff5520cf1.js | 1 + dist/4813.608459b8216e55d3.js | 1 + dist/4823.cdb0245c747c4079.js | 1 + dist/485.912e3e802f37c120.js | 1 - dist/4972.3b99b0f60801c26d.js | 1 + ...454995f053.js => 4991.d2da42c4a4943212.js} | 2 +- dist/5036.9e5458a6279b6951.js | 1 - dist/5201.8f0dbf2bc1a2e854.js | 1 - dist/5257.6be50fee3a82e0f5.js | 1 + dist/5372.3feb13c0050a8360.js | 1 - dist/5453.5e29b39d5d102b3b.js | 1 - dist/5469.98bf5af86094c49f.js | 1 - ...66224578e5.js => 5486.d8516284513f98ea.js} | 2 +- dist/5555.09e50e53195dc8d8.js | 1 + dist/5571.c397f98d0327e252.js | 1 + dist/5596.3ee2b73f1226f064.js | 1 + dist/5624.605e50332c22f7df.js | 1 - dist/5632.1c1435fc3c344740.js | 1 + ...ca66ca2ba1.js => 5735.4425cd482e315a23.js} | 2 +- dist/582.b3c0df8d3c3e84ac.js | 1 + dist/583.e8891b7cc791de6f.js | 1 - dist/5951.f7828a646042738c.js | 1 + dist/5969.b64292feb5bcfb3a.js | 1 - dist/6049.7a6a850f2ff06825.js | 1 + dist/615.172663e00135edd7.js | 1 + dist/6192.7eea65548b6b52a8.js | 1 + dist/6214.981118ca14b0d356.js | 1 - dist/6227.8f65a88bee9b41f8.js | 1 + dist/6234.28f311c7cb27269e.js | 1 + dist/6242.11c5b631cf93c664.js | 1 - dist/6272.bc7adda06d894f27.js | 1 + dist/6377.a34e85c7dc59559c.js | 1 - dist/6557.66365510b37565b7.js | 1 + dist/6557.e1e2097c6cf8f99e.js | 1 - dist/669.98f064f5a937aec8.js | 1 - dist/6700.6ff5f3ccff8d88ec.js | 1 + dist/6755.19c1ab31c4c59ccd.js | 1 + dist/6850.c13b0db27aec1f5b.js | 1 + dist/6968.c6af7114ccc40b36.js | 1 - dist/6984.5b9d86e1f3c01f1f.js | 1 - dist/7058.f66bee5fee6bbbcf.js | 1 - dist/7067.0bf0fc7ac44a8276.js | 1 - dist/7252.5c5b25226b515af8.js | 1 - dist/7303.3621328ea8c0d850.js | 1 - dist/7343.13ece8860c6172cb.js | 1 + dist/7359.7fb26b5d95441726.js | 1 + dist/7418.4d59c7947daff731.js | 1 - ...73d3b8d92e.js => 7632.b15be87648835134.js} | 2 +- dist/7649.c7846c3274639388.js | 1 + dist/7741.b1494e07e5316066.js | 1 - dist/7888.47d1ba4b95b4aa71.js | 1 - dist/796.6988d10857687016.js | 1 - dist/8001.df27a0963b4a3e68.js | 1 - dist/8019.28bcbe226494bf50.js | 1 + dist/8201.9500a262c4c77bb3.js | 1 + dist/8221.7d29ff8933c706c8.js | 1 - dist/8270.ee8bcfc1360571ac.js | 1 + dist/8272.a7ef6eaf1af75d7e.js | 1 - dist/8328.58d36ccb3a10d953.js | 1 - dist/8332.08f52f180aa8f1b9.js | 1 + dist/8337.96252439a08a6a13.js | 1 - dist/850.baaa0bf29e7ff400.js | 1 + dist/8514.055885af750d55d5.js | 1 + dist/870.bd2cd719f9ad1540.js | 1 - dist/8747.4aa72a816a9e2b1a.js | 1 - dist/8781.08c7eef2edf7ad5e.js | 1 - dist/8816.7d97eea967c9810d.js | 1 - dist/8859.3b307639b11cdb16.js | 1 - dist/8909.c1f338a657b10a45.js | 1 + dist/9106.7c66719d514008a6.js | 1 - ...db41552bec.js => 9159.5d458bd6a0e65bb5.js} | 2 +- dist/9167.9edee1862e426be4.js | 1 - ...3aa6efae16.js => 9213.167429bea07256c5.js} | 2 +- dist/939.410c5cc467c518d4.js | 1 + dist/9462.cc0d6df0d92f3ac4.js | 1 + dist/9480.bbc230af0b7662db.js | 1 + dist/9516.464d0aaec9254fcd.js | 1 + dist/9675.5bc46c37954a8ea1.js | 1 - dist/9709.68e131e5dacf4215.js | 1 + ...7d0c1e3592.js => 9791.62fda35a6cf2fdf5.js} | 2 +- dist/9841.9c713cb73db35467.js | 1 - dist/986.058b1dad640573cd.js | 1 - dist/9864.6429be060cc4f61c.js | 1 + dist/987.9256f6c3356f5982.js | 1 + dist/9962.d1a051d61103ed59.js | 1 + dist/common.00ccefaeda6de209.js | 1 + dist/common.8add9df0f3c751ac.js | 1 - dist/index.html | 2 +- dist/main.11ef64d34e3dba8e.js | 1 + dist/main.bea1bc1f07fc9126.js | 1 - dist/polyfills.acd6a468b9e08280.js | 1 - dist/polyfills.cb64ea9d35bc0a9e.js | 1 + dist/runtime.1a710bdd9a58b045.js | 1 + dist/runtime.a8eb5c429fd5ccc9.js | 1 - e2e/fixtures/df-api.ts | 130 +++++ e2e/fixtures/mcp-model.ts | 83 +++ e2e/mcp-redesign-flows.spec.ts | 344 +++++++++++++ e2e/mcp-service.spec.ts | 474 +++++++++++++++++- .../df-mcp-connect.component.ts | 31 +- .../df-mcp-create.component.html | 4 +- .../df-mcp-details.component.ts | 28 +- .../adf-mcp/df-mcp-route-shim.component.ts | 23 +- .../df-mcp-settings.component.ts | 11 +- .../df-mcp-tools/df-mcp-tools.component.scss | 9 + .../df-mcp-tools/df-mcp-tools.component.ts | 23 +- src/app/adf-mcp/mcp-store.ts | 8 + src/app/shared/utilities/route.spec.ts | 10 + src/app/shared/utilities/route.ts | 5 + 171 files changed, 1232 insertions(+), 117 deletions(-) create mode 100644 dist/1064.51f76a90b9f6bf10.js delete mode 100644 dist/1068.275a15c7ea3f54f5.js create mode 100644 dist/1231.4b083ab1f84c3038.js create mode 100644 dist/1253.d34e9689f6d1f920.js create mode 100644 dist/1259.5860897dbeb62bae.js create mode 100644 dist/1408.49417d2701a11530.js delete mode 100644 dist/1524.0427308cbd09bc81.js delete mode 100644 dist/1643.4893b3dc0dbd730c.js create mode 100644 dist/1830.d5c7fb0b06fa17c1.js delete mode 100644 dist/1900.a12604cdc6136544.js delete mode 100644 dist/1917.445d714240916a62.js create mode 100644 dist/2043.21d51c2fe167c098.js delete mode 100644 dist/214.676648eec53f0ec7.js create mode 100644 dist/2245.98d37c4d761c438a.js delete mode 100644 dist/2262.e1b1581ef5ffc005.js delete mode 100644 dist/2317.87abf625347bbc67.js create mode 100644 dist/2423.7c3a4e560ba29f26.js delete mode 100644 dist/2430.f7d33b75ef0f9d4a.js create mode 100644 dist/2551.a0a26fc7e5fe4337.js rename dist/{2066.01138641db2ae347.js => 2617.328cdca5606b134b.js} (97%) create mode 100644 dist/2623.660f94613cc4dd79.js create mode 100644 dist/2626.96e8530a3a49518e.js delete mode 100644 dist/2661.4723cda3623aa906.js create mode 100644 dist/269.83f26d716676725e.js create mode 100644 dist/2765.91de37a203517a85.js create mode 100644 dist/2798.98700d1feb8241db.js create mode 100644 dist/2816.2f21c88e4cda31f4.js create mode 100644 dist/2830.698a04802c74bfc5.js create mode 100644 dist/2841.5fba958ef939fbc2.js delete mode 100644 dist/2967.e5f225277a409e25.js create mode 100644 dist/2991.d4a5e9084c0b93e1.js delete mode 100644 dist/3138.04acce1458a7ef9a.js create mode 100644 dist/3280.639c0e6febaf179a.js create mode 100644 dist/3281.5fedd5cbe8525104.js delete mode 100644 dist/3307.e67abeb3c237b9b4.js create mode 100644 dist/3357.8880ce34ee7d0627.js create mode 100644 dist/3386.09d131c3805ddbb4.js delete mode 100644 dist/3392.dfa5337deb7a37f5.js delete mode 100644 dist/3451.68ce099758dfcefb.js delete mode 100644 dist/3492.4563bbd0ec2cdd6f.js create mode 100644 dist/3523.b558b37176b4955a.js delete mode 100644 dist/3533.91066031d8fe1453.js create mode 100644 dist/3587.b1716308a87d9323.js delete mode 100644 dist/3645.8c6548ca9b1a641d.js delete mode 100644 dist/3649.69c49f317f65f68e.js delete mode 100644 dist/3678.b856ac5ef4971ffe.js delete mode 100644 dist/3685.00249ec24c219eb9.js delete mode 100644 dist/3695.0215f99bd71a088d.js create mode 100644 dist/3710.b6d536d2648cfc64.js delete mode 100644 dist/3751.23b0e86a0a4e6e9d.js delete mode 100644 dist/3756.9f335ae0f5636fe2.js delete mode 100644 dist/3956.0d52a79622605984.js delete mode 100644 dist/399.841dcb3c92cfff2e.js create mode 100644 dist/4060.7054ea1bfc7ae5b9.js delete mode 100644 dist/4207.6549a98040f7b707.js delete mode 100644 dist/4255.ac57882452d90abb.js create mode 100644 dist/4412.a41ab5fd02c111ba.js create mode 100644 dist/4440.49aaeec5c32002ec.js delete mode 100644 dist/4461.3d5cd6d4513d76db.js delete mode 100644 dist/4588.19f974787da3fe15.js delete mode 100644 dist/4673.fb747af965cc59a0.js create mode 100644 dist/4713.eacfd1b15738e8a5.js create mode 100644 dist/4721.76271d2a5c5f49a2.js create mode 100644 dist/4729.3d69f1dff5520cf1.js create mode 100644 dist/4813.608459b8216e55d3.js create mode 100644 dist/4823.cdb0245c747c4079.js delete mode 100644 dist/485.912e3e802f37c120.js create mode 100644 dist/4972.3b99b0f60801c26d.js rename dist/{3101.5b940d454995f053.js => 4991.d2da42c4a4943212.js} (91%) delete mode 100644 dist/5036.9e5458a6279b6951.js delete mode 100644 dist/5201.8f0dbf2bc1a2e854.js create mode 100644 dist/5257.6be50fee3a82e0f5.js delete mode 100644 dist/5372.3feb13c0050a8360.js delete mode 100644 dist/5453.5e29b39d5d102b3b.js delete mode 100644 dist/5469.98bf5af86094c49f.js rename dist/{3828.d30a9d66224578e5.js => 5486.d8516284513f98ea.js} (96%) create mode 100644 dist/5555.09e50e53195dc8d8.js create mode 100644 dist/5571.c397f98d0327e252.js create mode 100644 dist/5596.3ee2b73f1226f064.js delete mode 100644 dist/5624.605e50332c22f7df.js create mode 100644 dist/5632.1c1435fc3c344740.js rename dist/{5629.5e427cca66ca2ba1.js => 5735.4425cd482e315a23.js} (62%) create mode 100644 dist/582.b3c0df8d3c3e84ac.js delete mode 100644 dist/583.e8891b7cc791de6f.js create mode 100644 dist/5951.f7828a646042738c.js delete mode 100644 dist/5969.b64292feb5bcfb3a.js create mode 100644 dist/6049.7a6a850f2ff06825.js create mode 100644 dist/615.172663e00135edd7.js create mode 100644 dist/6192.7eea65548b6b52a8.js delete mode 100644 dist/6214.981118ca14b0d356.js create mode 100644 dist/6227.8f65a88bee9b41f8.js create mode 100644 dist/6234.28f311c7cb27269e.js delete mode 100644 dist/6242.11c5b631cf93c664.js create mode 100644 dist/6272.bc7adda06d894f27.js delete mode 100644 dist/6377.a34e85c7dc59559c.js create mode 100644 dist/6557.66365510b37565b7.js delete mode 100644 dist/6557.e1e2097c6cf8f99e.js delete mode 100644 dist/669.98f064f5a937aec8.js create mode 100644 dist/6700.6ff5f3ccff8d88ec.js create mode 100644 dist/6755.19c1ab31c4c59ccd.js create mode 100644 dist/6850.c13b0db27aec1f5b.js delete mode 100644 dist/6968.c6af7114ccc40b36.js delete mode 100644 dist/6984.5b9d86e1f3c01f1f.js delete mode 100644 dist/7058.f66bee5fee6bbbcf.js delete mode 100644 dist/7067.0bf0fc7ac44a8276.js delete mode 100644 dist/7252.5c5b25226b515af8.js delete mode 100644 dist/7303.3621328ea8c0d850.js create mode 100644 dist/7343.13ece8860c6172cb.js create mode 100644 dist/7359.7fb26b5d95441726.js delete mode 100644 dist/7418.4d59c7947daff731.js rename dist/{7129.7c39d873d3b8d92e.js => 7632.b15be87648835134.js} (81%) create mode 100644 dist/7649.c7846c3274639388.js delete mode 100644 dist/7741.b1494e07e5316066.js delete mode 100644 dist/7888.47d1ba4b95b4aa71.js delete mode 100644 dist/796.6988d10857687016.js delete mode 100644 dist/8001.df27a0963b4a3e68.js create mode 100644 dist/8019.28bcbe226494bf50.js create mode 100644 dist/8201.9500a262c4c77bb3.js delete mode 100644 dist/8221.7d29ff8933c706c8.js create mode 100644 dist/8270.ee8bcfc1360571ac.js delete mode 100644 dist/8272.a7ef6eaf1af75d7e.js delete mode 100644 dist/8328.58d36ccb3a10d953.js create mode 100644 dist/8332.08f52f180aa8f1b9.js delete mode 100644 dist/8337.96252439a08a6a13.js create mode 100644 dist/850.baaa0bf29e7ff400.js create mode 100644 dist/8514.055885af750d55d5.js delete mode 100644 dist/870.bd2cd719f9ad1540.js delete mode 100644 dist/8747.4aa72a816a9e2b1a.js delete mode 100644 dist/8781.08c7eef2edf7ad5e.js delete mode 100644 dist/8816.7d97eea967c9810d.js delete mode 100644 dist/8859.3b307639b11cdb16.js create mode 100644 dist/8909.c1f338a657b10a45.js delete mode 100644 dist/9106.7c66719d514008a6.js rename dist/{8497.05b3e2db41552bec.js => 9159.5d458bd6a0e65bb5.js} (98%) delete mode 100644 dist/9167.9edee1862e426be4.js rename dist/{7263.b2c1b33aa6efae16.js => 9213.167429bea07256c5.js} (97%) create mode 100644 dist/939.410c5cc467c518d4.js create mode 100644 dist/9462.cc0d6df0d92f3ac4.js create mode 100644 dist/9480.bbc230af0b7662db.js create mode 100644 dist/9516.464d0aaec9254fcd.js delete mode 100644 dist/9675.5bc46c37954a8ea1.js create mode 100644 dist/9709.68e131e5dacf4215.js rename dist/{4705.2f5fb87d0c1e3592.js => 9791.62fda35a6cf2fdf5.js} (91%) delete mode 100644 dist/9841.9c713cb73db35467.js delete mode 100644 dist/986.058b1dad640573cd.js create mode 100644 dist/9864.6429be060cc4f61c.js create mode 100644 dist/987.9256f6c3356f5982.js create mode 100644 dist/9962.d1a051d61103ed59.js create mode 100644 dist/common.00ccefaeda6de209.js delete mode 100644 dist/common.8add9df0f3c751ac.js create mode 100644 dist/main.11ef64d34e3dba8e.js delete mode 100644 dist/main.bea1bc1f07fc9126.js delete mode 100644 dist/polyfills.acd6a468b9e08280.js create mode 100644 dist/polyfills.cb64ea9d35bc0a9e.js create mode 100644 dist/runtime.1a710bdd9a58b045.js delete mode 100644 dist/runtime.a8eb5c429fd5ccc9.js create mode 100644 e2e/fixtures/df-api.ts create mode 100644 e2e/fixtures/mcp-model.ts create mode 100644 e2e/mcp-redesign-flows.spec.ts diff --git a/dist/1064.51f76a90b9f6bf10.js b/dist/1064.51f76a90b9f6bf10.js new file mode 100644 index 00000000..f1bb1573 --- /dev/null +++ b/dist/1064.51f76a90b9f6bf10.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1064],{96695:(L,I,c)=>{c.d(I,{Ou:()=>k,iy:()=>C});var o=c(60177),t=c(17705),D=c(21413),f=c(88834),g=c(82798),v=c(14823),b=c(86600),a=c(14085),P=c(32102);function x(r,p){if(1&r&&(t.j41(0,"mat-option",19),t.EFF(1),t.k0s()),2&r){const e=p.$implicit;t.Y8G("value",e),t.R7$(1),t.SpI(" ",e," ")}}function O(r,p){if(1&r){const e=t.RV6();t.j41(0,"mat-form-field",16)(1,"mat-select",17),t.bIt("selectionChange",function(i){t.eBV(e);const n=t.XpG(2);return t.Njj(n._changePageSize(i.value))}),t.DNE(2,x,2,2,"mat-option",18),t.k0s()()}if(2&r){const e=t.XpG(2);t.Y8G("appearance",e._formFieldAppearance)("color",e.color),t.R7$(1),t.Y8G("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),t.R7$(1),t.Y8G("ngForOf",e._displayedPageSizeOptions)}}function T(r,p){if(1&r&&(t.j41(0,"div",20),t.EFF(1),t.k0s()),2&r){const e=t.XpG(2);t.R7$(1),t.JRh(e.pageSize)}}function y(r,p){if(1&r&&(t.j41(0,"div",12)(1,"div",13),t.EFF(2),t.k0s(),t.DNE(3,O,3,8,"mat-form-field",14),t.DNE(4,T,2,1,"div",15),t.k0s()),2&r){const e=t.XpG();t.R7$(1),t.FS9("id",e._pageSizeLabelId),t.R7$(1),t.SpI(" ",e._intl.itemsPerPageLabel," "),t.R7$(1),t.Y8G("ngIf",e._displayedPageSizeOptions.length>1),t.R7$(1),t.Y8G("ngIf",e._displayedPageSizeOptions.length<=1)}}function z(r,p){if(1&r){const e=t.RV6();t.j41(0,"button",21),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.firstPage())}),t.qSk(),t.j41(1,"svg",7),t.nrm(2,"path",22),t.k0s()()}if(2&r){const e=t.XpG();t.Y8G("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),t.BMQ("aria-label",e._intl.firstPageLabel)}}function R(r,p){if(1&r){const e=t.RV6();t.qSk(),t.joV(),t.j41(0,"button",23),t.bIt("click",function(){t.eBV(e);const i=t.XpG();return t.Njj(i.lastPage())}),t.qSk(),t.j41(1,"svg",7),t.nrm(2,"path",24),t.k0s()()}if(2&r){const e=t.XpG();t.Y8G("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),t.BMQ("aria-label",e._intl.lastPageLabel)}}let S=(()=>{class r{constructor(){this.changes=new D.B,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,s,i)=>{if(0==i||0==s)return`0 of ${i}`;const n=e*s;return`${n+1} \u2013 ${n<(i=Math.max(i,0))?Math.min(n+s,i):n+s} of ${i}`}}static{this.\u0275fac=function(s){return new(s||r)}}static{this.\u0275prov=t.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();const E={provide:S,deps:[[new t.Xx1,new t.kdw,S]],useFactory:function w(r){return r||new S}},h=new t.nKC("MAT_PAGINATOR_DEFAULT_OPTIONS"),_=(0,b.Ob)((0,b.mG)(class{}));let m=(()=>{class r extends _{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max((0,a.OE)(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=(0,a.OE)(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max((0,a.OE)(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(s=>(0,a.OE)(s)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=(0,a.he)(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=(0,a.he)(e)}constructor(e,s,i){if(super(),this._intl=e,this._changeDetectorRef=s,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new t.bkB,this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),i){const{pageSize:n,pageSizeOptions:d,hidePageSize:l,showFirstLastButtons:u}=i;null!=n&&(this._pageSize=n),null!=d&&(this._pageSizeOptions=d),null!=l&&(this._hidePageSize=l),null!=u&&(this._showFirstLastButtons=u)}}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;const e=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(e)}previousPage(){if(!this.hasPreviousPage())return;const e=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(e)}firstPage(){if(!this.hasPreviousPage())return;const e=this.pageIndex;this.pageIndex=0,this._emitPageEvent(e)}lastPage(){if(!this.hasNextPage())return;const e=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(e)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){const e=this.getNumberOfPages()-1;return this.pageIndexe-s),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}static{this.\u0275fac=function(s){t.QTQ()}}static{this.\u0275dir=t.FsC({type:r,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[t.Vt3]})}}return r})(),A=0,C=(()=>{class r extends m{constructor(e,s,i){super(e,s,i),this._pageSizeLabelId="mat-paginator-page-size-label-"+A++,this._formFieldAppearance=i?.formFieldAppearance||"outline"}static{this.\u0275fac=function(s){return new(s||r)(t.rXU(S),t.rXU(t.gRc),t.rXU(h,8))}}static{this.\u0275cmp=t.VBU({type:r,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[t.Vt3],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size",4,"ngIf"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false","aria-hidden","true",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label",3,"id"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-mdc-paginator-page-size-value",4,"ngIf"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],["hideSingleSelectionIndicator","",3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(s,i){1&s&&(t.j41(0,"div",0)(1,"div",1),t.DNE(2,y,5,4,"div",2),t.j41(3,"div",3)(4,"div",4),t.EFF(5),t.k0s(),t.DNE(6,z,3,5,"button",5),t.j41(7,"button",6),t.bIt("click",function(){return i.previousPage()}),t.qSk(),t.j41(8,"svg",7),t.nrm(9,"path",8),t.k0s()(),t.joV(),t.j41(10,"button",9),t.bIt("click",function(){return i.nextPage()}),t.qSk(),t.j41(11,"svg",7),t.nrm(12,"path",10),t.k0s()(),t.DNE(13,R,3,5,"button",11),t.k0s()()()),2&s&&(t.R7$(2),t.Y8G("ngIf",!i.hidePageSize),t.R7$(3),t.SpI(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),t.R7$(1),t.Y8G("ngIf",i.showFirstLastButtons),t.R7$(1),t.Y8G("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),t.BMQ("aria-label",i._intl.previousPageLabel),t.R7$(3),t.Y8G("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),t.BMQ("aria-label",i._intl.nextPageLabel),t.R7$(3),t.Y8G("ngIf",i.showFirstLastButtons))},dependencies:[o.Sq,o.bT,f.iY,P.rl,g.VO,b.wT,v.oV],styles:[".mat-mdc-paginator{display:block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-paginator-container-text-color);background-color:var(--mat-paginator-container-background-color);font-family:var(--mat-paginator-container-text-font);line-height:var(--mat-paginator-container-text-line-height);font-size:var(--mat-paginator-container-text-size);font-weight:var(--mat-paginator-container-text-weight);letter-spacing:var(--mat-paginator-container-text-tracking)}.mat-mdc-paginator .mat-mdc-select-value{font-size:var(--mat-paginator-select-trigger-text-size)}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%;min-height:var(--mat-paginator-container-size)}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px;fill:var(--mat-paginator-enabled-icon-color)}.mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon{fill:var(--mat-paginator-disabled-icon-color)}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0})}}return r})(),k=(()=>{class r{static{this.\u0275fac=function(s){return new(s||r)}}static{this.\u0275mod=t.$C({type:r})}static{this.\u0275inj=t.G2t({providers:[E],imports:[o.MD,f.Hl,g.Ve,v.uc]})}}return r})()},2042:(L,I,c)=>{c.d(I,{B4:()=>M,NQ:()=>p,aE:()=>r});var o=c(17705),t=c(18617),D=c(14085),f=c(67336),g=c(86600),v=c(21413),b=c(57786),a=c(49969),P=c(60177);const x=["mat-sort-header",""];function O(e,s){if(1&e){const i=o.RV6();o.j41(0,"div",3),o.bIt("@arrowPosition.start",function(){o.eBV(i);const d=o.XpG();return o.Njj(d._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){o.eBV(i);const d=o.XpG();return o.Njj(d._disableViewStateAnimation=!1)}),o.nrm(1,"div",4),o.j41(2,"div",5),o.nrm(3,"div",6)(4,"div",7)(5,"div",8),o.k0s()()}if(2&e){const i=o.XpG();o.Y8G("@arrowOpacity",i._getArrowViewState())("@arrowPosition",i._getArrowViewState())("@allowChildren",i._getArrowDirectionState()),o.R7$(2),o.Y8G("@indicator",i._getArrowDirectionState()),o.R7$(1),o.Y8G("@leftPointer",i._getArrowDirectionState()),o.R7$(1),o.Y8G("@rightPointer",i._getArrowDirectionState())}}const T=["*"],w=new o.nKC("MAT_SORT_DEFAULT_OPTIONS"),E=(0,g.mG)((0,g.Ob)(class{}));let M=(()=>{class e extends E{get direction(){return this._direction}set direction(i){this._direction=i}get disableClear(){return this._disableClear}set disableClear(i){this._disableClear=(0,D.he)(i)}constructor(i){super(),this._defaultOptions=i,this.sortables=new Map,this._stateChanges=new v.B,this.start="asc",this._direction="",this.sortChange=new o.bkB}register(i){this.sortables.set(i.id,i)}deregister(i){this.sortables.delete(i.id)}sort(i){this.active!=i.id?(this.active=i.id,this.direction=i.start?i.start:this.start):this.direction=this.getNextSortDirection(i),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(i){if(!i)return"";let d=function F(e,s){let i=["asc","desc"];return"desc"==e&&i.reverse(),s||i.push(""),i}(i.start||this.start,i?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),l=d.indexOf(this.direction)+1;return l>=d.length&&(l=0),d[l]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}static{this.\u0275fac=function(n){return new(n||e)(o.rXU(w,8))}}static{this.\u0275dir=o.FsC({type:e,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],active:["matSortActive","active"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[o.Vt3,o.OA$]})}}return e})();const h=g.ed.ENTERING+" "+g.r5.STANDARD_CURVE,_={indicator:(0,a.hZ)("indicator",[(0,a.wk)("active-asc, asc",(0,a.iF)({transform:"translateY(0px)"})),(0,a.wk)("active-desc, desc",(0,a.iF)({transform:"translateY(10px)"})),(0,a.kY)("active-asc <=> active-desc",(0,a.i0)(h))]),leftPointer:(0,a.hZ)("leftPointer",[(0,a.wk)("active-asc, asc",(0,a.iF)({transform:"rotate(-45deg)"})),(0,a.wk)("active-desc, desc",(0,a.iF)({transform:"rotate(45deg)"})),(0,a.kY)("active-asc <=> active-desc",(0,a.i0)(h))]),rightPointer:(0,a.hZ)("rightPointer",[(0,a.wk)("active-asc, asc",(0,a.iF)({transform:"rotate(45deg)"})),(0,a.wk)("active-desc, desc",(0,a.iF)({transform:"rotate(-45deg)"})),(0,a.kY)("active-asc <=> active-desc",(0,a.i0)(h))]),arrowOpacity:(0,a.hZ)("arrowOpacity",[(0,a.wk)("desc-to-active, asc-to-active, active",(0,a.iF)({opacity:1})),(0,a.wk)("desc-to-hint, asc-to-hint, hint",(0,a.iF)({opacity:.54})),(0,a.wk)("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",(0,a.iF)({opacity:0})),(0,a.kY)("* => asc, * => desc, * => active, * => hint, * => void",(0,a.i0)("0ms")),(0,a.kY)("* <=> *",(0,a.i0)(h))]),arrowPosition:(0,a.hZ)("arrowPosition",[(0,a.kY)("* => desc-to-hint, * => desc-to-active",(0,a.i0)(h,(0,a.i7)([(0,a.iF)({transform:"translateY(-25%)"}),(0,a.iF)({transform:"translateY(0)"})]))),(0,a.kY)("* => hint-to-desc, * => active-to-desc",(0,a.i0)(h,(0,a.i7)([(0,a.iF)({transform:"translateY(0)"}),(0,a.iF)({transform:"translateY(25%)"})]))),(0,a.kY)("* => asc-to-hint, * => asc-to-active",(0,a.i0)(h,(0,a.i7)([(0,a.iF)({transform:"translateY(25%)"}),(0,a.iF)({transform:"translateY(0)"})]))),(0,a.kY)("* => hint-to-asc, * => active-to-asc",(0,a.i0)(h,(0,a.i7)([(0,a.iF)({transform:"translateY(0)"}),(0,a.iF)({transform:"translateY(-25%)"})]))),(0,a.wk)("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",(0,a.iF)({transform:"translateY(0)"})),(0,a.wk)("hint-to-desc, active-to-desc, desc",(0,a.iF)({transform:"translateY(-25%)"})),(0,a.wk)("hint-to-asc, active-to-asc, asc",(0,a.iF)({transform:"translateY(25%)"}))]),allowChildren:(0,a.hZ)("allowChildren",[(0,a.kY)("* <=> *",[(0,a.P)("@*",(0,a.MA)(),{optional:!0})])])};let m=(()=>{class e{constructor(){this.changes=new v.B}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=o.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const C={provide:m,deps:[[new o.Xx1,new o.kdw,m]],useFactory:function A(e){return e||new m}},k=(0,g.Ob)(class{});let r=(()=>{class e extends k{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(i){this._updateSortActionDescription(i)}get disableClear(){return this._disableClear}set disableClear(i){this._disableClear=(0,D.he)(i)}constructor(i,n,d,l,u,N,Y,B){super(),this._intl=i,this._changeDetectorRef=n,this._sort=d,this._columnDef=l,this._focusMonitor=u,this._elementRef=N,this._ariaDescriber=Y,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._sortActionDescription="Sort",B?.arrowPosition&&(this.arrowPosition=B?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(i=>{const n=!!i;n!==this._showIndicatorHint&&(this._setIndicatorHintVisible(n),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(i){this._isDisabled()&&i||(this._showIndicatorHint=i,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(i){this._viewState=i||{},this._disableViewStateAnimation&&(this._viewState={toState:i.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(i){!this._isDisabled()&&(i.keyCode===f.t6||i.keyCode===f.Fm)&&(i.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){const i=this._viewState.fromState;return(i?`${i}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(i){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,i)),this._sortActionDescription=i}_handleStateChanges(){this._rerenderSubscription=(0,b.h)(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}static{this.\u0275fac=function(n){return new(n||e)(o.rXU(m),o.rXU(o.gRc),o.rXU(M,8),o.rXU("MAT_SORT_HEADER_COLUMN_DEF",8),o.rXU(t.FN),o.rXU(o.aKT),o.rXU(t.vr,8),o.rXU(w,8))}}static{this.\u0275cmp=o.VBU({type:e,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(n,d){1&n&&o.bIt("click",function(){return d._handleClick()})("keydown",function(u){return d._handleKeydown(u)})("mouseenter",function(){return d._setIndicatorHintVisible(!0)})("mouseleave",function(){return d._setIndicatorHintVisible(!1)}),2&n&&(o.BMQ("aria-sort",d._getAriaSortAttribute()),o.AVh("mat-sort-header-disabled",d._isDisabled()))},inputs:{disabled:"disabled",id:["mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",sortActionDescription:"sortActionDescription",disableClear:"disableClear"},exportAs:["matSortHeader"],features:[o.Vt3],attrs:x,ngContentSelectors:T,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(n,d){1&n&&(o.NAR(),o.j41(0,"div",0)(1,"div",1),o.SdG(2),o.k0s(),o.DNE(3,O,6,6,"div",2),o.k0s()),2&n&&(o.AVh("mat-sort-header-sorted",d._isSorted())("mat-sort-header-position-before","before"===d.arrowPosition),o.BMQ("tabindex",d._isDisabled()?null:0)("role",d._isDisabled()?null:"button"),o.R7$(3),o.Y8G("ngIf",d._renderArrow()))},dependencies:[P.bT],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[_.indicator,_.leftPointer,_.rightPointer,_.arrowOpacity,_.arrowPosition,_.allowChildren]},changeDetection:0})}}return e})(),p=(()=>{class e{static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275mod=o.$C({type:e})}static{this.\u0275inj=o.G2t({providers:[C],imports:[P.MD,g.yE]})}}return e})()}}]); \ No newline at end of file diff --git a/dist/1068.275a15c7ea3f54f5.js b/dist/1068.275a15c7ea3f54f5.js deleted file mode 100644 index 4b2b6861..00000000 --- a/dist/1068.275a15c7ea3f54f5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1068],{71068:(Kt,D,r)=>{r.r(D),r.d(D,{DfManageSchemaContractsComponent:()=>qt});var m=r(18331),t=r(1843),_=r(78227),h=r(68660),k=r(93138),P=r(33329),l=r(62633),F=r(7967),v=r(54688),u=r(7263),O=r(453),b=r(87621),C=r(69069),y=r(91900),c=r(58497),E=r(98337),g=r(52483),p=r(73151),S=r(86606),$=r(75066),j=r(10056),T=r(39258),I=r(62572),f=r(68686);let M=(()=>{class e{constructor(){this.http=(0,t.WQX)(I.Qq)}listTables(n){return this.http.get(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/tables`)}getServiceSummary(n){return this.http.get(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}`)}updateServiceConfig(n,o){return this.http.patch(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}`,o)}promoteService(n){return this.http.post(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/promote`,{})}unlockService(n){return this.http.delete(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}`)}getTableDiff(n,o){return this.http.get(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/tables/${encodeURIComponent(o)}/diff`)}getTableOpenApi(n,o){return this.http.get(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/tables/${encodeURIComponent(o)}/openapi`)}lockTable(n,o){return this.http.post(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/tables/${encodeURIComponent(o)}/lock`,{})}unlockTable(n,o){return this.http.delete(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/tables/${encodeURIComponent(o)}`)}testTable(n,o){return this.http.post(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/tables/${encodeURIComponent(o)}/test`,{})}listSnapshots(n,o){return this.http.get(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/tables/${encodeURIComponent(o)}/snapshots`)}getSnapshotVersion(n,o,a){return this.http.get(`${f.t.SCHEMA_CONTRACT}/${encodeURIComponent(n)}/tables/${encodeURIComponent(o)}/snapshots/${a}`)}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275prov=t.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function w(e,i){1&e&&(t.j41(0,"div",8),t.nrm(1,"mat-progress-spinner",9),t.k0s())}function G(e,i){if(1&e&&(t.j41(0,"div",10)(1,"mat-icon"),t.EFF(2,"error_outline"),t.k0s(),t.EFF(3),t.k0s()),2&e){const n=t.XpG();t.R7$(3),t.SpI(" ",n.errorMessage," ")}}function N(e,i){1&e&&(t.j41(0,"p",16),t.EFF(1," Frozen to the locked contract. It won't change as the database drifts until the table is re-locked or promoted. "),t.k0s())}function V(e,i){1&e&&(t.j41(0,"p",16),t.EFF(1," Generated from live schema. Lock the table (or set mode to auto/strict) to freeze this contract. "),t.k0s())}function A(e,i){if(1&e&&(t.qex(0),t.j41(1,"section",11)(2,"div",12)(3,"div")(4,"strong"),t.EFF(5,"Schema name:"),t.k0s(),t.j41(6,"code"),t.EFF(7),t.k0s()()(),t.j41(8,"span",13),t.EFF(9),t.k0s()(),t.DNE(10,N,2,0,"p",14),t.DNE(11,V,2,0,"p",14),t.j41(12,"pre",15),t.EFF(13),t.k0s(),t.bVm()),2&e){const n=t.XpG();t.R7$(7),t.JRh(n.response.schemaName),t.R7$(1),t.AVh("locked","snapshot"===n.response.source),t.R7$(1),t.SpI(" ","snapshot"===n.response.source?"locked \xb7 v"+n.response.snapshotVersion:"live"," "),t.R7$(1),t.Y8G("ngIf","snapshot"===n.response.source),t.R7$(1),t.Y8G("ngIf","live"===n.response.source),t.R7$(2),t.JRh(n.schemaJson)}}function Y(e,i){if(1&e){const n=t.RV6();t.j41(0,"button",7),t.bIt("click",function(){t.eBV(n);const a=t.XpG();return t.Njj(a.copy())}),t.EFF(1,"Copy JSON"),t.k0s()}}let X=(()=>{class e{constructor(n){this.data=n,this.contracts=(0,t.WQX)(M),this.dialogRef=(0,t.WQX)(l.CP),this.snackBar=(0,t.WQX)(T.UG),this.response=null,this.schemaJson="",this.loading=!0,this.errorMessage=""}ngOnInit(){this.contracts.getTableOpenApi(this.data.service,this.data.table).pipe((0,g.W)(n=>(this.errorMessage=n?.error?.error?.message??n?.message??"Failed to load OpenAPI schema.",(0,p.of)(null)))).subscribe(n=>{this.loading=!1,n&&(this.response=n,this.schemaJson=JSON.stringify(n.schema,null,2))})}copy(){this.schemaJson&&navigator.clipboard?.writeText(this.schemaJson).then(()=>this.snackBar.open("Schema copied to clipboard","Dismiss",{duration:2500}),()=>this.snackBar.open("Copy failed","Dismiss",{duration:2500}))}close(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||e)(t.rXU(l.Vh))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["df-openapi-dialog"]],standalone:!0,features:[t.aNF],decls:10,vars:6,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"openapi-dialog"],["class","loading",4,"ngIf"],["class","error",4,"ngIf"],[4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click",4,"ngIf"],["mat-button","",3,"click"],[1,"loading"],["diameter","32","mode","indeterminate"],[1,"error"],[1,"header-row"],[1,"meta"],[1,"source-badge"],["class","hint",4,"ngIf"],[1,"schema-json"],[1,"hint"]],template:function(o,a){1&o&&(t.j41(0,"h2",0),t.EFF(1),t.k0s(),t.j41(2,"div",1),t.DNE(3,w,2,0,"div",2),t.DNE(4,G,4,1,"div",3),t.DNE(5,A,14,7,"ng-container",4),t.k0s(),t.j41(6,"div",5),t.DNE(7,Y,2,0,"button",6),t.j41(8,"button",7),t.bIt("click",function(){return a.close()}),t.EFF(9,"Close"),t.k0s()()),2&o&&(t.R7$(1),t.Lme(" OpenAPI schema \u2014 ",a.data.service,".",a.data.table," "),t.R7$(2),t.Y8G("ngIf",a.loading),t.R7$(1),t.Y8G("ngIf",a.errorMessage),t.R7$(1),t.Y8G("ngIf",a.response&&!a.loading),t.R7$(2),t.Y8G("ngIf",a.response))},dependencies:[m.MD,m.bT,h.Hl,h.$z,l.hM,l.BI,l.Yi,l.E7,u.m_,u.An,C.D6,C.LG],styles:[".openapi-dialog[_ngcontent-%COMP%]{min-width:600px;max-height:75vh;overflow:auto}.loading[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:24px;gap:8px;align-items:center}.error[_ngcontent-%COMP%]{color:var(--df-danger)}.header-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding-bottom:8px;border-bottom:1px solid var(--df-border-2)}.header-row[_ngcontent-%COMP%] .meta[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--df-surface-2);padding:1px 6px;border-radius:3px}.source-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 12px;border-radius:999px;font-weight:600;font-size:12px;letter-spacing:.5px;background:var(--df-tint-data-bg);color:var(--df-tint-data-fg)}.source-badge.locked[_ngcontent-%COMP%]{background:var(--df-success-soft);color:var(--df-success)}.hint[_ngcontent-%COMP%]{font-size:13px;color:var(--df-text-muted);margin:12px 0}.schema-json[_ngcontent-%COMP%]{background:var(--df-surface-2);padding:12px;border-radius:4px;font-size:11px;max-height:55vh;overflow:auto}"]})}}return e})();function H(e,i){1&e&&(t.j41(0,"div",8),t.nrm(1,"mat-progress-spinner",9),t.k0s())}function B(e,i){if(1&e&&(t.j41(0,"div",10)(1,"mat-icon"),t.EFF(2,"error_outline"),t.k0s(),t.EFF(3),t.k0s()),2&e){const n=t.XpG();t.R7$(3),t.SpI(" ",n.errorMessage," ")}}function J(e,i){1&e&&(t.j41(0,"th",23),t.EFF(1,"Version"),t.k0s())}function z(e,i){if(1&e&&(t.j41(0,"td",24),t.EFF(1),t.k0s()),2&e){const n=i.$implicit;t.R7$(1),t.SpI("v",n.contractVersion,"")}}function U(e,i){1&e&&(t.j41(0,"th",23),t.EFF(1,"Status"),t.k0s())}function W(e,i){if(1&e&&(t.j41(0,"td",24)(1,"span",25),t.EFF(2),t.k0s()()),2&e){const n=i.$implicit;t.R7$(1),t.AVh("active","active"===n.status),t.R7$(1),t.SpI(" ",n.status," ")}}function L(e,i){1&e&&(t.j41(0,"th",23),t.EFF(1,"Hash"),t.k0s())}function Q(e,i){if(1&e&&(t.j41(0,"td",24)(1,"code"),t.EFF(2),t.nI1(3,"slice"),t.k0s()()),2&e){const n=i.$implicit;t.R7$(2),t.SpI("",t.brH(3,1,n.schemaHash,0,12),"\u2026")}}function Z(e,i){1&e&&(t.j41(0,"th",23),t.EFF(1,"Created"),t.k0s())}function q(e,i){if(1&e&&(t.j41(0,"td",24),t.EFF(1),t.k0s()),2&e){const n=i.$implicit;t.R7$(1),t.JRh(n.createdDate||"\u2014")}}function K(e,i){1&e&&t.nrm(0,"th",23)}function tt(e,i){if(1&e){const n=t.RV6();t.j41(0,"td",24)(1,"button",26),t.bIt("click",function(){const s=t.eBV(n).$implicit,d=t.XpG(2);return t.Njj(d.viewVersion(s))}),t.EFF(2),t.k0s()()}if(2&e){const n=i.$implicit,o=t.XpG(2);t.R7$(1),t.Y8G("disabled",o.loadingVersion===n.contractVersion),t.R7$(1),t.SpI(" ",(null==o.selectedVersion?null:o.selectedVersion.contractVersion)===n.contractVersion?"Hide":"View JSON"," ")}}function nt(e,i){1&e&&t.nrm(0,"tr",27)}function et(e,i){if(1&e&&t.nrm(0,"tr",28),2&e){const n=i.$implicit,o=t.XpG(2);t.AVh("selected-row",(null==o.selectedVersion?null:o.selectedVersion.contractVersion)===n.contractVersion)}}function ot(e,i){if(1&e&&(t.j41(0,"div",29)(1,"div",30)(2,"strong"),t.EFF(3),t.k0s(),t.j41(4,"span",31),t.EFF(5),t.k0s()(),t.j41(6,"pre"),t.EFF(7),t.k0s()()),2&e){const n=t.XpG(2);t.R7$(3),t.SpI("Version ",n.selectedVersion.contractVersion," canonical JSON"),t.R7$(2),t.JRh(n.selectedVersion.schemaHash),t.R7$(2),t.JRh(n.selectedSnapshotJson)}}function at(e,i){if(1&e&&(t.j41(0,"div",32),t.nrm(1,"mat-progress-spinner",33),t.EFF(2),t.k0s()),2&e){const n=t.XpG(2);t.R7$(2),t.SpI(" Loading v",n.loadingVersion,"\u2026 ")}}function it(e,i){if(1&e&&(t.qex(0),t.j41(1,"table",11),t.qex(2,12),t.DNE(3,J,2,0,"th",13),t.DNE(4,z,2,1,"td",14),t.bVm(),t.qex(5,15),t.DNE(6,U,2,0,"th",13),t.DNE(7,W,3,3,"td",14),t.bVm(),t.qex(8,16),t.DNE(9,L,2,0,"th",13),t.DNE(10,Q,4,5,"td",14),t.bVm(),t.qex(11,17),t.DNE(12,Z,2,0,"th",13),t.DNE(13,q,2,1,"td",14),t.bVm(),t.qex(14,18),t.DNE(15,K,1,0,"th",13),t.DNE(16,tt,3,2,"td",14),t.bVm(),t.DNE(17,nt,1,0,"tr",19),t.DNE(18,et,1,2,"tr",20),t.k0s(),t.DNE(19,ot,8,3,"div",21),t.DNE(20,at,3,1,"div",22),t.bVm()),2&e){const n=t.XpG();t.R7$(1),t.Y8G("dataSource",n.versions),t.R7$(16),t.Y8G("matHeaderRowDef",n.displayedColumns),t.R7$(1),t.Y8G("matRowDefColumns",n.displayedColumns),t.R7$(1),t.Y8G("ngIf",n.selectedVersion&&n.selectedSnapshotJson),t.R7$(1),t.Y8G("ngIf",null!==n.loadingVersion)}}function st(e,i){1&e&&(t.j41(0,"p",34),t.EFF(1," No snapshots exist for this table yet. "),t.k0s())}let rt=(()=>{class e{constructor(n){this.data=n,this.contracts=(0,t.WQX)(M),this.dialogRef=(0,t.WQX)(l.CP),this.versions=[],this.selectedVersion=null,this.selectedSnapshotJson="",this.loading=!0,this.loadingVersion=null,this.errorMessage="",this.displayedColumns=["version","status","hash","created","actions"]}ngOnInit(){this.contracts.listSnapshots(this.data.service,this.data.table).pipe((0,g.W)(n=>(this.errorMessage=n?.error?.error?.message??n?.message??"Failed to load snapshot history.",(0,p.of)(null)))).subscribe(n=>{this.loading=!1,this.versions=n?.versions??[]})}viewVersion(n){if(this.selectedVersion?.contractVersion===n.contractVersion)return this.selectedVersion=null,void(this.selectedSnapshotJson="");this.loadingVersion=n.contractVersion,this.contracts.getSnapshotVersion(this.data.service,this.data.table,n.contractVersion).pipe((0,g.W)(o=>(this.errorMessage=o?.error?.error?.message??o?.message??"Failed to load version content.",(0,p.of)(null)))).subscribe(o=>{this.loadingVersion=null,o&&(this.selectedVersion=n,this.selectedSnapshotJson=JSON.stringify(o.schema,null,2))})}close(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||e)(t.rXU(l.Vh))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["df-snapshot-history-dialog"]],standalone:!0,features:[t.aNF],decls:10,vars:6,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"history-dialog"],["class","loading",4,"ngIf"],["class","error",4,"ngIf"],[4,"ngIf"],["class","empty",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click"],[1,"loading"],["diameter","32","mode","indeterminate"],[1,"error"],["mat-table","",1,"history-table",3,"dataSource"],["matColumnDef","version"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","status"],["matColumnDef","hash"],["matColumnDef","created"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"selected-row",4,"matRowDef","matRowDefColumns"],["class","json-pane",4,"ngIf"],["class","loading inline",4,"ngIf"],["mat-header-cell",""],["mat-cell",""],[1,"status"],["mat-button","",3,"disabled","click"],["mat-header-row",""],["mat-row",""],[1,"json-pane"],[1,"json-header"],[1,"hash"],[1,"loading","inline"],["diameter","20","mode","indeterminate"],[1,"empty"]],template:function(o,a){1&o&&(t.j41(0,"h2",0),t.EFF(1),t.k0s(),t.j41(2,"div",1),t.DNE(3,H,2,0,"div",2),t.DNE(4,B,4,1,"div",3),t.DNE(5,it,21,5,"ng-container",4),t.DNE(6,st,2,0,"p",5),t.k0s(),t.j41(7,"div",6)(8,"button",7),t.bIt("click",function(){return a.close()}),t.EFF(9,"Close"),t.k0s()()),2&o&&(t.R7$(1),t.Lme(" Snapshot history \u2014 ",a.data.service,".",a.data.table," "),t.R7$(2),t.Y8G("ngIf",a.loading),t.R7$(1),t.Y8G("ngIf",a.errorMessage),t.R7$(1),t.Y8G("ngIf",a.versions.length&&!a.loading),t.R7$(1),t.Y8G("ngIf",!a.loading&&!a.errorMessage&&0===a.versions.length))},dependencies:[m.MD,m.bT,m.P9,h.Hl,h.$z,l.hM,l.BI,l.Yi,l.E7,u.m_,u.An,C.D6,C.LG,c.tP,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.KS,c.$R,c.YZ,c.NB],styles:[".history-dialog[_ngcontent-%COMP%]{min-width:700px;max-height:75vh;overflow:auto}.loading[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:24px;gap:8px;align-items:center}.loading.inline[_ngcontent-%COMP%]{padding:12px;font-size:13px;color:var(--df-text-muted)}.error[_ngcontent-%COMP%]{color:var(--df-danger)}.empty[_ngcontent-%COMP%]{padding:24px;text-align:center;color:var(--df-text-muted)}.history-table[_ngcontent-%COMP%]{width:100%}.history-table[_ngcontent-%COMP%] .status[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:4px;font-size:12px;background:var(--df-surface-2);color:var(--df-text-muted);text-transform:capitalize}.history-table[_ngcontent-%COMP%] .status.active[_ngcontent-%COMP%]{background:var(--df-success-soft);color:var(--df-success);font-weight:500}.history-table[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--df-surface-2);padding:1px 6px;border-radius:3px;font-size:12px}.history-table[_ngcontent-%COMP%] tr.selected-row[_ngcontent-%COMP%]{background:rgba(25,118,210,.04)}.json-pane[_ngcontent-%COMP%]{margin-top:16px;border:1px solid var(--df-border-2);border-radius:4px;overflow:hidden}.json-pane[_ngcontent-%COMP%] .json-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;background:var(--df-surface-2);font-size:13px}.json-pane[_ngcontent-%COMP%] .json-header[_ngcontent-%COMP%] .hash[_ngcontent-%COMP%]{font-family:monospace;font-size:11px;color:var(--df-text-muted)}.json-pane[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{margin:0;padding:12px;font-size:11px;max-height:40vh;overflow:auto;background:var(--df-surface)}"]})}}return e})();var x=r(96984);function ct(e,i){1&e&&(t.j41(0,"div",7),t.nrm(1,"mat-progress-spinner",8),t.k0s())}function lt(e,i){if(1&e&&(t.j41(0,"div",9)(1,"mat-icon"),t.EFF(2,"error_outline"),t.k0s(),t.EFF(3),t.k0s()),2&e){const n=t.XpG();t.R7$(3),t.SpI(" ",n.errorMessage," ")}}function dt(e,i){if(1&e&&(t.j41(0,"div")(1,"strong"),t.EFF(2,"Currently active:"),t.k0s(),t.EFF(3),t.k0s()),2&e){const n=t.XpG(3);t.R7$(3),t.SpI(" v",n.report.activeSnapshotVersion," ")}}function mt(e,i){1&e&&(t.j41(0,"div")(1,"strong"),t.EFF(2,"Currently active:"),t.k0s(),t.j41(3,"em"),t.EFF(4,"none (would be initial lock)"),t.k0s()())}function gt(e,i){if(1&e&&(t.qex(0),t.j41(1,"div")(2,"strong"),t.EFF(3,"Would be:"),t.k0s(),t.EFF(4),t.j41(5,"em"),t.EFF(6),t.k0s()(),t.DNE(7,dt,4,1,"div",4),t.DNE(8,mt,5,0,"div",4),t.bVm()),2&e){const n=t.XpG(2);t.R7$(4),t.SpI(" v",n.report.wouldBeVersion," "),t.R7$(2),t.SpI("(",n.report.wouldBeAction,")"),t.R7$(1),t.Y8G("ngIf",null!==n.report.activeSnapshotVersion),t.R7$(1),t.Y8G("ngIf",null===n.report.activeSnapshotVersion)}}function pt(e,i){if(1&e&&(t.j41(0,"div")(1,"strong"),t.EFF(2,"Hash:"),t.k0s(),t.j41(3,"code"),t.EFF(4),t.nI1(5,"slice"),t.k0s()()),2&e){const n=t.XpG(3);t.R7$(4),t.SpI("",t.brH(5,1,n.report.activeSnapshotHash,0,12),"\u2026")}}function ft(e,i){if(1&e&&(t.qex(0),t.j41(1,"div")(2,"strong"),t.EFF(3,"Active version:"),t.k0s(),t.EFF(4),t.k0s(),t.DNE(5,pt,6,5,"div",4),t.bVm()),2&e){const n=t.XpG(2);t.R7$(4),t.SpI(" v",n.report.activeSnapshotVersion," "),t.R7$(1),t.Y8G("ngIf",n.report.activeSnapshotHash)}}function _t(e,i){if(1&e&&(t.j41(0,"details")(1,"summary"),t.EFF(2,"detail"),t.k0s(),t.j41(3,"pre"),t.EFF(4),t.k0s()()),2&e){const n=t.XpG().$implicit,o=t.XpG(3);t.R7$(4),t.JRh(o.formatDetail(n))}}function ht(e,i){if(1&e&&(t.j41(0,"li")(1,"span",24),t.EFF(2),t.k0s(),t.j41(3,"span",25),t.EFF(4),t.k0s(),t.DNE(5,_t,5,1,"details",4),t.k0s()),2&e){const n=i.$implicit,o=t.XpG(3);t.HbH("severity-"+n.severity),t.R7$(2),t.JRh(n.kind),t.R7$(2),t.JRh(n.path),t.R7$(1),t.Y8G("ngIf",o.hasInterestingDetail(n))}}function ut(e,i){if(1&e&&(t.j41(0,"mat-tab",26)(1,"pre",27),t.EFF(2),t.k0s()()),2&e){const n=t.XpG(3);t.R7$(2),t.JRh(n.candidateJson)}}function Ct(e,i){if(1&e&&(t.j41(0,"mat-tab-group")(1,"mat-tab",20)(2,"ul",21),t.DNE(3,ht,6,5,"li",22),t.k0s()(),t.DNE(4,ut,3,1,"mat-tab",23),t.k0s()),2&e){const n=t.XpG(2);t.R7$(1),t.Mz_("label","Changes (",n.report.summary.totalChanges,")"),t.R7$(2),t.Y8G("ngForOf",n.sortedChanges),t.R7$(1),t.Y8G("ngIf",n.report.candidate)}}function vt(e,i){if(1&e&&(t.j41(0,"p",28),t.EFF(1),t.k0s()),2&e){const n=t.XpG(2);t.R7$(1),t.SpI(" ",n.noDriftMessage," ")}}function bt(e,i){if(1&e&&(t.qex(0),t.j41(1,"section",10)(2,"div",11),t.DNE(3,gt,9,4,"ng-container",4),t.DNE(4,ft,6,2,"ng-container",4),t.j41(5,"div")(6,"strong"),t.EFF(7,"Checked at:"),t.k0s(),t.EFF(8),t.k0s()(),t.j41(9,"div",12)(10,"span",13),t.EFF(11),t.k0s()()(),t.j41(12,"section",14)(13,"span",15),t.EFF(14),t.k0s(),t.j41(15,"span",16),t.EFF(16),t.k0s(),t.j41(17,"span",17),t.EFF(18),t.k0s(),t.j41(19,"span",18),t.EFF(20),t.k0s()(),t.DNE(21,Ct,5,3,"mat-tab-group",4),t.DNE(22,vt,2,1,"p",19),t.bVm()),2&e){const n=t.XpG();t.R7$(3),t.Y8G("ngIf","test"===n.data.mode),t.R7$(1),t.Y8G("ngIf","diff"===n.data.mode),t.R7$(4),t.SpI(" ",n.report.checkedAt,""),t.R7$(2),t.AVh("bad",n.report.hasBreaking)("good",!n.report.hasDrift),t.R7$(1),t.SpI(" ",n.report.hasBreaking?"BREAKING":n.report.hasDrift?"DRIFT":"NO DRIFT"," "),t.R7$(3),t.SpI("",n.report.summary.breakingCount," breaking"),t.R7$(2),t.SpI("",n.report.summary.potentiallyBreakingCount," maybe-breaking"),t.R7$(2),t.SpI("",n.report.summary.additiveCount," additive"),t.R7$(2),t.SpI("",n.report.summary.cosmeticCount," cosmetic"),t.R7$(1),t.Y8G("ngIf",n.report.hasDrift),t.R7$(1),t.Y8G("ngIf",!n.report.hasDrift)}}let R=(()=>{class e{constructor(n){this.data=n,this.contracts=(0,t.WQX)(M),this.dialogRef=(0,t.WQX)(l.CP),this.report=null,this.sortedChanges=[],this.candidateJson="",this.loading=!0,this.errorMessage=""}get titlePrefix(){return"test"===this.data.mode?"Lock preview":"Drift"}get noDriftMessage(){return"test"===this.data.mode?"No drift \u2014 locking now would be a no-op.":"The live schema matches the active snapshot \u2014 no drift detected."}ngOnInit(){("test"===this.data.mode?this.contracts.testTable(this.data.service,this.data.table):this.contracts.getTableDiff(this.data.service,this.data.table)).pipe((0,g.W)(o=>(this.errorMessage=o?.error?.error?.message??o?.message??"Failed to load report.",(0,p.of)(null)))).subscribe(o=>{this.loading=!1,o&&(this.report=this.toViewModel(o),this.sortedChanges=[...o.changes].sort((a,s)=>this.severityRank(a.severity)-this.severityRank(s.severity)),o.candidate&&(this.candidateJson=JSON.stringify(o.candidate,null,2)))})}hasInterestingDetail(n){return Object.keys(n.detail??{}).length>0}formatDetail(n){return JSON.stringify(n.detail,null,2)}close(){this.dialogRef.close()}toViewModel(n){const o="wouldBeVersion"in n;return{checkedAt:n.checkedAt,hasDrift:n.hasDrift,hasBreaking:n.hasBreaking,summary:n.summary,changes:n.changes,candidate:n.candidate,activeSnapshotVersion:n.activeSnapshotVersion??null,activeSnapshotHash:n.activeSnapshotHash??null,wouldBeVersion:o?n.wouldBeVersion:null,wouldBeAction:o?n.wouldBeAction:null}}severityRank(n){switch(n){case"breaking":return 0;case"potentially_breaking":return 1;case"additive":return 2;case"cosmetic":return 3;default:return 4}}static{this.\u0275fac=function(o){return new(o||e)(t.rXU(l.Vh))}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["df-table-diff-dialog"]],standalone:!0,features:[t.aNF],decls:9,vars:6,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"diff-dialog"],["class","loading",4,"ngIf"],["class","error",4,"ngIf"],[4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click"],[1,"loading"],["diameter","32","mode","indeterminate"],[1,"error"],[1,"header-row"],[1,"meta"],[1,"status"],[1,"status-badge"],[1,"counts"],[1,"count","breaking"],[1,"count","maybe"],[1,"count","additive"],[1,"count","cosmetic"],["class","no-drift",4,"ngIf"],[3,"label"],[1,"change-list"],[3,"class",4,"ngFor","ngForOf"],["label","Candidate JSON",4,"ngIf"],[1,"kind"],[1,"path"],["label","Candidate JSON"],[1,"candidate-json"],[1,"no-drift"]],template:function(o,a){1&o&&(t.j41(0,"h2",0),t.EFF(1),t.k0s(),t.j41(2,"div",1),t.DNE(3,ct,2,0,"div",2),t.DNE(4,lt,4,1,"div",3),t.DNE(5,bt,23,14,"ng-container",4),t.k0s(),t.j41(6,"div",5)(7,"button",6),t.bIt("click",function(){return a.close()}),t.EFF(8,"Close"),t.k0s()()),2&o&&(t.R7$(1),t.E5c(" ",a.titlePrefix," \u2014 ",a.data.service,".",a.data.table," "),t.R7$(2),t.Y8G("ngIf",a.loading),t.R7$(1),t.Y8G("ngIf",a.errorMessage),t.R7$(1),t.Y8G("ngIf",a.report&&!a.loading))},dependencies:[m.MD,m.Sq,m.bT,m.P9,h.Hl,h.$z,l.hM,l.BI,l.Yi,l.E7,u.m_,u.An,C.D6,C.LG,x.RI,x.mq,x.T8],styles:[".diff-dialog[_ngcontent-%COMP%]{min-width:600px;max-height:70vh;overflow:auto}.loading[_ngcontent-%COMP%], .error[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:24px}.error[_ngcontent-%COMP%]{color:var(--df-danger);gap:8px;align-items:center}.header-row[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;padding-bottom:12px;border-bottom:1px solid var(--df-border-2)}.meta[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{font-size:13px;margin-bottom:2px}.meta[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--df-surface-2);padding:1px 4px;border-radius:3px}.meta[_ngcontent-%COMP%] em[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic}.status-badge[_ngcontent-%COMP%]{display:inline-block;padding:4px 12px;border-radius:999px;font-weight:600;font-size:12px;letter-spacing:.5px;background:var(--df-warning-soft);color:var(--df-warning)}.status-badge.good[_ngcontent-%COMP%]{background:var(--df-success-soft);color:var(--df-success)}.status-badge.bad[_ngcontent-%COMP%]{background:var(--df-danger-soft);color:var(--df-danger)}.counts[_ngcontent-%COMP%]{display:flex;gap:12px;margin:12px 0;flex-wrap:wrap}.counts[_ngcontent-%COMP%] .count[_ngcontent-%COMP%]{font-size:12px;padding:2px 8px;border-radius:4px;background:var(--df-surface-2)}.counts[_ngcontent-%COMP%] .count.breaking[_ngcontent-%COMP%]{background:var(--df-danger-soft);color:var(--df-danger)}.counts[_ngcontent-%COMP%] .count.maybe[_ngcontent-%COMP%]{background:var(--df-warning-soft);color:var(--df-warning)}.counts[_ngcontent-%COMP%] .count.additive[_ngcontent-%COMP%]{background:var(--df-accent-soft);color:var(--df-accent)}.counts[_ngcontent-%COMP%] .count.cosmetic[_ngcontent-%COMP%]{color:var(--df-text-muted)}.change-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:8px 0 0}.change-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:grid;grid-template-columns:220px 1fr;gap:12px;padding:8px 0;border-bottom:1px solid var(--df-border-2);align-items:baseline}.change-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .kind[_ngcontent-%COMP%]{font-family:monospace;font-size:12px;color:var(--df-text-muted)}.change-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{font-weight:500}.change-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] details[_ngcontent-%COMP%]{grid-column:1/-1;margin-top:4px}.change-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{background:var(--df-surface-2);padding:8px;border-radius:4px;font-size:11px;overflow-x:auto;margin:4px 0 0}.change-list[_ngcontent-%COMP%] li.severity-breaking[_ngcontent-%COMP%]{border-left:3px solid var(--df-danger);padding-left:8px}.change-list[_ngcontent-%COMP%] li.severity-potentially_breaking[_ngcontent-%COMP%]{border-left:3px solid var(--df-warning);padding-left:8px}.change-list[_ngcontent-%COMP%] li.severity-additive[_ngcontent-%COMP%]{border-left:3px solid var(--df-accent);padding-left:8px}.change-list[_ngcontent-%COMP%] li.severity-cosmetic[_ngcontent-%COMP%]{border-left:3px solid var(--df-border);padding-left:8px}.candidate-json[_ngcontent-%COMP%]{background:var(--df-surface-2);padding:12px;border-radius:4px;font-size:11px;max-height:50vh;overflow:auto}.no-drift[_ngcontent-%COMP%]{padding:24px 0;text-align:center;color:var(--df-text-muted)}"]})}}return e})();var Mt=r(42250);function kt(e,i){if(1&e&&(t.j41(0,"mat-option",12),t.EFF(1),t.j41(2,"small"),t.EFF(3),t.k0s()()),2&e){const n=i.$implicit;t.Y8G("value",n.name),t.R7$(1),t.SpI(" ",n.label||n.name," "),t.R7$(2),t.SpI("(",n.type,")")}}function xt(e,i){1&e&&t.nrm(0,"mat-progress-spinner",13)}function Dt(e,i){if(1&e){const n=t.RV6();t.j41(0,"mat-form-field",27)(1,"mat-label"),t.EFF(2,"Runtime enforcement"),t.k0s(),t.j41(3,"mat-select",17),t.bIt("ngModelChange",function(a){t.eBV(n);const s=t.XpG(2);return t.Njj(s.pendingEnforcement=a)})("selectionChange",function(){t.eBV(n);const a=t.XpG(2);return t.Njj(a.onConfigEdit())}),t.j41(4,"mat-option",28),t.EFF(5," off "),t.j41(6,"small"),t.EFF(7,"\u2014 contract is docs/drift only"),t.k0s()(),t.j41(8,"mat-option",29),t.EFF(9," shape_response "),t.j41(10,"small"),t.EFF(11,"\u2014 hide non-contract fields in responses"),t.k0s()(),t.j41(12,"mat-option",20),t.EFF(13," strict "),t.j41(14,"small"),t.EFF(15,"\u2014 shape responses + reject non-contract writes"),t.k0s()()(),t.j41(16,"mat-hint"),t.EFF(17,"applies live to locked tables"),t.k0s()()}if(2&e){const n=t.XpG(2);t.R7$(3),t.Y8G("ngModel",n.pendingEnforcement)}}function Ft(e,i){if(1&e){const n=t.RV6();t.j41(0,"mat-form-field",30)(1,"mat-label"),t.EFF(2,"Retention (snapshots per table)"),t.k0s(),t.j41(3,"input",31),t.bIt("ngModelChange",function(a){t.eBV(n);const s=t.XpG(2);return t.Njj(s.pendingRetention=a)})("input",function(){t.eBV(n);const a=t.XpG(2);return t.Njj(a.onConfigEdit())}),t.k0s(),t.j41(4,"mat-hint"),t.EFF(5,"blank = keep all forever"),t.k0s()()}if(2&e){const n=t.XpG(2);t.R7$(3),t.Y8G("ngModel",n.pendingRetention)}}function Ot(e,i){if(1&e){const n=t.RV6();t.j41(0,"mat-card",14)(1,"mat-card-content")(2,"div",15)(3,"mat-form-field",16)(4,"mat-label"),t.EFF(5,"Mode"),t.k0s(),t.j41(6,"mat-select",17),t.bIt("ngModelChange",function(a){t.eBV(n);const s=t.XpG();return t.Njj(s.pendingMode=a)})("selectionChange",function(){t.eBV(n);const a=t.XpG();return t.Njj(a.onConfigEdit())}),t.j41(7,"mat-option",18),t.EFF(8," none "),t.j41(9,"small"),t.EFF(10,"\u2014 no contract"),t.k0s()(),t.j41(11,"mat-option",19),t.EFF(12," auto "),t.j41(13,"small"),t.EFF(14,"\u2014 promote additive drift automatically"),t.k0s()(),t.j41(15,"mat-option",20),t.EFF(16," strict "),t.j41(17,"small"),t.EFF(18,"\u2014 every change needs manual promotion"),t.k0s()()()(),t.DNE(19,Dt,18,1,"mat-form-field",21),t.DNE(20,Ft,6,1,"mat-form-field",22),t.j41(21,"button",23),t.bIt("click",function(){t.eBV(n);const a=t.XpG();return t.Njj(a.saveConfig())}),t.EFF(22," Save config "),t.k0s()(),t.nrm(23,"mat-divider"),t.j41(24,"div",24)(25,"button",25),t.bIt("click",function(){t.eBV(n);const a=t.XpG();return t.Njj(a.promote())}),t.j41(26,"mat-icon"),t.EFF(27,"auto_awesome"),t.k0s(),t.EFF(28," Auto-promote "),t.k0s(),t.j41(29,"button",26),t.bIt("click",function(){t.eBV(n);const a=t.XpG();return t.Njj(a.unlockService())}),t.j41(30,"mat-icon"),t.EFF(31,"lock_open"),t.k0s(),t.EFF(32," Unlock service "),t.k0s()()()()}if(2&e){const n=t.XpG();t.R7$(6),t.Y8G("ngModel",n.pendingMode),t.R7$(13),t.Y8G("ngIf","none"!==n.pendingMode),t.R7$(1),t.Y8G("ngIf","none"!==n.pendingMode),t.R7$(1),t.Y8G("disabled",!n.configDirty||n.busyAction),t.R7$(4),t.Y8G("disabled",n.busyAction||"none"===n.serviceSummary.mode),t.R7$(4),t.Y8G("disabled",n.busyAction||0===n.serviceSummary.snapshotCounts.active&&"none"===n.serviceSummary.mode)}}function yt(e,i){if(1&e&&(t.j41(0,"div",52)(1,"span",35),t.EFF(2),t.k0s(),t.j41(3,"span",36),t.EFF(4,"Breaking"),t.k0s()()),2&e){const n=t.XpG(2);t.R7$(2),t.JRh(n.tablesResponse.summary.tablesWithBreaking)}}function Et(e,i){if(1&e&&(t.j41(0,"div",34)(1,"span",54),t.EFF(2),t.k0s(),t.j41(3,"span",36),t.EFF(4,"Enforcement"),t.k0s()()),2&e){const n=t.XpG(3);t.R7$(2),t.JRh(n.serviceSummary.runtimeEnforcement)}}function Rt(e,i){if(1&e&&(t.qex(0),t.DNE(1,Et,5,1,"div",53),t.bVm()),2&e){const n=t.XpG(2);t.R7$(1),t.Y8G("ngIf","off"!==n.serviceSummary.runtimeEnforcement)}}function Pt(e,i){if(1&e&&(t.j41(0,"div",34)(1,"span",35),t.EFF(2),t.k0s(),t.j41(3,"span",36),t.EFF(4,"Archived"),t.k0s()()),2&e){const n=t.XpG(3);t.R7$(2),t.JRh(n.serviceSummary.snapshotCounts.archived)}}function St(e,i){if(1&e&&(t.j41(0,"div",34)(1,"span",35),t.EFF(2),t.k0s(),t.j41(3,"span",36),t.EFF(4,"Retention"),t.k0s()()),2&e){const n=t.XpG(3);t.R7$(2),t.JRh(n.serviceSummary.archiveRetentionCount)}}function $t(e,i){if(1&e&&(t.j41(0,"div",34)(1,"span",55),t.EFF(2),t.nI1(3,"date"),t.k0s(),t.j41(4,"span",36),t.EFF(5,"Latest lock"),t.k0s()()),2&e){const n=t.XpG(3);t.R7$(2),t.JRh(t.i5U(3,1,n.serviceSummary.latestPromotion,"mediumDate"))}}function jt(e,i){if(1&e&&(t.qex(0),t.DNE(1,Pt,5,1,"div",53),t.DNE(2,St,5,1,"div",53),t.DNE(3,$t,6,4,"div",53),t.bVm()),2&e){const n=t.XpG(2);t.R7$(1),t.Y8G("ngIf",n.serviceSummary.snapshotCounts.archived>0),t.R7$(1),t.Y8G("ngIf",null!==n.serviceSummary.archiveRetentionCount),t.R7$(1),t.Y8G("ngIf",n.serviceSummary.latestPromotion)}}function Tt(e,i){if(1&e&&(t.j41(0,"div",56)(1,"mat-icon"),t.EFF(2,"error_outline"),t.k0s(),t.EFF(3),t.k0s()),2&e){const n=t.XpG(2);t.R7$(3),t.SpI(" Live describe failed: ",n.tablesResponse.describeError," (snapshot data still shown) ")}}function It(e,i){1&e&&(t.j41(0,"th",57),t.EFF(1,"Table"),t.k0s())}function wt(e,i){if(1&e&&(t.j41(0,"small"),t.EFF(1),t.k0s()),2&e){const n=t.XpG().$implicit;t.R7$(1),t.JRh(n.schema)}}function Gt(e,i){if(1&e&&(t.j41(0,"td",58)(1,"div",59)(2,"strong"),t.EFF(3),t.k0s(),t.DNE(4,wt,2,1,"small",10),t.k0s()()),2&e){const n=i.$implicit;t.R7$(3),t.JRh(n.name),t.R7$(1),t.Y8G("ngIf",n.schema)}}function Nt(e,i){1&e&&(t.j41(0,"th",57),t.EFF(1,"Lock"),t.k0s())}function Vt(e,i){if(1&e&&(t.qex(0),t.j41(1,"mat-icon",62),t.EFF(2,"lock"),t.k0s(),t.EFF(3),t.bVm()),2&e){const n=t.XpG().$implicit;t.R7$(3),t.SpI(" v",null==n.snapshot?null:n.snapshot.version," ")}}function At(e,i){1&e&&(t.j41(0,"mat-icon",63),t.EFF(1,"lock_open"),t.k0s(),t.j41(2,"span",64),t.EFF(3,"\u2014"),t.k0s())}function Yt(e,i){if(1&e&&(t.j41(0,"td",58),t.DNE(1,Vt,4,1,"ng-container",60),t.DNE(2,At,4,0,"ng-template",null,61,t.C5r),t.k0s()),2&e){const n=i.$implicit,o=t.sdS(3);t.R7$(1),t.Y8G("ngIf",n.locked)("ngIfElse",o)}}function Xt(e,i){1&e&&(t.j41(0,"th",57),t.EFF(1,"Drift"),t.k0s())}function Ht(e,i){if(1&e&&(t.j41(0,"td",58)(1,"span",65),t.EFF(2),t.k0s()()),2&e){const n=i.$implicit,o=t.XpG(2);t.R7$(1),t.Y8G("ngClass","badge-"+o.driftBadge(n).color)("matTooltip",n.drift?"breaking: "+n.drift.summary.breakingCount+" \u2022 potentially: "+n.drift.summary.potentiallyBreakingCount+" \u2022 additive: "+n.drift.summary.additiveCount+" \u2022 cosmetic: "+n.drift.summary.cosmeticCount:""),t.R7$(1),t.SpI(" ",o.driftBadge(n).label," ")}}function Bt(e,i){1&e&&(t.j41(0,"th",66),t.EFF(1," Actions "),t.k0s())}function Jt(e,i){if(1&e){const n=t.RV6();t.j41(0,"td",67)(1,"button",23),t.bIt("click",function(){const s=t.eBV(n).$implicit,d=t.XpG(2);return t.Njj(d.lock(s))}),t.EFF(2),t.k0s(),t.j41(3,"button",8),t.bIt("click",function(){const s=t.eBV(n).$implicit,d=t.XpG(2);return t.Njj(d.viewDiff(s))}),t.EFF(4," View drift "),t.k0s(),t.j41(5,"button",68)(6,"mat-icon"),t.EFF(7,"more_vert"),t.k0s()(),t.j41(8,"mat-menu",null,69)(10,"button",70),t.bIt("click",function(){const s=t.eBV(n).$implicit,d=t.XpG(2);return t.Njj(d.test(s))}),t.j41(11,"mat-icon"),t.EFF(12,"science"),t.k0s(),t.j41(13,"span"),t.EFF(14,"Test (preview lock)"),t.k0s()(),t.j41(15,"button",70),t.bIt("click",function(){const s=t.eBV(n).$implicit,d=t.XpG(2);return t.Njj(d.viewOpenApi(s))}),t.j41(16,"mat-icon"),t.EFF(17,"data_object"),t.k0s(),t.j41(18,"span"),t.EFF(19,"OpenAPI schema"),t.k0s()(),t.j41(20,"button",71),t.bIt("click",function(){const s=t.eBV(n).$implicit,d=t.XpG(2);return t.Njj(d.viewHistory(s))}),t.j41(21,"mat-icon"),t.EFF(22,"history"),t.k0s(),t.j41(23,"span"),t.EFF(24,"History"),t.k0s()(),t.j41(25,"button",71),t.bIt("click",function(){const s=t.eBV(n).$implicit,d=t.XpG(2);return t.Njj(d.unlock(s))}),t.j41(26,"mat-icon",72),t.EFF(27,"lock_open"),t.k0s(),t.j41(28,"span"),t.EFF(29,"Unlock"),t.k0s()()()()}if(2&e){const n=i.$implicit,o=t.sdS(9),a=t.XpG(2);t.R7$(1),t.Y8G("disabled",a.busyAction),t.R7$(1),t.SpI(" ",n.locked?"Re-lock":"Lock"," "),t.R7$(1),t.Y8G("disabled",!n.locked||a.busyAction),t.R7$(2),t.Y8G("matMenuTriggerFor",o)("disabled",a.busyAction),t.R7$(15),t.Y8G("disabled",!n.locked),t.R7$(5),t.Y8G("disabled",!n.locked)}}function zt(e,i){1&e&&t.nrm(0,"tr",73)}function Ut(e,i){1&e&&t.nrm(0,"tr",74)}function Wt(e,i){1&e&&(t.j41(0,"div",75),t.nrm(1,"mat-progress-spinner",76),t.k0s())}function Lt(e,i){if(1&e&&(t.qex(0),t.j41(1,"mat-card",32)(2,"mat-card-content")(3,"div",33)(4,"div",34)(5,"span",35),t.EFF(6),t.k0s(),t.j41(7,"span",36),t.EFF(8,"Total tables"),t.k0s()(),t.j41(9,"div",34)(10,"span",35),t.EFF(11),t.k0s(),t.j41(12,"span",36),t.EFF(13,"Locked"),t.k0s()(),t.j41(14,"div",34)(15,"span",35),t.EFF(16),t.k0s(),t.j41(17,"span",36),t.EFF(18,"With drift"),t.k0s()(),t.DNE(19,yt,5,1,"div",37),t.j41(20,"div",34)(21,"span",35),t.EFF(22),t.k0s(),t.j41(23,"span",36),t.EFF(24,"Mode"),t.k0s()(),t.DNE(25,Rt,2,1,"ng-container",10),t.DNE(26,jt,4,3,"ng-container",10),t.k0s(),t.DNE(27,Tt,4,1,"div",38),t.k0s()(),t.j41(28,"mat-card",39)(29,"mat-card-content")(30,"table",40),t.qex(31,41),t.DNE(32,It,2,0,"th",42),t.DNE(33,Gt,5,2,"td",43),t.bVm(),t.qex(34,44),t.DNE(35,Nt,2,0,"th",42),t.DNE(36,Yt,4,2,"td",43),t.bVm(),t.qex(37,45),t.DNE(38,Xt,2,0,"th",42),t.DNE(39,Ht,3,3,"td",43),t.bVm(),t.qex(40,46),t.DNE(41,Bt,2,0,"th",47),t.DNE(42,Jt,30,7,"td",48),t.bVm(),t.DNE(43,zt,1,0,"tr",49),t.DNE(44,Ut,1,0,"tr",50),t.k0s(),t.DNE(45,Wt,2,0,"div",51),t.k0s()(),t.bVm()),2&e){const n=t.XpG();t.R7$(6),t.JRh(n.tablesResponse.summary.tablesTotal),t.R7$(5),t.JRh(n.tablesResponse.summary.tablesLocked),t.R7$(5),t.JRh(n.tablesResponse.summary.tablesWithDrift),t.R7$(3),t.Y8G("ngIf",n.tablesResponse.summary.tablesWithBreaking>0),t.R7$(3),t.JRh(n.tablesResponse.mode),t.R7$(3),t.Y8G("ngIf",n.serviceSummary),t.R7$(1),t.Y8G("ngIf",n.serviceSummary),t.R7$(1),t.Y8G("ngIf",n.tablesResponse.describeError),t.R7$(3),t.Y8G("dataSource",n.tablesResponse.tables),t.R7$(13),t.Y8G("matHeaderRowDef",n.displayedColumns),t.R7$(1),t.Y8G("matRowDefColumns",n.displayedColumns),t.R7$(1),t.Y8G("ngIf",n.loadingTables)}}function Qt(e,i){1&e&&(t.j41(0,"div",77),t.EFF(1," Pick a SQL service above to see its tables and contract status. "),t.k0s())}const Zt=new Set(["mysql","pgsql","sqlite","sqlsrv","oracle","snowflake","ibmdb2","informix","firebird","sqlanywhere","memsql","databricks","trino","hana","dremio"]);let qt=(()=>{class e{constructor(){this.servicesApi=(0,t.WQX)($.Z1),this.contracts=(0,t.WQX)(M),this.dialog=(0,t.WQX)(l.bZ),this.snackbar=(0,t.WQX)(j.L),this.serviceControl=new _.MJ(null),this.sqlServices=[],this.tablesResponse=null,this.serviceSummary=null,this.loadingServices=!1,this.loadingTables=!1,this.busyAction=!1,this.displayedColumns=["name","locked","drift","actions"],this.pendingMode="none",this.pendingEnforcement="off",this.pendingRetention=null,this.configDirty=!1}ngOnInit(){this.loadServices()}loadServices(){this.loadingServices=!0,this.servicesApi.getAll({limit:1e3,sort:"name"}).pipe((0,g.W)(()=>(0,p.of)({resource:[]}))).subscribe(({resource:n})=>{this.sqlServices=(n??[]).filter(o=>Zt.has((o.type??"").toLowerCase())),this.loadingServices=!1})}notify(n,o="info"){this.snackbar.openSnackBar(n,o)}onServiceChange(){if(!this.serviceControl.value)return this.tablesResponse=null,void(this.serviceSummary=null);this.refreshTables()}refreshTables(){const n=this.serviceControl.value;n&&(this.loadingTables=!0,(0,S.p)({tables:this.contracts.listTables(n).pipe((0,g.W)(o=>(this.notify(`Failed to load tables: ${o?.error?.error?.message??o?.message??"unknown error"}`,"error"),(0,p.of)(null)))),summary:this.contracts.getServiceSummary(n).pipe((0,g.W)(()=>(0,p.of)(null)))}).subscribe(({tables:o,summary:a})=>{this.tablesResponse=o,this.serviceSummary=a,this.loadingTables=!1,this.pendingMode=a?.mode??"none",this.pendingEnforcement=a?.runtimeEnforcement??"off",this.pendingRetention=a?.archiveRetentionCount??null,this.configDirty=!1}))}onConfigEdit(){this.configDirty=!0}saveConfig(){const n=this.serviceControl.value;n&&(this.busyAction=!0,this.contracts.updateServiceConfig(n,{mode:this.pendingMode,runtimeEnforcement:this.pendingEnforcement,archiveRetentionCount:this.pendingRetention}).pipe((0,g.W)(o=>(this.notify(`Save failed: ${o?.error?.error?.message??"unknown error"}`,"error"),(0,p.of)(null)))).subscribe(o=>{this.busyAction=!1,o&&(this.serviceSummary=o,this.pendingMode=o.mode,this.pendingEnforcement=o.runtimeEnforcement,this.pendingRetention=o.archiveRetentionCount,this.configDirty=!1,this.notify(`${n}: mode=${o.mode}, enforcement=${o.runtimeEnforcement}`,"success"))}))}promote(){const n=this.serviceControl.value;n&&(this.busyAction=!0,this.contracts.promoteService(n).pipe((0,g.W)(o=>(this.notify(`Promote failed: ${o?.error?.error?.message??"unknown error"}`,"error"),(0,p.of)(null)))).subscribe(o=>{if(this.busyAction=!1,!o)return;const a=o.summary,s=[];a.tablesPromoted>0&&s.push(`${a.tablesPromoted} promoted`),a.tablesNeedsReview>0&&s.push(`${a.tablesNeedsReview} need review`),a.tablesNoDrift>0&&s.push(`${a.tablesNoDrift} unchanged`);const d=a.tablesNeedsReview>0?"warning":"success";this.notify(`${n} (${o.mode}): ${s.join(", ")||"nothing to do"}`,d),this.refreshTables()}))}unlockService(){const n=this.serviceControl.value;n&&confirm(`Archive every active snapshot for "${n}" and clear its mode? Snapshots are kept as history.`)&&(this.busyAction=!0,this.contracts.unlockService(n).pipe((0,g.W)(o=>(this.notify(`Unlock service failed: ${o?.error?.error?.message??"unknown error"}`,"error"),(0,p.of)(null)))).subscribe(o=>{this.busyAction=!1,o&&(this.notify(`${n}: unlocked (${o.snapshotsArchived} snapshot${1===o.snapshotsArchived?"":"s"} archived)`,"success"),this.refreshTables())}))}lock(n){const o=this.serviceControl.value;o&&(this.busyAction=!0,this.contracts.lockTable(o,n.name).pipe((0,g.W)(a=>(this.notify(`Lock failed: ${a?.error?.error?.message??"unknown error"}`,"error"),(0,p.of)(null)))).subscribe(a=>{if(this.busyAction=!1,a){const s=a.lockResult??"updated";this.notify(`${n.name}: ${s} (v${a.contractVersion})`,"no_change"===s?"info":"success"),this.refreshTables()}}))}unlock(n){const o=this.serviceControl.value;o&&(this.busyAction=!0,this.contracts.unlockTable(o,n.name).pipe((0,g.W)(a=>(this.notify(`Unlock failed: ${a?.error?.error?.message??"unknown error"}`,"error"),(0,p.of)(null)))).subscribe(()=>{this.busyAction=!1,this.notify(`${n.name}: unlocked`,"success"),this.refreshTables()}))}viewDiff(n){const o=this.serviceControl.value;o&&this.dialog.open(R,{width:"900px",maxWidth:"95vw",maxHeight:"90vh",data:{service:o,table:n.name,mode:"diff"}})}test(n){const o=this.serviceControl.value;o&&this.dialog.open(R,{width:"900px",maxWidth:"95vw",maxHeight:"90vh",data:{service:o,table:n.name,mode:"test"}})}viewHistory(n){const o=this.serviceControl.value;o&&this.dialog.open(rt,{width:"1000px",maxWidth:"95vw",maxHeight:"90vh",data:{service:o,table:n.name}})}viewOpenApi(n){const o=this.serviceControl.value;o&&this.dialog.open(X,{width:"800px",maxWidth:"95vw",maxHeight:"90vh",data:{service:o,table:n.name}})}driftBadge(n){if(!n.locked)return{label:"unlocked",color:"grey"};const o=n.drift;return o&&o.hasDrift?o.hasBreaking?{label:"breaking",color:"red"}:o.summary.potentiallyBreakingCount>0?{label:"potentially breaking",color:"orange"}:o.summary.additiveCount>0?{label:"additive",color:"yellow"}:o.summary.cosmeticCount>0?{label:"cosmetic",color:"grey"}:{label:"no drift",color:"green"}:{label:"no drift",color:"green"}}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=t.VBU({type:e,selectors:[["df-manage-schema-contracts"]],standalone:!0,features:[t.aNF],decls:21,vars:7,consts:[[1,"schema-contracts-page"],[1,"page-header"],[1,"subhead"],[1,"picker-card"],["appearance","outline",1,"service-picker"],[3,"formControl","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["matSuffix","","diameter","18","mode","indeterminate",4,"ngIf"],["mat-button","",3,"disabled","click"],["class","config-card",4,"ngIf"],[4,"ngIf"],["class","empty-state",4,"ngIf"],[3,"value"],["matSuffix","","diameter","18","mode","indeterminate"],[1,"config-card"],[1,"config-row"],["appearance","outline",1,"mode-picker"],[3,"ngModel","ngModelChange","selectionChange"],["value","none"],["value","auto"],["value","strict"],["appearance","outline","class","enforcement-picker",4,"ngIf"],["appearance","outline","class","retention-input",4,"ngIf"],["mat-stroked-button","","color","primary",3,"disabled","click"],[1,"action-row"],["mat-stroked-button","","color","primary","matTooltip","Compute drift across the service and auto-promote or queue for review per mode",3,"disabled","click"],["mat-button","","color","warn","matTooltip","Archive every active snapshot and clear the service config",3,"disabled","click"],["appearance","outline",1,"enforcement-picker"],["value","off"],["value","shape_response"],["appearance","outline",1,"retention-input"],["matInput","","type","number","min","0","placeholder","keep all",3,"ngModel","ngModelChange","input"],[1,"summary-card"],[1,"summary-grid"],[1,"summary-cell"],[1,"value"],[1,"label"],["class","summary-cell breaking",4,"ngIf"],["class","describe-error",4,"ngIf"],[1,"table-card"],["mat-table","",1,"contract-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","locked"],["matColumnDef","drift"],["matColumnDef","actions"],["mat-header-cell","","class","actions-col",4,"matHeaderCellDef"],["mat-cell","","class","actions-col",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","loading-overlay",4,"ngIf"],[1,"summary-cell","breaking"],["class","summary-cell",4,"ngIf"],[1,"value","enforcement"],[1,"value","date"],[1,"describe-error"],["mat-header-cell",""],["mat-cell",""],[1,"table-name"],[4,"ngIf","ngIfElse"],["unlocked",""],[1,"lock-icon"],[1,"lock-icon","muted"],[1,"muted"],[1,"badge",3,"ngClass","matTooltip"],["mat-header-cell","",1,"actions-col"],["mat-cell","",1,"actions-col"],["mat-icon-button","","matTooltip","More actions","aria-label","More actions",3,"matMenuTriggerFor","disabled"],["rowMenu","matMenu"],["mat-menu-item","",3,"click"],["mat-menu-item","",3,"disabled","click"],["color","warn"],["mat-header-row",""],["mat-row",""],[1,"loading-overlay"],["diameter","32","mode","indeterminate"],[1,"empty-state"]],template:function(o,a){1&o&&(t.j41(0,"div",0)(1,"header",1)(2,"h1"),t.EFF(3,"Schema Contracts"),t.k0s(),t.j41(4,"p",2),t.EFF(5," Lock the public-API shape of a SQL service. Drift is computed against the live database whenever this page is opened. "),t.k0s()(),t.j41(6,"mat-card",3)(7,"mat-card-content")(8,"mat-form-field",4)(9,"mat-label"),t.EFF(10,"SQL service"),t.k0s(),t.j41(11,"mat-select",5),t.bIt("selectionChange",function(){return a.onServiceChange()}),t.DNE(12,kt,4,3,"mat-option",6),t.k0s(),t.DNE(13,xt,1,0,"mat-progress-spinner",7),t.k0s(),t.j41(14,"button",8),t.bIt("click",function(){return a.refreshTables()}),t.j41(15,"mat-icon"),t.EFF(16,"refresh"),t.k0s(),t.EFF(17," Refresh "),t.k0s()()(),t.DNE(18,Ot,33,6,"mat-card",9),t.DNE(19,Lt,46,12,"ng-container",10),t.DNE(20,Qt,2,0,"div",11),t.k0s()),2&o&&(t.R7$(11),t.Y8G("formControl",a.serviceControl),t.R7$(1),t.Y8G("ngForOf",a.sqlServices),t.R7$(1),t.Y8G("ngIf",a.loadingServices),t.R7$(1),t.Y8G("disabled",!a.serviceControl.value||a.loadingTables),t.R7$(4),t.Y8G("ngIf",a.serviceControl.value&&a.serviceSummary),t.R7$(1),t.Y8G("ngIf",a.tablesResponse),t.R7$(1),t.Y8G("ngIf",!a.serviceControl.value&&!a.loadingServices))},dependencies:[m.MD,m.YU,m.Sq,m.bT,m.vh,_.YN,_.me,_.Q0,_.BC,_.VZ,_.vS,_.X1,_.l_,h.Hl,h.$z,h.iY,k.Hu,k.RN,k.m2,P.YN,l.hM,F.w,F.q,v.RG,v.rl,v.nJ,v.MV,v.yw,u.m_,u.An,O.fS,O.fg,C.D6,C.LG,y.Ve,y.VO,Mt.wT,b.Cn,b.kk,b.fb,b.Cp,c.tP,c.Zl,c.tL,c.ji,c.cC,c.YV,c.iL,c.KS,c.$R,c.YZ,c.NB,E.uc,E.oV],styles:[".schema-contracts-page[_ngcontent-%COMP%]{padding:24px;max-width:1200px;margin:0 auto}.schema-contracts-page[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%]{margin-bottom:16px}.schema-contracts-page[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{margin:0 0 4px;font-size:24px;font-weight:500}.schema-contracts-page[_ngcontent-%COMP%] .page-header[_ngcontent-%COMP%] .subhead[_ngcontent-%COMP%]{margin:0;color:var(--df-text-muted);font-size:14px}.schema-contracts-page[_ngcontent-%COMP%] .picker-card[_ngcontent-%COMP%], .schema-contracts-page[_ngcontent-%COMP%] .summary-card[_ngcontent-%COMP%], .schema-contracts-page[_ngcontent-%COMP%] .table-card[_ngcontent-%COMP%], .schema-contracts-page[_ngcontent-%COMP%] .config-card[_ngcontent-%COMP%]{margin-bottom:16px}.schema-contracts-page[_ngcontent-%COMP%] .config-card[_ngcontent-%COMP%] .config-row[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:flex-start;flex-wrap:wrap;margin-bottom:8px}.schema-contracts-page[_ngcontent-%COMP%] .config-card[_ngcontent-%COMP%] .config-row[_ngcontent-%COMP%] .mode-picker[_ngcontent-%COMP%]{min-width:280px;flex:1}.schema-contracts-page[_ngcontent-%COMP%] .config-card[_ngcontent-%COMP%] .config-row[_ngcontent-%COMP%] .enforcement-picker[_ngcontent-%COMP%]{min-width:300px;flex:1}.schema-contracts-page[_ngcontent-%COMP%] .config-card[_ngcontent-%COMP%] .config-row[_ngcontent-%COMP%] .retention-input[_ngcontent-%COMP%]{min-width:220px;flex:1}.schema-contracts-page[_ngcontent-%COMP%] .config-card[_ngcontent-%COMP%] .config-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:8px}.schema-contracts-page[_ngcontent-%COMP%] .config-card[_ngcontent-%COMP%] mat-divider[_ngcontent-%COMP%]{margin:8px 0 16px}.schema-contracts-page[_ngcontent-%COMP%] .config-card[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%]{display:flex;gap:12px;flex-wrap:wrap}.schema-contracts-page[_ngcontent-%COMP%] .picker-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.schema-contracts-page[_ngcontent-%COMP%] .picker-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .service-picker[_ngcontent-%COMP%]{min-width:320px;flex:1}.schema-contracts-page[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%]{display:flex;gap:24px 32px;flex-wrap:wrap;row-gap:16px}.schema-contracts-page[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%] .summary-cell[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;min-width:80px}.schema-contracts-page[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%] .summary-cell[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:28px;font-weight:500;line-height:1.1}.schema-contracts-page[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%] .summary-cell[_ngcontent-%COMP%] .value.date[_ngcontent-%COMP%]{font-size:18px;font-weight:400;white-space:nowrap}.schema-contracts-page[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%] .summary-cell[_ngcontent-%COMP%] .value.enforcement[_ngcontent-%COMP%]{font-size:16px;font-weight:500;white-space:nowrap;color:var(--df-accent)}.schema-contracts-page[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%] .summary-cell[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:var(--df-text-muted)}.schema-contracts-page[_ngcontent-%COMP%] .summary-grid[_ngcontent-%COMP%] .summary-cell.breaking[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{color:var(--df-danger)}.schema-contracts-page[_ngcontent-%COMP%] .describe-error[_ngcontent-%COMP%]{margin-top:12px;display:flex;gap:8px;align-items:center;color:var(--df-danger);font-size:13px}.schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%]{width:100%}.schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%] .table-name[_ngcontent-%COMP%]{display:flex;flex-direction:column}.schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%] .table-name[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:500}.schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%] .table-name[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{color:var(--df-text-muted)}.schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%] .lock-icon[_ngcontent-%COMP%]{vertical-align:middle;font-size:18px;width:18px;height:18px;margin-right:4px}.schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%] .lock-icon.muted[_ngcontent-%COMP%], .schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%]{color:var(--df-text-muted)}.schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%] .actions-col[_ngcontent-%COMP%]{width:240px;text-align:right;white-space:nowrap}.schema-contracts-page[_ngcontent-%COMP%] .contract-table[_ngcontent-%COMP%] .actions-col[_ngcontent-%COMP%] button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{margin-left:4px}.schema-contracts-page[_ngcontent-%COMP%] .badge[_ngcontent-%COMP%]{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:500;text-transform:capitalize}.schema-contracts-page[_ngcontent-%COMP%] .badge-red[_ngcontent-%COMP%]{background:var(--df-danger-soft);color:var(--df-danger)}.schema-contracts-page[_ngcontent-%COMP%] .badge-orange[_ngcontent-%COMP%]{background:var(--df-warning-soft);color:var(--df-warning)}.schema-contracts-page[_ngcontent-%COMP%] .badge-yellow[_ngcontent-%COMP%]{background:var(--df-accent-soft);color:var(--df-accent)}.schema-contracts-page[_ngcontent-%COMP%] .badge-green[_ngcontent-%COMP%]{background:var(--df-success-soft);color:var(--df-success)}.schema-contracts-page[_ngcontent-%COMP%] .badge-grey[_ngcontent-%COMP%]{background:var(--df-surface-2);color:var(--df-text-muted)}.schema-contracts-page[_ngcontent-%COMP%] .loading-overlay[_ngcontent-%COMP%]{display:flex;justify-content:center;padding:24px}.schema-contracts-page[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{text-align:center;color:var(--df-text-muted);padding:48px 16px;font-size:14px}"]})}}return e})()}}]); \ No newline at end of file diff --git a/dist/1231.4b083ab1f84c3038.js b/dist/1231.4b083ab1f84c3038.js new file mode 100644 index 00000000..d0388a2b --- /dev/null +++ b/dist/1231.4b083ab1f84c3038.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1231],{91231:(je,Y,p)=>{p.r(Y),p.d(Y,{DfApiBuilderComponent:()=>Bn});var c=p(60177),L=p(21626),e=p(17705),W=p(71985),ie=p(56977);function J(i){i||((0,e.Af3)(J),i=(0,e.WQX)(e.abz));const o=new W.c(t=>i.onDestroy(t.next.bind(t)));return t=>t.pipe((0,ie.Q)(o))}Error;var m=p(89417),pe=p(60850),P=p(88834),O=p(25596),ye=p(82765),w=p(32102),T=p(99213),H=p(99631),K=p(86600),we=p(67575),Q=p(82798),Z=p(95416),de=p(96850),ee=p(14823),S=p(70980),Ee=p(33609),u=p(63532),G=p(95753),h=p(89642);function Ge(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",21)(1,"span")(2,"mat-icon",22),e.EFF(3,"storage"),e.k0s(),e.j41(4,"strong"),e.EFF(5),e.k0s(),e.j41(6,"small"),e.EFF(7),e.k0s()(),e.j41(8,"button",23),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(3);return e.Njj(a.removeService(s))}),e.j41(9,"mat-icon"),e.EFF(10,"close"),e.k0s()()()}if(2&i){const t=o.$implicit,n=e.XpG(3);e.R7$(5),e.JRh(n.serviceLabel(t.serviceId)),e.R7$(2),e.JRh(n.serviceType(t.serviceId))}}function Ve(i,o){if(1&i&&(e.j41(0,"div",19),e.DNE(1,Ge,11,2,"div",20),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.workspace)("ngForTrackBy",t.trackById)}}function Xe(i,o){1&i&&(e.j41(0,"p",24),e.EFF(1," Add the first data source before creating endpoints. "),e.k0s())}function Ye(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.id),e.R7$(1),e.Lme(" ",t.label||t.name," (",t.type,") ")}}function Le(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",28)(1,"mat-icon"),e.EFF(2,"account_tree"),e.k0s(),e.j41(3,"span")(4,"strong"),e.EFF(5),e.k0s(),e.j41(6,"small"),e.EFF(7),e.k0s()(),e.j41(8,"span",29),e.EFF(9,"Shared"),e.k0s(),e.j41(10,"button",30),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(3);return e.Njj(a.removeRelationship(s))}),e.j41(11,"mat-icon"),e.EFF(12,"delete"),e.k0s()()()}if(2&i){const t=o.$implicit,n=e.XpG(3);e.R7$(5),e.JRh(t.alias||t.name),e.R7$(2),e.JRh(n.relationshipSummary(t))}}function We(i,o){if(1&i&&(e.j41(0,"div",26),e.DNE(1,Le,13,2,"div",27),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.relationships)("ngForTrackBy",t.trackById)}}function Je(i,o){1&i&&(e.j41(0,"p",31),e.EFF(1," No related data configured yet. "),e.k0s())}function ze(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function qe(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Ue(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function He(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function Ke(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Qe(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Ze(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function et(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function tt(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function nt(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function it(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",51)(1,"div",52)(2,"mat-icon"),e.EFF(3,"device_hub"),e.k0s(),e.j41(4,"span")(5,"strong"),e.EFF(6,"Junction table"),e.k0s(),e.j41(7,"small"),e.EFF(8,"Tell DreamFactory how the two datasets are connected."),e.k0s()()(),e.j41(9,"div",35)(10,"mat-form-field",10)(11,"mat-label"),e.EFF(12,"Junction source"),e.k0s(),e.j41(13,"mat-select",36),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(3);return e.Njj(s.rel.junction_service=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(3);return e.Njj(r.sourceChanged("junction"))}),e.DNE(14,Ze,2,2,"mat-option",12),e.k0s()(),e.j41(15,"mat-form-field",10)(16,"mat-label"),e.EFF(17,"Junction table"),e.k0s(),e.j41(18,"mat-select",37),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(3);return e.Njj(s.rel.junction_table=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(3);return e.Njj(r.tableChanged("junction"))}),e.DNE(19,et,2,2,"mat-option",38),e.k0s()(),e.j41(20,"mat-form-field",10)(21,"mat-label"),e.EFF(22,"Field matching start"),e.k0s(),e.j41(23,"mat-select",39),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(3);return e.Njj(s.rel.junction_field=r)}),e.DNE(24,tt,2,2,"mat-option",38),e.k0s()(),e.j41(25,"mat-form-field",10)(26,"mat-label"),e.EFF(27,"Field matching related"),e.k0s(),e.j41(28,"mat-select",39),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(3);return e.Njj(s.rel.junction_ref_field=r)}),e.DNE(29,nt,2,2,"mat-option",38),e.k0s()()()()}if(2&i){const t=e.XpG(3);e.R7$(13),e.Y8G("ngModel",t.rel.junction_service),e.R7$(1),e.Y8G("ngForOf",t.workspaceServices)("ngForTrackBy",t.trackById),e.R7$(4),e.Y8G("ngModel",t.rel.junction_table)("disabled",!t.rel.junction_service),e.R7$(1),e.Y8G("ngForOf",t.junctionTables),e.R7$(4),e.Y8G("ngModel",t.rel.junction_field)("disabled",!t.rel.junction_table),e.R7$(1),e.Y8G("ngForOf",t.junctionFields),e.R7$(4),e.Y8G("ngModel",t.rel.junction_ref_field)("disabled",!t.rel.junction_table),e.R7$(1),e.Y8G("ngForOf",t.junctionFields)}}function rt(i,o){if(1&i&&(e.j41(0,"p",53)(1,"mat-icon"),e.EFF(2,"arrow_forward"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.JRh(t.relPreview())}}function st(i,o){if(1&i){const t=e.RV6();e.j41(0,"section",32)(1,"div",33)(2,"span",34),e.EFF(3,"1"),e.k0s(),e.j41(4,"span")(5,"strong"),e.EFF(6,"Choose the starting data"),e.k0s(),e.j41(7,"small"),e.EFF(8,"The records your endpoint returns first."),e.k0s()()(),e.j41(9,"div",35)(10,"mat-form-field",10)(11,"mat-label"),e.EFF(12,"Data source"),e.k0s(),e.j41(13,"mat-select",36),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.service=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.sourceChanged("local"))}),e.DNE(14,ze,2,2,"mat-option",12),e.k0s()(),e.j41(15,"mat-form-field",10)(16,"mat-label"),e.EFF(17,"Table"),e.k0s(),e.j41(18,"mat-select",37),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.table=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.tableChanged("local"))}),e.DNE(19,qe,2,2,"mat-option",38),e.k0s()(),e.j41(20,"mat-form-field",10)(21,"mat-label"),e.EFF(22,"Matching field"),e.k0s(),e.j41(23,"mat-select",39),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.field=r)}),e.DNE(24,Ue,2,2,"mat-option",38),e.k0s()()(),e.j41(25,"div",33)(26,"span",34),e.EFF(27,"2"),e.k0s(),e.j41(28,"span")(29,"strong"),e.EFF(30,"Add the related data"),e.k0s(),e.j41(31,"small"),e.EFF(32,"Choose what should be attached to each starting record."),e.k0s()()(),e.j41(33,"div",35)(34,"mat-form-field",10)(35,"mat-label"),e.EFF(36,"Relationship"),e.k0s(),e.j41(37,"mat-select",11),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.type=r)}),e.j41(38,"mat-option",40),e.EFF(39,"Many to one"),e.k0s(),e.j41(40,"mat-option",41),e.EFF(41,"One to one"),e.k0s(),e.j41(42,"mat-option",42),e.EFF(43,"One to many"),e.k0s(),e.j41(44,"mat-option",43),e.EFF(45,"Many to many"),e.k0s()()(),e.j41(46,"mat-form-field",10)(47,"mat-label"),e.EFF(48,"Related source"),e.k0s(),e.j41(49,"mat-select",36),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.ref_service=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.sourceChanged("ref"))}),e.DNE(50,He,2,2,"mat-option",12),e.k0s()(),e.j41(51,"mat-form-field",10)(52,"mat-label"),e.EFF(53,"Related table"),e.k0s(),e.j41(54,"mat-select",37),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.ref_table=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.tableChanged("ref"))}),e.DNE(55,Ke,2,2,"mat-option",38),e.k0s()(),e.j41(56,"mat-form-field",10)(57,"mat-label"),e.EFF(58,"Related field"),e.k0s(),e.j41(59,"mat-select",39),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.ref_field=r)}),e.DNE(60,Qe,2,2,"mat-option",38),e.k0s()()(),e.j41(61,"p",44),e.EFF(62),e.k0s(),e.DNE(63,it,30,12,"div",45),e.j41(64,"div",46)(65,"mat-form-field",10)(66,"mat-label"),e.EFF(67,"Return this data as"),e.k0s(),e.j41(68,"input",47),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.name=r)}),e.k0s(),e.j41(69,"mat-hint"),e.EFF(70,"Optional response field name"),e.k0s()()(),e.j41(71,"div",48),e.DNE(72,rt,5,1,"p",49),e.j41(73,"button",50),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.createRelationship())}),e.EFF(74," Save relationship "),e.k0s()()()}if(2&i){const t=e.XpG(2);e.R7$(13),e.Y8G("ngModel",t.rel.service),e.R7$(1),e.Y8G("ngForOf",t.workspaceServices)("ngForTrackBy",t.trackById),e.R7$(4),e.Y8G("ngModel",t.rel.table)("disabled",!t.rel.service),e.R7$(1),e.Y8G("ngForOf",t.localTables),e.R7$(4),e.Y8G("ngModel",t.rel.field)("disabled",!t.rel.table),e.R7$(1),e.Y8G("ngForOf",t.localFields),e.R7$(13),e.Y8G("ngModel",t.rel.type),e.R7$(12),e.Y8G("ngModel",t.rel.ref_service),e.R7$(1),e.Y8G("ngForOf",t.workspaceServices)("ngForTrackBy",t.trackById),e.R7$(4),e.Y8G("ngModel",t.rel.ref_table)("disabled",!t.rel.ref_service),e.R7$(1),e.Y8G("ngForOf",t.refTables),e.R7$(4),e.Y8G("ngModel",t.rel.ref_field)("disabled",!t.rel.ref_table),e.R7$(1),e.Y8G("ngForOf",t.refFields),e.R7$(2),e.JRh(t.typeHint()),e.R7$(1),e.Y8G("ngIf","many_many"===t.rel.type),e.R7$(5),e.Y8G("ngModel",t.rel.name),e.R7$(4),e.Y8G("ngIf",t.relPreview()),e.R7$(1),e.Y8G("disabled",!t.relReady())}}function ot(i,o){if(1&i){const t=e.RV6();e.j41(0,"mat-card",1)(1,"div",2)(2,"div")(3,"h3"),e.EFF(4,"Data sources"),e.k0s(),e.j41(5,"p"),e.EFF(6," Choose the services this API can use, then connect related records when an endpoint needs data from more than one source. "),e.k0s()(),e.j41(7,"span",3),e.EFF(8),e.k0s()(),e.j41(9,"p",4)(10,"mat-icon"),e.EFF(11,"info"),e.k0s(),e.j41(12,"span"),e.EFF(13," Relationships use DreamFactory's shared schema configuration and can be reused by other APIs. "),e.k0s()(),e.j41(14,"h4",5),e.EFF(15,"Available to this API"),e.k0s(),e.j41(16,"p",6),e.EFF(17,"Endpoints can only read from sources listed here."),e.k0s(),e.DNE(18,Ve,2,2,"div",7),e.DNE(19,Xe,2,0,"ng-template",null,8,e.C5r),e.j41(21,"div",9)(22,"mat-form-field",10)(23,"mat-label"),e.EFF(24,"Add a data source"),e.k0s(),e.j41(25,"mat-select",11),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.serviceToAdd=r)}),e.DNE(26,Ye,2,3,"mat-option",12),e.k0s()(),e.j41(27,"button",13),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.addService())}),e.j41(28,"mat-icon"),e.EFF(29,"add"),e.k0s(),e.EFF(30," Add source "),e.k0s()(),e.nrm(31,"div",14),e.j41(32,"div",15)(33,"div")(34,"h4"),e.EFF(35,"Related data"),e.k0s(),e.j41(36,"p"),e.EFF(37," Connect records across sources so endpoints can return them together. "),e.k0s()(),e.j41(38,"button",13),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.toggleRelationshipEditor())}),e.j41(39,"mat-icon"),e.EFF(40),e.k0s(),e.EFF(41),e.k0s()(),e.DNE(42,We,2,2,"div",16),e.DNE(43,Je,2,0,"p",17),e.DNE(44,st,75,24,"section",18),e.k0s()}if(2&i){const t=e.sdS(20),n=e.XpG();e.R7$(8),e.Lme(" ",n.workspace.length," source",1===n.workspace.length?"":"s"," "),e.R7$(10),e.Y8G("ngIf",n.workspace.length)("ngIfElse",t),e.R7$(7),e.Y8G("ngModel",n.serviceToAdd),e.R7$(1),e.Y8G("ngForOf",n.addableServices)("ngForTrackBy",n.trackById),e.R7$(1),e.Y8G("disabled",!n.serviceToAdd),e.R7$(11),e.Y8G("disabled",n.workspace.length<1),e.R7$(2),e.JRh(n.relationshipEditorOpen?"close":"add_link"),e.R7$(1),e.SpI(" ",n.relationshipEditorOpen?"Close":"Add related data"," "),e.R7$(1),e.Y8G("ngIf",n.relationships.length),e.R7$(1),e.Y8G("ngIf",!n.relationships.length),e.R7$(1),e.Y8G("ngIf",n.relationshipEditorOpen)}}let at=(()=>{class i{constructor(){this.apiId=null,this.workspaceChanged=new e.bkB,this.http=(0,e.WQX)(L.Qq),this.transloco=(0,e.WQX)(Ee.JO),this.snack=(0,e.WQX)(Z.UG),this.allServices=[],this.workspace=[],this.relationships=[],this.serviceToAdd=null,this.relationshipEditorOpen=!1,this.localTables=[],this.localFields=[],this.refTables=[],this.refFields=[],this.junctionTables=[],this.junctionFields=[],this.rel=this.emptyRel(),this.workspaceServices=[],this.addableServices=[]}ngOnChanges(t){t.apiId&&this.apiId&&(this.loadServices(),this.loadWorkspace(),this.loadRelationships(),this.rel=this.emptyRel())}emptyRel(){return{service:null,table:null,field:null,type:"belongs_to",ref_service:null,ref_table:null,ref_field:null,junction_service:null,junction_table:null,junction_field:null,junction_ref_field:null,name:""}}serviceName(t){return this.allServices.find(n=>n.id===t)?.name??`#${t}`}serviceLabel(t){const n=this.allServices.find(r=>r.id===t);return n?.label||n?.name||`#${t}`}serviceType(t){return this.allServices.find(n=>n.id===t)?.type??"service"}refreshServiceLists(){const t=new Set(this.workspace.map(n=>n.serviceId));this.workspaceServices=this.allServices.filter(n=>t.has(n.id)),this.addableServices=this.allServices.filter(n=>!t.has(n.id))}trackById(t,n){return n.id}relReady(){const t=this.rel;return!!(t.service&&t.table&&t.field&&t.ref_service&&t.ref_table&&t.ref_field&&("many_many"!==t.type||t.junction_service&&t.junction_table&&t.junction_field&&t.junction_ref_field))}toggleRelationshipEditor(){this.relationshipEditorOpen=!this.relationshipEditorOpen,this.relationshipEditorOpen||(this.rel=this.emptyRel())}relationshipSummary(t){return`${this.relationshipTypeLabel(t.type)} from ${t.service}.${t.table} to ${t.refService&&t.refTable?`${t.refService}.${t.refTable}`:"related dataset"}`}relationshipTypeLabel(t){switch(t){case"belongs_to":return"Many to one";case"has_one":return"One to one";case"has_many":return"One to many";case"many_many":return"Many to many";default:return t.replaceAll("_"," ")}}relPreview(){const t=this.rel;return t.service&&t.table&&t.field?`${t.service}.${t.table}.${t.field} ${t.type.replace("_"," ")} ${t.ref_service&&t.ref_table&&t.ref_field?`${t.ref_service}.${t.ref_table}.${t.ref_field}`:"(choose the related record)"}${t.name?`, attached as "${t.name}"`:""}`:""}typeHint(){switch(this.rel.type){case"belongs_to":return"Each record here points to one record in the other service (an order belongs to one customer).";case"has_many":return"Each record here links to many records in the other service (a customer has many orders).";case"has_one":return"Each record here links to exactly one record in the other service.";case"many_many":return"Many records on each side connect through a junction table.";default:return""}}loadServices(){this.http.get(`${u.C}/system/service`,{params:{fields:"id,name,type,label",limit:500}}).subscribe(t=>{this.allServices=t.resource??[],this.refreshServiceLists()})}loadWorkspace(){this.http.get(`${u.C}/api_builder/services`,{params:{filter:`api_id=${this.apiId}`}}).subscribe(t=>{this.workspace=t.resource??[],this.refreshServiceLists()})}loadRelationships(){this.http.get(`${u.C}/api_builder/relationships`,{params:{api_id:`${this.apiId}`}}).subscribe(t=>this.relationships=t.resource??[])}addService(){!this.serviceToAdd||!this.apiId||this.http.post(`${u.C}/api_builder/services`,{resource:[{apiId:this.apiId,serviceId:this.serviceToAdd}]},{context:(0,h.PH)()}).subscribe({next:()=>{this.serviceToAdd=null,this.loadWorkspace(),this.workspaceChanged.emit()},error:t=>this.fail(t)})}removeService(t){this.http.delete(`${u.C}/api_builder/services/${t.id}`,{context:(0,h.PH)()}).subscribe({next:()=>{this.loadWorkspace(),this.workspaceChanged.emit()},error:n=>this.fail(n)})}sourceChanged(t){return"local"===t?(this.rel.table=null,this.rel.field=null,this.localTables=[],this.localFields=[],void this.loadTables(this.rel.service,t)):"ref"===t?(this.rel.ref_table=null,this.rel.ref_field=null,this.refTables=[],this.refFields=[],void this.loadTables(this.rel.ref_service,t)):(this.rel.junction_table=null,this.rel.junction_field=null,this.rel.junction_ref_field=null,this.junctionTables=[],this.junctionFields=[],void this.loadTables(this.rel.junction_service,t))}tableChanged(t){return"local"===t?(this.rel.field=null,void this.loadFields(this.rel.service,this.rel.table,t)):"ref"===t?(this.rel.ref_field=null,void this.loadFields(this.rel.ref_service,this.rel.ref_table,t)):(this.rel.junction_field=null,this.rel.junction_ref_field=null,void this.loadFields(this.rel.junction_service,this.rel.junction_table,t))}loadTables(t,n){t&&this.http.get(`${u.C}/${t}/_table`,{params:{fields:"name"}}).subscribe(r=>{const s=(r.resource??[]).map(a=>a.name);"local"===n?this.localTables=s:"ref"===n?this.refTables=s:this.junctionTables=s})}loadFields(t,n,r){!t||!n||this.http.get(`${u.C}/${t}/_schema/${n}`,{params:{fields:"name"}}).subscribe(s=>{const a=(s.field??[]).map(l=>l.name);"local"===r?this.localFields=a:"ref"===r?this.refFields=a:this.junctionFields=a})}createRelationship(){if(!this.relReady()||!this.apiId)return;const t=this.rel,n={apiId:this.apiId,service:t.service,table:t.table,field:t.field,type:t.type,refService:t.ref_service,refTable:t.ref_table,refField:t.ref_field,name:t.name||void 0};"many_many"===t.type&&(n.junctionService=t.junction_service,n.junctionTable=t.junction_table,n.junctionField=t.junction_field,n.junctionRefField=t.junction_ref_field),this.http.post(`${u.C}/api_builder/relationships`,n,{context:(0,h.PH)()}).subscribe({next:()=>{this.rel=this.emptyRel(),this.relationshipEditorOpen=!1,this.loadRelationships(),this.snack.open("Relationship created.","OK",{duration:2500})},error:r=>this.fail(r)})}removeRelationship(t){window.confirm(`Delete the shared relationship "${t.alias||t.name}"? Other APIs using this DreamFactory schema relationship may stop working.`)&&this.http.delete(`${u.C}/api_builder/relationships/${t.id}`,{context:(0,h.PH)()}).subscribe({next:()=>this.loadRelationships(),error:r=>this.fail(r)})}fail(t){this.snack.open(this.transloco.translate((0,G.cQ)(t).message),"Dismiss",{duration:5e3})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-api-builder-workspace"]],inputs:{apiId:"apiId"},outputs:{workspaceChanged:"workspaceChanged"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[["class","ws-card",4,"ngIf"],[1,"ws-card"],[1,"ws-intro"],[1,"ws-count"],[1,"ws-scope-note"],[1,"ws-step"],[1,"ws-hint"],["class","ws-source-list",4,"ngIf","ngIfElse"],["noSources",""],[1,"ws-add"],["appearance","outline"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["mat-stroked-button","","type","button",3,"disabled","click"],[1,"ws-divider"],[1,"ws-section-head"],["class","ws-relationships",4,"ngIf"],["class","ws-empty-inline",4,"ngIf"],["class","ws-rel-editor",4,"ngIf"],[1,"ws-source-list"],["class","ws-source",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ws-source"],[1,"ws-li-icon"],["mat-icon-button","","type","button","aria-label","Remove data source","matTooltip","Remove from this API",3,"click"],[1,"ws-empty-card"],[3,"value"],[1,"ws-relationships"],["class","ws-relationship",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ws-relationship"],[1,"ws-shared-badge"],["mat-icon-button","","type","button","color","warn","aria-label","Delete shared relationship","matTooltip","Delete shared schema relationship",3,"click"],[1,"ws-empty-inline"],[1,"ws-rel-editor"],[1,"ws-editor-heading"],[1,"ws-step-number"],[1,"ws-rel-grid"],[3,"ngModel","ngModelChange","selectionChange"],[3,"ngModel","disabled","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","disabled","ngModelChange"],["value","belongs_to"],["value","has_one"],["value","has_many"],["value","many_many"],[1,"ws-type-hint"],["class","ws-junction",4,"ngIf"],[1,"ws-output-name"],["matInput","","maxlength","100","placeholder","e.g. customer",3,"ngModel","ngModelChange"],[1,"ws-rel-footer"],["class","ws-rel-preview",4,"ngIf"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],[1,"ws-junction"],[1,"ws-editor-heading","compact"],[1,"ws-rel-preview"]],template:function(n,r){1&n&&e.DNE(0,ot,45,14,"mat-card",0),2&n&&e.Y8G("ngIf",r.apiId)},dependencies:[c.MD,c.Sq,c.bT,m.YN,m.me,m.BC,m.tU,m.vS,P.Hl,P.$z,P.iY,O.Hu,O.RN,w.RG,w.rl,w.nJ,w.MV,T.m_,T.An,H.fS,H.fg,K.Sy,K.wT,Q.Ve,Q.VO,Z._T,ee.uc,ee.oV],styles:[".ws-card[_ngcontent-%COMP%]{margin-top:16px;padding:16px}.ws-intro[_ngcontent-%COMP%]{border-left:3px solid #3f51b5;padding-left:12px;margin-bottom:16px}.ws-intro[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 4px}.ws-intro[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--df-text-2);font-size:13px;margin:0;max-width:720px}.ws-step[_ngcontent-%COMP%]{margin:20px 0 4px;font-size:15px}.ws-subhead[_ngcontent-%COMP%]{font-weight:600;font-size:13px;margin:14px 0 4px}.ws-hint[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:12px;margin:0 0 8px;max-width:720px}.ws-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0 0 12px}.ws-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:3px 0}.ws-li-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px;vertical-align:middle;margin-right:6px;opacity:.6}.ws-rel-detail[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:12px}.ws-empty[_ngcontent-%COMP%]{color:var(--df-text-faint);font-style:italic}.ws-add[_ngcontent-%COMP%], .ws-rel-form[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.ws-rel-form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:150px}.ws-rel-form[_ngcontent-%COMP%] .ws-name-field[_ngcontent-%COMP%]{width:240px}.ws-side-label[_ngcontent-%COMP%]{flex-basis:100%;font-weight:600;font-size:12px;color:#3f51b5;margin-top:8px}.ws-type-hint[_ngcontent-%COMP%]{flex-basis:100%;color:var(--df-text-muted);font-size:12px;margin:0}.ws-rel-footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;margin-top:12px;flex-wrap:wrap}.ws-rel-preview[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin:0;font-family:monospace;font-size:13px;background:#f2f3fb;color:#303f9f;padding:6px 10px;border-radius:4px}.ws-rel-preview[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px}.ws-intro[_ngcontent-%COMP%]{align-items:flex-start;display:flex;justify-content:space-between}.ws-count[_ngcontent-%COMP%], .ws-shared-badge[_ngcontent-%COMP%]{background:rgba(63,81,181,.1);border-radius:999px;color:#303f9f;flex:none;font-size:11px;font-weight:700;padding:4px 9px}.ws-scope-note[_ngcontent-%COMP%]{align-items:center;background:rgba(63,81,181,.06);border-radius:6px;display:flex;font-size:12px;gap:8px;margin:0 0 14px;padding:8px 10px}.ws-scope-note[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#3f51b5;flex:none;font-size:18px;height:18px;width:18px}.ws-source-list[_ngcontent-%COMP%], .ws-relationships[_ngcontent-%COMP%]{display:grid;gap:8px;margin:8px 0 12px}.ws-source[_ngcontent-%COMP%], .ws-relationship[_ngcontent-%COMP%]{align-items:center;border:1px solid rgba(127,127,127,.22);border-radius:7px;display:flex;gap:10px;min-height:48px;padding:4px 6px 4px 12px}.ws-source[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .ws-relationship[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(.ws-shared-badge){align-items:center;display:flex;flex:1;gap:7px;min-width:0}.ws-source[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .ws-relationship[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.65}.ws-relationship[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{color:#3f51b5}.ws-relationship[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(.ws-shared-badge){align-items:flex-start;flex-direction:column;gap:1px}.ws-empty-card[_ngcontent-%COMP%], .ws-empty-inline[_ngcontent-%COMP%]{border:1px dashed rgba(127,127,127,.35);border-radius:7px;margin:8px 0 12px;opacity:.7;padding:12px}.ws-empty-inline[_ngcontent-%COMP%]{border:0;padding:0}.ws-add[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:320px}.ws-divider[_ngcontent-%COMP%]{border-top:1px solid rgba(127,127,127,.2);margin:10px 0 18px}.ws-section-head[_ngcontent-%COMP%]{align-items:center;display:flex;gap:12px;justify-content:space-between}.ws-section-head[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .ws-section-head[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.ws-section-head[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px;opacity:.7}.ws-rel-editor[_ngcontent-%COMP%]{background:rgba(127,127,127,.035);border:1px solid rgba(63,81,181,.3);border-radius:8px;display:grid;gap:14px;margin-top:14px;padding:14px}.ws-editor-heading[_ngcontent-%COMP%]{align-items:center;display:flex;gap:10px}.ws-editor-heading[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{display:flex;flex-direction:column}.ws-editor-heading[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.68}.ws-editor-heading.compact[_ngcontent-%COMP%]{margin-bottom:10px}.ws-step-number[_ngcontent-%COMP%]{align-items:center;background:#3f51b5;border-radius:50%;color:#fff;display:inline-flex;flex:none;font-weight:700;height:26px;justify-content:center;width:26px}.ws-rel-grid[_ngcontent-%COMP%]{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(150px,1fr))}.ws-rel-grid[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:0;width:auto}.ws-junction[_ngcontent-%COMP%]{background:rgba(63,81,181,.05);border-radius:7px;padding:12px}.ws-output-name[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{max-width:360px;width:100%}.ws-rel-footer[_ngcontent-%COMP%]{justify-content:space-between}@media (max-width: 980px){.ws-intro[_ngcontent-%COMP%], .ws-section-head[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column}.ws-rel-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.ws-add[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:0;width:100%}}"]})}}return i})(),lt=(()=>{class i{toApiPayload(t){return{name:t.name,base_path:t.basePath,label:t.label,description:t.description,status:t.status}}toEndpointPayload(t){return{api_id:t.apiId,method:t.method,path:t.path,label:t.label,description:t.description,is_active:t.isActive,request_schema:t.requestSchema,response_schema:t.responseSchema,execution_plan:t.executionPlan,response_mapping:t.responseMapping}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function ct(i,o){if(1&i&&(e.j41(0,"div",11)(1,"div")(2,"span"),e.EFF(3,"Fields"),e.k0s(),e.j41(4,"strong"),e.EFF(5),e.k0s()(),e.j41(6,"div")(7,"span"),e.EFF(8,"Related datasets"),e.k0s(),e.j41(9,"strong"),e.EFF(10),e.k0s()()()),2&i){const t=e.XpG();e.R7$(5),e.JRh(t.fieldNames.length),e.R7$(5),e.JRh(t.relationshipNames.length)}}function pt(i,o){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.JRh(t)}}function dt(i,o){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI("+",t.fieldNames.length-8,"")}}function ut(i,o){if(1&i&&(e.j41(0,"div",12),e.DNE(1,pt,2,1,"span",13),e.nI1(2,"slice"),e.DNE(3,dt,2,1,"span",9),e.k0s()),2&i){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",e.brH(2,2,t.fieldNames,0,8)),e.R7$(2),e.Y8G("ngIf",t.fieldNames.length>8)}}function mt(i,o){if(1&i&&(e.j41(0,"span")(1,"mat-icon"),e.EFF(2,"account_tree"),e.k0s(),e.EFF(3),e.k0s()),2&i){const t=o.$implicit;e.R7$(3),e.SpI(" ",t," ")}}function _t(i,o){if(1&i&&(e.j41(0,"div",14),e.DNE(1,mt,4,1,"span",13),e.k0s()),2&i){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.relationshipNames)}}function ft(i,o){if(1&i&&(e.j41(0,"p",15)(1,"mat-icon"),e.EFF(2,"visibility"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s()()),2&i){const t=e.XpG();e.R7$(4),e.SpI(" ",t.canPreview?"Run a preview to inspect the response before saving.":"Choose a data source and response fields to begin."," ")}}function ht(i,o){1&i&&(e.j41(0,"p",16)(1,"mat-icon"),e.EFF(2,"update"),e.k0s(),e.EFF(3," The definition changed. Refresh to see the current response. "),e.k0s())}function gt(i,o){if(1&i&&(e.j41(0,"pre"),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.R7$(1),e.JRh(t.previewResult)}}function bt(i,o){if(1&i&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.JRh(t.error)}}function Ft(i,o){if(1&i&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.JRh(t.preview)}}function vt(i,o){if(1&i&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.SpI("",t.ms,"ms")}}function xt(i,o){if(1&i&&(e.j41(0,"div",19)(1,"mat-icon"),e.EFF(2),e.k0s(),e.j41(3,"span")(4,"strong"),e.EFF(5),e.k0s(),e.j41(6,"small"),e.EFF(7),e.k0s(),e.DNE(8,bt,2,1,"small",9),e.DNE(9,Ft,2,1,"small",9),e.k0s(),e.DNE(10,vt,2,1,"small",9),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.AVh("failed",!1===t.ok),e.R7$(1),e.SpI(" ",!1===t.ok?"error":"check_circle"," "),e.R7$(3),e.JRh(t.key),e.R7$(2),e.E5c(" ",t.method," ",t.service,"/",t.resource," "),e.R7$(1),e.Y8G("ngIf",!1===t.ok),e.R7$(1),e.Y8G("ngIf",!1!==t.ok),e.R7$(1),e.Y8G("ngIf",null!=t.ms)}}function Ct(i,o){if(1&i&&(e.j41(0,"details",17)(1,"summary")(2,"mat-icon"),e.EFF(3),e.k0s(),e.EFF(4),e.k0s(),e.DNE(5,xt,11,10,"div",18),e.k0s()),2&i){const t=e.XpG();e.R7$(3),e.JRh(!1===t.previewOk?"error":"check_circle"),e.R7$(1),e.Lme(" Execution details \xb7 ",t.trace.length," step",1===t.trace.length?"":"s"," "),e.R7$(1),e.Y8G("ngForOf",t.trace)("ngForTrackBy",t.trackByIndex)}}let kt=(()=>{class i{constructor(){this.routeLabel="",this.sourceSummary="",this.fieldNames=[],this.relationshipNames=[],this.previewResult="",this.previewStale=!1,this.previewing=!1,this.canPreview=!1,this.previewOk=null,this.trace=[],this.previewRequested=new e.bkB}trackByIndex(t){return t}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-api-builder-preview"]],inputs:{routeLabel:"routeLabel",sourceSummary:"sourceSummary",fieldNames:"fieldNames",relationshipNames:"relationshipNames",previewResult:"previewResult",previewStale:"previewStale",previewing:"previewing",canPreview:"canPreview",previewOk:"previewOk",trace:"trace"},outputs:{previewRequested:"previewRequested"},standalone:!0,features:[e.aNF],decls:26,vars:11,consts:[[1,"preview-card"],[1,"preview-heading"],["mat-stroked-button","","type","button",3,"disabled","click"],[1,"route-summary"],["class","contract-summary",4,"ngIf"],["class","contract-tags",4,"ngIf"],["class","relationship-tags",4,"ngIf"],["class","preview-empty",4,"ngIf"],["class","preview-warning",4,"ngIf"],[4,"ngIf"],["class","trace",4,"ngIf"],[1,"contract-summary"],[1,"contract-tags"],[4,"ngFor","ngForOf"],[1,"relationship-tags"],[1,"preview-empty"],[1,"preview-warning"],[1,"trace"],["class","trace-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"trace-row"]],template:function(n,r){1&n&&(e.j41(0,"aside",0)(1,"div",1)(2,"span")(3,"strong"),e.EFF(4,"Response preview"),e.k0s(),e.j41(5,"small"),e.EFF(6,"What API consumers will receive"),e.k0s()(),e.j41(7,"button",2),e.bIt("click",function(){return r.previewRequested.emit()}),e.j41(8,"mat-icon"),e.EFF(9,"play_arrow"),e.k0s(),e.EFF(10),e.k0s()(),e.j41(11,"div",3)(12,"mat-icon"),e.EFF(13,"route"),e.k0s(),e.j41(14,"span")(15,"strong"),e.EFF(16),e.k0s(),e.j41(17,"small"),e.EFF(18),e.k0s()()(),e.DNE(19,ct,11,2,"div",4),e.DNE(20,ut,4,6,"div",5),e.DNE(21,_t,2,1,"div",6),e.DNE(22,ft,5,1,"p",7),e.DNE(23,ht,4,0,"p",8),e.DNE(24,gt,2,1,"pre",9),e.DNE(25,Ct,6,5,"details",10),e.k0s()),2&n&&(e.R7$(7),e.Y8G("disabled",!r.canPreview||r.previewing),e.R7$(3),e.SpI(" ",r.previewResult?"Refresh":"Run preview"," "),e.R7$(6),e.JRh(r.routeLabel),e.R7$(2),e.JRh(r.sourceSummary),e.R7$(1),e.Y8G("ngIf",r.canPreview),e.R7$(1),e.Y8G("ngIf",r.fieldNames.length),e.R7$(1),e.Y8G("ngIf",r.relationshipNames.length),e.R7$(1),e.Y8G("ngIf",!r.previewResult),e.R7$(1),e.Y8G("ngIf",r.previewResult&&r.previewStale),e.R7$(1),e.Y8G("ngIf",r.previewResult),e.R7$(1),e.Y8G("ngIf",r.trace.length))},dependencies:[c.MD,c.Sq,c.bT,c.P9,P.Hl,P.$z,T.m_,T.An],styles:["[_nghost-%COMP%]{align-self:start;display:block;max-width:100%;min-width:0;position:sticky;top:16px;width:100%}.preview-card[_ngcontent-%COMP%]{border:1px solid rgba(63,81,181,.3);border-radius:9px;display:grid;gap:12px;min-width:0;padding:14px;width:100%;box-sizing:border-box}.preview-heading[_ngcontent-%COMP%]{align-items:center;display:flex;gap:10px;justify-content:space-between}.preview-heading[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .route-summary[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}small[_ngcontent-%COMP%]{opacity:.68}.route-summary[_ngcontent-%COMP%]{align-items:flex-start;background:rgba(63,81,181,.08);border-radius:7px;display:flex;gap:8px;padding:10px}.route-summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#3f51b5}.route-summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .route-summary[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contract-summary[_ngcontent-%COMP%]{display:grid;gap:8px;grid-template-columns:1fr 1fr}.contract-summary[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background:rgba(127,127,127,.07);border-radius:6px;display:flex;flex-direction:column;padding:8px}.contract-summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:11px;opacity:.65;text-transform:uppercase}.contract-tags[_ngcontent-%COMP%], .relationship-tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:5px}.contract-tags[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .relationship-tags[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{align-items:center;border:1px solid rgba(127,127,127,.3);border-radius:999px;display:inline-flex;font-size:11px;gap:3px;max-width:100%;min-width:0;padding:3px 7px}.relationship-tags[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:13px;height:13px;width:13px}.preview-empty[_ngcontent-%COMP%], .preview-warning[_ngcontent-%COMP%]{align-items:center;border:1px dashed rgba(127,127,127,.35);border-radius:7px;display:flex;gap:8px;margin:0;padding:12px}.preview-empty[_ngcontent-%COMP%]{opacity:.7}.preview-warning[_ngcontent-%COMP%]{background:rgba(255,171,0,.08);border-color:#ffab0073}pre[_ngcontent-%COMP%]{background:#101418;border-radius:6px;color:#f4f7fb;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;margin:0;max-height:480px;overflow:auto;padding:12px;overflow-wrap:anywhere;word-break:break-word;white-space:pre-wrap}.preview-warning[_ngcontent-%COMP%], .preview-empty[_ngcontent-%COMP%], .trace-row[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .route-summary[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{overflow-wrap:anywhere}.trace[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{align-items:center;cursor:pointer;display:flex;font-size:12px;font-weight:600;gap:5px}.trace[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .trace-row[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{color:#1a7f43;font-size:16px;height:16px;width:16px}.trace-row[_ngcontent-%COMP%]{align-items:flex-start;border-top:1px solid rgba(127,127,127,.16);display:flex;gap:7px;padding:7px 0}.trace-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;flex:1;flex-direction:column;min-width:0}.trace-row[_ngcontent-%COMP%] .failed[_ngcontent-%COMP%]{color:#c62828}@media (max-width: 1120px){[_nghost-%COMP%]{position:static}}"]})}}return i})();function yt(i,o){1&i&&(e.j41(0,"div")(1,"p",11),e.EFF(2,"API Builder"),e.k0s(),e.j41(3,"h1"),e.EFF(4,"Custom APIs"),e.k0s(),e.j41(5,"p"),e.EFF(6," Expose purpose-built datasets without publishing your underlying service structure. "),e.k0s()())}function wt(i,o){if(1&i){const t=e.RV6();e.j41(0,"a",12),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.closeEditor())})("keydown.enter",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.closeEditor())}),e.j41(1,"mat-icon"),e.EFF(2,"arrow_back"),e.k0s(),e.EFF(3," All APIs "),e.k0s()}}function Et(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",13),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.newApi())}),e.j41(1,"mat-icon"),e.EFF(2,"add"),e.k0s(),e.EFF(3," New API "),e.k0s()}}function jt(i,o){1&i&&e.nrm(0,"mat-progress-bar",14)}function Ot(i,o){if(1&i){const t=e.RV6();e.j41(0,"mat-card",18),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(2);return e.Njj(a.selectApi(s.id))}),e.j41(1,"mat-card-header")(2,"mat-icon",19),e.EFF(3,"api"),e.k0s(),e.j41(4,"mat-card-title"),e.EFF(5),e.k0s(),e.j41(6,"mat-card-subtitle"),e.EFF(7),e.k0s(),e.j41(8,"button",20),e.bIt("click",function(r){const a=e.eBV(t).$implicit,l=e.XpG(2);return e.Njj(l.deleteApi(a.id,r))}),e.j41(9,"mat-icon"),e.EFF(10,"delete"),e.k0s()()(),e.j41(11,"mat-card-content")(12,"p"),e.EFF(13),e.k0s(),e.j41(14,"div",21)(15,"span"),e.EFF(16),e.k0s(),e.j41(17,"span",22),e.EFF(18),e.k0s()()()()}if(2&i){const t=o.$implicit,n=e.XpG(2);let r;e.R7$(5),e.JRh(t.label||t.name),e.R7$(2),e.SpI("/",t.basePath||t.base_path,""),e.R7$(6),e.JRh(t.description||"No description yet."),e.R7$(2),e.ZvI("status-chip status-",t.status||"draft",""),e.R7$(1),e.JRh(t.status||"draft"),e.R7$(2),e.Lme(" ",null!==(r=n.endpointCounts.get(t.id))&&void 0!==r?r:0," ",1===(null!==(r=n.endpointCounts.get(t.id))&&void 0!==r?r:0)?"endpoint":"endpoints"," ")}}function Rt(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",15)(1,"mat-card",16),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.newApi())}),e.j41(2,"mat-card-content")(3,"mat-icon"),e.EFF(4,"add_circle"),e.k0s(),e.j41(5,"strong"),e.EFF(6,"Create API"),e.k0s(),e.j41(7,"span"),e.EFF(8,"Start a custom API with one or more endpoints."),e.k0s()()(),e.DNE(9,Ot,19,9,"mat-card",17),e.k0s()}if(2&i){const t=e.XpG();e.R7$(9),e.Y8G("ngForOf",t.apis)("ngForTrackBy",t.trackById)}}function Pt(i,o){1&i&&(e.j41(0,"div",23)(1,"mat-icon"),e.EFF(2,"api"),e.k0s(),e.j41(3,"strong"),e.EFF(4,"No custom APIs yet"),e.k0s(),e.j41(5,"span"),e.EFF(6,"Create one to start composing database, RWS, and scripted calls."),e.k0s()())}function St(i,o){if(1&i&&(e.j41(0,"code",47),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI("/api/v2/",t.apiForm.value.basePath,"")}}function It(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",41),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.updateApiStatus("published"))}),e.j41(1,"mat-icon"),e.EFF(2,"publish"),e.k0s(),e.EFF(3," Publish API "),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("disabled",t.saving)}}function Mt(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",34),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.updateApiStatus("draft"))}),e.EFF(1," Move to draft "),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("disabled",t.saving)}}function At(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.apiDetailsOpen=!r.apiDetailsOpen)}),e.j41(1,"mat-icon"),e.EFF(2),e.k0s(),e.EFF(3),e.k0s()}if(2&i){const t=e.XpG(2);e.R7$(2),e.JRh(t.apiDetailsOpen?"close":"edit"),e.R7$(1),e.SpI(" ",t.apiDetailsOpen?"Close details":"Edit details"," ")}}function $t(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.deleteApi(r.selectedApiId))}),e.j41(1,"mat-icon"),e.EFF(2,"delete"),e.k0s(),e.EFF(3," Delete "),e.k0s()}}function Tt(i,o){1&i&&(e.j41(0,"mat-error"),e.EFF(1," API URL is required. "),e.k0s())}function Dt(i,o){1&i&&(e.j41(0,"mat-error"),e.EFF(1," Use letters, numbers, dashes, or underscores only. "),e.k0s())}function Bt(i,o){if(1&i&&(e.j41(0,"div",50)(1,"mat-form-field",51)(2,"mat-label"),e.EFF(3,"API Name"),e.k0s(),e.nrm(4,"input",52),e.k0s(),e.j41(5,"mat-form-field",51)(6,"mat-label"),e.EFF(7,"Base URL Path"),e.k0s(),e.nrm(8,"input",53),e.j41(9,"mat-hint"),e.EFF(10,"Your endpoints start at /api/v2/"),e.k0s(),e.DNE(11,Tt,2,0,"mat-error",2),e.DNE(12,Dt,2,0,"mat-error",2),e.k0s(),e.j41(13,"mat-form-field",54)(14,"mat-label"),e.EFF(15,"Description"),e.k0s(),e.nrm(16,"textarea",55),e.k0s(),e.j41(17,"button",56)(18,"mat-icon"),e.EFF(19,"save"),e.k0s(),e.EFF(20," Save details "),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(11),e.Y8G("ngIf",t.apiForm.controls.basePath.hasError("required")),e.R7$(1),e.Y8G("ngIf",t.apiForm.controls.basePath.hasError("pattern")),e.R7$(5),e.Y8G("disabled",t.apiForm.invalid||t.saving)}}function Nt(i,o){if(1&i){const t=e.RV6();e.j41(0,"df-api-builder-workspace",57),e.bIt("workspaceChanged",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.loadWorkspaceServices(r.selectedApiId))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("apiId",t.selectedApiId)}}function Gt(i,o){1&i&&(e.j41(0,"p",58)(1,"mat-icon"),e.EFF(2,"info"),e.k0s(),e.j41(3,"span"),e.EFF(4,"Save the API above first \u2014 then you can add endpoints to it."),e.k0s()())}function Vt(i,o){1&i&&e.eu8(0)}function Xt(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",59)(1,"div",60)(2,"div",61)(3,"span",62),e.EFF(4,"NEW"),e.k0s(),e.j41(5,"span",63),e.EFF(6),e.k0s(),e.j41(7,"span",64),e.EFF(8),e.k0s()(),e.j41(9,"button",65),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.cancelAddEndpoint())}),e.j41(10,"mat-icon"),e.EFF(11,"close"),e.k0s()()(),e.j41(12,"div",66),e.DNE(13,Vt,1,0,"ng-container",67),e.k0s()()}if(2&i){const t=e.XpG(2),n=e.sdS(11);e.R7$(6),e.JRh(t.endpointForm.value.path||"new endpoint"),e.R7$(2),e.JRh(t.endpointForm.value.label||"Unsaved endpoint"),e.R7$(5),e.Y8G("ngTemplateOutlet",n)}}function Yt(i,o){1&i&&e.eu8(0)}function Lt(i,o){if(1&i&&(e.j41(0,"div",66),e.DNE(1,Yt,1,0,"ng-container",67),e.k0s()),2&i){e.XpG(3);const t=e.sdS(11);e.R7$(1),e.Y8G("ngTemplateOutlet",t)}}function Wt(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",68)(1,"div",60)(2,"button",69),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(2);return e.Njj(a.toggleEndpoint(s))}),e.j41(3,"span"),e.nI1(4,"lowercase"),e.EFF(5),e.k0s(),e.j41(6,"span",63),e.EFF(7),e.k0s(),e.j41(8,"span",64),e.EFF(9),e.k0s(),e.nrm(10,"span",70),e.j41(11,"mat-icon",71),e.EFF(12),e.k0s()(),e.j41(13,"button",72),e.bIt("click",function(r){const a=e.eBV(t).$implicit,l=e.XpG(2);return e.Njj(l.deleteEndpoint(a.id,r))}),e.j41(14,"mat-icon"),e.EFF(15,"delete"),e.k0s()()(),e.DNE(16,Lt,2,1,"div",73),e.k0s()}if(2&i){const t=o.$implicit,n=e.XpG(2);e.AVh("open",t.id===n.selectedEndpointId&&!n.addingEndpoint),e.R7$(3),e.ZvI("method-chip method-",e.bMT(4,10,t.method||"get"),""),e.R7$(2),e.JRh(t.method),e.R7$(2),e.JRh(t.path),e.R7$(2),e.JRh(t.label||"Untitled endpoint"),e.R7$(3),e.JRh(t.id!==n.selectedEndpointId||n.addingEndpoint?"expand_more":"expand_less"),e.R7$(4),e.Y8G("ngIf",t.id===n.selectedEndpointId&&!n.addingEndpoint)}}function Jt(i,o){1&i&&(e.j41(0,"div",74)(1,"mat-icon"),e.EFF(2,"route"),e.k0s(),e.j41(3,"strong"),e.EFF(4,"No endpoints yet"),e.k0s(),e.j41(5,"span"),e.EFF(6,"Add an endpoint to expose data from a source."),e.k0s()())}function zt(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",24)(1,"mat-card",25)(2,"form",26),e.bIt("ngSubmit",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.saveApi())}),e.j41(3,"div",27)(4,"div",28)(5,"p",11),e.EFF(6,"Custom API"),e.k0s(),e.j41(7,"h2"),e.EFF(8),e.k0s(),e.DNE(9,St,2,1,"code",29),e.k0s(),e.j41(10,"div",30)(11,"span"),e.EFF(12),e.k0s(),e.DNE(13,It,4,1,"button",31),e.DNE(14,Mt,2,1,"button",32),e.DNE(15,At,4,2,"button",33),e.j41(16,"button",34),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.openApiDocs())}),e.j41(17,"mat-icon"),e.EFF(18,"description"),e.k0s(),e.EFF(19," API Docs "),e.k0s(),e.DNE(20,$t,4,0,"button",35),e.k0s()(),e.DNE(21,Bt,21,3,"div",36),e.k0s()(),e.DNE(22,Nt,1,1,"df-api-builder-workspace",37),e.j41(23,"div",38)(24,"div",39)(25,"div")(26,"h3"),e.EFF(27,"Endpoints"),e.k0s(),e.j41(28,"p",40),e.EFF(29," Define the public paths and response shapes consumers will use. "),e.k0s()(),e.j41(30,"button",41),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.addEndpoint())}),e.j41(31,"mat-icon"),e.EFF(32,"add"),e.k0s(),e.EFF(33," Add Endpoint "),e.k0s()(),e.DNE(34,Gt,5,0,"p",42),e.j41(35,"div",43),e.DNE(36,Xt,14,3,"div",44),e.DNE(37,Wt,17,12,"div",45),e.DNE(38,Jt,7,0,"div",46),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(2),e.Y8G("formGroup",t.apiForm),e.R7$(6),e.SpI(" ",t.apiForm.value.label||t.apiForm.value.basePath||"Untitled API"," "),e.R7$(1),e.Y8G("ngIf",t.apiForm.value.basePath),e.R7$(2),e.ZvI("status-chip status-",t.apiForm.value.status,""),e.R7$(1),e.JRh(t.apiForm.value.status||"draft"),e.R7$(1),e.Y8G("ngIf",t.selectedApiId&&"published"!==t.apiForm.value.status),e.R7$(1),e.Y8G("ngIf",t.selectedApiId&&"published"===t.apiForm.value.status),e.R7$(1),e.Y8G("ngIf",t.selectedApiId),e.R7$(1),e.Y8G("disabled",!t.selectedApiId),e.R7$(4),e.Y8G("ngIf",t.selectedApiId),e.R7$(1),e.Y8G("ngIf",t.apiDetailsOpen||!t.selectedApiId),e.R7$(1),e.Y8G("ngIf",t.selectedApiId),e.R7$(8),e.Y8G("disabled",!t.selectedApiId),e.R7$(4),e.Y8G("ngIf",!t.selectedApiId),e.R7$(2),e.Y8G("ngIf",t.addingEndpoint),e.R7$(1),e.Y8G("ngForOf",t.selectedEndpoints)("ngForTrackBy",t.trackById),e.R7$(1),e.Y8G("ngIf",t.selectedApiId&&0===t.selectedEndpoints.length&&!t.addingEndpoint)}}function qt(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",146),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(2);return e.Njj(a.focusWorkflowStep(s.key))}),e.j41(1,"span",147)(2,"mat-icon",148),e.EFF(3),e.k0s(),e.j41(4,"span",149),e.EFF(5),e.k0s()(),e.j41(6,"span",150),e.EFF(7),e.k0s()()}if(2&i){const t=o.$implicit;e.AVh("complete",t.complete),e.R7$(3),e.JRh(t.complete?"check_circle":"radio_button_unchecked"),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.detail)}}function Ut(i,o){1&i&&(e.j41(0,"mat-option",151),e.EFF(1," Loading sources\u2026 "),e.k0s())}function Ht(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.j41(2,"small",153),e.EFF(3),e.k0s()()),2&i){const t=o.$implicit,n=e.XpG(2);e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||t.name," "),e.R7$(2),e.Lme("",t.type," \xb7 ",n.introspectionBadge(t),"")}}function Kt(i,o){1&i&&(e.j41(0,"mat-option",151),e.EFF(1," No matching data sources "),e.k0s())}function Qt(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",156),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(3);return e.Njj(a.selectRecentSource(s.name))}),e.EFF(1),e.k0s()}if(2&i){const t=o.$implicit;e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function Zt(i,o){if(1&i&&(e.j41(0,"div",154),e.DNE(1,Qt,2,1,"button",155),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.recentSourceServices)("ngForTrackBy",t.trackByName)}}function en(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.k0s()),2&i){const t=o.$implicit,n=e.XpG(2);e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||n.titleFromName(t.name)," ")}}function tn(i,o){if(1&i&&(e.j41(0,"mat-option",151),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.sourceForm.value.service?"No matching tables":"Select a source API first"," ")}}function nn(i,o){if(1&i&&(e.j41(0,"p",157),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.sourceIntrospectionHint," ")}}function rn(i,o){1&i&&(e.j41(0,"span",170),e.EFF(1,"Primary key"),e.k0s())}function sn(i,o){1&i&&(e.j41(0,"span",170),e.EFF(1,"Unique"),e.k0s())}function on(i,o){1&i&&(e.j41(0,"span",170),e.EFF(1,"Relationship"),e.k0s())}function an(i,o){1&i&&(e.j41(0,"span",170),e.EFF(1,"Nullable"),e.k0s())}function ln(i,o){if(1&i){const t=e.RV6();e.j41(0,"input",171),e.bIt("input",function(r){e.eBV(t);const s=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.setAlias(s.name,r.target.value))})("blur",function(){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.finishRenaming(r.name))}),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.Y8G("value",n.aliasFor(t.name))("placeholder","Return as "+t.name)}}function cn(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.startRenaming(r.name))}),e.j41(1,"mat-icon"),e.EFF(2,"drive_file_rename_outline"),e.k0s(),e.EFF(3," Rename "),e.k0s()}}function pn(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",164)(1,"mat-checkbox",165),e.bIt("change",function(r){const a=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.toggleField(a.name,r.checked))}),e.j41(2,"span",166),e.EFF(3),e.k0s(),e.j41(4,"small"),e.EFF(5),e.k0s(),e.DNE(6,rn,2,0,"span",167),e.DNE(7,sn,2,0,"span",167),e.DNE(8,on,2,0,"span",167),e.DNE(9,an,2,0,"span",167),e.k0s(),e.DNE(10,ln,1,2,"input",168),e.DNE(11,cn,4,0,"button",169),e.k0s()}if(2&i){const t=o.$implicit,n=e.XpG(3);let r;e.R7$(1),e.Y8G("checked",n.isFieldSelected(t.name)),e.R7$(2),e.JRh(t.label||n.titleFromName(t.name)),e.R7$(2),e.JRh(n.fieldTypeLabel(t)),e.R7$(1),e.Y8G("ngIf",n.isPrimaryKey(t)),e.R7$(1),e.Y8G("ngIf",n.isUnique(t)),e.R7$(1),e.Y8G("ngIf",n.isForeignKey(t)),e.R7$(1),e.Y8G("ngIf",null!==(r=t.allowNull)&&void 0!==r?r:t.allow_null),e.R7$(1),e.Y8G("ngIf",n.isFieldSelected(t.name)&&n.isRenaming(t.name)),e.R7$(1),e.Y8G("ngIf",n.isFieldSelected(t.name)&&!n.isRenaming(t.name))}}function dn(i,o){if(1&i){const t=e.RV6();e.j41(0,"section",158)(1,"div",103)(2,"span",159)(3,"span",79),e.EFF(4,"3"),e.k0s(),e.j41(5,"span")(6,"strong"),e.EFF(7,"Choose response fields"),e.k0s(),e.j41(8,"small"),e.EFF(9,"Choose what consumers can see and rename it if needed."),e.k0s()()(),e.j41(10,"span"),e.EFF(11),e.k0s()(),e.j41(12,"div",160)(13,"mat-form-field",51)(14,"mat-label"),e.EFF(15,"Find Fields"),e.k0s(),e.j41(16,"input",161),e.bIt("input",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.fieldSearch=r.target.value)}),e.k0s()(),e.j41(17,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.selectAllFields())}),e.j41(18,"mat-icon"),e.EFF(19,"select_all"),e.k0s(),e.EFF(20," Select All "),e.k0s(),e.j41(21,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.clearAllFields())}),e.j41(22,"mat-icon"),e.EFF(23,"deselect"),e.k0s(),e.EFF(24," Clear "),e.k0s()(),e.j41(25,"div",162),e.DNE(26,pn,12,9,"div",163),e.k0s()()}if(2&i){const t=e.XpG(2);e.R7$(11),e.Lme("",t.selectedFieldNames.length," of ",t.sourceFields.length,""),e.R7$(5),e.Y8G("value",t.fieldSearch),e.R7$(10),e.Y8G("ngForOf",t.displayedSourceFields)("ngForTrackBy",t.trackByName)}}function un(i,o){if(1&i&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.SpI(" ",t," ")}}function mn(i,o){if(1&i&&(e.j41(0,"div",177)(1,"mat-icon"),e.EFF(2,"warning"),e.k0s(),e.j41(3,"span")(4,"strong"),e.EFF(5,"Relationship configuration changed"),e.k0s(),e.DNE(6,un,2,1,"small",178),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(6),e.Y8G("ngForOf",t.relationshipContractWarnings)}}function _n(i,o){if(1&i){const t=e.RV6();e.j41(0,"input",171),e.bIt("input",function(r){e.eBV(t);const s=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.setAlias(s.name,r.target.value))})("blur",function(){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.finishRenaming(r.name))}),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.Y8G("value",n.aliasFor(t.name))("placeholder","Return as "+t.name)}}function fn(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.startRenaming(r.name))}),e.j41(1,"mat-icon"),e.EFF(2,"drive_file_rename_outline"),e.k0s(),e.EFF(3," Rename response field "),e.k0s()}}function hn(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",179)(1,"mat-checkbox",180),e.bIt("change",function(r){const a=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.toggleRelationship(a.name,r.checked))}),e.j41(2,"strong"),e.EFF(3),e.k0s(),e.j41(4,"small"),e.EFF(5),e.k0s()(),e.DNE(6,_n,1,2,"input",168),e.DNE(7,fn,4,0,"button",169),e.k0s()}if(2&i){const t=o.$implicit,n=e.XpG(3);e.R7$(1),e.Y8G("checked",n.isRelationshipSelected(t.name)),e.R7$(2),e.JRh(t.label||n.titleFromName(t.name)),e.R7$(2),e.E5c(" ",n.relationshipTypeLabel(t.type)," \xb7 ",n.relationshipContractLabel(t.type)," \xb7 ",t.refTable||t.ref_table||"related dataset"," "),e.R7$(1),e.Y8G("ngIf",n.isRelationshipSelected(t.name)&&n.isRenaming(t.name)),e.R7$(1),e.Y8G("ngIf",n.isRelationshipSelected(t.name)&&!n.isRenaming(t.name))}}function gn(i,o){if(1&i&&(e.j41(0,"section",173)(1,"div",103)(2,"span",159)(3,"span",79),e.EFF(4,"4"),e.k0s(),e.j41(5,"span")(6,"strong"),e.EFF(7,"Add related data"),e.k0s(),e.j41(8,"small"),e.EFF(9,"Choose related resources to include in the same call."),e.k0s()()()(),e.DNE(10,mn,7,1,"div",174),e.j41(11,"div",175),e.DNE(12,hn,8,7,"div",176),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(10),e.Y8G("ngIf",t.relationshipContractWarnings.length),e.R7$(2),e.Y8G("ngForOf",t.sourceRelationships)("ngForTrackBy",t.trackByName)}}function bn(i,o){1&i&&(e.j41(0,"div",181)(1,"mat-icon"),e.EFF(2,"filter_alt_off"),e.k0s(),e.j41(3,"span"),e.EFF(4,"No filters yet. This endpoint will return matching records from the selected table."),e.k0s()())}function Fn(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.k0s()),2&i){const t=o.$implicit,n=e.XpG(3);e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||n.titleFromName(t.name)," ")}}function vn(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.value),e.R7$(1),e.SpI(" ",t.label," ")}}function xn(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",182)(1,"mat-form-field",51)(2,"mat-label"),e.EFF(3,"Field"),e.k0s(),e.j41(4,"mat-select",183),e.bIt("selectionChange",function(r){const a=e.eBV(t).index,l=e.XpG(2);return e.Njj(l.updateFilter(a,"field",r.value))}),e.DNE(5,Fn,2,2,"mat-option",94),e.k0s()(),e.j41(6,"mat-form-field",51)(7,"mat-label"),e.EFF(8,"Match"),e.k0s(),e.j41(9,"mat-select",183),e.bIt("selectionChange",function(r){const a=e.eBV(t).index,l=e.XpG(2);return e.Njj(l.updateFilter(a,"operator",r.value))}),e.DNE(10,vn,2,2,"mat-option",94),e.k0s()(),e.j41(11,"mat-form-field",51)(12,"mat-label"),e.EFF(13,"Value"),e.k0s(),e.j41(14,"input",161),e.bIt("input",function(r){const a=e.eBV(t).index,l=e.XpG(2);return e.Njj(l.updateFilter(a,"value",r.target.value))}),e.k0s()(),e.j41(15,"button",184),e.bIt("click",function(){const s=e.eBV(t).index,a=e.XpG(2);return e.Njj(a.removeFilter(s))}),e.j41(16,"mat-icon"),e.EFF(17,"delete"),e.k0s()()()}if(2&i){const t=o.$implicit,n=e.XpG(2);e.R7$(4),e.Y8G("value",t.field),e.R7$(1),e.Y8G("ngForOf",n.sourceFields)("ngForTrackBy",n.trackByName),e.R7$(4),e.Y8G("value",t.operator),e.R7$(1),e.Y8G("ngForOf",n.filterOperatorOptions(t.field))("ngForTrackBy",n.trackByOptionValue),e.R7$(4),e.Y8G("value",t.value)}}function Cn(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.k0s()),2&i){const t=o.$implicit,n=e.XpG(2);e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||n.titleFromName(t.name)," ")}}function kn(i,o){1&i&&(e.j41(0,"p",58)(1,"mat-icon"),e.EFF(2,"info"),e.k0s(),e.j41(3,"span"),e.EFF(4,"Save the API above first \u2014 then you can create endpoints inside it."),e.k0s()())}function yn(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.duplicateSelectedEndpoint())}),e.j41(1,"mat-icon"),e.EFF(2,"content_copy"),e.k0s(),e.EFF(3," Duplicate "),e.k0s()}}function wn(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.deleteEndpoint(r.selectedEndpointId))}),e.j41(1,"mat-icon"),e.EFF(2,"delete"),e.k0s(),e.EFF(3," Delete "),e.k0s()}}function En(i,o){if(1&i&&(e.j41(0,"div",187)(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"small"),e.EFF(4),e.k0s()()),2&i){const t=o.$implicit;e.R7$(2),e.JRh(t.title),e.R7$(2),e.JRh(t.detail)}}function jn(i,o){if(1&i&&(e.j41(0,"div",185),e.DNE(1,En,5,2,"div",186),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.executionStepsPreview)("ngForTrackBy",t.trackByTitle)}}function On(i,o){1&i&&(e.j41(0,"p",188),e.EFF(1," No execution steps in JSON yet. "),e.k0s())}function Rn(i,o){if(1&i&&(e.j41(0,"span",191),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.JRh(t)}}function Pn(i,o){if(1&i&&(e.j41(0,"div",189),e.DNE(1,Rn,2,1,"span",190),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.responseFieldsPreview)("ngForTrackBy",t.trackByValue)}}function Sn(i,o){1&i&&(e.j41(0,"p",188),e.EFF(1," No response mapping fields yet. "),e.k0s())}function In(i,o){if(1&i&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.JRh(t.executionPlanError)}}function Mn(i,o){if(1&i&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.JRh(t.responseMappingError)}}function An(i,o){1&i&&(e.j41(0,"p",188),e.EFF(1," Save and select an endpoint to run a live test against it. "),e.k0s())}function $n(i,o){if(1&i&&(e.j41(0,"pre"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.JRh(t.testResult)}}function Tn(i,o){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"mat-form-field",135)(2,"mat-label"),e.EFF(3,"Path Params JSON"),e.k0s(),e.nrm(4,"textarea",192),e.k0s(),e.j41(5,"mat-form-field",135)(6,"mat-label"),e.EFF(7,"Query JSON"),e.k0s(),e.nrm(8,"textarea",193),e.k0s(),e.j41(9,"button",41),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.testEndpoint())}),e.j41(10,"mat-icon"),e.EFF(11,"play_arrow"),e.k0s(),e.EFF(12," Run Test "),e.k0s(),e.DNE(13,$n,2,1,"pre",2),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(9),e.Y8G("disabled",t.saving||t.testForm.invalid),e.R7$(4),e.Y8G("ngIf",t.testResult)}}function Dn(i,o){if(1&i){const t=e.RV6();e.j41(0,"form",75),e.bIt("ngSubmit",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.saveEndpoint(!1))}),e.j41(1,"div",76)(2,"section",77)(3,"div",78)(4,"span",79),e.EFF(5,"1"),e.k0s(),e.j41(6,"span")(7,"strong"),e.EFF(8,"Define the public endpoint"),e.k0s(),e.j41(9,"small"),e.EFF(10,"Name the operation and choose the path consumers use."),e.k0s()()(),e.j41(11,"div",80)(12,"mat-icon"),e.EFF(13,"route"),e.k0s(),e.j41(14,"span")(15,"strong"),e.EFF(16),e.k0s(),e.j41(17,"small"),e.EFF(18),e.k0s()()(),e.j41(19,"div",81)(20,"mat-form-field",51)(21,"mat-label"),e.EFF(22,"Endpoint name"),e.k0s(),e.nrm(23,"input",82),e.j41(24,"mat-hint"),e.EFF(25,"A friendly name for this endpoint."),e.k0s()(),e.j41(26,"mat-form-field",51)(27,"mat-label"),e.EFF(28,"Public URL path"),e.k0s(),e.nrm(29,"input",83),e.j41(30,"mat-hint"),e.EFF(31,"The path for this endpoint under the API (e.g. /customers)."),e.k0s()()()(),e.j41(32,"section",84),e.DNE(33,qt,8,5,"button",85),e.k0s(),e.j41(34,"section",86)(35,"div",78)(36,"span",79),e.EFF(37,"2"),e.k0s(),e.j41(38,"span")(39,"strong"),e.EFF(40,"Choose the primary data"),e.k0s(),e.j41(41,"small"),e.EFF(42,"Start with the dataset every response record represents."),e.k0s()()(),e.j41(43,"div",87)(44,"mat-form-field",88)(45,"mat-label"),e.EFF(46,"Data source"),e.k0s(),e.j41(47,"input",89),e.bIt("input",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.sourceServiceSearch=r.target.value)})("focus",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.onSourceFocus())})("blur",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.onSourceBlur())}),e.k0s(),e.j41(48,"mat-icon",90),e.EFF(49,"search"),e.k0s(),e.j41(50,"mat-autocomplete",91,92),e.bIt("optionSelected",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.chooseSourceService(r.option.value))}),e.DNE(52,Ut,2,0,"mat-option",93),e.DNE(53,Ht,4,4,"mat-option",94),e.DNE(54,Kt,2,0,"mat-option",93),e.k0s()(),e.DNE(55,Zt,2,2,"div",95),e.j41(56,"mat-form-field",88)(57,"mat-label"),e.EFF(58,"Dataset / table"),e.k0s(),e.j41(59,"input",96),e.bIt("input",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.sourceTableSearch=r.target.value)})("focus",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.onTableFocus())})("blur",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.onTableBlur())}),e.k0s(),e.j41(60,"mat-icon",90),e.EFF(61,"search"),e.k0s(),e.j41(62,"mat-autocomplete",91,97),e.bIt("optionSelected",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.chooseSourceTable(r.option.value))}),e.DNE(64,en,2,2,"mat-option",94),e.DNE(65,tn,2,1,"mat-option",93),e.k0s()(),e.DNE(66,nn,2,1,"p",98),e.j41(67,"mat-checkbox",99),e.bIt("change",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.EFF(68," Return one record by ID "),e.k0s()()(),e.DNE(69,dn,27,5,"section",100),e.DNE(70,gn,13,3,"section",101),e.j41(71,"section",102)(72,"div",103)(73,"span")(74,"strong"),e.EFF(75,"Filter records"),e.k0s(),e.j41(76,"small"),e.EFF(77,"Add simple rules to limit what this endpoint returns."),e.k0s()(),e.j41(78,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.addFilter())}),e.j41(79,"mat-icon"),e.EFF(80,"add"),e.k0s(),e.EFF(81," Add Filter "),e.k0s()(),e.DNE(82,bn,5,0,"div",104),e.DNE(83,xn,18,7,"div",105),e.k0s(),e.j41(84,"details",106)(85,"summary",103)(86,"span")(87,"strong"),e.EFF(88,"Response options"),e.k0s(),e.j41(89,"small"),e.EFF(90,"Set the default sort, row limit, and response wrapper."),e.k0s()(),e.j41(91,"mat-icon"),e.EFF(92,"expand_more"),e.k0s()(),e.j41(93,"div",107)(94,"mat-form-field",51)(95,"mat-label"),e.EFF(96,"Sort By"),e.k0s(),e.j41(97,"mat-select",108),e.bIt("selectionChange",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.j41(98,"mat-option",109),e.EFF(99,"No sort"),e.k0s(),e.DNE(100,Cn,2,2,"mat-option",94),e.k0s()(),e.j41(101,"mat-form-field",51)(102,"mat-label"),e.EFF(103,"Direction"),e.k0s(),e.j41(104,"mat-select",110),e.bIt("selectionChange",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.j41(105,"mat-option",111),e.EFF(106,"Ascending"),e.k0s(),e.j41(107,"mat-option",112),e.EFF(108,"Descending"),e.k0s()()(),e.j41(109,"mat-form-field",51)(110,"mat-label"),e.EFF(111,"Limit"),e.k0s(),e.j41(112,"input",113),e.bIt("input",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.k0s()(),e.j41(113,"mat-form-field",51)(114,"mat-label"),e.EFF(115,"Response Shape"),e.k0s(),e.j41(116,"mat-select",114),e.bIt("selectionChange",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.j41(117,"mat-option",115),e.EFF(118,'Wrap in "resource" key (DreamFactory default)'),e.k0s(),e.j41(119,"mat-option",116),e.EFF(120,'Wrap in "data" key'),e.k0s(),e.j41(121,"mat-option",117),e.EFF(122,"Wrap in table-named key"),e.k0s()()()()(),e.DNE(123,kn,5,0,"p",42),e.j41(124,"div",118)(125,"button",119)(126,"mat-icon"),e.EFF(127,"add_link"),e.k0s(),e.EFF(128),e.k0s(),e.j41(129,"button",120),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.saveEndpoint(!0))}),e.j41(130,"mat-icon"),e.EFF(131,"playlist_add"),e.k0s(),e.EFF(132," Save + New "),e.k0s(),e.j41(133,"button",120),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.runPreview())}),e.j41(134,"mat-icon"),e.EFF(135,"play_arrow"),e.k0s(),e.EFF(136),e.k0s(),e.nrm(137,"span",121),e.DNE(138,yn,4,0,"button",33),e.DNE(139,wn,4,0,"button",35),e.k0s()(),e.j41(140,"df-api-builder-preview",122),e.bIt("previewRequested",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.runPreview())}),e.k0s()(),e.j41(141,"section",123)(142,"p",124),e.EFF(143,"Advanced tools"),e.k0s(),e.j41(144,"mat-tab-group",125)(145,"mat-tab",126)(146,"div",127)(147,"div",128)(148,"strong"),e.EFF(149,"Execution Steps"),e.k0s(),e.DNE(150,jn,2,2,"div",129),e.DNE(151,On,2,0,"ng-template",null,130,e.C5r),e.k0s(),e.j41(153,"div",128)(154,"strong"),e.EFF(155,"Response Fields"),e.k0s(),e.DNE(156,Pn,2,2,"div",131),e.DNE(157,Sn,2,0,"ng-template",null,132,e.C5r),e.k0s()()(),e.j41(159,"mat-tab",133)(160,"div",134)(161,"mat-form-field",135)(162,"mat-label"),e.EFF(163,"Execution Plan JSON"),e.k0s(),e.nrm(164,"textarea",136),e.DNE(165,In,2,1,"mat-error",2),e.k0s(),e.j41(166,"mat-form-field",135)(167,"mat-label"),e.EFF(168,"Response Mapping JSON"),e.k0s(),e.nrm(169,"textarea",137),e.DNE(170,Mn,2,1,"mat-error",2),e.k0s(),e.j41(171,"details",138)(172,"summary",139),e.EFF(173," Step types & examples "),e.k0s(),e.j41(174,"div",140)(175,"p")(176,"strong"),e.EFF(177,"service_request"),e.k0s(),e.EFF(178," \u2014 call a workspace service (database / file / remote). Selectors are static; "),e.j41(179,"code"),e.EFF(180,"params"),e.k0s(),e.EFF(181,"/"),e.j41(182,"code"),e.EFF(183,"body"),e.k0s(),e.EFF(184," resolve caller input via "),e.j41(185,"code"),e.EFF(186,"{path.*}"),e.k0s(),e.EFF(187,", "),e.j41(188,"code"),e.EFF(189,"{query.*}"),e.k0s(),e.EFF(190,", "),e.j41(191,"code"),e.EFF(192,"{body.*}"),e.k0s(),e.EFF(193,", "),e.j41(194,"code"),e.EFF(195,"{steps..*}"),e.k0s(),e.EFF(196,". "),e.k0s(),e.j41(197,"p")(198,"strong"),e.EFF(199,"transform"),e.k0s(),e.EFF(200," \u2014 reshape a prior step in-memory (no request). "),e.j41(201,"code"),e.EFF(202,"from"),e.k0s(),e.EFF(203," = a context path; "),e.j41(204,"code"),e.EFF(205,"ops"),e.k0s(),e.EFF(206," run in order. Ops: "),e.j41(207,"code"),e.EFF(208,"pick"),e.k0s(),e.EFF(209,", "),e.j41(210,"code"),e.EFF(211,"omit"),e.k0s(),e.EFF(212,", "),e.j41(213,"code"),e.EFF(214,"rename"),e.k0s(),e.EFF(215,", "),e.j41(216,"code"),e.EFF(217,"defaults"),e.k0s(),e.EFF(218,", "),e.j41(219,"code"),e.EFF(220,"first"),e.k0s(),e.EFF(221,", "),e.j41(222,"code"),e.EFF(223,"limit"),e.k0s(),e.EFF(224,", "),e.j41(225,"code"),e.EFF(226,"count"),e.k0s(),e.EFF(227,", "),e.j41(228,"code"),e.EFF(229,"wrap"),e.k0s(),e.EFF(230,", "),e.j41(231,"code"),e.EFF(232,"unwrap"),e.k0s(),e.EFF(233,". "),e.k0s(),e.j41(234,"p",141),e.EFF(235," Example \u2014 fetch rows, then shape them: "),e.k0s(),e.j41(236,"pre",142),e.EFF(237),e.k0s(),e.j41(238,"p"),e.EFF(239," Run "),e.j41(240,"strong"),e.EFF(241,"Preview Return"),e.k0s(),e.EFF(242," to execute it and see each step's result, status, and timing. "),e.k0s()()()()(),e.j41(243,"mat-tab",143)(244,"div",144),e.DNE(245,An,2,0,"p",145),e.DNE(246,Tn,14,2,"ng-container",2),e.k0s()()()()}if(2&i){const t=e.sdS(51),n=e.sdS(63),r=e.sdS(152),s=e.sdS(158),a=e.XpG();e.Y8G("formGroup",a.endpointForm),e.R7$(16),e.JRh(a.generatedRouteLabel),e.R7$(2),e.JRh(a.sourceSummary),e.R7$(1),e.Y8G("formGroup",a.endpointForm),e.R7$(14),e.Y8G("ngForOf",a.workflowSteps)("ngForTrackBy",a.trackByStepKey),e.R7$(10),e.Y8G("formGroup",a.sourceForm),e.R7$(4),e.Y8G("value",a.sourceServiceSearch)("matAutocomplete",t),e.R7$(5),e.Y8G("ngIf",a.sourceServicesLoading),e.R7$(1),e.Y8G("ngForOf",a.filteredSourceServices)("ngForTrackBy",a.trackByName),e.R7$(1),e.Y8G("ngIf",!a.sourceServicesLoading&&0===a.filteredSourceServices.length),e.R7$(1),e.Y8G("ngIf",a.recentSourceServices.length),e.R7$(4),e.Y8G("value",a.sourceTableSearch)("matAutocomplete",n)("disabled",!a.sourceForm.value.service),e.R7$(5),e.Y8G("ngForOf",a.filteredSourceTables)("ngForTrackBy",a.trackByName),e.R7$(1),e.Y8G("ngIf",0===a.filteredSourceTables.length),e.R7$(1),e.Y8G("ngIf",a.sourceIntrospectionHint),e.R7$(3),e.Y8G("ngIf",a.sourceFields.length),e.R7$(1),e.Y8G("ngIf",a.sourceRelationships.length||a.selectedRelationships.size),e.R7$(12),e.Y8G("ngIf",0===a.filterRules.length),e.R7$(1),e.Y8G("ngForOf",a.filterRules)("ngForTrackBy",a.trackByFilterIndex),e.R7$(10),e.Y8G("formGroup",a.sourceForm),e.R7$(7),e.Y8G("ngForOf",a.sourceFields)("ngForTrackBy",a.trackByName),e.R7$(23),e.Y8G("ngIf",!a.selectedApiId),e.R7$(2),e.Y8G("disabled",a.endpointForm.invalid||a.saving||a.hasJsonErrors),e.R7$(3),e.SpI(" ",a.selectedEndpointId?"Update Endpoint":"Create Endpoint"," "),e.R7$(1),e.Y8G("disabled",a.endpointForm.invalid||a.saving||a.hasJsonErrors),e.R7$(4),e.Y8G("disabled",a.saving||a.previewing||!a.canGenerateFromSource),e.R7$(3),e.SpI(" ",a.previewStale?"Refresh preview":"Preview results"," "),e.R7$(2),e.Y8G("ngIf",a.selectedEndpointId),e.R7$(1),e.Y8G("ngIf",a.selectedEndpointId),e.R7$(1),e.Y8G("routeLabel",a.generatedRouteLabel)("sourceSummary",a.sourceSummary)("fieldNames",a.responseContractFields)("relationshipNames",a.selectedRelationshipLabels)("previewResult",a.previewResult)("previewStale",a.previewStale)("previewing",a.previewing)("canPreview",a.canGenerateFromSource)("previewOk",a.previewOk)("trace",a.previewTrace),e.R7$(10),e.Y8G("ngIf",a.executionStepsPreview.length)("ngIfElse",r),e.R7$(6),e.Y8G("ngIf",a.responseFieldsPreview.length)("ngIfElse",s),e.R7$(4),e.Y8G("formGroup",a.endpointForm),e.R7$(5),e.Y8G("ngIf",a.executionPlanError),e.R7$(5),e.Y8G("ngIf",a.responseMappingError),e.R7$(67),e.JRh(a.stepExample),e.R7$(7),e.Y8G("formGroup",a.testForm),e.R7$(1),e.Y8G("ngIf",!a.selectedEndpointId),e.R7$(1),e.Y8G("ngIf",a.selectedEndpointId)}}let Bn=(()=>{class i{constructor(){this.fb=(0,e.WQX)(m.ok),this.http=(0,e.WQX)(L.Qq),this.transloco=(0,e.WQX)(Ee.JO),this.snackBar=(0,e.WQX)(Z.UG),this.mapper=(0,e.WQX)(lt),this.destroyRef=(0,e.WQX)(e.abz),this.apis=[],this.endpoints=[],this.endpointCounts=new Map,this.sourceServices=[],this.sourceTables=[],this.sourceFields=[],this.sourceRelationships=[],this.sourceOpenApiPaths=[],this.sourceServiceSearch="",this.sourceTableSearch="",this.sourceIntrospectionHint="",this.recentSourceKey="df_api_builder_recent_sources",this.NON_SOURCE_TYPES=new Set(["local_file","aws_s3","azure_blob","rackspace_cloud_files","openstack_object_storage","ftp","sftp","webdav","local_email","smtp","mailgun","mandrill","sendgrid","aws_ses","office365","user","oauth","oauth_azure_ad","oauth_facebook","oauth_github","oauth_google","oauth_linkedin","oauth_microsoft","oauth_twitter","oidc","saml","ldap","adldap","azure_ad","swagger","system","api_builder"]),this.recentSourceNames=[],this.selectedFields=new Set,this.selectedRelationships=new Set,this.fieldAliases={},this.renamingFields=new Set,this.pendingSelectedFieldNames=null,this.filterRules=[],this.fieldSearch="",this.textOperators=[{value:"=",label:"equals"},{value:"!=",label:"does not equal"},{value:"like",label:"contains"}],this.comparableOperators=[{value:"=",label:"equals"},{value:"!=",label:"does not equal"},{value:">",label:"greater than"},{value:">=",label:"greater than or equal"},{value:"<",label:"less than"},{value:"<=",label:"less than or equal"}],this.loading=!1,this.saving=!1,this.sourceServicesLoading=!1,this.editorOpen=!1,this.apiDetailsOpen=!1,this.selectedApiId=null,this.selectedEndpointId=null,this.addingEndpoint=!1,this.testResult="",this.previewResult="",this.previewTrace=[],this.previewOk=null,this.previewStale=!1,this.previewing=!1,this.stepExample='{\n "steps": [\n { "id": "rows", "type": "service_request",\n "service": "your_db", "resource": "_table/your_table",\n "method": "GET", "params": { "limit": "25" } },\n { "id": "shaped", "type": "transform", "from": "{steps.rows.resource}",\n "ops": [\n { "op": "pick", "fields": ["id", "name"] },\n { "op": "rename", "map": { "name": "title" } }\n ] }\n ]\n}\n\nResponse Mapping -> { "items": "{steps.shaped}" }',this.executionStepsCache=null,this.responseFieldsCache=null,this.lastGeneratedPath="",this.lastGeneratedLabel="",this.lastGeneratedDescription="",this.apiForm=this.fb.group({name:["",[m.k0.pattern(/^[A-Za-z0-9_-]+$/)]],basePath:["",[m.k0.required,m.k0.pattern(/^[A-Za-z0-9_-]+$/)]],label:[""],description:[""],status:["draft"]}),this.endpointForm=this.fb.group({apiId:[null,m.k0.required],method:["GET",m.k0.required],path:["",m.k0.required],label:[""],description:[""],executionPlan:["{}",m.k0.required],responseMapping:["{}",m.k0.required]}),this.testForm=this.fb.group({endpointId:[null,m.k0.required],pathParams:['{\n "id": 1\n}',m.k0.required],query:["{}",m.k0.required]}),this.sourceForm=this.fb.group({service:[""],table:[""],includeId:[!1],sortField:[""],sortDirection:["ASC"],limit:[25],outputShape:["resource"]}),this.selectedEndpointsCache=null,this.filteredSourceServicesCache=null,this.workspaceServiceIds=null,this.filteredSourceTablesCache=null,this.recentSourceServicesCache=null,this.workflowStepsCache=null,this.selectedFieldNamesCache=[],this.responseContractFieldsCache=[],this.selectedRelationshipLabelsCache=[],this.availableRelationshipNamesCache=null,this.relationshipContractWarningsCache=[],this.displayedSourceFieldsCache=null,this.fieldTypeLabelCache=new WeakMap,this.titleFromNameCache=new Map}get selectedEndpoints(){const t=this.selectedEndpointsCache;if(t&&t.endpoints===this.endpoints&&t.apiId===this.selectedApiId)return t.value;const n=this.selectedApiId?this.endpoints.filter(r=>(r.apiId??r.api_id)===this.selectedApiId):[];return this.selectedEndpointsCache={endpoints:this.endpoints,apiId:this.selectedApiId,value:n},n}get filteredSourceServices(){const t=this.filteredSourceServicesCache;if(t&&t.services===this.sourceServices&&t.workspaceIds===this.workspaceServiceIds&&t.search===this.sourceServiceSearch)return t.value;let n=this.sourceServices;this.workspaceServiceIds&&this.workspaceServiceIds.size&&(n=n.filter(s=>null!=s.id&&this.workspaceServiceIds.has(s.id)));const r=this.sourceServiceSearch.trim().toLowerCase();return r&&(n=n.filter(s=>`${s.name} ${s.label??""} ${s.type}`.toLowerCase().includes(r))),this.filteredSourceServicesCache={services:this.sourceServices,workspaceIds:this.workspaceServiceIds,search:this.sourceServiceSearch,value:n},n}loadWorkspaceServices(t){t?this.http.get(`${u.C}/api_builder/services`,{params:{filter:`api_id=${t}`,limit:500},context:(0,h.Ku)()}).subscribe({next:n=>{const r=(n.resource??[]).map(s=>s.serviceId??s.service_id).filter(s=>null!=s);this.workspaceServiceIds=r.length?new Set(r):null},error:()=>this.workspaceServiceIds=null}):this.workspaceServiceIds=null}get filteredSourceTables(){const t=this.filteredSourceTablesCache;if(t&&t.tables===this.sourceTables&&t.search===this.sourceTableSearch)return t.value;const n=this.sourceTableSearch.trim().toLowerCase(),r=n?this.sourceTables.filter(s=>`${s.name} ${s.label??""}`.toLowerCase().includes(n)):this.sourceTables;return this.filteredSourceTablesCache={tables:this.sourceTables,search:this.sourceTableSearch,value:r},r}get recentSourceServices(){const t=this.recentSourceServicesCache;if(t&&t.names===this.recentSourceNames&&t.services===this.sourceServices)return t.value;const n=this.recentSourceNames.map(r=>this.sourceServices.find(s=>s.name===r)).filter(r=>!!r);return this.recentSourceServicesCache={names:this.recentSourceNames,services:this.sourceServices,value:n},n}get workflowSteps(){const t=this.sourceForm.value.service,n=this.sourceForm.value.table,r=this.sourceForm.value.outputShape,s=this.selectedFields.size,a=this.filterRules.length,l=this.selectedEndpointId,_=this.workflowStepsCache;if(_&&_.service===t&&_.table===n&&_.outputShape===r&&_.fieldCount===s&&_.ruleCount===a&&_.endpointId===l)return _.value;const b=!!t,y=!!n,d=s>0,F=!!r,E=!!l,R=[{key:"source",label:"Data",detail:b&&y?"Service + table selected":"Pick service and table",complete:b&&y},{key:"shape",label:"Fields",detail:d?`${s} fields selected`:"Select fields",complete:d},{key:"rules",label:"Filters",detail:a>0?`${a} filters`:"None (optional)",complete:!0},{key:"output",label:"Response",detail:F?`Shape: ${r}`:"Set output options",complete:F},{key:"publish",label:"Save",detail:E?"Endpoint saved":"Save endpoint",complete:E}];return this.workflowStepsCache={service:t,table:n,outputShape:r,fieldCount:s,ruleCount:a,endpointId:l,value:R},R}get executionStepsPreview(){const t=this.endpointForm.value.executionPlan??"";if(this.executionStepsCache?.key===t)return this.executionStepsCache.value;const n=this.parseJsonObject(this.endpointForm.value.executionPlan),s=(Array.isArray(n?.steps)?n?.steps:[]).filter(a=>!!a&&"object"==typeof a).map(a=>{const l=String(a.service??"service"),_=String(a.method??"GET"),b=String(a.resource??"");return{title:`${String(a.id??l)}: ${_} ${l}`,detail:b||"Root resource"}});return this.executionStepsCache={key:t,value:s},s}get responseFieldsPreview(){const t=this.endpointForm.value.responseMapping??"";if(this.responseFieldsCache?.key===t)return this.responseFieldsCache.value;const n=this.parseJsonObject(this.endpointForm.value.responseMapping),r=n?Object.keys(n):[];return this.responseFieldsCache={key:t,value:r},r}get executionPlanError(){return this.jsonValidationError(this.endpointForm.controls.executionPlan.errors)}get responseMappingError(){return this.jsonValidationError(this.endpointForm.controls.responseMapping.errors)}get hasJsonErrors(){return!!this.executionPlanError||!!this.responseMappingError}get selectedFieldNames(){const t=Array.from(this.selectedFields);return te(t,this.selectedFieldNamesCache)||(this.selectedFieldNamesCache=t),this.selectedFieldNamesCache}get responseContractFields(){const t=this.selectedFieldNames.map(n=>this.aliasFor(n)||n);return te(t,this.responseContractFieldsCache)||(this.responseContractFieldsCache=t),this.responseContractFieldsCache}get selectedRelationshipLabels(){const t=Array.from(this.selectedRelationships).map(n=>{const r=this.sourceRelationships.find(s=>s.name===n);return this.aliasFor(n)||r?.label||this.titleFromName(n)});return te(t,this.selectedRelationshipLabelsCache)||(this.selectedRelationshipLabelsCache=t),this.selectedRelationshipLabelsCache}get relationshipContractWarnings(){let t=this.availableRelationshipNamesCache;(!t||t.relationships!==this.sourceRelationships)&&(t={relationships:this.sourceRelationships,value:new Set(this.sourceRelationships.map(s=>s.name))},this.availableRelationshipNamesCache=t);const n=t.value,r=Array.from(this.selectedRelationships).filter(s=>!n.has(s)).map(s=>`"${s}" is no longer available in the selected dataset schema.`);return te(r,this.relationshipContractWarningsCache)||(this.relationshipContractWarningsCache=r),this.relationshipContractWarningsCache}relationshipTypeLabel(t){switch(t){case"belongs_to":return"Many to one";case"has_one":return"One to one";case"has_many":return"One to many";case"many_many":return"Many to many";default:return"Related data"}}relationshipContractLabel(t){return"belongs_to"===t||"has_one"===t?"object or null":"array"}get displayedSourceFields(){const t=this.fieldSearch.trim().toLowerCase();if(!t)return this.sourceFields;const n=this.displayedSourceFieldsCache;if(n&&n.fields===this.sourceFields&&n.search===t)return n.value;const r=this.sourceFields.filter(s=>[s.name,s.label,s.type,s.dbType,s.db_type].filter(Boolean).some(a=>String(a).toLowerCase().includes(t)));return this.displayedSourceFieldsCache={fields:this.sourceFields,search:t,value:r},r}get canGenerateFromSource(){return!!this.sourceForm.value.service&&!!this.sourceForm.value.table&&this.selectedFields.size>0}get generatedRouteLabel(){return this.canGenerateFromSource?`${this.endpointForm.value.method??"GET"} ${this.endpointForm.value.path??""}`:"Choose a source API and table"}get sourceSummary(){const t=this.sourceForm.value.service,n=this.sourceForm.value.table;return t&&n?`Returns ${this.selectedFields.size} selected fields for ${this.sourceForm.value.includeId?"one record from":"records from"} ${t}.${n}${0===this.filterRules.length?"":` with ${this.filterRules.length} filter${1===this.filterRules.length?"":"s"}`}.`:"API Builder will inspect the source API and generate this endpoint."}ngOnInit(){this.recentSourceNames=this.readRecentSources(),this.validateJsonEditors(),this.endpointForm.controls.executionPlan.valueChanges.pipe(J(this.destroyRef)).subscribe(()=>{this.validateJsonEditors(),this.markPreviewStale()}),this.endpointForm.controls.responseMapping.valueChanges.pipe(J(this.destroyRef)).subscribe(()=>{this.validateJsonEditors(),this.markPreviewStale()}),this.loadSourceServices(),this.loadAll()}onGlobalShortcut(t){if(!this.editorOpen||this.saving)return;const n=t.target,r=n?.tagName?.toLowerCase()??"";if(n?.closest('input, textarea, [contenteditable="true"], mat-select')||["input","textarea","select"].includes(r))return;const a=t.key.toLowerCase();return"n"===a?(t.preventDefault(),void this.newEndpoint()):"d"===a?(t.preventDefault(),void this.duplicateSelectedEndpoint()):void("s"===a&&(t.preventDefault(),this.saveEndpoint(!1)))}introspectionBadge(t){const n=(t.type||"").toLowerCase();return["pgsql","mysql","sqlite","sqlsrv","oracle","ibmdb2"].includes(n)?"schema":["rest","soap","http"].includes(n)?"api_docs":"no metadata"}selectRecentSource(t){this.chooseSourceService(t)}chooseSourceService(t){t&&(this.sourceForm.patchValue({service:t}),this.sourceServiceSearch=this.serviceDisplay(t),this.loadTables(t))}chooseSourceTable(t){t&&(this.sourceForm.patchValue({table:t}),this.sourceTableSearch=this.tableDisplay(t),this.loadFields(t))}onSourceFocus(){this.sourceServiceSearch=""}onSourceBlur(){setTimeout(()=>{const t=this.sourceForm.value.service;this.sourceServiceSearch=t?this.serviceDisplay(t):""},150)}onTableFocus(){this.sourceTableSearch=""}onTableBlur(){setTimeout(()=>{const t=this.sourceForm.value.table;this.sourceTableSearch=t?this.tableDisplay(t):""},150)}serviceDisplay(t){const n=this.sourceServices.find(r=>r.name===t);return n?n.label||n.name:t}tableDisplay(t){const n=this.sourceTables.find(r=>r.name===t);return n?n.label||this.titleFromName(n.name):this.titleFromName(t)}rememberRecentSource(t){const n=[t,...this.recentSourceNames.filter(r=>r!==t)].slice(0,6);this.recentSourceNames=n,localStorage.setItem(this.recentSourceKey,JSON.stringify(n))}readRecentSources(){try{const t=localStorage.getItem(this.recentSourceKey);if(!t)return[];const n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>"string"==typeof r):[]}catch{return[]}}loadAll(){this.loading=!0,this.http.get(`${u.C}/api_builder/apis`,{params:{limit:500},context:(0,h.PH)()}).pipe((0,S.j)(()=>this.loading=!1)).subscribe({next:t=>{this.apis=t.resource??[],this.loadEndpoints()},error:()=>this.toast("Could not load API Builder definitions.")})}loadEndpoints(){this.http.get(`${u.C}/api_builder/endpoints`,{params:{limit:500},context:(0,h.PH)()}).subscribe({next:t=>{this.endpoints=t.resource??[],this.rebuildEndpointCounts()},error:()=>this.toast("Could not load endpoint definitions.")})}loadSourceServices(){this.sourceServicesLoading=!0,this.http.get(`${u.C}/system/service`,{params:{fields:"id,name,label,type,is_active",limit:500},context:(0,h.PH)()}).pipe((0,S.j)(()=>this.sourceServicesLoading=!1)).subscribe({next:t=>{this.sourceServices=(t.resource??[]).filter(r=>"api_builder"!==r.name&&"system"!==r.name&&!1!==r.is_active&&!this.NON_SOURCE_TYPES.has((r.type||"").toLowerCase())),this.sourceForm.patchValue({service:"",table:""})},error:()=>this.toast("Could not load source APIs.")})}loadTables(t){t&&(this.rememberRecentSource(t),this.sourceTables=[],this.sourceFields=[],this.sourceRelationships=[],this.sourceOpenApiPaths=[],this.sourceIntrospectionHint="",this.sourceTableSearch="",this.selectedFields.clear(),this.selectedRelationships.clear(),this.sourceForm.patchValue({table:""}),this.http.get(`${u.C}/${t}/_schema`,{params:{fields:"name,label"},context:(0,h.Ku)()}).subscribe({next:n=>{try{const s=(Array.isArray(n?.resource)?n.resource:[]).map(a=>({...a,source:"schema"}));if(s.length)return this.sourceIntrospectionHint="Schema metadata loaded from native service schema.",void this.setSourceTables(s);this.loadTablesFromOpenApi(t)}catch(r){console.error("Failed to process source schema table list",{serviceName:t,response:n,error:r}),this.loadTablesFromOpenApi(t)}},error:()=>this.loadTablesFromOpenApi(t)}))}loadTablesFromOpenApi(t){this.http.get(`${u.C}/api_docs/${t}`,{params:{expand_schema:!0},context:(0,h.Ku)()}).subscribe({next:n=>{this.sourceOpenApiPaths=Object.keys(n.paths??{});const r=this.tablesFromOpenApi(this.sourceOpenApiPaths);if(r.length)return this.sourceIntrospectionHint="Using api_docs fallback for resource discovery (native schema unavailable).",void this.setSourceTables(r);this.loadTablesFromSchema(t)},error:()=>this.loadTablesFromSchema(t)})}loadTablesFromSchema(t){const n=this.sourceServices.find(s=>s.name===t)?.type;if(!["pgsql","mysql","sqlite","sqlsrv","oracle","ibmdb2"].includes(String(n)))return this.sourceIntrospectionHint="No metadata available for this source type. Choose a source with schema or api_docs support.",void this.toast("This source API does not expose table schema metadata for field selection.");this.http.get(`${u.C}/${t}/_table`,{params:{limit:500},context:(0,h.PH)()}).subscribe({next:s=>{this.setSourceTables((s.resource??[]).map(a=>({...a,source:"schema"})))},error:()=>this.toast("Could not load tables for source API.")})}setSourceTables(t){this.sourceTables=t;const n=this.sourceForm.value.table,s=(n?this.sourceTables.find(a=>a.name===n):void 0)??this.sourceTables.find(a=>"customers"===a.name)??this.sourceTables[0];s&&(this.sourceForm.patchValue({table:s.name}),this.sourceTableSearch=this.tableDisplay(s.name),this.loadFields(s.name))}populateSourceTablesQuietly(t){t&&this.http.get(`${u.C}/${t}/_schema`,{params:{fields:"name,label"},context:(0,h.Ku)()}).subscribe({next:n=>{const r=Array.isArray(n?.resource)?n.resource:[];r.length&&(this.sourceTables=r.map(s=>({...s,source:"schema"})))},error:()=>{}})}loadFields(t){const n=this.sourceForm.value.service;!n||!t||(this.sourceFields=[],this.sourceRelationships=[],this.selectedFields.clear(),this.fieldSearch="",this.http.get(`${u.C}/${n}/_schema/${t}`,{context:(0,h.Ku)()}).subscribe({next:r=>{try{const s=Array.isArray(r?.field)?r.field:[];if(this.sourceFields=s.map(a=>({...a,label:a.label||this.titleFromName(a.name)})),this.sourceRelationships=this.mapRelatedToRelationships(Array.isArray(r?.related)?r.related:[]),this.pendingSelectedFieldNames?.length){const a=new Set(this.pendingSelectedFieldNames);this.sourceFields.forEach(l=>{a.has(l.name)&&this.selectedFields.add(l.name)}),this.pendingSelectedFieldNames=null}else this.sourceFields.forEach(a=>this.selectedFields.add(a.name));this.generateEndpointFromSource()}catch(s){console.error("Failed to process source fields response",{serviceName:n,tableName:t,response:r,error:s}),this.loadFieldsFromOpenApi(t)}},error:()=>this.loadFieldsFromOpenApi(t)}))}isFieldSelected(t){return this.selectedFields.has(t)}aliasFor(t){return this.fieldAliases[t]??""}isRenaming(t){return this.renamingFields.has(t)||!!this.aliasFor(t)}startRenaming(t){this.renamingFields.add(t)}finishRenaming(t){this.aliasFor(t)||this.renamingFields.delete(t)}setAlias(t,n){const r=n.trim();r?this.fieldAliases[t]=r:delete this.fieldAliases[t],this.generateEndpointFromSource()}isRelationshipSelected(t){return this.selectedRelationships.has(t)}toggleRelationship(t,n){n?this.selectedRelationships.add(t):this.selectedRelationships.delete(t),this.generateEndpointFromSource()}toggleField(t,n){n?this.selectedFields.add(t):this.selectedFields.delete(t),this.generateEndpointFromSource()}selectAllFields(){this.sourceFields.forEach(t=>this.selectedFields.add(t.name)),this.generateEndpointFromSource()}clearAllFields(){this.selectedFields.clear(),this.generateEndpointFromSource()}addFilter(){const t=this.sourceFields.find(n=>"name"===n.name)??this.sourceFields.find(n=>!this.isPrimaryKey(n)&&(n.type??"").includes("string"))??this.sourceFields.find(n=>!this.isPrimaryKey(n))??this.sourceFields[0];t?(this.filterRules=[...this.filterRules,{field:t.name,operator:"=",value:""}],this.markPreviewStale()):this.toast("Choose a table before adding filters.")}removeFilter(t){this.filterRules=this.filterRules.filter((n,r)=>r!==t),this.generateEndpointFromSource()}updateFilter(t,n,r){const s=this.filterRules[t];s&&(s[n]=r,"field"===n&&(this.filterOperatorOptions(s.field).some(l=>l.value===s.operator)||(s.operator="=")),this.generateEndpointFromSource())}trackByFilterIndex(t){return t}trackByStepKey(t,n){return n.key}trackByName(t,n){return n.name}trackById(t,n){return n.id}trackByTitle(t,n){return n.title}trackByOptionValue(t,n){return n.value}trackByValue(t,n){return n}filterOperatorOptions(t){const n=this.sourceFields.find(s=>s.name===t),r=this.fieldType(n);return this.isNumericField(n)||["date","datetime","timestamp"].some(s=>r.includes(s))?this.comparableOperators:this.textOperators}generateEndpointFromSource(){const t=this.sourceForm.value.service,n=this.sourceForm.value.table,r=!!this.sourceForm.value.includeId,s=this.selectedFieldNames;if(!t||!n||0===s.length)return;const a=this.safeStepId(n),l=r?`Get ${this.titleFromName(n)}`:`List ${this.titleFromName(n)}`,_=r?`/${n}/{id}`:`/${n}`,b=r?`_table/${n}/{path.id}`:`_table/${n}`,y=this.buildFilterString(),d={fields:s.join(",")};this.selectedRelationships.size&&(d.related=Array.from(this.selectedRelationships).join(",")),y&&(d.filter=y);const v=this.sourceForm.value.sortField;v&&(d.order=`${v} ${this.sourceForm.value.sortDirection??"ASC"}`);const F=Number(this.sourceForm.value.limit);!r&&F>0&&(d.limit=String(F));const E=this.resolveOutputKey(n),R=`Returns selected fields from ${t}.${n}.`,V={};for(const X of[...this.selectedFieldNames,...this.selectedRelationships]){const B=this.fieldAliases[X];B&&B!==X&&(V[X]=B)}const ne={id:a,type:"service_request",service:t,method:"GET",resource:b,params:d};Object.keys(V).length&&(ne.aliases=V);const j=this.endpointForm.value,D={apiId:this.selectedApiId,method:"GET",executionPlan:JSON.stringify({steps:[ne]},null,2),responseMapping:JSON.stringify({[E]:r?`{steps.${a}}`:`{steps.${a}.resource}`},null,2)};(!j.path||j.path===this.lastGeneratedPath)&&(D.path=_,this.lastGeneratedPath=_),(!j.label||j.label===this.lastGeneratedLabel)&&(D.label=l,this.lastGeneratedLabel=l),(!j.description||j.description===this.lastGeneratedDescription)&&(D.description=R,this.lastGeneratedDescription=R),this.endpointForm.patchValue(D),this.testForm.patchValue({pathParams:r?'{\n "id": 1\n}':"{}",query:"{}"}),this.markPreviewStale()}runPreview(){let t,n;try{t=JSON.parse(this.endpointForm.value.executionPlan??"{}"),n=JSON.parse(this.endpointForm.value.responseMapping??"{}")}catch{return void this.toast("Generated endpoint details must be valid JSON before previewing.")}this.previewing=!0,this.http.post(`${u.C}/api_builder/test`,{endpoint:{apiId:this.selectedApiId??0,method:this.endpointForm.value.method??"GET",path:this.endpointForm.value.path??"",label:this.endpointForm.value.label??"",isActive:!0,requestSchema:this.buildRequestSchema(!!this.sourceForm.value.includeId),responseSchema:this.buildResponseSchema(this.resolveOutputKey(this.sourceForm.value.table??""),!!this.sourceForm.value.includeId),executionPlan:t,responseMapping:n},path_params:this.sourceForm.value.includeId?{id:1}:{},query:{},dry_run:!1,trace:!0},{context:(0,h.PH)()}).pipe((0,S.j)(()=>this.previewing=!1)).subscribe({next:r=>{this.previewTrace=r?.trace??[],this.previewOk=r?.ok??null,this.previewResult=JSON.stringify(r?.result??r,null,2),this.previewStale=!1},error:r=>{const s=(0,G.cQ)(r).raw;this.previewTrace=s?.trace??[],this.previewOk=!1,this.previewResult=JSON.stringify(s?.error??s,null,2),this.previewStale=!1}})}markPreviewStale(){this.previewResult&&(this.previewStale=!0)}openApiDocs(){if(!this.selectedApiId)return void this.toast("Save the API first so docs can be generated for it.");const t=this.apis.find(s=>s.id===this.selectedApiId),r=(t?.basePath??t?.base_path??this.apiForm.value.basePath??"").replace(/^\/+|\/+$/g,"");r?this.http.get(`${u.C}/api_docs/${r}`,{context:(0,h.PH)()}).subscribe({next:()=>{window.location.assign(`${window.location.origin}/dreamfactory/dist/#/api-connections/api-docs/${r}`)},error:s=>{this.toast(`Could not load generated OpenAPI spec for ${r}. ${this.describeHttpError(s)}`)}}):this.toast("API URL is empty. Set API URL and save before opening docs.")}saveApi(t="API saved."){if(this.apiForm.invalid)return;const n=this.withoutEmptyOptionalFields(this.mapper.toApiPayload({name:this.apiForm.value.name||this.safeStepId(this.apiForm.value.basePath||this.apiForm.value.label||"custom_api"),basePath:this.apiForm.value.basePath??"",label:this.apiForm.value.label??"",description:this.apiForm.value.description??"",status:this.apiForm.value.status??"draft"})),r=this.selectedApiId?this.http.put(`${u.C}/api_builder/apis/${this.selectedApiId}`,n,{context:(0,h.PH)()}):this.http.post(`${u.C}/api_builder/apis`,{resource:[n]},{context:(0,h.PH)()});this.saving=!0,r.pipe((0,S.j)(()=>this.saving=!1)).subscribe({next:s=>{const a="resource"in s?s.resource?.[0]:s;if(!a)return void this.toast("API save did not return a definition.");const l={...n,...a};this.toast(t),this.apis=[l,...this.apis.filter(_=>_.id!==l.id)],this.selectApi(l.id)},error:s=>this.toast(`Could not save API. ${this.describeHttpError(s)}`)})}updateApiStatus(t){!this.selectedApiId||this.saving||(this.apiForm.patchValue({status:t}),this.saveApi("published"===t?"API published.":"API moved to draft."))}saveEndpoint(t=!1){if(!this.selectedApiId)return void this.toast("Save the API first, then create endpoints inside it.");if(this.endpointForm.invalid)return;let n,r;try{n=JSON.parse(this.endpointForm.value.executionPlan??"{}"),r=JSON.parse(this.endpointForm.value.responseMapping??"{}")}catch{return void this.toast("Execution plan and response mapping must be valid JSON.")}const s=this.withoutEmptyOptionalFields(this.mapper.toEndpointPayload({apiId:this.endpointForm.value.apiId,method:this.endpointForm.value.method??"GET",path:this.endpointForm.value.path??"",label:this.endpointForm.value.label??"",description:this.endpointForm.value.description??"",isActive:!0,requestSchema:this.buildRequestSchema(!!this.sourceForm.value.includeId),responseSchema:this.buildResponseSchema(this.resolveOutputKey(this.sourceForm.value.table??""),!!this.sourceForm.value.includeId),executionPlan:n,responseMapping:r})),a=String(s.path??"").trim(),l=String(s.method??"GET").toUpperCase(),_=this.endpoints.find(d=>{if(this.selectedEndpointId&&d.id===this.selectedEndpointId)return!1;const F=d.apiId??d.api_id,E=String(d.path??"").trim(),R=String(d.method??"").toUpperCase();return F===s.api_id&&E===a&&R===l});let b=this.selectedEndpointId;_&&(this.toast(`Endpoint ${l} ${a} already exists in this API (id ${_.id}). Saving as update.`),this.selectEndpoint(_.id),b=_.id);const y=b?this.http.put(`${u.C}/api_builder/endpoints/${b}`,s,{context:(0,h.PH)()}):this.http.post(`${u.C}/api_builder/endpoints`,{resource:[s]},{context:(0,h.PH)()});this.saving=!0,y.pipe((0,S.j)(()=>this.saving=!1)).subscribe({next:d=>{const v="resource"in d?d.resource?.[0]:d;if(!v)return void this.toast("Endpoint save did not return a definition.");const F={...s,...v};if(this.toast(t?"Endpoint saved. Ready for next endpoint.":"Endpoint saved."),this.endpoints=[F,...this.endpoints.filter(E=>E.id!==F.id)],this.rebuildEndpointCounts(),t)return this.resetEndpointEditor(),void(this.addingEndpoint=!0);this.selectEndpoint(F.id)},error:d=>this.toast(`Could not save endpoint. ${this.describeHttpError(d)}`)})}testEndpoint(){if(this.testForm.invalid)return;let t,n;try{t=JSON.parse(this.testForm.value.pathParams??"{}"),n=JSON.parse(this.testForm.value.query??"{}")}catch{return void this.toast("Path params and query must be valid JSON.")}this.saving=!0,this.http.post(`${u.C}/api_builder/test`,{endpoint_id:this.testForm.value.endpointId,path_params:t,query:n,dry_run:!1},{context:(0,h.PH)()}).pipe((0,S.j)(()=>this.saving=!1)).subscribe({next:r=>this.testResult=JSON.stringify(r,null,2),error:r=>{const s=(0,G.cQ)(r);this.testResult=JSON.stringify(s.raw??s,null,2)}})}selectApi(t){this.editorOpen=!0,this.apiDetailsOpen=!1,this.selectedApiId=t,this.loadWorkspaceServices(t);const n=this.apis.find(r=>r.id===t);n&&this.apiForm.patchValue({name:n.name,basePath:n.basePath??n.base_path??"",label:n.label??"",description:n.description??"",status:n.status??"draft"}),this.endpointForm.patchValue({apiId:t}),this.selectedEndpointId=null,this.addingEndpoint=!1}selectEndpoint(t){this.selectedEndpointId=t,this.addingEndpoint=!1,this.lastGeneratedPath="",this.lastGeneratedLabel="",this.lastGeneratedDescription="";const n=this.endpoints.find(r=>r.id===t);if(n)try{this.endpointForm.patchValue({apiId:n.apiId??n.api_id??this.selectedApiId,method:n.method,path:n.path,label:n.label??"",description:n.description??"",executionPlan:JSON.stringify(n.executionPlan??n.execution_plan??{},null,2),responseMapping:JSON.stringify(n.responseMapping??n.response_mapping??{},null,2)});const r=n.executionPlan??n.execution_plan,s=Array.isArray(r?.steps)?r?.steps?.[0]:null,a=String(s?.resource??""),l=String(s?.service??""),b=a.match(/^_table\/([^/{]+)(?:\/\{path\.id\})?$/)?.[1]??"",y=a.endsWith("/{path.id}"),d=s?.params??{},v=String(d.fields??"").split(",").map(I=>I.trim()).filter(Boolean),F=String(d.related??"").split(",").map(I=>I.trim()).filter(Boolean),E=String(d.order??""),[R="",V="ASC"]=E.split(/\s+/,2),ne="DESC"===(V||"ASC").toUpperCase()?"DESC":"ASC",j=Number(d.limit??25),D=s?.aliases??{},B=Object.keys(n.responseMapping??n.response_mapping??{})[0]??"resource",Nn="data"===B?"data":B===this.safeStepId(b)?"table":"resource";l&&b&&(this.pendingSelectedFieldNames=v.length?v:null,this.selectedRelationships=new Set(F),this.fieldAliases=Object.fromEntries(Object.entries(D).filter(([,I])=>"string"==typeof I&&I).map(([I,Gn])=>[I,String(Gn)])),this.sourceForm.patchValue({service:l,table:b,includeId:y,sortField:R,sortDirection:ne,limit:Number.isFinite(j)&&j>0?j:25,outputShape:Nn}),this.sourceServiceSearch=this.serviceDisplay(l),this.sourceTableSearch=this.tableDisplay(b),this.filterRules=this.parseFilters(String(d.filter??"")),this.sourceIntrospectionHint="",this.loadFields(b),this.populateSourceTablesQuietly(l))}catch(r){return console.error("Failed to load endpoint into builder",{endpointId:t,error:r,endpoint:n}),this.toast(`Could not load endpoint ${t} into the builder. ${r?.message??""}`),void this.newEndpoint()}this.testForm.patchValue({endpointId:t})}newApi(){this.editorOpen=!0,this.apiDetailsOpen=!0,this.selectedApiId=null,this.workspaceServiceIds=null,this.apiForm.reset({name:"",basePath:"",label:"",description:"",status:"draft"}),this.resetEndpointEditor()}closeEditor(){this.editorOpen=!1,this.apiDetailsOpen=!1,this.selectedApiId=null,this.selectedEndpointId=null,this.addingEndpoint=!1,this.testResult=""}rebuildEndpointCounts(){const t=new Map;for(const n of this.endpoints){const r=n.apiId??n.api_id;"number"==typeof r&&t.set(r,(t.get(r)??0)+1)}this.endpointCounts=t}newEndpoint(){this.selectedApiId?this.resetEndpointEditor():this.toast("Save the API first, then add endpoints to it.")}addEndpoint(){this.selectedApiId?(this.resetEndpointEditor(),this.addingEndpoint=!0):this.toast("Save the API first, then add endpoints to it.")}cancelAddEndpoint(){this.addingEndpoint=!1,this.resetEndpointEditor()}toggleEndpoint(t){this.selectedEndpointId!==t.id||this.addingEndpoint?(this.addingEndpoint=!1,this.selectEndpoint(t.id)):this.selectedEndpointId=null}resetEndpointEditor(){this.selectedEndpointId=null,this.pendingSelectedFieldNames=null,this.endpointForm.reset({apiId:this.selectedApiId,method:"GET",path:"",label:"",description:"",executionPlan:"{}",responseMapping:"{}"}),this.testForm.patchValue({endpointId:null}),this.testResult="",this.previewResult="",this.previewTrace=[],this.previewOk=null,this.previewStale=!1,this.selectedFields.clear(),this.selectedRelationships.clear(),this.fieldAliases={},this.renamingFields.clear(),this.filterRules=[],this.sourceTables=[],this.sourceFields=[],this.sourceRelationships=[],this.sourceServiceSearch="",this.sourceTableSearch="",this.lastGeneratedPath="",this.lastGeneratedLabel="",this.lastGeneratedDescription="",this.sourceForm.patchValue({service:"",table:"",includeId:!1,sortField:"",sortDirection:"ASC",limit:25,outputShape:"resource"})}duplicateSelectedEndpoint(){const t=this.endpoints.find(l=>l.id===this.selectedEndpointId);if(!t||!this.selectedApiId)return void this.toast("Select an endpoint to duplicate.");this.selectEndpoint(t.id);const n=String(t.path??"").trim(),r=n?n.endsWith("-copy")?n:`${n}-copy`:"/new-endpoint",s=String(t.label??"").trim(),a=s?s.endsWith(" (copy)")?s:`${s} (copy)`:"Copied endpoint";this.selectedEndpointId=null,this.endpointForm.patchValue({apiId:this.selectedApiId,path:r,label:a}),this.testForm.patchValue({endpointId:null}),this.toast("Endpoint duplicated into a new draft. Save to create it.")}focusWorkflowStep(t){const r=document.getElementById(`workflow-${t}`);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}deleteEndpoint(t,n){n?.stopPropagation();const r=this.endpoints.find(a=>a.id===t);window.confirm(`Delete ${r?`${r.method} ${r.path}`:`endpoint ${t}`}? This cannot be undone.`)&&(this.saving=!0,this.http.delete(`${u.C}/api_builder/endpoints/${t}`,{context:(0,h.PH)()}).pipe((0,S.j)(()=>this.saving=!1)).subscribe({next:()=>{this.endpoints=this.endpoints.filter(a=>a.id!==t),this.rebuildEndpointCounts(),this.toast("Endpoint deleted."),this.selectedEndpointId===t&&this.newEndpoint()},error:a=>this.toast(`Could not delete endpoint. ${this.describeHttpError(a)}`)}))}deleteApi(t,n){n?.stopPropagation();const r=this.apis.find(a=>a.id===t);window.confirm(`Delete "${r?r.label||r.name:`API ${t}`}" and all of its endpoints? This cannot be undone.`)&&(this.loading=!0,this.http.delete(`${u.C}/api_builder/apis/${t}`,{context:(0,h.PH)()}).pipe((0,S.j)(()=>this.loading=!1)).subscribe({next:()=>{this.apis=this.apis.filter(a=>a.id!==t),this.endpoints=this.endpoints.filter(a=>(a.apiId??a.api_id)!==t),this.rebuildEndpointCounts(),this.toast("API deleted."),this.selectedApiId===t&&this.closeEditor()},error:a=>this.toast(`Could not delete API. ${this.describeHttpError(a)}`)}))}validateJsonEditors(){this.applyJsonControlValidation(this.endpointForm.controls.executionPlan,"Execution plan"),this.applyJsonControlValidation(this.endpointForm.controls.responseMapping,"Response mapping")}applyJsonControlValidation(t,n){const r=t.value??"",s={...t.errors??{}};if(delete s.jsonInvalid,r.trim()){delete s.required;try{const a=JSON.parse(r);(!a||"object"!=typeof a||Array.isArray(a))&&(s.jsonInvalid=`${n} must be a JSON object.`)}catch(a){s.jsonInvalid=`${n} JSON is invalid: ${a?.message??"Parse error."}`}}else s.required=!0;t.setErrors(Object.keys(s).length?s:null)}jsonValidationError(t){return t?"string"==typeof t.jsonInvalid?t.jsonInvalid:t.required?"JSON is required.":"":""}withoutEmptyOptionalFields(t){return Object.fromEntries(Object.entries(t).filter(([n,r])=>!["label","description"].includes(n)||""!==r))}parseJsonObject(t){if("string"!=typeof t)return null;try{const n=JSON.parse(t);return n&&"object"==typeof n&&!Array.isArray(n)?n:null}catch{return null}}tablesFromOpenApi(t){const n=new Set;return t.forEach(r=>{const s=r.match(/^\/_table\/([^/{]+)$/);if(s?.[1])return void n.add(s[1]);const a=r.match(/^\/([^/{]+)(?:\/\{[^}]+\})?$/);a?.[1]&&!a[1].startsWith("_")&&n.add(a[1])}),Array.from(n).sort((r,s)=>r.localeCompare(s)).map(r=>({name:r,source:"openapi"}))}loadFieldsFromOpenApi(t){const n=this.sourceForm.value.service;n?this.http.get(`${u.C}/api_docs/${n}`,{params:{expand_schema:!0},context:(0,h.Ku)()}).subscribe({next:r=>{const s=this.fieldsFromOpenApi(r,t);if(s.length){if(this.sourceFields=s,this.sourceRelationships=[],this.pendingSelectedFieldNames?.length){const a=new Set(this.pendingSelectedFieldNames);this.sourceFields.forEach(l=>{a.has(l.name)&&this.selectedFields.add(l.name)}),this.pendingSelectedFieldNames=null}else this.sourceFields.forEach(a=>this.selectedFields.add(a.name));this.generateEndpointFromSource()}else this.toast("No field schema found in API spec for this resource.")},error:()=>this.toast("Could not load table fields.")}):this.toast("Could not load table fields.")}fieldsFromOpenApi(t,n){const r=t.paths??{},s=[`/_table/${n}`,`/${n}`,`/${n}/{id}`];for(const a of s){const b=r[a]?.get?.responses?.[200]?.content?.["application/json"]?.schema,d=this.resolveRowSchema(b)?.properties;if(d)return Object.entries(d).map(([v,F])=>({name:v,label:this.titleFromName(v),type:this.sourceFieldTypeFromOpenApi(F),openapi:F}))}return[]}resolveRowSchema(t){return t&&"object"==typeof t?"object"===t.type&&t.properties?Object.values(t.properties).find(s=>"array"===s?.type&&s?.items)?.items??t:"array"===t.type&&t.items?t.items:null:null}sourceFieldTypeFromOpenApi(t){const n=String(t?.type??"string"),r=String(t?.format??"");return r?`${n}:${r}`:n}mapRelatedToRelationships(t){return Array.isArray(t)?t.map(n=>({name:String(n?.name??n?.field??""),label:String(n?.label??this.titleFromName(String(n?.name??n?.field??""))),type:String(n?.type??"relationship"),field:String(n?.field??""),refTable:String(n?.refTable??n?.ref_table??n?.table??""),refField:String(n?.refField??n?.ref_field??n?.idField??n?.id_field??"")})).filter(n=>!!n.name):[]}buildFilterString(){return this.filterRules.filter(t=>t.field&&""!==t.value).map(t=>{const n=this.formatFilterValue(t);return"like"===t.operator?`${t.field} like ${n}`:`${t.field}${t.operator}${n}`}).join(" AND ")}parseFilters(t){return t.trim()?t.split(/\s+AND\s+/i).map(n=>n.trim()).filter(Boolean).map(n=>{const r=n.match(/^([A-Za-z0-9_]+)\s+like\s+'?(.*?)'?$/i);if(r){const[,a,l]=r;return{field:a,operator:"like",value:l.replace(/^%|%$/g,"")}}const s=n.match(/^([A-Za-z0-9_]+)\s*(=|!=|>=|<=|>|<)\s*'?(.+?)'?$/);if(s){const[,a,l,_]=s;return{field:a,operator:l,value:_}}return null}).filter(n=>!!n):[]}formatFilterValue(t){const n="like"===t.operator?`%${t.value}%`:t.value,r=this.sourceFields.find(s=>s.name===t.field);return r&&this.isNumericField(r)||/^-?\d+(\.\d+)?$/.test(n)?n:`'${n.replace(/'/g,"''")}'`}buildRequestSchema(t){if(!t)return{};const n=this.sourceFields.find(r=>this.isPrimaryKey(r))??this.sourceFields.find(r=>"id"===r.name);return{path:{id:{...this.openApiSchemaForField(n),required:!0,description:n?`Value for ${n.label||n.name}.`:"Record identifier."}}}}buildResponseSchema(t,n){const r=Object.fromEntries(this.selectedFieldNames.map(l=>{const _=this.sourceFields.find(b=>b.name===l);return[l,this.openApiSchemaForField(_)]})),s=this.sourceFields.filter(l=>this.selectedFields.has(l.name)&&!!l.required&&!(l.allowNull??l.allow_null)).map(l=>l.name),a={type:"object",properties:r,additionalProperties:!1};return s.length&&(a.required=s),{type:"object",properties:{[t]:n?a:{type:"array",items:a}},additionalProperties:!1}}openApiSchemaForField(t){if(t?.openapi)return t.openapi;const n=this.fieldType(t);if(this.isNumericField(t))return n.includes("int")||"id"===n?{type:"integer"}:{type:"number"};if(n.includes("bool"))return{type:"boolean"};if("date"===n)return{type:"string",format:"date"};if(n.includes("date")||n.includes("time"))return{type:"string",format:"date-time"};if("array"===n)return{type:"array",items:{}};if("object"===n)return{type:"object",additionalProperties:!0};const r={type:"string"};return t?.length&&(r.maxLength=t.length),t&&(t.allowNull??t.allow_null)&&(r.nullable=!0),r}fieldTypeLabel(t){const n=this.fieldTypeLabelCache.get(t);if(void 0!==n)return n;const r=[t.type,t.dbType??t.db_type].filter(Boolean),s=t.length??(t.precision?`${t.precision}${t.scale?`,${t.scale}`:""}`:null),a=`${r.join(" / ")}${s?` (${s})`:""}`;return this.fieldTypeLabelCache.set(t,a),a}isPrimaryKey(t){return!!(t.isPrimaryKey??t.is_primary_key)}isUnique(t){return!!(t.isUnique??t.is_unique)}isForeignKey(t){return!!(t.isForeignKey??t.is_foreign_key)}isNumericField(t){const n=this.fieldType(t);return["number","integer","decimal","float","double","id"].some(r=>n.includes(r))}fieldType(t){return String(t?.type??t?.dbType??t?.db_type??"").toLowerCase().trim()}safeStepId(t){return t.replace(/[^A-Za-z0-9_]+/g,"_")}resolveOutputKey(t){switch(this.sourceForm.value.outputShape){case"table":return this.safeStepId(t||"data");case"data":return"data";default:return"resource"}}describeHttpError(t){const n=(0,G.cQ)(t);if((0,G.zH)(n).includes("api_id_method_path_unique"))return"An endpoint with the same HTTP method and path already exists in this API.";const r=n.fields.length?n.fields.map(s=>s.message).join(" "):n.message;return this.transloco.translate(String(r)).replace(/\s+/g," ").replace(/"/g,'"').trim()}titleFromName(t){let n=this.titleFromNameCache.get(t);return void 0===n&&(n=t.split(/[_-]+/).filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "),this.titleFromNameCache.set(t,n)),n}toast(t){this.snackBar.open(t,"Dismiss",{duration:4e3})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-api-builder"]],hostBindings:function(n,r){1&n&&e.bIt("keydown",function(a){return r.onGlobalShortcut(a)},!1,e.EBC)},standalone:!0,features:[e.aNF],decls:12,vars:7,consts:[[1,"builder-shell"],[1,"builder-header"],[4,"ngIf"],["class","back-link","role","button","tabindex","0",3,"click","keydown.enter",4,"ngIf"],[1,"header-actions"],["mat-flat-button","","color","primary","type","button",3,"click",4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","api-list",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","api-detail",4,"ngIf"],["endpointEditor",""],[1,"eyebrow"],["role","button","tabindex","0",1,"back-link",3,"click","keydown.enter"],["mat-flat-button","","color","primary","type","button",3,"click"],["mode","indeterminate"],[1,"api-list"],[1,"create-card",3,"click"],["class","api-card",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"api-card",3,"click"],["mat-card-avatar",""],["mat-icon-button","","type","button","aria-label","Delete API","matTooltip","Delete API",1,"api-card-delete",3,"click"],[1,"card-meta"],[1,"count-chip"],[1,"empty-state"],[1,"api-detail"],[1,"api-settings-card"],[1,"api-settings-form",3,"formGroup","ngSubmit"],[1,"api-settings-head"],[1,"api-title-block"],["class","base-url",4,"ngIf"],[1,"api-settings-actions"],["mat-flat-button","","color","primary","type","button",3,"disabled","click",4,"ngIf"],["mat-button","","type","button",3,"disabled","click",4,"ngIf"],["mat-button","","type","button",3,"click",4,"ngIf"],["mat-button","","type","button",3,"disabled","click"],["mat-button","","color","warn","type","button",3,"click",4,"ngIf"],["class","api-settings-grid",4,"ngIf"],[3,"apiId","workspaceChanged",4,"ngIf"],[1,"endpoints-section"],[1,"endpoints-bar"],[1,"muted"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],["class","save-hint",4,"ngIf"],[1,"endpoint-accordion"],["class","endpoint-card open",4,"ngIf"],["class","endpoint-card",3,"open",4,"ngFor","ngForOf","ngForTrackBy"],["class","empty-state small",4,"ngIf"],[1,"base-url"],["mat-button","","type","button",3,"click"],["mat-button","","color","warn","type","button",3,"click"],[1,"api-settings-grid"],["appearance","outline"],["matInput","","formControlName","label"],["matInput","","formControlName","basePath"],["appearance","outline",1,"span-all"],["matInput","","rows","2","formControlName","description"],["mat-flat-button","","color","primary","type","submit",1,"save-api-btn",3,"disabled"],[3,"apiId","workspaceChanged"],[1,"save-hint"],[1,"endpoint-card","open"],[1,"endpoint-row"],[1,"endpoint-row-main","static"],[1,"method-chip","method-get"],[1,"ep-path"],[1,"ep-label"],["mat-icon-button","","type","button","matTooltip","Discard",3,"click"],[1,"endpoint-editor"],[4,"ngTemplateOutlet"],[1,"endpoint-card"],["type","button",1,"endpoint-row-main",3,"click"],[1,"spacer"],[1,"ep-chevron"],["mat-icon-button","","type","button","matTooltip","Delete endpoint",1,"endpoint-row-delete",3,"click"],["class","endpoint-editor",4,"ngIf"],[1,"empty-state","small"],[1,"endpoint-shell",3,"formGroup","ngSubmit"],[1,"endpoint-main"],["id","workflow-route",1,"workflow-stage"],[1,"stage-heading"],[1,"stage-number"],[1,"route-preview","hero-preview"],[1,"endpoint-identity",3,"formGroup"],["matInput","","formControlName","label","placeholder","e.g. List active customers"],["matInput","","formControlName","path","placeholder","/customers"],["aria-label","Workflow status",1,"workflow-strip"],["type","button","class","workflow-step",3,"complete","click",4,"ngFor","ngForOf","ngForTrackBy"],["id","workflow-source",1,"workflow-stage"],[1,"source-builder",3,"formGroup"],["appearance","outline",1,"span-2"],["matInput","","type","text","placeholder","Search connected data sources\u2026",3,"value","matAutocomplete","input","focus","blur"],["matSuffix",""],[3,"optionSelected"],["svcAuto","matAutocomplete"],["disabled","",4,"ngIf"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["class","recent-source-chips",4,"ngIf"],["matInput","","type","text","placeholder","Search datasets and tables\u2026",3,"value","matAutocomplete","disabled","input","focus","blur"],["tblAuto","matAutocomplete"],["class","source-hint",4,"ngIf"],["formControlName","includeId",1,"id-toggle",3,"change"],["class","builder-section workflow-stage","id","workflow-shape",4,"ngIf"],["class","builder-section workflow-stage",4,"ngIf"],["id","workflow-rules",1,"builder-section"],[1,"section-heading"],["class","filter-empty",4,"ngIf"],["class","filter-row",4,"ngFor","ngForOf","ngForTrackBy"],["id","workflow-output",1,"builder-section","collapsible-section"],[1,"result-options",3,"formGroup"],["formControlName","sortField",3,"selectionChange"],["value",""],["formControlName","sortDirection",3,"selectionChange"],["value","ASC"],["value","DESC"],["matInput","","type","number","min","1","max","1000","formControlName","limit",3,"input"],["formControlName","outputShape",3,"selectionChange"],["value","resource"],["value","data"],["value","table"],["id","workflow-publish",1,"save-row"],["mat-flat-button","","color","primary","type","submit",3,"disabled"],["mat-stroked-button","","type","button",3,"disabled","click"],[1,"save-row-spacer"],[3,"routeLabel","sourceSummary","fieldNames","relationshipNames","previewResult","previewStale","previewing","canPreview","previewOk","trace","previewRequested"],[1,"endpoint-inspect"],[1,"inspect-heading"],[1,"endpoint-panel-tabs"],["label","Inspector"],[1,"inspector-panel"],[1,"inspector-block"],["class","preview-list",4,"ngIf","ngIfElse"],["noSteps",""],["class","response-tags",4,"ngIf","ngIfElse"],["noResponseFields",""],["label","Advanced JSON"],[1,"advanced-json-panel",3,"formGroup"],["appearance","outline",1,"json-field"],["matInput","","rows","10","formControlName","executionPlan"],["matInput","","rows","8","formControlName","responseMapping"],[2,"margin-top","4px"],[2,"cursor","pointer","color","#2a4b8d","font-weight","600"],[2,"font-size","0.88em","color","rgba(0,0,0,0.75)","padding","8px 2px"],[2,"margin-bottom","4px"],[2,"background","rgba(0,0,0,0.05)","padding","10px","border-radius","6px","overflow","auto"],["label","Test"],[1,"test-panel",3,"formGroup"],["class","inspector-empty",4,"ngIf"],["type","button",1,"workflow-step",3,"click"],[1,"step-top"],[1,"step-check"],[1,"step-label"],[1,"step-detail"],["disabled",""],[3,"value"],[1,"option-meta"],[1,"recent-source-chips"],["mat-stroked-button","","type","button",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-stroked-button","","type","button",3,"click"],[1,"source-hint"],["id","workflow-shape",1,"builder-section","workflow-stage"],[1,"stage-title"],[1,"field-toolbar"],["matInput","",3,"value","input"],[1,"field-grid"],["class","field-item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"field-item"],[3,"checked","change"],[1,"field-name"],["class","field-badge",4,"ngIf"],["class","rename-input",3,"value","placeholder","input","blur",4,"ngIf"],["class","rename-trigger","type","button",3,"click",4,"ngIf"],[1,"field-badge"],[1,"rename-input",3,"value","placeholder","input","blur"],["type","button",1,"rename-trigger",3,"click"],[1,"builder-section","workflow-stage"],["class","contract-warning",4,"ngIf"],[1,"relationship-grid"],["class","relationship-item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"contract-warning"],[4,"ngFor","ngForOf"],[1,"relationship-item"],[1,"relationship-pill",3,"checked","change"],[1,"filter-empty"],[1,"filter-row"],[3,"value","selectionChange"],["mat-icon-button","","type","button","aria-label","Remove filter",3,"click"],[1,"preview-list"],["class","preview-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"preview-row"],[1,"inspector-empty"],[1,"response-tags"],["class","response-tag",4,"ngFor","ngForOf","ngForTrackBy"],[1,"response-tag"],["matInput","","rows","4","formControlName","pathParams"],["matInput","","rows","3","formControlName","query"]],template:function(n,r){1&n&&(e.j41(0,"section",0)(1,"header",1),e.DNE(2,yt,7,0,"div",2),e.DNE(3,wt,4,0,"a",3),e.j41(4,"div",4),e.DNE(5,Et,4,0,"button",5),e.k0s()(),e.DNE(6,jt,1,0,"mat-progress-bar",6),e.DNE(7,Rt,10,2,"div",7),e.DNE(8,Pt,7,0,"div",8),e.DNE(9,zt,39,20,"div",9),e.DNE(10,Dn,247,58,"ng-template",null,10,e.C5r),e.k0s()),2&n&&(e.R7$(2),e.Y8G("ngIf",!r.editorOpen),e.R7$(1),e.Y8G("ngIf",r.editorOpen),e.R7$(2),e.Y8G("ngIf",!r.editorOpen),e.R7$(1),e.Y8G("ngIf",r.loading||r.saving||r.previewing),e.R7$(1),e.Y8G("ngIf",!r.editorOpen),e.R7$(1),e.Y8G("ngIf",!r.editorOpen&&!r.loading&&0===r.apis.length),e.R7$(1),e.Y8G("ngIf",r.editorOpen))},dependencies:[c.MD,c.Sq,c.bT,c.T3,c.GH,m.X1,m.qT,m.me,m.Q0,m.BC,m.cb,m.VZ,m.zX,m.j4,m.JD,pe.jL,pe.$3,K.wT,pe.pN,P.Hl,P.$z,P.iY,O.Hu,O.RN,O.QG,O.m2,O.MM,O.Lc,O.dh,ye.g7,ye.So,w.RG,w.rl,w.nJ,w.MV,w.TL,w.yw,T.m_,T.An,H.fS,H.fg,K.Sy,we.PO,we.HM,Q.Ve,Q.VO,Z._T,de.RI,de.mq,de.T8,ee.uc,ee.oV,kt,at],styles:[".builder-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:24px}.builder-header[_ngcontent-%COMP%]{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.header-actions[_ngcontent-%COMP%]{display:flex;gap:8px}.back-link[_ngcontent-%COMP%]{align-items:center;cursor:pointer;display:inline-flex;font-weight:600;gap:6px;opacity:.85}.back-link[_ngcontent-%COMP%]:hover{opacity:1}.builder-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:28px;line-height:1.2;margin:0 0 6px}.builder-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;max-width:720px}.eyebrow[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:0;text-transform:uppercase}.api-detail[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:22px}.api-settings-card[_ngcontent-%COMP%]{border-radius:10px}.api-settings-head[_ngcontent-%COMP%]{align-items:flex-start;display:flex;gap:16px;justify-content:space-between;margin-bottom:14px}.api-title-block[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:22px;line-height:1.2;margin:4px 0 8px}.base-url[_ngcontent-%COMP%]{background:rgba(127,127,127,.12);border-radius:6px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;padding:3px 8px}.api-settings-actions[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.status-chip[_ngcontent-%COMP%]{border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.04em;padding:4px 10px;text-transform:uppercase}.status-draft[_ngcontent-%COMP%]{background:rgba(255,171,0,.16);color:#b07400}.status-published[_ngcontent-%COMP%]{background:rgba(34,197,94,.16);color:#1a7f43}.api-settings-grid[_ngcontent-%COMP%]{align-items:start;display:grid;gap:12px 14px;grid-template-columns:repeat(2,minmax(0,1fr))}.api-settings-grid[_ngcontent-%COMP%] .span-all[_ngcontent-%COMP%]{grid-column:1/-1}.api-settings-grid[_ngcontent-%COMP%] .save-api-btn[_ngcontent-%COMP%]{justify-self:start}.endpoints-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.endpoints-bar[_ngcontent-%COMP%]{align-items:center;display:flex;gap:12px;justify-content:space-between}.endpoints-bar[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:18px;margin:0}.endpoints-bar[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%]{margin:2px 0 0;opacity:.7}.endpoint-accordion[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.endpoint-card[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.28);border-radius:8px;overflow:hidden;transition:border-color .15s,box-shadow .15s}.endpoint-card.open[_ngcontent-%COMP%]{border-color:#3f51b58c;box-shadow:0 1px 12px #3f51b51f;overflow:visible}.endpoint-row[_ngcontent-%COMP%]{align-items:center;display:flex;gap:4px}.endpoint-row-main[_ngcontent-%COMP%]{align-items:center;background:transparent;border:none;color:inherit;cursor:pointer;display:flex;flex:1;font:inherit;gap:12px;min-width:0;padding:12px 14px;text-align:left;width:100%}.endpoint-row-main.static[_ngcontent-%COMP%]{cursor:default}.endpoint-row-main[_ngcontent-%COMP%]:hover:not(.static){background:rgba(127,127,127,.06)}.method-chip[_ngcontent-%COMP%]{border-radius:5px;color:#fff;flex:none;font-size:12px;font-weight:700;letter-spacing:.03em;min-width:56px;padding:4px 8px;text-align:center}.method-get[_ngcontent-%COMP%]{background:#49cc90}.method-post[_ngcontent-%COMP%]{background:#61affe}.method-put[_ngcontent-%COMP%]{background:#fca130}.method-delete[_ngcontent-%COMP%]{background:#f93e3e}.method-patch[_ngcontent-%COMP%]{background:#50e3c2}.ep-path[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ep-label[_ngcontent-%COMP%]{opacity:.68;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spacer[_ngcontent-%COMP%]{flex:1}.ep-chevron[_ngcontent-%COMP%]{flex:none;opacity:.55}.endpoint-row-delete[_ngcontent-%COMP%]{flex:none;opacity:.45}.endpoint-row[_ngcontent-%COMP%]:hover .endpoint-row-delete[_ngcontent-%COMP%]{opacity:1}.endpoint-editor[_ngcontent-%COMP%]{border-top:1px solid rgba(127,127,127,.2);display:flex;flex-direction:column;gap:16px;padding:18px 16px}.endpoint-inspect[_ngcontent-%COMP%]{border-top:1px solid rgba(127,127,127,.18);padding-top:10px}.inspect-heading[_ngcontent-%COMP%]{font-size:13px;font-weight:700;margin:0 0 4px;opacity:.7}.empty-state.small[_ngcontent-%COMP%]{gap:6px;padding:32px 16px}.endpoint-panel-tabs[_ngcontent-%COMP%]{margin-top:12px}.inspector-panel[_ngcontent-%COMP%]{display:grid;gap:12px;padding-top:12px}.inspector-block[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.25);border-radius:8px;display:grid;gap:8px;padding:10px}.inspector-empty[_ngcontent-%COMP%]{margin:0;opacity:.72}.response-tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px}.response-tag[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.3);border-radius:999px;font-size:12px;padding:2px 8px}.advanced-json-panel[_ngcontent-%COMP%]{display:grid;gap:10px;padding-top:12px}.workflow-strip[_ngcontent-%COMP%]{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));margin-bottom:8px}.workflow-step[_ngcontent-%COMP%]{align-items:stretch;background:rgba(127,127,127,.05);border:1px solid rgba(148,163,184,.4);border-radius:8px;color:inherit;cursor:pointer;display:flex;flex-direction:column;font:inherit;gap:5px;line-height:1.3;padding:10px 12px;text-align:left}.workflow-step[_ngcontent-%COMP%]:hover{border-color:#94a3b8b3}.workflow-step.complete[_ngcontent-%COMP%]{background:rgba(34,197,94,.1);border-color:#22c55e8c}.step-top[_ngcontent-%COMP%]{align-items:center;display:flex;gap:6px}.step-check[_ngcontent-%COMP%]{font-size:17px;height:17px;opacity:.45;width:17px}.workflow-step.complete[_ngcontent-%COMP%] .step-check[_ngcontent-%COMP%]{color:#16a34a;opacity:1}.workflow-step[_ngcontent-%COMP%] .step-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}.workflow-step.complete[_ngcontent-%COMP%] .step-label[_ngcontent-%COMP%]{color:#15803d}.workflow-step[_ngcontent-%COMP%] .step-detail[_ngcontent-%COMP%]{font-size:12.5px;opacity:.92}.api-list[_ngcontent-%COMP%]{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.api-card[_ngcontent-%COMP%], .create-card[_ngcontent-%COMP%]{border-radius:8px;cursor:pointer;min-height:156px}.create-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:8px;height:100%;justify-content:center;text-align:center}.create-card[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:34px;height:34px;width:34px}.api-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:8px 0 14px;min-height:40px}.card-meta[_ngcontent-%COMP%]{display:flex;gap:8px}.card-meta[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.35);border-radius:999px;font-size:12px;padding:4px 8px}.empty-state[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:8px;padding:48px 16px;text-align:center}.endpoint-shell[_ngcontent-%COMP%]{align-items:start;display:grid;gap:16px;grid-template-columns:minmax(0,1fr) minmax(290px,360px)}.endpoint-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;min-width:0}.workflow-stage[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.24);border-radius:8px;display:grid;gap:12px;padding:12px}.stage-heading[_ngcontent-%COMP%], .stage-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:9px}.stage-heading[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child, .section-heading[_ngcontent-%COMP%] .stage-title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{display:flex;flex-direction:column}.stage-heading[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.68}.stage-number[_ngcontent-%COMP%]{align-items:center;background:#3f51b5;border-radius:50%;color:#fff;display:inline-flex;flex:none;font-size:12px;font-weight:700;height:24px;justify-content:center;width:24px}.preview-row[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.72}.preview-list[_ngcontent-%COMP%]{display:grid;gap:8px}.source-builder[_ngcontent-%COMP%]{display:grid;align-items:center;gap:12px;grid-template-columns:minmax(200px,1fr) minmax(200px,1fr) minmax(180px,auto)}.recent-source-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.source-hint[_ngcontent-%COMP%]{font-size:12px;margin:0;opacity:.82}.option-meta[_ngcontent-%COMP%]{margin-left:6px;opacity:.6}.source-builder[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:-20px}.route-preview[_ngcontent-%COMP%]{align-items:flex-start;border:1px solid rgba(63,81,181,.24);border-radius:8px;display:flex;gap:10px;padding:12px}.hero-preview[_ngcontent-%COMP%]{background:rgba(63,81,181,.08)}.endpoint-identity[_ngcontent-%COMP%]{display:grid;gap:12px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}@media (max-width: 980px){.endpoint-identity[_ngcontent-%COMP%]{grid-template-columns:1fr}}.route-preview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.route-preview[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.72}.builder-section[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.24);border-radius:8px;padding:12px}.collapsible-section[_ngcontent-%COMP%] > summary[_ngcontent-%COMP%]{cursor:pointer;list-style:none;margin-bottom:0}.collapsible-section[_ngcontent-%COMP%] > summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.collapsible-section[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%]{margin-bottom:10px}.collapsible-section[_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.6;transition:transform .15s ease}.collapsible-section[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}.section-heading[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.section-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.section-heading[_ngcontent-%COMP%] .stage-title[_ngcontent-%COMP%]{align-items:center;flex-direction:row}.section-heading[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.72}.field-grid[_ngcontent-%COMP%]{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.field-toolbar[_ngcontent-%COMP%]{align-items:center;display:grid;gap:8px;grid-template-columns:minmax(220px,1fr) auto auto;margin-bottom:8px}.field-toolbar[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:-18px}.field-item[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.22);border-radius:6px;display:flex;flex-direction:column;gap:4px;padding:6px 8px}.rename-input[_ngcontent-%COMP%]{background:rgba(127,127,127,.06);border:1px solid rgba(127,127,127,.28);border-radius:4px;font-size:12px;margin-top:2px;outline:none;padding:3px 6px;width:100%}.rename-input[_ngcontent-%COMP%]:focus{border-color:#3f51b599}.rename-trigger[_ngcontent-%COMP%]{align-items:center;align-self:flex-start;background:transparent;border:0;color:#3f51b5;cursor:pointer;display:inline-flex;font:inherit;font-size:12px;gap:4px;padding:2px 0}.rename-trigger[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:15px;height:15px;width:15px}.field-name[_ngcontent-%COMP%]{font-weight:600}.field-grid[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{margin-left:4px;opacity:.7}.field-badge[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.32);border-radius:999px;font-size:11px;margin-left:5px;padding:2px 6px}.relationship-grid[_ngcontent-%COMP%]{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.relationship-item[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.28);border-radius:6px;display:flex;flex-direction:column;gap:4px;padding:8px 10px}.relationship-pill[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.relationship-pill[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.72}.filter-empty[_ngcontent-%COMP%]{align-items:center;border:1px dashed rgba(127,127,127,.35);border-radius:8px;display:flex;gap:8px;padding:12px}.contract-warning[_ngcontent-%COMP%]{align-items:flex-start;background:rgba(255,171,0,.1);border:1px solid rgba(255,171,0,.4);border-radius:7px;display:flex;gap:8px;margin-bottom:10px;padding:9px}.contract-warning[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;flex-direction:column}.contract-warning[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#b36b00}.filter-row[_ngcontent-%COMP%]{align-items:center;display:grid;gap:10px;grid-template-columns:minmax(170px,1fr) minmax(160px,.8fr) minmax(160px,1fr) auto}.filter-row[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:-18px}.result-options[_ngcontent-%COMP%]{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(140px,1fr))}.result-options[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:-18px}.save-row[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.save-row-spacer[_ngcontent-%COMP%]{flex:1}.count-chip[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.35);border-radius:999px;font-size:12px;padding:4px 8px}.save-hint[_ngcontent-%COMP%]{align-items:center;background:rgba(255,171,0,.1);border:1px solid rgba(255,171,0,.4);border-radius:8px;display:flex;gap:8px;margin:0;padding:10px 12px}.save-hint[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#c77700;flex:none}.preview-row[_ngcontent-%COMP%]{align-items:flex-start;border:1px solid rgba(127,127,127,.28);border-radius:8px;display:flex;gap:10px;padding:10px}.preview-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.muted[_ngcontent-%COMP%]{opacity:.72}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.json-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], pre[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace}.api-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{position:relative}.api-card-delete[_ngcontent-%COMP%]{position:absolute;right:4px;top:4px}.api-card[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{overflow:hidden;padding-right:32px;text-overflow:ellipsis;white-space:nowrap}.route-preview[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.test-panel[_ngcontent-%COMP%]{display:grid;gap:10px;padding-top:12px}pre[_ngcontent-%COMP%]{background:var(--df-code-bg);border-radius:6px;color:var(--df-code-text);margin:16px 0 0;max-height:420px;overflow:auto;padding:14px;white-space:pre-wrap}@media (max-width: 980px){.builder-header[_ngcontent-%COMP%]{display:flex;flex-direction:column}.header-actions[_ngcontent-%COMP%]{flex-wrap:wrap}.source-builder[_ngcontent-%COMP%], .filter-row[_ngcontent-%COMP%], .field-toolbar[_ngcontent-%COMP%], .result-options[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media (max-width: 1120px){.endpoint-shell[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]})}}return i})();function te(i,o){if(i.length!==o.length)return!1;for(let t=0;t{p.d(Y,{HM:()=>me,PO:()=>se});var c=p(17705),e=(p(60177),p(86600)),W=p(14085);const ie=new c.nKC("MAT_PROGRESS_BAR_DEFAULT_OPTIONS"),ue=(0,e.Zc)(class{constructor(f){this._elementRef=f}},"primary");let me=(()=>{class f extends ue{constructor(x,C,k,oe,g){super(x),this._ngZone=C,this._changeDetectorRef=k,this._animationMode=oe,this._isNoopAnimation=!1,this._value=0,this._bufferValue=0,this.animationEnd=new c.bkB,this._mode="determinate",this._transitionendHandler=M=>{0===this.animationEnd.observers.length||!M.target||!M.target.classList.contains("mdc-linear-progress__primary-bar")||("determinate"===this.mode||"buffer"===this.mode)&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))},this._isNoopAnimation="NoopAnimations"===oe,g&&(g.color&&(this.color=this.defaultColor=g.color),this.mode=g.mode||this.mode)}get value(){return this._value}set value(x){this._value=z((0,W.OE)(x)),this._changeDetectorRef.markForCheck()}get bufferValue(){return this._bufferValue||0}set bufferValue(x){this._bufferValue=z((0,W.OE)(x)),this._changeDetectorRef.markForCheck()}get mode(){return this._mode}set mode(x){this._mode=x,this._changeDetectorRef.markForCheck()}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._transitionendHandler)})}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._transitionendHandler)}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${"buffer"===this.mode?this.bufferValue:100}%`}_isIndeterminate(){return"indeterminate"===this.mode||"query"===this.mode}static{this.\u0275fac=function(C){return new(C||f)(c.rXU(c.aKT),c.rXU(c.SKi),c.rXU(c.gRc),c.rXU(c.bc$,8),c.rXU(ie,8))}}static{this.\u0275cmp=c.VBU({type:f,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:8,hostBindings:function(C,k){2&C&&(c.BMQ("aria-valuenow",k._isIndeterminate()?null:k.value)("mode",k.mode),c.AVh("_mat-animation-noopable",k._isNoopAnimation)("mdc-linear-progress--animation-ready",!k._isNoopAnimation)("mdc-linear-progress--indeterminate",k._isIndeterminate()))},inputs:{color:"color",value:"value",bufferValue:"bufferValue",mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[c.Vt3],decls:7,vars:4,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(C,k){1&C&&(c.j41(0,"div",0),c.nrm(1,"div",1)(2,"div",2),c.k0s(),c.j41(3,"div",3),c.nrm(4,"span",4),c.k0s(),c.j41(5,"div",5),c.nrm(6,"span",4),c.k0s()),2&C&&(c.R7$(1),c.xc7("flex-basis",k._getBufferBarFlexBasis()),c.R7$(2),c.xc7("transform",k._getPrimaryBarTransform()))},styles:["@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half))}100%{transform:translateX(var(--mdc-linear-progress-primary-full))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-primary-full-neg))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full-neg))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height) * -2.5))}}.mdc-linear-progress__bar-inner{border-color:var(--mdc-linear-progress-active-indicator-color)}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-color:rgba(0,0,0,0);background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill=''/%3E%3C/svg%3E\")}}.mdc-linear-progress{height:max(var(--mdc-linear-progress-track-height), var(--mdc-linear-progress-active-indicator-height))}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress{height:4px}}.mdc-linear-progress__bar{height:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__bar-inner{border-top-width:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__buffer{height:var(--mdc-linear-progress-track-height)}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-size:10px var(--mdc-linear-progress-track-height)}}.mdc-linear-progress__buffer{border-radius:var(--mdc-linear-progress-track-shape)}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-height:4px;--mdc-linear-progress-track-height:4px;--mdc-linear-progress-track-shape:0}.mat-mdc-progress-bar{display:block;text-align:left;--mdc-linear-progress-primary-half: 83.67142%;--mdc-linear-progress-primary-full: 200.611057%;--mdc-linear-progress-secondary-quarter: 37.651913%;--mdc-linear-progress-secondary-half: 84.386165%;--mdc-linear-progress-secondary-full: 160.277782%;--mdc-linear-progress-primary-half-neg: -83.67142%;--mdc-linear-progress-primary-full-neg: -200.611057%;--mdc-linear-progress-secondary-quarter-neg: -37.651913%;--mdc-linear-progress-secondary-half-neg: -84.386165%;--mdc-linear-progress-secondary-full-neg: -160.277782%}[dir=rtl] .mat-mdc-progress-bar{text-align:right}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}"],encapsulation:2,changeDetection:0})}}return f})();function z(f,A=0,x=100){return Math.max(A,Math.min(x,f))}let se=(()=>{class f{static{this.\u0275fac=function(C){return new(C||f)}}static{this.\u0275mod=c.$C({type:f})}static{this.\u0275inj=c.G2t({imports:[e.yE]})}}return f})()}}]); \ No newline at end of file diff --git a/dist/1253.d34e9689f6d1f920.js b/dist/1253.d34e9689f6d1f920.js new file mode 100644 index 00000000..5719cf62 --- /dev/null +++ b/dist/1253.d34e9689f6d1f920.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1253],{1253:(An,M,i)=>{i.r(M),i.d(M,{DfManageSchedulerComponent:()=>Bn});var R=i(10233),E=i(31635),g=i(62031),N=i(24784),X=i(55590),P=i(49894),n=i(17705),m=i(95245),O=i(18617),S=i(33609),x=i(75351),f=i(60177),d=i(88834),I=i(20060),_=i(9159),u=i(59115),p=i(89417),v=i(96695),b=i(32102),G=i(99631),h=i(2042),k=i(67575),y=i(82798),w=i(86600);function F(t,o){if(1&t){const e=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){n.eBV(e);const c=n.XpG();return n.Njj(c.createRow())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&t){const e=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"newEntry")),n.R7$(2),n.Y8G("icon",e.faPlus)}}function Y(t,o){if(1&t){const e=n.RV6();n.j41(0,"button",8),n.bIt("click",function(){n.eBV(e);const c=n.XpG();return n.Njj(c.refreshSchema())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&t){const e=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"importList")),n.R7$(2),n.Y8G("icon",e.faRefresh)}}function j(t,o){if(1&t&&(n.j41(0,"mat-option",13),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&t){const e=o.$implicit;n.Y8G("value",e.value),n.R7$(1),n.SpI(" ",n.bMT(2,2,e.label)," ")}}function V(t,o){if(1&t&&(n.j41(0,"mat-form-field",10)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"mat-select",11),n.DNE(5,j,3,4,"mat-option",12),n.k0s()()),2&t){const e=n.XpG().ngIf;n.R7$(2),n.JRh(n.bMT(3,3,"accessUsage.filter.label")),n.R7$(2),n.Y8G("formControl",e.filter),n.R7$(1),n.Y8G("ngForOf",e.filterOptions)}}function B(t,o){if(1&t&&(n.qex(0),n.DNE(1,V,6,5,"mat-form-field",9),n.bVm()),2&t){const e=o.ngIf;n.R7$(1),n.Y8G("ngIf",e.available)}}function A(t,o){if(1&t&&(n.j41(0,"mat-form-field",14)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"input",15),n.k0s()),2&t){const e=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"search")),n.R7$(2),n.Y8G("formControl",e.currentFilter)}}function U(t,o){1&t&&n.nrm(0,"mat-progress-bar",26)}function z(t,o){if(1&t){const e=n.RV6();n.j41(0,"div",27)(1,"div",28),n.nrm(2,"fa-icon",29),n.j41(3,"span"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.j41(6,"button",30),n.bIt("click",function(){n.eBV(e);const c=n.XpG(2);return n.Njj(c.retryLastFetch())}),n.EFF(7),n.nI1(8,"transloco"),n.k0s()(),n.nrm(9,"df-error-detail",31),n.k0s()}if(2&t){const e=n.XpG(2);n.R7$(2),n.Y8G("icon",e.faTriangleExclamation),n.R7$(2),n.JRh(n.bMT(5,4,e.tableError.message)),n.R7$(3),n.SpI(" ",n.bMT(8,6,"retry")," "),n.R7$(2),n.Y8G("error",e.tableError)}}function L(t,o){if(1&t&&(n.j41(0,"th",37),n.nI1(1,"async"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()),2&t){const e=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(e.columnDef)),n.BMQ("sortActionDescription",n.bMT(1,4,a.sortDescription(e.header))),n.R7$(2),n.SpI(" ",n.bMT(3,6,e.header)," ")}}function H(t,o){if(1&t&&n.nrm(0,"fa-icon",29),2&t){const e=n.XpG().$implicit,a=n.XpG(2).$implicit,c=n.XpG(2);n.HbH(c.isCellActive(null==a?null:a.cell(e))?"active":"inactive"),n.Y8G("icon",c.activeIcon(c.isCellActive(null==a?null:a.cell(e))))}}function Q(t,o){if(1&t&&(n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.bVm()),2&t){const e=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,null!=a&&a.cell(e)?"confirmed":"pending")," ")}}function J(t,o){if(1&t&&(n.qex(0),n.EFF(1),n.bVm()),2&t){const e=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",null==a?null:a.cell(e)," ")}}function K(t,o){if(1&t&&n.nrm(0,"df-access-usage-cell",41),2&t){const e=n.XpG().$implicit,a=n.XpG(4);let c,r;n.Y8G("usage",null==a.accessUsage?null:a.accessUsage.get(e.id))("staleDays",null!==(c=null==a.accessUsage?null:a.accessUsage.staleDays)&&void 0!==c?c:null)("trackingStartedAt",null!==(r=null==a.accessUsage?null:a.accessUsage.trackingStartedAt)&&void 0!==r?r:null)}}function Z(t,o){if(1&t&&n.nrm(0,"fa-icon",43),2&t){const e=n.XpG(6);n.Y8G("icon",e.faTriangleExclamation)}}function q(t,o){1&t&&(n.j41(0,"span"),n.EFF(1),n.k0s()),2&t&&(n.R7$(1),n.JRh("-"))}function W(t,o){if(1&t&&(n.qex(0),n.DNE(1,Z,1,1,"fa-icon",42),n.DNE(2,q,2,1,"span",4),n.bVm()),2&t){const e=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.Y8G("ngIf",!(null==a||!a.cell(e))),n.R7$(1),n.Y8G("ngIf",!(null!=a&&a.cell(e)))}}function nn(t,o){if(1&t&&(n.j41(0,"td",38),n.DNE(1,H,1,3,"fa-icon",39),n.DNE(2,Q,3,3,"ng-container",4),n.DNE(3,J,2,1,"ng-container",4),n.DNE(4,K,1,3,"df-access-usage-cell",40),n.DNE(5,W,3,2,"ng-container",4),n.k0s()),2&t){const e=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(e.columnDef)),n.R7$(1),n.Y8G("ngIf","active"===e.columnDef),n.R7$(1),n.Y8G("ngIf","registration"===e.columnDef),n.R7$(1),n.Y8G("ngIf","active"!==e.columnDef&&"registration"!==e.columnDef&&"log"!==e.columnDef&&"lastUsed"!==e.columnDef),n.R7$(1),n.Y8G("ngIf","lastUsed"===e.columnDef),n.R7$(1),n.Y8G("ngIf","log"===e.columnDef)}}function en(t,o){if(1&t&&(n.qex(0,34),n.DNE(1,L,4,8,"th",35),n.DNE(2,nn,6,7,"td",36),n.bVm()),2&t){const e=n.XpG().$implicit;n.Y8G("matColumnDef",e.columnDef)}}function tn(t,o){if(1&t&&(n.j41(0,"th",46),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&t){const e=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,e.header)," ")}}function an(t,o){if(1&t&&(n.j41(0,"a",53),n.bIt("click",function(a){return a.stopPropagation()}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&t){const e=o.$implicit;n.Y8G("routerLink",e.fix)("disabled",!e.fix),n.R7$(1),n.SpI(" ",n.bMT(2,3,"services.health.rules."+e.id)," ")}}function on(t,o){if(1&t&&(n.qex(0),n.j41(1,"button",49),n.bIt("click",function(a){return a.stopPropagation()}),n.nI1(2,"transloco"),n.nrm(3,"df-badge",50),n.nI1(4,"transloco"),n.k0s(),n.j41(5,"mat-menu",null,51),n.DNE(7,an,3,5,"a",52),n.k0s(),n.bVm()),2&t){const e=n.sdS(6),a=n.XpG().ngIf;n.R7$(1),n.Y8G("matMenuTriggerFor",e),n.BMQ("aria-label",n.bMT(2,5,"services.health.whyAria")),n.R7$(2),n.Y8G("variant",a.level)("label",n.bMT(4,7,"services.health.level."+a.level)),n.R7$(4),n.Y8G("ngForOf",a.rules)}}function cn(t,o){if(1&t&&(n.nrm(0,"df-badge",50),n.nI1(1,"transloco")),2&t){const e=n.XpG(2).$implicit;n.Y8G("variant","ok"===e.probe?"success":"neutral")("label",n.bMT(1,2,"ok"===e.probe?"services.health.level.success":"unsupported"===e.probe?"services.health.chip.notChecked":"services.health.chip.checking"))}}function rn(t,o){if(1&t&&(n.qex(0),n.DNE(1,on,8,9,"ng-container",47),n.DNE(2,cn,2,4,"ng-template",null,48,n.C5r),n.bVm()),2&t){const e=o.ngIf,a=n.sdS(3);n.R7$(1),n.Y8G("ngIf",e.rules.length)("ngIfElse",a)}}function ln(t,o){if(1&t&&(n.j41(0,"td",38),n.DNE(1,rn,4,2,"ng-container",4),n.k0s()),2&t){const e=o.$implicit;n.R7$(1),n.Y8G("ngIf",e.health)}}function _n(t,o){if(1&t&&(n.qex(0,34),n.DNE(1,tn,3,3,"th",44),n.DNE(2,ln,2,1,"td",45),n.bVm()),2&t){const e=n.XpG().$implicit;n.Y8G("matColumnDef",e.columnDef)}}function sn(t,o){1&t&&(n.j41(0,"th",46),n.EFF(1," Scripting "),n.k0s())}function gn(t,o){if(1&t){const e=n.RV6();n.j41(0,"td",56)(1,"fa-icon",57),n.bIt("click",function(){const r=n.eBV(e).$implicit,s=n.XpG(3).$implicit,l=n.XpG(2);let $;return n.Njj(l.goEventScriptsPage((null==s||null==($=s.cell(r))?null:$.toString())||""))})("click",function(c){return c.stopPropagation()}),n.k0s()()}if(2&t){const e=o.$implicit,a=n.XpG(3).$implicit,c=n.XpG(2);n.R7$(1),n.HbH("not"!==(null==a?null:a.cell(e))?"active":"inactive"),n.Y8G("icon",c.activeIcon("not"!==(null==a?null:a.cell(e))))}}function mn(t,o){1&t&&(n.qex(0),n.DNE(1,sn,2,0,"th",44),n.DNE(2,gn,2,3,"td",55),n.bVm())}function fn(t,o){1&t&&n.nrm(0,"th",59)}function dn(t,o){1&t&&n.nrm(0,"td",56)}function un(t,o){1&t&&(n.DNE(0,fn,1,0,"th",58),n.DNE(1,dn,1,0,"td",55))}function pn(t,o){if(1&t&&(n.qex(0,34),n.DNE(1,mn,3,0,"ng-container",47),n.DNE(2,un,2,0,"ng-template",null,54,n.C5r),n.bVm()),2&t){const e=n.sdS(3),a=n.XpG().$implicit,c=n.XpG(2);n.Y8G("matColumnDef",a.columnDef),n.R7$(1),n.Y8G("ngIf",c.isDatabase)("ngIfElse",e)}}function bn(t,o){1&t&&n.nrm(0,"th",59)}i(36225);const C=function(t){return{param:t}};function hn(t,o){if(1&t){const e=n.RV6();n.j41(0,"button",66),n.bIt("click",function(){n.eBV(e);const c=n.XpG(3).$implicit,r=n.XpG(4);return n.Njj(r.actions.additional[0].function(c))})("click",function(c){return c.stopPropagation()}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",67),n.k0s()}if(2&t){const e=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,e.actions.additional[0].ariaLabel.key,n.eq3(5,C,e.actions.additional[0].ariaLabel.param))),n.R7$(2),n.Y8G("icon",e.actions.additional[0].icon)}}function Cn(t,o){if(1&t){const e=n.RV6();n.j41(0,"button",68),n.bIt("click",function(){n.eBV(e);const c=n.XpG(3).$implicit,r=n.XpG(4);return n.Njj(r.actions.additional[0].function(c))})("click",function(c){return c.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&t){const e=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,e.actions.additional[0].ariaLabel.key,n.eq3(7,C,e.actions.additional[0].ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,5,e.actions.additional[0].label)," ")}}function Dn(t,o){if(1&t&&(n.qex(0),n.DNE(1,hn,3,7,"button",64),n.DNE(2,Cn,4,9,"ng-template",null,65,n.C5r),n.bVm()),2&t){const e=n.sdS(3),a=n.XpG(6);n.R7$(1),n.Y8G("ngIf",a.actions.additional[0].icon)("ngIfElse",e)}}function Tn(t,o){if(1&t){const e=n.RV6();n.j41(0,"button",72),n.bIt("click",function(){const r=n.eBV(e).$implicit,s=n.XpG(3).$implicit;return n.Njj(r.function(s))}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&t){const e=o.$implicit,a=n.XpG(3).$implicit,c=n.XpG(4);n.Y8G("disabled",c.isActionDisabled(e,a)),n.BMQ("aria-label",n.i5U(1,3,e.ariaLabel.key,n.eq3(8,C,e.ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,6,e.label)," ")}}function Mn(t,o){if(1&t&&(n.j41(0,"button",69),n.bIt("click",function(a){return a.stopPropagation()}),n.nrm(1,"fa-icon",67),n.k0s(),n.j41(2,"mat-menu",null,70),n.DNE(4,Tn,4,10,"button",71),n.k0s()),2&t){const e=n.sdS(3),a=n.XpG(6);n.Y8G("matMenuTriggerFor",e),n.R7$(1),n.Y8G("icon",a.faEllipsisV),n.R7$(3),n.Y8G("ngForOf",a.actions.additional)}}function Sn(t,o){if(1&t&&(n.qex(0),n.DNE(1,Dn,4,2,"ng-container",47),n.DNE(2,Mn,5,3,"ng-template",null,63,n.C5r),n.bVm()),2&t){const e=n.sdS(3),a=n.XpG(5);n.R7$(1),n.Y8G("ngIf",1===a.actions.additional.length)("ngIfElse",e)}}function xn(t,o){if(1&t&&(n.j41(0,"td",62),n.DNE(1,Sn,4,2,"ng-container",4),n.k0s()),2&t){const e=n.XpG(4);n.R7$(1),n.Y8G("ngIf",e.actions.additional&&e.actions.additional.length>0)}}function In(t,o){if(1&t&&(n.qex(0,60),n.DNE(1,bn,1,0,"th",58),n.DNE(2,xn,2,1,"td",61),n.bVm()),2&t){const e=n.XpG().$implicit;n.Y8G("matColumnDef",e.columnDef)}}function vn(t,o){if(1&t&&(n.qex(0),n.DNE(1,en,3,1,"ng-container",32),n.DNE(2,_n,3,1,"ng-container",32),n.DNE(3,pn,4,3,"ng-container",32),n.DNE(4,In,3,1,"ng-container",33),n.bVm()),2&t){const e=o.$implicit;n.R7$(1),n.Y8G("ngIf","actions"!==e.columnDef&&"scripting"!==e.columnDef&&"health"!==e.columnDef),n.R7$(1),n.Y8G("ngIf","health"===e.columnDef),n.R7$(1),n.Y8G("ngIf","scripting"===e.columnDef),n.R7$(1),n.Y8G("ngIf","actions"===e.columnDef)}}function Gn(t,o){1&t&&n.nrm(0,"tr",73)}function kn(t,o){if(1&t){const e=n.RV6();n.j41(0,"tr",74),n.bIt("click",function(){const r=n.eBV(e).$implicit,s=n.XpG(2);return n.Njj(s.callDefaultAction(r))})("keydown",function(c){const s=n.eBV(e).$implicit,l=n.XpG(2);return n.Njj(l.handleKeyDown(c,s))}),n.k0s()}if(2&t){const e=o.$implicit,a=n.XpG(2);n.AVh("clickable",a.isClickable(e)),n.BMQ("tabindex",a.isClickable(e)?0:-1)}}function yn(t,o){if(1&t){const e=n.RV6();n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.j41(3,"button",78),n.bIt("click",function(){n.eBV(e);const c=n.XpG(4);return n.Njj(c.clearFilter())}),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.bVm()}2&t&&(n.R7$(1),n.SpI(" ",n.bMT(2,2,"noFilterResults")," "),n.R7$(3),n.SpI(" ",n.bMT(5,4,"clearFilter")," "))}function $n(t,o){if(1&t){const e=n.RV6();n.j41(0,"button",84),n.bIt("click",function(){n.eBV(e);const c=n.XpG(6);return n.Njj(c.createRow())}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()}if(2&t){const e=n.XpG(6);n.R7$(1),n.SpI(" ",n.bMT(2,1,e.emptyStateActionLabel||"create")," ")}}function Rn(t,o){if(1&t&&(n.j41(0,"div",81)(1,"p",82),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.DNE(4,$n,3,3,"button",83),n.k0s()),2&t){const e=n.XpG(5);n.R7$(2),n.SpI(" ",n.bMT(3,2,e.emptyStateMessage)," "),n.R7$(2),n.Y8G("ngIf",e.allowCreate)}}function En(t,o){if(1&t&&(n.EFF(0),n.nI1(1,"transloco")),2&t){const e=n.XpG(5);n.SpI(" ",n.bMT(1,1,e.allowCreate&&0===e.tableLength?"noEntriesCreate":"noEntries")," ")}}function Nn(t,o){if(1&t&&(n.DNE(0,Rn,5,4,"div",79),n.DNE(1,En,2,3,"ng-template",null,80,n.C5r)),2&t){const e=n.sdS(2),a=n.XpG(4);n.Y8G("ngIf",a.emptyStateMessage)("ngIfElse",e)}}function Xn(t,o){if(1&t&&(n.qex(0),n.DNE(1,yn,6,6,"ng-container",47),n.DNE(2,Nn,3,2,"ng-template",null,77,n.C5r),n.bVm()),2&t){const e=n.sdS(3),a=n.XpG(3);n.R7$(1),n.Y8G("ngIf",a.currentFilter.value||(null==a.accessUsage?null:a.accessUsage.filterActive))("ngIfElse",e)}}function Pn(t,o){if(1&t&&(n.j41(0,"tr",75)(1,"td",76),n.DNE(2,Xn,4,2,"ng-container",4),n.k0s()()),2&t){const e=n.XpG(2);n.R7$(1),n.BMQ("colspan",e.columns.length),n.R7$(1),n.Y8G("ngIf","loading"!==e.tableState&&"error"!==e.tableState)}}function On(t,o){if(1&t){const e=n.RV6();n.qex(0),n.DNE(1,U,1,0,"mat-progress-bar",16),n.DNE(2,z,10,8,"div",17),n.j41(3,"div",18)(4,"table",19),n.bIt("matSortChange",function(c){n.eBV(e);const r=n.XpG();return n.Njj(r.announceSortChange(c))}),n.DNE(5,vn,5,4,"ng-container",20),n.DNE(6,Gn,1,0,"tr",21),n.DNE(7,kn,1,3,"tr",22),n.DNE(8,Pn,3,2,"tr",23),n.k0s(),n.j41(9,"div",24)(10,"mat-paginator",25),n.bIt("page",function(c){n.eBV(e);const r=n.XpG();return n.Njj(r.changePage(c))}),n.k0s()()(),n.bVm()}if(2&t){const e=o.ngIf,a=n.XpG();n.R7$(1),n.Y8G("ngIf","loading"===a.tableState),n.R7$(1),n.Y8G("ngIf","error"===a.tableState&&a.tableError),n.R7$(1),n.AVh("table-stale","loading"===a.tableState),n.R7$(1),n.Y8G("dataSource",a.dataSource),n.R7$(1),n.Y8G("ngForOf",a.columns),n.R7$(1),n.Y8G("matHeaderRowDef",a.displayedColumns),n.R7$(1),n.Y8G("matRowDefColumns",a.displayedColumns),n.R7$(3),n.Y8G("pageSize",e.currentPageSize)("pageSizeOptions",a.pageSizes)("length",a.tableLength)}}const wn=[[["","topActions",""]]],Fn=function(t){return{currentPageSize:t}},Yn=["[topActions]"];let D=class T extends g.Py{constructor(o,e,a,c,r,s){super(e,a,c,r,s),this.service=o,this.emptyStateMessage="emptyState.scheduler.message",this.emptyStateActionLabel="emptyState.scheduler.action",this.allowFilter=!1,this.columns=[{columnDef:"active",cell:l=>l.isActive,header:"scheduler.table.header.active"},{columnDef:"id",cell:l=>l.id,header:"scheduler.table.header.id"},{columnDef:"name",cell:l=>l.name,header:"scheduler.table.header.name"},{columnDef:"description",cell:l=>l.description,header:"scheduler.table.header.description"},{columnDef:"service",cell:l=>l.serviceByServiceId.name,header:"scheduler.table.header.service"},{columnDef:"component",cell:l=>l.component,header:"scheduler.table.header.component"},{columnDef:"method",cell:l=>l.verb,header:"scheduler.table.header.method"},{columnDef:"frequency",cell:l=>l.frequency,header:"scheduler.table.header.frequency"},{columnDef:"log",cell:l=>!!l.taskLogByTaskId,header:"scheduler.table.header.log"},{columnDef:"actions"}],this.filterQuery=(0,X.J)()}mapDataToTable(o){return o.map(e=>({id:e.id,name:e.name,description:e.description,isActive:e.isActive,serviceId:e.serviceId,component:e.component,verb:e.verb,frequency:e.frequency,taskLogByTaskId:e.taskLogByTaskId,serviceByServiceId:e.serviceByServiceId}))}deleteRow(o){this.service.delete(o.id.toString()).subscribe(()=>this.refreshTable())}refreshTable(o,e,a){this.fetchTable(this.service,{limit:o,offset:e,filter:a,related:"task_log_by_task_id,service_by_service_id"})}static{this.\u0275fac=function(e){return new(e||T)(n.rXU(N.K),n.rXU(m.Ix),n.rXU(m.nX),n.rXU(O.Ai),n.rXU(S.JO),n.rXU(x.bZ))}}static{this.\u0275cmp=n.VBU({type:T,selectors:[["df-manage-scheduler-table"]],standalone:!0,features:[n.Vt3,n.aNF],ngContentSelectors:Yn,decls:9,vars:9,consts:[[1,"top-action-bar"],["mat-mini-fab","","class","save-btn","data-testid","manage-table-create","type","button",3,"click",4,"ngIf"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click",4,"ngIf"],[1,"spacer"],[4,"ngIf"],["class","search-input","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["mat-mini-fab","","data-testid","manage-table-create","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click"],["class","df-usage-filter","data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",1,"df-usage-filter"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["appearance","outline","subscriptSizing","dynamic",1,"search-input"],["matInput","",3,"formControl"],["class","table-loading-bar","mode","indeterminate",4,"ngIf"],["class","table-error-panel",4,"ngIf"],[1,"table-container"],["mat-table","","matSort","",3,"dataSource","matSortChange"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"clickable","click","keydown",4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[1,"bottom-action-bar"],["showFirstLastButtons","","aria-label","'selectPage' | transloco",3,"pageSize","pageSizeOptions","length","page"],["mode","indeterminate",1,"table-loading-bar"],[1,"table-error-panel"],[1,"table-error-headline"],["size","lg",3,"icon"],["mat-stroked-button","","type","button",3,"click"],[3,"error"],[3,"matColumnDef",4,"ngIf"],["stickyEnd","",3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","df-eyebrow",3,"df-numeric",4,"matHeaderCellDef"],["mat-cell","",3,"df-numeric",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"df-eyebrow"],["mat-cell",""],["size","lg",3,"icon","class",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt"],["size","lg","class","log-warning",3,"icon",4,"ngIf"],["size","lg",1,"log-warning",3,"icon"],["mat-header-cell","","class","df-eyebrow",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell","",1,"df-eyebrow"],[4,"ngIf","ngIfElse"],["healthyChip",""],["type","button",1,"df-health-chip",3,"matMenuTriggerFor","click"],[3,"variant","label"],["healthMenu","matMenu"],["mat-menu-item","",3,"routerLink","disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"routerLink","disabled","click"],["notDatabase",""],["class","actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions"],["size","lg",3,"icon","click"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-cell",""],["stickyEnd","",3,"matColumnDef"],["class","actions df-row-actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions","df-row-actions"],["multiple",""],["class","action-btn","mat-icon-button","","type","button",3,"click",4,"ngIf","ngIfElse"],["regular",""],["mat-icon-button","","type","button",1,"action-btn",3,"click"],["size","xs",3,"icon"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-icon-button","","aria-label","Actions","type","button",3,"matMenuTriggerFor","click"],["actionsMenu","matMenu"],["type","button","mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["type","button","mat-menu-item","",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click","keydown"],[1,"mat-row","no-data-row"],[1,"mat-cell"],["noFilterActive",""],["mat-button","","color","primary","type","button",3,"click"],["class","empty-state",4,"ngIf","ngIfElse"],["genericEmpty",""],[1,"empty-state"],[1,"empty-state-message"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click"]],template:function(e,a){1&e&&(n.NAR(wn),n.j41(0,"div",0),n.DNE(1,F,3,4,"button",1),n.DNE(2,Y,3,4,"button",2),n.SdG(3),n.nrm(4,"div",3),n.DNE(5,B,2,1,"ng-container",4),n.DNE(6,A,5,4,"mat-form-field",5),n.k0s(),n.DNE(7,On,11,11,"ng-container",4),n.nI1(8,"async")),2&e&&(n.R7$(1),n.Y8G("ngIf",a.allowCreate),n.R7$(1),n.Y8G("ngIf",a.schema),n.R7$(3),n.Y8G("ngIf",a.accessUsage),n.R7$(1),n.Y8G("ngIf",a.allowFilter),n.R7$(1),n.Y8G("ngIf",n.eq3(7,Fn,n.bMT(8,5,a.currentPageSize$))))},dependencies:[f.bT,d.Hl,d.$z,d.iY,d.$0,I.dX,I.aY,_.tP,_.Zl,_.tL,_.ji,_.cC,_.YV,_.iL,_.KS,_.$R,_.YZ,_.NB,_.ky,f.Sq,u.Cn,u.kk,u.fb,u.Cp,p.X1,p.me,p.BC,p.l_,S.Kj,f.Jj,x.hM,v.Ou,v.iy,b.RG,b.rl,b.nJ,G.fS,G.fg,h.NQ,h.B4,h.aE,k.PO,k.HM,g.R6,g.vR,g.Zn,y.Ve,y.VO,w.wT,m.Wk],styles:[".df-health-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;margin:0;border:none;background:transparent;font:inherit;color:inherit;cursor:pointer}.active[_ngcontent-%COMP%]{color:var(--df-success)}.inactive[_ngcontent-%COMP%], .log-warning[_ngcontent-%COMP%]{color:var(--df-danger)}.top-action-bar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--df-space-3);padding-bottom:var(--df-space-3)}.top-action-bar[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{height:80%!important;max-width:300px!important}.top-action-bar[_ngcontent-%COMP%] .df-usage-filter[_ngcontent-%COMP%]{width:160px}.bottom-action-bar[_ngcontent-%COMP%]{margin-top:var(--df-space-4);display:flex;flex-direction:row;justify-content:center}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto}.table-container.table-stale[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.table-loading-bar[_ngcontent-%COMP%]{margin-bottom:2px}.table-error-panel[_ngcontent-%COMP%]{margin-bottom:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm);background-color:var(--df-danger-soft);color:var(--df-text)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);margin-bottom:var(--df-space-2)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:1.4rem}.no-data-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--df-space-4);padding:var(--df-space-4);text-align:center}.empty-state[_ngcontent-%COMP%] .empty-state-message[_ngcontent-%COMP%]{margin:0;max-width:46rem;color:var(--df-text-muted);font-size:1.4rem;line-height:1.5}.mat-mdc-row[_ngcontent-%COMP%]{height:var(--df-row-height)!important}.mat-mdc-cell[_ngcontent-%COMP%], .mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border-2)}.mat-mdc-cell.df-numeric[_ngcontent-%COMP%], .mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%]{text-align:right}.mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{justify-content:flex-end}.df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0;transition:opacity var(--df-duration-fast) var(--df-ease-standard)}.mat-mdc-row[_ngcontent-%COMP%]:hover .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .mat-mdc-row[_ngcontent-%COMP%]:focus-within .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{opacity:1}.clickable.mat-mdc-row[_ngcontent-%COMP%]{outline:0}.clickable.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{cursor:pointer}.clickable.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-hover)}.clickable.mat-mdc-row[_ngcontent-%COMP%]:focus .mat-mdc-cell[_ngcontent-%COMP%], .clickable.mat-mdc-row[_ngcontent-%COMP%]:focus-within .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)} [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{border-bottom:unset!important}"]})}};function jn(t,o){1&t&&n.nrm(0,"df-paywall",2),2&t&&n.Y8G("serviceName","Scheduler")}function Vn(t,o){1&t&&n.nrm(0,"df-manage-scheduler-table")}D=(0,E.Cg)([(0,P.d)({checkProperties:!0})],D);let Bn=(()=>{class t{constructor(e){this.activatedRoute=e,this.paywall=!1,this.activatedRoute.data.subscribe(({data:a})=>{"paywall"===a&&(this.paywall=!0)})}static{this.\u0275fac=function(a){return new(a||t)(n.rXU(m.nX))}}static{this.\u0275cmp=n.VBU({type:t,selectors:[["df-manage-scheduler"]],standalone:!0,features:[n.aNF],decls:3,vars:2,consts:[[3,"serviceName",4,"ngIf","ngIfElse"],["allowed",""],[3,"serviceName"]],template:function(a,c){if(1&a&&(n.DNE(0,jn,1,1,"df-paywall",0),n.DNE(1,Vn,1,0,"ng-template",null,1,n.C5r)),2&a){const r=n.sdS(2);n.Y8G("ngIf",c.paywall)("ngIfElse",r)}},dependencies:[R.C,f.bT,D],encapsulation:2})}}return t})()}}]); \ No newline at end of file diff --git a/dist/1259.5860897dbeb62bae.js b/dist/1259.5860897dbeb62bae.js new file mode 100644 index 00000000..4691d30e --- /dev/null +++ b/dist/1259.5860897dbeb62bae.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1259],{71259:(M,h,l)=>{l.r(h),l.d(h,{DfAgentsComponent:()=>ct});var g=l(60177),_=l(21626),t=l(17705),i=l(89417),v=l(89642),p=l(88834),R=l(25596),m=l(75351),d=l(32102),f=l(99213),F=l(99631),k=l(82798),x=l(30450),C=l(14823),b=l(33609),j=l(12513),$=l(86003),I=l(56583),A=l(74243),D=l(15735),u=l(49910),w=l(13476),T=l(86600);function y(o,a){if(1&o&&(t.j41(0,"span",33),t.nrm(1,"span",34),t.EFF(2),t.k0s()),2&o){const e=t.XpG().$implicit;t.FS9("matTooltip",e("liveTip")),t.R7$(2),t.SpI(" ",e("live")," ")}}function O(o,a){if(1&o&&t.nrm(0,"df-empty-state",35),2&o){const e=t.XpG().$implicit;t.Y8G("title",e("log.empty.title"))("description",e("log.empty.message"))}}function P(o,a){if(1&o&&t.nrm(0,"df-empty-state",36),2&o){const e=t.XpG().$implicit;t.Y8G("title",e("log.noMatch.title"))("description",e("log.noMatch.message"))}}function G(o,a){if(1&o){const e=t.RV6();t.j41(0,"tr",43),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(4);return t.Njj(c.openCall(r))})("keydown.enter",function(){const r=t.eBV(e).$implicit,c=t.XpG(4);return t.Njj(c.openCall(r))}),t.j41(1,"td",44),t.EFF(2),t.nI1(3,"date"),t.k0s(),t.j41(4,"td"),t.EFF(5),t.k0s(),t.j41(6,"td",45),t.EFF(7),t.k0s(),t.j41(8,"td"),t.nrm(9,"df-badge",46),t.k0s(),t.j41(10,"td",47),t.EFF(11),t.nI1(12,"number"),t.j41(13,"span",48),t.EFF(14,"\u2192"),t.k0s(),t.EFF(15),t.nI1(16,"number"),t.k0s(),t.j41(17,"td",47),t.EFF(18),t.k0s(),t.j41(19,"td",47),t.EFF(20),t.nI1(21,"number"),t.k0s(),t.j41(22,"td",41),t.nrm(23,"df-badge",49),t.k0s()()}if(2&o){const e=a.$implicit,n=t.XpG(3).$implicit,s=t.XpG();t.AVh("active",(null==s.selected?null:s.selected.id)===e.id),t.R7$(2),t.SpI(" ",t.i5U(3,14,e.createdAt,"MMM d, HH:mm")," "),t.R7$(3),t.JRh(e.provider),t.R7$(2),t.JRh(e.model),t.R7$(2),t.Y8G("variant",e.ok?"success":"danger")("label",n(e.ok?"log.completed":"log.failed")),t.R7$(2),t.SpI(" ",t.bMT(12,17,e.inputTokens)," "),t.R7$(4),t.SpI(" ",t.bMT(16,19,e.outputTokens)," "),t.R7$(3),t.JRh(s.usd(e.costUsd)),t.R7$(2),t.SpI("",t.bMT(21,21,e.latencyMs)," ms"),t.R7$(3),t.Y8G("variant",null!=e.roleId?"success":"warning")("dot",!1)("label",n(null!=e.roleId?"log.scoped":"log.unscoped"))}}function B(o,a){if(1&o&&(t.j41(0,"table",39)(1,"thead")(2,"tr")(3,"th"),t.EFF(4),t.k0s(),t.j41(5,"th"),t.EFF(6),t.k0s(),t.j41(7,"th"),t.EFF(8),t.k0s(),t.j41(9,"th"),t.EFF(10),t.k0s(),t.j41(11,"th",40),t.EFF(12),t.k0s(),t.j41(13,"th",40),t.EFF(14),t.k0s(),t.j41(15,"th",40),t.EFF(16),t.k0s(),t.j41(17,"th",41),t.EFF(18),t.k0s()()(),t.j41(19,"tbody"),t.DNE(20,G,24,23,"tr",42),t.k0s()()),2&o){const e=t.XpG(2).$implicit,n=t.XpG();t.R7$(4),t.JRh(e("col.time")),t.R7$(2),t.JRh(e("col.provider")),t.R7$(2),t.JRh(e("col.model")),t.R7$(2),t.JRh(e("col.status")),t.R7$(2),t.JRh(e("col.tokens")),t.R7$(2),t.JRh(e("col.cost")),t.R7$(2),t.JRh(e("col.latency")),t.R7$(2),t.JRh(e("col.scope")),t.R7$(2),t.Y8G("ngForOf",n.filteredCalls)("ngForTrackBy",n.trackById)}}function J(o,a){if(1&o&&(t.j41(0,"div",37),t.DNE(1,B,21,10,"table",38),t.k0s()),2&o){const e=t.XpG(2);t.R7$(1),t.Y8G("ngIf",e.filteredCalls.length)}}function N(o,a){if(1&o&&(t.j41(0,"mat-option",60),t.EFF(1),t.k0s()),2&o){const e=a.$implicit;t.Y8G("value",e.id),t.R7$(1),t.JRh(e.name)}}function X(o,a){if(1&o&&(t.j41(0,"mat-option",60),t.EFF(1),t.k0s()),2&o){const e=a.$implicit;t.Y8G("value",e.id),t.R7$(1),t.JRh(e.name)}}function Y(o,a){if(1&o){const e=t.RV6();t.j41(0,"mat-form-field",51)(1,"mat-label"),t.EFF(2,"Owner"),t.k0s(),t.j41(3,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(3);return t.Njj(r.newAgent.ownerId=s)}),t.DNE(4,X,2,2,"mat-option",55),t.k0s()()}if(2&o){const e=t.XpG(3);t.R7$(3),t.Y8G("ngModel",e.newAgent.ownerId),t.R7$(1),t.Y8G("ngForOf",e.users)("ngForTrackBy",e.trackById)}}function L(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",50)(1,"mat-form-field",51)(2,"mat-label"),t.EFF(3,"Name"),t.k0s(),t.j41(4,"input",52),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.newAgent.name=s)}),t.k0s()(),t.j41(5,"mat-form-field",53)(6,"mat-label"),t.EFF(7,"Description"),t.k0s(),t.j41(8,"input",54),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.newAgent.description=s)}),t.k0s()(),t.j41(9,"mat-form-field",51)(10,"mat-label"),t.EFF(11,"Role"),t.k0s(),t.j41(12,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.newAgent.roleId=s)}),t.DNE(13,N,2,2,"mat-option",55),t.k0s()(),t.DNE(14,Y,5,3,"mat-form-field",56),t.j41(15,"mat-form-field",57)(16,"mat-label"),t.EFF(17,"Key TTL (h)"),t.k0s(),t.j41(18,"input",58),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.newAgent.keyTtlHours=s)}),t.k0s()(),t.j41(19,"button",59),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.createAgent())}),t.EFF(20," Create "),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(4),t.Y8G("ngModel",e.newAgent.name),t.R7$(4),t.Y8G("ngModel",e.newAgent.description),t.R7$(4),t.Y8G("ngModel",e.newAgent.roleId),t.R7$(1),t.Y8G("ngForOf",e.roles)("ngForTrackBy",e.trackById),t.R7$(1),t.Y8G("ngIf",e.users.length),t.R7$(4),t.Y8G("ngModel",e.newAgent.keyTtlHours),t.R7$(1),t.Y8G("disabled",e.saving||!e.newAgent.name||!e.newAgent.roleId)}}function V(o,a){if(1&o){const e=t.RV6();t.j41(0,"df-empty-state",61),t.bIt("action",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.showNew=!0)}),t.k0s()}if(2&o){const e=t.XpG().$implicit;t.Y8G("title",e("empty.title"))("description",e("empty.message"))("actionLabel",e("newAgent"))}}function U(o,a){if(1&o&&(t.j41(0,"span",75),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit,n=t.XpG().$implicit,s=t.XpG();t.FS9("matTooltip",n("ownerTip")),t.R7$(1),t.JRh(s.ownerName(e.ownerId))}}function K(o,a){if(1&o&&(t.j41(0,"span",76),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit;t.R7$(1),t.JRh(e.description)}}function W(o,a){if(1&o&&(t.j41(0,"div",77)(1,"div",78)(2,"span",79),t.EFF(3),t.k0s(),t.j41(4,"span",76),t.EFF(5),t.k0s()(),t.nrm(6,"df-scope-map",80),t.k0s()),2&o){const e=t.XpG().$implicit,n=t.XpG().$implicit;t.R7$(3),t.JRh(n("reach")),t.R7$(2),t.JRh(n("reachHint")),t.R7$(1),t.Y8G("roleId",e.roleId)}}function S(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",62)(1,"div",63)(2,"button",64),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.toggleExpand(r.id))}),t.j41(3,"mat-icon"),t.EFF(4),t.k0s()(),t.nrm(5,"df-badge",46),t.j41(6,"strong"),t.EFF(7),t.k0s(),t.j41(8,"span",65),t.EFF(9),t.k0s(),t.DNE(10,U,2,2,"span",66),t.DNE(11,K,2,1,"span",26),t.nrm(12,"span",67),t.j41(13,"span",68),t.EFF(14),t.k0s(),t.j41(15,"code",69),t.EFF(16),t.k0s(),t.j41(17,"span",70),t.EFF(18),t.k0s(),t.j41(19,"mat-slide-toggle",71),t.bIt("change",function(s){const c=t.eBV(e).$implicit,dt=t.XpG(2);return t.Njj(dt.toggleActive(c,s))}),t.k0s(),t.j41(20,"button",72),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.startEdit(r))}),t.j41(21,"mat-icon"),t.EFF(22,"edit"),t.k0s()(),t.j41(23,"button",73),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.remove(r))}),t.j41(24,"mat-icon"),t.EFF(25,"delete"),t.k0s()()(),t.DNE(26,W,7,3,"div",74),t.k0s()}if(2&o){const e=a.$implicit,n=t.XpG().$implicit,s=t.XpG();t.R7$(2),t.FS9("matTooltip",n("viewScope")),t.BMQ("aria-label",n("viewScope")),t.R7$(2),t.JRh(s.expandedId===e.id?"expand_less":"expand_more"),t.R7$(1),t.Y8G("variant",e.isActive?s.expired(e)?"warning":"success":"danger")("label",e.isActive?s.expired(e)?n("state.expired"):n("state.active"):n("state.revoked")),t.R7$(2),t.JRh(e.name),t.R7$(2),t.JRh(s.roleName(e.roleId)),t.R7$(1),t.Y8G("ngIf",null!=e.ownerId),t.R7$(1),t.Y8G("ngIf",e.description),t.R7$(2),t.FS9("matTooltip",n("lastActiveTip")),t.R7$(1),t.JRh(e.lastActiveAt?s.lastActive(e):n("neverActive")),t.R7$(2),t.JRh(s.maskKey(e.apiKey)),t.R7$(2),t.SpI("TTL ",e.keyTtlHours,"h"),t.R7$(1),t.Y8G("checked",e.isActive),t.R7$(7),t.Y8G("ngIf",s.expandedId===e.id)}}function z(o,a){if(1&o&&(t.j41(0,"mat-option",60),t.EFF(1),t.k0s()),2&o){const e=a.$implicit;t.Y8G("value",e.id),t.R7$(1),t.JRh(e.name)}}function H(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",81)(1,"mat-form-field",51)(2,"mat-label"),t.EFF(3,"Name"),t.k0s(),t.j41(4,"input",54),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.editAgent.name=s)}),t.k0s()(),t.j41(5,"mat-form-field",53)(6,"mat-label"),t.EFF(7,"Description"),t.k0s(),t.j41(8,"input",54),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.editAgent.description=s)}),t.k0s()(),t.j41(9,"mat-form-field",51)(10,"mat-label"),t.EFF(11,"Role"),t.k0s(),t.j41(12,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.editAgent.roleId=s)}),t.DNE(13,z,2,2,"mat-option",55),t.k0s()(),t.j41(14,"mat-form-field",57)(15,"mat-label"),t.EFF(16,"Key TTL (h)"),t.k0s(),t.j41(17,"input",82),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.editAgent.keyTtlHours=s)}),t.k0s()(),t.j41(18,"button",59),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.saveEdit())}),t.EFF(19," Save "),t.k0s(),t.j41(20,"button",83),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.editId=null)}),t.EFF(21,"Cancel"),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(4),t.Y8G("ngModel",e.editAgent.name),t.R7$(4),t.Y8G("ngModel",e.editAgent.description),t.R7$(4),t.Y8G("ngModel",e.editAgent.roleId),t.R7$(1),t.Y8G("ngForOf",e.roles)("ngForTrackBy",e.trackById),t.R7$(4),t.Y8G("ngModel",e.editAgent.keyTtlHours),t.R7$(1),t.Y8G("disabled",e.saving)}}function q(o,a){if(1&o&&(t.j41(0,"span",76),t.EFF(1),t.k0s()),2&o){const e=t.XpG(2);t.R7$(1),t.SpI("(",e.pendingRequests.length,")")}}function Q(o,a){if(1&o&&t.nrm(0,"df-empty-state",84),2&o){const e=t.XpG().$implicit;t.Y8G("title",e("pending.empty.title"))("description",e("pending.empty.message"))}}function Z(o,a){if(1&o&&(t.j41(0,"span",89),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit;t.R7$(1),t.SpI('"',e.note,'"')}}const E=function(){return[]};function tt(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",63)(1,"mat-icon",85),t.EFF(2,"pan_tool"),t.k0s(),t.j41(3,"strong"),t.EFF(4),t.k0s(),t.j41(5,"span",76),t.EFF(6,"requests"),t.k0s(),t.nrm(7,"df-badge",86),t.j41(8,"span",76),t.EFF(9,"on"),t.k0s(),t.j41(10,"span",65),t.EFF(11),t.k0s(),t.DNE(12,Z,2,1,"span",87),t.nrm(13,"span",67),t.j41(14,"button",59),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.resolve(r,"approved"))}),t.j41(15,"mat-icon"),t.EFF(16,"check"),t.k0s(),t.EFF(17," Approve "),t.k0s(),t.j41(18,"button",88),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.resolve(r,"denied"))}),t.j41(19,"mat-icon"),t.EFF(20,"close"),t.k0s(),t.EFF(21," Deny "),t.k0s()()}if(2&o){const e=a.$implicit,n=t.XpG(2);t.R7$(4),t.JRh(n.agentName(e.agentId)),t.R7$(3),t.Y8G("dot",!1)("label",(e.requestedOperations||t.lJ4(7,E)).join(", ")||"any"),t.R7$(4),t.JRh((e.requestedServices||t.lJ4(8,E)).join(", ")||"unspecified"),t.R7$(1),t.Y8G("ngIf",e.note),t.R7$(2),t.Y8G("disabled",n.saving),t.R7$(4),t.Y8G("disabled",n.saving)}}function et(o,a){if(1&o&&(t.j41(0,"tr")(1,"td")(2,"strong"),t.EFF(3),t.k0s()(),t.j41(4,"td",76),t.EFF(5),t.k0s(),t.j41(6,"td"),t.nrm(7,"df-badge",49),t.k0s(),t.j41(8,"td",76),t.EFF(9),t.nI1(10,"date"),t.k0s(),t.j41(11,"td",47),t.EFF(12),t.k0s()()),2&o){const e=a.$implicit,n=t.XpG(2).$implicit,s=t.XpG();t.R7$(3),t.JRh(e.name),t.R7$(2),t.JRh(s.roleName(e.roleId)),t.R7$(2),t.Y8G("variant",e.isActive?s.expired(e)?"warning":"success":"danger")("dot",!1)("label",e.isActive?s.expired(e)?n("state.expired"):n("state.active"):n("state.revoked")),t.R7$(2),t.SpI(" ",e.lastActiveAt?t.i5U(10,7,e.lastActiveAt,"short"):"never"," "),t.R7$(3),t.JRh(s.requestCount(e.id))}}function nt(o,a){if(1&o&&(t.j41(0,"div",37)(1,"table")(2,"thead")(3,"tr")(4,"th"),t.EFF(5,"Agent"),t.k0s(),t.j41(6,"th"),t.EFF(7,"Role"),t.k0s(),t.j41(8,"th"),t.EFF(9,"Key"),t.k0s(),t.j41(10,"th"),t.EFF(11,"Last active"),t.k0s(),t.j41(12,"th",40),t.EFF(13,"Requests"),t.k0s()()(),t.j41(14,"tbody"),t.DNE(15,et,13,10,"tr",90),t.k0s()()()),2&o){const e=t.XpG(2);t.R7$(15),t.Y8G("ngForOf",e.agents)("ngForTrackBy",e.trackById)}}function ot(o,a){if(1&o&&t.nrm(0,"df-empty-state",91),2&o){const e=t.XpG().$implicit;t.Y8G("title",e("activity.emptyAlerts.title"))("description",e("activity.emptyAlerts.message"))}}function st(o,a){if(1&o&&(t.j41(0,"tr")(1,"td",76),t.EFF(2),t.nI1(3,"date"),t.k0s(),t.j41(4,"td"),t.EFF(5),t.k0s(),t.j41(6,"td"),t.nrm(7,"df-badge",46),t.k0s()()),2&o){const e=a.$implicit,n=t.XpG(3);t.R7$(2),t.JRh(t.i5U(3,4,e.created_at,"short")),t.R7$(3),t.JRh(e.event_name),t.R7$(2),t.Y8G("variant",n.alertVariant(e.status))("label",e.status)}}function it(o,a){if(1&o&&(t.j41(0,"div",37)(1,"table")(2,"thead")(3,"tr")(4,"th"),t.EFF(5,"When"),t.k0s(),t.j41(6,"th"),t.EFF(7,"Event"),t.k0s(),t.j41(8,"th"),t.EFF(9,"Status"),t.k0s()()(),t.j41(10,"tbody"),t.DNE(11,st,8,7,"tr",90),t.k0s()()()),2&o){const e=t.XpG(2);t.R7$(11),t.Y8G("ngForOf",e.agentLog)("ngForTrackBy",e.trackById)}}function at(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",92),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.closeCall())}),t.k0s()}}function rt(o,a){if(1&o){const e=t.RV6();t.j41(0,"aside",93)(1,"div",94)(2,"div")(3,"span",79),t.EFF(4),t.k0s(),t.j41(5,"h3",45),t.EFF(6),t.k0s()(),t.j41(7,"button",95),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.closeCall())}),t.j41(8,"mat-icon"),t.EFF(9,"close"),t.k0s()()(),t.j41(10,"div",96)(11,"span",79),t.EFF(12),t.k0s(),t.j41(13,"div",97),t.nrm(14,"df-badge",46)(15,"df-badge",46),t.k0s(),t.j41(16,"p",98),t.EFF(17),t.k0s()(),t.j41(18,"div",96)(19,"span",79),t.EFF(20),t.k0s(),t.j41(21,"dl",99)(22,"dt"),t.EFF(23),t.k0s(),t.j41(24,"dd"),t.EFF(25),t.k0s(),t.j41(26,"dt"),t.EFF(27),t.k0s(),t.j41(28,"dd"),t.EFF(29),t.k0s(),t.j41(30,"dt"),t.EFF(31),t.k0s(),t.j41(32,"dd"),t.EFF(33),t.k0s(),t.j41(34,"dt"),t.EFF(35),t.k0s(),t.j41(36,"dd"),t.EFF(37),t.k0s(),t.j41(38,"dt"),t.EFF(39),t.k0s(),t.j41(40,"dd"),t.EFF(41),t.k0s(),t.j41(42,"dt"),t.EFF(43),t.k0s(),t.j41(44,"dd"),t.EFF(45),t.k0s(),t.j41(46,"dt"),t.EFF(47),t.k0s(),t.j41(48,"dd"),t.EFF(49),t.nI1(50,"date"),t.k0s()()(),t.j41(51,"div",96)(52,"span",79),t.EFF(53),t.k0s(),t.j41(54,"dl",99)(55,"dt"),t.EFF(56),t.k0s(),t.j41(57,"dd",100),t.EFF(58),t.nI1(59,"number"),t.k0s(),t.j41(60,"dt"),t.EFF(61),t.k0s(),t.j41(62,"dd",100),t.EFF(63),t.nI1(64,"number"),t.k0s(),t.j41(65,"dt"),t.EFF(66),t.k0s(),t.j41(67,"dd",100),t.EFF(68),t.k0s(),t.j41(69,"dt"),t.EFF(70),t.k0s(),t.j41(71,"dd",100),t.EFF(72),t.nI1(73,"number"),t.k0s()()(),t.j41(74,"div",96)(75,"span",79),t.EFF(76),t.k0s(),t.j41(77,"p",98),t.EFF(78),t.k0s()()()}if(2&o){const e=t.XpG().$implicit,n=t.XpG();t.R7$(4),t.JRh(e("drawer.title")),t.R7$(2),t.JRh(n.selected.model),t.R7$(1),t.BMQ("aria-label",e("drawer.close")),t.R7$(5),t.JRh(e("drawer.guardrails")),t.R7$(2),t.Y8G("variant",n.selected.ok?"success":"danger")("label",e(n.selected.ok?"drawer.completed":"drawer.failed")),t.R7$(1),t.Y8G("variant",null!=n.selected.roleId?"success":"warning")("label",e(null!=n.selected.roleId?"drawer.scopeEnforced":"drawer.unscoped")),t.R7$(2),t.JRh(e("drawer.guardrailHint")),t.R7$(3),t.JRh(e("drawer.attribution")),t.R7$(3),t.JRh(e("drawer.service")),t.R7$(2),t.JRh(n.selected.serviceLabel),t.R7$(2),t.JRh(e("drawer.resource")),t.R7$(2),t.JRh(n.selected.resource),t.R7$(2),t.JRh(e("drawer.provider")),t.R7$(2),t.JRh(n.selected.provider),t.R7$(2),t.JRh(e("drawer.role")),t.R7$(2),t.JRh(n.selected.roleLabel||e("drawer.none")),t.R7$(2),t.JRh(e("drawer.user")),t.R7$(2),t.JRh(n.selected.userLabel),t.R7$(2),t.JRh(e("drawer.app")),t.R7$(2),t.JRh(n.selected.appLabel||e("drawer.none")),t.R7$(2),t.JRh(e("drawer.when")),t.R7$(2),t.JRh(t.i5U(50,35,n.selected.createdAt,"medium")),t.R7$(4),t.JRh(e("drawer.metrics")),t.R7$(3),t.JRh(e("drawer.tokensIn")),t.R7$(2),t.JRh(t.bMT(59,38,n.selected.inputTokens)),t.R7$(3),t.JRh(e("drawer.tokensOut")),t.R7$(2),t.JRh(t.bMT(64,40,n.selected.outputTokens)),t.R7$(3),t.JRh(e("drawer.cost")),t.R7$(2),t.JRh(n.usd(n.selected.costUsd)),t.R7$(2),t.JRh(e("drawer.latency")),t.R7$(2),t.SpI("",t.bMT(73,42,n.selected.latencyMs)," ms"),t.R7$(4),t.JRh(e("drawer.body")),t.R7$(2),t.JRh(e("drawer.bodyNote"))}}function lt(o,a){if(1&o){const e=t.RV6();t.qex(0),t.j41(1,"div",1)(2,"df-page-header",2)(3,"div",3),t.DNE(4,y,3,2,"span",4),t.j41(5,"button",5),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.refreshAll())}),t.j41(6,"mat-icon"),t.EFF(7,"refresh"),t.k0s()(),t.j41(8,"button",6),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.showNew=!s.showNew)}),t.j41(9,"mat-icon"),t.EFF(10,"add"),t.k0s(),t.EFF(11),t.k0s()()(),t.j41(12,"mat-card",7)(13,"div",8)(14,"div")(15,"h2"),t.EFF(16),t.k0s(),t.j41(17,"p",9),t.EFF(18),t.k0s()(),t.j41(19,"div",10)(20,"mat-form-field",11)(21,"mat-label"),t.EFF(22),t.k0s(),t.j41(23,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG();return t.Njj(r.statusFilter=s)})("ngModelChange",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.applyCallFilter())}),t.j41(24,"mat-option",13),t.EFF(25),t.k0s(),t.j41(26,"mat-option",14),t.EFF(27),t.k0s(),t.j41(28,"mat-option",15),t.EFF(29),t.k0s()()(),t.j41(30,"mat-form-field",11)(31,"mat-label"),t.EFF(32),t.k0s(),t.j41(33,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG();return t.Njj(r.range=s)})("ngModelChange",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.reloadUsage())}),t.j41(34,"mat-option",16),t.EFF(35),t.k0s(),t.j41(36,"mat-option",17),t.EFF(37),t.k0s(),t.j41(38,"mat-option",18),t.EFF(39),t.k0s(),t.j41(40,"mat-option",13),t.EFF(41),t.k0s()()()()(),t.DNE(42,O,1,2,"df-empty-state",19),t.DNE(43,P,1,2,"df-empty-state",20),t.DNE(44,J,2,1,"div",21),t.k0s(),t.j41(45,"mat-card",7)(46,"div",8)(47,"h2"),t.EFF(48),t.k0s()(),t.DNE(49,L,21,8,"div",22),t.DNE(50,V,1,3,"df-empty-state",23),t.DNE(51,S,27,15,"div",24),t.DNE(52,H,22,7,"div",25),t.k0s(),t.j41(53,"mat-card",7)(54,"div",8)(55,"h2"),t.EFF(56),t.DNE(57,q,2,1,"span",26),t.k0s()(),t.DNE(58,Q,1,2,"df-empty-state",27),t.DNE(59,tt,22,9,"div",28),t.k0s(),t.j41(60,"mat-card",7)(61,"div",8)(62,"h2"),t.EFF(63),t.k0s()(),t.DNE(64,nt,16,2,"div",21),t.j41(65,"h3",29),t.EFF(66),t.k0s(),t.DNE(67,ot,1,2,"df-empty-state",30),t.DNE(68,it,12,2,"div",21),t.k0s()(),t.DNE(69,at,1,0,"div",31),t.DNE(70,rt,79,44,"aside",32),t.bVm()}if(2&o){const e=a.$implicit,n=t.XpG();t.R7$(2),t.Y8G("description",e("subtitle")),t.R7$(2),t.Y8G("ngIf",n.polling),t.R7$(1),t.FS9("matTooltip",e("refresh")),t.BMQ("aria-label",e("refresh")),t.R7$(6),t.SpI(" ",e("newAgent")," "),t.R7$(5),t.JRh(e("log.title")),t.R7$(2),t.JRh(e("log.subtitle")),t.R7$(4),t.JRh(e("log.status")),t.R7$(1),t.Y8G("ngModel",n.statusFilter),t.R7$(2),t.JRh(e("log.allStatuses")),t.R7$(2),t.JRh(e("log.ok")),t.R7$(2),t.JRh(e("log.error")),t.R7$(3),t.JRh(e("log.range")),t.R7$(1),t.Y8G("ngModel",n.range),t.R7$(2),t.JRh(e("log.range24h")),t.R7$(2),t.JRh(e("log.range7d")),t.R7$(2),t.JRh(e("log.range30d")),t.R7$(2),t.JRh(e("log.rangeAll")),t.R7$(1),t.Y8G("ngIf",!n.callsLoading&&!n.calls.length),t.R7$(1),t.Y8G("ngIf",!n.callsLoading&&n.calls.length&&!n.filteredCalls.length),t.R7$(1),t.Y8G("ngIf",n.callsLoading||n.filteredCalls.length),t.R7$(4),t.JRh(e("agentsTitle")),t.R7$(1),t.Y8G("ngIf",n.showNew),t.R7$(1),t.Y8G("ngIf",!n.agents.length),t.R7$(1),t.Y8G("ngForOf",n.agents)("ngForTrackBy",n.trackById),t.R7$(1),t.Y8G("ngIf",null!==n.editId),t.R7$(4),t.SpI(" ",e("pending.title")," "),t.R7$(1),t.Y8G("ngIf",n.pendingRequests.length),t.R7$(1),t.Y8G("ngIf",!n.pendingRequests.length),t.R7$(1),t.Y8G("ngForOf",n.pendingRequests)("ngForTrackBy",n.trackById),t.R7$(4),t.JRh(e("activity.title")),t.R7$(1),t.Y8G("ngIf",n.agents.length),t.R7$(2),t.JRh(e("activity.alerts")),t.R7$(1),t.Y8G("ngIf",!n.agentLog.length),t.R7$(1),t.Y8G("ngIf",n.agentLog.length),t.R7$(1),t.Y8G("ngIf",n.selected),t.R7$(1),t.Y8G("ngIf",n.selected)}}let ct=(()=>{class o{constructor(){this.http=(0,t.WQX)(_.Qq),this.usage=(0,t.WQX)(u.D_),this.dialog=(0,t.WQX)(m.bZ),this.agents=[],this.requests=[],this.roles=[],this.users=[],this.agentLog=[],this.saving=!1,this.calls=[],this.filteredCalls=[],this.callsLoading=!0,this.statusFilter="all",this.range="30d",this.selected=null,this.polling=!0,this.pollHandle=null,this.pollMs=2e4,this.expandedId=null,this.showNew=!1,this.newAgent={name:"",description:"",roleId:null,ownerId:null,keyTtlHours:4},this.editId=null,this.editAgent={name:"",description:"",roleId:null,keyTtlHours:4},this.memoRequests=null,this.memoPendingRequests=[],this.memoRequestCounts=new Map,this.trackById=(e,n)=>n.id,this.memoAgents=null,this.memoExpiresAt=new Map,this.memoLastActive=new Map}syncRequestViews(){if(this.memoRequests===this.requests)return;this.memoRequests=this.requests,this.memoPendingRequests=this.requests.filter(n=>"pending"===n.status);const e=new Map;for(const n of this.requests)e.set(n.agentId,(e.get(n.agentId)??0)+1);this.memoRequestCounts=e}get pendingRequests(){return this.syncRequestViews(),this.memoPendingRequests}ngOnInit(){this.http.get("/api/v2/system/role?fields=id,name").subscribe(e=>this.roles=e.resource??[]),this.http.get("/api/v2/system/user?fields=id,name").subscribe(e=>this.users=e.resource??[]),this.refresh(),this.reloadUsage(),this.pollHandle=setInterval(()=>{this.refresh(),this.reloadUsage()},this.pollMs)}ngOnDestroy(){this.pollHandle&&clearInterval(this.pollHandle)}refreshAll(){this.refresh(),this.reloadUsage()}refresh(){this.http.get("/api/v2/agents/agents?fields=*").subscribe(e=>this.agents=e.resource??[]),this.http.get("/api/v2/agents/requests?fields=*").subscribe(e=>this.requests=e.resource??[]),this.http.get("/_internal/alerts/log",{context:(0,v.Ku)()}).subscribe({next:e=>this.agentLog=(e.resource??[]).filter(n=>(n.event_name??"").startsWith("system.agent")),error:()=>this.agentLog=[]})}reloadUsage(){this.callsLoading=!0,this.usage.loadAll(this.range).subscribe(e=>{this.calls=(e.raw.most_expensive_calls??[]).map(s=>this.toCallRow(s,e)),this.callsLoading=!1,this.applyCallFilter()})}toCallRow(e,n){const s=null!=e.service_id?n.services.get(e.service_id):void 0;return{id:e.id,provider:e.provider||"-",model:e.model||"-",resource:e.resource||"-",serviceLabel:s?.label||s?.name||(null!=e.service_id?`service #${e.service_id}`:"-"),userLabel:null!=e.user_id?n.users.get(e.user_id)??`user #${e.user_id}`:"-",roleId:e.role_id??null,roleLabel:null!=e.role_id?n.roles.get(e.role_id)??`role #${e.role_id}`:null,appLabel:null!=e.app_id?n.apps.get(e.app_id)??`app #${e.app_id}`:null,inputTokens:(0,u.n)(e.input_tokens),outputTokens:(0,u.n)(e.output_tokens),costUsd:(0,u.n)(e.cost_usd),latencyMs:(0,u.n)(e.latency_ms),status:e.status||"ok",createdAt:e.created_at,ok:"ok"===(e.status||"ok").toLowerCase()}}applyCallFilter(){this.filteredCalls="all"===this.statusFilter?this.calls:this.calls.filter(e=>"ok"===this.statusFilter?e.ok:!e.ok)}openCall(e){this.selected=e}closeCall(){this.selected=null}usd(e){return(0,w.az)(e)}alertVariant(e){return"sent"===e?"success":"failed"===e?"danger":"throttled"===e||"skipped"===e?"warning":"neutral"}toggleExpand(e){this.expandedId=this.expandedId===e?null:e}roleName(e){return this.roles.find(n=>n.id===e)?.name??(e?"role "+e:"-")}ownerName(e){return this.users.find(n=>n.id===e)?.name??(e?"user "+e:"-")}agentName(e){return this.agents.find(n=>n.id===e)?.name??"agent "+e}requestCount(e){return this.syncRequestViews(),this.memoRequestCounts.get(e)??0}maskKey(e){return e?e.slice(0,6)+"\u2026"+e.slice(-4):"-"}syncAgentMemos(){this.memoAgents!==this.agents&&(this.memoAgents=this.agents,this.memoExpiresAt.clear(),this.memoLastActive.clear())}expired(e){if(!e.keyIssuedAt)return!1;this.syncAgentMemos();let n=this.memoExpiresAt.get(e.id);return void 0===n&&(n=new Date(e.keyIssuedAt).getTime()+36e5*e.keyTtlHours,this.memoExpiresAt.set(e.id,n)),Date.now()>n}lastActive(e){if(!e.lastActiveAt)return"";this.syncAgentMemos();let n=this.memoLastActive.get(e.id);if(void 0===n){const s=Math.floor((Date.now()-new Date(e.lastActiveAt).getTime())/6e4);n=s<1?"just now":s<60?`${s}m ago`:s<2880?`${Math.floor(s/60)}h ago`:`${Math.floor(s/1440)}d ago`,this.memoLastActive.set(e.id,n)}return n}createAgent(){this.saving=!0,this.http.post("/api/v2/agents/agents",{resource:[this.newAgent]}).subscribe({next:()=>{this.saving=!1,this.showNew=!1,this.newAgent={name:"",description:"",roleId:null,ownerId:null,keyTtlHours:4},this.refresh()},error:()=>this.saving=!1})}startEdit(e){this.editId=e.id,this.editAgent={name:e.name,description:e.description??"",roleId:e.roleId,keyTtlHours:e.keyTtlHours}}saveEdit(){null!==this.editId&&(this.saving=!0,this.http.patch(`/api/v2/agents/agents/${this.editId}`,this.editAgent).subscribe({next:()=>{this.saving=!1,this.editId=null,this.refresh()},error:()=>this.saving=!1}))}toggleActive(e,n){n.checked?this.patchActive(e,!0):this.dialog.open(j.m,{data:{title:"agents.kill.title",message:"agents.kill.message"}}).afterClosed().subscribe(s=>{s?this.patchActive(e,!1):n.source.checked=!0})}patchActive(e,n){this.http.patch(`/api/v2/agents/agents/${e.id}`,{isActive:n}).subscribe({next:()=>e.isActive=n,error:()=>this.refresh()})}remove(e){confirm(`Delete agent "${e.name}" and revoke its key?`)&&this.http.delete(`/api/v2/agents/agents/${e.id}`).subscribe(()=>this.refresh())}resolve(e,n){this.saving=!0,this.http.patch(`/api/v2/agents/requests/${e.id}`,{status:n}).subscribe({next:()=>{this.saving=!1,this.refresh()},error:()=>this.saving=!1})}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["df-agents"]],standalone:!0,features:[t.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],[1,"agents-page"],["eyebrow","AI Gateway","title","Agents",3,"description"],["pageHeaderActions","",1,"head-actions"],["class","live","aria-hidden","true",3,"matTooltip",4,"ngIf"],["mat-icon-button","",1,"refresh-icon",3,"matTooltip","click"],["mat-flat-button","","color","primary",3,"click"],[1,"card"],[1,"card-head"],[1,"sub","tight"],[1,"log-controls"],["appearance","outline",1,"ctl"],[3,"ngModel","ngModelChange"],["value","all"],["value","ok"],["value","error"],["value","24h"],["value","7d"],["value","30d"],["icon","query_stats",3,"title","description",4,"ngIf"],["icon","filter_alt_off",3,"title","description",4,"ngIf"],["class","log-scroll",4,"ngIf"],["class","new-form",4,"ngIf"],["icon","smart_toy","actionIcon","add",3,"title","description","actionLabel","action",4,"ngIf"],["class","agent-block",4,"ngFor","ngForOf","ngForTrackBy"],["class","new-form edit",4,"ngIf"],["class","muted",4,"ngIf"],["icon","inbox",3,"title","description",4,"ngIf"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"sub2"],["icon","notifications_off",3,"title","description",4,"ngIf"],["class","drawer-scrim",3,"click",4,"ngIf"],["class","drawer","role","dialog","aria-modal","true",4,"ngIf"],["aria-hidden","true",1,"live",3,"matTooltip"],[1,"live-dot"],["icon","query_stats",3,"title","description"],["icon","filter_alt_off",3,"title","description"],[1,"log-scroll"],["class","log",4,"ngIf"],[1,"log"],[1,"num"],[1,"scope-col"],["class","log-row","tabindex","0",3,"active","click","keydown.enter",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","0",1,"log-row",3,"click","keydown.enter"],[1,"muted","nowrap"],[1,"mono"],[3,"variant","label"],[1,"num","df-numeric"],[1,"arrow"],[3,"variant","dot","label"],[1,"new-form"],["appearance","outline"],["matInput","","placeholder","sales-report-bot",3,"ngModel","ngModelChange"],["appearance","outline",1,"grow"],["matInput","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["appearance","outline",4,"ngIf"],["appearance","outline",1,"narrow"],["matInput","","type","number","min","1","max","24","matTooltip","1-24 hours",3,"ngModel","ngModelChange"],["mat-flat-button","","color","primary",3,"disabled","click"],[3,"value"],["icon","smart_toy","actionIcon","add",3,"title","description","actionLabel","action"],[1,"agent-block"],[1,"row"],["mat-icon-button","",1,"chevron",3,"matTooltip","click"],[1,"tag"],["class","muted nowrap",3,"matTooltip",4,"ngIf"],[1,"spacer"],[1,"muted","ttl","nowrap",3,"matTooltip"],["matTooltip","Agent API key",1,"key"],[1,"muted","ttl"],["matTooltip","Revoke / restore key",3,"checked","change"],["mat-icon-button","","matTooltip","Edit",3,"click"],["mat-icon-button","","matTooltip","Delete",3,"click"],["class","expand",4,"ngIf"],[1,"muted","nowrap",3,"matTooltip"],[1,"muted"],[1,"expand"],[1,"expand-meta"],[1,"df-eyebrow"],[3,"roleId"],[1,"new-form","edit"],["matInput","","type","number","min","1","max","24",3,"ngModel","ngModelChange"],["mat-button","",3,"click"],["icon","inbox",3,"title","description"],[1,"hand"],["variant","warning",3,"dot","label"],["class","muted note",4,"ngIf"],["mat-stroked-button","",3,"disabled","click"],[1,"muted","note"],[4,"ngFor","ngForOf","ngForTrackBy"],["icon","notifications_off",3,"title","description"],[1,"drawer-scrim",3,"click"],["role","dialog","aria-modal","true",1,"drawer"],[1,"drawer-head"],["mat-icon-button","",3,"click"],[1,"drawer-section"],[1,"chips"],[1,"hint"],[1,"kv"],[1,"df-numeric"]],template:function(n,s){1&n&&t.DNE(0,lt,71,39,"ng-container",0),2&n&&t.Y8G("translocoRead","agents")},dependencies:[g.MD,g.Sq,g.bT,g.QX,g.vh,i.YN,i.me,i.Q0,i.BC,i.VZ,i.zX,i.vS,b.Q8,b.bA,R.Hu,R.RN,p.Hl,p.$z,p.iY,f.m_,f.An,d.RG,d.rl,d.nJ,F.fS,F.fg,k.Ve,k.VO,T.wT,x.mV,x.sG,C.uc,C.oV,$.K,I.v,A.M,D.A],styles:['.agents-page[_ngcontent-%COMP%]{--page-warning: #9a5b00;color:var(--df-text)}.dark-theme[_nghost-%COMP%] .agents-page[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .agents-page[_ngcontent-%COMP%]{--page-warning: #ffb74d}.head-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2, 8px)}.live[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:var(--df-font-size-xs, 12px);color:var(--df-success);text-transform:uppercase;letter-spacing:var(--df-tracking-eyebrow, .04em)}.live-dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background:var(--df-success);box-shadow:0 0 0 0 var(--df-success);animation:_ngcontent-%COMP%_live-pulse 2s ease-out infinite}@keyframes _ngcontent-%COMP%_live-pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--df-success) 60%,transparent)}70%{box-shadow:0 0 0 5px transparent}to{box-shadow:0 0 0 0 transparent}}@media (prefers-reduced-motion: reduce){.live-dot[_ngcontent-%COMP%]{animation:none}}.refresh-icon[_ngcontent-%COMP%]{color:var(--df-text-muted)}.sub[_ngcontent-%COMP%]{color:var(--df-text-2);margin:4px 0 16px;max-width:720px}.sub.tight[_ngcontent-%COMP%]{margin:2px 0 0;font-size:var(--df-font-size-sm, 13px)}.sub2[_ngcontent-%COMP%]{margin:18px 0 6px;font-size:1.5rem;font-weight:600;letter-spacing:-.01em}.card[_ngcontent-%COMP%]{margin:0 auto 16px;max-width:var(--df-content-max, 1120px);padding:16px}.card-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px;gap:16px}h2[_ngcontent-%COMP%]{margin:0;font-size:1.6rem;font-weight:600;letter-spacing:-.01em}.log-controls[_ngcontent-%COMP%]{display:flex;gap:var(--df-space-2, 8px);flex-shrink:0}.ctl[_ngcontent-%COMP%]{width:140px}.new-form[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:12px 0 4px;border-bottom:1px solid var(--df-border-2);margin-bottom:8px}.new-form.edit[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);padding:12px;border-bottom-width:1px}.new-form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:150px}.new-form[_ngcontent-%COMP%] .grow[_ngcontent-%COMP%]{flex:1;min-width:200px}.new-form[_ngcontent-%COMP%] .narrow[_ngcontent-%COMP%]{min-width:110px;max-width:130px}.agent-block[_ngcontent-%COMP%]{border-top:1px solid var(--df-border-2)}.agent-block[_ngcontent-%COMP%]:first-of-type{border-top:0}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-height:44px;padding:4px 10px}.row[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.chevron[_ngcontent-%COMP%]{color:var(--df-text-muted)}.expand[_ngcontent-%COMP%]{padding:4px 12px 16px 48px;background:var(--df-surface-2);border-top:1px solid var(--df-border-2)}.expand-meta[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:10px;margin:10px 0 6px}.spacer[_ngcontent-%COMP%]{flex:1}.muted[_ngcontent-%COMP%]{color:var(--df-text-muted)}.nowrap[_ngcontent-%COMP%]{white-space:nowrap}.note[_ngcontent-%COMP%]{font-style:italic}.df-eyebrow[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs, 12px);font-weight:var(--df-font-weight-medium, 500);text-transform:uppercase;letter-spacing:var(--df-tracking-eyebrow, .04em);color:var(--df-text-muted)}.ttl[_ngcontent-%COMP%], .key[_ngcontent-%COMP%]{font-size:1.2rem}.mono[_ngcontent-%COMP%]{font-family:var(--df-font-mono, "SFMono-Regular", Menlo, monospace)}.key[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);padding:2px 8px;border-radius:var(--df-radius-sm);font-family:var(--df-font-mono, "SFMono-Regular", Menlo, monospace)}.hand[_ngcontent-%COMP%]{color:var(--df-warning, var(--page-warning))}.tag[_ngcontent-%COMP%]{background:var(--df-tint-ai-bg);color:var(--df-tint-ai-fg);padding:2px 10px;border-radius:var(--df-radius-sm);font-size:1.2rem}.log-scroll[_ngcontent-%COMP%]{overflow-x:auto}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{text-align:left;padding:10px 8px;border-top:1px solid var(--df-border-2)}th[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);border-top:0;border-bottom:1px solid var(--df-border);position:sticky;top:0;background:var(--df-surface);z-index:1}th.num[_ngcontent-%COMP%], td.num[_ngcontent-%COMP%]{text-align:right}.df-numeric[_ngcontent-%COMP%]{font-variant-numeric:tabular-nums;font-feature-settings:"zero" 1}.arrow[_ngcontent-%COMP%]{color:var(--df-text-muted)}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:44px}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.log-row[_ngcontent-%COMP%]{cursor:pointer}.log-row.active[_ngcontent-%COMP%]{background:var(--df-hover)}.log-row[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:-2px}table.log[_ngcontent-%COMP%] td.mono[_ngcontent-%COMP%]{font-family:var(--df-font-mono, "SFMono-Regular", Menlo, monospace);font-size:1.25rem}.drawer-scrim[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.32);z-index:40}.drawer[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;width:min(420px,92vw);background:var(--df-surface);border-left:1px solid var(--df-border);box-shadow:var(--df-shadow-overlay, 0 8px 24px rgba(0, 0, 0, .18));z-index:41;overflow-y:auto;padding:16px 20px 32px;animation:_ngcontent-%COMP%_drawer-in var(--df-duration-fast, .12s) var(--df-ease-standard, ease) both}@keyframes _ngcontent-%COMP%_drawer-in{0%{transform:translate(8px);opacity:.6}to{transform:translate(0);opacity:1}}@media (prefers-reduced-motion: reduce){.drawer[_ngcontent-%COMP%]{animation:none}}.drawer-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px}.drawer-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:4px 0 0;font-size:1.5rem;font-weight:600}.drawer-section[_ngcontent-%COMP%]{padding:14px 0;border-top:1px solid var(--df-border-2)}.chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 6px}.hint[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:var(--df-font-size-xs, 12px);margin:6px 0 0}dl.kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:40% 60%;gap:6px 12px;margin:10px 0 0}dl.kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:var(--df-font-size-xs, 12px)}dl.kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm, 13px);word-break:break-word}']})}}return o})()},12513:(M,h,l)=>{l.d(h,{m:()=>v});var g=l(88834),_=l(75351),t=l(33609),i=l(17705);let v=(()=>{class p{constructor(m,d){this.dialogRef=m,this.data=d}get isDestructive(){const m=(this.data?.message??"").toLowerCase(),d=(this.data?.title??"").toLowerCase();return m.includes("delete")||d.includes("delete")}onClose(){this.dialogRef.close(!0)}static{this.\u0275fac=function(d){return new(d||p)(i.rXU(_.CP),i.rXU(_.Vh))}}static{this.\u0275cmp=i.VBU({type:p,selectors:[["df-confirm-dialog"]],standalone:!0,features:[i.aNF],decls:13,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],["mat-flat-button","","mat-dialog-close","","data-testid","confirm-dialog-cancel","type","button",1,"cancel-btn"],["mat-flat-button","","cdkFocusInitial","","data-testid","confirm-dialog-confirm","type","button","color","primary",1,"save-btn",3,"click"]],template:function(d,f){1&d&&(i.j41(0,"h1",0),i.EFF(1),i.nI1(2,"transloco"),i.k0s(),i.j41(3,"div",1),i.EFF(4),i.nI1(5,"transloco"),i.k0s(),i.j41(6,"div",2)(7,"button",3),i.EFF(8),i.nI1(9,"transloco"),i.k0s(),i.j41(10,"button",4),i.bIt("click",function(){return f.onClose()}),i.EFF(11),i.nI1(12,"transloco"),i.k0s()()),2&d&&(i.R7$(1),i.JRh(i.bMT(2,6,f.data.title)),i.R7$(3),i.JRh(i.bMT(5,8,f.data.message)),i.R7$(4),i.SpI(" ",i.bMT(9,10,"no")," "),i.R7$(2),i.AVh("destructive",f.isDestructive),i.R7$(1),i.SpI(" ",i.bMT(12,12,"yes")," "))},dependencies:[_.hM,_.tx,_.BI,_.Yi,_.E7,g.Hl,g.$z,t.Kj],styles:["[_nghost-%COMP%]{display:block;background:var(--df-surface);color:var(--df-text);--mdc-dialog-subhead-color: var(--df-text);--mdc-dialog-supporting-text-color: var(--df-text-2)}mat-dialog-actions[_ngcontent-%COMP%], [mat-dialog-actions][_ngcontent-%COMP%]{border-top:1px solid var(--df-border-2)}.save-btn.destructive[_ngcontent-%COMP%]{--mdc-filled-button-container-color: var(--df-danger-soft);--mdc-filled-button-label-text-color: var(--df-danger);border:1px solid var(--df-danger-border)}"]})}}return p})()}}]); \ No newline at end of file diff --git a/dist/1408.49417d2701a11530.js b/dist/1408.49417d2701a11530.js new file mode 100644 index 00000000..b58d69bb --- /dev/null +++ b/dist/1408.49417d2701a11530.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1408],{21408:(u_,wt,_)=>{_.r(wt),_.d(wt,{DfMcpRouteShimComponent:()=>f_});var m=_(60177),Fe=_(10467),ie=_(31635),d=_(89417),q=_(82765),me=_(9454),y=_(32102),E=_(99631),I=_(82798),ae=_(30450),_e=_(96850),$=_(33609),e=_(17705),u=_(88834),w=_(20060),f=_(45383),R=_(14823),X=_(49894),Be=_(60850),we=_(99172),K=_(96354),hn=_(59757),b=_(75351),ge=_(9183),L=_(99213),F=_(9159),H=_(21626),De=_(36225),Te=_(71985),N=_(99437),fe=_(88141),ue=_(18810),Le=_(91489),$e=_(95753),Dt=_(29487);let Tt=(()=>{class n{constructor(t,o){this.http=t,this.userDataService=o,this.excludedServices=["logs","log"]}getAbsoluteApiUrl(t){const r=`${window.location.origin}/${(t.startsWith("/")?t.substring(1):t).replace(/^(dreamfactory\/dist\/)?/,"")}`;return console.log(`\u{1f50d} Constructed absolute URL for API request: ${r}`),r}isSelectableFileService(t){return!this.excludedServices.some(o=>t.name.toLowerCase().includes(o)||t.label.toLowerCase().includes(o))}getHeaders(){const t={},o=this.userDataService.token;return o&&(t[Le.Zl]=o),console.log("Auth headers:",t),t}getFileServices(){console.log("Getting file services, session token:",this.userDataService.token);const t={resource:[{id:3,name:"files",label:"Local File Storage",type:"local_file"}]};return this.userDataService.token?new Te.c(o=>{o.next(t);const i=`${window.location.origin}/api/v2/system/service`;console.log(`Loading file services from absolute URL: ${i}`);const r=this.getHeaders();this.http.get(i,{params:{filter:"type=local_file",fields:"id,name,label,type"},headers:r}).pipe((0,K.T)(s=>s&&s.resource&&Array.isArray(s.resource)?(s.resource=s.resource.filter(l=>this.isSelectableFileService(l)),0===s.resource.length?(console.warn("No valid file services found in API response, using defaults"),t):s):(console.warn("Invalid response format from API, using default services"),t)),(0,N.W)(s=>(console.error("Error fetching file services:",s),console.warn("API call failed, using default file services"),new Te.c(l=>{l.next(t),l.complete()})))).subscribe({next:s=>{JSON.stringify(s)!==JSON.stringify(t)&&o.next(s),o.complete()},error:()=>{o.complete()}})}):(console.warn("No session token available, using hardcoded file services"),new Te.c(o=>{o.next(t),o.complete()}))}listFiles(t,o=""){if(!t)return console.warn("No service name provided for listFiles, returning empty list"),new Te.c(p=>{p.next({resource:[]}),p.complete()});const i=o?`api/v2/${t}/${o}`:`api/v2/${t}`;console.log(`Listing files from path: ${i}`);const c=`${window.location.origin}/${i}`;console.log(`Using absolute URL: ${c}`);const s={},l=this.userDataService.token;return l&&(s[Le.Zl]=l),this.http.get(c,{headers:s,params:{include_properties:"content_type",fields:"name,path,type,content_type,last_modified,size"}}).pipe((0,fe.M)(p=>console.log("Files response:",p)),(0,N.W)(p=>{console.error(`Error fetching files from ${c}:`,p);let v="Error loading files. ";return v+=500===p.status?"The server encountered an internal error. This might be a temporary issue.":404===p.status?"The specified folder does not exist.":403===p.status||401===p.status?"You do not have permission to access this location.":"Please check your connection and try again.",console.warn(v),new Te.c(k=>{k.next({resource:[],error:v}),k.complete()})}))}uploadFile(t,o,i=""){let c;c=i?`api/v2/${t}/${i.replace(/\/$/,"")}/${o.name}`:`api/v2/${t}/${o.name}`;const r=this.getAbsoluteApiUrl(c);console.log(`\u2b50\u2b50\u2b50 UPLOADING FILE ${o.name} (${o.size} bytes), type: ${o.type} \u2b50\u2b50\u2b50`),console.log(`To absolute URL: ${r}`),console.log(`Current document baseURI: ${document.baseURI}`),console.log(`Current window location: ${window.location.href}`),(o.name.endsWith(".pem")||o.name.endsWith(".p8")||o.name.endsWith(".key"))&&console.log("Detected private key file - using standard FormData upload method");const l=new FormData;l.append("files",o);const p=this.getHeaders();return this.http.post(r,l,{headers:p}).pipe((0,fe.M)(v=>console.log("Upload complete with response:",v)),(0,N.W)(v=>(console.error(`Error uploading file: ${v.status} ${v.statusText}`,v),(0,ue.$)(()=>(0,$e.cQ)(v)))))}createDirectoryWithPost(t,o,i){const c={resource:[{name:i,type:"folder"}]},s=this.getAbsoluteApiUrl(o?`api/v2/${t}/${o}`:`api/v2/${t}`);console.log(`Creating directory using POST at absolute URL: ${s}`,c);const l=this.getHeaders();return l["X-Http-Method"]="POST",this.http.post(s,c,{headers:l}).pipe((0,fe.M)(p=>console.log("Create directory response:",p)),(0,N.W)(p=>{throw console.error(`Error creating directory at ${s}:`,p),p}))}getFileContent(t,o){const c=this.getAbsoluteApiUrl(`api/v2/${t}/${o}`);return console.log(`Getting file content from absolute URL: ${c}`),this.http.get(c,{responseType:"blob",headers:this.getHeaders()}).pipe((0,N.W)(r=>{throw console.error(`Error getting file content from ${c}:`,r),r}))}deleteFile(t,o){const c=this.getAbsoluteApiUrl(`api/v2/${t}/${o}`);return console.log(`Deleting file at absolute URL: ${c}`),this.http.delete(c,{headers:this.getHeaders()}).pipe((0,fe.M)(r=>console.log("Delete response:",r)),(0,N.W)(r=>{throw console.error(`Error deleting file at ${c}:`,r),r}))}createDirectory(t,o,i){const c={resource:[{name:i,type:"folder"}]},s=this.getAbsoluteApiUrl(o?`api/v2/${t}/${o}`:`api/v2/${t}`);return console.log(`Creating directory at absolute URL: ${s}`,c),this.http.post(s,c,{headers:this.getHeaders()}).pipe((0,fe.M)(l=>console.log("Create directory response:",l)),(0,N.W)(l=>{throw console.error(`Error creating directory at ${s}:`,l),l}))}static{this.\u0275fac=function(o){return new(o||n)(e.KVO(H.Qq),e.KVO(Dt.T))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const bn=["fileUploadInput"];function vn(n,a){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2,"Upload Private Key File"),e.k0s(),e.bVm())}function Cn(n,a){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2,"Select File"),e.k0s(),e.bVm())}function xn(n,a){if(1&n&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" Allowed file types: ",t.data.allowedExtensions.join(", ")," ")}}function kn(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",10),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(2);return e.Njj(r.selectFileApi(c))}),e.j41(1,"div",11),e.nrm(2,"fa-icon",12),e.k0s(),e.j41(3,"div",13)(4,"div",14),e.EFF(5),e.k0s(),e.j41(6,"div",15),e.EFF(7),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(2),e.Y8G("icon",o.faFolderOpen),e.R7$(3),e.JRh(t.label||t.name),e.R7$(2),e.JRh(t.type)}}function yn(n,a){if(1&n&&(e.j41(0,"div",7)(1,"h3"),e.EFF(2,"Select a File Service"),e.k0s(),e.j41(3,"div",8),e.DNE(4,kn,8,3,"div",9),e.k0s()()),2&n){const t=e.XpG();e.R7$(4),e.Y8G("ngForOf",t.data.fileApis)}}function Mn(n,a){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.currentPath)}}function On(n,a){1&n&&(e.j41(0,"div",32)(1,"p"),e.EFF(2," Select a file from the list below. To upload new files, please use the File Manager. "),e.k0s()())}function Pn(n,a){1&n&&(e.j41(0,"div",33),e.nrm(1,"mat-spinner",34),e.j41(2,"div"),e.EFF(3,"Loading files..."),e.k0s()())}function Fn(n,a){1&n&&(e.j41(0,"th",46),e.EFF(1,"Name"),e.k0s())}function wn(n,a){if(1&n){const t=e.RV6();e.j41(0,"td",47),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(3);return e.Njj("folder"===c.type?r.openFolder(c):r.selectFile(c))}),e.j41(1,"div",48),e.nrm(2,"fa-icon",19),e.j41(3,"span"),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(2),e.Y8G("icon","folder"===t.type?o.faFolderOpen:o.faFile),e.R7$(2),e.JRh(t.name)}}function Dn(n,a){1&n&&(e.j41(0,"th",46),e.EFF(1,"Type"),e.k0s())}function Tn(n,a){if(1&n&&(e.j41(0,"td",49),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ","folder"===t.type?"Folder":t.contentType||"File"," ")}}function Sn(n,a){1&n&&(e.j41(0,"th",46),e.EFF(1,"Actions"),e.k0s())}function Rn(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",52),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,c=e.XpG(3);return e.Njj(c.openFolder(i))}),e.j41(1,"mat-icon"),e.EFF(2,"folder_open"),e.k0s()()}}function In(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",53),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,c=e.XpG(3);return e.Njj(c.selectFile(i))}),e.j41(1,"mat-icon"),e.EFF(2,"check_circle"),e.k0s()()}if(2&n){const t=e.XpG(4);e.Y8G("disabled",t.data.uploadMode)}}function En(n,a){if(1&n&&(e.j41(0,"td",49),e.DNE(1,Rn,3,0,"button",50),e.DNE(2,In,3,1,"button",51),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf","folder"===t.type),e.R7$(1),e.Y8G("ngIf","file"===t.type)}}function $n(n,a){1&n&&e.nrm(0,"tr",54)}function Gn(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr",55),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(3);return e.Njj("folder"===c.type?r.openFolder(c):null)}),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.AVh("selected-row",(null==o.selectedFile?null:o.selectedFile.name)===t.name)}}function jn(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",58),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.triggerFileUpload())}),e.j41(1,"mat-icon"),e.EFF(2,"upload_file"),e.k0s(),e.EFF(3," Upload File Here "),e.k0s()}}function Nn(n,a){if(1&n&&(e.j41(0,"div",56)(1,"p"),e.EFF(2,"This directory is empty."),e.k0s(),e.DNE(3,jn,4,0,"button",57),e.k0s()),2&n){const t=e.XpG(3);e.R7$(3),e.Y8G("ngIf",!t.isSelectorOnly)}}function An(n,a){if(1&n&&(e.j41(0,"div",35)(1,"table",36),e.qex(2,37),e.DNE(3,Fn,2,0,"th",38),e.DNE(4,wn,5,2,"td",39),e.bVm(),e.qex(5,40),e.DNE(6,Dn,2,0,"th",38),e.DNE(7,Tn,2,1,"td",41),e.bVm(),e.qex(8,42),e.DNE(9,Sn,2,0,"th",38),e.DNE(10,En,3,2,"td",41),e.bVm(),e.DNE(11,$n,1,0,"tr",43),e.DNE(12,Gn,1,2,"tr",44),e.k0s(),e.DNE(13,Nn,4,1,"div",45),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("dataSource",t.files),e.R7$(10),e.Y8G("matHeaderRowDef",t.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",t.displayedColumns),e.R7$(1),e.Y8G("ngIf",0===t.files.length)}}function Yn(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",59)(1,"h3"),e.EFF(2),e.k0s(),e.j41(3,"button",6),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.uploadFile())}),e.nrm(4,"fa-icon",19),e.EFF(5," Upload Here "),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI('Upload "',null==t.data.fileToUpload?null:t.data.fileToUpload.name,'" to this location?'),e.R7$(1),e.Y8G("disabled",t.uploadInProgress),e.R7$(1),e.Y8G("icon",t.faUpload)}}function Vn(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",16)(1,"div",17)(2,"button",18),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.navigateBack())}),e.nrm(3,"fa-icon",19),e.k0s(),e.j41(4,"div",20)(5,"span",21),e.EFF(6),e.k0s(),e.DNE(7,Mn,2,1,"span",1),e.k0s()(),e.j41(8,"div",22)(9,"button",23),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.showCreateFolderDialog())}),e.j41(10,"span",24),e.EFF(11,"cr"),e.k0s(),e.EFF(12," Create Folder "),e.k0s(),e.j41(13,"button",25),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.triggerFileUpload())}),e.j41(14,"span",24),e.EFF(15,"up"),e.k0s(),e.EFF(16," Upload File "),e.k0s(),e.j41(17,"input",26,27),e.bIt("change",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.handleFileUpload(i))}),e.k0s()(),e.DNE(19,On,3,0,"div",28),e.DNE(20,Pn,4,0,"div",29),e.DNE(21,An,14,4,"div",30),e.DNE(22,Yn,6,3,"div",31),e.k0s()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("icon",t.faArrowLeft),e.R7$(3),e.JRh(t.selectedFileApi.name),e.R7$(1),e.Y8G("ngIf",t.currentPath),e.R7$(10),e.Y8G("accept",t.data.allowedExtensions.join(",")),e.R7$(2),e.Y8G("ngIf",t.isSelectorOnly),e.R7$(1),e.Y8G("ngIf",t.isLoading),e.R7$(1),e.Y8G("ngIf",!t.isLoading),e.R7$(1),e.Y8G("ngIf",t.data.uploadMode)}}let zn=(()=>{class n{constructor(t){this.dialogRef=t,this.folderName=""}onCancel(){this.dialogRef.close()}onConfirm(){this.dialogRef.close(this.folderName)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-create-folder-dialog"]],standalone:!0,features:[e.aNF],decls:12,vars:2,consts:[["mat-dialog-title",""],["appearance","outline",1,"full-width"],["matInput","","placeholder","Enter folder name",3,"ngModel","ngModelChange"],["align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"]],template:function(o,i){1&o&&(e.j41(0,"h2",0),e.EFF(1,"Create New Folder"),e.k0s(),e.j41(2,"mat-dialog-content")(3,"mat-form-field",1)(4,"mat-label"),e.EFF(5,"Folder Name"),e.k0s(),e.j41(6,"input",2),e.bIt("ngModelChange",function(r){return i.folderName=r}),e.k0s()()(),e.j41(7,"mat-dialog-actions",3)(8,"button",4),e.bIt("click",function(){return i.onCancel()}),e.EFF(9,"Cancel"),e.k0s(),e.j41(10,"button",5),e.bIt("click",function(){return i.onConfirm()}),e.EFF(11," Create "),e.k0s()()),2&o&&(e.R7$(6),e.Y8G("ngModel",i.folderName),e.R7$(4),e.Y8G("disabled",!i.folderName))},dependencies:[b.hM,b.BI,b.Yi,b.E7,u.Hl,u.$z,y.RG,y.rl,y.nJ,E.fS,E.fg,d.YN,d.me,d.BC,d.vS,m.MD],styles:[".full-width[_ngcontent-%COMP%]{width:100%}"]})}}return n})(),Ue=class Ct{get isSelectorOnly(){return console.log("isSelectorOnly getter called, data.selectorOnly =",this.data.selectorOnly),!!this.data.selectorOnly}constructor(a,t,o,i,c,r){this.dialogRef=a,this.data=t,this.dialog=o,this.http=i,this.fileApiService=c,this.crudService=r,this.faFolderOpen=f.Uj9,this.faFile=f.A4h,this.faArrowLeft=f.CeG,this.faUpload=f.JmV,this.selectedFileApi=null,this.currentPath="",this.files=[],this.navigationStack=[],this.isLoading=!1,this.uploadInProgress=!1,this.displayedColumns=["name","type","actions"],this.selectedFile=null}ngOnInit(){this.data.uploadMode&&this.data.fileApis.length>0&&this.selectFileApi(this.data.fileApis[0]),console.log("Dialog initialized with data:",{uploadMode:this.data.uploadMode,selectorOnly:this.data.selectorOnly,allowedExtensions:this.data.allowedExtensions,fileApis:this.data.fileApis?.length||0})}selectFileApi(a){this.selectedFileApi=a,this.currentPath="",this.navigationStack=[],this.loadFiles()}loadFiles(){this.selectedFileApi&&(this.isLoading=!0,this.fileApiService.listFiles(this.selectedFileApi.name,this.currentPath).pipe((0,X.s)(this)).subscribe({next:a=>{if(this.isLoading=!1,a.error&&(console.warn("File listing contained error:",a.error),a.error.includes("Internal Server Error")))return console.log("Server error encountered, showing empty directory"),void(this.files=[]);let t=[];Array.isArray(a)?t=a:a.resource&&Array.isArray(a.resource)&&(t=a.resource),this.files=t.map(o=>({name:o.name||(o.path?o.path.split("/").pop():""),path:o.path||((this.currentPath?this.currentPath+"/":"")+o.name).replace("//","/"),type:"folder"===o.type?"folder":"file",contentType:o.content_type||o.contentType,lastModified:o.last_modified||o.lastModified,size:o.size})),console.log("Processed files:",this.files)},error:a=>{console.error("Error loading files:",a),this.files=[];let t="Failed to load files. ";500===a.status?(t+="The server encountered an internal error. Using empty directory view.",console.warn(t)):404===a.status?(t+="The specified folder does not exist.",alert(t)):403===a.status||401===a.status?(t+="You do not have permission to access this location.",alert(t)):(t+="Please check your connection and try again.",alert(t)),this.isLoading=!1}}))}openFolder(a){this.navigationStack.push(this.currentPath),this.currentPath=a.path,this.loadFiles()}navigateBack(){this.navigationStack.length>0?(this.currentPath=this.navigationStack.pop()||"",this.loadFiles()):this.selectedFileApi&&(this.selectedFileApi=null,this.files=[])}selectFile(a){const t="."+a.name.split(".").pop()?.toLowerCase();this.data.allowedExtensions.includes(t)?this.selectedFile=a:alert(`Only ${this.data.allowedExtensions.join(", ")} files are allowed.`)}confirmSelection(){if(!this.selectedFile||!this.selectedFileApi)return;const a=this.selectedFileApi,i={path:"/opt/dreamfactory/storage/app/"+this.selectedFile.path,relativePath:this.selectedFile.path,fileName:this.selectedFile.name,name:this.selectedFile.name,serviceId:a.id,serviceName:a.name};console.log("Selected file with absolute path:",i),this.dialogRef.close(i)}uploadFileDirectly(a){this.selectedFileApi?(this.uploadInProgress=!0,this.performUpload(a,this.currentPath)):alert("Please select a file service first.")}performUpload(a,t){if(!this.selectedFileApi)return void(this.uploadInProgress=!1);this.uploadInProgress=!0;const o=this.selectedFileApi;console.log(`Starting upload of ${a.name} (${a.size} bytes) to ${o.name}/${t}`),this.fileApiService.uploadFile(o.name,a,t).pipe((0,X.s)(this)).subscribe({next:i=>{this.uploadInProgress=!1,console.log("Upload successful:",i);const c=t?`${t}/${a.name}`:a.name;console.log("File uploaded successfully, returning:",{path:"/opt/dreamfactory/storage/app/"+c,relativePath:c,fileName:a.name,name:a.name,serviceId:o.id,serviceName:o.name}),this.loadFiles(),setTimeout(()=>{const l=this.files.find(p=>p.name===a.name);l&&(this.selectedFile=l)},500)},error:i=>{console.error("Error uploading file:",i),this.uploadInProgress=!1;let c="Failed to upload file. ";c+=400===i.status?"Bad request - check if the file type is allowed or if the file is too large.":401===i.status||403===i.status?"Permission denied - you may not have access to upload to this location.":404===i.status?"The specified folder does not exist.":413===i.status?"The file is too large.":500===i.status?i.error?.error?.message||"Server error occurred.":"Please try again.",alert(c)}})}uploadFile(){this.data.fileToUpload&&this.selectedFileApi&&(this.uploadInProgress=!0,this.performUploadAndClose(this.data.fileToUpload,this.currentPath))}performUploadAndClose(a,t){if(!this.selectedFileApi)return void(this.uploadInProgress=!1);this.uploadInProgress=!0;const o=this.selectedFileApi;console.log(`Starting upload of ${a.name} (${a.size} bytes) to ${o.name}/${t}`),this.fileApiService.uploadFile(o.name,a,t).pipe((0,X.s)(this)).subscribe({next:i=>{this.uploadInProgress=!1,console.log("Upload successful:",i);const c=t?`${t}/${a.name}`:a.name,s={path:"/opt/dreamfactory/storage/app/"+c,relativePath:c,fileName:a.name,name:a.name,serviceId:o.id,serviceName:o.name};console.log("File uploaded successfully, returning with absolute path:",s),this.dialogRef.close(s)},error:i=>{console.error("Error uploading file:",i),this.uploadInProgress=!1;let c="Failed to upload file. ";c+=400===i.status?"Bad request - check if the file type is allowed or if the file is too large.":401===i.status||403===i.status?"Permission denied - you may not have access to upload to this location.":404===i.status?"The specified folder does not exist.":413===i.status?"The file is too large.":500===i.status?i.error?.error?.message||"Server error occurred.":"Please try again.",alert(c)}})}triggerFileUpload(){console.log("triggerFileUpload called, isSelectorOnly =",this.isSelectorOnly),this.isSelectorOnly?console.log("Blocked file upload due to selector-only mode"):this.fileUploadInput?(console.log("Clicking file upload input element"),this.fileUploadInput.nativeElement.click()):console.log("File upload input element not found")}showCreateFolderDialog(){console.log("showCreateFolderDialog called, isSelectorOnly =",this.isSelectorOnly),this.isSelectorOnly?console.log("Blocked folder creation due to selector-only mode"):this.dialog.open(zn,{width:"350px"}).afterClosed().subscribe(t=>{t&&this.selectedFileApi&&this.createFolder(t)})}createFolder(a){this.selectedFileApi&&(this.isLoading=!0,this.fileApiService.createDirectory(this.selectedFileApi.name,this.currentPath,a).pipe((0,X.s)(this)).subscribe({next:()=>{console.log("Folder created successfully"),this.loadFiles()},error:t=>{console.error("Error creating folder:",t),alert("Failed to create folder. Please try again."),this.isLoading=!1}}))}cancel(){this.dialogRef.close()}handleFileUpload(a){const t=a.target;if(t.files&&t.files.length>0){const o=t.files[0];console.log(`File selected: ${o.name}`),console.log(`File size: ${o.size} bytes`),console.log(`File type: ${o.type}`),(o.name.endsWith(".pem")||o.name.endsWith(".p8")||o.name.endsWith(".key"))&&console.log("Handling private key file with special care for Snowflake authentication");const c=new FileReader;c.onload=r=>{const s=r.target?.result;console.log(`File content read successfully, content length: ${s?s.byteLength:0} bytes`);const l="."+o.name.split(".").pop()?.toLowerCase();this.data.allowedExtensions.includes(l)?this.uploadFileDirectly(o):alert(`Only ${this.data.allowedExtensions.join(", ")} files are allowed`)},c.onerror=r=>{console.error("Error reading file:",r),alert("Error reading file content. Please try again with another file.")},c.readAsArrayBuffer(o)}}static{this.\u0275fac=function(t){return new(t||Ct)(e.rXU(b.CP),e.rXU(b.Vh),e.rXU(b.bZ),e.rXU(H.Qq),e.rXU(Tt),e.rXU(De.h))}}static{this.\u0275cmp=e.VBU({type:Ct,selectors:[["df-file-selector-dialog"]],viewQuery:function(t,o){if(1&t&&e.GBs(bn,5),2&t){let i;e.mGM(i=e.lsd())&&(o.fileUploadInput=i.first)}},standalone:!0,features:[e.Jv_([{provide:De.h,useFactory:a=>new De.h("api/v2",a),deps:[H.Qq]}]),e.aNF],decls:12,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],["class","file-api-selection",4,"ngIf"],["class","file-browser",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"file-api-selection"],[1,"file-api-grid"],["class","file-api-card",3,"click",4,"ngFor","ngForOf"],[1,"file-api-card",3,"click"],[1,"file-api-icon"],["size","2x",3,"icon"],[1,"file-api-details"],[1,"file-api-name"],[1,"file-api-type"],[1,"file-browser"],[1,"navigation-bar"],["mat-icon-button","","matTooltip","Go back",3,"click"],[3,"icon"],[1,"current-location"],[1,"service-name"],[1,"action-row"],[1,"action-button","create-folder-btn",3,"click"],[1,"button-content"],[1,"action-button","upload-file-btn",3,"click"],["type","file",2,"display","none",3,"accept","change"],["fileUploadInput",""],["class","selector-info",4,"ngIf"],["class","loading-container",4,"ngIf"],["class","file-list",4,"ngIf"],["class","upload-section",4,"ngIf"],[1,"selector-info"],[1,"loading-container"],["diameter","40"],[1,"file-list"],["mat-table","",1,"file-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","type"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"selected-row","click",4,"matRowDef","matRowDefColumns"],["class","empty-directory",4,"ngIf"],["mat-header-cell",""],["mat-cell","",3,"click"],[1,"file-name-cell"],["mat-cell",""],["mat-icon-button","","color","primary","matTooltip","Open folder",3,"click",4,"ngIf"],["mat-icon-button","","color","primary","matTooltip","Select file",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","primary","matTooltip","Open folder",3,"click"],["mat-icon-button","","color","primary","matTooltip","Select file",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click"],[1,"empty-directory"],["mat-stroked-button","","color","primary",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary",3,"click"],[1,"upload-section"]],template:function(t,o){1&t&&(e.j41(0,"h2",0),e.DNE(1,vn,3,0,"ng-container",1),e.DNE(2,Cn,3,0,"ng-container",1),e.DNE(3,xn,2,1,"small",1),e.k0s(),e.j41(4,"mat-dialog-content"),e.DNE(5,yn,5,1,"div",2),e.DNE(6,Vn,23,8,"div",3),e.k0s(),e.j41(7,"div",4)(8,"button",5),e.bIt("click",function(){return o.cancel()}),e.EFF(9,"Cancel"),e.k0s(),e.j41(10,"button",6),e.bIt("click",function(){return o.confirmSelection()}),e.EFF(11," Choose "),e.k0s()()),2&t&&(e.R7$(1),e.Y8G("ngIf",o.data.uploadMode),e.R7$(1),e.Y8G("ngIf",!o.data.uploadMode),e.R7$(1),e.Y8G("ngIf",o.data.allowedExtensions.length>0),e.R7$(2),e.Y8G("ngIf",!o.selectedFileApi),e.R7$(1),e.Y8G("ngIf",o.selectedFileApi),e.R7$(4),e.Y8G("disabled",!o.selectedFile||"folder"===o.selectedFile.type))},dependencies:[m.MD,m.Sq,m.bT,b.hM,b.BI,b.Yi,b.E7,u.Hl,u.$z,u.iY,_e.RI,y.RG,E.fS,I.Ve,ge.D6,ge.LG,L.m_,L.An,F.tP,F.Zl,F.tL,F.ji,F.cC,F.YV,F.iL,F.KS,F.$R,F.YZ,F.NB,R.uc,R.oV,d.YN,d.X1,w.dX,w.aY],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-height:400px;max-height:600px;overflow-y:auto}h2[_ngcontent-%COMP%]{margin-bottom:0}h2[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;font-size:1.2rem;font-weight:400;color:var(--df-text-muted);margin-top:4px}.file-api-selection[_ngcontent-%COMP%]{padding:16px 0}.file-api-selection[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:16px;font-size:1.6rem;font-weight:600;letter-spacing:-.01em}.file-api-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}.file-api-card[_ngcontent-%COMP%]{display:flex;align-items:center;padding:16px;border-radius:var(--df-radius);border:1px solid var(--df-border);cursor:pointer;transition:background-color .2s ease,border-color .2s ease}.file-api-card[_ngcontent-%COMP%]:hover{background-color:var(--df-hover);border-color:var(--df-accent)}.file-api-icon[_ngcontent-%COMP%]{margin-right:16px;color:var(--df-accent)}.file-api-details[_ngcontent-%COMP%] .file-api-name[_ngcontent-%COMP%]{font-weight:500;margin-bottom:4px}.file-api-details[_ngcontent-%COMP%] .file-api-type[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-muted)}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:16px}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%] .current-location[_ngcontent-%COMP%]{margin-left:8px}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%] .current-location[_ngcontent-%COMP%] .service-name[_ngcontent-%COMP%]{font-weight:500;margin-right:8px}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:20px;padding:10px;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm);background-color:var(--df-surface-2)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;border:none;border-radius:var(--df-radius-sm);padding:8px 16px;font-size:1.4rem;font-weight:500;cursor:pointer;transition:all .2s ease}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid currentColor;border-radius:var(--df-radius-sm);margin-right:8px;font-weight:700;font-size:1.2rem;opacity:.85}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:hover{opacity:.9}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:active{transform:translateY(1px)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .create-folder-btn[_ngcontent-%COMP%]{background-color:var(--df-accent);color:var(--df-accent-contrast)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .upload-file-btn[_ngcontent-%COMP%]{background-color:transparent;border:1px solid var(--df-border);color:var(--df-text-2)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .upload-file-btn[_ngcontent-%COMP%]:hover{background-color:var(--df-hover)}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px}.loading-container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin-top:16px;color:var(--df-text-muted)}.file-table[_ngcontent-%COMP%]{width:100%}.file-table[_ngcontent-%COMP%] .mat-column-name[_ngcontent-%COMP%]{width:60%}.file-table[_ngcontent-%COMP%] .mat-column-type[_ngcontent-%COMP%]{width:20%}.file-table[_ngcontent-%COMP%] .mat-column-actions[_ngcontent-%COMP%]{width:20%;text-align:right}.file-table[_ngcontent-%COMP%] .file-name-cell[_ngcontent-%COMP%]{display:flex;align-items:center}.file-table[_ngcontent-%COMP%] .file-name-cell[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:8px;color:var(--df-accent)}.file-table[_ngcontent-%COMP%] .selected-row[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)}.empty-directory[_ngcontent-%COMP%]{padding:24px 16px;text-align:center;color:var(--df-text-muted)}.empty-directory[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:16px;font-style:italic}.empty-directory[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:8px}.upload-section[_ngcontent-%COMP%]{margin-top:24px;padding:16px;border-radius:var(--df-radius);border:1px solid var(--df-border-2);background-color:var(--df-surface-2);text-align:center}.upload-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:16px}"]})}};Ue=(0,ie.Cg)([(0,X.d)({checkProperties:!0})],Ue);var A=_(24784),B=_(23472),G=_(95245);function Xn(n,a){if(1&n&&(e.j41(0,"span",8),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.label)}}function Bn(n,a){if(1&n&&e.nrm(0,"div",9),2&n){const t=e.XpG(2);e.Y8G("innerHTML",t.description,e.npT)}}function Ln(n,a){if(1&n&&(e.j41(0,"div",5),e.DNE(1,Xn,2,1,"span",6),e.DNE(2,Bn,1,1,"div",7),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.label),e.R7$(1),e.Y8G("ngIf",t.description)}}function Un(n,a){1&n&&(e.j41(0,"div",17),e.EFF(1," No file services configured. Contact your administrator. "),e.k0s())}function Jn(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",10)(1,"div",11)(2,"button",12),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openFileSelector())}),e.nrm(3,"fa-icon",13),e.EFF(4," Select File "),e.k0s(),e.j41(5,"button",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.goToFilesManager())}),e.nrm(6,"fa-icon",13),e.EFF(7," File Manager "),e.k0s()(),e.j41(8,"div",15),e.EFF(9,' You can upload and select files directly with "Select File" or manage files via the "File Manager". '),e.k0s(),e.DNE(10,Un,2,0,"div",16),e.k0s()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("icon",t.faFolderOpen),e.R7$(3),e.Y8G("icon",t.faExternalLinkAlt),e.R7$(4),e.Y8G("ngIf",0===t.fileApis.length)}}function qn(n,a){if(1&n&&(e.j41(0,"div",31)(1,"strong"),e.EFF(2,"Service:"),e.k0s(),e.EFF(3),e.k0s()),2&n){const t=e.XpG(2);e.R7$(3),e.SpI(" ",t.selectedFile.serviceName," ")}}function Kn(n,a){if(1&n&&(e.j41(0,"div",32)(1,"span",33),e.EFF(2,"Service Relative Path:"),e.k0s(),e.j41(3,"span",34),e.EFF(4),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(4),e.JRh(t.selectedFile.relativePath)}}function Hn(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",18)(1,"div",19),e.nrm(2,"fa-icon",20),e.j41(3,"div",21)(4,"div",22),e.EFF(5),e.k0s(),e.DNE(6,qn,4,1,"div",23),e.j41(7,"div",24)(8,"div",25),e.EFF(9,"Full Absolute Path:"),e.k0s(),e.j41(10,"div",26)(11,"div",27),e.EFF(12),e.k0s()(),e.DNE(13,Kn,5,1,"div",28),e.k0s()()(),e.j41(14,"div",29)(15,"button",30),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.clearSelection())}),e.EFF(16," Clear selection "),e.k0s(),e.j41(17,"button",12),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openFileSelector())}),e.EFF(18," Choose Different "),e.k0s(),e.j41(19,"button",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.goToFilesManager())}),e.nrm(20,"fa-icon",13),e.EFF(21," File Manager "),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("icon",t.faFile),e.R7$(3),e.SpI(" ",t.selectedFile.fileName||t.selectedFile.name," "),e.R7$(1),e.Y8G("ngIf","Unknown"!==t.selectedFile.serviceName),e.R7$(6),e.JRh(t.selectedFile.path),e.R7$(1),e.Y8G("ngIf",t.selectedFile.relativePath),e.R7$(7),e.Y8G("icon",t.faExternalLinkAlt)}}let Je=class xt{constructor(a,t,o,i){this.dialog=a,this.fileApiService=t,this.crudService=o,this.router=i,this.label="Private Key File",this.description="",this.allowedExtensions=[".pem",".p8",".key"],this.initialValue="",this.fileSelected=new e.bkB,this.faFile=f.A4h,this.faFolderOpen=f.Uj9,this.faCheck=f.e68,this.faUpload=f.JmV,this.faExternalLinkAlt=f.AaJ,this.selectedFile=void 0,this.fileApis=[],this.isLoading=!1}ngOnInit(){this.loadFileApis(),this.initialValue&&this.parseInitialValue(),this.ensureFallbackService()}goToFilesManager(){this.router.navigate([B.b.ADMIN_SETTINGS,B.b.FILES])}ensureFallbackService(){0===this.fileApis.length&&(console.log("Creating fallback file service entry"),this.fileApis=[{id:1,name:"files",label:"Local Files",type:"local_file"}])}loadFileApis(){this.isLoading=!0,this.ensureFallbackService(),this.fileApiService.getFileServices().pipe((0,X.s)(this)).subscribe({next:a=>{a&&a.resource&&a.resource.length>0?this.fileApis=a.resource:this.ensureFallbackService(),this.isLoading=!1},error:a=>{console.error("Error loading file APIs:",a),this.ensureFallbackService(),this.isLoading=!1}})}openFileSelector(){this.ensureFallbackService(),console.log("Opening file selector dialog with selectorOnly = false"),this.dialog.open(Ue,{width:"800px",data:{fileApis:this.fileApis,allowedExtensions:this.allowedExtensions,selectorOnly:!1}}).afterClosed().subscribe(t=>{t&&(this.selectedFile=t,this.fileSelected.emit(this.selectedFile))})}clearSelection(){this.selectedFile=void 0,this.fileSelected.emit(void 0)}parseInitialValue(a){try{const t=a||this.initialValue;if(t){console.log("Parsing path value:",t);const o=t.split("/"),i=o[o.length-1];this.selectedFile={path:t,fileName:i,name:i,serviceId:0,serviceName:"Unknown"},console.log("Generated selected file:",this.selectedFile)}}catch(t){console.error("Failed to parse path value:",t)}}setPath(a){a&&(console.log("Setting path manually:",a),this.parseInitialValue(a))}static{this.\u0275fac=function(t){return new(t||xt)(e.rXU(b.bZ),e.rXU(Tt),e.rXU(De.h),e.rXU(G.Ix))}}static{this.\u0275cmp=e.VBU({type:xt,selectors:[["df-file-selector"]],inputs:{label:"label",description:"description",allowedExtensions:"allowedExtensions",initialValue:"initialValue"},outputs:{fileSelected:"fileSelected"},standalone:!0,features:[e.Jv_([{provide:A.Wi,useValue:"api/v2/system/service"},De.h]),e.aNF],decls:5,vars:3,consts:[[1,"file-selector-container"],["class","file-selector-header",4,"ngIf"],[1,"file-selector-content"],["class","file-selector-empty",4,"ngIf"],["class","file-selector-selected",4,"ngIf"],[1,"file-selector-header"],["class","file-selector-label",4,"ngIf"],["class","file-selector-description",3,"innerHTML",4,"ngIf"],[1,"file-selector-label"],[1,"file-selector-description",3,"innerHTML"],[1,"file-selector-empty"],[1,"file-selector-actions"],["mat-raised-button","","color","primary",1,"select-file-button",3,"click"],[3,"icon"],["mat-button","","color","accent","matTooltip","Upload and manage files in the file manager",1,"manage-files-button",3,"click"],[1,"help-text"],["class","no-apis-message",4,"ngIf"],[1,"no-apis-message"],[1,"file-selector-selected"],[1,"selected-file-info"],[1,"file-icon",3,"icon"],[1,"file-details"],[1,"file-name"],["class","file-service",4,"ngIf"],[1,"file-path-container"],[1,"file-path-header"],[1,"file-path-section"],[1,"file-path-value"],["class","relative-path-section",4,"ngIf"],[1,"file-actions"],[1,"clear-button",3,"click"],[1,"file-service"],[1,"relative-path-section"],[1,"relative-path-label"],[1,"relative-path-value"]],template:function(t,o){1&t&&(e.j41(0,"div",0),e.DNE(1,Ln,3,2,"div",1),e.j41(2,"div",2),e.DNE(3,Jn,11,3,"div",3),e.DNE(4,Hn,22,6,"div",4),e.k0s()()),2&t&&(e.R7$(1),e.Y8G("ngIf",o.label||o.description),e.R7$(2),e.Y8G("ngIf",!o.selectedFile),e.R7$(1),e.Y8G("ngIf",o.selectedFile))},dependencies:[m.MD,m.bT,b.hM,u.Hl,u.$z,y.RG,E.fS,I.Ve,d.YN,d.X1,R.uc,R.oV,w.dX,w.aY,L.m_],styles:[".file-selector-container[_ngcontent-%COMP%]{width:100%;border:1px solid var(--df-border);border-radius:var(--df-radius);padding:16px;margin-bottom:16px}.file-selector-header[_ngcontent-%COMP%]{margin-bottom:16px}.file-selector-label[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:600;letter-spacing:-.01em;margin-right:8px;color:var(--df-text)}.file-selector-description[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.file-selector-description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none}.file-selector-description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.file-selector-content[_ngcontent-%COMP%]{width:100%}.file-selector-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:16px 0}.file-selector-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-bottom:16px}.select-file-button[_ngcontent-%COMP%]{padding:8px 24px;font-size:1.4rem}.select-file-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:8px}.file-selector-selected[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px;background-color:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm)}.selected-file-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.file-icon[_ngcontent-%COMP%]{font-size:2.4rem;color:var(--df-accent)}.file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.file-name[_ngcontent-%COMP%]{color:var(--df-text);font-weight:500;margin-bottom:4px}.file-path-container[_ngcontent-%COMP%]{margin-top:12px;padding:4px;border-radius:var(--df-radius-sm)}.file-path-header[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;color:var(--df-text-muted)}.file-path-section[_ngcontent-%COMP%]{display:flex;margin-bottom:8px;flex-wrap:wrap;padding:12px;background-color:var(--df-surface-2);border-radius:var(--df-radius-sm);border:1px solid var(--df-border)}.file-path-label[_ngcontent-%COMP%]{font-weight:600;margin-right:8px;color:var(--df-text);font-size:1.3rem}.file-path-value[_ngcontent-%COMP%]{font-size:1.3rem;word-break:break-all;flex:1;font-family:SFMono-Regular,Menlo,Consolas,monospace;background-color:var(--df-code-bg);color:var(--df-code-text);padding:4px 8px;border-radius:var(--df-radius-sm);border:1px solid var(--df-border-2)}.file-service[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-2)}.file-actions[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.clear-button[_ngcontent-%COMP%]{background:none;border:none;color:var(--df-danger);cursor:pointer;font-size:1.3rem;padding:0;font-weight:500}.clear-button[_ngcontent-%COMP%]:hover{text-decoration:underline}.no-apis-message[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic}.relative-path-section[_ngcontent-%COMP%]{display:flex;margin-top:6px;font-size:1.2rem;color:var(--df-text-muted)}.relative-path-label[_ngcontent-%COMP%]{font-weight:600;margin-right:8px}.relative-path-value[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace}"]})}};Je=(0,ie.Cg)([(0,X.d)({checkProperties:!0})],Je);var Ge=_(52868),Y=_(86600);const Qn=["fileSelector"];function Wn(n,a){if(1&n&&(e.j41(0,"mat-label"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.schema.label)}}function Zn(n,a){if(1&n&&e.nrm(0,"input",8),2&n){const t=e.XpG(2);e.Y8G("formControl",t.control)("type","integer"===t.schema.type?"number":"password"===t.schema.type?"password":"text"),e.BMQ("autocomplete","password"===t.schema.type?"current-password":"off")("aria-label",t.schema.label)}}function eo(n,a){if(1&n&&(e.j41(0,"mat-option",11),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label," ")}}function to(n,a){if(1&n&&(e.j41(0,"mat-select",9),e.DNE(1,eo,2,2,"mat-option",10),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("multiple","multi_picklist"===t.schema.type)("formControl",t.control),e.R7$(1),e.Y8G("ngForOf",t.schema.values)("ngForTrackBy",t.trackByOptionName)}}function no(n,a){if(1&n&&e.nrm(0,"fa-icon",12),2&n){const t=e.XpG(2);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}const oo=function(){return["integer","string","password","text"]},io=function(){return["picklist","multi_picklist"]};function ao(n,a){if(1&n&&(e.j41(0,"mat-form-field",4),e.DNE(1,Wn,2,1,"mat-label",1),e.DNE(2,Zn,1,4,"input",5),e.DNE(3,to,2,4,"mat-select",6),e.DNE(4,no,1,2,"fa-icon",7),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.showLabel),e.R7$(1),e.Y8G("ngIf",e.lJ4(4,oo).includes(t.schema.type)),e.R7$(1),e.Y8G("ngIf",e.lJ4(5,io).includes(t.schema.type)),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}const co=function(){return[".p8",".pem",".key"]};function ro(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"df-file-selector",13,14),e.bIt("fileSelected",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.onFileSelected(i))}),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(1),e.Y8G("label",t.schema.label)("description",t.schema.description||"")("allowedExtensions",e.lJ4(4,co))("initialValue",t.control.value)}}function so(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"input",15,16),e.bIt("change",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.handleFileInput(i))}),e.k0s(),e.j41(3,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.sdS(2);return e.Njj(i.click())}),e.EFF(4),e.k0s(),e.EFF(5),e.nI1(6,"transloco"),e.bVm()}if(2&n){const t=e.XpG();let o;e.R7$(3),e.Y8G("matTooltip",null!==(o=t.schema.description)&&void 0!==o?o:""),e.R7$(1),e.SpI(" ",t.schema.label," "),e.R7$(1),e.SpI(" ",t.control.value?t.control.value.name:e.bMT(6,3,"noFileSelected")," ")}}function lo(n,a){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(t.schema.label)}}function po(n,a){if(1&n&&(e.j41(0,"mat-slide-toggle",18),e.DNE(1,lo,3,1,"ng-container",1),e.k0s()),2&n){const t=e.XpG();let o;e.Y8G("formControl",t.control)("matTooltip",null!==(o=t.schema.description)&&void 0!==o?o:""),e.BMQ("aria-label",t.schema.label),e.R7$(1),e.Y8G("ngIf",t.showLabel)}}function mo(n,a){if(1&n&&(e.j41(0,"mat-label"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.schema.label)}}function _o(n,a){if(1&n&&(e.j41(0,"mat-option",11),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function go(n,a){if(1&n&&(e.j41(0,"mat-form-field",19),e.DNE(1,mo,2,1,"mat-label",1),e.nrm(2,"input",20),e.j41(3,"mat-autocomplete",null,21),e.DNE(5,_o,2,2,"mat-option",10),e.nI1(6,"async"),e.k0s()()),2&n){const t=e.sdS(4),o=e.XpG();e.R7$(1),e.Y8G("ngIf",o.showLabel),e.R7$(1),e.Y8G("formControl",o.control)("matAutocomplete",t),e.BMQ("aria-label",o.schema.label),e.R7$(3),e.Y8G("ngForOf",e.bMT(6,6,o.filteredEventList))("ngForTrackBy",o.trackByValue)}}const fo=function(){return["integer","password","string","string","picklist","multi_picklist","text"]};let je=class kt{constructor(a,t,o){this.controlDir=a,this.activedRoute=t,this.themeService=o,this.showLabel=!0,this.faCircleInfo=f.mEO,this.control=new d.MJ,this.pendingFilePath=null,this.eventList=[],this.isDarkMode=this.themeService.darkMode$,a.valueAccessor=this}trackByOptionName(a,t){return t.name}trackByValue(a,t){return t}ngOnInit(){"event_picklist"===this.schema.type&&(this.activedRoute.data.subscribe(a=>{a.systemEvents&&a.systemEvents.resource&&(this.eventList=(0,hn.$)(a.systemEvents.resource))}),this.filteredEventList=this.control.valueChanges.pipe((0,we.Z)(""),(0,K.T)(a=>a&&this.eventList?this.eventList.filter(t=>t.toLowerCase().includes(a.toLowerCase())):[])))}ngDoCheck(){this.controlDir.control instanceof d.MJ&&this.controlDir.control.hasValidator(d.k0.required)&&this.control.addValidators(d.k0.required)}ngAfterViewInit(){"file_certificate_api"===this.schema?.type&&this.fileSelector&&(this.pendingFilePath?(console.log("Applying pending file path after view init:",this.pendingFilePath),this.fileSelector.setPath(this.pendingFilePath),this.pendingFilePath=null):this.control.value&&"string"==typeof this.control.value&&(console.log("Setting file selector path after view init:",this.control.value),this.fileSelector.setPath(this.control.value)))}handleFileInput(a){const t=a.target;t.files&&this.control.setValue(t.files[0])}onFileSelected(a){a?(this.control.setValue(a.path),console.log("File selected in dynamic field:",a)):this.control.setValue(null)}writeValue(a){if(console.log("Dynamic field writeValue:",a,"Schema type:",this.schema?.type),"file_certificate_api"===this.schema?.type&&"string"==typeof a&&a)return console.log("Setting file path value:",a),this.control.setValue(a,{emitEvent:!1}),void(this.fileSelector?(console.log("Setting path on file selector:",a),this.fileSelector.setPath(a)):(console.log("File selector not yet available, storing pending path:",a),this.pendingFilePath=a));this.control.setValue(a,{emitEvent:!1})}registerOnChange(a){this.onChange=a,this.control.valueChanges.subscribe(t=>this.onChange(t))}registerOnTouched(a){this.onTouched=a}setDisabledState(a){a?this.control.disable():this.control.enable()}static{this.\u0275fac=function(t){return new(t||kt)(e.rXU(d.vO,10),e.rXU(G.nX),e.rXU(Ge.n))}}static{this.\u0275cmp=e.VBU({type:kt,selectors:[["df-dynamic-field"]],viewQuery:function(t,o){if(1&t&&e.GBs(Qn,5),2&t){let i;e.mGM(i=e.lsd())&&(o.fileSelector=i.first)}},inputs:{schema:"schema",showLabel:"showLabel"},standalone:!0,features:[e.aNF],decls:6,vars:6,consts:[["subscriptSizing","dynamic","appearance","outline",4,"ngIf"],[4,"ngIf"],["color","primary",3,"formControl","matTooltip",4,"ngIf"],["subscriptSizing","dynamic",4,"ngIf"],["subscriptSizing","dynamic","appearance","outline"],["matInput","",3,"formControl","type",4,"ngIf"],[3,"multiple","formControl",4,"ngIf"],["class","tool-tip-trigger","matSuffix","",3,"icon","matTooltip",4,"ngIf"],["matInput","",3,"formControl","type"],[3,"multiple","formControl"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[3,"label","description","allowedExtensions","initialValue","fileSelected"],["fileSelector",""],["type","file",2,"display","none",3,"change"],["fileInput",""],["mat-flat-button","","color","primary",3,"matTooltip","click"],["color","primary",3,"formControl","matTooltip"],["subscriptSizing","dynamic"],["type","text","matInput","",3,"formControl","matAutocomplete"],["auto","matAutocomplete"]],template:function(t,o){1&t&&(e.j41(0,"div"),e.DNE(1,ao,5,6,"mat-form-field",0),e.DNE(2,ro,3,5,"ng-container",1),e.DNE(3,so,7,5,"ng-container",1),e.DNE(4,po,2,4,"mat-slide-toggle",2),e.DNE(5,go,7,8,"mat-form-field",3),e.k0s()),2&t&&(e.R7$(1),e.Y8G("ngIf",e.lJ4(5,fo).includes(o.schema.type)),e.R7$(1),e.Y8G("ngIf","file_certificate_api"===o.schema.type),e.R7$(1),e.Y8G("ngIf","file_certificate"===o.schema.type),e.R7$(1),e.Y8G("ngIf","boolean"===o.schema.type),e.R7$(1),e.Y8G("ngIf","event_picklist"===o.schema.type))},dependencies:[y.RG,y.rl,y.nJ,y.yw,E.fS,E.fg,m.bT,I.Ve,I.VO,Y.wT,ae.mV,ae.sG,d.X1,d.me,d.BC,d.l_,m.pM,u.Hl,u.$z,$.Kj,w.dX,w.aY,R.uc,R.oV,Be.jL,Be.$3,Be.pN,m.Jj,Je],encapsulation:2})}};je=(0,ie.Cg)([(0,X.d)({checkProperties:!0})],je);var qe,he=_(25596),uo=_(9709);function ho(n,a){if(1&n&&e.nrm(0,"fa-icon",10),2&n){const t=e.XpG(2);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}function bo(n,a){if(1&n&&(e.j41(0,"mat-card-header"),e.EFF(1),e.DNE(2,ho,1,2,"fa-icon",9),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.schema.label),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}function vo(n,a){if(1&n&&e.nrm(0,"fa-icon",10),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}function Co(n,a){if(1&n&&(e.j41(0,"th",12),e.EFF(1),e.DNE(2,vo,1,2,"fa-icon",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.schema.label,""),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}function xo(n,a){if(1&n&&(e.j41(0,"td",13)(1,"mat-form-field",14),e.nrm(2,"input",15),e.k0s()()),2&n){const t=a.index,o=e.XpG(2);e.R7$(2),e.Y8G("formControl",o.controls[t]),e.BMQ("aria-label",o.schema.label)}}function ko(n,a){if(1&n&&(e.qex(0,11),e.DNE(1,Co,3,2,"th",5),e.DNE(2,xo,3,2,"td",6),e.bVm()),2&n){const t=e.XpG();e.Y8G("matColumnDef",t.schema.name)}}function yo(n,a){if(1&n&&(e.j41(0,"th",12),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t.label," ")}}function Mo(n,a){if(1&n&&e.nrm(0,"df-verb-picker",20),2&n){const t=e.XpG(2).$implicit;e.Y8G("formControlName",t.name)("schema",t)}}function Oo(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",21),2&n){const t=e.XpG(2).$implicit;e.Y8G("showLabel",!1)("schema",t)("formControlName",t.name)}}function Po(n,a){if(1&n&&(e.j41(0,"td",13),e.qex(1,17),e.DNE(2,Mo,1,2,"df-verb-picker",18),e.DNE(3,Oo,1,3,"df-dynamic-field",19),e.bVm(),e.k0s()),2&n){const t=a.index,o=e.XpG().$implicit,i=e.XpG(2);e.R7$(1),e.Y8G("formGroup",i.getFormGroup(t)),e.R7$(1),e.Y8G("ngIf","verb_mask"===o.type),e.R7$(1),e.Y8G("ngIf","verb_mask"!==o.type)}}function Fo(n,a){1&n&&(e.qex(0,11),e.DNE(1,yo,2,1,"th",5),e.DNE(2,Po,4,3,"td",6),e.bVm()),2&n&&e.Y8G("matColumnDef",a.$implicit.name)}function wo(n,a){if(1&n&&e.DNE(0,Fo,3,1,"ng-container",16),2&n){const t=e.XpG();e.Y8G("ngForOf",t.schemas)}}function Do(n,a){if(1&n){const t=e.RV6();e.j41(0,"th",12)(1,"button",22),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.add())}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",23),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(1),e.BMQ("aria-label",e.bMT(2,2,"newEntry")),e.R7$(2),e.Y8G("icon",t.faPlus)}}const To=function(n){return{id:n}};function So(n,a){if(1&n){const t=e.RV6();e.j41(0,"td",13)(1,"button",24),e.bIt("click",function(){const c=e.eBV(t).index,r=e.XpG();return e.Njj(r.remove(c))}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",23),e.k0s()()}if(2&n){const t=a.index,o=e.XpG();e.R7$(1),e.BMQ("aria-label",e.i5U(2,2,"deleteRow",e.eq3(5,To,t))),e.R7$(2),e.Y8G("icon",o.faTrashCan)}}function Ro(n,a){1&n&&e.nrm(0,"tr",25)}function Io(n,a){1&n&&e.nrm(0,"tr",26)}let Ke=class yt{static{qe=this}updateDataSource(){this.dataSource=new F.I6(this.fieldArray.controls)}constructor(a,t){this.fb=a,this.themeService=t,this.faPlus=f.QLR,this.faTrashCan=f.sjs,this.faCircleInfo=f.mEO,this.isDarkMode=this.themeService.darkMode$,this._displayedColumns=[]}get controls(){return this.fieldArray.controls}ngOnInit(){this.fieldArray||this.initialize()}get schemas(){return"array"===this.schema.type?this.schema.items:[{name:"key",label:this.schema.object?.key.label,type:this.schema.object?.key.type},{name:"value",label:this.schema.object?.value.label,type:this.schema.object?.value.type}]}get displayedColumns(){if(this._displayedColumnsSchema!==this.schema){this._displayedColumnsSchema=this.schema;const a="array"===this.schema.type?"string"===this.schema.items?[this.schema.name]:this.schemas.map(t=>t.name):["key","value"];a.push("actions"),this._displayedColumns=a}return this._displayedColumns}getFormGroup(a){return this.fieldArray.at(a)}createGroup(a){const t=this.fb.group({});return this.schemas.forEach(o=>{t.addControl(o.name,new d.MJ(a?a[o.name]:o.default))}),a&&t.patchValue(a),t}initialize(){this.fieldArray=this.fb.array([]),this.updateDataSource()}writeValue(a){this.fieldArray||this.initialize(),this.fieldArray.clear({emitEvent:!1}),a&&Array.isArray(a)&&"array"===this.schema.type?a.forEach(t=>this.fieldArray.push("string"===this.schema.items?new d.MJ(t):this.createGroup(t),{emitEvent:!1})):a&&"object"===this.schema.type&&Object.keys(a).forEach(t=>this.fieldArray.push(this.createGroup({key:t,value:a[t]}),{emitEvent:!1})),this.updateDataSource()}registerOnChange(a){this.onChange=a,this.fieldArray.valueChanges.pipe((0,K.T)(t=>"object"===this.schema.type?t.reduce((o,i)=>(o[i.key]=i.value,o),{}):t)).subscribe(t=>{this.onChange(t),this.updateDataSource()})}registerOnTouched(a){this.onTouched=a}setDisabledState(a){a?this.fieldArray.disable():this.fieldArray.enable()}add(){this.fieldArray.push("string"===this.schema.items?new d.MJ(""):this.createGroup())}remove(a){this.fieldArray.removeAt(a)}static{this.\u0275fac=function(t){return new(t||yt)(e.rXU(d.ok),e.rXU(Ge.n))}}static{this.\u0275cmp=e.VBU({type:yt,selectors:[["df-array-field"]],inputs:{schema:"schema"},standalone:!0,features:[e.Jv_([{provide:d.kq,useExisting:(0,e.Rfq)(()=>qe),multi:!0}]),e.aNF],decls:11,vars:6,consts:[[4,"ngIf"],["mat-table","",3,"dataSource"],[3,"matColumnDef",4,"ngIf","ngIfElse"],["dynamic",""],["matColumnDef","actions","stickyEnd",""],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","tool-tip-trigger","matSuffix","",3,"icon","matTooltip",4,"ngIf"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[3,"matColumnDef"],["mat-header-cell",""],["mat-cell",""],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["matInput","","type","text",3,"formControl"],[3,"matColumnDef",4,"ngFor","ngForOf"],[3,"formGroup"],["type","number","class","full-width",3,"formControlName","schema",4,"ngIf"],["class","full-width",3,"showLabel","schema","formControlName",4,"ngIf"],["type","number",1,"full-width",3,"formControlName","schema"],[1,"full-width",3,"showLabel","schema","formControlName"],["type","button","mat-mini-fab","","color","primary",3,"click"],["size","lg",3,"icon"],["type","button","mat-mini-fab","",1,"remove-btn",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,o){if(1&t&&(e.j41(0,"mat-card"),e.DNE(1,bo,3,2,"mat-card-header",0),e.j41(2,"table",1),e.DNE(3,ko,3,1,"ng-container",2),e.DNE(4,wo,1,1,"ng-template",null,3,e.C5r),e.qex(6,4),e.DNE(7,Do,4,4,"th",5),e.DNE(8,So,4,7,"td",6),e.bVm(),e.DNE(9,Ro,1,0,"tr",7),e.DNE(10,Io,1,0,"tr",8),e.k0s()()),2&t){const i=e.sdS(5);e.R7$(1),e.Y8G("ngIf","string"!==o.schema.items),e.R7$(1),e.Y8G("dataSource",o.dataSource),e.R7$(1),e.Y8G("ngIf","string"===o.schema.items)("ngIfElse",i),e.R7$(6),e.Y8G("matHeaderRowDef",o.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",o.displayedColumns)}},dependencies:[d.X1,d.me,d.BC,d.cb,d.l_,d.j4,d.JD,m.pM,y.RG,y.rl,y.yw,E.fS,E.fg,u.Hl,u.$0,w.dX,w.aY,je,m.bT,F.tP,F.Zl,F.tL,F.ji,F.cC,F.YV,F.iL,F.KS,F.$R,F.YZ,F.NB,he.Hu,he.RN,he.MM,R.uc,R.oV,$.Kj,uo.N,I.Ve],styles:[".mat-ripple[_ngcontent-%COMP%]{overflow:hidden;position:relative}.mat-ripple[_ngcontent-%COMP%]:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded[_ngcontent-%COMP%]{overflow:visible}.mat-ripple-element[_ngcontent-%COMP%]{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%]{display:none}.cdk-visually-hidden[_ngcontent-%COMP%]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl][_ngcontent-%COMP%] .cdk-visually-hidden[_ngcontent-%COMP%]{left:auto;right:0}.cdk-overlay-container[_ngcontent-%COMP%], .cdk-global-overlay-wrapper[_ngcontent-%COMP%]{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container[_ngcontent-%COMP%]{position:fixed;z-index:1000}.cdk-overlay-container[_ngcontent-%COMP%]:empty{display:none}.cdk-global-overlay-wrapper[_ngcontent-%COMP%]{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:1}.cdk-high-contrast-active[_ngcontent-%COMP%] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:.6}.cdk-overlay-dark-backdrop[_ngcontent-%COMP%]{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop[_ngcontent-%COMP%]{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation[_ngcontent-%COMP%]{transition:none}.cdk-overlay-connected-position-bounding-box[_ngcontent-%COMP%]{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock[_ngcontent-%COMP%]{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize[_ngcontent-%COMP%]{resize:none}textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox[_ngcontent-%COMP%]{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes _ngcontent-%COMP%_cdk-text-field-autofill-start{}@keyframes _ngcontent-%COMP%_cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored[_ngcontent-%COMP%]:-webkit-autofill{animation:_ngcontent-%COMP%_cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored[_ngcontent-%COMP%]:not(:-webkit-autofill){animation:_ngcontent-%COMP%_cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator[_ngcontent-%COMP%]{position:relative}.mat-focus-indicator[_ngcontent-%COMP%]:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator[_ngcontent-%COMP%]:focus:before{content:\"\"}.cdk-high-contrast-active[_ngcontent-%COMP%]{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator[_ngcontent-%COMP%]{position:relative}.mat-mdc-focus-indicator[_ngcontent-%COMP%]:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator[_ngcontent-%COMP%]:focus:before{content:\"\"}.cdk-high-contrast-active[_ngcontent-%COMP%]{--mat-mdc-focus-indicator-display: block}@font-face{font-family:Inter;src:url(Inter-VariableFont_slnt,wght.1cccc37b0c8d2802.ttf)}.mat-ripple-element[_ngcontent-%COMP%]{background-color:#0000001a}html[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #0f0761;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-accent[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #dd7345}.mat-warn[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #f44336}html[_ngcontent-%COMP%]{--mat-optgroup-label-text-color: rgba(0, 0, 0, .87)}.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{color:#0000008a}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled[_ngcontent-%COMP%]{color:#b0b0b0}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#0f0761}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#0f0761}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#dd7345}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#dd7345}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#dd7345}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#dd7345}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#f44336}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#f44336}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#b0b0b0}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#b0b0b0}.mat-app-background[_ngcontent-%COMP%]{background-color:#fafafa;color:#000000de}.mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-theme-loaded-marker[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-option-label-text-font: Inter;--mat-option-label-text-line-height: 19px;--mat-option-label-text-size: 13px;--mat-option-label-text-tracking: normal;--mat-option-label-text-weight: 400}html[_ngcontent-%COMP%]{--mat-optgroup-label-text-font: Inter;--mat-optgroup-label-text-line-height: 19px;--mat-optgroup-label-text-size: 13px;--mat-optgroup-label-text-tracking: normal;--mat-optgroup-label-text-weight: 400}.mat-mdc-card[_ngcontent-%COMP%]{--mdc-elevated-card-container-color: white;--mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-outlined-card-container-color: white;--mdc-outlined-card-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-card-subtitle-text-color: rgba(0, 0, 0, .54)}.mat-mdc-card[_ngcontent-%COMP%]{--mat-card-title-text-font: Inter;--mat-card-title-text-line-height: 21px;--mat-card-title-text-size: 16px;--mat-card-title-text-tracking: normal;--mat-card-title-text-weight: 600;--mat-card-subtitle-text-font: Inter;--mat-card-subtitle-text-line-height: 19px;--mat-card-subtitle-text-size: 13px;--mat-card-subtitle-text-tracking: normal;--mat-card-subtitle-text-weight: 500}.mat-mdc-progress-bar[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #0f0761;--mdc-linear-progress-track-color: rgba(15, 7, 97, .25)}.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#0f076140;background-color:var(--mdc-linear-progress-track-color, rgba(15, 7, 97, .25))}@media (forced-colors: active){.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(15, 7, 97, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#0f076140;background-color:var(--mdc-linear-progress-track-color, rgba(15, 7, 97, .25))}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #dd7345;--mdc-linear-progress-track-color: rgba(221, 115, 69, .25)}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#dd734540;background-color:var(--mdc-linear-progress-track-color, rgba(221, 115, 69, .25))}@media (forced-colors: active){.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(221, 115, 69, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#dd734540;background-color:var(--mdc-linear-progress-track-color, rgba(221, 115, 69, .25))}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #f44336;--mdc-linear-progress-track-color: rgba(244, 67, 54, .25)}@keyframes _ngcontent-%COMP%_mdc-linear-progress-buffering{}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#f4433640;background-color:var(--mdc-linear-progress-track-color, rgba(244, 67, 54, .25))}@media (forced-colors: active){.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(244, 67, 54, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#f4433640;background-color:var(--mdc-linear-progress-track-color, rgba(244, 67, 54, .25))}.mat-mdc-tooltip[_ngcontent-%COMP%]{--mdc-plain-tooltip-container-color: #616161;--mdc-plain-tooltip-supporting-text-color: #fff}.mat-mdc-tooltip[_ngcontent-%COMP%]{--mdc-plain-tooltip-supporting-text-font: Inter;--mdc-plain-tooltip-supporting-text-size: 12px;--mdc-plain-tooltip-supporting-text-weight: 400;--mdc-plain-tooltip-supporting-text-tracking: normal}html[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #0f0761;--mdc-filled-text-field-focus-active-indicator-color: #0f0761;--mdc-filled-text-field-focus-label-text-color: rgba(15, 7, 97, .87);--mdc-filled-text-field-container-color: whitesmoke;--mdc-filled-text-field-disabled-container-color: #fafafa;--mdc-filled-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-error-focus-label-text-color: #f44336;--mdc-filled-text-field-error-label-text-color: #f44336;--mdc-filled-text-field-error-caret-color: #f44336;--mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color: #f44336;--mdc-filled-text-field-error-focus-active-indicator-color: #f44336;--mdc-filled-text-field-error-hover-active-indicator-color: #f44336;--mdc-outlined-text-field-caret-color: #0f0761;--mdc-outlined-text-field-focus-outline-color: #0f0761;--mdc-outlined-text-field-focus-label-text-color: rgba(15, 7, 97, .87);--mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-error-caret-color: #f44336;--mdc-outlined-text-field-error-focus-label-text-color: #f44336;--mdc-outlined-text-field-error-label-text-color: #f44336;--mdc-outlined-text-field-outline-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, .06);--mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-error-focus-outline-color: #f44336;--mdc-outlined-text-field-error-hover-outline-color: #f44336;--mdc-outlined-text-field-error-outline-color: #f44336;--mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, .38)}.mat-mdc-form-field-error[_ngcontent-%COMP%]{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field-subscript-wrapper[_ngcontent-%COMP%], .mat-mdc-form-field-bottom-align[_ngcontent-%COMP%]:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{background-color:#000000de}.mat-mdc-form-field[_ngcontent-%COMP%]:hover .mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{opacity:.04}.mat-mdc-form-field.mat-focused[_ngcontent-%COMP%] .mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{opacity:.12}.mat-mdc-form-field-type-mat-native-select[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#0000008a}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-primary[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#0f0761de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-accent[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#dd7345de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-warn[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#f44336de}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#00000061}.mat-mdc-form-field.mat-accent[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #dd7345;--mdc-filled-text-field-focus-active-indicator-color: #dd7345;--mdc-filled-text-field-focus-label-text-color: rgba(221, 115, 69, .87);--mdc-outlined-text-field-caret-color: #dd7345;--mdc-outlined-text-field-focus-outline-color: #dd7345;--mdc-outlined-text-field-focus-label-text-color: rgba(221, 115, 69, .87)}.mat-mdc-form-field.mat-warn[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #f44336;--mdc-filled-text-field-focus-active-indicator-color: #f44336;--mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mdc-outlined-text-field-caret-color: #f44336;--mdc-outlined-text-field-focus-outline-color: #f44336;--mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, .87)}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field[_ngcontent-%COMP%] .mdc-notched-outline__notch[_ngcontent-%COMP%]{border-left:1px solid transparent}[dir=rtl][_ngcontent-%COMP%] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field[_ngcontent-%COMP%] .mdc-notched-outline__notch[_ngcontent-%COMP%]{border-left:none;border-right:1px solid transparent}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{min-height:48px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%] .mat-mdc-form-field-flex[_ngcontent-%COMP%] .mat-mdc-floating-label[_ngcontent-%COMP%]{top:24px}.mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mdc-notched-outline--upgraded[_ngcontent-%COMP%] .mdc-floating-label--float-above[_ngcontent-%COMP%]{--mat-mdc-form-field-label-transform: translateY( -30.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mdc-text-field--no-label[_ngcontent-%COMP%]:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-floating-label[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mdc-filled-text-field-label-text-font: Inter;--mdc-filled-text-field-label-text-size: 13px;--mdc-filled-text-field-label-text-tracking: normal;--mdc-filled-text-field-label-text-weight: 400;--mdc-outlined-text-field-label-text-font: Inter;--mdc-outlined-text-field-label-text-size: 13px;--mdc-outlined-text-field-label-text-tracking: normal;--mdc-outlined-text-field-label-text-weight: 400;--mat-form-field-container-text-font: Inter;--mat-form-field-container-text-line-height: 19px;--mat-form-field-container-text-size: 13px;--mat-form-field-container-text-tracking: normal;--mat-form-field-container-text-weight: 400;--mat-form-field-outlined-label-text-populated-size: 13px;--mat-form-field-subscript-text-font: Inter;--mat-form-field-subscript-text-line-height: 16px;--mat-form-field-subscript-text-size: 12px;--mat-form-field-subscript-text-tracking: normal;--mat-form-field-subscript-text-weight: 400}html[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(15, 7, 97, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html[_ngcontent-%COMP%] .mat-mdc-form-field.mat-accent[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(221, 115, 69, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html[_ngcontent-%COMP%] .mat-mdc-form-field.mat-warn[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(244, 67, 54, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}.mat-form-field-appearance-fill[_ngcontent-%COMP%] .mat-mdc-select-arrow-wrapper[_ngcontent-%COMP%]{transform:none}html[_ngcontent-%COMP%]{--mat-select-trigger-text-font: Inter;--mat-select-trigger-text-line-height: 19px;--mat-select-trigger-text-size: 13px;--mat-select-trigger-text-tracking: normal;--mat-select-trigger-text-weight: 400}html[_ngcontent-%COMP%]{--mat-autocomplete-background-color: white}.mat-mdc-dialog-container[_ngcontent-%COMP%]{--mdc-dialog-container-color: white;--mdc-dialog-subhead-color: rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color: rgba(0, 0, 0, .6)}.mat-mdc-dialog-container[_ngcontent-%COMP%]{--mdc-dialog-subhead-font: Inter;--mdc-dialog-subhead-line-height: 21px;--mdc-dialog-subhead-size: 16px;--mdc-dialog-subhead-weight: 600;--mdc-dialog-subhead-tracking: normal;--mdc-dialog-supporting-text-font: Inter;--mdc-dialog-supporting-text-line-height: 19px;--mdc-dialog-supporting-text-size: 13px;--mdc-dialog-supporting-text-weight: 400;--mdc-dialog-supporting-text-tracking: normal}.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: #212121;--mdc-chip-elevated-container-color: #e0e0e0;--mdc-chip-elevated-disabled-container-color: #e0e0e0;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: #212121;--mdc-chip-with-icon-icon-color: #212121;--mdc-chip-with-icon-disabled-icon-color: #212121;--mdc-chip-with-icon-selected-icon-color: #212121;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: #212121;--mdc-chip-with-trailing-icon-trailing-icon-color: #212121}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-primary[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-primary[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #0f0761;--mdc-chip-elevated-disabled-container-color: #0f0761;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-accent[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-accent[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #dd7345;--mdc-chip-elevated-disabled-container-color: #dd7345;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-warn[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-warn[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #f44336;--mdc-chip-elevated-disabled-container-color: #f44336;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-chip.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-container-height: 24px}.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-label-text-font: Inter;--mdc-chip-label-text-line-height: 19px;--mdc-chip-label-text-size: 13px;--mdc-chip-label-text-tracking: normal;--mdc-chip-label-text-weight: 400}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #5c5699;--mdc-switch-selected-handle-color: #5c5699;--mdc-switch-selected-hover-state-layer-color: #5c5699;--mdc-switch-selected-pressed-state-layer-color: #5c5699;--mdc-switch-selected-focus-handle-color: #0f0761;--mdc-switch-selected-hover-handle-color: #0f0761;--mdc-switch-selected-pressed-handle-color: #0f0761;--mdc-switch-selected-focus-track-color: #aaa8ca;--mdc-switch-selected-hover-track-color: #aaa8ca;--mdc-switch-selected-pressed-track-color: #aaa8ca;--mdc-switch-selected-track-color: #aaa8ca;--mdc-switch-disabled-selected-handle-color: #424242;--mdc-switch-disabled-selected-icon-color: #fff;--mdc-switch-disabled-selected-track-color: #424242;--mdc-switch-disabled-unselected-handle-color: #424242;--mdc-switch-disabled-unselected-icon-color: #fff;--mdc-switch-disabled-unselected-track-color: #424242;--mdc-switch-handle-surface-color: var(--mdc-theme-surface, #fff);--mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-switch-handle-shadow-color: black;--mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-switch-selected-icon-color: #fff;--mdc-switch-unselected-focus-handle-color: #212121;--mdc-switch-unselected-focus-state-layer-color: #424242;--mdc-switch-unselected-focus-track-color: #e0e0e0;--mdc-switch-unselected-handle-color: #616161;--mdc-switch-unselected-hover-handle-color: #212121;--mdc-switch-unselected-hover-state-layer-color: #424242;--mdc-switch-unselected-hover-track-color: #e0e0e0;--mdc-switch-unselected-icon-color: #fff;--mdc-switch-unselected-pressed-handle-color: #212121;--mdc-switch-unselected-pressed-state-layer-color: #424242;--mdc-switch-unselected-pressed-track-color: #e0e0e0;--mdc-switch-unselected-track-color: #e0e0e0}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-switch--disabled[_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{color:#00000061}.mat-mdc-slide-toggle.mat-accent[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #914b2d;--mdc-switch-selected-handle-color: #914b2d;--mdc-switch-selected-hover-state-layer-color: #914b2d;--mdc-switch-selected-pressed-state-layer-color: #914b2d;--mdc-switch-selected-focus-handle-color: #2b160d;--mdc-switch-selected-hover-handle-color: #2b160d;--mdc-switch-selected-pressed-handle-color: #2b160d;--mdc-switch-selected-focus-track-color: #ff8c5a;--mdc-switch-selected-hover-track-color: #ff8c5a;--mdc-switch-selected-pressed-track-color: #ff8c5a;--mdc-switch-selected-track-color: #ff8c5a}.mat-mdc-slide-toggle.mat-warn[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #e53935;--mdc-switch-selected-handle-color: #e53935;--mdc-switch-selected-hover-state-layer-color: #e53935;--mdc-switch-selected-pressed-state-layer-color: #e53935;--mdc-switch-selected-focus-handle-color: #b71c1c;--mdc-switch-selected-hover-handle-color: #b71c1c;--mdc-switch-selected-pressed-handle-color: #b71c1c;--mdc-switch-selected-focus-track-color: #e57373;--mdc-switch-selected-hover-track-color: #e57373;--mdc-switch-selected-pressed-track-color: #e57373;--mdc-switch-selected-track-color: #e57373}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mdc-switch-state-layer-size: 40px}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mat-slide-toggle-label-text-font: Inter;--mat-slide-toggle-label-text-size: 13px;--mat-slide-toggle-label-text-tracking: normal;--mat-slide-toggle-label-text-line-height: 19px;--mat-slide-toggle-label-text-weight: 400}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit)}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-radio-button.mat-primary[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0f0761;--mdc-radio-selected-hover-icon-color: #0f0761;--mdc-radio-selected-icon-color: #0f0761;--mdc-radio-selected-pressed-icon-color: #0f0761;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #0f0761;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-accent[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #dd7345;--mdc-radio-selected-hover-icon-color: #dd7345;--mdc-radio-selected-icon-color: #dd7345;--mdc-radio-selected-pressed-icon-color: #dd7345;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #dd7345;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-warn[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #f44336;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 32px}.mat-mdc-radio-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-body2-font-size, 13px);line-height:var(--mdc-typography-body2-line-height, 19px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-slider[_ngcontent-%COMP%]{--mdc-slider-label-container-color: black;--mdc-slider-label-label-text-color: white;--mdc-slider-disabled-handle-color: #000;--mdc-slider-disabled-active-track-color: #000;--mdc-slider-disabled-inactive-track-color: #000;--mdc-slider-with-tick-marks-disabled-container-color: #000;--mat-mdc-slider-value-indicator-opacity: .6}.mat-mdc-slider.mat-primary[_ngcontent-%COMP%]{--mdc-slider-handle-color: #0f0761;--mdc-slider-focus-handle-color: #0f0761;--mdc-slider-hover-handle-color: #0f0761;--mdc-slider-active-track-color: #0f0761;--mdc-slider-inactive-track-color: #0f0761;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #0f0761;--mat-mdc-slider-ripple-color: #0f0761;--mat-mdc-slider-hover-ripple-color: rgba(15, 7, 97, .05);--mat-mdc-slider-focus-ripple-color: rgba(15, 7, 97, .2)}.mat-mdc-slider.mat-accent[_ngcontent-%COMP%]{--mdc-slider-handle-color: #dd7345;--mdc-slider-focus-handle-color: #dd7345;--mdc-slider-hover-handle-color: #dd7345;--mdc-slider-active-track-color: #dd7345;--mdc-slider-inactive-track-color: #dd7345;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #dd7345;--mat-mdc-slider-ripple-color: #dd7345;--mat-mdc-slider-hover-ripple-color: rgba(221, 115, 69, .05);--mat-mdc-slider-focus-ripple-color: rgba(221, 115, 69, .2)}.mat-mdc-slider.mat-warn[_ngcontent-%COMP%]{--mdc-slider-handle-color: #f44336;--mdc-slider-focus-handle-color: #f44336;--mdc-slider-hover-handle-color: #f44336;--mdc-slider-active-track-color: #f44336;--mdc-slider-inactive-track-color: #f44336;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #f44336;--mat-mdc-slider-ripple-color: #f44336;--mat-mdc-slider-hover-ripple-color: rgba(244, 67, 54, .05);--mat-mdc-slider-focus-ripple-color: rgba(244, 67, 54, .2)}.mat-mdc-slider[_ngcontent-%COMP%]{--mdc-slider-label-label-text-font: Inter;--mdc-slider-label-label-text-size: 13px;--mdc-slider-label-label-text-line-height: 19px;--mdc-slider-label-label-text-tracking: normal;--mdc-slider-label-label-text-weight: 500}html[_ngcontent-%COMP%]{--mat-menu-item-label-text-color: rgba(0, 0, 0, .87);--mat-menu-item-icon-color: rgba(0, 0, 0, .87);--mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-container-color: white}html[_ngcontent-%COMP%]{--mat-menu-item-label-text-font: Inter;--mat-menu-item-label-text-size: 13px;--mat-menu-item-label-text-tracking: normal;--mat-menu-item-label-text-line-height: 19px;--mat-menu-item-label-text-weight: 400}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color: black;--mdc-list-list-item-disabled-leading-icon-color: black;--mdc-list-list-item-disabled-trailing-icon-color: black;--mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color: black;--mdc-list-list-item-hover-state-layer-opacity: .04;--mdc-list-list-item-focus-state-layer-color: black;--mdc-list-list-item-focus-state-layer-opacity: .12}.mdc-list-item__start[_ngcontent-%COMP%], .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0f0761;--mdc-radio-selected-hover-icon-color: #0f0761;--mdc-radio-selected-icon-color: #0f0761;--mdc-radio-selected-pressed-icon-color: #0f0761}.mat-accent[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-accent[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #dd7345;--mdc-radio-selected-hover-icon-color: #dd7345;--mdc-radio-selected-icon-color: #dd7345;--mdc-radio-selected-pressed-icon-color: #dd7345}.mat-warn[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-warn[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-list-option[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #0f0761;--mdc-checkbox-selected-hover-icon-color: #0f0761;--mdc-checkbox-selected-icon-color: #0f0761;--mdc-checkbox-selected-pressed-icon-color: #0f0761;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0f0761;--mdc-checkbox-selected-hover-state-layer-color: #0f0761;--mdc-checkbox-selected-pressed-state-layer-color: #0f0761;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-accent[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #dd7345;--mdc-checkbox-selected-hover-icon-color: #dd7345;--mdc-checkbox-selected-icon-color: #dd7345;--mdc-checkbox-selected-pressed-icon-color: #dd7345;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #dd7345;--mdc-checkbox-selected-hover-state-layer-color: #dd7345;--mdc-checkbox-selected-pressed-state-layer-color: #dd7345;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-warn[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--selected[_ngcontent-%COMP%] .mdc-list-item__primary-text[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--activated[_ngcontent-%COMP%] .mdc-list-item__primary-text[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--selected.mdc-list-item--with-leading-icon[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--activated.mdc-list-item--with-leading-icon[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%]{color:#0f0761}.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__content[_ngcontent-%COMP%], .mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{opacity:1}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-one-line-container-height: 40px;--mdc-list-list-item-two-line-container-height: 56px;--mdc-list-list-item-three-line-container-height: 80px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line[_ngcontent-%COMP%]{height:48px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines[_ngcontent-%COMP%]{height:64px}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-label-text-font: Inter;--mdc-list-list-item-label-text-line-height: 19px;--mdc-list-list-item-label-text-size: 13px;--mdc-list-list-item-label-text-tracking: normal;--mdc-list-list-item-label-text-weight: 400;--mdc-list-list-item-supporting-text-font: Inter;--mdc-list-list-item-supporting-text-line-height: 19px;--mdc-list-list-item-supporting-text-size: 13px;--mdc-list-list-item-supporting-text-tracking: normal;--mdc-list-list-item-supporting-text-weight: 400;--mdc-list-list-item-trailing-supporting-text-font: Inter;--mdc-list-list-item-trailing-supporting-text-line-height: 16px;--mdc-list-list-item-trailing-supporting-text-size: 12px;--mdc-list-list-item-trailing-supporting-text-tracking: normal;--mdc-list-list-item-trailing-supporting-text-weight: 400}.mdc-list-group__subheader[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:22px;font-family:Inter;letter-spacing:normal}html[_ngcontent-%COMP%]{--mat-paginator-container-text-color: rgba(0, 0, 0, .87);--mat-paginator-container-background-color: white;--mat-paginator-enabled-icon-color: rgba(0, 0, 0, .54);--mat-paginator-disabled-icon-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-paginator-container-size: 48px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{min-height:40px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%] .mat-mdc-form-field-flex[_ngcontent-%COMP%] .mat-mdc-floating-label[_ngcontent-%COMP%]{top:20px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mdc-notched-outline--upgraded[_ngcontent-%COMP%] .mdc-floating-label--float-above[_ngcontent-%COMP%]{--mat-mdc-form-field-label-transform: translateY( -26.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mdc-text-field--no-label[_ngcontent-%COMP%]:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-floating-label[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-paginator-container-text-font: Inter;--mat-paginator-container-text-line-height: 16px;--mat-paginator-container-text-size: 12px;--mat-paginator-container-text-tracking: normal;--mat-paginator-container-text-weight: 400;--mat-paginator-select-trigger-text-size: 12px}.mat-mdc-tab-group[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #0f0761;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #0f0761;--mat-tab-header-active-ripple-color: #0f0761;--mat-tab-header-inactive-ripple-color: #0f0761;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #0f0761;--mat-tab-header-active-hover-label-text-color: #0f0761;--mat-tab-header-active-focus-indicator-color: #0f0761;--mat-tab-header-active-hover-indicator-color: #0f0761}.mat-mdc-tab-group.mat-accent[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-accent[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #dd7345;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #dd7345;--mat-tab-header-active-ripple-color: #dd7345;--mat-tab-header-inactive-ripple-color: #dd7345;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #dd7345;--mat-tab-header-active-hover-label-text-color: #dd7345;--mat-tab-header-active-focus-indicator-color: #dd7345;--mat-tab-header-active-hover-indicator-color: #dd7345}.mat-mdc-tab-group.mat-warn[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-warn[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #f44336;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #f44336;--mat-tab-header-active-ripple-color: #f44336;--mat-tab-header-inactive-ripple-color: #f44336;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #f44336;--mat-tab-header-active-hover-label-text-color: #f44336;--mat-tab-header-active-focus-indicator-color: #f44336;--mat-tab-header-active-hover-indicator-color: #f44336}.mat-mdc-tab-group.mat-background-primary[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-primary[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #0f0761;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-accent[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-accent[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #dd7345;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-warn[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-warn[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #f44336;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-header[_ngcontent-%COMP%]{--mdc-secondary-navigation-tab-container-height: 40px}.mat-mdc-tab-header[_ngcontent-%COMP%]{--mat-tab-header-label-text-font: Inter;--mat-tab-header-label-text-size: 13px;--mat-tab-header-label-text-tracking: normal;--mat-tab-header-label-text-line-height: 19px;--mat-tab-header-label-text-weight: 500}html[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #dd7345;--mdc-checkbox-selected-hover-icon-color: #dd7345;--mdc-checkbox-selected-icon-color: #dd7345;--mdc-checkbox-selected-pressed-icon-color: #dd7345;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #dd7345;--mdc-checkbox-selected-hover-state-layer-color: #dd7345;--mdc-checkbox-selected-pressed-state-layer-color: #dd7345;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-primary[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #0f0761;--mdc-checkbox-selected-hover-icon-color: #0f0761;--mdc-checkbox-selected-icon-color: #0f0761;--mdc-checkbox-selected-pressed-icon-color: #0f0761;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0f0761;--mdc-checkbox-selected-hover-state-layer-color: #0f0761;--mdc-checkbox-selected-pressed-state-layer-color: #0f0761;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-warn[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#00000061}html[_ngcontent-%COMP%]{--mdc-checkbox-state-layer-size: 32px}.mat-mdc-checkbox-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-checkbox[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-body2-font-size, 13px);line-height:var(--mdc-typography-body2-line-height, 19px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #000}.mat-mdc-button.mat-primary[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #0f0761}.mat-mdc-button.mat-accent[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #dd7345}.mat-mdc-button.mat-warn[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #f44336}.mat-mdc-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-text-button-label-text-color: rgba(0, 0, 0, .38)}.mat-mdc-unelevated-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #fff;--mdc-filled-button-label-text-color: #000}.mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #0f0761;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button.mat-accent[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #dd7345;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button.mat-warn[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-filled-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-button-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-label-text-color: rgba(0, 0, 0, .38)}.mat-mdc-raised-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #fff;--mdc-protected-button-label-text-color: #000}.mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #0f0761;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button.mat-accent[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #dd7345;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button.mat-warn[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #f44336;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-protected-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-elevation: 0}.mat-mdc-outlined-button[_ngcontent-%COMP%]{--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-outlined-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #000}.mat-mdc-outlined-button.mat-primary[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #0f0761}.mat-mdc-outlined-button.mat-accent[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #dd7345}.mat-mdc-outlined-button.mat-warn[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #f44336}.mat-mdc-outlined-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-button[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-primary[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #0f0761;--mat-mdc-button-ripple-color: rgba(15, 7, 97, .1)}.mat-mdc-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-accent[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #dd7345;--mat-mdc-button-ripple-color: rgba(221, 115, 69, .1)}.mat-mdc-button.mat-warn[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-raised-button[_ngcontent-%COMP%], .mat-mdc-unelevated-button[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-raised-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-raised-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-raised-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-raised-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-warn[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%]{height:28px;margin-top:0;margin-bottom:0}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%]{height:100%}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}.mdc-button[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-button-font-size, 13px);line-height:var(--mdc-typography-button-line-height, 19px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-icon-button[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: inherit;--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-icon-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-icon-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-icon-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-icon-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-icon-button.mat-primary[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #6200ee;--mat-mdc-button-ripple-color: rgba(98, 0, 238, .1)}.mat-mdc-icon-button.mat-accent[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #018786;--mat-mdc-button-ripple-color: rgba(1, 135, 134, .1)}.mat-mdc-icon-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #b00020;--mat-mdc-button-ripple-color: rgba(176, 0, 32, .1)}.mat-mdc-icon-button.mat-primary[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #0f0761;--mat-mdc-button-persistent-ripple-color: #0f0761;--mat-mdc-button-ripple-color: rgba(15, 7, 97, .1)}.mat-mdc-icon-button.mat-accent[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #dd7345;--mat-mdc-button-persistent-ripple-color: #dd7345;--mat-mdc-button-ripple-color: rgba(221, 115, 69, .1)}.mat-mdc-icon-button.mat-warn[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #f44336;--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-icon-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-icon-button-icon-color: rgba(0, 0, 0, .38);--mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, .38)}.mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%]{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}.mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-fab[_ngcontent-%COMP%], .mat-mdc-mini-fab[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-fab[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-fab.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-fab.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-fab[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-fab.mat-warn[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-fab[disabled][disabled][_ngcontent-%COMP%], .mat-mdc-mini-fab[disabled][disabled][_ngcontent-%COMP%]{--mdc-fab-container-color: rgba(0, 0, 0, .12);--mdc-fab-icon-color: rgba(0, 0, 0, .38);--mat-mdc-fab-color: rgba(0, 0, 0, .38)}.mat-mdc-fab.mat-unthemed[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-unthemed[_ngcontent-%COMP%]{--mdc-fab-container-color: white;--mdc-fab-icon-color: black;--mat-mdc-fab-color: #000}.mat-mdc-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-primary[_ngcontent-%COMP%]{--mdc-fab-container-color: #0f0761;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-accent[_ngcontent-%COMP%]{--mdc-fab-container-color: #dd7345;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-warn[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-warn[_ngcontent-%COMP%]{--mdc-fab-container-color: #f44336;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mdc-fab--extended[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-button-font-size, 13px);line-height:var(--mdc-typography-button-line-height, 19px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-extended-fab[_ngcontent-%COMP%]{--mdc-extended-fab-label-text-font: Inter;--mdc-extended-fab-label-text-size: 13px;--mdc-extended-fab-label-text-tracking: normal;--mdc-extended-fab-label-text-weight: 500}.mat-mdc-snack-bar-container[_ngcontent-%COMP%]{--mdc-snackbar-container-color: #333333;--mdc-snackbar-supporting-text-color: rgba(255, 255, 255, .87);--mat-snack-bar-button-color: #dd7345}.mat-mdc-snack-bar-container[_ngcontent-%COMP%]{--mdc-snackbar-supporting-text-font: Inter;--mdc-snackbar-supporting-text-line-height: 19px;--mdc-snackbar-supporting-text-size: 13px;--mdc-snackbar-supporting-text-weight: 400}html[_ngcontent-%COMP%]{--mat-table-background-color: white;--mat-table-header-headline-color: rgba(0, 0, 0, .87);--mat-table-row-item-label-text-color: rgba(0, 0, 0, .87);--mat-table-row-item-outline-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-table-header-container-height: 48px;--mat-table-footer-container-height: 44px;--mat-table-row-item-container-height: 44px}html[_ngcontent-%COMP%]{--mat-table-header-headline-font: Inter;--mat-table-header-headline-line-height: 19px;--mat-table-header-headline-size: 13px;--mat-table-header-headline-weight: 500;--mat-table-header-headline-tracking: normal;--mat-table-row-item-label-text-font: Inter;--mat-table-row-item-label-text-line-height: 19px;--mat-table-row-item-label-text-size: 13px;--mat-table-row-item-label-text-weight: 400;--mat-table-row-item-label-text-tracking: normal;--mat-table-footer-supporting-text-font: Inter;--mat-table-footer-supporting-text-line-height: 19px;--mat-table-footer-supporting-text-size: 13px;--mat-table-footer-supporting-text-weight: 400;--mat-table-footer-supporting-text-tracking: normal}.mat-mdc-progress-spinner[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #0f0761}.mat-mdc-progress-spinner.mat-accent[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #dd7345}.mat-mdc-progress-spinner.mat-warn[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #f44336}.mat-badge[_ngcontent-%COMP%]{position:relative}.mat-badge.mat-badge[_ngcontent-%COMP%]{overflow:visible}.mat-badge-content[_ngcontent-%COMP%]{position:absolute;text-align:center;display:inline-block;border-radius:50%;transition:transform .2s ease-in-out;transform:scale(.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:Roboto,sans-serif;font-family:var(--mat-badge-text-font, Roboto, sans-serif);font-size:12px;font-size:var(--mat-badge-text-size, 12px);font-weight:600;font-weight:var(--mat-badge-text-weight, 600)}.cdk-high-contrast-active[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{outline:solid 1px;border-radius:0}.mat-badge-disabled[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{display:none}.ng-animate-disabled[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%], .mat-badge-content._mat-animation-noopable[_ngcontent-%COMP%]{transition:none}.mat-badge-content.mat-badge-active[_ngcontent-%COMP%]{transform:none}.mat-badge-small[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:16px;height:16px;line-height:16px;font-size:9px;font-size:var(--mat-badge-small-size-text-size, 9px)}.mat-badge-small.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-8px}.mat-badge-small.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-8px}.mat-badge-small.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-16px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-16px}.mat-badge-small.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-16px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-16px}.mat-badge-small.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-8px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-8px}.mat-badge-small.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-8px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-8px}.mat-badge-medium[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:22px;height:22px;line-height:22px}.mat-badge-medium.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-11px}.mat-badge-medium.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-11px}.mat-badge-medium.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-22px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-22px}.mat-badge-medium.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-22px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-22px}.mat-badge-medium.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-11px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-11px}.mat-badge-medium.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-11px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-11px}.mat-badge-large[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px;font-size:24px;font-size:var(--mat-badge-large-size-text-size, 24px)}.mat-badge-large.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-14px}.mat-badge-large.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-14px}.mat-badge-large.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-28px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-28px}.mat-badge-large.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-28px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-28px}.mat-badge-large.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-14px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-14px}.mat-badge-large.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-14px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-14px}html[_ngcontent-%COMP%]{--mat-badge-background-color: #0f0761;--mat-badge-text-color: white;--mat-badge-disabled-state-background-color: #b9b9b9;--mat-badge-disabled-state-text-color: rgba(0, 0, 0, .38)}.mat-badge-accent[_ngcontent-%COMP%]{--mat-badge-background-color: #dd7345;--mat-badge-text-color: white}.mat-badge-warn[_ngcontent-%COMP%]{--mat-badge-background-color: #f44336;--mat-badge-text-color: white}html[_ngcontent-%COMP%]{--mat-badge-text-font: Inter;--mat-badge-text-size: 12px;--mat-badge-text-weight: 600;--mat-badge-small-size-text-size: 9px;--mat-badge-large-size-text-size: 24px}html[_ngcontent-%COMP%]{--mat-bottom-sheet-container-text-color: rgba(0, 0, 0, .87);--mat-bottom-sheet-container-background-color: white}html[_ngcontent-%COMP%]{--mat-bottom-sheet-container-text-font: Inter;--mat-bottom-sheet-container-text-line-height: 19px;--mat-bottom-sheet-container-text-size: 13px;--mat-bottom-sheet-container-text-tracking: normal;--mat-bottom-sheet-container-text-weight: 400}html[_ngcontent-%COMP%]{--mat-legacy-button-toggle-text-color: rgba(0, 0, 0, .38);--mat-legacy-button-toggle-state-layer-color: rgba(0, 0, 0, .12);--mat-legacy-button-toggle-selected-state-text-color: rgba(0, 0, 0, .54);--mat-legacy-button-toggle-selected-state-background-color: #e0e0e0;--mat-legacy-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-legacy-button-toggle-disabled-state-background-color: #eeeeee;--mat-legacy-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-background-color: white;--mat-standard-button-toggle-state-layer-color: black;--mat-standard-button-toggle-selected-state-background-color: #e0e0e0;--mat-standard-button-toggle-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-standard-button-toggle-disabled-state-background-color: white;--mat-standard-button-toggle-disabled-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-divider-color: #e0e0e0}html[_ngcontent-%COMP%]{--mat-standard-button-toggle-height: 40px}html[_ngcontent-%COMP%]{--mat-legacy-button-toggle-text-font: Inter;--mat-standard-button-toggle-text-font: Inter}html[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #0f0761;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(15, 7, 97, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(15, 7, 97, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(15, 7, 97, .3);--mat-datepicker-toggle-active-state-icon-color: #0f0761;--mat-datepicker-calendar-date-in-range-state-background-color: rgba(15, 7, 97, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e;--mat-datepicker-toggle-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-body-label-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-period-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-navigation-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-header-divider-color: rgba(0, 0, 0, .12);--mat-datepicker-calendar-header-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-date-today-outline-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-today-disabled-state-outline-color: rgba(0, 0, 0, .18);--mat-datepicker-calendar-date-text-color: rgba(0, 0, 0, .87);--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-preview-state-outline-color: rgba(0, 0, 0, .24);--mat-datepicker-range-input-separator-color: rgba(0, 0, 0, .87);--mat-datepicker-range-input-disabled-state-separator-color: rgba(0, 0, 0, .38);--mat-datepicker-range-input-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-container-background-color: white;--mat-datepicker-calendar-container-text-color: rgba(0, 0, 0, .87)}.mat-datepicker-content.mat-accent[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #dd7345;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(221, 115, 69, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(221, 115, 69, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(221, 115, 69, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(221, 115, 69, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-content.mat-warn[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #f44336;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(244, 67, 54, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(244, 67, 54, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-toggle-active.mat-accent[_ngcontent-%COMP%]{--mat-datepicker-toggle-active-state-icon-color: #dd7345}.mat-datepicker-toggle-active.mat-warn[_ngcontent-%COMP%]{--mat-datepicker-toggle-active-state-icon-color: #f44336}.mat-calendar-controls[_ngcontent-%COMP%] .mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%]{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}.mat-calendar-controls[_ngcontent-%COMP%] .mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-datepicker-calendar-text-font: Inter;--mat-datepicker-calendar-text-size: 13px;--mat-datepicker-calendar-body-label-text-size: 13px;--mat-datepicker-calendar-body-label-text-weight: 500;--mat-datepicker-calendar-period-button-text-size: 13px;--mat-datepicker-calendar-period-button-text-weight: 500;--mat-datepicker-calendar-header-text-size: 11px;--mat-datepicker-calendar-header-text-weight: 400}html[_ngcontent-%COMP%]{--mat-divider-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-expansion-container-background-color: white;--mat-expansion-container-text-color: rgba(0, 0, 0, .87);--mat-expansion-actions-divider-color: rgba(0, 0, 0, .12);--mat-expansion-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-expansion-header-text-color: rgba(0, 0, 0, .87);--mat-expansion-header-description-color: rgba(0, 0, 0, .54);--mat-expansion-header-indicator-color: rgba(0, 0, 0, .54)}html[_ngcontent-%COMP%]{--mat-expansion-header-collapsed-state-height: 40px;--mat-expansion-header-expanded-state-height: 56px}html[_ngcontent-%COMP%]{--mat-expansion-header-text-font: Inter;--mat-expansion-header-text-size: 13px;--mat-expansion-header-text-weight: 500;--mat-expansion-header-text-line-height: inherit;--mat-expansion-header-text-tracking: inherit;--mat-expansion-container-text-font: Inter;--mat-expansion-container-text-line-height: 19px;--mat-expansion-container-text-size: 13px;--mat-expansion-container-text-tracking: normal;--mat-expansion-container-text-weight: 400}html[_ngcontent-%COMP%]{--mat-grid-list-tile-header-primary-text-size: 13px;--mat-grid-list-tile-header-secondary-text-size: 12px;--mat-grid-list-tile-footer-primary-text-size: 13px;--mat-grid-list-tile-footer-secondary-text-size: 12px}html[_ngcontent-%COMP%]{--mat-icon-color: inherit}.mat-icon.mat-primary[_ngcontent-%COMP%]{--mat-icon-color: #0f0761}.mat-icon.mat-accent[_ngcontent-%COMP%]{--mat-icon-color: #dd7345}.mat-icon.mat-warn[_ngcontent-%COMP%]{--mat-icon-color: #f44336}html[_ngcontent-%COMP%]{--mat-sidenav-container-divider-color: rgba(0, 0, 0, .12);--mat-sidenav-container-background-color: white;--mat-sidenav-container-text-color: rgba(0, 0, 0, .87);--mat-sidenav-content-background-color: #fafafa;--mat-sidenav-content-text-color: rgba(0, 0, 0, .87);--mat-sidenav-scrim-color: rgba(0, 0, 0, .6)}html[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #0f0761;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #0f0761;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #0f0761;--mat-stepper-header-edit-state-icon-foreground-color: white;--mat-stepper-container-color: white;--mat-stepper-line-color: rgba(0, 0, 0, .12);--mat-stepper-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-optional-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-selected-state-label-text-color: rgba(0, 0, 0, .87);--mat-stepper-header-error-state-label-text-color: #f44336;--mat-stepper-header-icon-background-color: rgba(0, 0, 0, .54);--mat-stepper-header-error-state-icon-foreground-color: #f44336;--mat-stepper-header-error-state-icon-background-color: transparent}html[_ngcontent-%COMP%] .mat-step-header.mat-accent[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #dd7345;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #dd7345;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #dd7345;--mat-stepper-header-edit-state-icon-foreground-color: white}html[_ngcontent-%COMP%] .mat-step-header.mat-warn[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #f44336;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #f44336;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #f44336;--mat-stepper-header-edit-state-icon-foreground-color: white}html[_ngcontent-%COMP%]{--mat-stepper-header-height: 64px}html[_ngcontent-%COMP%]{--mat-stepper-container-text-font: Inter;--mat-stepper-header-label-text-font: Inter;--mat-stepper-header-label-text-size: 13px;--mat-stepper-header-label-text-weight: 400;--mat-stepper-header-error-state-label-text-size: 13px;--mat-stepper-header-selected-state-label-text-size: 13px;--mat-stepper-header-selected-state-label-text-weight: 400}.mat-sort-header-arrow[_ngcontent-%COMP%]{color:#757575}html[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: whitesmoke;--mat-toolbar-container-text-color: rgba(0, 0, 0, .87)}.mat-toolbar.mat-primary[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #0f0761;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-accent[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #dd7345;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-warn[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #f44336;--mat-toolbar-container-text-color: white}html[_ngcontent-%COMP%]{--mat-toolbar-standard-height: 56px;--mat-toolbar-mobile-height: 48px}html[_ngcontent-%COMP%]{--mat-toolbar-title-text-font: Inter;--mat-toolbar-title-text-line-height: 21px;--mat-toolbar-title-text-size: 16px;--mat-toolbar-title-text-tracking: normal;--mat-toolbar-title-text-weight: 600}.mat-tree[_ngcontent-%COMP%]{background:white}.mat-tree-node[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]{color:#000000de}.mat-tree-node[_ngcontent-%COMP%]{min-height:40px}.mat-tree[_ngcontent-%COMP%]{font-family:Inter}.mat-tree-node[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]{font-weight:400;font-size:13px}.mat-h1[_ngcontent-%COMP%], .mat-headline-5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:24px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h2[_ngcontent-%COMP%], .mat-headline-6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:21px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h3[_ngcontent-%COMP%], .mat-subtitle-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h3[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-subtitle-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:22px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h4[_ngcontent-%COMP%], .mat-body-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h4[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:13px;font-weight:400;line-height:19px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font:400 10.79px/19px Inter;margin:0 0 12px}.mat-h6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font:400 8.71px/19px Inter;margin:0 0 12px}.mat-body-strong[_ngcontent-%COMP%], .mat-subtitle-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-strong[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-subtitle-2[_ngcontent-%COMP%]{font-size:13px;font-weight:500;line-height:19px;font-family:Inter;letter-spacing:normal}.mat-body[_ngcontent-%COMP%], .mat-body-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%]{font-size:13px;font-weight:400;line-height:19px;font-family:Inter;letter-spacing:normal}.mat-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-body-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 12px}.mat-small[_ngcontent-%COMP%], .mat-caption[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-small[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-caption[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:16px;font-family:Inter;letter-spacing:normal}.mat-headline-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-1[_ngcontent-%COMP%]{font-size:56px;font-weight:600;line-height:62px;font-family:Inter;letter-spacing:normal;margin:0 0 56px}.mat-headline-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-2[_ngcontent-%COMP%]{font-size:44px;font-weight:600;line-height:50px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-headline-3[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-3[_ngcontent-%COMP%]{font-size:36px;font-weight:600;line-height:43px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-headline-4[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-4[_ngcontent-%COMP%]{font-size:28px;font-weight:600;line-height:34px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-ripple-element[_ngcontent-%COMP%]{display:none!important}.mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-fab[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-mini-fab[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%]{display:block!important}.mat-toolbar[_ngcontent-%COMP%]{box-shadow:none!important}.shell-brand-logo[_ngcontent-%COMP%]{filter:brightness(0);opacity:.87}.dark-theme[_ngcontent-%COMP%] .shell-brand-logo[_ngcontent-%COMP%]{filter:brightness(0) invert(1);opacity:.9}.mat-column-actions[_ngcontent-%COMP%]{width:50px;padding:0 8px}.mat-column-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:30px;width:30px}.mat-mdc-cell[_ngcontent-%COMP%]{padding:8px}.mat-mdc-card[_ngcontent-%COMP%]{overflow-y:auto}.add-btn[_ngcontent-%COMP%]{background-color:#7571a9}"]})}};Ke=qe=(0,ie.Cg)([(0,X.d)({checkProperties:!0})],Ke);var St=_(8201),le=_(27468),ce=_(7673),U=_(63532);function Eo(n,a){1&n&&(e.qex(0),e.EFF(1,"loading\u2026"),e.bVm())}function $o(n,a){if(1&n&&(e.qex(0),e.EFF(1),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",t.connections.length," available ")}}function Go(n,a){1&n&&(e.j41(0,"p",14),e.EFF(1," Click one to use it for this chat service: "),e.k0s())}function jo(n,a){if(1&n&&e.nrm(0,"fa-icon",20),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function No(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",17),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(2);return e.Njj(r.selectConnection.emit(c.id))}),e.DNE(2,jo,1,1,"fa-icon",18),e.j41(3,"span",19),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("prereqs__chip--selected",t.id===o.selectedConnectionId),e.R7$(1),e.Y8G("ngIf",t.id===o.selectedConnectionId),e.R7$(2),e.JRh(t.label||t.name)}}function Ao(n,a){if(1&n&&(e.j41(0,"ul",15),e.DNE(1,No,5,4,"li",16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.connections)("ngForTrackBy",t.trackById)}}function Yo(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," No AI Connections yet. The chat service can't run without one. Use the button above to create one, then come back. "),e.k0s())}function Vo(n,a){1&n&&(e.qex(0),e.EFF(1,"loading\u2026"),e.bVm())}function zo(n,a){if(1&n&&(e.qex(0),e.EFF(1),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",t.roles.length," available ")}}function Xo(n,a){1&n&&(e.j41(0,"p",14),e.EFF(1," Click one to scope the AI's data access: "),e.k0s())}function Bo(n,a){if(1&n&&e.nrm(0,"fa-icon",20),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}const Lo=function(n){return["/api-connections/role-based-access",n,"scope"]};function Uo(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",17),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(2);return e.Njj(r.selectRole.emit(c.id))}),e.DNE(2,Bo,1,1,"fa-icon",18),e.j41(3,"span",19),e.EFF(4),e.k0s()(),e.j41(5,"a",22),e.EFF(6,"what can this role see?"),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("prereqs__chip--selected",t.id===o.selectedRoleId),e.R7$(1),e.Y8G("ngIf",t.id===o.selectedRoleId),e.R7$(2),e.JRh(t.name),e.R7$(1),e.Y8G("routerLink",e.eq3(5,Lo,t.id))}}function Jo(n,a){if(1&n&&(e.j41(0,"ul",15),e.DNE(1,Uo,7,7,"li",16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.roles)("ngForTrackBy",t.trackById)}}function qo(n,a){1&n&&(e.j41(0,"p",21),e.EFF(1," No Roles configured. The AI operates under a Role that limits what data it can access. Create a restricted role and come back. "),e.k0s())}const Ko=function(){return["/ai/connections/create"]},Ho=function(){return["/api-connections/role-based-access/create"]};let Qo=(()=>{class n{constructor(){this.http=(0,e.WQX)(H.Qq),this.selectedConnectionId=null,this.selectedRoleId=null,this.selectConnection=new e.bkB,this.selectRole=new e.bkB,this.loading=!0,this.connections=[],this.roles=[],this.faCheck=f.e68,this.faCircleCheck=f.QRE,this.faCircleExclamation=f.lEd,this.faPlus=f.QLR,this.faRobot=f.UBk,this.faShieldHalved=f.fLc}ngOnInit(){(0,le.p)({conn:this.http.get(`${U.C}/system/service`,{params:{filter:'type = "ai_connection"',fields:"id,name,label",sort:"name"}}).pipe((0,N.W)(()=>(0,ce.of)({resource:[]}))),roles:this.http.get(`${U.C}/system/role`,{params:{fields:"id,name",sort:"name"}}).pipe((0,N.W)(()=>(0,ce.of)({resource:[]})))}).subscribe(({conn:t,roles:o})=>{this.connections=t.resource??[],this.roles=o.resource??[],this.loading=!1})}trackById(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-chat-prereqs"]],inputs:{selectedConnectionId:"selectedConnectionId",selectedRoleId:"selectedRoleId"},outputs:{selectConnection:"selectConnection",selectRole:"selectRole"},standalone:!0,features:[e.aNF],decls:38,vars:34,consts:[[1,"prereqs"],[1,"prereqs__header"],[1,"prereqs__section"],[1,"prereqs__row"],[1,"prereqs__icon",3,"icon"],[1,"prereqs__kind-icon",3,"icon"],[1,"prereqs__title"],[1,"prereqs__count"],[4,"ngIf"],["mat-stroked-button","",1,"prereqs__action",3,"routerLink"],[3,"icon"],["class","prereqs__pick-hint",4,"ngIf"],["class","prereqs__list",4,"ngIf"],["class","prereqs__hint",4,"ngIf"],[1,"prereqs__pick-hint"],[1,"prereqs__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"prereqs__chip",3,"click"],["class","prereqs__chip-check",3,"icon",4,"ngIf"],[1,"prereqs__name"],[1,"prereqs__chip-check",3,"icon"],[1,"prereqs__hint"],[1,"prereqs__link",3,"routerLink"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"header",1)(2,"h4"),e.EFF(3,"AI Chat setup"),e.k0s(),e.j41(4,"p"),e.EFF(5," An AI Chat service ties an AI Connection (the LLM) to a DreamFactory Role (the data scope). Pick one of each below; your selection writes straight into the form. "),e.k0s()(),e.j41(6,"section",2)(7,"div",3),e.nrm(8,"fa-icon",4)(9,"fa-icon",5),e.j41(10,"span",6),e.EFF(11,"AI Connection"),e.k0s(),e.j41(12,"span",7),e.DNE(13,Eo,2,0,"ng-container",8),e.DNE(14,$o,2,1,"ng-container",8),e.k0s(),e.j41(15,"a",9),e.nrm(16,"fa-icon",10),e.j41(17,"span"),e.EFF(18),e.k0s()()(),e.DNE(19,Go,2,0,"p",11),e.DNE(20,Ao,2,2,"ul",12),e.DNE(21,Yo,2,0,"p",13),e.k0s(),e.j41(22,"section",2)(23,"div",3),e.nrm(24,"fa-icon",4)(25,"fa-icon",5),e.j41(26,"span",6),e.EFF(27,"AI Role"),e.k0s(),e.j41(28,"span",7),e.DNE(29,Vo,2,0,"ng-container",8),e.DNE(30,zo,2,1,"ng-container",8),e.k0s(),e.j41(31,"a",9),e.nrm(32,"fa-icon",10),e.j41(33,"span"),e.EFF(34),e.k0s()()(),e.DNE(35,Xo,2,0,"p",11),e.DNE(36,Jo,2,2,"ul",12),e.DNE(37,qo,2,0,"p",13),e.k0s()()),2&o&&(e.R7$(6),e.AVh("prereqs__section--missing",!i.loading&&0===i.connections.length),e.R7$(2),e.AVh("prereqs__icon--ok",i.connections.length)("prereqs__icon--miss",!i.connections.length),e.Y8G("icon",i.connections.length?i.faCheck:i.faCircleExclamation),e.R7$(1),e.Y8G("icon",i.faRobot),e.R7$(4),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading),e.R7$(1),e.Y8G("routerLink",e.lJ4(32,Ko)),e.R7$(1),e.Y8G("icon",i.faPlus),e.R7$(2),e.JRh(i.connections.length?"Add another":"Create one now"),e.R7$(1),e.Y8G("ngIf",i.connections.length&&null==i.selectedConnectionId),e.R7$(1),e.Y8G("ngIf",i.connections.length),e.R7$(1),e.Y8G("ngIf",!i.loading&&0===i.connections.length),e.R7$(1),e.AVh("prereqs__section--missing",!i.loading&&0===i.roles.length),e.R7$(2),e.AVh("prereqs__icon--ok",i.roles.length)("prereqs__icon--miss",!i.roles.length),e.Y8G("icon",i.roles.length?i.faCheck:i.faCircleExclamation),e.R7$(1),e.Y8G("icon",i.faShieldHalved),e.R7$(4),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading),e.R7$(1),e.Y8G("routerLink",e.lJ4(33,Ho)),e.R7$(1),e.Y8G("icon",i.faPlus),e.R7$(2),e.JRh(i.roles.length?"Add another":"Create one now"),e.R7$(1),e.Y8G("ngIf",i.roles.length&&null==i.selectedRoleId),e.R7$(1),e.Y8G("ngIf",i.roles.length),e.R7$(1),e.Y8G("ngIf",!i.loading&&0===i.roles.length))},dependencies:[m.MD,m.Sq,m.bT,G.Wk,u.Hl,u.It,w.dX,w.aY],styles:["[_nghost-%COMP%]{--prereqs-surface: rgba(0, 0, 0, .03)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--prereqs-surface: rgba(255, 255, 255, .02)}.prereqs[_ngcontent-%COMP%]{border:1px solid rgba(96,165,250,.3);background:rgba(96,165,250,.05);border-radius:8px;padding:1.5rem 1.75rem;margin:1rem 0;display:flex;flex-direction:column;gap:1.25rem;font-size:16px}.prereqs__header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 .4rem;font-size:19px;font-weight:600}.prereqs__header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:15px;line-height:1.55}.prereqs__section[_ngcontent-%COMP%]{padding:1rem 1.25rem;border-radius:6px;background:var(--prereqs-surface)}.prereqs__section--missing[_ngcontent-%COMP%]{background:rgba(220,53,69,.06);border:1px solid rgba(220,53,69,.25)}.prereqs__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.prereqs__icon[_ngcontent-%COMP%]{font-size:19px}.prereqs__icon--ok[_ngcontent-%COMP%]{color:#4ade80}.prereqs__icon--miss[_ngcontent-%COMP%]{color:#ff6b6b}.prereqs__kind-icon[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:17px}.prereqs__title[_ngcontent-%COMP%]{font-weight:600;font-size:18px}.prereqs__count[_ngcontent-%COMP%]{font-size:14px;color:var(--df-text-2)}.prereqs__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:.8125rem!important;padding:0 .75rem!important;min-height:32px!important}.prereqs__list[_ngcontent-%COMP%]{list-style:none;margin:.625rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem .625rem}.prereqs__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem}.prereqs__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.55rem 1.05rem;background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:999px;font:inherit;font-size:16px;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.prereqs__chip[_ngcontent-%COMP%]:hover{border-color:#60a5fa99;background:rgba(96,165,250,.08)}.prereqs__chip--selected[_ngcontent-%COMP%]{border-color:#60a5fa;background:rgba(96,165,250,.18);color:var(--df-text)}.prereqs__chip-check[_ngcontent-%COMP%]{color:#60a5fa}.prereqs__name[_ngcontent-%COMP%]{font-weight:500}.prereqs__pick-hint[_ngcontent-%COMP%]{margin:.625rem 0 0;font-size:14px;color:var(--df-text-2);font-style:italic}.prereqs__link[_ngcontent-%COMP%]{font-size:12px;color:var(--df-text-muted);text-decoration:none}.prereqs__link[_ngcontent-%COMP%]:hover{color:#60a5fa;text-decoration:underline}.prereqs__hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:13px;color:var(--df-text-2);line-height:1.5}.prereqs__hint[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;padding:.1rem .375rem;border-radius:3px;background:var(--df-surface-2)}.prereqs__hint[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--df-text)}"]})}}return n})();function Wo(n,a){1&n&&e.nrm(0,"mat-spinner",5)}function Zo(n,a){if(1&n&&e.nrm(0,"fa-icon",6),2&n){const t=e.XpG();e.Y8G("icon",t.faPlugCircleCheck)}}function ei(n,a){if(1&n&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",null==t.result.error?null:t.result.error.message," ")}}function ti(n,a){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.SpI(", including ",t.firstModelLabel,"")}}function ni(n,a){if(1&n&&(e.j41(0,"p",11),e.EFF(1),e.DNE(2,ti,2,1,"span",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.modelCount," models available "),e.R7$(1),e.Y8G("ngIf",t.firstModelLabel)}}function oi(n,a){if(1&n&&(e.j41(0,"div",7),e.nrm(1,"fa-icon",6),e.j41(2,"div",8)(3,"strong"),e.EFF(4),e.k0s(),e.DNE(5,ei,2,1,"p",9),e.DNE(6,ni,3,2,"p",10),e.k0s()()),2&n){const t=e.XpG();e.AVh("test-conn__result--ok",t.result.success)("test-conn__result--err",!t.result.success),e.R7$(1),e.Y8G("icon",t.result.success?t.faCheckCircle:t.faCircleXmark),e.R7$(3),e.JRh(t.result.success?"Connection succeeded":"Connection failed"),e.R7$(1),e.Y8G("ngIf",!t.result.success&&(null==t.result.error?null:t.result.error.message)),e.R7$(1),e.Y8G("ngIf",t.result.success&&t.modelCount>0)}}let ii=(()=>{class n{constructor(){this.serviceId=null,this.http=(0,e.WQX)(H.Qq),this.loading=!1,this.result=null,this.faPlugCircleCheck=f.e6V,this.faCheckCircle=f.SGM,this.faCircleXmark=f.bnw}get modelCount(){return this.result?.resource?.length??0}get firstModelLabel(){const t=this.result?.resource?.[0];return t?"string"==typeof t?t:t.name||t.id||null:null}run(){const t=this.form.get("config")?.value??{},o=t.provider,i=t.api_key??t.apiKey??null,c="**********"===i?null:i,r=t.base_url??t.baseUrl??null,s=t.organization_id??t.organizationId??null,l=t.extra_headers??t.extraHeaders??null,p=t.timeout??null;if(!o)return void(this.result={success:!1,error:{message:"Pick a provider before testing."}});const k="openai_compatible"===o,C=null!=this.serviceId;if("ollama"!==o&&"openai_compatible"!==o&&!c&&!C)return void(this.result={success:!1,error:{message:o+" requires an API key. Fill in API Key, then test. (Existing connections fall back to the saved key automatically.)"}});if(k&&!r&&!C)return void(this.result={success:!1,error:{message:o+" requires a Base URL (e.g. http://host:8090/v1). Fill in Base URL, then test."}});this.loading=!0,this.result=null;const M={provider:o,api_key:c,base_url:r,organization_id:s,extra_headers:l,timeout:p};this.serviceId&&(M.service_id=this.serviceId),this.http.post("/_internal/ai/test-connection",M).subscribe({next:D=>{this.result=D,this.loading=!1},error:D=>{this.result={success:!1,error:{message:D?.error?.error?.message??D?.error?.message??D?.message??"Network error."}},this.loading=!1}})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-test-connection"]],inputs:{form:"form",serviceId:"serviceId"},standalone:!0,features:[e.aNF],decls:7,vars:5,consts:[[1,"test-conn"],["type","button","mat-stroked-button","",1,"test-conn__button",3,"disabled","click"],["diameter","16",4,"ngIf"],[3,"icon",4,"ngIf"],["class","test-conn__result",3,"test-conn__result--ok","test-conn__result--err",4,"ngIf"],["diameter","16"],[3,"icon"],[1,"test-conn__result"],[1,"test-conn__detail"],[4,"ngIf"],["class","test-conn__models",4,"ngIf"],[1,"test-conn__models"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"button",1),e.bIt("click",function(){return i.run()}),e.DNE(2,Wo,1,0,"mat-spinner",2),e.DNE(3,Zo,1,1,"fa-icon",3),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.DNE(6,oi,7,8,"div",4),e.k0s()),2&o&&(e.R7$(1),e.Y8G("disabled",i.loading),e.R7$(1),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading),e.R7$(2),e.JRh(i.loading?"Testing\u2026":"Test connection"),e.R7$(1),e.Y8G("ngIf",i.result))},dependencies:[m.MD,m.bT,u.Hl,u.$z,ge.D6,ge.LG,w.dX,w.aY],styles:[".test-conn[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;margin:1rem 0;font-size:1.4rem}.test-conn__button[_ngcontent-%COMP%]{align-self:flex-start;display:inline-flex!important;align-items:center;gap:.5rem;font-size:1.3rem!important;min-height:38px!important}.test-conn__result[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding:.875rem 1.125rem;border-radius:var(--df-radius-sm);align-items:flex-start;font-size:1.4rem}.test-conn__result--ok[_ngcontent-%COMP%]{background:var(--df-success-soft);border:1px solid var(--df-success-border);color:var(--df-success)}.test-conn__result--err[_ngcontent-%COMP%]{background:var(--df-danger-soft);border:1px solid var(--df-danger-border);color:var(--df-danger)}.test-conn__detail[_ngcontent-%COMP%]{flex:1;color:var(--df-text);display:flex;flex-direction:column;gap:.35rem}.test-conn__detail[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:600;font-size:1.4rem}.test-conn__detail[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:1.3rem}.test-conn__models[_ngcontent-%COMP%]{font-size:1.3rem}"]})}}return n})();function ai(n,a){1&n&&e.nrm(0,"mat-spinner",12)}function ci(n,a){if(1&n&&e.nrm(0,"fa-icon",5),2&n){const t=e.XpG(2);e.Y8G("icon",t.faArrowsRotate)}}function ri(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",9),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.fetch())}),e.DNE(1,ai,1,0,"mat-spinner",10),e.DNE(2,ci,1,1,"fa-icon",11),e.j41(3,"span"),e.EFF(4),e.k0s()()}if(2&n){const t=e.XpG();e.Y8G("disabled",t.loading),e.R7$(1),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading),e.R7$(2),e.JRh(t.models.length?"Refresh":"Fetch available models")}}function si(n,a){if(1&n&&(e.j41(0,"div",13),e.nrm(1,"fa-icon",5),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("icon",t.faCircleXmark),e.R7$(2),e.JRh(t.error)}}function li(n,a){if(1&n&&(e.j41(0,"span",24),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI("",e.bMT(2,1,t.context)," ctx")}}function di(n,a){if(1&n&&(e.j41(0,"mat-option",20)(1,"span",21)(2,"span",22),e.EFF(3),e.k0s(),e.DNE(4,li,3,3,"span",23),e.k0s()()),2&n){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(3),e.JRh(t.label),e.R7$(1),e.Y8G("ngIf",t.context)}}function pi(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",17)(1,"mat-label"),e.EFF(2,"Model"),e.k0s(),e.j41(3,"mat-select",18),e.bIt("selectionChange",function(i){e.eBV(t);const c=e.XpG(2);return e.Njj(c.select(i.value))}),e.DNE(4,di,5,3,"mat-option",19),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(3),e.Y8G("value",t.currentValue),e.R7$(1),e.Y8G("ngForOf",t.models)("ngForTrackBy",t.trackModel)}}function mi(n,a){if(1&n&&(e.j41(0,"p",25),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.fetchHint," ")}}function _i(n,a){1&n&&(e.j41(0,"p",25),e.EFF(1,' No models reported by the provider. Switch to "Type custom" if you know the model id. '),e.k0s())}function gi(n,a){if(1&n&&(e.j41(0,"p",26),e.nrm(1,"fa-icon",27),e.EFF(2," Selected: "),e.j41(3,"code"),e.EFF(4),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("icon",t.faCircleCheck),e.R7$(3),e.JRh(t.currentValue)}}function fi(n,a){if(1&n&&(e.qex(0),e.DNE(1,pi,5,3,"mat-form-field",14),e.DNE(2,mi,2,1,"p",15),e.DNE(3,_i,2,0,"p",15),e.DNE(4,gi,5,2,"p",16),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.models.length>0),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.models.length&&!t.error&&!t.lastFetched),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.models.length&&t.lastFetched),e.R7$(1),e.Y8G("ngIf",t.currentValue)}}function ui(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",28)(1,"mat-label"),e.EFF(2,"Model id"),e.k0s(),e.j41(3,"input",29),e.bIt("input",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.onCustomInput(i))}),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("value",t.currentValue||"")}}let hi=(()=>{class n{constructor(){this.serviceId=null,this.http=(0,e.WQX)(H.Qq),this.loading=!1,this.models=[],this.error=null,this.customMode=!1,this.lastFetched=!1,this.faArrowsRotate=f.$3Z,this.faCircleCheck=f.QRE,this.faCircleXmark=f.bnw,this.faKeyboard=f.Lhe}ngOnInit(){this.currentValue&&(this.customMode=!0)}get currentValue(){return this.form.get("config.defaultModel")?.value??""}get fetchHint(){const t=this.form.get("config.provider")?.value;return t?"openai_compatible"===t||"ollama"===t?'Fill in Base URL (and API Key if your endpoint requires one), then click "Fetch available models".':'Fill in API Key above, then click "Fetch available models".':'Pick a provider above first, then click "Fetch available models".'}select(t){this.form.get("config.defaultModel")?.setValue(t)}onCustomInput(t){const o=t.target.value;this.form.get("config.defaultModel")?.setValue(o)}toggleCustom(){this.customMode=!this.customMode}fetch(){const t=this.form.get("config")?.value??{},o=t.provider;if(!o)return void(this.error="Pick a provider above first.");this.loading=!0,this.error=null;const i=t.api_key??t.apiKey??null,c={provider:o,api_key:"**********"===i?null:i,base_url:t.base_url??t.baseUrl??null,organization_id:t.organization_id??t.organizationId??null,extra_headers:t.extra_headers??t.extraHeaders??null,timeout:t.timeout??null};this.serviceId&&(c.service_id=this.serviceId),this.http.post("/_internal/ai/test-connection",c).subscribe({next:r=>{this.loading=!1,this.lastFetched=!0,r.success?this.models=(r.resource??[]).map(this.normalize):this.error=r.error?.message??"Provider rejected the request."},error:r=>{this.loading=!1,this.lastFetched=!0,this.error=r?.error?.error?.message??r?.error?.message??r?.message??"Network error fetching models."}})}normalize(t){return"string"==typeof t?{id:t,label:t}:{id:t.id??t.name??"unknown",label:t.name??t.id??"unknown",context:t.context_window??null}}trackModel(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-model-picker"]],inputs:{form:"form",serviceId:"serviceId"},standalone:!0,features:[e.aNF],decls:12,vars:6,consts:[[1,"model-picker"],[1,"model-picker__header"],[1,"model-picker__title"],["type","button","mat-stroked-button","","class","model-picker__refresh",3,"disabled","click",4,"ngIf"],["type","button","mat-button","",1,"model-picker__custom-toggle",3,"click"],[3,"icon"],["class","model-picker__error",4,"ngIf"],[4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","model-picker__custom",4,"ngIf"],["type","button","mat-stroked-button","",1,"model-picker__refresh",3,"disabled","click"],["diameter","14",4,"ngIf"],[3,"icon",4,"ngIf"],["diameter","14"],[1,"model-picker__error"],["appearance","outline","subscriptSizing","dynamic","class","model-picker__select",4,"ngIf"],["class","model-picker__hint",4,"ngIf"],["class","model-picker__current",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic",1,"model-picker__select"],[3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],[1,"model-picker__option"],[1,"model-picker__option-label"],["class","model-picker__option-meta",4,"ngIf"],[1,"model-picker__option-meta"],[1,"model-picker__hint"],[1,"model-picker__current"],[1,"model-picker__current-ok",3,"icon"],["appearance","outline","subscriptSizing","dynamic",1,"model-picker__custom"],["matInput","","placeholder","e.g. claude-sonnet-4-5-20250929",3,"value","input"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"span",2),e.EFF(3,"Default Model"),e.k0s(),e.DNE(4,ri,5,4,"button",3),e.j41(5,"button",4),e.bIt("click",function(){return i.toggleCustom()}),e.nrm(6,"fa-icon",5),e.j41(7,"span"),e.EFF(8),e.k0s()()(),e.DNE(9,si,4,2,"div",6),e.DNE(10,fi,5,4,"ng-container",7),e.DNE(11,ui,4,1,"mat-form-field",8),e.k0s()),2&o&&(e.R7$(4),e.Y8G("ngIf",!i.customMode),e.R7$(2),e.Y8G("icon",i.faKeyboard),e.R7$(2),e.JRh(i.customMode?"Use list":"Type custom"),e.R7$(1),e.Y8G("ngIf",i.error),e.R7$(1),e.Y8G("ngIf",!i.customMode),e.R7$(1),e.Y8G("ngIf",i.customMode))},dependencies:[m.MD,m.Sq,m.bT,m.QX,d.YN,d.X1,u.Hl,u.$z,y.RG,y.rl,y.nJ,E.fS,E.fg,ge.D6,ge.LG,I.Ve,I.VO,Y.wT,w.dX,w.aY],styles:[".model-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.875rem;padding:1.25rem 1.5rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.model-picker__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.875rem;flex-wrap:wrap}.model-picker__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em;margin-right:auto}.model-picker__refresh[_ngcontent-%COMP%], .model-picker__custom-toggle[_ngcontent-%COMP%]{display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.model-picker__select[_ngcontent-%COMP%], .model-picker__custom[_ngcontent-%COMP%]{width:100%}.model-picker__option[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.75rem;width:100%}.model-picker__option-label[_ngcontent-%COMP%]{flex:1}.model-picker__option-meta[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-muted);font-family:SFMono-Regular,Menlo,Consolas,monospace}.model-picker__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);font-style:italic;line-height:1.5}.model-picker__error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.625rem .875rem;border-radius:var(--df-radius-sm);background:var(--df-danger-soft);border:1px solid var(--df-danger-border);color:var(--df-danger);font-size:1.3rem}.model-picker__current[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text);display:flex;align-items:center;gap:.5rem}.model-picker__current[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.2rem;background:var(--df-surface-2);border:1px solid var(--df-border-2);padding:.2rem .5rem;border-radius:var(--df-radius-sm)}.model-picker__current-ok[_ngcontent-%COMP%]{color:var(--df-success)}"]})}}return n})();var bi=_(15735);function vi(n,a){if(1&n&&(e.j41(0,"div",14),e.nrm(1,"fa-icon",7),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("icon",o.faTriangleExclamation),e.R7$(2),e.JRh(t("noneWarning"))}}function Ci(n,a){if(1&n&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t("loading")," ")}}function xi(n,a){if(1&n&&e.nrm(0,"fa-icon",21),2&n){const t=e.XpG(4);e.Y8G("icon",t.faCircleCheck)}}function ki(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",18),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(3);return e.Njj(r.toggle(c.id))}),e.DNE(2,xi,1,1,"fa-icon",19),e.j41(3,"span",20),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.AVh("allowed-roles__chip--selected",o.isSelected(t.id)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.id)),e.R7$(2),e.JRh(t.name)}}function yi(n,a){if(1&n&&(e.j41(0,"ul",16),e.DNE(1,ki,5,4,"li",17),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.roles)("ngForTrackBy",t.trackById)}}function Mi(n,a){if(1&n&&(e.j41(0,"p",22),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t("empty")," ")}}const Oi=function(n){return{role:n}};function Pi(n,a){if(1&n&&(e.j41(0,"div",26)(1,"div",27),e.EFF(2),e.k0s(),e.nrm(3,"df-scope-map",28),e.k0s()),2&n){const t=a.$implicit,o=e.XpG(2).$implicit;e.R7$(2),e.SpI(" ",o("reachRole",e.eq3(2,Oi,t.name))," "),e.R7$(1),e.Y8G("roleId",t.id)}}function Fi(n,a){if(1&n&&(e.j41(0,"section",23)(1,"div",24),e.nrm(2,"fa-icon",7),e.j41(3,"span"),e.EFF(4),e.k0s()(),e.j41(5,"p",8),e.EFF(6),e.k0s(),e.DNE(7,Pi,4,4,"div",25),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(2),e.Y8G("icon",o.faShieldHalved),e.R7$(2),e.JRh(t("reachTitle")),e.R7$(2),e.JRh(t("reachHint")),e.R7$(1),e.Y8G("ngForOf",o.selectedRoles)("ngForTrackBy",o.trackById)}}const wi=function(n,a){return{selected:n,available:a}},Di=function(){return["/api-connections/role-based-access/create"]};function Ti(n,a){if(1&n&&(e.j41(0,"div",1)(1,"div",2),e.nrm(2,"fa-icon",3),e.j41(3,"span",4),e.EFF(4),e.k0s(),e.j41(5,"span",5),e.EFF(6),e.k0s(),e.j41(7,"a",6),e.nrm(8,"fa-icon",7),e.j41(9,"span"),e.EFF(10),e.k0s()()(),e.j41(11,"p",8),e.EFF(12),e.k0s(),e.DNE(13,vi,4,2,"div",9),e.DNE(14,Ci,2,1,"div",10),e.DNE(15,yi,2,2,"ul",11),e.DNE(16,Mi,2,1,"p",12),e.DNE(17,Fi,8,5,"section",13),e.k0s()),2&n){const t=a.$implicit,o=e.XpG();e.R7$(2),e.Y8G("icon",o.faShieldHalved),e.R7$(2),e.JRh(t("title")),e.R7$(2),e.SpI(" ",t("count",e.l_i(12,wi,o.selected.length,o.roles.length))," "),e.R7$(1),e.Y8G("routerLink",e.lJ4(15,Di)),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(2),e.JRh(t("createRole")),e.R7$(2),e.JRh(t("hint")),e.R7$(1),e.Y8G("ngIf",0===o.selected.length&&!o.loading),e.R7$(1),e.Y8G("ngIf",o.loading),e.R7$(1),e.Y8G("ngIf",!o.loading&&o.roles.length>0),e.R7$(1),e.Y8G("ngIf",!o.loading&&0===o.roles.length),e.R7$(1),e.Y8G("ngIf",!o.loading&&o.selectedRoles.length>0)}}let Si=(()=>{class n{constructor(){this.http=(0,e.WQX)(H.Qq),this.loading=!0,this.roles=[],this.faShieldHalved=f.fLc,this.faCheck=f.e68,this.faCircleCheck=f.QRE,this.faPlus=f.QLR,this.faTriangleExclamation=f.JAe}ngOnInit(){this.http.get(`${U.C}/system/role`,{params:{fields:"id,name,description",sort:"name"}}).subscribe({next:t=>{this.roles=t.resource??[],this.loading=!1},error:()=>{this.loading=!1}})}get selected(){const t=this.form.get("config.allowedRoles")?.value;return this.parse(t)}isSelected(t){return this.selected.includes(t)}get selectedRoles(){const t=this.selected;return this.roles.filter(o=>t.includes(o.id))}toggle(t){const o=this.selected,i=o.includes(t)?o.filter(c=>c!==t):[...o,t];this.form.get("config.allowedRoles")?.setValue(i)}parse(t){if(Array.isArray(t))return t.map(Number).filter(o=>Number.isFinite(o));if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(Number).filter(i=>Number.isFinite(i))}catch{return[]}return[]}trackById(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-allowed-roles"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","allowed-roles",4,"transloco","translocoRead"],[1,"allowed-roles"],[1,"allowed-roles__header"],[1,"allowed-roles__icon",3,"icon"],[1,"allowed-roles__title"],[1,"allowed-roles__count"],["mat-stroked-button","",1,"allowed-roles__action",3,"routerLink"],[3,"icon"],[1,"allowed-roles__hint"],["class","allowed-roles__warn",4,"ngIf"],["class","allowed-roles__loading",4,"ngIf"],["class","allowed-roles__list",4,"ngIf"],["class","allowed-roles__empty",4,"ngIf"],["class","allowed-roles__reach",4,"ngIf"],[1,"allowed-roles__warn"],[1,"allowed-roles__loading"],[1,"allowed-roles__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"allowed-roles__chip",3,"click"],["class","allowed-roles__chip-check",3,"icon",4,"ngIf"],[1,"allowed-roles__name"],[1,"allowed-roles__chip-check",3,"icon"],[1,"allowed-roles__empty"],[1,"allowed-roles__reach"],[1,"allowed-roles__reach-head"],["class","allowed-roles__reach-role",4,"ngFor","ngForOf","ngForTrackBy"],[1,"allowed-roles__reach-role"],[1,"allowed-roles__reach-role-name"],[3,"roleId"]],template:function(o,i){1&o&&e.DNE(0,Ti,18,16,"div",0),2&o&&e.Y8G("translocoRead","aiAllowedRoles")},dependencies:[m.MD,m.Sq,m.bT,G.Wk,u.Hl,u.It,w.dX,w.aY,$.Q8,$.bA,bi.A],styles:[".allowed-roles[_ngcontent-%COMP%]{--roles-warning: #9a5b00;display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.allowed-roles__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.allowed-roles__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.allowed-roles__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.allowed-roles__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.allowed-roles__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.allowed-roles__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.allowed-roles__warn[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.625rem;padding:.875rem 1.125rem;background:color-mix(in srgb,var(--df-warning, var(--roles-warning)) 10%,transparent);border:1px solid color-mix(in srgb,var(--df-warning, var(--roles-warning)) 40%,transparent);border-radius:var(--df-radius-sm);color:var(--df-warning, var(--roles-warning));font-size:1.3rem}.allowed-roles__loading[_ngcontent-%COMP%], .allowed-roles__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.allowed-roles__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.allowed-roles__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.allowed-roles__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.allowed-roles__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.allowed-roles__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.allowed-roles__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.allowed-roles__name[_ngcontent-%COMP%]{font-weight:500}.allowed-roles__reach[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-top:.5rem;padding-top:1.25rem;border-top:1px solid var(--df-border-2)}.allowed-roles__reach-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;font-weight:600;font-size:1.4rem;letter-spacing:-.01em}.allowed-roles__reach-head[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.6rem}.allowed-roles__reach-role[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.625rem}.allowed-roles__reach-role-name[_ngcontent-%COMP%]{font-weight:600;font-size:1.3rem;color:var(--df-text-2)}.dark-theme[_nghost-%COMP%] .allowed-roles[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .allowed-roles[_ngcontent-%COMP%]{--roles-warning: #ffb74d}"]})}}return n})();function Ri(n,a){1&n&&(e.j41(0,"div",11),e.EFF(1," Loading MCP servers\u2026 "),e.k0s())}function Ii(n,a){if(1&n&&e.nrm(0,"fa-icon",17),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function Ei(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",14),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(2);return e.Njj(r.toggle(c.name))}),e.DNE(2,Ii,1,1,"fa-icon",15),e.j41(3,"span",16),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("mcp-servers__chip--selected",o.isSelected(t.name)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label||t.name)}}function $i(n,a){if(1&n&&(e.j41(0,"ul",12),e.DNE(1,Ei,5,4,"li",13),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.servers)("ngForTrackBy",t.trackByName)}}function Gi(n,a){1&n&&(e.j41(0,"p",18),e.EFF(1," No MCP services exist yet. Create one (service type \u201cMCP Server\u201d) and come back. "),e.k0s())}const ji=function(){return["/api-connections/api-types/database"]};let Ni=(()=>{class n{constructor(){this.http=(0,e.WQX)(H.Qq),this.loading=!0,this.servers=[],this.faPlug=f.QtJ,this.faCircleCheck=f.QRE,this.faPlus=f.QLR}ngOnInit(){this.http.get(`${U.C}/system/service`,{params:{filter:'type = "mcp"',fields:"id,name,label",sort:"name"}}).subscribe({next:t=>{this.servers=t.resource??[],this.loading=!1},error:()=>{this.loading=!1}})}get selected(){return this.parse(this.form.get("config.mcpServers")?.value)}isSelected(t){return this.selected.includes(t)}toggle(t){const o=this.selected,i=o.includes(t)?o.filter(c=>c!==t):[...o,t];this.form.get("config.mcpServers")?.setValue(i)}parse(t){if(Array.isArray(t))return t.map(String).filter(o=>o.length>0);if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(String).filter(i=>i.length>0)}catch{return[]}return[]}trackByName(t,o){return o.name}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-mcp-servers"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:16,vars:9,consts:[[1,"mcp-servers"],[1,"mcp-servers__header"],[1,"mcp-servers__icon",3,"icon"],[1,"mcp-servers__title"],[1,"mcp-servers__count"],["mat-stroked-button","",1,"mcp-servers__action",3,"routerLink"],[3,"icon"],[1,"mcp-servers__hint"],["class","mcp-servers__loading",4,"ngIf"],["class","mcp-servers__list",4,"ngIf"],["class","mcp-servers__empty",4,"ngIf"],[1,"mcp-servers__loading"],[1,"mcp-servers__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"mcp-servers__chip",3,"click"],["class","mcp-servers__chip-check",3,"icon",4,"ngIf"],[1,"mcp-servers__name"],[1,"mcp-servers__chip-check",3,"icon"],[1,"mcp-servers__empty"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"fa-icon",2),e.j41(3,"span",3),e.EFF(4,"MCP Servers"),e.k0s(),e.j41(5,"span",4),e.EFF(6),e.k0s(),e.j41(7,"a",5),e.nrm(8,"fa-icon",6),e.j41(9,"span"),e.EFF(10,"Create MCP service"),e.k0s()()(),e.j41(11,"p",7),e.EFF(12," Pick the MCP servers this chat may call as tools. The AI sees the intersection of these and what the caller's role can access, so a conversation can never reach a server the person talking to it can't. Leave all unselected to allow every MCP server the role grants. "),e.k0s(),e.DNE(13,Ri,2,0,"div",8),e.DNE(14,$i,2,2,"ul",9),e.DNE(15,Gi,2,0,"p",10),e.k0s()),2&o&&(e.R7$(2),e.Y8G("icon",i.faPlug),e.R7$(4),e.Lme(" ",i.selected.length," selected \xb7 ",i.servers.length," available "),e.R7$(1),e.Y8G("routerLink",e.lJ4(8,ji)),e.R7$(1),e.Y8G("icon",i.faPlus),e.R7$(5),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading&&i.servers.length>0),e.R7$(1),e.Y8G("ngIf",!i.loading&&0===i.servers.length))},dependencies:[m.MD,m.Sq,m.bT,G.Wk,u.Hl,u.It,w.dX,w.aY],styles:[".mcp-servers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.mcp-servers__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.mcp-servers__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.mcp-servers__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.mcp-servers__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.mcp-servers__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.mcp-servers__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.mcp-servers__loading[_ngcontent-%COMP%], .mcp-servers__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.mcp-servers__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.mcp-servers__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.mcp-servers__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.mcp-servers__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.mcp-servers__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.mcp-servers__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.mcp-servers__name[_ngcontent-%COMP%]{font-weight:500}"]})}}return n})();const te=[{name:"list_services",title:"List Services",description:"List the services configured on this DreamFactory instance."},{name:"get_service",title:"Get Service",description:"Retrieve one service, including its configuration."},{name:"create_service",title:"Create Service",description:"Create a new service (database, file, MCP, etc.)."},{name:"update_service",title:"Update Service",description:"Update an existing service, its label, or its configuration."},{name:"delete_service",title:"Delete Service",description:"Permanently delete a service by ID or name."},{name:"list_service_types",title:"List Service Types",description:"List the service types available on this instance."},{name:"get_service_type_schema",title:"Get Service Type Schema",description:"Return the configuration schema required to create a given service type."},{name:"get_environment",title:"Get Environment",description:"Read platform, license, and server environment information."},{name:"list_roles",title:"List Roles",description:"List the roles that control API access for apps and users."},{name:"create_role",title:"Create Role",description:"Create a role with service and component access rules."},{name:"get_role",title:"Get Role",description:"Retrieve one role with its access rules and lookups."},{name:"update_role",title:"Update Role",description:"Update a role, including its service access rules."},{name:"list_apps",title:"List Apps",description:"List apps (API keys) and the roles they are bound to."},{name:"create_app",title:"Create App",description:"Create an app, generating a new API key bound to a role."},{name:"get_app",title:"Get App",description:"Retrieve one app, including its API key and role."},{name:"list_admins",title:"List Admins",description:"List the administrator accounts on this instance."},{name:"get_access_audit",title:"Get Access Audit",description:"Report last-used / never-used / stale API keys, roles and users from system/access_usage."},{name:"call_system_api",title:"Call System API",description:"Call any /api/v2/system/* or /api/v2/user/* endpoint directly for operations not covered by a dedicated tool."}];function Rt(n){return"system_mcp"===(n??"").toString().trim().toLowerCase()}function Yi(n,a){1&n&&(e.j41(0,"div",9),e.EFF(1," Loading data services\u2026 "),e.k0s())}function Vi(n,a){if(1&n&&e.nrm(0,"fa-icon",15),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function zi(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",12),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(2);return e.Njj(r.toggle(c.name))}),e.DNE(2,Vi,1,1,"fa-icon",13),e.j41(3,"span",14),e.EFF(4),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("data-services__chip--selected",o.isSelected(t.name)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label||t.name)}}function Xi(n,a){if(1&n&&(e.j41(0,"ul",10),e.DNE(1,zi,5,4,"li",11),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.services)("ngForTrackBy",t.trackByName)}}function Bi(n,a){1&n&&(e.j41(0,"p",16),e.EFF(1," No database services exist yet. Create one under API Generation & Connections and come back. "),e.k0s())}const Li=new Set(["Database","Big Data","File","Excel"]);let Ui=(()=>{class n{constructor(){this.http=(0,e.WQX)(H.Qq),this.loading=!0,this.services=[],this.faDatabase=f.hem,this.faCircleCheck=f.QRE}ngOnInit(){(0,le.p)({types:this.http.get(`${U.C}/system/service_type`,{params:{fields:"name,group"}}),services:this.http.get(`${U.C}/system/service`,{params:{fields:"id,name,label,type",sort:"name"}})}).subscribe({next:({types:t,services:o})=>{const i=new Set((t.resource??[]).filter(c=>Li.has(c.group??"")).map(c=>c.name));this.services=(o.resource??[]).filter(c=>i.has(c.type)),this.loading=!1},error:()=>{this.loading=!1}})}get selected(){return this.parse(this.form.get("config.defaultDataServices")?.value)}isSelected(t){return this.selected.includes(t)}toggle(t){const o=this.selected,i=o.includes(t)?o.filter(c=>c!==t):[...o,t];this.form.get("config.defaultDataServices")?.setValue(i)}parse(t){if(Array.isArray(t))return t.map(String).filter(o=>o.length>0);if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(String).filter(i=>i.length>0)}catch{return[]}return[]}trackByName(t,o){return o.name}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-data-services"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:12,vars:6,consts:[[1,"data-services"],[1,"data-services__header"],[1,"data-services__icon",3,"icon"],[1,"data-services__title"],[1,"data-services__count"],[1,"data-services__hint"],["class","data-services__loading",4,"ngIf"],["class","data-services__list",4,"ngIf"],["class","data-services__empty",4,"ngIf"],[1,"data-services__loading"],[1,"data-services__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"data-services__chip",3,"click"],["class","data-services__chip-check",3,"icon",4,"ngIf"],[1,"data-services__name"],[1,"data-services__chip-check",3,"icon"],[1,"data-services__empty"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"fa-icon",2),e.j41(3,"span",3),e.EFF(4,"Data Services"),e.k0s(),e.j41(5,"span",4),e.EFF(6),e.k0s()(),e.j41(7,"p",5),e.EFF(8," Pick the databases the AI may query. The AI sees the intersection of these and what the caller's role can read. Leave all unselected to allow every data service the role grants. "),e.k0s(),e.DNE(9,Yi,2,0,"div",6),e.DNE(10,Xi,2,2,"ul",7),e.DNE(11,Bi,2,0,"p",8),e.k0s()),2&o&&(e.R7$(2),e.Y8G("icon",i.faDatabase),e.R7$(4),e.Lme(" ",i.selected.length," selected \xb7 ",i.services.length," available "),e.R7$(3),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading&&i.services.length>0),e.R7$(1),e.Y8G("ngIf",!i.loading&&0===i.services.length))},dependencies:[m.MD,m.Sq,m.bT,w.dX,w.aY],styles:[".data-services[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.data-services__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.data-services__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.data-services__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.data-services__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.data-services__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.data-services__loading[_ngcontent-%COMP%], .data-services__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.data-services__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.data-services__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.data-services__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.data-services__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.data-services__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.data-services__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.data-services__name[_ngcontent-%COMP%]{font-weight:500}"]})}}return n})();var It=_(63281),be=_(65571),de=_(21413),Ji=_(43236),Et=_(41584),re=_(56977);function Ki(n,a){1&n&&e.nrm(0,"div",18),2&n&&e.xc7("--confetti-index",a.$implicit)}function Hi(n,a){1&n&&e.nrm(0,"div",19),2&n&&e.xc7("--firework-index",a.$implicit)}const Qi=function(){return[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},Wi=function(){return[1,2,3,4,5]};function Zi(n,a){1&n&&(e.j41(0,"div",15),e.DNE(1,Ki,1,2,"div",16),e.DNE(2,Hi,1,2,"div",17),e.k0s()),2&n&&(e.R7$(1),e.Y8G("ngForOf",e.lJ4(2,Qi)),e.R7$(1),e.Y8G("ngForOf",e.lJ4(3,Wi)))}function ea(n,a){1&n&&e.nrm(0,"div",29)}function ta(n,a){if(1&n&&(e.j41(0,"div",20),e.DNE(1,ea,1,0,"div",21),e.j41(2,"div",22),e.nrm(3,"fa-icon",23),e.k0s(),e.j41(4,"div",24)(5,"h4",25),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"p",26),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"span",27),e.nrm(12,"fa-icon",28),e.EFF(13),e.k0s()()()),2&n){const t=a.$implicit,o=a.index,i=e.XpG();e.AVh("revealed",i.currentStep>=o)("pulse-animation",i.currentStep===o),e.R7$(1),e.Y8G("ngIf",o0),e.R7$(2),e.SpI(" ",e.bMT(8,8,"services.celebration.exploreLater")," "),e.R7$(3),e.SpI(" ",e.bMT(11,10,"services.celebration.autoRedirectTest")," ")}}const aa=function(n){return{name:n}};let ca=(()=>{class n{constructor(t,o,i){this.dialogRef=t,this.data=o,this.router=i,this.destroy$=new de.B,this.faCheckCircle=f.SGM,this.faRocket=f.KMJ,this.faShieldAlt=f.imB,this.faKey=f.bMg,this.faBolt=f.zm_,this.faDatabase=f.hem,this.faCopy=f.jPR,this.faCheck=f.e68,this.faFlask=f.rIc,this.faInfoCircle=f.iW_,this.showConfetti=!0,this.currentStep=-1,this.allStepsRevealed=!1,this.countdown=15,this.apiKeyCopied=!1,this.baseUrl=window.location.origin,this.steps=[{icon:f.hem,title:"services.celebration.steps.database.title",description:"services.celebration.steps.database.description",timing:"< 100ms"},{icon:f.zm_,title:"services.celebration.steps.endpoints.title",description:"services.celebration.steps.endpoints.description",timing:"< 50ms"},{icon:f.imB,title:"services.celebration.steps.security.title",description:"services.celebration.steps.security.description",timing:"< 200ms"},{icon:f.bMg,title:"services.celebration.steps.apiKey.title",description:"services.celebration.steps.apiKey.description",timing:"Instant"}],t.disableClose=!0}ngOnInit(){this.revealSteps(),setTimeout(()=>{this.startCountdown()},3e3)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}revealSteps(){this.steps.forEach((o,i)=>{setTimeout(()=>{this.currentStep=i,i===this.steps.length-1&&(this.allStepsRevealed=!0)},500*(i+1))})}startCountdown(){(function qi(n=0,a=Ji.E){return n<0&&(n=0),(0,Et.O)(n,n,a)})(1e3).pipe((0,re.Q)(this.destroy$)).subscribe(()=>{this.countdown--,0===this.countdown&&this.goToApiDocs()})}goToApiDocs(){this.dialogRef.close(),this.router.navigate(["/api-connections/api-docs",this.data.serviceName])}copyApiKey(){this.data.apiKey&&(navigator.clipboard.writeText(this.data.apiKey),this.apiKeyCopied=!0,setTimeout(()=>{this.apiKeyCopied=!1},2e3))}skipToHome(){this.dialogRef.close(),this.router.navigate(["/home"])}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP),e.rXU(b.Vh),e.rXU(G.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-celebration-dialog"]],standalone:!0,features:[e.aNF],decls:21,vars:18,consts:[[1,"celebration-dialog"],["class","celebration-effects",4,"ngIf"],[1,"dialog-content"],[1,"success-header"],[1,"success-icon-wrapper"],[1,"rocket-icon",3,"icon"],[1,"success-circle"],[1,"celebration-title"],[1,"celebration-subtitle"],[1,"steps-container"],[1,"steps-title"],[1,"steps-timeline"],["class","step-item",3,"revealed","pulse-animation",4,"ngFor","ngForOf"],["class","api-connection-section",4,"ngIf"],["class","dialog-actions",4,"ngIf"],[1,"celebration-effects"],["class","confetti",3,"--confetti-index",4,"ngFor","ngForOf"],["class","firework",3,"--firework-index",4,"ngFor","ngForOf"],[1,"confetti"],[1,"firework"],[1,"step-item"],["class","step-connector",4,"ngIf"],[1,"step-icon"],[3,"icon"],[1,"step-content"],[1,"step-title"],[1,"step-description"],[1,"step-timing"],[1,"timing-icon",3,"icon"],[1,"step-connector"],[1,"api-connection-section"],[1,"endpoint-preview"],[1,"endpoint-label"],[1,"endpoint-icon",3,"icon"],[1,"endpoint-display"],[1,"endpoint-hint"],[1,"api-key-subsection"],[1,"api-key-label"],[1,"key-icon",3,"icon"],[1,"api-key-display"],["mat-icon-button","",3,"matTooltip","click"],[1,"usage-hint"],[1,"info-icon",3,"icon"],[1,"dialog-actions"],["mat-raised-button","","color","primary",1,"test-api-button",3,"click"],[1,"button-icon",3,"icon"],["class","countdown",4,"ngIf"],["mat-stroked-button","",1,"explore-later-button",3,"click"],[1,"auto-redirect-note"],[1,"countdown"]],template:function(o,i){1&o&&(e.j41(0,"div",0),e.DNE(1,Zi,3,4,"div",1),e.j41(2,"div",2)(3,"div",3)(4,"div",4),e.nrm(5,"fa-icon",5)(6,"div",6),e.k0s(),e.j41(7,"h1",7),e.EFF(8),e.nI1(9,"transloco"),e.k0s(),e.j41(10,"p",8),e.EFF(11),e.nI1(12,"transloco"),e.k0s()(),e.j41(13,"div",9)(14,"h3",10),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.j41(17,"div",11),e.DNE(18,ta,14,14,"div",12),e.k0s()(),e.DNE(19,na,29,25,"div",13),e.DNE(20,ia,12,12,"div",14),e.k0s()()),2&o&&(e.R7$(1),e.Y8G("ngIf",i.showConfetti),e.R7$(2),e.Y8G("@fadeIn",void 0),e.R7$(2),e.Y8G("icon",i.faRocket),e.R7$(3),e.SpI(" ",e.bMT(9,9,"services.celebration.title")," "),e.R7$(3),e.SpI(" ",e.i5U(12,11,"services.celebration.subtitle",e.eq3(16,aa,i.data.serviceName))," "),e.R7$(4),e.SpI(" ",e.bMT(16,14,"services.celebration.whatHappened")," "),e.R7$(3),e.Y8G("ngForOf",i.steps),e.R7$(1),e.Y8G("ngIf",i.data.apiKey&&i.allStepsRevealed),e.R7$(1),e.Y8G("ngIf",i.allStepsRevealed))},dependencies:[m.MD,m.Sq,m.bT,b.hM,u.Hl,u.$z,u.iY,L.m_,R.uc,R.oV,$.Q8,$.Kj,w.dX,w.aY],styles:['.celebration-dialog[_ngcontent-%COMP%]{position:relative;padding:0;overflow:hidden;height:100%;display:flex;flex-direction:column;background:var(--df-surface);animation:_ngcontent-%COMP%_subtle-entrance .4s ease-out}@keyframes _ngcontent-%COMP%_subtle-entrance{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.celebration-effects[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:hidden;z-index:1}.confetti[_ngcontent-%COMP%]{position:absolute;width:10px;height:10px;top:-10px;animation:_ngcontent-%COMP%_confetti-fall calc(3s + var(--confetti-index) * .1s) linear infinite;animation-delay:calc(var(--confetti-index) * -.2s)}.confetti[_ngcontent-%COMP%]:before{content:"";position:absolute;width:100%;height:100%;background:linear-gradient(45deg,#7f11e0,#ff4081,#4caf50,#ffc107,#2196f3);background-size:500%;animation:_ngcontent-%COMP%_confetti-rotate 1s linear infinite;border-radius:2px;transform:rotate(calc(var(--confetti-index) * 30deg))}.confetti[_ngcontent-%COMP%]:nth-child(odd){left:calc(var(--confetti-index) * 6.5%)}.confetti[_ngcontent-%COMP%]:nth-child(2n){right:calc(var(--confetti-index) * 6.5%)}@keyframes _ngcontent-%COMP%_confetti-fall{0%{transform:translateY(-10px) rotate(0);opacity:1}to{transform:translateY(550px) rotate(720deg);opacity:0}}@keyframes _ngcontent-%COMP%_confetti-rotate{0%{background-position:0% 50%}to{background-position:100% 50%}}.firework[_ngcontent-%COMP%]{position:absolute;width:4px;height:4px;border-radius:50%;animation:_ngcontent-%COMP%_firework-launch calc(2s + var(--firework-index) * .3s) ease-out infinite;animation-delay:calc(var(--firework-index) * .5s)}.firework[_ngcontent-%COMP%]:nth-child(1){left:20%;background:#7f11e0}.firework[_ngcontent-%COMP%]:nth-child(2){left:40%;background:#ff4081}.firework[_ngcontent-%COMP%]:nth-child(3){left:50%;background:#4caf50}.firework[_ngcontent-%COMP%]:nth-child(4){left:60%;background:#ffc107}.firework[_ngcontent-%COMP%]:nth-child(5){left:80%;background:#2196f3}.firework[_ngcontent-%COMP%]:after{content:"";position:absolute;width:100px;height:100px;border-radius:50%;top:-48px;left:-48px;background:radial-gradient(circle,currentColor 0%,transparent 70%);opacity:0;animation:_ngcontent-%COMP%_firework-explode calc(2s + var(--firework-index) * .3s) ease-out infinite;animation-delay:calc(var(--firework-index) * .5s + .8s)}@keyframes _ngcontent-%COMP%_firework-launch{0%{transform:translateY(100vh) scale(1);opacity:1}40%{transform:translateY(30vh) scale(1);opacity:1}to{transform:translateY(30vh) scale(0);opacity:0}}@keyframes _ngcontent-%COMP%_firework-explode{0%{transform:scale(0);opacity:0}50%{transform:scale(1);opacity:.8}to{transform:scale(1.5);opacity:0}}.dialog-content[_ngcontent-%COMP%]{position:relative;z-index:2;padding:20px;max-width:100%;margin:0 auto;text-align:center;overflow-y:auto;overflow-x:hidden;flex:1;max-height:calc(85vh - 40px)}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--df-surface-2)}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--df-border);border-radius:3px}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--df-text-faint)}.success-header[_ngcontent-%COMP%]{text-align:center;margin-bottom:16px;animation:_ngcontent-%COMP%_fadeInDown .6s ease-out}.success-icon-wrapper[_ngcontent-%COMP%]{position:relative;width:64px;height:64px;margin:0 auto 16px}.success-icon-wrapper[_ngcontent-%COMP%] .rocket-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:32px;color:var(--df-accent);z-index:2;animation:_ngcontent-%COMP%_rocket-launch 2s ease-in-out infinite}.success-icon-wrapper[_ngcontent-%COMP%] .success-circle[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;border-radius:50%;background:var(--df-accent);opacity:.1;animation:_ngcontent-%COMP%_pulse-circle 2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_rocket-launch{0%,to{transform:translate(-50%,-50%) translateY(0)}50%{transform:translate(-50%,-50%) translateY(-5px)}}@keyframes _ngcontent-%COMP%_pulse-circle{0%,to{transform:scale(1);opacity:.1}50%{transform:scale(1.2);opacity:.2}}.celebration-title[_ngcontent-%COMP%]{font-size:2rem;font-weight:650;letter-spacing:-.015em;color:var(--df-text);margin:0 0 6px;animation:_ngcontent-%COMP%_bounce-in .8s ease-out;text-align:center}.celebration-subtitle[_ngcontent-%COMP%]{font-size:1.4rem;color:var(--df-text-2);margin:0;text-align:center}.steps-container[_ngcontent-%COMP%]{margin:12px 0;text-align:left;padding:0 8px}.steps-title[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);margin-bottom:12px;text-align:center}.steps-timeline[_ngcontent-%COMP%]{position:relative;padding-left:52px;max-width:450px;margin:0 auto}.step-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:flex-start;margin-bottom:12px;opacity:0;transform:translate(-20px);transition:all .5s ease-out}.step-item.revealed[_ngcontent-%COMP%]{opacity:1;transform:translate(0)}.step-item.pulse-animation[_ngcontent-%COMP%] .step-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-pulse .6s ease-out}.step-item[_ngcontent-%COMP%] .step-connector[_ngcontent-%COMP%]{position:absolute;left:-35px;top:36px;width:2px;height:36px;background:var(--df-border)}.step-icon[_ngcontent-%COMP%]{position:absolute;left:-52px;width:36px;height:36px;border-radius:50%;background:var(--df-accent);display:flex;align-items:center;justify-content:center;color:var(--df-accent-contrast);font-size:16px;flex-shrink:0}@keyframes _ngcontent-%COMP%_icon-pulse{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.step-content[_ngcontent-%COMP%]{margin-left:0;flex:1}.step-title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin:0 0 3px}.step-description[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-2);margin:0 0 6px;line-height:1.4}.step-timing[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;font-size:1.2rem;color:var(--df-success);font-weight:500}.step-timing[_ngcontent-%COMP%] .timing-icon[_ngcontent-%COMP%]{font-size:1.2rem}.api-connection-section[_ngcontent-%COMP%]{margin:12px auto;padding:14px;background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:var(--df-radius);animation:_ngcontent-%COMP%_slideUp .5s ease-out;max-width:480px}.endpoint-preview[_ngcontent-%COMP%]{margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--df-border-2)}.endpoint-label[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin-bottom:10px;display:flex;align-items:center;gap:8px}.endpoint-label[_ngcontent-%COMP%] .endpoint-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px}.endpoint-display[_ngcontent-%COMP%]{position:relative}.endpoint-display[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{display:block;padding:12px 16px;background:var(--df-code-bg);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.3rem;color:var(--df-code-text);overflow-x:auto;margin-bottom:4px}.endpoint-display[_ngcontent-%COMP%] .endpoint-hint[_ngcontent-%COMP%]{font-size:1.1rem;color:var(--df-text-faint);font-style:italic}.api-key-subsection[_ngcontent-%COMP%]{margin-bottom:10px}.api-key-label[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin-bottom:10px;display:flex;align-items:center;gap:8px}.api-key-label[_ngcontent-%COMP%] .key-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px}.api-key-display[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.api-key-display[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{flex:1;padding:10px 14px;background:var(--df-code-bg);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.3rem;color:var(--df-code-text);overflow-x:auto}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:var(--df-text-2);transition:color .2s ease}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover fa-icon[_ngcontent-%COMP%]{color:var(--df-accent)}.usage-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;padding:10px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);font-size:1.2rem;color:var(--df-text-2);line-height:1.4}.usage-hint[_ngcontent-%COMP%] .info-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:14px;margin-top:1px}.dialog-actions[_ngcontent-%COMP%]{text-align:center;margin-top:12px;padding-bottom:8px;animation:_ngcontent-%COMP%_fadeIn .5s ease-out}.test-api-button[_ngcontent-%COMP%]{padding:10px 28px;font-size:1.5rem;font-weight:500;letter-spacing:.3px;margin-bottom:10px;min-width:200px}.test-api-button[_ngcontent-%COMP%] .button-icon[_ngcontent-%COMP%]{margin-right:8px;font-size:18px}.test-api-button[_ngcontent-%COMP%] .countdown[_ngcontent-%COMP%]{margin-left:8px;opacity:.7;font-size:1.4rem}.explore-later-button[_ngcontent-%COMP%]{font-size:1.4rem;color:var(--df-text-2)}.explore-later-button[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.auto-redirect-note[_ngcontent-%COMP%]{margin-top:10px;font-size:1.2rem;color:var(--df-text-faint);text-align:center}@keyframes _ngcontent-%COMP%_fadeInDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}@keyframes _ngcontent-%COMP%_slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_bounce-in{0%{transform:scale(.8);opacity:0}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}']})}}return n})();var ve=_(25558),$t=_(95416),Gt=_(47926),se=_(43615);function ra(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",11)(1,"mat-button-toggle-group",12),e.bIt("click",function(i){return i.stopPropagation()})("change",function(i){e.eBV(t);const c=e.XpG().$implicit,r=e.XpG();return e.Njj(r.onAccessLevelChange(c,i.value))}),e.j41(2,"mat-button-toggle",13)(3,"span",14),e.nrm(4,"fa-icon",15),e.k0s(),e.EFF(5," Read Only "),e.k0s(),e.j41(6,"mat-button-toggle",16)(7,"span",14),e.nrm(8,"fa-icon",15),e.k0s(),e.EFF(9," Read & Write "),e.k0s(),e.j41(10,"mat-button-toggle",17)(11,"span",14),e.nrm(12,"fa-icon",15),e.k0s(),e.EFF(13," Full Access "),e.k0s()()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("value",t.selected?t.level:null)("disabled",!t.selected),e.R7$(3),e.Y8G("icon",o.faEye),e.R7$(4),e.Y8G("icon",o.faPen),e.R7$(4),e.Y8G("icon",o.faLockOpen)}}function sa(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-card",6),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.toggleCard(c))}),e.j41(1,"div",7)(2,"div",8),e.EFF(3),e.k0s(),e.j41(4,"div",9),e.EFF(5),e.k0s()(),e.DNE(6,ra,14,5,"div",10),e.k0s()}if(2&n){const t=a.$implicit;e.AVh("selected",t.selected)("read-level",t.selected&&"read"===t.level)("write-level",t.selected&&"write"===t.level)("full-level",t.selected&&"full"===t.level),e.R7$(3),e.JRh(t.label),e.R7$(2),e.JRh(t.description),e.R7$(1),e.Y8G("ngIf","fullAccess"!==t.key)}}let la=(()=>{class n{constructor(t,o,i,c,r){this.router=t,this.snackBar=o,this.systemService=i,this.snackbarService=c,this.dialog=r,this.serviceName="",this.serviceId=null,this.isDatabase=!1,this.isFirstTimeUser=!1,this.goBack=new e.bkB,this.faEye=f.pS3,this.faPen=f.hpd,this.faLockOpen=f.pNp,this.securityConfigurations=[],this.accessOptions=[]}ngOnInit(){this.initializeAccessOptions()}initializeAccessOptions(){this.accessOptions=[{key:"fullAccess",label:"Full Access",description:"Grant complete access to all database components",selected:!1,level:"read"},{key:"schemaAccess",label:"Schema Access",description:"Configure access to specific database schemas",selected:!1,level:"read"},{key:"tableAccess",label:"Table Access",description:"Manage access to individual database tables",selected:!1,level:"read"},{key:"storedProcedures",label:"Stored Procedures",description:"Control access to stored procedures",selected:!1,level:"read"},{key:"functions",label:"Functions",description:"Set access levels for database functions",selected:!1,level:"read"}]}toggleCard(t){if("fullAccess"===t.key)t.selected||this.accessOptions.forEach(o=>{"fullAccess"!==o.key&&o.selected&&(o.selected=!1,this.removeSecurityConfiguration(o.key))});else{const o=this.accessOptions.find(i=>"fullAccess"===i.key);o&&o.selected&&(o.selected=!1,this.removeSecurityConfiguration(o.key))}t.selected=!t.selected,t.selected?this.addSecurityConfiguration(t):this.removeSecurityConfiguration(t.key)}addSecurityConfiguration(t){let o="",i="";switch(t.key){case"fullAccess":o="all",i="*";break;case"schemaAccess":o="schema",i="_schema/*";break;case"tableAccess":o="tables",i="_table/*";break;case"storedProcedures":o="procedures",i="_proc/*";break;case"functions":o="functions",i="_func/*"}const c={accessType:o,accessLevel:t.level,component:i};this.securityConfigurations.push(c),console.log("Added security configuration:",c),console.log("All configurations:",this.securityConfigurations)}removeSecurityConfiguration(t){const o=this.securityConfigurations.findIndex(i=>{switch(t){case"fullAccess":return"all"===i.accessType;case"schemaAccess":return"schema"===i.accessType;case"tableAccess":return"tables"===i.accessType;case"storedProcedures":return"procedures"===i.accessType;case"functions":return"functions"===i.accessType;default:return!1}});if(-1!==o){const i=this.securityConfigurations.splice(o,1)[0];console.log("Removed security configuration:",i),console.log("Remaining configurations:",this.securityConfigurations)}}onAccessLevelChange(t,o){t.level=o;const i=this.securityConfigurations.findIndex(c=>{switch(t.key){case"fullAccess":return"all"===c.accessType;case"schemaAccess":return"schema"===c.accessType;case"tableAccess":return"tables"===c.accessType;case"storedProcedures":return"procedures"===c.accessType;case"functions":return"functions"===c.accessType;default:return!1}});-1!==i&&(this.securityConfigurations[i].accessLevel=o,console.log("Updated access level for configuration:",this.securityConfigurations[i]))}handleGoBack(){console.log("Back button clicked"),this.goBack.emit()}isSecurityConfigValid(){if(!this.accessOptions.some(o=>o.selected)||0===this.securityConfigurations.length)return!1;for(const o of this.securityConfigurations){if(!o.accessType||!o.accessLevel||!o.component)return!1;if("all"===o.accessType){if("*"!==o.component)return!1}else if(!o.component.includes("/*"))return!1}return!0}saveSecurityConfig(){if(!this.isSecurityConfigValid())return void this.snackbarService.openSnackBar("Please select at least one access option and ensure all required fields are filled","error");if(!this.serviceId)return void this.snackBar.open("No service ID found. Please try again.","Close",{duration:3e3});const t=this.formatServiceName(this.serviceName),o=`${this.serviceName}_auto_role`,i=this.securityConfigurations.map(r=>({service_id:this.serviceId,component:r.component,verb_mask:this.getAccessLevel(r.accessLevel),requestor_mask:3,filters:[],filter_op:"AND"})),c={resource:[{name:o,description:`Auto-generated role for service ${this.serviceName}`,is_active:!0,role_service_access_by_role_id:i,user_to_app_to_role_by_role_id:[]}]};console.log("Creating role with multiple configurations:",c),this.systemService.post("role",c).pipe((0,N.W)(r=>(0,ue.$)(()=>r)),(0,ve.n)(r=>r?.resource?.[0]?.id?this.systemService.post("app?fields=*&related=role_by_role_id",{resource:[{name:`${this.serviceName}_app`,description:`Auto-generated app for service ${this.serviceName}`,type:"0",role_id:r.resource[0].id,is_active:!0,url:null,storage_service_id:null,storage_container:null,path:null}]}).pipe((0,N.W)(p=>(this.snackBar.open(`Error creating app: ${(0,$e.cQ)(p).message}`,"Close",{duration:5e3}),(0,ue.$)(()=>p))),(0,K.T)(p=>{if(!p?.resource?.[0])throw new Error("App response missing resource array");const v=p.resource[0];if(!v.apiKey)throw new Error("App response missing apiKey");return{apiKey:v.apiKey,formattedName:t}}),(0,N.W)(p=>(0,ue.$)(()=>p))):(0,ue.$)(()=>new Error("Invalid role response"))),(0,K.T)(r=>{if(!r?.apiKey)throw new Error("Invalid app response");return{apiKey:r.apiKey,formattedName:t}})).subscribe({next:r=>{navigator.clipboard?navigator.clipboard.writeText(r.apiKey).then(()=>{this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s) and API Key copied to clipboard`,"success")}).catch(()=>{this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s), but failed to copy API Key`,"success")}):this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s), but failed to copy API Key`,"success"),this.isFirstTimeUser&&this.isDatabase?this.dialog.open(ca,{width:"550px",maxWidth:"90vw",maxHeight:"85vh",disableClose:!0,panelClass:"celebration-dialog-container",data:{serviceName:r.formattedName,apiKey:r.apiKey,isFirstTime:!0}}):this.router.navigateByUrl(`/api-connections/api-docs/${r.formattedName}`,{replaceUrl:!0}).then(s=>{s||this.router.navigate(["api-connections","api-docs",r.formattedName],{replaceUrl:!0})})},error:r=>{this.snackbarService.openSnackBar("Error saving security configuration","error")}})}getAccessLevel(t){switch(t){case"read":return 1;case"write":return 7;case"full":return 15;default:return 0}}formatServiceName(t){return t.toLowerCase().replace(/\s+/g,"").replace(/[^a-z0-9_-]/g,"")}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(G.Ix),e.rXU($t.UG),e.rXU(Gt.D),e.rXU(se.L),e.rXU(b.bZ))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-security-config"]],inputs:{serviceName:"serviceName",serviceId:"serviceId",isDatabase:"isDatabase",isFirstTimeUser:"isFirstTimeUser"},outputs:{goBack:"goBack"},standalone:!0,features:[e.aNF],decls:10,vars:2,consts:[[1,"security-config-wrapper"],[1,"security-cards-container"],["class","security-option-card",3,"selected","read-level","write-level","full-level","click",4,"ngFor","ngForOf"],[1,"action-buttons"],["mat-stroked-button","",3,"click"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],[1,"security-option-card",3,"click"],[1,"card-header"],[1,"card-title"],[1,"card-description"],["class","toggle-container",4,"ngIf"],[1,"toggle-container"],["appearance","legacy",1,"access-toggle-group",3,"value","disabled","click","change"],["value","read",1,"read-toggle"],[1,"toggle-icon"],[3,"icon"],["value","write",1,"write-toggle"],["value","full",1,"full-toggle"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h3"),e.EFF(2,"Security Configuration"),e.k0s(),e.j41(3,"div",1),e.DNE(4,sa,7,11,"mat-card",2),e.k0s(),e.j41(5,"div",3)(6,"button",4),e.bIt("click",function(){return i.handleGoBack()}),e.EFF(7,"Back"),e.k0s(),e.j41(8,"button",5),e.bIt("click",function(){return i.saveSecurityConfig()}),e.EFF(9," Apply Security Configuration "),e.k0s()()()),2&o&&(e.R7$(4),e.Y8G("ngForOf",i.accessOptions),e.R7$(4),e.Y8G("disabled",!i.isSecurityConfigValid()))},dependencies:[m.MD,m.Sq,m.bT,d.YN,he.Hu,he.RN,be.Vg,be.ec,be.pc,u.Hl,u.$z,q.g7,L.m_,w.dX,w.aY],styles:[".security-config-wrapper[_ngcontent-%COMP%]{padding:24px;max-width:1200px;margin:0 auto}.security-config-wrapper[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:24px;font-size:24px;font-weight:600;color:#1976d2;text-align:center}.security-cards-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:20px;margin-bottom:32px}@media (max-width: 768px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:16px}}@media (min-width: 769px) and (max-width: 1024px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media (min-width: 1025px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}.security-option-card[_ngcontent-%COMP%]{padding:20px;cursor:pointer;border:2px solid #e0e0e0;border-radius:12px;transition:all .3s cubic-bezier(.4,0,.2,1);background:linear-gradient(135deg,#ffffff 0%,#f8f9fa 100%);position:relative;overflow:hidden}.security-option-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 8px 25px #0000001a;border-color:#1976d2}.security-option-card.selected[_ngcontent-%COMP%]{border-color:#1976d2;box-shadow:0 4px 20px #1976d226}.security-option-card.selected.read-level[_ngcontent-%COMP%]{border-color:#2196f3;background:linear-gradient(135deg,#e3f2fd 0%,#bbdefb 100%)}.security-option-card.selected.write-level[_ngcontent-%COMP%]{border-color:#fbc02d;background:linear-gradient(135deg,#fffde7 0%,#fff9c4 100%)}.security-option-card.selected.full-level[_ngcontent-%COMP%]{border-color:#43a047;background:linear-gradient(135deg,#e8f5e9 0%,#c8e6c9 100%)}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{margin-bottom:16px}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;margin-bottom:8px;color:#333}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] .card-description[_ngcontent-%COMP%]{font-size:14px;color:#666;line-height:1.5}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-level-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#666;margin-bottom:8px;text-transform:uppercase;letter-spacing:.5px}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px;box-shadow:none}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle-checked[_ngcontent-%COMP%]{color:#666}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{background-color:#eee;font-size:12px;padding:6px 12px;width:100%;border-radius:6px;transition:all .2s ease}@media (max-width: 768px){.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{width:150px}}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;background-color:#f5f5f5;color:#999;border-color:#ddd}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-icon[_ngcontent-%COMP%]{margin-right:4px;font-size:14px}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.read-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#2196f3;color:#fff}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.write-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#fbc02d;color:#fff}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.full-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#43a047;color:#fff}.action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:12px;margin-top:24px;padding-top:16px;border-top:1px solid #e0e0e0}"]})}}return n})();var He=_(60169),Z=_(19468),da=_(47787),jt=_(63035),pa=_(48391);let Qe=class Mt{constructor(a,t,o,i,c){this.dialog=a,this.fileService=t,this.cacheService=o,this.baseService=i,this.themeService=c,this.storageServices=[],this.checked=!1,this.isDarkMode=this.themeService.darkMode$,this.baseService.getAll({additionalParams:[{key:"group",value:"source control,file"}]}).subscribe(r=>{this.storageServices=r.services})}ngOnInit(){this.content.setValue(this.contentText)}fileUpload(a){const t=a.target;t.files&&(0,jt.Sj)(t.files[0]).subscribe(o=>{this.content.setValue(o)})}githubImport(){this.dialog.open(pa.z).afterClosed().subscribe(t=>{t&&this.content.setValue(window.atob(t.data.content))})}static{this.\u0275fac=function(t){return new(t||Mt)(e.rXU(b.bZ),e.rXU(A.qJ),e.rXU(A.j8),e.rXU(A.qJ),e.rXU(Ge.n))}}static{this.\u0275cmp=e.VBU({type:Mt,selectors:[["df-file-github"]],inputs:{cache:"cache",type:"type",contentText:"contentText",content:"content"},standalone:!0,features:[e.aNF],decls:11,vars:8,consts:[[1,"details-section"],[1,"actions","full-width"],["type","file",2,"display","none",3,"accept","change"],["fileInput",""],["type","button","mat-flat-button","",1,"save-btn",3,"click"],[1,"full-width",3,"formControl","mode"]],template:function(t,o){if(1&t){const i=e.RV6();e.j41(0,"div",0)(1,"div",1)(2,"input",2,3),e.bIt("change",function(r){return o.fileUpload(r)}),e.k0s(),e.j41(4,"button",4),e.bIt("click",function(){e.eBV(i);const r=e.sdS(3);return e.Njj(r.click())}),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.j41(7,"button",4),e.bIt("click",function(){return o.githubImport()}),e.EFF(8),e.nI1(9,"transloco"),e.k0s()(),e.nrm(10,"df-ace-editor",5),e.k0s()}2&t&&(e.R7$(5),e.SpI(" ",e.bMT(6,4,"desktopFile")," "),e.R7$(3),e.SpI(" ",e.bMT(9,6,"githubFile")," "),e.R7$(2),e.Y8G("formControl",o.content)("mode",o.type.getRawValue()))},dependencies:[u.Hl,u.$z,$.Kj,y.RG,I.Ve,q.g7,d.YN,d.BC,b.hM,E.fS,It.s,d.X1,d.l_],styles:[".actions[_ngcontent-%COMP%]{display:flex;gap:16px}"]})}};Qe=(0,ie.Cg)([(0,X.d)({checkProperties:!0})],Qe);var ma=_(73028),Ce=_(89642),xe=_(86662),_a=_(10233),Q=_(59115),We=_(76939),Nt=_(18617),Ze=_(28203),ke=_(14085),et=_(67336),ga=_(36860);function fa(n,a){1&n&&e.SdG(0)}const ua=["*"];let At=(()=>{class n{constructor(t){this._elementRef=t}focus(){this._elementRef.nativeElement.focus()}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.aKT))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]})}}return n})(),Yt=(()=>{class n{constructor(t){this.template=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["","cdkStepLabel",""]]})}}return n})(),ha=0;const Vt=new e.nKC("STEPPER_GLOBAL_OPTIONS");let tt=(()=>{class n{get editable(){return this._editable}set editable(t){this._editable=(0,ke.he)(t)}get optional(){return this._optional}set optional(t){this._optional=(0,ke.he)(t)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(t){this._completedOverride=(0,ke.he)(t)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(t){this._customError=(0,ke.he)(t)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(t,o){this._stepper=t,this.interacted=!1,this.interactedStream=new e.bkB,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=o||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??null!=this._customError}static{this.\u0275fac=function(o){return new(o||n)(e.rXU((0,e.Rfq)(()=>Se)),e.rXU(Vt,8))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["cdk-step"]],contentQueries:function(o,i,c){if(1&o&&e.wni(c,Yt,5),2&o){let r;e.mGM(r=e.lsd())&&(i.stepLabel=r.first)}},viewQuery:function(o,i){if(1&o&&e.GBs(e.C4Q,7),2&o){let c;e.mGM(c=e.lsd())&&(i.content=c.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state",editable:"editable",optional:"optional",completed:"completed",hasError:"hasError"},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[e.OA$],ngContentSelectors:ua,decls:1,vars:0,template:function(o,i){1&o&&(e.NAR(),e.DNE(0,fa,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}}return n})(),Se=(()=>{class n{get linear(){return this._linear}set linear(t){this._linear=(0,ke.he)(t)}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const o=(0,ke.OE)(t);this.steps&&this._steps?(this._isValidIndex(o),this.selected?._markAsInteracted(),this._selectedIndex!==o&&!this._anyControlsInvalidOrPending(o)&&(o>=this._selectedIndex||this.steps.toArray()[o].editable)&&this._updateSelectedItemIndex(o)):this._selectedIndex=o}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(t){this.selectedIndex=t&&this.steps?this.steps.toArray().indexOf(t):-1}get orientation(){return this._orientation}set orientation(t){this._orientation=t,this._keyManager&&this._keyManager.withVerticalOrientation("vertical"===t)}constructor(t,o,i){this._dir=t,this._changeDetectorRef=o,this._elementRef=i,this._destroyed=new de.B,this.steps=new e.rOR,this._sortedHeaders=new e.rOR,this._linear=!1,this._selectedIndex=0,this.selectionChange=new e.bkB,this.selectedIndexChange=new e.bkB,this._orientation="horizontal",this._groupId=ha++}ngAfterContentInit(){this._steps.changes.pipe((0,we.Z)(this._steps),(0,re.Q)(this._destroyed)).subscribe(t=>{this.steps.reset(t.filter(o=>o._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe((0,we.Z)(this._stepHeader),(0,re.Q)(this._destroyed)).subscribe(t=>{this._sortedHeaders.reset(t.toArray().sort((o,i)=>o._elementRef.nativeElement.compareDocumentPosition(i._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new Nt.Bu(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:(0,ce.of)()).pipe((0,we.Z)(this._layoutDirection()),(0,re.Q)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(t=>t.reset()),this._stateChanged()}_getStepLabelId(t){return`cdk-step-label-${this._groupId}-${t}`}_getStepContentId(t){return`cdk-step-content-${this._groupId}-${t}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(t){const o=t-this._selectedIndex;return o<0?"rtl"===this._layoutDirection()?"next":"previous":o>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(t,o="number"){const i=this.steps.toArray()[t],c=this._isCurrentStep(t);return i._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(i,c):this._getGuidelineLogic(i,c,o)}_getDefaultIndicatorLogic(t,o){return t._showError()&&t.hasError&&!o?"error":!t.completed||o?"number":t.editable?"edit":"done"}_getGuidelineLogic(t,o,i="number"){return t._showError()&&t.hasError&&!o?"error":t.completed&&!o?"done":t.completed&&o?i:t.editable&&o?"edit":i}_isCurrentStep(t){return this._selectedIndex===t}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(t){const o=this.steps.toArray();this.selectionChange.emit({selectedIndex:t,previouslySelectedIndex:this._selectedIndex,selectedStep:o[t],previouslySelectedStep:o[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(t):this._keyManager.updateActiveItem(t),this._selectedIndex=t,this.selectedIndexChange.emit(this._selectedIndex),this._stateChanged()}_onKeydown(t){const o=(0,et.rp)(t),i=t.keyCode,c=this._keyManager;null==c.activeItemIndex||o||i!==et.t6&&i!==et.Fm?c.setFocusOrigin("keyboard").onKeydown(t):(this.selectedIndex=c.activeItemIndex,t.preventDefault())}_anyControlsInvalidOrPending(t){return!!(this._linear&&t>=0)&&this.steps.toArray().slice(0,t).some(o=>{const i=o.stepControl;return(i?i.invalid||i.pending||!o.interacted:!o.completed)&&!o.optional&&!o._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){const t=this._elementRef.nativeElement,o=(0,ga.vc)();return t===o||t.contains(o)}_isValidIndex(t){return t>-1&&(!this.steps||t{class n{constructor(t){this._stepper=t,this.type="submit"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Se))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(o,i){1&o&&e.bIt("click",function(){return i._stepper.next()}),2&o&&e.Mr5("type",i.type)},inputs:{type:"type"}})}}return n})(),va=(()=>{class n{constructor(t){this._stepper=t,this.type="button"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Se))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(o,i){1&o&&e.bIt("click",function(){return i._stepper.previous()}),2&o&&e.Mr5("type",i.type)},inputs:{type:"type"}})}}return n})(),Ca=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({imports:[Ze.jI]})}}return n})();var xa=_(18359),ka=_(23294),S=_(49969);function ya(n,a){if(1&n&&e.eu8(0,8),2&n){const t=e.XpG();e.Y8G("ngTemplateOutlet",t.iconOverrides[t.state])("ngTemplateOutletContext",t._getIconContext())}}function Ma(n,a){if(1&n&&(e.j41(0,"span",13),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._getDefaultTextForState(t.state))}}function Oa(n,a){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._intl.completedLabel)}}function Pa(n,a){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._intl.editableLabel)}}function Fa(n,a){if(1&n&&(e.j41(0,"mat-icon",13),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._getDefaultTextForState(t.state))}}function wa(n,a){if(1&n&&(e.qex(0,9),e.DNE(1,Ma,2,1,"span",10),e.DNE(2,Oa,2,1,"span",11),e.DNE(3,Pa,2,1,"span",11),e.DNE(4,Fa,2,1,"mat-icon",12),e.bVm()),2&n){const t=e.XpG();e.Y8G("ngSwitch",t.state),e.R7$(1),e.Y8G("ngSwitchCase","number"),e.R7$(1),e.Y8G("ngIf","done"===t.state),e.R7$(1),e.Y8G("ngIf","edit"===t.state)}}function Da(n,a){if(1&n&&(e.j41(0,"div",15),e.eu8(1,16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngTemplateOutlet",t._templateLabel().template)}}function Ta(n,a){if(1&n&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.label)}}function Sa(n,a){if(1&n&&(e.j41(0,"div",17),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t._intl.optionalLabel)}}function Ra(n,a){if(1&n&&(e.j41(0,"div",18),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.errorMessage)}}function Ia(n,a){}function Ea(n,a){if(1&n&&(e.SdG(0),e.DNE(1,Ia,0,0,"ng-template",0)),2&n){const t=e.XpG();e.R7$(1),e.Y8G("cdkPortalOutlet",t._portal)}}const $a=["*"];function Ga(n,a){1&n&&e.nrm(0,"div",11)}const zt=function(n,a){return{step:n,i:a}};function ja(n,a){if(1&n&&(e.qex(0),e.eu8(1,9),e.DNE(2,Ga,1,0,"div",10),e.bVm()),2&n){const t=a.$implicit,o=a.index,i=a.last;e.XpG(2);const c=e.sdS(4);e.R7$(1),e.Y8G("ngTemplateOutlet",c)("ngTemplateOutletContext",e.l_i(3,zt,t,o)),e.R7$(1),e.Y8G("ngIf",!i)}}const Xt=function(n){return{animationDuration:n}},Bt=function(n,a){return{value:n,params:a}};function Na(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",12),e.bIt("@horizontalStepTransition.done",function(i){e.eBV(t);const c=e.XpG(2);return e.Njj(c._animationDone.next(i))}),e.eu8(1,13),e.k0s()}if(2&n){const t=a.$implicit,o=a.index,i=e.XpG(2);e.AVh("mat-horizontal-stepper-content-inactive",i.selectedIndex!==o),e.Y8G("@horizontalStepTransition",e.l_i(8,Bt,i._getAnimationDirection(o),e.eq3(6,Xt,i._getAnimationDuration())))("id",i._getStepContentId(o)),e.BMQ("aria-labelledby",i._getStepLabelId(o)),e.R7$(1),e.Y8G("ngTemplateOutlet",t.content)}}function Aa(n,a){if(1&n&&(e.j41(0,"div",4)(1,"div",5),e.DNE(2,ja,3,6,"ng-container",6),e.k0s(),e.j41(3,"div",7),e.DNE(4,Na,2,11,"div",8),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngForOf",t.steps),e.R7$(2),e.Y8G("ngForOf",t.steps)}}function Ya(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",15),e.eu8(1,9),e.j41(2,"div",16)(3,"div",17),e.bIt("@verticalStepTransition.done",function(i){e.eBV(t);const c=e.XpG(2);return e.Njj(c._animationDone.next(i))}),e.j41(4,"div",18),e.eu8(5,13),e.k0s()()()()}if(2&n){const t=a.$implicit,o=a.index,i=a.last,c=e.XpG(2),r=e.sdS(4);e.R7$(1),e.Y8G("ngTemplateOutlet",r)("ngTemplateOutletContext",e.l_i(10,zt,t,o)),e.R7$(1),e.AVh("mat-stepper-vertical-line",!i),e.R7$(1),e.AVh("mat-vertical-stepper-content-inactive",c.selectedIndex!==o),e.Y8G("@verticalStepTransition",e.l_i(15,Bt,c._getAnimationDirection(o),e.eq3(13,Xt,c._getAnimationDuration())))("id",c._getStepContentId(o)),e.BMQ("aria-labelledby",c._getStepLabelId(o)),e.R7$(2),e.Y8G("ngTemplateOutlet",t.content)}}function Va(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ya,6,18,"div",14),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.steps)}}function za(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-step-header",19),e.bIt("click",function(){const c=e.eBV(t).step;return e.Njj(c.select())})("keydown",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c._onKeydown(i))}),e.k0s()}if(2&n){const t=a.step,o=a.i,i=e.XpG();e.AVh("mat-horizontal-stepper-header","horizontal"===i.orientation)("mat-vertical-stepper-header","vertical"===i.orientation),e.Y8G("tabIndex",i._getFocusIndex()===o?0:-1)("id",i._getStepLabelId(o))("index",o)("state",i._getIndicatorType(o,t.state))("label",t.stepLabel||t.label)("selected",i.selectedIndex===o)("active",i._stepIsNavigable(o,t))("optional",t.optional)("errorMessage",t.errorMessage)("iconOverrides",i._iconOverrides)("disableRipple",i.disableRipple||!i._stepIsNavigable(o,t))("color",t.color||i.color),e.BMQ("aria-posinset",o+1)("aria-setsize",i.steps.length)("aria-controls",i._getStepContentId(o))("aria-selected",i.selectedIndex==o)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null)("aria-disabled",!i._stepIsNavigable(o,t)||null)}}let Ne=(()=>{class n extends Yt{static{this.\u0275fac=function(){let t;return function(i){return(t||(t=e.xGo(n)))(i||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["","matStepLabel",""]],features:[e.Vt3]})}}return n})(),Ae=(()=>{class n{constructor(){this.changes=new de.B,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const Ba={provide:Ae,deps:[[new e.Xx1,new e.kdw,Ae]],useFactory:function Xa(n){return n||new Ae}},La=(0,Y.Zc)(class extends At{constructor(a){super(a)}},"primary");let Lt=(()=>{class n extends La{constructor(t,o,i,c){super(i),this._intl=t,this._focusMonitor=o,this._intlSubscription=t.changes.subscribe(()=>c.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(t,o){t?this._focusMonitor.focusVia(this._elementRef,t,o):this._elementRef.nativeElement.focus(o)}_stringLabel(){return this.label instanceof Ne?null:this.label}_templateLabel(){return this.label instanceof Ne?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(t){return"number"==t?`${this.index+1}`:"edit"==t?"create":"error"==t?"warning":t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Ae),e.rXU(Nt.FN),e.rXU(e.aKT),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],inputs:{color:"color",state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[e.Vt3],decls:10,vars:19,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content",3,"ngSwitch"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngSwitchCase"],[3,"ngSwitch",4,"ngSwitchDefault"],[1,"mat-step-label"],["class","mat-step-text-label",4,"ngIf"],["class","mat-step-optional",4,"ngIf"],["class","mat-step-sub-label-error",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["aria-hidden","true",4,"ngSwitchCase"],["class","cdk-visually-hidden",4,"ngIf"],["aria-hidden","true",4,"ngSwitchDefault"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(o,i){1&o&&(e.nrm(0,"div",0),e.j41(1,"div")(2,"div",1),e.DNE(3,ya,1,2,"ng-container",2),e.DNE(4,wa,5,4,"ng-container",3),e.k0s()(),e.j41(5,"div",4),e.DNE(6,Da,2,1,"div",5),e.DNE(7,Ta,2,1,"div",5),e.DNE(8,Sa,2,1,"div",6),e.DNE(9,Ra,2,1,"div",7),e.k0s()),2&o&&(e.Y8G("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disableRipple),e.R7$(1),e.ZvI("mat-step-icon-state-",i.state," mat-step-icon"),e.AVh("mat-step-icon-selected",i.selected),e.R7$(1),e.Y8G("ngSwitch",!(!i.iconOverrides||!i.iconOverrides[i.state])),e.R7$(1),e.Y8G("ngSwitchCase",!0),e.R7$(2),e.AVh("mat-step-label-active",i.active)("mat-step-label-selected",i.selected)("mat-step-label-error","error"==i.state),e.R7$(1),e.Y8G("ngIf",i._templateLabel()),e.R7$(1),e.Y8G("ngIf",i._stringLabel()),e.R7$(1),e.Y8G("ngIf",i.optional&&"error"!=i.state),e.R7$(1),e.Y8G("ngIf","error"==i.state))},dependencies:[m.bT,m.T3,m.ux,m.e1,m.fG,L.An,Y.r6],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color)}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color)}@media(hover: none){.mat-step-header:hover{background:none}}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color)}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color);background-color:var(--mat-stepper-header-icon-background-color)}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color);color:var(--mat-stepper-header-error-state-icon-foreground-color)}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font);font-size:var(--mat-stepper-header-label-text-size);font-weight:var(--mat-stepper-header-label-text-weight);color:var(--mat-stepper-header-label-text-color)}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color)}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color);font-size:var(--mat-stepper-header-error-state-label-text-size)}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size);font-weight:var(--mat-stepper-header-selected-state-label-text-weight)}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color);color:var(--mat-stepper-header-selected-state-icon-foreground-color)}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color);color:var(--mat-stepper-header-done-state-icon-foreground-color)}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color);color:var(--mat-stepper-header-edit-state-icon-foreground-color)}'],encapsulation:2,changeDetection:0})}}return n})();const qt={horizontalStepTransition:(0,S.hZ)("horizontalStepTransition",[(0,S.wk)("previous",(0,S.iF)({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),(0,S.wk)("current",(0,S.iF)({transform:"none",visibility:"inherit"})),(0,S.wk)("next",(0,S.iF)({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),(0,S.kY)("* => *",(0,S.Os)([(0,S.i0)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),(0,S.P)("@*",(0,S.MA)(),{optional:!0})]),{params:{animationDuration:"500ms"}})]),verticalStepTransition:(0,S.hZ)("verticalStepTransition",[(0,S.wk)("previous",(0,S.iF)({height:"0px",visibility:"hidden"})),(0,S.wk)("next",(0,S.iF)({height:"0px",visibility:"hidden"})),(0,S.wk)("current",(0,S.iF)({height:"*",visibility:"inherit"})),(0,S.kY)("* <=> current",(0,S.Os)([(0,S.i0)("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),(0,S.P)("@*",(0,S.MA)(),{optional:!0})]),{params:{animationDuration:"225ms"}})])};let Kt=(()=>{class n{constructor(t){this.templateRef=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}})}}return n})(),Ua=(()=>{class n{constructor(t){this._template=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["ng-template","matStepContent",""]]})}}return n})(),Ht=(()=>{class n extends tt{constructor(t,o,i,c){super(t,c),this._errorStateMatcher=o,this._viewContainerRef=i,this._isSelected=xa.yU.EMPTY,this.stepLabel=void 0}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe((0,ve.n)(()=>this._stepper.selectionChange.pipe((0,K.T)(t=>t.selectedStep===this),(0,we.Z)(this._stepper.selected===this)))).subscribe(t=>{t&&this._lazyContent&&!this._portal&&(this._portal=new We.VA(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(t,o){return this._errorStateMatcher.isErrorState(t,o)||!!(t&&t.invalid&&this.interacted)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU((0,e.Rfq)(()=>Qt)),e.rXU(Y.es,4),e.rXU(e.c1b),e.rXU(Vt,8))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-step"]],contentQueries:function(o,i,c){if(1&o&&(e.wni(c,Ne,5),e.wni(c,Ua,5)),2&o){let r;e.mGM(r=e.lsd())&&(i.stepLabel=r.first),e.mGM(r=e.lsd())&&(i._lazyContent=r.first)}},inputs:{color:"color"},exportAs:["matStep"],features:[e.Jv_([{provide:Y.es,useExisting:n},{provide:tt,useExisting:n}]),e.Vt3],ngContentSelectors:$a,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(o,i){1&o&&(e.NAR(),e.DNE(0,Ea,2,1,"ng-template"))},dependencies:[We.I3],encapsulation:2,changeDetection:0})}}return n})(),Qt=(()=>{class n extends Se{get animationDuration(){return this._animationDuration}set animationDuration(t){this._animationDuration=/^\d+$/.test(t)?t+"ms":t}constructor(t,o,i){super(t,o,i),this._stepHeader=void 0,this._steps=void 0,this.steps=new e.rOR,this.animationDone=new e.bkB,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new de.B,this._animationDuration="";const c=i.nativeElement.nodeName.toLowerCase();this.orientation="mat-vertical-stepper"===c?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:t,templateRef:o})=>this._iconOverrides[t]=o),this.steps.changes.pipe((0,re.Q)(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe((0,ka.F)((t,o)=>t.fromState===o.fromState&&t.toState===o.toState),(0,re.Q)(this._destroyed)).subscribe(t=>{"current"===t.toState&&this.animationDone.emit()})}_stepIsNavigable(t,o){return o.completed||this.selectedIndex===t||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:"horizontal"===this.orientation?"500ms":"225ms"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Ze.dS,8),e.rXU(e.gRc),e.rXU(e.aKT))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(o,i,c){if(1&o&&(e.wni(c,Ht,5),e.wni(c,Kt,5)),2&o){let r;e.mGM(r=e.lsd())&&(i._steps=r),e.mGM(r=e.lsd())&&(i._icons=r)}},viewQuery:function(o,i){if(1&o&&e.GBs(Lt,5),2&o){let c;e.mGM(c=e.lsd())&&(i._stepHeader=c)}},hostAttrs:["role","tablist","ngSkipHydration",""],hostVars:11,hostBindings:function(o,i){2&o&&(e.BMQ("aria-orientation",i.orientation),e.AVh("mat-stepper-horizontal","horizontal"===i.orientation)("mat-stepper-vertical","vertical"===i.orientation)("mat-stepper-label-position-end","horizontal"===i.orientation&&"end"==i.labelPosition)("mat-stepper-label-position-bottom","horizontal"===i.orientation&&"bottom"==i.labelPosition)("mat-stepper-header-position-bottom","bottom"===i.headerPosition))},inputs:{selectedIndex:"selectedIndex",disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[e.Jv_([{provide:Se,useExisting:n}]),e.Vt3],decls:5,vars:3,consts:[[3,"ngSwitch"],["class","mat-horizontal-stepper-wrapper",4,"ngSwitchCase"],[4,"ngSwitchCase"],["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[4,"ngFor","ngForOf"],[1,"mat-horizontal-content-container"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id","mat-horizontal-stepper-content-inactive",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","mat-stepper-horizontal-line",4,"ngIf"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],["class","mat-step",4,"ngFor","ngForOf"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color","click","keydown"]],template:function(o,i){1&o&&(e.qex(0,0),e.DNE(1,Aa,5,2,"div",1),e.DNE(2,Va,2,1,"ng-container",2),e.bVm(),e.DNE(3,za,1,23,"ng-template",null,3,e.C5r)),2&o&&(e.Y8G("ngSwitch",i.orientation),e.R7$(1),e.Y8G("ngSwitchCase","horizontal"),e.R7$(1),e.Y8G("ngSwitchCase","vertical"))},dependencies:[m.Sq,m.bT,m.T3,m.ux,m.e1,Lt],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font);background:var(--mat-stepper-container-color)}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color);top:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[qt.horizontalStepTransition,qt.verticalStepTransition]},changeDetection:0})}}return n})(),Ja=(()=>{class n extends ba{static{this.\u0275fac=function(){let t;return function(i){return(t||(t=e.xGo(n)))(i||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(o,i){2&o&&e.Mr5("type",i.type)},inputs:{type:"type"},features:[e.Vt3]})}}return n})(),qa=(()=>{class n extends va{static{this.\u0275fac=function(){let t;return function(i){return(t||(t=e.xGo(n)))(i||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","matStepperPrevious",""]],hostAttrs:[1,"mat-stepper-previous"],hostVars:1,hostBindings:function(o,i){2&o&&e.Mr5("type",i.type)},inputs:{type:"type"},features:[e.Vt3]})}}return n})(),Ka=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({providers:[Ba,Y.es],imports:[Y.yE,m.MD,We.jc,Ca,L.m_,Y.pZ,Y.yE]})}}return n})();var V=_(5951),Ha=_(71997),Wt=_(82298),Qa=_(95351);const Wa=["calendlyWidget"];let Za=(()=>{class n{constructor(t,o,i,c){this.userDataService=t,this.systemConfigService=o,this.dfPaywallService=i,this.data=c}ngOnInit(){const o=this.userDataService.userData?.email,i=this.systemConfigService?.environment?.client?.ipAddress;this.dfPaywallService.trackPaywallHit(o,i,this.data.serviceName)}ngAfterViewInit(){window.Calendly.initInlineWidget({url:"https://calendly.com/dreamfactory-platform/unlock-all-features",parentElement:this.calendlyWidget.nativeElement,autoLoad:!1})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Dt.T),e.rXU(Wt.f),e.rXU(Qa.o),e.rXU(b.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-paywall-modal"]],viewQuery:function(o,i){if(1&o&&e.GBs(Wa,5),2&o){let c;e.mGM(c=e.lsd())&&(i.calendlyWidget=c.first)}},standalone:!0,features:[e.aNF],decls:39,vars:27,consts:[[1,"app-container",2,"padding","12px 20px"],["mat-dialog-title","",2,"text-align","center"],[1,"paywall-container"],[1,"details-section"],[1,"info-columns"],[1,"info-column"],[3,"innerHTML"],[1,"paywall-contact"],["href","tel:+1 415-993-5877"],["href","mailto:info@dreamfactory.com"],[1,"calendly-inline-widget"],["calendlyWidget",""]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h1",1),e.EFF(2,"Unlock Service"),e.k0s(),e.j41(3,"mat-dialog-content")(4,"div",2)(5,"h2"),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"h2"),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"div",3)(12,"div",4)(13,"div",5)(14,"h4"),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.nrm(17,"p",6),e.nI1(18,"transloco"),e.k0s(),e.j41(19,"div",5)(20,"h4"),e.EFF(21),e.nI1(22,"transloco"),e.k0s(),e.j41(23,"p"),e.EFF(24),e.nI1(25,"transloco"),e.k0s()()()(),e.j41(26,"h2"),e.EFF(27),e.nI1(28,"transloco"),e.k0s()(),e.j41(29,"h3",7)(30,"a",8),e.EFF(31),e.nI1(32,"transloco"),e.k0s(),e.EFF(33," | "),e.j41(34,"a",9),e.EFF(35),e.nI1(36,"transloco"),e.k0s()(),e.nrm(37,"div",10,11),e.k0s()()),2&o&&(e.R7$(6),e.JRh(e.bMT(7,9,"paywall.header")),e.R7$(3),e.JRh(e.bMT(10,11,"paywall.subheader")),e.R7$(6),e.JRh(e.bMT(16,13,"paywall.hostedTrial")),e.R7$(2),e.Y8G("innerHTML",e.bMT(18,15,"paywall.bookTime"),e.npT),e.R7$(4),e.JRh(e.bMT(22,17,"paywall.learnMoreTitle")),e.R7$(3),e.JRh(e.bMT(25,19,"paywall.gain")),e.R7$(3),e.JRh(e.bMT(28,21,"paywall.speakToHuman")),e.R7$(4),e.SpI("",e.bMT(32,23,"phone"),": +1 415-993-5877"),e.R7$(4),e.SpI(" ",e.bMT(36,25,"email"),": info@dreamfactory.com "))},dependencies:[b.hM,b.BI,b.Yi,u.Hl,$.Kj]})}}return n})();var ec=_(86003),nt=_(56583),tc=_(83801);function nc(n,a){if(1&n&&(e.j41(0,"span",29),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" \xb7 ",t.role,"")}}function oc(n,a){if(1&n&&(e.j41(0,"mat-option",27),e.EFF(1),e.DNE(2,nc,2,1,"span",28),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.apiKey),e.R7$(1),e.SpI(" ",t.label,""),e.R7$(1),e.Y8G("ngIf",t.role)}}function ic(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",9)(1,"mat-label"),e.EFF(2),e.k0s(),e.j41(3,"mat-select",10),e.bIt("selectionChange",function(i){e.eBV(t);const c=e.XpG(2);return e.Njj(c.selectedKey=i.value)}),e.DNE(4,oc,3,3,"mat-option",26),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();let i;e.R7$(2),e.JRh(t("keyLabel")),e.R7$(1),e.Y8G("value",null!==(i=o.selectedKey)&&void 0!==i?i:o.keyOptions[0].apiKey),e.R7$(1),e.Y8G("ngForOf",o.keyOptions)("ngForTrackBy",o.trackByLabel)}}function ac(n,a){if(1&n){const t=e.RV6();e.j41(0,"dd",15)(1,"code",16),e.EFF(2),e.k0s(),e.j41(3,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onCopy("authHeader",i.headerName+": "+i.activeKey))}),e.nrm(4,"fa-icon",18),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(2),e.Lme("",o.headerName,": ",o.activeKey,""),e.R7$(1),e.Y8G("matTooltip",t("authHeader"===o.copiedBlock?"copied":"copy")),e.BMQ("aria-label",t("copy")),e.R7$(1),e.AVh("is-copied","authHeader"===o.copiedBlock),e.Y8G("icon","authHeader"===o.copiedBlock?o.faCheck:o.faCopy)}}function cc(n,a){if(1&n){const t=e.RV6();e.j41(0,"dd",30),e.nrm(1,"df-badge",31),e.j41(2,"span",32),e.EFF(3),e.k0s(),e.j41(4,"button",33),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.createKey.emit())}),e.nrm(5,"fa-icon",18),e.EFF(6),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("label",t("noKeyBadge")),e.R7$(2),e.JRh(t("noKeyHint")),e.R7$(2),e.Y8G("icon",o.faPlus),e.R7$(1),e.SpI(" ",t("createKey")," ")}}function rc(n,a){1&n&&e.eu8(0)}function sc(n,a){1&n&&e.eu8(0)}function lc(n,a){1&n&&e.eu8(0)}function dc(n,a){if(1&n&&(e.EFF(0),e.nrm(1,"df-badge",34)),2&n){const t=e.XpG().$implicit;e.SpI(" ",t("tabs.mcp")," "),e.R7$(1),e.Y8G("dot",!1)}}function pc(n,a){1&n&&e.eu8(0)}function mc(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",35)(1,"div",36)(2,"span",37),e.EFF(3),e.k0s(),e.j41(4,"button",38),e.bIt("click",function(){const i=e.eBV(t),c=i.id,r=i.code,s=e.XpG(2);return e.Njj(s.onCopy(c,r))}),e.nrm(5,"fa-icon",18),e.EFF(6),e.k0s()(),e.j41(7,"pre",39)(8,"code"),e.EFF(9),e.k0s()()()}if(2&n){const t=a.id,o=a.code,i=a.note,c=e.XpG().$implicit,r=e.XpG();e.R7$(3),e.JRh(i),e.R7$(1),e.AVh("is-copied",r.copiedBlock===t),e.R7$(1),e.Y8G("icon",r.copiedBlock===t?r.faCheck:r.faCopy),e.R7$(1),e.SpI(" ",c(r.copiedBlock===t?"copied":"copy")," "),e.R7$(3),e.JRh(o)}}const ye=function(n){return{table:n}},_c=function(n,a){return{id:"curl",code:n,note:a}},gc=function(n,a){return{id:"javascript",code:n,note:a}},fc=function(n,a){return{id:"python",code:n,note:a}},uc=function(n,a){return{id:"mcp",code:n,note:a}};function hc(n,a){if(1&n){const t=e.RV6();e.j41(0,"section",1)(1,"header",2)(2,"div",3)(3,"span",4),e.EFF(4),e.k0s(),e.j41(5,"h3",5),e.EFF(6),e.k0s(),e.j41(7,"p",6),e.EFF(8),e.k0s()(),e.j41(9,"div",7),e.DNE(10,ic,5,4,"mat-form-field",8),e.j41(11,"mat-form-field",9)(12,"mat-label"),e.EFF(13),e.k0s(),e.j41(14,"mat-select",10),e.bIt("selectionChange",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.format=i.value)}),e.j41(15,"mat-option",11),e.EFF(16,"JSON"),e.k0s(),e.j41(17,"mat-option",12),e.EFF(18,"XML"),e.k0s()()()()(),e.j41(19,"dl",13)(20,"div",14)(21,"dt",4),e.EFF(22),e.k0s(),e.j41(23,"dd",15)(24,"code",16),e.EFF(25),e.k0s(),e.j41(26,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.onCopy("baseUrl",i.resolvedBase))}),e.nrm(27,"fa-icon",18),e.k0s()()(),e.j41(28,"div",14)(29,"dt",4),e.EFF(30),e.k0s(),e.DNE(31,ac,5,7,"dd",19),e.DNE(32,cc,7,4,"ng-template",null,20,e.C5r),e.k0s()(),e.j41(34,"mat-tab-group",21)(35,"mat-tab",22),e.DNE(36,rc,1,0,"ng-container",23),e.k0s(),e.j41(37,"mat-tab",22),e.DNE(38,sc,1,0,"ng-container",23),e.k0s(),e.j41(39,"mat-tab",22),e.DNE(40,lc,1,0,"ng-container",23),e.k0s(),e.j41(41,"mat-tab"),e.DNE(42,dc,2,2,"ng-template",24),e.DNE(43,pc,1,0,"ng-container",23),e.k0s()(),e.DNE(44,mc,10,6,"ng-template",null,25,e.C5r),e.k0s()}if(2&n){const t=a.$implicit,o=e.sdS(33),i=e.sdS(45),c=e.XpG();e.R7$(4),e.JRh(t("eyebrow")),e.R7$(2),e.JRh(t("title")),e.R7$(2),e.JRh(t("subtitle")),e.R7$(2),e.Y8G("ngIf",c.hasKey),e.R7$(3),e.JRh(t("formatLabel")),e.R7$(1),e.Y8G("value",c.format),e.R7$(8),e.JRh(t("baseUrlLabel")),e.R7$(3),e.JRh(c.resolvedBase),e.R7$(1),e.Y8G("matTooltip",t("baseUrl"===c.copiedBlock?"copied":"copy")),e.BMQ("aria-label",t("copy")),e.R7$(1),e.AVh("is-copied","baseUrl"===c.copiedBlock),e.Y8G("icon","baseUrl"===c.copiedBlock?c.faCheck:c.faCopy),e.R7$(3),e.JRh(t("authHeaderLabel")),e.R7$(1),e.Y8G("ngIf",c.hasKey)("ngIfElse",o),e.R7$(3),e.Y8G("mat-stretch-tabs",!1),e.R7$(1),e.Y8G("label",t("tabs.curl")),e.R7$(1),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.l_i(32,_c,c.curlSnippet,c.activeKeyVerified?t("runNote",e.eq3(28,ye,c.sampleTable)):t("previewNote",e.eq3(30,ye,c.sampleTable)))),e.R7$(1),e.Y8G("label",t("tabs.javascript")),e.R7$(1),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.l_i(39,gc,c.javascriptSnippet,c.activeKeyVerified?t("runNote",e.eq3(35,ye,c.sampleTable)):t("previewNote",e.eq3(37,ye,c.sampleTable)))),e.R7$(1),e.Y8G("label",t("tabs.python")),e.R7$(1),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.l_i(46,fc,c.pythonSnippet,c.activeKeyVerified?t("runNote",e.eq3(42,ye,c.sampleTable)):t("previewNote",e.eq3(44,ye,c.sampleTable)))),e.R7$(3),e.Y8G("ngTemplateOutlet",i)("ngTemplateOutletContext",e.l_i(49,uc,c.mcpSnippet,t("mcpNote")))}}let bc=(()=>{class n{get keyOptions(){return this.keys?.length?this.keys:this.apiKey?[{label:"Default key",apiKey:this.apiKey}]:[]}get hasKey(){return this.keyOptions.length>0}get activeKey(){return this.hasKey?(this.keyOptions.find(o=>o.apiKey===this.selectedKey)??this.keyOptions[0]).apiKey:"YOUR_API_KEY"}get activeKeyVerified(){return!!this.hasKey&&!!(this.keyOptions.find(o=>o.apiKey===this.selectedKey)??this.keyOptions[0]).verified}get resolvedBase(){return(this.baseUrl??"").replace(/\/+$/,"")||`${this.origin}${U.C}/${this.serviceName}`}get endpointUrl(){return`${this.resolvedBase}/_table/${this.sampleTable}?limit=5`}get resolvedMcpUrl(){return(this.mcpUrl??`${this.resolvedBase}/_mcp`).replace(/\/+$/,"")}get acceptHeader(){return"xml"===this.format?"application/xml":"application/json"}get curlSnippet(){return[`curl -X GET '${this.endpointUrl}' \\`,` -H 'Accept: ${this.acceptHeader}' \\`,` -H '${this.headerName}: ${this.activeKey}'`].join("\n")}get javascriptSnippet(){return[`const res = await fetch('${this.endpointUrl}', {`," headers: {",` 'Accept': '${this.acceptHeader}',`,` '${this.headerName}': '${this.activeKey}',`," },","});",`const data = await res.${"xml"===this.format?"text":"json"}();`,"console.log(data);"].join("\n")}get pythonSnippet(){return["import requests","","res = requests.get(",` '${this.endpointUrl}',`," headers={",` 'Accept': '${this.acceptHeader}',`,` '${this.headerName}': '${this.activeKey}',`," },",")",`print(${"xml"===this.format?"res.text":"res.json()"})`].join("\n")}get mcpSnippet(){return["{",' "mcpServers": {',` "dreamfactory-${this.serviceName||"service"}": {`,' "type": "http",',` "url": "${this.resolvedMcpUrl}",`,' "headers": {',` "${this.headerName}": "${this.activeKey}"`," }"," }"," }","}"].join("\n")}onCopy(t,o){this.clipboard.copy(o),this.copiedBlock=t,this.copied.emit(t),this.copyTimer&&clearTimeout(this.copyTimer),this.copyTimer=setTimeout(()=>{this.copiedBlock=null},1600)}trackByLabel(t,o){return o.apiKey}constructor(t){this.clipboard=t,this.serviceName="",this.sampleTable="your_table",this.keys=[],this.createKey=new e.bkB,this.copied=new e.bkB,this.selectedKey=null,this.format="json",this.copiedBlock=null,this.headerName=Le.dE,this.faCopy=f.jPR,this.faCheck=f.e68,this.faPlus=f.QLR,this.origin=typeof window<"u"&&window.location?window.location.origin:""}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(tc.B0))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-artifact-card"]],inputs:{serviceName:"serviceName",baseUrl:"baseUrl",apiKey:"apiKey",sampleTable:"sampleTable",keys:"keys",mcpUrl:"mcpUrl"},outputs:{createKey:"createKey",copied:"copied"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","artifact-card",4,"transloco","translocoRead"],[1,"artifact-card"],[1,"artifact-card__head"],[1,"artifact-card__intro"],[1,"df-eyebrow"],[1,"artifact-card__title"],[1,"artifact-card__subtitle"],[1,"artifact-card__switchers"],["appearance","outline","class","artifact-card__field",4,"ngIf"],["appearance","outline",1,"artifact-card__field"],["panelClass","artifact-card__panel",3,"value","selectionChange"],["value","json"],["value","xml"],[1,"artifact-card__meta"],[1,"artifact-card__meta-row"],[1,"artifact-card__meta-val"],[1,"artifact-card__inline"],["type","button","mat-icon-button","",1,"artifact-card__copy",3,"matTooltip","click"],[3,"icon"],["class","artifact-card__meta-val",4,"ngIf","ngIfElse"],["noKey",""],["animationDuration","0ms","disableRipple","",1,"artifact-card__tabs",3,"mat-stretch-tabs"],[3,"label"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["mat-tab-label",""],["block",""],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["class","artifact-card__opt-role",4,"ngIf"],[1,"artifact-card__opt-role"],[1,"artifact-card__meta-val","artifact-card__nokey"],["variant","neutral",3,"label"],[1,"artifact-card__nokey-hint"],["type","button","mat-button","",1,"artifact-card__nokey-cta",3,"click"],["variant","ai","label","MCP",1,"artifact-card__mcp-badge",3,"dot"],[1,"artifact-card__block"],[1,"artifact-card__code-head"],[1,"artifact-card__note"],["type","button","mat-button","",1,"artifact-card__copy-btn",3,"click"],[1,"artifact-card__code"]],template:function(o,i){1&o&&e.DNE(0,hc,46,52,"section",0),2&o&&e.Y8G("translocoRead","artifactCard")},dependencies:[m.bT,m.pM,m.T3,$.Q8,$.bA,_e.RI,_e.ES,_e.mq,_e.T8,I.Ve,y.rl,y.nJ,I.VO,Y.wT,y.RG,u.Hl,u.$z,u.iY,R.uc,R.oV,w.dX,w.aY,nt.v],styles:["[_nghost-%COMP%]{display:block}.artifact-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4);padding:var(--df-space-5);background-color:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius)}.artifact-card__head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:var(--df-space-4)}.artifact-card__intro[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);min-width:0}.artifact-card__title[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-lg);font-weight:var(--df-font-weight-heading);line-height:var(--df-lh-tight);color:var(--df-text)}.artifact-card__subtitle[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm);color:var(--df-text-muted)}.artifact-card__switchers[_ngcontent-%COMP%]{display:flex;gap:var(--df-space-3);flex-wrap:wrap}.artifact-card__field[_ngcontent-%COMP%]{width:11rem}.artifact-card__field[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper{display:none}.artifact-card__opt-role[_ngcontent-%COMP%]{color:var(--df-text-muted)}.artifact-card__meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);margin:0;padding:var(--df-space-3) var(--df-space-4);background-color:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm)}.artifact-card__meta-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);min-width:0}.artifact-card__meta-row[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{flex:0 0 5.5rem}.artifact-card__meta-val[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2);margin:0;min-width:0;flex:1 1 auto}.artifact-card__inline[_ngcontent-%COMP%]{font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-text-2);overflow-x:auto;white-space:nowrap;padding:var(--df-space-1) 0}.artifact-card__copy[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted);transition:color var(--df-duration-fast) var(--df-ease-standard)}.artifact-card__copy[_ngcontent-%COMP%]:hover{color:var(--df-text)}.artifact-card__copy[_ngcontent-%COMP%] .is-copied[_ngcontent-%COMP%]{color:var(--df-success)}.artifact-card__nokey[_ngcontent-%COMP%]{flex-wrap:wrap}.artifact-card__nokey-hint[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);color:var(--df-text-muted)}.artifact-card__nokey-cta[_ngcontent-%COMP%]{color:var(--df-accent)}.artifact-card__nokey-cta[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--df-space-1)}.artifact-card__mcp-badge[_ngcontent-%COMP%]{margin-left:var(--df-space-2)}.artifact-card__block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);padding-top:var(--df-space-3)}.artifact-card__code-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--df-space-3)}.artifact-card__note[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);color:var(--df-text-muted)}.artifact-card__copy-btn[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted);font-size:var(--df-font-size-xs);transition:color var(--df-duration-fast) var(--df-ease-standard)}.artifact-card__copy-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--df-space-1)}.artifact-card__copy-btn[_ngcontent-%COMP%]:hover{color:var(--df-text)}.artifact-card__copy-btn.is-copied[_ngcontent-%COMP%]{color:var(--df-success)}.artifact-card__code[_ngcontent-%COMP%]{margin:0;padding:var(--df-space-4);background-color:var(--df-code-bg);color:var(--df-code-text);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);line-height:var(--df-lh-base);overflow-x:auto}.artifact-card__code[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:inherit;white-space:pre}"]})}}return n})();var Zt=_(74243),en=_(13141),Re=_(78789);function vc(n,a){1&n&&(e.j41(0,"div",6),e.nrm(1,"df-skeleton",7),e.k0s()),2&n&&(e.R7$(1),e.Y8G("count",4))}function Cc(n,a){if(1&n&&e.nrm(0,"df-empty-state",8),2&n){const t=e.XpG().$implicit;e.Y8G("title",t("emptyTitle"))("description",t("emptyHint"))}}function xc(n,a){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.JRh(t)}}function kc(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.onCellClick(r,c))}),e.nrm(1,"span",19),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG().$implicit,i=e.XpG(2).$implicit,c=e.XpG();e.AVh("scope-matrix__cell--full","full"===c.cellState(o,t))("scope-matrix__cell--filtered","filtered"===c.cellState(o,t))("scope-matrix__cell--none","none"===c.cellState(o,t)),e.Y8G("disabled","none"===c.cellState(o,t))("title",i("state."+c.cellState(o,t))),e.BMQ("aria-label",o.roleName+" "+t+": "+i("state."+c.cellState(o,t)))}}function yc(n,a){if(1&n&&(e.j41(0,"div",15)(1,"span",16),e.EFF(2),e.k0s(),e.DNE(3,kc,2,9,"button",17),e.k0s()),2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("title",t.roleName),e.R7$(1),e.JRh(t.roleName),e.R7$(1),e.Y8G("ngForOf",o.verbs)("ngForTrackBy",o.trackByVerb)}}function Mc(n,a){if(1&n&&(e.j41(0,"div",9)(1,"div",10)(2,"span",11),e.EFF(3),e.k0s(),e.DNE(4,xc,2,1,"span",12),e.k0s(),e.DNE(5,yc,4,4,"div",13),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.BMQ("aria-label",t("ariaLabel")),e.R7$(3),e.JRh(t("roleHeader")),e.R7$(1),e.Y8G("ngForOf",o.verbs)("ngForTrackBy",o.trackByVerb),e.R7$(1),e.Y8G("ngForOf",o.rows)("ngForTrackBy",o.trackByRoleId)}}function Oc(n,a){if(1&n&&(e.j41(0,"div",20)(1,"span",21),e.nrm(2,"span",22),e.EFF(3),e.k0s(),e.j41(4,"span",21),e.nrm(5,"span",23),e.EFF(6),e.k0s(),e.j41(7,"span",21),e.nrm(8,"span",24),e.EFF(9),e.k0s()()),2&n){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("state.full")),e.R7$(3),e.JRh(t("state.filtered")),e.R7$(3),e.JRh(t("state.none"))}}function Pc(n,a){if(1&n&&(e.qex(0),e.j41(1,"section",1),e.DNE(2,vc,2,1,"div",2),e.DNE(3,Cc,1,2,"df-empty-state",3),e.DNE(4,Mc,6,6,"div",4),e.DNE(5,Oc,10,3,"div",5),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.rows.length),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.rows.length>0),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.rows.length>0)}}let Fc=(()=>{class n{constructor(t){this.scope=t,this.cellClick=new e.bkB,this.verbs=Re.e,this.rows=[],this.loading=!1,this.destroy$=new de.B}ngOnChanges(t){"serviceId"in t&&this.load()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onCellClick(t,o){"none"!==t.verbs[o]&&this.cellClick.emit({roleId:t.roleId,verb:o})}trackByRoleId(t,o){return o.roleId}trackByVerb(t,o){return o}load(){const t=this.serviceId;this.rows=[],null!=t&&(this.loading=!0,this.scope.matrixForService(t).pipe((0,re.Q)(this.destroy$)).subscribe(o=>{this.loading=!1,this.rows=o.roles}))}cellState(t,o){return t.verbs[o]}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Re.q))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-scope-matrix"]],inputs:{serviceId:"serviceId"},outputs:{cellClick:"cellClick"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["data-testid","df-scope-matrix",1,"scope-matrix"],["class","scope-matrix__loading",4,"ngIf"],["icon","security",3,"title","description",4,"ngIf"],["class","scope-matrix__grid","role","table",4,"ngIf"],["class","scope-matrix__legend","aria-hidden","true",4,"ngIf"],[1,"scope-matrix__loading"],["variant","table-row",3,"count"],["icon","security",3,"title","description"],["role","table",1,"scope-matrix__grid"],["role","row",1,"scope-matrix__row","scope-matrix__row--head"],["role","columnheader",1,"scope-matrix__corner"],["class","scope-matrix__verb","role","columnheader",4,"ngFor","ngForOf","ngForTrackBy"],["class","scope-matrix__row","role","row",4,"ngFor","ngForOf","ngForTrackBy"],["role","columnheader",1,"scope-matrix__verb"],["role","row",1,"scope-matrix__row"],["role","rowheader",1,"scope-matrix__role",3,"title"],["type","button","class","scope-matrix__cell","role","cell",3,"scope-matrix__cell--full","scope-matrix__cell--filtered","scope-matrix__cell--none","disabled","title","click",4,"ngFor","ngForOf","ngForTrackBy"],["type","button","role","cell",1,"scope-matrix__cell",3,"disabled","title","click"],["aria-hidden","true",1,"scope-matrix__dot"],["aria-hidden","true",1,"scope-matrix__legend"],[1,"scope-matrix__legend-item"],[1,"scope-matrix__dot","scope-matrix__dot--full"],[1,"scope-matrix__dot","scope-matrix__dot--filtered"],[1,"scope-matrix__dot","scope-matrix__dot--none"]],template:function(o,i){1&o&&e.DNE(0,Pc,6,4,"ng-container",0),2&o&&e.Y8G("translocoRead","scopeMatrix")},dependencies:[m.MD,m.Sq,m.bT,$.Q8,$.bA,Zt.M,en.d],styles:["[_nghost-%COMP%]{display:block}.scope-matrix[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4)}.scope-matrix__loading[_ngcontent-%COMP%]{padding:var(--df-space-2) 0}.scope-matrix__grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);overflow-x:auto;padding-bottom:var(--df-space-1)}.scope-matrix__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(12rem,1.4fr) repeat(5,minmax(4.4rem,1fr));align-items:center;gap:var(--df-space-2);min-width:40rem}.scope-matrix__row--head[_ngcontent-%COMP%]{padding-bottom:var(--df-space-1);border-bottom:1px solid var(--df-border-2)}.scope-matrix__corner[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-heading);color:var(--df-text-muted);text-transform:uppercase;letter-spacing:.04em}.scope-matrix__verb[_ngcontent-%COMP%]{justify-self:center;font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-heading);color:var(--df-text-2);letter-spacing:.02em}.scope-matrix__role[_ngcontent-%COMP%]{font-size:var(--df-font-size-sm);color:var(--df-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scope-matrix__cell[_ngcontent-%COMP%]{justify-self:center;display:inline-flex;align-items:center;justify-content:center;width:2.8rem;height:2.8rem;padding:0;border:1px solid transparent;border-radius:var(--df-radius-sm);background:transparent;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}.scope-matrix__cell[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--df-hover);border-color:var(--df-border)}.scope-matrix__cell[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:1px}.scope-matrix__cell[_ngcontent-%COMP%]:disabled{cursor:default}.scope-matrix__dot[_ngcontent-%COMP%]{width:1.2rem;height:1.2rem;border-radius:50%;display:inline-block;flex:none;background:var(--df-text-muted);box-shadow:0 0 0 .3rem transparent}.scope-matrix__cell--full[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--full[_ngcontent-%COMP%]{background:var(--df-success);box-shadow:0 0 0 .3rem var(--df-success-soft)}.scope-matrix__cell--filtered[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--filtered[_ngcontent-%COMP%]{background:var(--df-warning);box-shadow:0 0 0 .3rem var(--df-warning-soft)}.scope-matrix__cell--none[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--none[_ngcontent-%COMP%]{background:var(--df-text-faint);box-shadow:none}.scope-matrix__legend[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--df-space-4);padding-top:var(--df-space-1)}.scope-matrix__legend-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-2);font-size:var(--df-font-size-xs);color:var(--df-text-muted)}"]})}}return n})();var wc=_(84665),Dc=_(6761),Tc=_(12831);function Sc(n,a){if(1&n&&(e.qex(0),e.j41(1,"span",13),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"df-error-detail",14),e.bVm()),2&n){const t=e.XpG(4);e.R7$(2),e.JRh(e.bMT(3,2,t.probeError.message)),e.R7$(2),e.Y8G("error",t.probeError)}}function Rc(n,a){if(1&n&&(e.j41(0,"li",11)(1,"span",12),e.EFF(2),e.nI1(3,"transloco"),e.DNE(4,Sc,5,4,"ng-container",0),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI(" ",e.bMT(3,2,"services.health.probe.failed")," "),e.R7$(2),e.Y8G("ngIf",t.probeError)}}function Ic(n,a){if(1&n&&(e.j41(0,"a",16),e.EFF(1),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",5),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(3);e.Y8G("routerLink",t.fix),e.R7$(1),e.SpI(" ",e.bMT(2,3,"services.health.fix."+t.id)," "),e.R7$(2),e.Y8G("icon",o.faArrowRight)}}function Ec(n,a){if(1&n&&(e.j41(0,"li",11)(1,"span",12),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.DNE(4,Ic,4,5,"a",15),e.k0s()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(e.bMT(3,2,"services.health.rules."+t.id)),e.R7$(2),e.Y8G("ngIf",t.fix)}}function $c(n,a){if(1&n&&(e.j41(0,"section",3),e.nI1(1,"transloco"),e.j41(2,"header",4),e.nrm(3,"fa-icon",5),e.j41(4,"span",6),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.nrm(7,"df-badge",7),e.nI1(8,"transloco"),e.k0s(),e.j41(9,"ul",8),e.DNE(10,Rc,5,4,"li",9),e.DNE(11,Ec,5,4,"li",10),e.k0s()()),2&n){const t=e.XpG(2);e.AVh("health-panel--danger","danger"===t.level),e.BMQ("aria-label",e.bMT(1,9,"services.health.panelAria")),e.R7$(3),e.Y8G("icon",t.faShieldHalved),e.R7$(2),e.JRh(e.bMT(6,11,"services.health.header")),e.R7$(2),e.Y8G("variant",t.level)("label",e.bMT(8,13,"services.health.level."+t.level)),e.R7$(3),e.Y8G("ngIf","failed"===t.probe),e.R7$(1),e.Y8G("ngForOf",null==t.health?null:t.health.rules)}}function Gc(n,a){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.checking")))}function jc(n,a){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.unsupported")))}function Nc(n,a){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.ok")))}function Ac(n,a){if(1&n&&(e.j41(0,"p",17),e.nrm(1,"fa-icon",5),e.j41(2,"span",18),e.DNE(3,Gc,3,3,"ng-container",19),e.DNE(4,jc,3,3,"ng-container",19),e.DNE(5,Nc,3,3,"ng-container",20),e.k0s()()),2&n){const t=e.XpG(2);e.AVh("health-panel__ok--muted","ok"!==t.probe),e.R7$(1),e.Y8G("icon","ok"===t.probe?t.faCircleCheck:t.faShieldHalved),e.R7$(1),e.Y8G("ngSwitch",t.probe),e.R7$(1),e.Y8G("ngSwitchCase","checking"),e.R7$(1),e.Y8G("ngSwitchCase","unsupported")}}function Yc(n,a){if(1&n&&(e.qex(0),e.DNE(1,$c,12,15,"section",1),e.DNE(2,Ac,6,6,"ng-template",null,2,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG();e.R7$(1),e.Y8G("ngIf",o.hasFindings)("ngIfElse",t)}}let ot=class Ot{constructor(a,t,o){this.healthService=a,this.probeService=t,this.cdr=o,this.serviceName="",this.probe="idle",this.probeError=null,this.faShieldHalved=f.fLc,this.faCircleCheck=f.QRE,this.faArrowRight=f.dmS}ngOnInit(){this.score(),this.runProbe()}ngOnChanges(a){(a.serviceId||a.deprecated)&&this.score(),(a.serviceId||a.serviceName||a.serviceGroup)&&this.runProbe()}get level(){return"failed"===this.probe?"danger":this.health?.level??"success"}get hasFindings(){return"failed"===this.probe||!!this.health?.rules.length}score(){if(!this.serviceId)return void(this.health=void 0);const a=this.serviceId;this.healthService.getContext().pipe((0,X.s)(this)).subscribe(t=>{this.serviceId===a&&(this.health=this.healthService.derive({id:a,name:this.serviceName,deprecated:this.deprecated},t),this.cdr.markForCheck())})}runProbe(){if(!this.serviceId||!this.serviceName)return void(this.probe="idle");const a=this.serviceName;this.probeError=null,this.probeService.probe(a,this.serviceGroup).pipe((0,X.s)(this)).subscribe(t=>{this.serviceName===a&&(this.probe=t.state,this.probeError=t.error??null,this.cdr.markForCheck())})}static{this.\u0275fac=function(t){return new(t||Ot)(e.rXU(Dc.d),e.rXU(Tc.j),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:Ot,selectors:[["df-service-health-panel"]],inputs:{serviceId:"serviceId",serviceName:"serviceName",serviceGroup:"serviceGroup",deprecated:"deprecated"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"ngIf"],["class","health-panel",3,"health-panel--danger",4,"ngIf","ngIfElse"],["clean",""],[1,"health-panel"],[1,"health-panel__head"],["aria-hidden","true",3,"icon"],[1,"df-eyebrow"],[3,"variant","label"],[1,"health-panel__rules"],["class","health-panel__rule",4,"ngIf"],["class","health-panel__rule",4,"ngFor","ngForOf"],[1,"health-panel__rule"],[1,"health-panel__reason"],[1,"health-panel__detail"],[3,"error"],["class","health-panel__fix",3,"routerLink",4,"ngIf"],[1,"health-panel__fix",3,"routerLink"],[1,"health-panel__ok"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"]],template:function(t,o){1&t&&e.DNE(0,Yc,4,2,"ng-container",0),2&t&&e.Y8G("ngIf",o.health||"idle"!==o.probe)},dependencies:[m.bT,m.pM,m.ux,m.e1,m.fG,G.Wk,$.Kj,w.dX,w.aY,nt.v,wc.R],styles:[".health-panel[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-warning-border);border-radius:var(--df-radius);background:var(--df-warning-soft);color:var(--df-text)}.health-panel[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-warning)}.health-panel--danger[_ngcontent-%COMP%]{border-color:var(--df-danger-border);background:var(--df-danger-soft)}.health-panel--danger[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.health-panel__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2)}.health-panel__rules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);margin:0;padding:0;list-style:none}.health-panel__rule[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--df-space-2) var(--df-space-3)}.health-panel__reason[_ngcontent-%COMP%]{flex:1 1 20rem}.health-panel__detail[_ngcontent-%COMP%]{display:block;margin-top:var(--df-space-1);font-size:var(--df-font-size-xs);color:var(--df-text-muted);overflow-wrap:anywhere}.health-panel__fix[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-1);color:var(--df-accent);font-weight:var(--df-font-weight-medium);text-decoration:none;white-space:nowrap}.health-panel__fix[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:currentColor}.health-panel__fix[_ngcontent-%COMP%]:hover{text-decoration:underline}.health-panel__fix[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:var(--df-focus-ring);border-radius:var(--df-radius-sm, var(--df-radius))}.health-panel__ok[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2);margin:0;color:var(--df-text-muted)}.health-panel__ok[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-success)}.health-panel__ok--muted[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-text-muted)}"],changeDetection:0})}};function Vc(n,a){1&n&&(e.j41(0,"div",5),e.nrm(1,"df-skeleton",6),e.k0s()),2&n&&(e.R7$(1),e.Y8G("count",5))}function zc(n,a){if(1&n&&e.nrm(0,"df-empty-state",7),2&n){const t=e.XpG().$implicit;e.Y8G("title",t("error.title"))("description",t("error.hint"))}}function Xc(n,a){if(1&n&&(e.j41(0,"a",21)(1,"mat-icon"),e.EFF(2,"add"),e.k0s(),e.EFF(3),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(2).$implicit;e.Y8G("routerLink",t.addLink),e.R7$(3),e.SpI(" ",o("addPolicy")," ")}}function Bc(n,a){if(1&n&&(e.j41(0,"li",10)(1,"div",11)(2,"span",12)(3,"mat-icon"),e.EFF(4),e.k0s()()(),e.j41(5,"div",13)(6,"div",14)(7,"span",15),e.EFF(8),e.k0s(),e.nrm(9,"df-badge",16),e.k0s(),e.j41(10,"p",17),e.EFF(11),e.k0s(),e.j41(12,"div",18)(13,"a",19),e.EFF(14),e.j41(15,"mat-icon"),e.EFF(16,"chevron_right"),e.k0s()(),e.DNE(17,Xc,4,2,"a",20),e.k0s()()()),2&n){const t=a.$implicit,o=e.XpG(2).$implicit,i=e.XpG();e.AVh("pipeline-strip__node--open",!t.present),e.R7$(2),e.AVh("pipeline-strip__marker--active","active"===t.status)("pipeline-strip__marker--filtered","filtered"===t.status)("pipeline-strip__marker--handler","handler"===t.status),e.R7$(2),e.JRh(t.icon),e.R7$(4),e.JRh(o("nodes."+t.kind+".title")),e.R7$(1),e.Y8G("variant",i.badgeVariant(t))("label",o("status."+t.status)),e.R7$(2),e.SpI(" ",o(t.detailKey,t.detailParams)," "),e.R7$(2),e.Y8G("routerLink",t.link),e.R7$(1),e.SpI(" ",o("view")," "),e.R7$(3),e.Y8G("ngIf",t.addLink)}}function Lc(n,a){if(1&n&&(e.j41(0,"ol",8),e.DNE(1,Bc,18,16,"li",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.nodes)("ngForTrackBy",t.trackByKind)}}function Uc(n,a){if(1&n&&(e.qex(0),e.j41(1,"section",1),e.DNE(2,Vc,2,1,"div",2),e.DNE(3,zc,1,2,"df-empty-state",3),e.DNE(4,Lc,2,2,"ol",4),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.errored),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.errored&&t.nodes.length>0)}}ot=(0,ie.Cg)([(0,X.d)({checkProperties:!0})],ot);const Jc={active:"success",filtered:"warning",open:"neutral",handler:"build"};let qc=(()=>{class n{constructor(t,o,i){this.scope=t,this.limitService=o,this.appService=i,this.nodes=[],this.loading=!1,this.errored=!1,this.destroy$=new de.B}ngOnChanges(t){("serviceId"in t||"serviceName"in t)&&this.load()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}badgeVariant(t){return Jc[t.status]}trackByKind(t,o){return o.kind}load(){const t=this.serviceId;this.nodes=[],this.errored=!1,null!=t&&(this.loading=!0,(0,le.p)({matrix:this.scope.matrixForService(t),limits:this.limitService.getAll({limit:0,sort:"name"}).pipe((0,K.T)(o=>o.resource??[]),(0,N.W)(()=>(0,ce.of)([]))),apps:this.appService.getAll({limit:0}).pipe((0,K.T)(o=>o.resource??[]),(0,N.W)(()=>(0,ce.of)([])))}).pipe((0,re.Q)(this.destroy$)).subscribe({next:({matrix:o,limits:i,apps:c})=>{this.loading=!1,this.nodes=this.buildNodes(t,o.roles,i,c)},error:()=>{this.loading=!1,this.errored=!0}}))}buildNodes(t,o,i,c){const r=o.filter(h=>Re.e.some(O=>"none"!==h.verbs[O])),s=o.filter(h=>Re.e.some(O=>"filtered"===h.verbs[O])),l=i.find(h=>h.serviceId===t)??i.find(h=>null==h.serviceId),p=["/",B.b.API_CONNECTIONS,B.b.API_KEYS],v=["/",B.b.API_CONNECTIONS,B.b.ROLE_BASED_ACCESS],k=["/",B.b.API_SECURITY,B.b.RATE_LIMITING];return[{kind:"key",icon:"key",present:c.length>0,status:c.length>0?"active":"open",detailKey:c.length>0?"nodes.key.detail":"nodes.key.empty",detailParams:{count:c.length},link:p,addLink:c.length>0?void 0:[...p,B.b.CREATE]},{kind:"role",icon:"security",present:r.length>0,status:r.length>0?"active":"open",detailKey:r.length>0?"nodes.role.detail":"nodes.role.empty",detailParams:{count:r.length},link:1===r.length?[...v,String(r[0].roleId)]:v,addLink:r.length>0?void 0:[...v,B.b.CREATE]},{kind:"rate",icon:"speed",present:!!l,status:l?"active":"open",detailKey:l?"nodes.rate.detail":"nodes.rate.empty",detailParams:l?{rate:l.rate,period:l.period}:void 0,link:l?[...k,String(l.id)]:k,addLink:l?void 0:[...k,B.b.CREATE]},{kind:"filter",icon:"filter_alt",present:s.length>0,status:s.length>0?"filtered":"open",detailKey:s.length>0?"nodes.filter.detail":"nodes.filter.empty",detailParams:{count:s.length},link:v},{kind:"handler",icon:"bolt",present:!0,status:"handler",detailKey:this.serviceType?"nodes.handler.detail":"nodes.handler.empty",detailParams:this.serviceType?{type:this.serviceType}:void 0,link:this.serviceName?["/",B.b.API_CONNECTIONS,B.b.API_DOCS,this.serviceName]:["/",B.b.API_CONNECTIONS,B.b.API_DOCS]}]}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Re.q),e.rXU(A.gu),e.rXU(A.u7))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-pipeline-strip"]],inputs:{serviceId:"serviceId",serviceName:"serviceName",serviceType:"serviceType"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["data-testid","df-pipeline-strip",1,"pipeline-strip"],["class","pipeline-strip__loading",4,"ngIf"],["icon","error_outline",3,"title","description",4,"ngIf"],["class","pipeline-strip__list",4,"ngIf"],[1,"pipeline-strip__loading"],["variant","card",3,"count"],["icon","error_outline",3,"title","description"],[1,"pipeline-strip__list"],["class","pipeline-strip__node",3,"pipeline-strip__node--open",4,"ngFor","ngForOf","ngForTrackBy"],[1,"pipeline-strip__node"],["aria-hidden","true",1,"pipeline-strip__rail"],[1,"pipeline-strip__marker"],[1,"pipeline-strip__card"],[1,"pipeline-strip__head"],[1,"pipeline-strip__name"],[3,"variant","label"],[1,"pipeline-strip__detail"],[1,"pipeline-strip__actions"],[1,"pipeline-strip__link",3,"routerLink"],["class","pipeline-strip__link pipeline-strip__link--add",3,"routerLink",4,"ngIf"],[1,"pipeline-strip__link","pipeline-strip__link--add",3,"routerLink"]],template:function(o,i){1&o&&e.DNE(0,Uc,5,3,"ng-container",0),2&o&&e.Y8G("translocoRead","pipelineStrip")},dependencies:[m.MD,m.Sq,m.bT,G.iI,G.Wk,$.Q8,$.bA,L.m_,L.An,nt.v,Zt.M,en.d],styles:['[_nghost-%COMP%]{display:block}.pipeline-strip[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4)}.pipeline-strip__loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-3)}.pipeline-strip__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--df-space-3)}.pipeline-strip__node[_ngcontent-%COMP%]{display:grid;grid-template-columns:3.6rem 1fr;gap:var(--df-space-3);align-items:stretch}.pipeline-strip__rail[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;padding-top:var(--df-space-2)}.pipeline-strip__node[_ngcontent-%COMP%]:not(:last-child) .pipeline-strip__rail[_ngcontent-%COMP%]:after{content:"";position:absolute;top:4rem;bottom:calc(var(--df-space-3) * -1);left:50%;width:1px;transform:translate(-50%);background:var(--df-border)}.pipeline-strip__marker[_ngcontent-%COMP%]{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:3.2rem;height:3.2rem;flex:none;border-radius:50%;border:1px solid var(--df-border);background:var(--df-surface);color:var(--df-text-muted)}.pipeline-strip__marker[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:1.8rem;height:1.8rem;font-size:1.8rem;line-height:1.8rem}.pipeline-strip__marker--active[_ngcontent-%COMP%]{border-color:var(--df-success-border);background:var(--df-success-soft);color:var(--df-success)}.pipeline-strip__marker--filtered[_ngcontent-%COMP%]{border-color:var(--df-warning-border);background:var(--df-warning-soft);color:var(--df-warning)}.pipeline-strip__marker--handler[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-accent)}.pipeline-strip__node--open[_ngcontent-%COMP%] .pipeline-strip__marker[_ngcontent-%COMP%]{border-style:dashed;color:var(--df-text-faint)}.pipeline-strip__card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-border);border-radius:var(--df-radius);background:var(--df-surface)}.pipeline-strip__node--open[_ngcontent-%COMP%] .pipeline-strip__card[_ngcontent-%COMP%]{background:var(--df-surface-2);border-style:dashed}.pipeline-strip__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--df-space-2)}.pipeline-strip__name[_ngcontent-%COMP%]{font-size:var(--df-font-size-md);font-weight:var(--df-font-weight-heading);color:var(--df-text)}.pipeline-strip__detail[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm);color:var(--df-text-muted)}.pipeline-strip__actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--df-space-4);margin-top:var(--df-space-1)}.pipeline-strip__link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-1);font-size:var(--df-font-size-sm);font-weight:var(--df-font-weight-medium);color:var(--df-accent);text-decoration:none;cursor:pointer}.pipeline-strip__link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:1.6rem;height:1.6rem;font-size:1.6rem;line-height:1.6rem}.pipeline-strip__link[_ngcontent-%COMP%]:hover{text-decoration:underline}.pipeline-strip__link[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:2px;border-radius:var(--df-radius-sm)}.pipeline-strip__link--add[_ngcontent-%COMP%]{color:var(--df-text-2)}']})}}return n})();const Kc=function(n,a){return{verb:n,service:a}};let Hc=(()=>{class n{constructor(t){this.data=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-service-role-scope-dialog"]],standalone:!0,features:[e.aNF],decls:22,vars:20,consts:[[1,"scope-role-dialog"],["mat-dialog-title","",1,"scope-role-dialog__head"],[1,"scope-role-dialog__heading"],[1,"scope-role-dialog__eyebrow"],[1,"scope-role-dialog__title"],["mat-icon-button","","mat-dialog-close","",1,"scope-role-dialog__close"],[1,"scope-role-dialog__content"],[1,"scope-role-dialog__hint"],[3,"roleId"],["align","end",1,"scope-role-dialog__actions"],["mat-stroked-button","","mat-dialog-close",""]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"header",1)(2,"div",2)(3,"p",3),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"h2",4),e.EFF(7),e.nI1(8,"transloco"),e.k0s()(),e.j41(9,"button",5),e.nI1(10,"transloco"),e.j41(11,"mat-icon"),e.EFF(12,"close"),e.k0s()()(),e.j41(13,"mat-dialog-content",6)(14,"p",7),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.nrm(17,"df-role-scope",8),e.k0s(),e.j41(18,"mat-dialog-actions",9)(19,"button",10),e.EFF(20),e.nI1(21,"transloco"),e.k0s()()()),2&o&&(e.R7$(4),e.SpI(" ",e.bMT(5,6,"services.access.dialog.eyebrow")," "),e.R7$(3),e.SpI(" ",e.i5U(8,8,"services.access.dialog.title",e.l_i(17,Kc,i.data.verb,i.data.serviceLabel))," "),e.R7$(2),e.BMQ("aria-label",e.bMT(10,11,"services.access.dialog.close")),e.R7$(6),e.SpI(" ",e.bMT(16,13,"services.access.dialog.hint")," "),e.R7$(2),e.Y8G("roleId",i.data.roleId),e.R7$(3),e.SpI(" ",e.bMT(21,15,"services.access.dialog.close")," "))},dependencies:[m.MD,$.Q8,$.Kj,u.Hl,u.$z,u.iY,L.m_,L.An,b.hM,b.tx,b.BI,b.Yi,b.E7,St.e],styles:[".scope-role-dialog__head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:1.6rem;margin:0}.scope-role-dialog__eyebrow[_ngcontent-%COMP%]{margin:0 0 .2rem;font-size:1.1rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--df-text-muted)}.scope-role-dialog__title[_ngcontent-%COMP%]{margin:0;font-size:1.8rem;line-height:1.3;color:var(--df-text)}.scope-role-dialog__close[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted)}.scope-role-dialog__hint[_ngcontent-%COMP%]{margin:0 0 1.6rem;color:var(--df-text-muted);font-size:1.3rem;line-height:1.5}"]})}}return n})();class oe extends Error{}const Qc=new Set(["-s","--silent","-S","--show-error","-v","--verbose","-i","--include","-f","--fail","-#","--progress-bar","-N","--no-buffer","-g","--globoff","-4","--ipv4","-6","--ipv6","--no-progress-meter"]),Wc=new Set(["-o","--output","-w","--write-out","-D","--dump-header","--trace","--trace-ascii","--stderr"]),Zc=new Set(["-d","--data","--data-raw","--data-ascii","--data-binary","--data-urlencode"]);function tr(n){if(n.endsWith(";")&&!n.includes(":"))return{name:n.slice(0,-1).trim(),value:""};const a=n.indexOf(":");if(-1===a)return null;const t=n.slice(0,a).trim();return t?{name:t,value:n.slice(a+1).trim()}:null}function or(n){const a=encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));return btoa(a)}function Ye(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch{return n}}function ar(n,a){if(1&n&&(e.j41(0,"div",10),e.nrm(1,"fa-icon",11),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("icon",t.faTriangleExclamation),e.R7$(2),e.JRh(t.error)}}function cr(n,a){1&n&&(e.j41(0,"th",26),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"name")," "))}function rr(n,a){if(1&n&&(e.j41(0,"td",27),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.JRh(t.name)}}function sr(n,a){1&n&&(e.j41(0,"th",26),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"value")," "))}function lr(n,a){if(1&n&&(e.j41(0,"td",28),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.value," ")}}function dr(n,a){1&n&&e.nrm(0,"tr",29)}function pr(n,a){1&n&&e.nrm(0,"tr",30)}function mr(n,a){if(1&n&&(e.qex(0),e.j41(1,"h3",12),e.EFF(2),e.k0s(),e.j41(3,"table",18),e.qex(4,19),e.DNE(5,cr,3,3,"th",20),e.DNE(6,rr,2,1,"td",21),e.bVm(),e.qex(7,22),e.DNE(8,sr,3,3,"th",20),e.DNE(9,lr,2,1,"td",23),e.bVm(),e.DNE(10,dr,1,0,"tr",24),e.DNE(11,pr,1,0,"tr",25),e.k0s(),e.bVm()),2&n){const t=e.XpG(),o=t.caption,i=t.$implicit,c=e.XpG(2);e.R7$(2),e.Lme("",o," (",i.length,")"),e.R7$(1),e.Y8G("dataSource",i),e.R7$(7),e.Y8G("matHeaderRowDef",c.keyValueColumns),e.R7$(1),e.Y8G("matRowDefColumns",c.keyValueColumns)}}function _r(n,a){1&n&&e.DNE(0,mr,12,5,"ng-container",6),2&n&&e.Y8G("ngIf",a.$implicit.length)}function gr(n,a){1&n&&e.eu8(0)}function fr(n,a){1&n&&e.eu8(0)}function ur(n,a){1&n&&e.eu8(0)}function hr(n,a){if(1&n&&(e.j41(0,"div",33),e.nrm(1,"fa-icon",11),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("icon",o.faTriangleExclamation),e.R7$(2),e.JRh(t)}}function br(n,a){if(1&n&&(e.j41(0,"div",31),e.DNE(1,hr,4,2,"div",32),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.parsed.warnings)}}const it=function(n,a){return{$implicit:n,caption:a}};function vr(n,a){if(1&n&&(e.qex(0),e.j41(1,"h2",12),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"dl",13)(5,"dt"),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"dd",14),e.EFF(9),e.k0s(),e.j41(10,"dt"),e.EFF(11),e.nI1(12,"transloco"),e.k0s(),e.j41(13,"dd"),e.EFF(14),e.k0s()(),e.DNE(15,_r,1,1,"ng-template",null,15,e.C5r),e.DNE(17,gr,1,0,"ng-container",16),e.nI1(18,"transloco"),e.DNE(19,fr,1,0,"ng-container",16),e.nI1(20,"transloco"),e.DNE(21,ur,1,0,"ng-container",16),e.nI1(22,"transloco"),e.DNE(23,br,2,1,"div",17),e.bVm()),2&n){const t=e.sdS(16),o=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,12,"services.curlImport.preview")," "),e.R7$(4),e.JRh(e.bMT(7,14,"services.curlImport.baseUrl")),e.R7$(3),e.JRh(o.parsed.baseUrl),e.R7$(2),e.JRh(e.bMT(12,16,"services.curlImport.method")),e.R7$(3),e.JRh(o.parsed.method),e.R7$(3),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(24,it,o.parsed.parameters,e.bMT(18,18,"services.curlImport.parameters"))),e.R7$(2),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(27,it,o.parsed.headers,e.bMT(20,20,"services.curlImport.headers"))),e.R7$(2),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(30,it,o.optionEntries,e.bMT(22,22,"services.curlImport.curlOptions"))),e.R7$(2),e.Y8G("ngIf",o.parsed.warnings.length)}}let Cr=(()=>{class n{constructor(t){this.dialogRef=t,this.command="",this.parsed=null,this.error="",this.faUpload=f.JmV,this.faTriangleExclamation=f.JAe,this.keyValueColumns=["name","value"]}get optionEntries(){return Object.entries(this.parsed?.options??{}).map(([t,o])=>({name:t,value:o}))}onCommandChange(){if(this.error="",this.parsed=null,this.command.trim())try{this.parsed=function ir(n){const a=(n??"").trim();if(!a)throw new oe("Enter a cURL command.");const t=function er(n){const a=[];let t="",o=!1,i=0;for(;i{if(void 0!==P)return P;if(C++,C>=t.length)throw new oe(`Missing value for ${x}.`);return t[C]};for(;C2&&"HXduexAebm".includes(x[1])&&(P=x.slice(0,2),j=x.slice(2)),!Qc.has(P)){if(Wc.has(P)){M(P,j);continue}if(Zc.has(P)){r.push(M(P,j));continue}switch(P){case"-X":case"--request":l=M(P,j).toUpperCase();break;case"-H":case"--header":{const Ee=tr(M(P,j));Ee?o.push(Ee):c.push("Skipped a header that could not be parsed.");break}case"--url":s.push(M(P,j));break;case"-u":case"--user":p=M(P,j);break;case"-A":case"--user-agent":o.push({name:"User-Agent",value:M(P,j)});break;case"-e":case"--referer":o.push({name:"Referer",value:M(P,j)});break;case"-b":case"--cookie":o.push({name:"Cookie",value:M(P,j)});break;case"-k":case"--insecure":i.CURLOPT_SSL_VERIFYPEER="0",i.CURLOPT_SSL_VERIFYHOST="0";break;case"-L":case"--location":i.CURLOPT_FOLLOWLOCATION="1";break;case"-x":case"--proxy":i.CURLOPT_PROXY=M(P,j);break;case"-U":case"--proxy-user":i.CURLOPT_PROXYUSERPWD=M(P,j);break;case"--connect-timeout":i.CURLOPT_CONNECTTIMEOUT=M(P,j);break;case"-m":case"--max-time":i.CURLOPT_TIMEOUT=M(P,j);break;case"--compressed":i.CURLOPT_ENCODING="";break;case"-G":case"--get":v=!0;break;case"-I":case"--head":l=l||"HEAD";break;case"-F":case"--form":k=!0,r.push(M(P,j));break;default:if(c.push(`Ignored unsupported option "${P}".`),void 0===j&&!1===t[C+1]?.startsWith("-")){const Ee=t[C+1];Ee&&!/^[a-z][a-z0-9+.-]*:\/\//i.test(Ee)&&C++}}}}if(!s.length)throw new oe("No URL found in the command.");s.length>1&&c.push(`Command contains ${s.length} URLs; only the first was imported.`);const{baseUrl:D,parameters:T}=function nr(n){const a=[],t=n.indexOf("#"),o=-1===t?n:n.slice(0,t),i=o.indexOf("?");if(-1===i)return{baseUrl:o,parameters:a};const c=o.slice(0,i),r=o.slice(i+1);for(const s of r.split("&")){if(!s)continue;const l=s.indexOf("="),p=-1===l?s:s.slice(0,l),v=-1===l?"":s.slice(l+1);a.push({name:Ye(p),value:Ye(v)})}return{baseUrl:c,parameters:a}}(s[0]);if(!D)throw new oe("No URL found in the command.");const g=D.match(/^([a-z][a-z0-9+.-]*):(?=\/)/i);if(g){const x=g[1].toLowerCase();"http"!==x&&"https"!==x&&c.push(`The URL uses the "${x}" scheme, not http or https. The service sends requests with that scheme server-side, which can read local files or reach internal hosts. Import only if you trust the source.`)}const h=r.length?r.join("&"):void 0;if(v&&h)for(const x of h.split("&")){if(!x)continue;const P=x.indexOf("=");T.push({name:Ye(-1===P?x:x.slice(0,P)),value:Ye(-1===P?"":x.slice(P+1))})}let O=l;return O||(O=h&&!v?"POST":"GET"),k?c.push("Multipart form fields (-F) cannot be stored on an HTTP service and were not imported."):h&&!v&&c.push("The request body was not imported. An HTTP service passes through the body it receives at request time."),p&&(o.some(P=>"authorization"===P.name.toLowerCase())?c.push("Credentials from -u were ignored because the command already sets an Authorization header."):(o.push({name:"Authorization",value:`Basic ${or(p)}`}),c.push("Credentials from -u were imported as an Authorization header. Base64 is encoding, not encryption, so they are stored in a recoverable form."))),{baseUrl:D,method:O,parameters:T,headers:o,options:i,body:v?void 0:h,warnings:c}}(this.command)}catch(t){this.error=t instanceof oe?t.message:"Could not parse the cURL command."}}onImport(){this.parsed&&this.dialogRef.close(this.parsed)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-curl-import-dialog"]],standalone:!0,features:[e.aNF],decls:22,vars:22,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"curl-import-content"],[1,"curl-import-hint"],["appearance","outline",1,"full-width"],["matInput","","rows","7","spellcheck","false","data-testid","curl-import-command",3,"placeholder","ngModel","ngModelChange"],["class","curl-import-error","data-testid","curl-import-error",4,"ngIf"],[4,"ngIf"],["mat-dialog-actions",""],["mat-flat-button","","mat-dialog-close","","type","button"],["mat-flat-button","","color","primary","type","button","data-testid","curl-import-submit",3,"disabled","click"],["data-testid","curl-import-error",1,"curl-import-error"],[3,"icon"],[1,"curl-import-section"],[1,"curl-import-summary"],["data-testid","curl-import-base-url"],["keyValueTable",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","curl-import-warnings","data-testid","curl-import-warnings",4,"ngIf"],["mat-table","",1,"full-width",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["mat-cell","","class","curl-import-value",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",1,"curl-import-value"],["mat-header-row",""],["mat-row",""],["data-testid","curl-import-warnings",1,"curl-import-warnings"],["class","curl-import-warning",4,"ngFor","ngForOf"],[1,"curl-import-warning"]],template:function(o,i){1&o&&(e.j41(0,"h1",0),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"div",1)(4,"p",2),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.j41(7,"mat-form-field",3)(8,"mat-label"),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"textarea",4),e.bIt("ngModelChange",function(r){return i.command=r})("ngModelChange",function(){return i.onCommandChange()}),e.nI1(12,"transloco"),e.k0s()(),e.DNE(13,ar,4,2,"div",5),e.DNE(14,vr,24,33,"ng-container",6),e.k0s(),e.j41(15,"div",7)(16,"button",8),e.EFF(17),e.nI1(18,"transloco"),e.k0s(),e.j41(19,"button",9),e.bIt("click",function(){return i.onImport()}),e.EFF(20),e.nI1(21,"transloco"),e.k0s()()),2&o&&(e.R7$(1),e.JRh(e.bMT(2,10,"services.curlImport.title")),e.R7$(4),e.SpI(" ",e.bMT(6,12,"services.curlImport.hint")," "),e.R7$(4),e.JRh(e.bMT(10,14,"services.curlImport.commandLabel")),e.R7$(2),e.Y8G("placeholder",e.bMT(12,16,"services.curlImport.placeholder"))("ngModel",i.command),e.R7$(2),e.Y8G("ngIf",i.error),e.R7$(1),e.Y8G("ngIf",i.parsed),e.R7$(3),e.SpI(" ",e.bMT(18,18,"cancel")," "),e.R7$(2),e.Y8G("disabled",!i.parsed),e.R7$(1),e.SpI(" ",e.bMT(21,20,"services.curlImport.import")," "))},dependencies:[m.bT,m.pM,m.T3,d.YN,d.me,d.BC,d.vS,b.hM,b.tx,b.BI,b.Yi,b.E7,u.Hl,u.$z,y.RG,y.rl,y.nJ,E.fS,E.fg,F.tP,F.Zl,F.tL,F.ji,F.cC,F.YV,F.iL,F.KS,F.$R,F.YZ,F.NB,w.dX,w.aY,$.Kj],styles:[".curl-import-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:34rem;max-width:44rem}.curl-import-hint[_ngcontent-%COMP%]{margin:0 0 1rem;opacity:.75}.full-width[_ngcontent-%COMP%]{width:100%}textarea[matInput][_ngcontent-%COMP%]{font-family:monospace;white-space:pre;overflow-x:auto}.curl-import-section[_ngcontent-%COMP%]{font-size:.95rem;font-weight:600;margin:1rem 0 .5rem}.curl-import-summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;gap:.25rem 1rem;margin:0}.curl-import-summary[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{font-weight:600}.curl-import-summary[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;overflow-wrap:anywhere}.curl-import-value[_ngcontent-%COMP%]{overflow-wrap:anywhere}.curl-import-error[_ngcontent-%COMP%], .curl-import-warning[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.5rem 0}.curl-import-error[_ngcontent-%COMP%]{color:var(--mdc-theme-error, #b3261e)}.curl-import-warnings[_ngcontent-%COMP%]{margin-top:1rem}"]})}}return n})();var xr=_(70402),kr=_(76496);let yr=(()=>{class n{constructor(t){this.http=t,this.CACHE_KEY="df_dashboard_stats",this.CACHE_DURATION=3e4,this.REFRESH_INTERVAL=9e5,this.stats$=(0,Et.O)(0,this.REFRESH_INTERVAL).pipe((0,ve.n)(()=>this.fetchStats()),(0,kr.t)(1))}getDashboardStats(){const t=this.getCachedStats();return t?(0,ce.of)(t):this.stats$}fetchStats(){const t=(0,Ce.Ku)(),o={services:this.http.get("/api/v2/system/service?fields=id,name,type&include_count=true",{context:t}),roles:this.http.get("/api/v2/system/role?fields=id,name&include_count=true",{context:t}),appKeys:this.http.get("/api/v2/system/app?include_count=true",{context:t})};return(0,le.p)(o).pipe((0,K.T)(i=>this.transformResponses(i)),(0,fe.M)(i=>this.cacheStats(i)),(0,N.W)(()=>(0,ce.of)(this.getSimpleStats())))}transformResponses(t){const{services:o,roles:i,appKeys:c}=t,r=["system","api_docs","files","logs","db","email","user","script","ui","schema","api_doc","file","log","admin","df-admin","dreamfactory","cache","push","pub_sub"].map(C=>C.toLowerCase()),s=["admin","api_docs","file_manager"].map(C=>C.toLowerCase()),l=["administrator","user","admin","sys_admin"].map(C=>C.toLowerCase()),p=(o.resource||[]).filter(C=>!r.includes(C.name.toLowerCase())),v=(c.resource||[]).filter(C=>{const D=!!(C.apiKey||C.api_key||C.apikey);return!s.includes(C.name.toLowerCase())&&D}),k=(i.resource||[]).filter(C=>!l.includes(C.name.toLowerCase()));return{services:{total:p.length},apiKeys:{total:v.length},roles:{total:k.length}}}calculateTrend(t,o){return 0===t?0:Math.round((o-t)/t*100)}getCachedStats(){const t=localStorage.getItem(this.CACHE_KEY);if(!t)return null;try{const{data:o,timestamp:i}=JSON.parse(t);if(Date.now()-i{class n{constructor(){this.http=(0,e.WQX)(H.Qq)}resolveWorkingKeyAndTable(t,o){var i=this;return(0,Fe.A)(function*(c,r,s="your_table"){let l=s;if(!r||"number"!=typeof c)return{apiKey:"",sampleTable:l,keys:[]};try{const p=yield i.introspectTables(r);p[0]&&(l=p[0]);const v=yield i.resolveCandidates(c);if(!v.length)return{apiKey:"",sampleTable:l,keys:[]};const k=window.location.origin,C=[],M=[];for(const T of v){const g={label:T.label,apiKey:T.apiKey},h=(T.grantsAll?p:T.tables.filter(P=>p.includes(P))).slice(0,5),O=(T.writeCapable?2:0)+(T.grantsAll?1:0);let x="";for(const P of h)try{if((yield fetch(`${k}${U.C}/${r}/_table/${encodeURIComponent(P)}?limit=1`,{headers:{"X-DreamFactory-API-Key":T.apiKey},credentials:"omit"})).ok){x=P;break}}catch{}x?C.push({option:{...g,verified:!0},table:x,score:O}):M.push(g)}if(!C.length)return{apiKey:"",sampleTable:l,keys:[]};C.sort((T,g)=>T.score-g.score),l=C[0].table;const D=[...C.map(T=>T.option),...M];return{apiKey:D[0].apiKey,sampleTable:l,keys:D}}catch{return{apiKey:"",sampleTable:l,keys:[]}}}).apply(this,arguments)}resolveCandidates(t){var o=this;return(0,Fe.A)(function*(){const i=yield(0,at._)(o.http.get(`${U.C}/system/role?related=role_service_access_by_role_id&limit=200`,{context:(0,Ce.Ku)()})),c=new Map;for(const p of i?.resource??[]){if(!1===p?.isActive)continue;let v=!1,k=!1;const C=[];for(const M of p?.roleServiceAccessByRoleId??[]){const D=M?.serviceId;if(D!==t&&null!=D)continue;const g=M?.verbMask??0;if(30&g&&(k=!0),!(1&g))continue;const h=M?.component??"";if(""===h||"*"===h||"_table/*"===h)v=!0;else if(h.startsWith("_table/")){const O=h.slice(7).replace(/\/\*$/,"").replace(/\/$/,"");O&&"*"!==O&&C.push(O)}}(v||C.length)&&c.set(p.id,{tables:C,grantsAll:v,writeCapable:k})}if(!c.size)return[];const r=[...c.keys()],s=yield Promise.all(r.map(p=>(0,at._)(o.http.get(`${U.C}/system/app?filter=role_id=${p}&fields=*`,{context:(0,Ce.Ku)()})).catch(()=>({resource:[]})))),l=[];return r.forEach((p,v)=>{const k=c.get(p);if(k)for(const C of s[v]?.resource??[])!1===C?.isActive||!C?.apiKey||l.push({label:C.name||"API key",apiKey:C.apiKey,tables:k.tables,grantsAll:k.grantsAll,writeCapable:k.writeCapable})}),l})()}introspectTables(t){var o=this;return(0,Fe.A)(function*(){try{return((yield(0,at._)(o.http.get(`${U.C}/${t}/_table`,{context:(0,Ce.Ku)()})))?.resource??[]).map(c=>"string"==typeof c?c:c?.name).filter(c=>!!c)}catch{return[]}})()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var ct;const Or=["stepper"],Pr=["functionEditor"],Fr=["headersEditor"],wr=["unsavedToolDialog"];function Dr(n,a){1&n&&(e.EFF(0),e.nI1(1,"transloco")),2&n&&e.SpI(" ",e.bMT(1,1,"services.controls.serviceType.label"),"")}function Tr(n,a){if(1&n){const t=e.RV6();e.j41(0,"label",30)(1,"input",31),e.bIt("input",function(){e.eBV(t),e.XpG();const i=e.sdS(2),c=e.XpG();return e.Njj(c.nextStep(i))}),e.k0s(),e.j41(2,"div",32),e.nrm(3,"span",33),e.j41(4,"div",34),e.nrm(5,"img",35),e.j41(6,"h4"),e.EFF(7),e.k0s()()()()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.Y8G("value",t.name),e.R7$(1),e.HbH(t.class),e.R7$(3),e.Y8G("src",o.getBackgroundImage(t.name),e.B4B)("alt",t.label),e.R7$(2),e.SpI(" ",t.label," ")}}function Sr(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",37),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,c=e.XpG(2);return e.Njj(c.openDialog(i.label||i.name))}),e.EFF(2," Unlock Now "),e.k0s(),e.bVm()}}function Rr(n,a){if(1&n){const t=e.RV6();e.j41(0,"label",30)(1,"input",31),e.bIt("input",function(){e.eBV(t),e.XpG();const i=e.sdS(2),c=e.XpG();return e.Njj(c.nextStep(i))}),e.k0s(),e.j41(2,"div",32),e.nrm(3,"span",33),e.j41(4,"div",34),e.nrm(5,"img",35),e.j41(6,"h4",36),e.EFF(7),e.k0s()()(),e.DNE(8,Sr,3,0,"ng-container",24),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(2);e.R7$(1),e.Y8G("value",t.name),e.BMQ("disabled",!0),e.R7$(1),e.HbH(t.class),e.R7$(3),e.Y8G("src",o.getBackgroundImage(t.name),e.B4B)("alt",t.label),e.R7$(2),e.SpI(" ",t.label," "),e.R7$(1),e.Y8G("ngIf","not-included"===t.class)}}function Ir(n,a){1&n&&e.EFF(0,"Service Details")}function Er(n,a){if(1&n&&(e.j41(0,"mat-form-field",38)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",39)(5,"fa-icon",11),e.nI1(6,"transloco"),e.j41(7,"mat-hint"),e.EFF(8),e.nI1(9,"transloco"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,4,"services.controls.namespace.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,6,"services.controls.namespace.tooltip")),e.R7$(3),e.JRh(e.bMT(9,8,"services.controls.namespace.hint"))}}function $r(n,a){if(1&n&&(e.j41(0,"mat-form-field",40)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",41)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.label.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.label.tooltip"))}}function Gr(n,a){if(1&n&&(e.j41(0,"mat-form-field",42)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"textarea",43)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.description.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.description.tooltip"))}}function jr(n,a){1&n&&(e.j41(0,"mat-slide-toggle",44),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"active")))}function Nr(n,a){1&n&&e.EFF(0,"Service Options")}function Ar(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function Yr(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ar,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(5);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}const ee=function(){return["file_certificate","file_certificate_api"]};function Vr(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,ee).indexOf(t.type))("full-width",-1!==e.lJ4(7,ee).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function zr(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}const pe=function(){return["integer","password","string","text","picklist","multi_picklist","boolean","file_certificate","file_certificate_api"]};function Xr(n,a){if(1&n&&(e.DNE(0,Vr,1,8,"df-dynamic-field",49),e.DNE(1,zr,1,2,"df-array-field",50)),2&n){const t=e.XpG().$implicit;e.Y8G("ngIf",e.lJ4(2,pe).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function Br(n,a){if(1&n&&(e.qex(0),e.DNE(1,Yr,2,1,"ng-container",1),e.DNE(2,Xr,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=a.$implicit,o=e.sdS(3);e.R7$(1),e.Y8G("ngIf","text"===t.type&&"content"===t.name)("ngIfElse",o)}}function Lr(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"div",9),e.DNE(3,Br,4,2,"ng-container",46),e.k0s()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(3),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName)}}function Ur(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width","file_certificate"!==t.type)("full-width","file_certificate"===t.type),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Jr(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function qr(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ur,1,6,"df-dynamic-field",49),e.DNE(2,Jr,1,2,"df-array-field",50),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,pe).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function Kr(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(7);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function Hr(n,a){if(1&n&&(e.qex(0),e.DNE(1,Kr,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}function Qr(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG(2).$implicit,o=e.XpG(5);e.AVh("dynamic-width","file_certificate"!==t.type&&"file_certificate_api"!==t.type)("full-width","file_certificate"===t.type||"file_certificate_api"===t.type),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Wr(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(5);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Zr(n,a){if(1&n&&(e.DNE(0,Qr,1,6,"df-dynamic-field",49),e.DNE(1,Wr,1,2,"df-array-field",50)),2&n){const t=e.XpG().$implicit;e.Y8G("ngIf",e.lJ4(2,pe).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function es(n,a){if(1&n&&(e.qex(0),e.DNE(1,Hr,2,1,"ng-container",1),e.DNE(2,Zr,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=a.$implicit,o=e.sdS(3);e.R7$(1),e.Y8G("ngIf","text"===t.type&&"content"===t.name)("ngIfElse",o)}}function ts(n,a){if(1&n&&(e.j41(0,"div",55)(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"div",9),e.DNE(7,es,4,2,"ng-container",46),e.k0s()()()()),2&n){const t=e.XpG(4);e.R7$(2),e.Y8G("expanded",!1),e.R7$(2),e.SpI(" ",e.bMT(5,4,"services.options")," "),e.R7$(3),e.Y8G("ngForOf",t.advancedFields)("ngForTrackBy",t.trackByName)}}function ns(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",53),e.DNE(2,qr,3,3,"ng-container",46),e.k0s(),e.DNE(3,ts,8,6,"div",54),e.bVm()),2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("ngForOf",t.basicFields)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngIf",t.showAdvancedOptions)}}function os(n,a){if(1&n&&(e.qex(0)(1,45),e.DNE(2,Lr,4,2,"ng-container",24),e.DNE(3,ns,4,3,"ng-container",24),e.bVm()()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",!t.isDatabase||!t.hasStandardFields),e.R7$(1),e.Y8G("ngIf",t.isDatabase&&t.hasStandardFields)}}function is(n,a){if(1&n&&(e.j41(0,"div",57),e.nrm(1,"fa-icon",58),e.j41(2,"p",59),e.EFF(3),e.nI1(4,"transloco"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("icon",t.faCircleInfo),e.R7$(2),e.SpI(" ",e.bMT(4,2,"services.firstTimeGuidance")," ")}}function as(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",66),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.goToSecurityConfig())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",!t.serviceForm.valid),e.R7$(1),e.SpI(" ",e.bMT(2,2,"services.controls.nextSecurityConfig")," ")}}function cs(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",67),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.goToSecurityConfig())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",!t.serviceForm.valid),e.R7$(1),e.SpI(" ",e.bMT(2,2,"services.controls.securityConfig")," ")}}function rs(n,a){1&n&&(e.j41(0,"button",68),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"services.controls.createAndTest")," "))}function ss(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",60)(1,"button",61),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goBack())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"div",62),e.DNE(5,as,3,4,"button",63),e.DNE(6,cs,3,4,"button",64),e.DNE(7,rs,3,3,"button",65),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,4,"cancel")," "),e.R7$(3),e.Y8G("ngIf",t.isFirstTimeUser&&t.isDatabase),e.R7$(1),e.Y8G("ngIf",!(t.isFirstTimeUser&&t.isDatabase)),e.R7$(1),e.Y8G("ngIf",!(t.isFirstTimeUser&&t.isDatabase))}}function ls(n,a){1&n&&e.EFF(0,"Security Configuration")}function ds(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",9)(1,"df-security-config",69),e.bIt("goBack",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goBack())}),e.k0s()()}if(2&n){const t=e.XpG(2);let o;e.R7$(1),e.Y8G("serviceName",null==(o=t.serviceForm.get("name"))?null:o.value)("serviceId",t.currentServiceId)("isDatabase",t.isDatabase)("isFirstTimeUser",t.isFirstTimeUser)}}function ps(n,a){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,' Please complete the previous steps and click "Security Config" to configure security settings. '),e.k0s(),e.j41(3,"div",21)(4,"div")(5,"button",23),e.EFF(6," Back "),e.k0s()()()())}function ms(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"1"),e.k0s())}function _s(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"2"),e.k0s())}function gs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"3"),e.k0s())}function fs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"4"),e.k0s())}function us(n,a){1&n&&(e.qex(0,70),e.DNE(1,ms,2,0,"mat-icon",71),e.DNE(2,_s,2,0,"mat-icon",71),e.DNE(3,gs,2,0,"mat-icon",71),e.DNE(4,fs,2,0,"mat-icon",71),e.bVm()),2&n&&(e.Y8G("ngSwitch",a.index),e.R7$(1),e.Y8G("ngSwitchCase",0),e.R7$(1),e.Y8G("ngSwitchCase",1),e.R7$(1),e.Y8G("ngSwitchCase",2),e.R7$(1),e.Y8G("ngSwitchCase",3))}function hs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"1"),e.k0s())}function bs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"2"),e.k0s())}function vs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"3"),e.k0s())}function Cs(n,a){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"4"),e.k0s())}function xs(n,a){1&n&&(e.qex(0,70),e.DNE(1,hs,2,0,"mat-icon",71),e.DNE(2,bs,2,0,"mat-icon",71),e.DNE(3,vs,2,0,"mat-icon",71),e.DNE(4,Cs,2,0,"mat-icon",71),e.bVm()),2&n&&(e.Y8G("ngSwitch",a.index),e.R7$(1),e.Y8G("ngSwitchCase",0),e.R7$(1),e.Y8G("ngSwitchCase",1),e.R7$(1),e.Y8G("ngSwitchCase",2),e.R7$(1),e.Y8G("ngSwitchCase",3))}const rt=function(){return{standalone:!0}};function ks(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-stepper",5,6)(3,"mat-step",7),e.DNE(4,Dr,2,3,"ng-template",8),e.j41(5,"div",9)(6,"div",10)(7,"h3"),e.EFF(8),e.nI1(9,"transloco"),e.nrm(10,"fa-icon",11),e.nI1(11,"transloco"),e.k0s(),e.j41(12,"div")(13,"button",12),e.EFF(14," Next "),e.k0s()()(),e.j41(15,"mat-form-field",13)(16,"mat-label"),e.EFF(17,"Search service types..."),e.k0s(),e.j41(18,"input",14),e.bIt("ngModelChange",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.search=i)}),e.k0s()(),e.j41(19,"div",15)(20,"div",16),e.DNE(21,Tr,8,6,"label",17),e.DNE(22,Rr,9,8,"label",17),e.k0s()(),e.j41(23,"div")(24,"button",12),e.EFF(25," Next "),e.k0s()()()(),e.j41(26,"mat-step"),e.DNE(27,Ir,1,0,"ng-template",8),e.nrm(28,"br"),e.j41(29,"div",9),e.DNE(30,Er,10,10,"mat-form-field",18),e.DNE(31,$r,7,7,"mat-form-field",19),e.DNE(32,Gr,7,7,"mat-form-field",20),e.j41(33,"div",21),e.DNE(34,jr,3,3,"mat-slide-toggle",22),e.j41(35,"div")(36,"button",23),e.EFF(37," Back "),e.k0s(),e.j41(38,"button",12),e.EFF(39," Next "),e.k0s()(),e.nrm(40,"div"),e.k0s()()(),e.j41(41,"mat-step"),e.DNE(42,Nr,1,0,"ng-template",8),e.nrm(43,"br"),e.DNE(44,os,4,2,"ng-container",24),e.DNE(45,is,5,4,"div",25),e.DNE(46,ss,8,6,"div",26),e.k0s(),e.j41(47,"mat-step"),e.DNE(48,ls,1,0,"ng-template",8),e.DNE(49,ds,2,4,"div",27),e.DNE(50,ps,7,0,"div",27),e.k0s(),e.DNE(51,us,5,5,"ng-template",28),e.DNE(52,xs,5,5,"ng-template",29),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();let o,i,c;e.R7$(3),e.Y8G("editable",!0),e.R7$(5),e.SpI(" Search for your ",e.bMT(9,22,"services.controls.serviceType.label")," to get started "),e.R7$(2),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(11,24,"services.controls.serviceType.tooltip")),e.R7$(3),e.Y8G("disabled",""===(null==(o=t.serviceForm.get("type"))?null:o.value)),e.R7$(5),e.Y8G("ngModel",t.search)("ngModelOptions",e.lJ4(26,rt)),e.R7$(3),e.Y8G("ngForOf",t.filteredServiceTypes)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngForOf",t.notIncludedServices)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("disabled",""===(null==(i=t.serviceForm.get("type"))?null:i.value)),e.R7$(6),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(2),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(4),e.Y8G("disabled",""===(null==(c=t.serviceForm.get("type"))?null:c.value)&&""===(null==(c=t.serviceForm.get("description"))?null:c.value)),e.R7$(6),e.Y8G("ngIf",t.viewSchema&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",t.isFirstTimeUser&&t.isDatabase&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(3),e.Y8G("ngIf",t.showSecurityConfig),e.R7$(1),e.Y8G("ngIf",!t.showSecurityConfig)}}function ys(n,a){if(1&n&&e.nrm(0,"df-service-health-panel",78),2&n){const t=e.XpG(2);e.Y8G("serviceId",t.serviceData.id)("serviceName",t.serviceData.name)("serviceGroup",t.serviceGroup)("deprecated",t.serviceData.deprecated)}}function Ms(n,a){if(1&n&&(e.j41(0,"section",83),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.nI1(4,"transloco"),e.j41(5,"p",84),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.nrm(8,"df-pipeline-strip",85),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,7,"services.pipeline.eyebrow"))("title",e.bMT(3,9,"services.pipeline.title"))("description",e.bMT(4,11,"services.pipeline.description")),e.R7$(5),e.SpI(" ",e.bMT(7,13,"services.pipeline.hint")," "),e.R7$(2),e.Y8G("serviceId",t.serviceData.id)("serviceName",t.serviceData.name)("serviceType",t.serviceData.type)}}function Os(n,a){if(1&n){const t=e.RV6();e.j41(0,"section",86),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.nI1(4,"transloco"),e.j41(5,"p",87),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"df-scope-matrix",88),e.bIt("cellClick",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.onScopeCellClick(i))}),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,5,"services.access.eyebrow"))("title",e.bMT(3,7,"services.access.title"))("description",e.bMT(4,9,"services.access.description")),e.R7$(5),e.SpI(" ",e.bMT(7,11,"services.access.hint")," "),e.R7$(2),e.Y8G("serviceId",t.serviceData.id)}}function Ps(n,a){if(1&n){const t=e.RV6();e.qex(0),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.j41(4,"df-artifact-card",80),e.bIt("createKey",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.onCreateApiKey())}),e.k0s(),e.DNE(5,Ms,9,15,"section",81),e.DNE(6,Os,9,13,"section",82),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,9,"services.overview.eyebrow"))("title",t.serviceData.label||t.serviceData.name)("description",e.bMT(3,11,"services.overview.description")),e.R7$(3),e.Y8G("serviceName",t.serviceData.name)("baseUrl",t.artifactBaseUrl)("sampleTable",t.artifactSampleTable)("keys",t.artifactKeys),e.R7$(1),e.Y8G("ngIf",t.serviceData.id),e.R7$(1),e.Y8G("ngIf",t.serviceData.id)}}function Fs(n,a){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label," ")}}function ws(n,a){if(1&n&&(e.j41(0,"mat-form-field",38)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",39)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.namespace.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.namespace.tooltip"))}}function Ds(n,a){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function Ts(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-form-field",90)(2,"mat-label"),e.EFF(3,"Storage Service *"),e.k0s(),e.j41(4,"mat-select",91),e.DNE(5,Ds,2,2,"mat-option",74),e.k0s()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(5),e.Y8G("ngForOf",t.availableFileServices)("ngForTrackBy",t.trackById)}}function Ss(n,a){if(1&n&&(e.j41(0,"mat-form-field",92)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",41)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.label.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.label.tooltip"))}}function Rs(n,a){if(1&n&&(e.j41(0,"mat-form-field",92)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"textarea",43)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.description.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.description.tooltip"))}}function Is(n,a){1&n&&(e.j41(0,"mat-slide-toggle",93)(1,"span"),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"active")))}function Es(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",95),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.gotoSchema())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.bVm()}2&n&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"schema")," "))}function $s(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",95),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.gotoAPIDocs())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"apiDocs")," "))}function Gs(n,a){if(1&n&&(e.qex(0),e.DNE(1,Es,4,3,"ng-container",1),e.DNE(2,$s,3,3,"ng-template",null,94,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG(2);e.R7$(1),e.Y8G("ngIf",o.isDatabase)("ngIfElse",t)}}function js(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",97)(1,"button",98),e.bIt("click",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.openCurlImport())}),e.nrm(2,"fa-icon",99),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()(),e.j41(6,"span",100),e.EFF(7),e.nI1(8,"transloco"),e.k0s()()}if(2&n){const t=e.XpG(4);e.R7$(2),e.Y8G("icon",t.faFileImport),e.R7$(2),e.JRh(e.bMT(5,3,"services.curlImport.button")),e.R7$(3),e.SpI(" ",e.bMT(8,5,"services.curlImport.buttonHint")," ")}}function Ns(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,ee).indexOf(t.type))("full-width",-1!==e.lJ4(7,ee).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function As(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ns,1,8,"df-dynamic-field",101),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(1,pe).includes(t.type))}}function Ys(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-button-toggle-group",103),e.bIt("ngModelChange",function(i){e.eBV(t);const c=e.XpG(4);return e.Njj(c.serviceDefinitionType=i)})("change",function(){e.eBV(t);const i=e.XpG(4);return e.Njj(i.onServiceDefinitionTypeChange(i.serviceDefinitionType))}),e.j41(2,"mat-button-toggle",104),e.EFF(3,"JSON"),e.k0s(),e.j41(4,"mat-button-toggle",105),e.EFF(5,"YAML"),e.k0s()(),e.bVm()}if(2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("ngModel",t.serviceDefinitionType)("ngModelOptions",e.lJ4(2,rt))}}function Vs(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-file-github",106),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("type",t.getControl("type"))("content",t.getConfigControl("content"))("contentText",t.content)}}function zs(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-file-github",106),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("type",t.getControl("type"))("content",t.getConfigControl("content"))("contentText",t.content)}}function Xs(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-ace-editor",107),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("formControl",t.getConfigControl("content"))("mode",t.serviceDefinitionMode)}}function Bs(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,ee).indexOf(t.type))("full-width",-1!==e.lJ4(7,ee).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Ls(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Us(n,a){if(1&n&&(e.qex(0),e.DNE(1,Bs,1,8,"df-dynamic-field",101),e.DNE(2,Ls,1,2,"df-array-field",50),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,pe).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function Js(n,a){if(1&n&&(e.qex(0),e.DNE(1,js,9,7,"div",96),e.DNE(2,As,2,2,"ng-container",46),e.j41(3,"mat-accordion",15)(4,"mat-expansion-panel",56)(5,"mat-expansion-panel-header"),e.EFF(6," Advanced Options "),e.k0s(),e.j41(7,"div",9),e.DNE(8,Ys,6,3,"ng-container",24),e.j41(9,"mat-label",15),e.EFF(10,"Service Definition"),e.k0s(),e.DNE(11,Vs,2,3,"ng-container",24),e.DNE(12,zs,2,3,"ng-container",24),e.DNE(13,Xs,2,2,"ng-container",24),e.DNE(14,Us,3,3,"ng-container",46),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngIf",t.showCurlImport),e.R7$(1),e.Y8G("ngForOf",t.networkRequiredFields)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("expanded",!1),e.R7$(4),e.Y8G("ngIf","soap"!==t.serviceForm.getRawValue().type),e.R7$(3),e.Y8G("ngIf","rws"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","soap"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","rest"===t.serviceForm.getRawValue().type||"http"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngForOf",t.networkAdvancedFields)("ngForTrackBy",t.trackByName)}}function qs(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",108),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("isScript",t.isScriptService)("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getConfigControl("content"))("cache",t.serviceData?t.serviceData.name:"")("hideScmActions",!0)}}function Ks(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,ee).indexOf(t.type))("full-width",-1!==e.lJ4(7,ee).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Hs(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Qs(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ks,1,8,"df-dynamic-field",101),e.DNE(2,Hs,1,2,"df-array-field",50),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,pe).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function Ws(n,a){if(1&n&&(e.qex(0),e.DNE(1,Qs,3,3,"ng-container",24),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngIf","content"!==t.name)}}function Zs(n,a){if(1&n){const t=e.RV6();e.qex(0),e.DNE(1,qs,2,7,"ng-container",24),e.j41(2,"mat-accordion",15)(3,"mat-expansion-panel",56)(4,"mat-expansion-panel-header"),e.EFF(5," Advanced Options "),e.k0s(),e.j41(6,"div",9)(7,"mat-button-toggle-group",103),e.bIt("ngModelChange",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.serviceDefinitionType=i)})("change",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.onServiceDefinitionTypeChange(i.serviceDefinitionType))}),e.j41(8,"mat-button-toggle",104),e.EFF(9,"JSON"),e.k0s(),e.j41(10,"mat-button-toggle",105),e.EFF(11,"YAML"),e.k0s()(),e.j41(12,"mat-label",15),e.EFF(13,"OpenAPI Service Definition (Optional)"),e.k0s(),e.nrm(14,"df-ace-editor",107),e.DNE(15,Ws,2,1,"ng-container",46),e.k0s()()(),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId")),e.R7$(2),e.Y8G("expanded",!1),e.R7$(4),e.Y8G("ngModel",t.serviceDefinitionType)("ngModelOptions",e.lJ4(8,rt)),e.R7$(7),e.Y8G("formControl",t.getServiceDocByServiceIdControl("content"))("mode",t.serviceDefinitionMode),e.R7$(1),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName)}}function el(n,a){if(1&n){const t=e.RV6();e.j41(0,"df-ai-chat-prereqs",113),e.bIt("selectConnection",function(i){e.eBV(t);const c=e.XpG(4);return e.Njj(c.setAiServiceId(i))})("selectRole",function(i){e.eBV(t);const c=e.XpG(4);return e.Njj(c.setAiRoleId(i))}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("selectedConnectionId",t.aiServiceId)("selectedRoleId",t.aiRoleId)}}function tl(n,a){if(1&n&&e.nrm(0,"df-ai-data-services",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function nl(n,a){if(1&n&&e.nrm(0,"df-ai-mcp-servers",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function ol(n,a){if(1&n&&e.nrm(0,"df-ai-test-connection",115),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)("serviceId",t.edit&&t.serviceData?t.serviceData.id:null)}}function il(n,a){if(1&n&&e.nrm(0,"df-ai-model-picker",115),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)("serviceId",t.edit&&t.serviceData?t.serviceData.id:null)}}function al(n,a){if(1&n&&e.nrm(0,"df-ai-allowed-roles",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function cl(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",116)(2,"input",117,118),e.bIt("change",function(i){e.eBV(t);const c=e.XpG(4);return e.Njj(c.excelUpload(i))}),e.k0s(),e.j41(4,"button",95),e.bIt("click",function(){e.eBV(t);const i=e.sdS(3);return e.Njj(i.click())}),e.EFF(5," Upload Excel "),e.k0s()(),e.nrm(6,"df-ace-editor",107),e.bVm()}if(2&n){const t=e.XpG(4);e.R7$(6),e.Y8G("formControl",t.getConfigControl("excelContent"))("mode",t.excelMode)}}function rl(n,a){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(7);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function sl(n,a){if(1&n&&(e.qex(0),e.DNE(1,rl,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}function ll(n,a){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG(3).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,ee).indexOf(t.type))("full-width",-1!==e.lJ4(7,ee).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function dl(n,a){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(3).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function pl(n,a){if(1&n&&(e.DNE(0,ll,1,8,"df-dynamic-field",101),e.DNE(1,dl,1,2,"df-array-field",50)),2&n){const t=e.XpG(2).$implicit;e.Y8G("ngIf",e.lJ4(2,pe).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function ml(n,a){if(1&n&&(e.qex(0),e.DNE(1,sl,2,1,"ng-container",1),e.DNE(2,pl,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf","text"===o.type&&"content"===o.name)("ngIfElse",t)}}function _l(n,a){if(1&n&&(e.qex(0),e.DNE(1,ml,4,2,"ng-container",24),e.bVm()),2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("ngIf",!("ai_chat"===o.serviceForm.getRawValue().type&&("aiServiceId"===t.name||"aiRoleId"===t.name||"mcpServers"===t.name||"defaultDataServices"===t.name)||"ai_connection"===o.serviceForm.getRawValue().type&&("defaultModel"===t.name||"allowedRoles"===t.name)))}}function gl(n,a){if(1&n&&e.nrm(0,"df-role-scope",119),2&n){const t=e.XpG(4);e.Y8G("roleId",t.aiRoleId)}}function fl(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"div",9),e.DNE(7,el,1,2,"df-ai-chat-prereqs",109),e.DNE(8,tl,1,1,"df-ai-data-services",110),e.DNE(9,nl,1,1,"df-ai-mcp-servers",110),e.DNE(10,ol,1,2,"df-ai-test-connection",111),e.DNE(11,il,1,2,"df-ai-model-picker",111),e.DNE(12,al,1,1,"df-ai-allowed-roles",110),e.DNE(13,cl,7,2,"ng-container",24),e.DNE(14,_l,2,1,"ng-container",46),e.DNE(15,gl,1,1,"df-role-scope",112),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("expanded",t.serviceForm.getRawValue().type),e.R7$(2),e.SpI("",e.bMT(5,12,"services.options")," "),e.R7$(3),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf",t.isFile&&"local_file"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type&&t.aiRoleId)}}function ul(n,a){if(1&n&&(e.qex(0)(1,45),e.DNE(2,Js,15,10,"ng-container",24),e.DNE(3,Zs,16,9,"ng-container",24),e.DNE(4,fl,16,14,"ng-container",24),e.bVm()()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",t.isNetworkService),e.R7$(1),e.Y8G("ngIf",t.isScriptService),e.R7$(1),e.Y8G("ngIf",!t.isNetworkService&&!t.isScriptService)}}function hl(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.toggleTool(r.name,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function bl(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Built-in Tools "),e.k0s(),e.j41(5,"div",120)(6,"mat-accordion",121)(7,"mat-expansion-panel",56)(8,"mat-expansion-panel-header")(9,"mat-panel-title",122)(10,"mat-slide-toggle",123),e.bIt("change",function(i){e.eBV(t);const c=e.XpG(2);return e.Njj(c.toggleAllSystemTools(i.checked))})("click",function(i){return i.stopPropagation()}),e.k0s(),e.j41(11,"span"),e.EFF(12,"System API"),e.k0s()(),e.j41(13,"mat-panel-description"),e.EFF(14),e.k0s()(),e.j41(15,"table",124)(16,"thead")(17,"tr"),e.nrm(18,"th",125),e.j41(19,"th"),e.EFF(20,"Tool Name"),e.k0s(),e.j41(21,"th"),e.EFF(22,"Description"),e.k0s()()(),e.j41(23,"tbody"),e.DNE(24,hl,8,5,"tr",126),e.k0s()()()()()()(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",!0),e.R7$(5),e.Y8G("expanded",!0),e.R7$(3),e.Y8G("checked",t.isAllSystemToolsEnabled()),e.R7$(4),e.SpI(" System API \xb7 ",t.systemMcpTools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.systemMcpTools)("ngForTrackBy",t.trackByName)}}function vl(n,a){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,"Loading services..."),e.k0s()())}function Cl(n,a){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,"No database or file services found."),e.k0s()())}function xl(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.toggleTool(r.name,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function kl(n,a){if(1&n&&(e.j41(0,"th")(1,"code"),e.EFF(2),e.k0s()()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.name)}}function yl(n,a){if(1&n){const t=e.RV6();e.j41(0,"td")(1,"mat-slide-toggle",127),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG().$implicit,l=e.XpG(5);return e.Njj(l.toggleVerbFor(s.name,r.name,i.checked))}),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG().$implicit,i=e.XpG(5);e.R7$(1),e.Y8G("checked",i.isVerbEnabledFor(o.name,t.name))}}function Ml(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(5);return e.Njj(s.toggleVerbEverywhere(r.name,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.DNE(6,yl,2,1,"td",46),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(5);e.AVh("disabled-row",!o.isVerbEnabledAnywhere(t.name)),e.R7$(2),e.Y8G("checked",o.isVerbEnabledAnywhere(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(1),e.Y8G("ngForOf",o.dbServices)("ngForTrackBy",o.trackByName)}}function Ol(n,a){if(1&n&&(e.j41(0,"mat-expansion-panel",132)(1,"mat-expansion-panel-header")(2,"mat-panel-title",122)(3,"span"),e.EFF(4,"Database Tools (merged)"),e.k0s()(),e.j41(5,"mat-panel-description"),e.EFF(6),e.k0s()(),e.j41(7,"p",9),e.EFF(8," Each verb is registered once and takes a "),e.j41(9,"code"),e.EFF(10,"service"),e.k0s(),e.EFF(11," argument. Turning a verb off for one database removes that database from the tool's allowed services; turning it off everywhere removes the tool. "),e.k0s(),e.j41(12,"table",124)(13,"thead")(14,"tr"),e.nrm(15,"th",125),e.j41(16,"th"),e.EFF(17,"Tool Name"),e.k0s(),e.DNE(18,kl,3,1,"th",46),e.k0s()(),e.j41(19,"tbody"),e.DNE(20,Ml,7,6,"tr",126),e.k0s()()()),2&n){const t=e.XpG(4);e.R7$(6),e.Lme(" ",t.mergedDbVerbs.length," tools \xb7 ",t.dbServices.length," databases "),e.R7$(12),e.Y8G("ngForOf",t.dbServices)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("ngForOf",t.mergedDbVerbs)("ngForTrackBy",t.trackByName)}}function Pl(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(5);return e.Njj(s.toggleTool(r.name,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(5);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function Fl(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-expansion-panel",56)(1,"mat-expansion-panel-header")(2,"mat-panel-title",122)(3,"mat-slide-toggle",123),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.toggleService(r,i.checked))})("click",function(i){return i.stopPropagation()}),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.j41(6,"mat-panel-description"),e.EFF(7),e.k0s()(),e.j41(8,"table",124)(9,"thead")(10,"tr"),e.nrm(11,"th",125),e.j41(12,"th"),e.EFF(13,"Tool Name"),e.k0s(),e.j41(14,"th"),e.EFF(15,"Description"),e.k0s()()(),e.j41(16,"tbody"),e.DNE(17,Pl,8,5,"tr",126),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.Y8G("expanded",t.expanded),e.R7$(3),e.Y8G("checked",o.isServiceEnabled(t)),e.R7$(2),e.JRh(t.label),e.R7$(2),e.Lme(" ",t.category," \xb7 ",t.tools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.tools)("ngForTrackBy",o.trackByName)}}function wl(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",120)(1,"mat-accordion",121)(2,"mat-expansion-panel")(3,"mat-expansion-panel-header")(4,"mat-panel-title",122)(5,"mat-slide-toggle",123),e.bIt("change",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.toggleAllGlobalTools(i.checked))})("click",function(i){return i.stopPropagation()}),e.k0s(),e.j41(6,"span"),e.EFF(7,"Global Tools"),e.k0s()(),e.j41(8,"mat-panel-description"),e.EFF(9),e.k0s()(),e.j41(10,"table",124)(11,"thead")(12,"tr"),e.nrm(13,"th",125),e.j41(14,"th"),e.EFF(15,"Tool Name"),e.k0s(),e.j41(16,"th"),e.EFF(17,"Description"),e.k0s()()(),e.j41(18,"tbody"),e.DNE(19,xl,8,5,"tr",129),e.k0s()()(),e.DNE(20,Ol,21,6,"mat-expansion-panel",130),e.DNE(21,Fl,18,7,"mat-expansion-panel",131),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(5),e.Y8G("checked",t.isAllGlobalToolsEnabled()),e.R7$(4),e.SpI(" Cross-service \xb7 ",t.mcpGlobalTools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.mcpGlobalTools),e.R7$(1),e.Y8G("ngIf",t.isMergedStyle&&t.dbServices.length>0),e.R7$(1),e.Y8G("ngForOf",t.visibleServices)("ngForTrackBy",t.trackByName)}}function Dl(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Built-in Tools "),e.k0s(),e.DNE(5,vl,3,0,"div",27),e.DNE(6,Cl,3,0,"div",27),e.DNE(7,wl,22,6,"div",128),e.k0s()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",!0),e.R7$(3),e.Y8G("ngIf",!t.mcpServicesLoaded),e.R7$(1),e.Y8G("ngIf",t.mcpServicesLoaded&&0===t.mcpServices.length&&0===t.mcpGlobalTools.length),e.R7$(1),e.Y8G("ngIf",t.mcpServicesLoaded)}}function Tl(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",139)(1,"button",140),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.addCustomTool())}),e.nrm(2,"fa-icon",141),e.EFF(3," Add Custom Tool "),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("icon",t.faPlus)}}function Sl(n,a){1&n&&(e.j41(0,"mat-form-field",161)(1,"mat-label"),e.EFF(2,"HTTP Method"),e.k0s(),e.j41(3,"mat-select",162)(4,"mat-option",163),e.EFF(5,"GET"),e.k0s(),e.j41(6,"mat-option",164),e.EFF(7,"POST"),e.k0s(),e.j41(8,"mat-option",165),e.EFF(9,"PUT"),e.k0s(),e.j41(10,"mat-option",166),e.EFF(11,"PATCH"),e.k0s(),e.j41(12,"mat-option",167),e.EFF(13,"DELETE"),e.k0s()()())}function Rl(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(5);return e.Njj(r.insertLookup(c.name,"url"))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function Il(n,a){if(1&n&&(e.j41(0,"mat-form-field",90)(1,"mat-label"),e.EFF(2,"URL"),e.k0s(),e.nrm(3,"input",168),e.j41(4,"button",169),e.nrm(5,"fa-icon",99),e.k0s(),e.j41(6,"mat-menu",null,170),e.DNE(8,Rl,2,1,"button",171),e.k0s(),e.j41(9,"mat-hint"),e.EFF(10,"Use {LOOKUP_NAME} for secrets or {param} for path parameters"),e.k0s()()),2&n){const t=e.sdS(7),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(3),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName)}}function El(n,a){1&n&&(e.j41(0,"mat-form-field",193)(1,"mat-label"),e.EFF(2,"Location"),e.k0s(),e.j41(3,"mat-select",194)(4,"mat-option",195),e.EFF(5,"query"),e.k0s(),e.j41(6,"mat-option",196),e.EFF(7,"path"),e.k0s(),e.j41(8,"mat-option",197),e.EFF(9,"body"),e.k0s(),e.j41(10,"mat-option",198),e.EFF(11,"header"),e.k0s()()())}function $l(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",175)(1,"div",176)(2,"span",177),e.EFF(3),e.k0s(),e.j41(4,"button",178),e.bIt("click",function(){const c=e.eBV(t).index,r=e.XpG(5);return e.Njj(r.removeToolParameter(c))}),e.nrm(5,"fa-icon",99),e.k0s()(),e.j41(6,"div",179)(7,"mat-form-field",180)(8,"mat-label"),e.EFF(9,"Name"),e.k0s(),e.nrm(10,"input",181),e.k0s(),e.j41(11,"mat-form-field",182)(12,"mat-label"),e.EFF(13,"Type"),e.k0s(),e.j41(14,"mat-select",183)(15,"mat-option",184),e.EFF(16,"string"),e.k0s(),e.j41(17,"mat-option",185),e.EFF(18,"number"),e.k0s(),e.j41(19,"mat-option",186),e.EFF(20,"integer"),e.k0s(),e.j41(21,"mat-option",187),e.EFF(22,"boolean"),e.k0s()()(),e.DNE(23,El,12,0,"mat-form-field",188),e.j41(24,"div",189)(25,"mat-checkbox",190),e.EFF(26,"Required"),e.k0s()(),e.j41(27,"mat-form-field",191)(28,"mat-label"),e.EFF(29,"Description"),e.k0s(),e.nrm(30,"input",192),e.k0s()()()}if(2&n){const t=a.index,o=e.XpG(5);let i;e.Y8G("formGroupName",t),e.R7$(3),e.SpI("#",t+1,""),e.R7$(2),e.Y8G("icon",o.faTrashCan),e.R7$(18),e.Y8G("ngIf","api"===(null==(i=o.customToolForm.get("toolType"))?null:i.value))}}function Gl(n,a){if(1&n&&(e.j41(0,"div",173),e.DNE(1,$l,31,4,"div",174),e.k0s()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("ngForOf",t.customToolParameters.controls)}}function jl(n,a){1&n&&(e.j41(0,"p",199),e.EFF(1," No parameters yet. Add one to define inputs for this tool. "),e.k0s())}function Nl(n,a){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.id),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function Al(n,a){1&n&&(e.j41(0,"div",146)(1,"mat-form-field",204)(2,"mat-label"),e.EFF(3,"Repository"),e.k0s(),e.nrm(4,"input",205),e.k0s(),e.j41(5,"mat-form-field",204)(6,"mat-label"),e.EFF(7,"Branch / Tag"),e.k0s(),e.nrm(8,"input",206),e.k0s(),e.j41(9,"mat-form-field",204)(10,"mat-label"),e.EFF(11,"File Path"),e.k0s(),e.nrm(12,"input",207),e.k0s()())}function Yl(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",208)(1,"button",209),e.bIt("click",function(){e.eBV(t);const i=e.XpG(5);return e.Njj(i.viewLatestScmContent())}),e.EFF(2," View Latest "),e.k0s()()}}function Vl(n,a){if(1&n&&(e.j41(0,"div",200)(1,"mat-expansion-panel",56)(2,"mat-expansion-panel-header")(3,"mat-panel-title"),e.EFF(4,"Link to Repository"),e.k0s()(),e.j41(5,"div",146)(6,"mat-form-field",147)(7,"mat-label"),e.EFF(8,"SCM Service"),e.k0s(),e.j41(9,"mat-select",201)(10,"mat-option",89),e.EFF(11,"None"),e.k0s(),e.DNE(12,Nl,2,2,"mat-option",74),e.k0s(),e.j41(13,"mat-hint"),e.EFF(14,"Select a GitHub, GitLab, or Bitbucket service"),e.k0s()()(),e.DNE(15,Al,13,0,"div",202),e.DNE(16,Yl,3,0,"div",203),e.k0s()()),2&n){const t=e.XpG(4);let o,i,c;e.Y8G("formGroup",t.customToolForm),e.R7$(1),e.Y8G("expanded",!(null==(o=t.customToolForm.get("storageServiceId"))||!o.value)),e.R7$(9),e.Y8G("value",null),e.R7$(2),e.Y8G("ngForOf",t.availableScmServices)("ngForTrackBy",t.trackById),e.R7$(3),e.Y8G("ngIf",null==(i=t.customToolForm.get("storageServiceId"))?null:i.value),e.R7$(1),e.Y8G("ngIf",null==(c=t.customToolForm.get("storageServiceId"))?null:c.value)}}function zl(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(5);return e.Njj(r.insertLookup(c.name,"function"))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function Xl(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",210)(1,"div",211)(2,"label",212),e.EFF(3,"Function (JavaScript function body)"),e.k0s(),e.j41(4,"button",213),e.nrm(5,"fa-icon",141),e.EFF(6," Insert Lookup "),e.k0s(),e.j41(7,"mat-menu",null,214),e.DNE(9,zl,2,1,"button",171),e.k0s()(),e.j41(10,"div",215)(11,"df-ace-editor",216,217),e.bIt("valueChange",function(i){e.eBV(t);const c=e.XpG(4);return e.Njj(c.onFunctionChange(i))}),e.k0s()(),e.j41(13,"span",218),e.EFF(14," Write a JavaScript function body. Parameters are available as variables by name. Use "),e.j41(15,"code"),e.EFF(16,"secrets.LOOKUP_NAME"),e.k0s(),e.EFF(17," to reference lookup values. "),e.k0s()()}if(2&n){const t=e.sdS(8),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(4),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName),e.R7$(2),e.Y8G("mode",o.functionEditorMode)}}function Bl(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(5);return e.Njj(r.insertLookup(c.name,"headers"))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function Ll(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",210)(1,"div",211)(2,"label",212),e.EFF(3,"Static Headers (JSON)"),e.k0s(),e.j41(4,"button",213),e.nrm(5,"fa-icon",141),e.EFF(6," Insert Lookup "),e.k0s(),e.j41(7,"mat-menu",null,219),e.DNE(9,Bl,2,1,"button",171),e.k0s()(),e.j41(10,"div",220)(11,"df-ace-editor",221,222),e.bIt("valueChange",function(i){e.eBV(t);const c=e.XpG(4);return e.Njj(c.onHeadersChange(i))}),e.k0s()()()}if(2&n){const t=e.sdS(8),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(4),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName),e.R7$(2),e.Y8G("mode",o.headersEditorMode)}}function Ul(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",142)(1,"h4"),e.EFF(2),e.k0s(),e.j41(3,"mat-button-toggle-group",143)(4,"mat-button-toggle",144),e.EFF(5,"API"),e.k0s(),e.j41(6,"mat-button-toggle",145),e.EFF(7,"Function"),e.k0s()(),e.j41(8,"div",146)(9,"mat-form-field",147)(10,"mat-label"),e.EFF(11,"Tool Name"),e.k0s(),e.nrm(12,"input",148),e.j41(13,"mat-hint"),e.EFF(14,"Letters, numbers, and underscores only"),e.k0s()(),e.DNE(15,Sl,14,0,"mat-form-field",149),e.k0s(),e.DNE(16,Il,11,5,"mat-form-field",150),e.j41(17,"mat-form-field",90)(18,"mat-label"),e.EFF(19,"Description"),e.k0s(),e.nrm(20,"textarea",151),e.j41(21,"mat-hint"),e.EFF(22,"This description is shown to the LLM"),e.k0s()(),e.j41(23,"div",152)(24,"div",10)(25,"h5"),e.EFF(26,"Parameters"),e.k0s(),e.j41(27,"button",153),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.addToolParameter())}),e.nrm(28,"fa-icon",141),e.EFF(29," Add Parameter "),e.k0s()(),e.DNE(30,Gl,2,1,"div",154),e.DNE(31,jl,2,0,"p",155),e.k0s(),e.DNE(32,Vl,17,7,"div",156),e.DNE(33,Xl,18,6,"div",157),e.DNE(34,Ll,13,6,"div",157),e.j41(35,"div",158)(36,"button",159),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.cancelCustomToolEdit())}),e.EFF(37," Cancel "),e.k0s(),e.j41(38,"button",160),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.saveCustomTool())}),e.EFF(39),e.k0s()()()}if(2&n){const t=e.XpG(3);let o,i,c,r,s;e.Y8G("formGroup",t.customToolForm),e.R7$(2),e.SpI(" ",-1===t.editingToolIndex?"Add Custom Tool":"Edit Custom Tool"," "),e.R7$(13),e.Y8G("ngIf","api"===(null==(o=t.customToolForm.get("toolType"))?null:o.value)),e.R7$(1),e.Y8G("ngIf","api"===(null==(i=t.customToolForm.get("toolType"))?null:i.value)),e.R7$(12),e.Y8G("icon",t.faPlus),e.R7$(2),e.Y8G("ngIf",t.customToolParameters.length>0),e.R7$(1),e.Y8G("ngIf",0===t.customToolParameters.length),e.R7$(1),e.Y8G("ngIf","function"===(null==(c=t.customToolForm.get("toolType"))?null:c.value)&&t.availableScmServices.length>0),e.R7$(1),e.Y8G("ngIf","function"===(null==(r=t.customToolForm.get("toolType"))?null:r.value)),e.R7$(1),e.Y8G("ngIf","api"===(null==(s=t.customToolForm.get("toolType"))?null:s.value)),e.R7$(4),e.Y8G("disabled",t.customToolForm.invalid),e.R7$(1),e.SpI(" ",-1===t.editingToolIndex?"Add":"Update"," ")}}function Jl(n,a){if(1&n&&(e.qex(0),e.j41(1,"code"),e.EFF(2),e.k0s(),e.EFF(3),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(2),e.JRh(t.httpMethod),e.R7$(1),e.SpI(" ",t.url," ")}}function ql(n,a){1&n&&(e.j41(0,"em"),e.EFF(1,"Function"),e.k0s())}function Kl(n,a){if(1&n&&(e.j41(0,"em"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2).$implicit;e.R7$(1),e.Lme("SCM: ",t.scmRepository,"/",t.storagePath,"")}}function Hl(n,a){if(1&n&&(e.qex(0),e.DNE(1,ql,2,0,"em",24),e.DNE(2,Kl,2,2,"em",24),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf",!t.storageServiceId),e.R7$(1),e.Y8G("ngIf",t.storageServiceId)}}function Ql(n,a){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(i){const r=e.eBV(t).index,s=e.XpG(4);return e.Njj(s.toggleCustomTool(r,i.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td")(7,"code"),e.EFF(8),e.k0s()(),e.j41(9,"td",224),e.DNE(10,Jl,4,2,"ng-container",24),e.DNE(11,Hl,3,2,"ng-container",24),e.k0s(),e.j41(12,"td"),e.EFF(13),e.k0s(),e.j41(14,"td",223)(15,"div",225)(16,"button",226),e.bIt("click",function(){const c=e.eBV(t).index,r=e.XpG(4);return e.Njj(r.editCustomTool(c))}),e.nrm(17,"fa-icon",99),e.k0s(),e.j41(18,"button",227),e.bIt("click",function(){const c=e.eBV(t).index,r=e.XpG(4);return e.Njj(r.deleteCustomTool(c))}),e.nrm(19,"fa-icon",99),e.k0s()()()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.AVh("disabled-row",!t.enabled),e.R7$(2),e.Y8G("checked",t.enabled),e.R7$(3),e.JRh(t.name),e.R7$(3),e.JRh((t.toolType||"api").toUpperCase()),e.R7$(2),e.Y8G("ngIf","api"===(t.toolType||"api")),e.R7$(1),e.Y8G("ngIf","function"===t.toolType),e.R7$(2),e.JRh(t.description),e.R7$(3),e.Y8G("disabled",null!==o.editingToolIndex),e.R7$(1),e.Y8G("icon",o.faPenToSquare),e.R7$(1),e.Y8G("disabled",null!==o.editingToolIndex),e.R7$(1),e.Y8G("icon",o.faTrashCan)}}function Wl(n,a){if(1&n&&(e.j41(0,"table",124)(1,"thead")(2,"tr"),e.nrm(3,"th",125),e.j41(4,"th"),e.EFF(5,"Name"),e.k0s(),e.j41(6,"th"),e.EFF(7,"Type"),e.k0s(),e.j41(8,"th"),e.EFF(9,"Method / URL"),e.k0s(),e.j41(10,"th"),e.EFF(11,"Description"),e.k0s(),e.nrm(12,"th",223),e.k0s()(),e.j41(13,"tbody"),e.DNE(14,Ql,20,12,"tr",129),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(14),e.Y8G("ngForOf",t.customTools)}}function Zl(n,a){1&n&&(e.j41(0,"p",228),e.EFF(1,' No custom tools defined. Click "Add Custom Tool" to create one. '),e.k0s())}function ed(n,a){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Custom Tools "),e.k0s(),e.j41(5,"div",133)(6,"p",134),e.EFF(7," Define custom tools that make HTTP requests to external APIs or execute server-side functions. These tools will be available to MCP clients alongside the built-in DreamFactory tools. "),e.k0s(),e.DNE(8,Tl,4,1,"div",135),e.DNE(9,Ul,40,12,"div",136),e.DNE(10,Wl,15,1,"table",137),e.DNE(11,Zl,2,0,"p",138),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",t.customTools.length>0),e.R7$(6),e.Y8G("ngIf",null===t.editingToolIndex),e.R7$(1),e.Y8G("ngIf",null!==t.editingToolIndex),e.R7$(1),e.Y8G("ngIf",t.customTools.length>0),e.R7$(1),e.Y8G("ngIf",0===t.customTools.length&&null===t.editingToolIndex)}}function td(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",229),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.save(!0,!1))}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"button",229),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.save(!0,!0))}),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.bVm()}2&n&&(e.R7$(1),e.Y8G("value",!0),e.R7$(1),e.SpI(" ",e.bMT(3,4,"saveAndClear")," "),e.R7$(2),e.Y8G("value",!0),e.R7$(1),e.SpI(" ",e.bMT(6,6,"saveAndContinue")," "))}function nd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",60)(1,"button",61),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goBack())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.DNE(4,td,7,8,"ng-container",24),e.j41(5,"button",68),e.EFF(6),e.nI1(7,"transloco"),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,3,"cancel")," "),e.R7$(2),e.Y8G("ngIf",t.edit),e.R7$(2),e.SpI(" ",e.bMT(7,5,"save")," ")}}function od(n,a){if(1&n){const t=e.RV6();e.DNE(0,ys,1,4,"df-service-health-panel",72),e.DNE(1,Ps,7,13,"ng-container",24),e.j41(2,"mat-form-field",38)(3,"mat-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"mat-select",73),e.bIt("selectionChange",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.onServiceTypeSelect(c.getServiceTypeLabel(i.value)))}),e.DNE(7,Fs,2,2,"mat-option",74),e.k0s(),e.nrm(8,"fa-icon",11),e.nI1(9,"transloco"),e.k0s(),e.DNE(10,ws,7,7,"mat-form-field",18),e.DNE(11,Ts,6,2,"ng-container",24),e.DNE(12,Ss,7,7,"mat-form-field",75),e.DNE(13,Rs,7,7,"mat-form-field",76),e.DNE(14,Is,4,3,"mat-slide-toggle",77),e.j41(15,"div",15),e.DNE(16,Gs,4,2,"ng-container",24),e.k0s(),e.DNE(17,ul,5,3,"ng-container",24),e.DNE(18,bl,25,6,"ng-container",24),e.DNE(19,Dl,8,4,"ng-container",24),e.DNE(20,ed,12,5,"ng-container",24),e.DNE(21,nd,8,7,"div",26)}if(2&n){const t=e.XpG();e.Y8G("ngIf",t.edit&&(null==t.serviceData?null:t.serviceData.id)&&!t.isPlatformService),e.R7$(1),e.Y8G("ngIf",t.edit&&t.isDatabase&&t.serviceData),e.R7$(3),e.JRh(e.bMT(5,18,"services.controls.serviceType.label")),e.R7$(3),e.Y8G("ngForOf",t.serviceTypes)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(9,20,"services.controls.serviceType.tooltip")),e.R7$(2),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf","excel"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(2),e.Y8G("ngIf",t.edit),e.R7$(1),e.Y8G("ngIf",t.viewSchema&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",t.isMcp&&t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",t.isMcp&&!t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",t.isMcp&&!t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired)}}function id(n,a){if(1&n&&e.nrm(0,"df-paywall",230),2&n){const t=e.XpG();e.Y8G("serviceName",t.selectedServiceTypeLable||"Unable to fetch service name")}}function ad(n,a){if(1&n){const t=e.RV6();e.j41(0,"h1",231),e.EFF(1,"Unsaved custom tool"),e.k0s(),e.j41(2,"div",232),e.EFF(3," You have unsaved changes in the custom tool editor. Saving the service now will discard those changes unless you add/update the tool first. "),e.k0s(),e.j41(4,"div",233)(5,"button",234),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.closeUnsavedToolDialog("cancel"))}),e.EFF(6," Keep editing "),e.k0s(),e.j41(7,"button",235),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.closeUnsavedToolDialog("discard"))}),e.EFF(8," Discard tool changes "),e.k0s(),e.j41(9,"button",236),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.closeUnsavedToolDialog("save"))}),e.EFF(10," Add/Update tool, then save "),e.k0s()()}}let st=class Pt{static{ct=this}constructor(a,t,o,i,c,r,s,l,p,v,k,C,M,D,T){this.activatedRoute=a,this.fb=t,this.servicesService=o,this.cacheService=i,this.router=c,this.systemConfigDataService=r,this.http=s,this.dialog=l,this.themeService=p,this.snackbarService=v,this.currentServiceService=k,this.snackBar=C,this.systemService=M,this.analyticsService=D,this.artifactResolver=T,this.edit=!1,this.isDatabase=!1,this.isPlatformService=!1,this.serviceGroup=null,this.isNetworkService=!1,this.isScriptService=!1,this.isFile=!1,this.isAuth=!1,this.isMcp=!1,this.isSystemMcp=!1,this.systemMcpTools=te,this.faCircleInfo=f.mEO,this.faPenToSquare=f.LFz,this.faTrashCan=f.sjs,this.faPlus=f.QLR,this.faFileImport=f.$MS,this.search="",this.content="",this.showSecurityConfig=!1,this.currentServiceId=null,this.isFirstTimeUser=!1,this.artifactKeys=[],this.artifactSampleTable="your_table",this.availableFileServices=[],this.mcpServices=[],this.mcpServicesLoaded=!1,this.disabledTools=new Set,this.mcpGlobalTools=[{name:"list_apis",title:"List Available APIs",description:"List all available database APIs and their tool prefixes"},{name:"all_get_tables",title:"Get Tables from All Databases",description:"Retrieve tables from all connected database services in one call"},{name:"all_find_table",title:"Find Table Across Databases",description:"Search for a table by name across all connected databases"},{name:"all_get_stored_procedures",title:"Get Stored Procedures from All",description:"Retrieve stored procedures from all connected databases"},{name:"all_get_stored_functions",title:"Get Stored Functions from All",description:"Retrieve stored functions from all connected databases"},{name:"all_get_resources",title:"Get Resources from All",description:"Retrieve all available resources from all connected databases"},{name:"all_list_files",title:"List Files from All Storage",description:"List files from all connected file storage services"},{name:"search",title:"Search (stub)",description:"Stub search implementation for connectors that require it"},{name:"fetch",title:"Fetch (stub)",description:"Stub fetch implementation for connectors that require it"}],this.customTools=[],this.editingToolIndex=null,this.availableLookups=[],this.availableScmServices=[],this.unsavedToolDialogRef=null,this.liveHeadersValue=null,this.liveFunctionValue=null,this.isDarkMode=this.themeService.darkMode$,this.toolStyle="prefixed",this.schemaMemoSrc=null,this.schemaMemoIsDatabase=null,this.schemaMemoIsNetwork=null,this.memoViewSchema=[],this.memoHasStandardFields=!1,this.memoBasicFields=[],this.memoAdvancedFields=[],this.memoNetworkRequiredFields=[],this.memoNetworkAdvancedFields=[],this.trackByName=(h,O)=>O.name,this.trackById=(h,O)=>O.id,this.warnings=[],this.memoServiceTypesSrc=null,this.memoServiceTypesSearch=null,this.memoFilteredServiceTypes=[],this.serviceForm=this.fb.group({type:["",d.k0.required],name:["",d.k0.required],label:[""],description:[""],isActive:[!0],storageServiceId:[null],config:this.fb.group({}),service_doc_by_service_id:this.fb.group({format:[0],content:[""]})}),this.customToolForm=this.fb.group({toolType:["api"],name:["",[d.k0.required,d.k0.pattern(/^[a-zA-Z0-9_]+$/)]],description:["",d.k0.required],httpMethod:["GET"],url:["",d.k0.required],parameters:this.fb.array([]),headers:["{}"],function:[""],enabled:[!0],storageServiceId:[null],scmRepository:[""],scmReference:[""],storagePath:[""]}),this.customToolForm.get("toolType").valueChanges.subscribe(h=>{const O=this.customToolForm.get("url"),x=this.customToolForm.get("function");if("function"===h){O.clearValidators();const P=!!this.customToolForm.get("storageServiceId")?.value;x.setValidators(P?[]:[d.k0.required])}else O.setValidators(d.k0.required),x.clearValidators();O.updateValueAndValidity(),x.updateValueAndValidity()}),this.customToolForm.get("storageServiceId").valueChanges.subscribe(h=>{const O=this.customToolForm.get("function");"function"===this.customToolForm.get("toolType")?.value&&(O.setValidators(h?[]:[d.k0.required]),O.updateValueAndValidity())}),this.activatedRoute.snapshot.paramMap.get("id")&&(this.edit=!0)}ngOnInit(){this.edit||this.analyticsService.getDashboardStats().subscribe(a=>{this.isFirstTimeUser=0===a.services.total}),this.http.get("assets/img/databaseImages.json").subscribe(a=>{this.images=a}),this.http.get(`${U.C}/system/lookup`,{params:{fields:"name",limit:"100"}}).subscribe(a=>{this.availableLookups=a?.resource??[]}),this.systemConfigDataService.environment$.pipe((0,ve.n)(a=>this.activatedRoute.data.pipe((0,K.T)(t=>({env:a,route:t}))))).subscribe(({env:a,route:t})=>{t.groups&&"Database"===t.groups[0]&&(this.isDatabase=!0),t.groups&&"Remote Service"===t.groups[0]&&(this.isNetworkService=!0),t.groups&&"Script"===t.groups[0]&&(this.isScriptService=!0),t.groups&&"File"===t.groups[0]&&(this.isFile=!0),t.groups&&"LDAP"===t.groups[0]&&(this.isAuth=!0),t.groups&&"MCP"===t.groups[0]&&(this.isMcp=!0),this.serviceGroup=t.groups?.[0]??null,this.isPlatformService=t.system||this.activatedRoute.snapshot.parent?.data?.system||!1;const{data:o,serviceTypes:i,groups:c}=t,r=a.platform?.license;if(this.serviceTypes=i.filter(s=>"python"!==s.name.toLowerCase()),this.notIncludedServices=[],this.snackbarService.setSnackbarLastEle(o&&(o.label||o.name)?o.label?o.label:o.name:"Unknown label",!1),this.edit&&o&&this.snackbarService.setPageLabel(this.router.url,o.label||o.name||String(o.id??"")),this.isDatabase?("SILVER"===r&&this.notIncludedServices.push(...xe.Ky.map(s=>(s.class="not-included",s)).filter(s=>c.includes(s.group))),"OPEN SOURCE"===r&&this.notIncludedServices.push(...xe.F8.map(s=>(s.class="not-included",s)).filter(s=>c.includes(s.group)),...xe.Ky.map(s=>(s.class="not-included",s)).filter(s=>c.includes(s.group)))):("SILVER"===r&&this.serviceTypes.push(...xe.Ky.filter(s=>c.includes(s.group))),"OPEN SOURCE"===r&&this.serviceTypes.push(...xe.F8.filter(s=>c.includes(s.group)),...xe.Ky.filter(s=>c.includes(s.group)))),o?.serviceDocByServiceId)if(this.isNetworkService)o.config.serviceDefinition=o?.serviceDocByServiceId.content,this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content);else if(this.isScriptService){o.config||(o.config={});const s=l=>{if(!l)return!1;const p=l.trim();return[/^\s*\{?\s*["']?openapi["']?\s*:/i,/^\s*\{?\s*["']?swagger["']?\s*:/i,/^\s*openapi\s*:/im,/^\s*swagger\s*:/im,/["']paths["']\s*:\s*\{/i,/^\s*paths\s*:/im].some(k=>k.test(p))};o.config.content&&""!==o.config.content.trim()?this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content||""):o.serviceDocByServiceId?.content&&(s(o.serviceDocByServiceId.content)?this.getServiceDocByServiceIdControl("content").setValue(o.serviceDocByServiceId.content):(o.config.content=o.serviceDocByServiceId.content,this.getServiceDocByServiceIdControl("content").setValue("")))}else this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content);if(this.serviceData=o,this.content=o?this.isScriptService?o.config.content||"":o.config.serviceDefinition||"":"",this.edit){if(this.configSchema=this.getConfigSchema(o.type),this.initializeConfig(""),"excel"===o.type){console.log("Editing Excel service, data:",o),console.log("Config:",o.config),console.log("Storage service ID from config:",o.config?.storageServiceId);const s=o.config?.storageServiceId;this.loadAvailableFileServices(()=>{console.log("File services loaded, now setting form value"),s?(console.log("Setting storageServiceId to:",s),this.serviceForm.patchValue({...o,config:o.config,storageServiceId:s})):(console.log("No storageServiceId found in config"),this.serviceForm.patchValue({...o,config:o.config}))})}else this.serviceForm.patchValue({...o,config:o.config});o?.serviceDocByServiceId&&(this.serviceDefinitionType=""+o?.serviceDocByServiceId.format,this.isNetworkService&&(this.getConfigControl("content")?.setValue(o.serviceDocByServiceId.content),this.content=o.serviceDocByServiceId.content||"")),this.serviceForm.controls.type.disable()}else this.serviceForm.controls.type.valueChanges.subscribe(s=>{this.serviceForm.removeControl("config"),this.configSchema=this.getConfigSchema(s),this.updateServiceTypeFlags(s),this.initializeConfig(s),"excel"===s&&this.loadAvailableFileServices()});this.edit&&"excel"===o?.type&&this.loadAvailableFileServices(),this.edit&&this.isMcp&&(this.isSystemMcp=Rt(o?.type),this.disabledTools=new Set(o?.config?.disabledTools??[]),this.toolStyle="merged"===o?.config?.toolStyle?"merged":"prefixed",this.isSystemMcp?(this.customTools=[],this.mcpServicesLoaded=!0):(this.customTools=(o?.config?.customTools??[]).map(l=>({id:l.id,toolType:l.toolType||"api",name:l.name,description:l.description,httpMethod:l.httpMethod,url:l.url,parameters:l.parameters||[],headers:l.headers||{},function:l.function||"",enabled:!1!==l.enabled&&0!==l.enabled,storageServiceId:l.storageServiceId||null,scmRepository:l.scmRepository||"",scmReference:l.scmReference||"",storagePath:l.storagePath||""})),this.loadMcpServices(),this.getConfigControl("toolStyle")?.valueChanges.subscribe(l=>{this.toolStyle="merged"===l?"merged":"prefixed"}),this.loadAvailableScmServices())),this.edit&&this.isDatabase&&this.serviceData&&this.loadArtifactCardData()}),this.isDatabase&&this.serviceForm.controls.type.valueChanges.subscribe(a=>{this.serviceForm.patchValue({label:a})})}getStorageServiceDisplayName(){console.log("=== getStorageServiceDisplayName called ==="),console.log("this.edit:",this.edit),console.log("this.serviceData:",this.serviceData),console.log("this.availableFileServices:",this.availableFileServices);let a=this.serviceForm.get("storageServiceId")?.value;if(console.log("storageServiceId from form:",a),!a&&this.edit&&this.serviceData?.config?.storageServiceId&&(a=this.serviceData.config.storageServiceId,console.log("storageServiceId from serviceData.config.storageServiceId:",a)),console.log("this.serviceData.config:",this.serviceData?.config),console.log("this.serviceData.config?.storageServiceId:",this.serviceData?.config?.storageServiceId),!a)return console.log("No storageServiceId found, returning default message"),"No storage service selected";const t=this.availableFileServices.find(o=>o.id===a);if(console.log("selectedService found:",t),t){const o=t.label||t.name;return console.log("Returning display name:",o),o}return console.log("Service not found in availableFileServices, returning ID"),`Service ID: ${a}`}loadAvailableFileServices(a){console.log("=== loadAvailableFileServices called ==="),console.log("Current service form type:",this.serviceForm.getRawValue().type),console.log("Available file services before loading:",this.availableFileServices);let t="";const o=localStorage.getItem("df_token")||localStorage.getItem("X-DreamFactory-API-Key")||sessionStorage.getItem("df_token");if(o)t=`X-DreamFactory-API-Key: ${o}`;else{const l=document.cookie.split(";");let p="",v="";for(const k of l){const[C,M]=k.trim().split("=");("df_session_token"===C||"session_token"===C)&&(p=M),("df_api_key"===C||"api_key"===C)&&(v=M)}p?t=`X-DreamFactory-Session-Token: ${p}`:v?t=`X-DreamFactory-API-Key: ${v}`:window.dfAuthToken?t=`X-DreamFactory-API-Key: ${window.dfAuthToken}`:window.dreamFactoryToken&&(t=`X-DreamFactory-API-Key: ${window.dreamFactoryToken}`)}if(!t)return console.warn("No authentication method found, cannot load file services"),this.availableFileServices=[],void(a&&a());const i=`${window.location.origin}/api/v2/system/service`,[c,r]=t.split(": "),s={};c&&r&&(s[c]=r),this.http.get(i,{params:{filter:"type=local_file",fields:"id,name,label,type"},headers:s}).subscribe({next:l=>{l.resource&&Array.isArray(l.resource)?(this.availableFileServices=l.resource,console.log("File services loaded successfully:",this.availableFileServices)):(console.warn("No file services found in response or invalid format"),this.availableFileServices=[]),a&&a()},error:l=>{console.error("Failed to load file services:",l),this.http.get(i,{params:{fields:"id,name,label,type"},headers:s}).subscribe({next:p=>{p.resource&&Array.isArray(p.resource)?(this.availableFileServices=p.resource.filter(k=>k.type&&("local_file"===k.type||"file"===k.type||k.type.includes("file"))),console.log("File services loaded via fallback:",this.availableFileServices)):this.availableFileServices=[],a&&a()},error:p=>{console.error("Fallback also failed:",p),this.availableFileServices=[],a&&a()}})}})}loadMcpServices(){this.mcpServicesLoaded||this.http.get("/api/v2/system/service_type",{params:{fields:"name,group"}}).pipe((0,ve.n)(a=>{const t=a?.resource??[],o=new Set(t.filter(c=>"Database"===c.group).map(c=>c.name)),i=new Set(t.filter(c=>"File"===c.group).map(c=>c.name));return this.http.get("/api/v2/system/service",{params:{fields:"name,label,type,is_active"}}).pipe((0,K.T)(c=>(c?.resource??[]).filter(s=>!1!==s.isActive&&(o.has(s.type)||i.has(s.type))).map(s=>{const l=o.has(s.type)?"Database":"File",p=this.sanitizeApiName(s.name);return{name:s.name,label:s.label||s.name,type:s.type,category:l,tools:this.buildToolList(p,l),expanded:!1}})))})).subscribe({next:a=>{this.mcpServices=a,this.mcpServicesLoaded=!0},error:a=>{console.error("Failed to load MCP services:",a),this.mcpServicesLoaded=!0}})}buildToolList(a,t){return"Database"===t?[{name:`${a}_get_tables`,title:"List Tables",description:"Get tables available in the database"},{name:`${a}_get_table_schema`,title:"Get Table Schema",description:"Retrieve the schema of a specific table"},{name:`${a}_get_table_data`,title:"Get Table Data",description:"Retrieve table data with filtering, pagination, and sorting"},{name:`${a}_create_records`,title:"Create Records",description:"Create one or more records in a table"},{name:`${a}_update_records`,title:"Update Records",description:"Update (patch) records in a table"},{name:`${a}_delete_records`,title:"Delete Records",description:"Delete records from a table"},{name:`${a}_get_table_fields`,title:"Get Table Fields",description:"Retrieve field definitions for a table"},{name:`${a}_get_table_relationships`,title:"Get Table Relationships",description:"Retrieve relationships definition for a table"},{name:`${a}_get_stored_procedures`,title:"List Stored Procedures",description:"Get stored procedures available in the database"},{name:`${a}_call_stored_procedure`,title:"Call Stored Procedure",description:"Call a stored procedure"},{name:`${a}_get_stored_functions`,title:"List Stored Functions",description:"Get stored functions available in the database"},{name:`${a}_call_stored_function`,title:"Call Stored Function",description:"Call a stored function"},{name:`${a}_get_database_resources`,title:"List Database Resources",description:"Get all resources available in the database service"},{name:`${a}_get_api_spec`,title:"Get API Spec",description:"Get the OpenAPI specification for this database service"},{name:`${a}_get_data_model`,title:"Get Data Model",description:"Get a condensed data model showing all tables and columns"},{name:`${a}_aggregate_data`,title:"Aggregate Data",description:"Compute server-side aggregations (SUM, COUNT, AVG, MIN, MAX)"}]:[{name:`${a}_list_files`,title:"List Files",description:"List files and folders in a path"},{name:`${a}_get_file`,title:"Get File Content",description:"Get the content of a file"},{name:`${a}_create_file`,title:"Create File",description:"Create a new file with the given content"},{name:`${a}_get_file_properties`,title:"Get File Properties",description:"Get properties/metadata of a file or folder"},{name:`${a}_create_folder`,title:"Create Folder",description:"Create a new folder"},{name:`${a}_delete_file`,title:"Delete File or Folder",description:"Delete a file or folder"}]}isToolEnabled(a){return!this.disabledTools.has(a)}toggleTool(a,t){t?this.disabledTools.delete(a):this.disabledTools.add(a)}isAllSystemToolsEnabled(){return this.systemMcpTools.some(a=>!this.disabledTools.has(a.name))}toggleAllSystemTools(a){for(const t of this.systemMcpTools)a?this.disabledTools.delete(t.name):this.disabledTools.add(t.name)}isAllGlobalToolsEnabled(){return this.mcpGlobalTools.some(a=>!this.disabledTools.has(a.name))}toggleAllGlobalTools(a){for(const t of this.mcpGlobalTools)a?this.disabledTools.delete(t.name):this.disabledTools.add(t.name)}get isMergedStyle(){return"merged"===this.toolStyle}get dbServices(){return this.mcpServices.filter(a=>"Database"===a.category)}get visibleServices(){return this.isMergedStyle?this.mcpServices.filter(a=>"Database"!==a.category):this.mcpServices}get mergedDbVerbs(){const a=this.dbServices[0];if(!a)return[];const t=this.sanitizeApiName(a.name)+"_";return a.tools.map(o=>({...o,name:o.name.startsWith(t)?o.name.slice(t.length):o.name}))}verbKey(a,t){return`${this.sanitizeApiName(t)}_${a}`}isVerbEnabledFor(a,t){return!this.disabledTools.has(this.verbKey(a,t))}toggleVerbFor(a,t,o){const i=this.verbKey(a,t);o?this.disabledTools.delete(i):this.disabledTools.add(i)}isVerbEnabledAnywhere(a){return this.dbServices.some(t=>this.isVerbEnabledFor(a,t.name))}toggleVerbEverywhere(a,t){for(const o of this.dbServices)this.toggleVerbFor(a,o.name,t)}isServiceEnabled(a){return a.tools.some(t=>!this.disabledTools.has(t.name))}toggleService(a,t){for(const o of a.tools)t?this.disabledTools.delete(o.name):this.disabledTools.add(o.name)}sanitizeApiName(a){return a.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}get customToolParameters(){return this.customToolForm.get("parameters")}createParameterGroup(a){return this.fb.group({name:[a?.name??"",d.k0.required],type:[a?.type??"string"],in:[a?.in??"query"],required:[a?.required??!1],description:[a?.description??""]})}addCustomTool(){this.editingToolIndex=-1,this.customToolForm.reset({toolType:"api",name:"",description:"",httpMethod:"GET",url:"",headers:"{}",function:"",enabled:!0,storageServiceId:null,scmRepository:"",scmReference:"",storagePath:""}),this.customToolParameters.clear(),this.liveHeadersValue=null,this.liveFunctionValue=null}editCustomTool(a){const t=this.customTools[a];this.editingToolIndex=a;const o=JSON.stringify(t.headers||{},null,2);this.customToolForm.patchValue({toolType:t.toolType||"api",name:t.name,description:t.description,httpMethod:t.httpMethod||"GET",url:t.url||"",headers:o,function:t.function||"",enabled:t.enabled,storageServiceId:t.storageServiceId||null,scmRepository:t.scmRepository||"",scmReference:t.scmReference||"",storagePath:t.storagePath||""}),this.liveHeadersValue=o,this.liveFunctionValue=t.function||"",this.customToolParameters.clear(),(t.parameters||[]).forEach(i=>{this.customToolParameters.push(this.createParameterGroup(i))})}deleteCustomTool(a){this.customTools.splice(a,1)}onHeadersChange(a){this.liveHeadersValue=a}onFunctionChange(a){this.liveFunctionValue=a}insertLookup(a,t){if("function"===t)this.functionEditor?.insertAtCursor(`secrets.${a}`);else if("headers"===t)this.headersEditor?.insertAtCursor(`{${a}}`);else if("url"===t){const o=this.customToolForm.get("url");o&&o.setValue((o.value||"")+`{${a}}`)}}saveCustomTool(){if(this.customToolForm.invalid)return;const a=this.customToolForm.getRawValue(),t=this.liveHeadersValue??a.headers??"{}",o=this.liveFunctionValue??a.function??"";let i={};if("api"===a.toolType&&""!==t.trim())try{i=JSON.parse(t)}catch(r){return void this.snackbarService.openSnackBar(`Invalid JSON in Static Headers: ${r.message}`,"error")}const c={toolType:a.toolType||"api",name:a.name,description:a.description,httpMethod:a.httpMethod,url:a.url,parameters:a.parameters||[],headers:i,function:o,enabled:a.enabled??!0,storageServiceId:a.storageServiceId||null,scmRepository:a.scmRepository||"",scmReference:a.scmReference||"",storagePath:a.storagePath||""};-1===this.editingToolIndex?this.customTools.push(c):null!==this.editingToolIndex&&(c.id=this.customTools[this.editingToolIndex].id,this.customTools[this.editingToolIndex]=c),this.editingToolIndex=null}cancelCustomToolEdit(){this.editingToolIndex=null}hasUnsavedCustomTool(){return null!==this.editingToolIndex&&this.customToolForm.dirty}closeUnsavedToolDialog(a){this.unsavedToolDialogRef?.close(a)}toggleCustomTool(a,t){this.customTools[a].enabled=t}loadAvailableScmServices(){this.http.get("/api/v2",{params:{group:"source control",fields:"id,name,label,type"},context:(0,Ce.Ku)()}).subscribe({next:a=>{this.availableScmServices=(a?.resource??a?.services??[]).filter(t=>t.id&&t.name)},error:()=>{this.availableScmServices=[]}})}viewLatestScmContent(){const a=this.customToolForm.get("storageServiceId")?.value,t=this.customToolForm.get("scmRepository")?.value,o=this.customToolForm.get("scmReference")?.value||"master",i=this.customToolForm.get("storagePath")?.value;if(!a||!t||!i)return void this.snackbarService.openSnackBar("Service, repository, and path are required to fetch from SCM.","error");const c=this.availableScmServices.find(s=>s.id===a);c?this.http.get(`/api/v2/${c.name}/_repo/${t}`,{params:{branch:o,content:"1",path:i},responseType:"text",context:(0,Ce.PH)()}).subscribe({next:s=>{this.customToolForm.get("function")?.setValue(s),this.liveFunctionValue=s,this.snackbarService.openSnackBar("Function loaded from repository.","success")},error:s=>{this.snackbarService.openSnackBar(`Failed to fetch from SCM: ${(0,$e.cQ)(s).message}`,"error")}}):this.snackbarService.openSnackBar("Selected SCM service not found.","error")}addToolParameter(){this.customToolParameters.push(this.createParameterGroup())}removeToolParameter(a){this.customToolParameters.removeAt(a)}logFormValues(){console.log("Form values:",this.serviceForm.value)}updateServiceTypeFlags(a){this.isNetworkService=!1,this.isScriptService=!1,this.isFile=!1,this.isSystemMcp=Rt(a);const t=this.serviceTypes.find(o=>o.name===a);if(t&&t.group){const o=t.group;"Remote Service"===o?this.isNetworkService=!0:"Script"===o?this.isScriptService=!0:"File"===o&&(this.isFile=!0)}}initializeConfig(a){const t=this.fb.group({});if(this.configSchema&&this.configSchema.length>0){this.configSchema.forEach(i=>{const c=[];i.required&&c.push(d.k0.required),t?.addControl(i.name,new d.MJ(i.default,c))}),this.isFile&&"local_file"===a&&t?.addControl("excelContent",new d.MJ(""));const o=this.configSchema.filter(i=>"content"===i.name)?.[0];if(o){const i=[];o.required&&i.push(d.k0.required),t?.addControl("serviceDefinition",new d.MJ(o.default,i))}this.isNetworkService&&(this.serviceForm.addControl("type",new d.MJ("")),t.addControl("content",new d.MJ("")),this.serviceDefinitionType="0"),this.isScriptService&&(t.get("content")||t.addControl("content",new d.MJ("")),this.serviceDefinitionType="0")}this.serviceForm.setControl("config",t)}get subscriptionRequired(){const a=this.serviceForm.controls.type.value;return"local_email"!==a&&"api_builder"!==a&&"API Builder"!==this.serviceTypes.find(o=>o.name===a)?.group&&a&&0===this.configSchema?.length}get scriptMode(){const a=this.serviceForm.getRawValue().type;return"nodejs"===a?Z.Q.NODEJS:"python"===a?Z.Q.PYTHON:"python3"===a?Z.Q.PYTHON3:"php"===a?Z.Q.PHP:Z.Q.TEXT}get serviceDefinitionMode(){return"0"===this.serviceDefinitionType?Z.Q.JSON:Z.Q.YAML}get excelMode(){return Z.Q.JSON}get functionEditorMode(){return Z.Q.JAVASCRIPT}get headersEditorMode(){return Z.Q.JSON}excelUpload(a){const t=this.serviceForm.get("config"),o=a.target;o.files&&t&&t.get("excelContent")&&(0,jt.Sj)(o.files[0]).subscribe(i=>{const c=t.get("excelContent");c&&c.setValue(i)})}getConfigSchema(a){return this.serviceTypes.find(t=>t.name===a)?.configSchema.map(t=>{const o="array"===t.type&&Array.isArray(t.items)?t.items.map(i=>({...i,name:(0,He.hm)(i.name)})):t.items;return{...t,name:(0,He.hm)(t.name),items:o}})??[]}syncSchemaViews(){if(this.schemaMemoSrc===(this.configSchema??null)&&this.schemaMemoIsDatabase===this.isDatabase&&this.schemaMemoIsNetwork===this.isNetworkService)return;this.schemaMemoSrc=this.configSchema??null,this.schemaMemoIsDatabase=this.isDatabase,this.schemaMemoIsNetwork=this.isNetworkService;const a=this.configSchema?.filter(c=>!["storageServiceId","storagePath"].includes(c.name))||[];this.memoViewSchema=a;const t=["host","port","database","username","password"],o=a.map(c=>c.name.toLowerCase());this.memoHasStandardFields=this.isDatabase&&t.filter(c=>o.includes(c)).length>=3,this.isDatabase?this.memoHasStandardFields?(this.memoBasicFields=a.filter(c=>t.includes(c.name.toLowerCase())),this.memoAdvancedFields=a.filter(c=>!t.includes(c.name.toLowerCase()))):(this.memoBasicFields=a,this.memoAdvancedFields=[]):(this.memoBasicFields=[],this.memoAdvancedFields=[]);const i=["baseUrl"];this.isNetworkService?(this.memoNetworkRequiredFields=a.filter(c=>i.includes(c.name)),this.memoNetworkAdvancedFields=a.filter(c=>!i.includes(c.name)&&"content"!==c.name)):(this.memoNetworkRequiredFields=[],this.memoNetworkAdvancedFields=[])}get viewSchema(){return this.syncSchemaViews(),this.memoViewSchema}get hasStandardFields(){return this.syncSchemaViews(),this.memoHasStandardFields}get basicFields(){return this.syncSchemaViews(),this.memoBasicFields}get advancedFields(){return this.syncSchemaViews(),this.memoAdvancedFields}get showAdvancedOptions(){return this.isDatabase&&this.hasStandardFields&&this.advancedFields.length>0}get networkRequiredFields(){return this.syncSchemaViews(),this.memoNetworkRequiredFields}get networkAdvancedFields(){return this.syncSchemaViews(),this.memoNetworkAdvancedFields}get showNetworkAdvancedOptions(){return this.isNetworkService}get showCurlImport(){return this.isNetworkService&&this.viewSchema.some(a=>"baseUrl"===a.name)}openCurlImport(){this.dialog.open(Cr,{width:"46rem"}).afterClosed().subscribe(a=>{a&&this.applyCurlImport(a)})}static{this.VERB_MASK={GET:1,POST:2,PUT:4,PATCH:8,DELETE:16}}applyCurlImport(a){const t=this.serviceForm.get("config");if(!t)return;const o=(c,r)=>{const s=t.get(c);s&&(s.setValue(r),s.markAsDirty())},i=ct.VERB_MASK[a.method]??0;o("baseUrl",a.baseUrl),o("parameters",a.parameters.map(c=>({name:c.name,value:c.value,exclude:!1,outbound:!0,cacheKey:!1,action:i}))),o("headers",a.headers.map(c=>({name:c.name,value:c.value,passFromClient:!1,action:i}))),Object.keys(a.options).length&&o("options",{...t.get("options")?.value??{},...a.options}),this.serviceForm.markAsDirty()}getConfigControl(a){return this.serviceForm.get(`config.${a}`)}get aiRoleId(){const t=this.serviceForm.get("config.aiRoleId")?.value;return"number"==typeof t?t:null}get aiServiceId(){const t=this.serviceForm.get("config.aiServiceId")?.value;return"number"==typeof t?t:null}setAiServiceId(a){this.serviceForm.get("config.aiServiceId")?.setValue(a)}setAiRoleId(a){this.serviceForm.get("config.aiRoleId")?.setValue(a)}getServiceDocByServiceIdControl(a){return this.serviceForm.get(`service_doc_by_service_id.${a}`)}getServiceDefinitionControl(){return this.serviceForm.get("serviceDefinition")}getControl(a){return this.serviceForm.controls[a]}save(a,t){if(this.hasUnsavedCustomTool()){if(this.unsavedToolDialogRef)return;return this.unsavedToolDialogRef=this.dialog.open(this.unsavedToolDialogTpl,{width:"440px",disableClose:!0}),void this.unsavedToolDialogRef.afterClosed().subscribe(l=>{if(this.unsavedToolDialogRef=null,l&&"cancel"!==l){if("save"===l){if(this.customToolForm.invalid)return void this.snackbarService.openSnackBar("Custom tool has invalid fields. Fix them or discard the edit before saving the service.","error");this.saveCustomTool()}else this.cancelCustomToolEdit();this.customToolForm.markAsPristine(),this.save(a,t)}})}const o=this.serviceForm.getRawValue();if(""===o.type||""===o.name)return void this.serviceForm.markAllAsTouched();this.validateServiceName(o.name)||console.warn(this.warnings);const i=this.formatServiceName(o.name);this.serviceForm.patchValue({name:i});let s,c={snackbarSuccess:"services.createSuccessMsg"},r=null;if(this.isNetworkService)c={...c,fields:"*",related:"service_doc_by_service_id"},o.config?.content&&(r={content:o.config.content,format:this.serviceDefinitionType?Number(this.serviceDefinitionType):0},delete o.config.content);else if(this.isScriptService){c={...c,fields:"*",related:"service_doc_by_service_id"};const l=this.getServiceDocByServiceIdControl("content")?.value;l&&l.trim()&&(r={content:l,format:this.serviceDefinitionType?Number(this.serviceDefinitionType):0})}if(o.service_doc_by_service_id=r,o.type.toLowerCase().includes("saml")?(c={...c,fields:"*",related:"service_doc_by_service_id"},s={...o,is_active:o.isActive,id:this.edit?this.serviceData.id:null,config:{sp_nameIDFormat:o.config.spNameIDFormat,default_role:o.config.defaultRole,sp_x509cert:o.config.spX509cert,sp_privateKey:o.config.spPrivateKey,idp_entityId:o.config.idpEntityId,idp_singleSignOnService_url:o.config.idpSingleSignOnServiceUrl,idp_x509cert:o.config.idpX509cert,relay_state:o.config.relayState}},o.config.appRoleMap&&(s.config.app_role_map=o.config.appRoleMap.map(l=>Object.keys(l).reduce((p,v)=>({...p,[(0,He.F0)(v)]:l[v]}),{}))),o.config.iconClass&&(s.config.icon_class=o.config.iconClass),delete s.isActive):"excel"===o.type?(s={...o,id:this.edit?this.serviceData.id:null,config:{...o.config||{},storage_service_id:o.storageServiceId}},delete s.storageServiceId):s={...o,id:this.edit?this.serviceData.id:null},this.edit){let l;"excel"===o.type?(l={...this.serviceData,...o,config:{...this.serviceData.config||{},...o.config,storage_service_id:o.storageServiceId},service_doc_by_service_id:o.service_doc_by_service_id?{id:this.serviceData.serviceDocByServiceId?.id,...this.serviceData.serviceDocByServiceId||{},...o.service_doc_by_service_id}:null},delete l.storageServiceId):l={...this.serviceData,...o,config:{...this.serviceData.config||{},...o.config},service_doc_by_service_id:o.service_doc_by_service_id?{id:this.serviceData.serviceDocByServiceId?.id,...this.serviceData.serviceDocByServiceId||{},...o.service_doc_by_service_id}:null},this.isNetworkService&&delete l.config.serviceDefinition,this.isMcp&&(l.config.disabledTools=Array.from(this.disabledTools),l.config.customTools=this.customTools.map(p=>({id:p.id,toolType:p.toolType||"api",name:p.name,description:p.description,httpMethod:p.httpMethod,url:p.url,parameters:p.parameters,headers:p.headers,function:p.function||"",enabled:p.enabled,storageServiceId:p.storageServiceId||null,scmRepository:p.scmRepository||"",scmReference:p.scmReference||"",storagePath:p.storagePath||""})),this.isSystemMcp&&delete l.config.customTools),this.servicesService.update(this.serviceData.id,l,{snackbarSuccess:"services.updateSuccessMsg"}).subscribe(()=>{o.type.toLowerCase().includes("saml")?this.router.navigate(["../"],{relativeTo:this.activatedRoute}):a&&this.cacheService.delete(l.name,{snackbarSuccess:"cache.serviceCacheFlushed"}).subscribe({next:()=>{t||this.router.navigate(["../"],{relativeTo:this.activatedRoute})},error:p=>console.error("Error flushing cache",p)})})}else this.servicesService.create({resource:[s]},c).pipe((0,ve.n)(l=>this.isDatabase?this.http.get(`${U.C}/${i}/_table`).pipe((0,K.T)(()=>l),(0,N.W)(p=>this.servicesService.delete(l.resource[0].id).pipe((0,ma.Z)(()=>(0,ue.$)(()=>new Error("Database connection failed. Please check your connection details.")))))):(0,ce.of)(l))).subscribe({next:l=>{if(o.type.toLowerCase().includes("saml"))this.router.navigate(["../"],{relativeTo:this.activatedRoute});else if(this.isDatabase){const p=l?.resource?.[0]?.id;null!=p?this.router.navigate(["../",p],{relativeTo:this.activatedRoute}):this.router.navigate([`/api-connections/api-docs/${i}`])}else if(this.isMcp){const p=l?.resource?.[0]?.id;null!=p?this.router.navigate(["../",p],{relativeTo:this.activatedRoute,queryParams:{created:1}}):this.router.navigate(["../"],{relativeTo:this.activatedRoute})}else this.router.navigate([`/api-connections/api-docs/${i}`])},error:l=>{this.snackbarService.openSnackBar((0,$e.cQ)(l).message,"error")}})}validateServiceName(a){return!!/^[a-zA-Z0-9_-]+$/.test(a)||(this.warnings.push("Service name can only contain letters, numbers, underscores, and hyphens."),!1)}formatServiceName(a){return a.toLowerCase().replace(/\s+/g,"").replace(/[^a-z0-9_-]/g,"")}gotoSchema(){const a=this.serviceForm.getRawValue();this.router.navigate([`/admin-settings/schema/${a.name}`])}gotoAPIDocs(){const a=this.serviceForm.getRawValue();this.currentServiceService.setCurrentServiceId(this.serviceData.id);const t=this.formatServiceName(a.name);this.router.navigate([`/api-connections/api-docs/${t}`])}goBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}get artifactBaseUrl(){return`${window.location.origin}${U.C}/${this.serviceData?.name??""}`}onCreateApiKey(){this.router.navigate(["/api-connections/api-keys/create"])}onScopeCellClick(a){this.dialog.open(Hc,{width:"640px",maxWidth:"92vw",autoFocus:!1,data:{roleId:a.roleId,verb:a.verb,serviceLabel:this.serviceData?.label||this.serviceData?.name||""}})}loadArtifactCardData(){var a=this;return(0,Fe.A)(function*(){const t=a.serviceData?.name,o=a.serviceData?.id;if(!t||"number"!=typeof o)return void(a.artifactKeys=[]);const i=yield a.artifactResolver.resolveWorkingKeyAndTable(o,t,a.artifactSampleTable);a.artifactSampleTable=i.sampleTable,a.artifactKeys=i.keys})()}getBackgroundImage(a){const t=this.images?.find(o=>o.label==a);return t&&t?t.src:""}get filteredServiceTypes(){if(this.memoServiceTypesSrc!==this.serviceTypes||this.memoServiceTypesSearch!==this.search){this.memoServiceTypesSrc=this.serviceTypes,this.memoServiceTypesSearch=this.search;const a=this.search.toLowerCase();this.memoFilteredServiceTypes=this.serviceTypes.filter(t=>t.label.toLowerCase().includes(a)||t.name.toLowerCase().includes(a))}return this.memoFilteredServiceTypes}nextStep(a){a.next()}openDialog(a){this.dialog.open(Za,{data:{serviceName:a}}).afterClosed().subscribe()}onServiceDefinitionTypeChange(a){this.serviceDefinitionType=a}navigateToRoles(a){a.preventDefault(),this.router.navigate(["/roles"],{queryParams:{tab:"access"}})}goToSecurityConfig(){var a=this;return(0,Fe.A)(function*(){try{const t=a.serviceForm.getRawValue(),o=a.formatServiceName(t.name);a.serviceForm.patchValue({name:o});const i={...t,config:{...t.config||{}}};if(a.isNetworkService&&t.config?.content)i.service_doc_by_service_id={content:t.config.content,format:a.serviceDefinitionType?Number(a.serviceDefinitionType):0},delete i.config.content;else if(a.isScriptService){const s=a.getServiceDocByServiceIdControl("content")?.value;s&&s.trim()&&(i.service_doc_by_service_id={content:s,format:a.serviceDefinitionType?Number(a.serviceDefinitionType):0})}else i.service_doc_by_service_id=null;const c=yield a.servicesService.create({resource:[i]},{snackbarSuccess:"services.createSuccessMsg"}).toPromise();if(!c)throw new Error("No response received from service creation");a.currentServiceId=c.resource[0].id,a.snackbarService.openSnackBar("Service created","success"),a.showSecurityConfig=!0,setTimeout(()=>{a.stepper.selectedIndex=a.stepper.steps.length-1})}catch{a.snackbarService.openSnackBar("Error creating service","error")}})()}getServiceTypeLabel(a){const t=this.serviceTypes.find(o=>o.name===a);return t?t.label:a}onServiceTypeSelect(a){this.selectedServiceTypeLable=a||"Unknown. Unable to identify Service Type"}static{this.\u0275fac=function(t){return new(t||Pt)(e.rXU(G.nX),e.rXU(d.ok),e.rXU(A.Z1),e.rXU(A.j8),e.rXU(G.Ix),e.rXU(Wt.f),e.rXU(H.Qq),e.rXU(b.bZ),e.rXU(Ge.n),e.rXU(se.L),e.rXU(xr.M),e.rXU($t.UG),e.rXU(Gt.D),e.rXU(yr),e.rXU(Mr))}}static{this.\u0275cmp=e.VBU({type:Pt,selectors:[["df-service-details"]],viewQuery:function(t,o){if(1&t&&(e.GBs(Or,5),e.GBs(Pr,5),e.GBs(Fr,5),e.GBs(wr,5)),2&t){let i;e.mGM(i=e.lsd())&&(o.stepper=i.first),e.mGM(i=e.lsd())&&(o.functionEditor=i.first),e.mGM(i=e.lsd())&&(o.headersEditor=i.first),e.mGM(i=e.lsd())&&(o.unsavedToolDialogTpl=i.first)}},standalone:!0,features:[e.aNF],decls:7,vars:4,consts:[[1,"details-section",3,"formGroup","ngSubmit"],[4,"ngIf","ngIfElse"],["notDatabaseEdit",""],[3,"serviceName",4,"ngIf"],["unsavedToolDialog",""],["linear",""],["stepper",""],["errorMessage","Service Type is required.",3,"editable"],["matStepLabel",""],[1,"details-section"],[1,"section-header"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],["mat-button","","matStepperNext","","type","button",1,"cancel-btn",3,"disabled"],["appearance","outline",1,"dynamic-width"],["matInput","","placeholder","SQL, AWS, MongoDB, etc.",3,"ngModel","ngModelOptions","ngModelChange"],[1,"full-width"],[1,"grid-wrapper","grid-col-auto"],["class","radio-card",4,"ngFor","ngForOf","ngForTrackBy"],["subscriptSizing","dynamic","class","dynamic-width","appearance","outline",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","dynamic-width",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","full-width",4,"ngIf"],[1,"action-container"],["color","primary","formControlName","isActive",4,"ngIf"],["mat-button","","matStepperPrevious","","type","button",1,"cancel-btn"],[4,"ngIf"],["class","first-time-guidance",4,"ngIf"],["class","full-width action-bar",4,"ngIf"],["class","details-section",4,"ngIf"],["matStepperIcon","edit"],["matStepperIcon","done"],[1,"radio-card"],["formControlName","type","type","radio",3,"value","input"],[1,"card-content-wrapper"],[1,"check-icon"],[1,"card-content"],[1,"card-icon",3,"src","alt"],[1,"text-center"],["mat-button","",1,"unlock-btn",3,"click"],["subscriptSizing","dynamic","appearance","outline",1,"dynamic-width"],["matInput","","formControlName","name"],["appearance","outline","subscriptSizing","dynamic",1,"dynamic-width"],["matInput","","formControlName","label"],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["rows","1","matInput","","formControlName","description"],["color","primary","formControlName","isActive"],["formGroupName","config"],[4,"ngFor","ngForOf","ngForTrackBy"],["dynamic",""],[1,"full-width",3,"type","storageServiceId","storagePath","content","cache"],[3,"schema","formControl","dynamic-width","full-width",4,"ngIf"],["class","full-width",3,"schema","formControl",4,"ngIf"],[3,"schema","formControl"],[1,"full-width",3,"schema","formControl"],[1,"details-section","basic-fields-section"],["class","advanced-section",4,"ngIf"],[1,"advanced-section"],[3,"expanded"],[1,"first-time-guidance"],[1,"guidance-icon",3,"icon"],[1,"guidance-text"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],[1,"button-group"],["mat-flat-button","","class","save-btn","color","primary","type","button",3,"disabled","click",4,"ngIf"],["mat-flat-button","","class","save-btn secondary-btn","type","button",3,"disabled","click",4,"ngIf"],["class","save-btn","mat-flat-button","","color","primary",4,"ngIf"],["mat-flat-button","","color","primary","type","button",1,"save-btn",3,"disabled","click"],["mat-flat-button","","type","button",1,"save-btn","secondary-btn",3,"disabled","click"],["mat-flat-button","","color","primary",1,"save-btn"],[3,"serviceName","serviceId","isDatabase","isFirstTimeUser","goBack"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","service-health-panel",3,"serviceId","serviceName","serviceGroup","deprecated",4,"ngIf"],["formControlName","type",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["subscriptSizing","dynamic","appearance","outline","class","full-width",4,"ngIf"],["subscriptSizing","dynamic","class","full-width","appearance","outline",4,"ngIf"],["formControlName","isActive","color","primary",4,"ngIf"],[1,"service-health-panel",3,"serviceId","serviceName","serviceGroup","deprecated"],[3,"eyebrow","title","description"],[1,"service-overview-card",3,"serviceName","baseUrl","sampleTable","keys","createKey"],["class","service-pipeline",4,"ngIf"],["class","service-access",4,"ngIf"],[1,"service-pipeline"],[1,"service-pipeline__hint"],[3,"serviceId","serviceName","serviceType"],[1,"service-access"],[1,"service-access__hint"],[3,"serviceId","cellClick"],[3,"value"],["appearance","outline",1,"full-width"],["formControlName","storageServiceId","required",""],["subscriptSizing","dynamic","appearance","outline",1,"full-width"],["formControlName","isActive","color","primary"],["notDatabase",""],["type","button","mat-flat-button","",1,"save-btn",3,"click"],["class","curl-import-action full-width",4,"ngIf"],[1,"curl-import-action","full-width"],["mat-stroked-button","","type","button","color","primary","data-testid","open-curl-import",3,"click"],[3,"icon"],[1,"curl-import-action__hint"],["color","primary",3,"schema","formControl","dynamic-width","full-width",4,"ngIf"],["color","primary",3,"schema","formControl"],["aria-label","Service Definition Type",3,"ngModel","ngModelOptions","ngModelChange","change"],["value","0"],["value","1"],[1,"full-width",3,"type","content","contentText"],[1,"full-width",3,"formControl","mode"],[1,"full-width",3,"isScript","type","storageServiceId","storagePath","content","cache","hideScmActions"],["class","full-width",3,"selectedConnectionId","selectedRoleId","selectConnection","selectRole",4,"ngIf"],["class","full-width",3,"form",4,"ngIf"],["class","full-width",3,"form","serviceId",4,"ngIf"],["class","full-width",3,"roleId",4,"ngIf"],[1,"full-width",3,"selectedConnectionId","selectedRoleId","selectConnection","selectRole"],[1,"full-width",3,"form"],[1,"full-width",3,"form","serviceId"],[1,"actions","full-width"],["type","file",2,"display","none",3,"accept","change"],["fileInput",""],[1,"full-width",3,"roleId"],[1,"mcp-tools-container"],["multi",""],[1,"mcp-service-header"],["color","primary",3,"checked","change","click"],[1,"mcp-services-table","full-width"],[1,"toggle-col"],[3,"disabled-row",4,"ngFor","ngForOf","ngForTrackBy"],["color","primary",3,"checked","change"],["class","mcp-tools-container",4,"ngIf"],[3,"disabled-row",4,"ngFor","ngForOf"],["data-testid","merged-db-tools",4,"ngIf"],[3,"expanded",4,"ngFor","ngForOf","ngForTrackBy"],["data-testid","merged-db-tools"],[1,"custom-tools-container"],[1,"custom-tools-description"],["class","custom-tools-actions",4,"ngIf"],["class","custom-tool-form",3,"formGroup",4,"ngIf"],["class","mcp-services-table full-width",4,"ngIf"],["class","no-tools-message",4,"ngIf"],[1,"custom-tools-actions"],["mat-flat-button","","color","primary",3,"click"],[1,"btn-icon",3,"icon"],[1,"custom-tool-form",3,"formGroup"],["formControlName","toolType",1,"tool-type-toggle"],["value","api"],["value","function"],[1,"form-row"],["appearance","outline",1,"form-field-half"],["matInput","","formControlName","name","placeholder","my_tool_name"],["appearance","outline","class","form-field-quarter",4,"ngIf"],["appearance","outline","class","full-width",4,"ngIf"],["matInput","","formControlName","description","rows","2","placeholder","Describe what this tool does..."],[1,"parameters-section"],["mat-stroked-button","","color","primary","type","button",3,"click"],["class","parameter-cards","formArrayName","parameters",4,"ngIf"],["class","no-parameters-hint",4,"ngIf"],["class","scm-link-section",3,"formGroup",4,"ngIf"],["class","editor-section",4,"ngIf"],[1,"form-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],["appearance","outline",1,"form-field-quarter"],["formControlName","httpMethod"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["matInput","","formControlName","url","placeholder","https://api.example.com/endpoint/{id}"],["mat-icon-button","","matSuffix","","type","button","matTooltip","Insert Lookup",3,"matMenuTriggerFor","disabled"],["urlLookupMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-menu-item","",3,"click"],["formArrayName","parameters",1,"parameter-cards"],["class","parameter-card",3,"formGroupName",4,"ngFor","ngForOf"],[1,"parameter-card",3,"formGroupName"],[1,"parameter-card-header"],[1,"parameter-index"],["mat-icon-button","","color","warn","type","button","matTooltip","Remove parameter",1,"parameter-remove-btn",3,"click"],[1,"parameter-card-fields"],["appearance","outline",1,"param-field","param-field--name"],["matInput","","formControlName","name","placeholder","param_name"],["appearance","outline",1,"param-field","param-field--type"],["formControlName","type"],["value","string"],["value","number"],["value","integer"],["value","boolean"],["appearance","outline","class","param-field param-field--location",4,"ngIf"],[1,"param-field","param-field--required"],["formControlName","required"],["appearance","outline",1,"param-field","param-field--desc"],["matInput","","formControlName","description","placeholder","What this parameter does"],["appearance","outline",1,"param-field","param-field--location"],["formControlName","in"],["value","query"],["value","path"],["value","body"],["value","header"],[1,"no-parameters-hint"],[1,"scm-link-section",3,"formGroup"],["formControlName","storageServiceId"],["class","form-row",4,"ngIf"],["class","scm-actions",4,"ngIf"],["appearance","outline",1,"form-field-third"],["matInput","","formControlName","scmRepository","placeholder","my-repo"],["matInput","","formControlName","scmReference","placeholder","master"],["matInput","","formControlName","storagePath","placeholder","scripts/my-tool.js"],[1,"scm-actions"],["mat-flat-button","","color","primary","type","button",3,"click"],[1,"editor-section"],[1,"editor-label-row"],[1,"editor-label"],["mat-stroked-button","","type","button",3,"matMenuTriggerFor","disabled"],["fnLookupMenu","matMenu"],[1,"editor-wrapper"],["formControlName","function",3,"mode","valueChange"],["functionEditor",""],[1,"editor-hint"],["hdrLookupMenu","matMenu"],[1,"editor-wrapper","editor-wrapper--compact"],["formControlName","headers",3,"mode","valueChange"],["headersEditor",""],[1,"action-col"],[1,"url-cell"],[1,"action-buttons"],["mat-icon-button","","matTooltip","Edit tool",3,"disabled","click"],["mat-icon-button","","color","warn","matTooltip","Delete tool",3,"disabled","click"],[1,"no-tools-message"],["mat-flat-button","","color","primary",1,"save-btn",3,"value","click"],[3,"serviceName"],["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","","align","end"],["mat-flat-button","","type","button",3,"click"],["mat-flat-button","","color","warn","type","button",3,"click"],["mat-flat-button","","color","primary","cdkFocusInitial","","type","button",3,"click"]],template:function(t,o){if(1&t&&(e.j41(0,"form",0),e.bIt("ngSubmit",function(){return o.save(!1,!1)}),e.DNE(1,ks,53,27,"ng-container",1),e.DNE(2,od,22,22,"ng-template",null,2,e.C5r),e.k0s(),e.DNE(4,id,1,1,"df-paywall",3),e.DNE(5,ad,11,0,"ng-template",null,4,e.C5r)),2&t){const i=e.sdS(3);e.Y8G("formGroup",o.serviceForm),e.R7$(1),e.Y8G("ngIf",o.isDatabase&&!o.edit)("ngIfElse",i),e.R7$(3),e.Y8G("ngIf",o.subscriptionRequired)}},dependencies:[y.RG,y.rl,y.nJ,y.MV,y.yw,E.fS,E.fg,I.Ve,I.VO,Y.wT,m.pM,ae.mV,ae.sG,_e.RI,me.MY,me.BS,me.GK,me.Z2,me.WN,me.Q6,$.Kj,d.X1,d.qT,d.me,d.Fm,d.BC,d.cb,d.YS,d.l_,d.j4,d.JD,d.$R,d.v8,d.YN,d.vS,m.bT,q.g7,q.So,je,St.e,Qo,ii,hi,Si,Ni,Ui,Ke,It.s,w.dX,w.aY,R.uc,R.oV,u.Hl,u.$z,u.iY,da.S,Qe,_a.C,Ka,Ht,Ne,Qt,Ja,qa,Kt,m.MD,m.ux,m.e1,L.m_,L.An,be.Vg,be.ec,be.pc,V.Wk,he.Hu,Ha.w,la,Q.Cn,Q.kk,Q.fb,Q.Cp,b.hM,b.BI,b.Yi,b.E7,ec.K,bc,Fc,qc,ot],styles:[".grid-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px}.service-health-panel[_ngcontent-%COMP%]{display:block;margin-bottom:2.4rem}.service-pipeline[_ngcontent-%COMP%], .service-access[_ngcontent-%COMP%]{margin-top:3.2rem;padding-top:3.2rem;border-top:1px solid var(--df-border-2)}.service-pipeline__hint[_ngcontent-%COMP%], .service-access__hint[_ngcontent-%COMP%]{margin:0 0 1.6rem;max-width:68ch;color:var(--df-text-muted);font-size:1.3rem;line-height:1.5}.section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .basic-fields-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%], .component-selection[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .security-config-container[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 16px;font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}[_nghost-%COMP%] .mat-horizontal-stepper-header-container{border-bottom:1px solid var(--df-border-2);margin-bottom:8px}[_nghost-%COMP%] .mat-horizontal-stepper-header{height:48px}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-label{font-size:1.2rem;font-weight:600;letter-spacing:.02em;color:var(--df-text-muted)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-label-selected{color:var(--df-text)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon{height:22px;width:22px;font-size:1.1rem;background-color:var(--df-surface-2);color:var(--df-text-muted);border:1px solid var(--df-border)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon .mat-icon{font-size:1.2rem;height:auto;width:auto;line-height:1}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon-selected, [_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon-state-edit{background-color:var(--df-accent)!important;color:var(--df-accent-contrast);border-color:transparent}[_nghost-%COMP%] .mat-stepper-horizontal-line{border-top-color:var(--df-border-2)}label.radio-card[_ngcontent-%COMP%]{cursor:pointer}label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%]{background:var(--df-surface);border-radius:var(--df-radius-sm);max-width:200px;min-height:200px;padding:12px;display:grid;box-shadow:none;border:1px solid var(--df-border);background-size:contain;background-repeat:no-repeat;transition:border-color .15s ease}label.radio-card[_ngcontent-%COMP%] .card-content-wrapper.not-included[_ngcontent-%COMP%]{opacity:.5;cursor:default!important;pointer-events:none!important}label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{width:20px;height:20px;display:inline-block;border:solid 2px var(--df-border);background-color:var(--df-surface-2);border-radius:50%;position:relative}label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]:before{content:\"\";position:absolute;inset:0;background-image:url(\"data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.93552 4.58423C0.890286 4.53718 0.854262 4.48209 0.829309 4.42179C0.779553 4.28741 0.779553 4.13965 0.829309 4.00527C0.853759 3.94471 0.889842 3.88952 0.93552 3.84283L1.68941 3.12018C1.73378 3.06821 1.7893 3.02692 1.85185 2.99939C1.91206 2.97215 1.97736 2.95796 2.04345 2.95774C2.11507 2.95635 2.18613 2.97056 2.2517 2.99939C2.31652 3.02822 2.3752 3.06922 2.42456 3.12018L4.69872 5.39851L9.58026 0.516971C9.62828 0.466328 9.68554 0.42533 9.74895 0.396182C9.81468 0.367844 9.88563 0.353653 9.95721 0.354531C10.0244 0.354903 10.0907 0.369582 10.1517 0.397592C10.2128 0.425602 10.2672 0.466298 10.3112 0.516971L11.0651 1.25003C11.1108 1.29672 11.1469 1.35191 11.1713 1.41247C11.2211 1.54686 11.2211 1.69461 11.1713 1.82899C11.1464 1.88929 11.1104 1.94439 11.0651 1.99143L5.06525 7.96007C5.02054 8.0122 4.96514 8.0541 4.90281 8.08294C4.76944 8.13802 4.61967 8.13802 4.4863 8.08294C4.42397 8.0541 4.36857 8.0122 4.32386 7.96007L0.93552 4.58423Z' fill='white'/%3E%3C/svg%3E%0A\");background-repeat:no-repeat;background-size:12px;background-position:center center;transform:scale(1.6);opacity:0}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{appearance:none;-webkit-appearance:none;-moz-appearance:none}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%]{border-color:var(--df-accent);box-shadow:0 0 0 1px var(--df-accent);opacity:1}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{transform:scale(1.2);background-color:var(--df-accent);border-color:var(--df-accent)}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]:before{transform:scale(1);opacity:1}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:focus + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{box-shadow:0 0 0 4px var(--df-accent-soft);border-color:var(--df-accent)}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%]{width:100%;text-align:center}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-bottom:10px;width:100%;height:110px}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--df-text)}.details-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%], .details-section[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}mat-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.calendly-inline-widget[_ngcontent-%COMP%]{height:500px}.unlock-btn[_ngcontent-%COMP%]{position:relative;top:-95px;right:-55px;color:var(--df-danger)}.action-bar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.action-bar[_ngcontent-%COMP%] .button-group[_ngcontent-%COMP%]{display:flex;gap:8px}.action-bar[_ngcontent-%COMP%] .secondary-btn[_ngcontent-%COMP%]{background-color:transparent!important;border:1px solid var(--df-accent)!important;color:var(--df-accent)!important} .mat-expansion-panel-header>.mat-expansion-indicator:after{color:unset!important} .mat-mdc-select-arrow{color:unset!important}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%]{background:#000;border:1px solid #fff}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{border:solid 2px #2d2d2d}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#fff}.dark-theme[_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button, .dark-theme [_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button{background:inherit!important}.dark-theme[_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button span, .dark-theme [_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button span{color:var(--df-text)!important}.security-config-container[_ngcontent-%COMP%]{padding:24px 0}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%]{margin-bottom:24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm)}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.security-config-container[_ngcontent-%COMP%] .security-cards-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:32px}@media (max-width: 768px){.security-config-container[_ngcontent-%COMP%] .security-cards-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%]{position:relative;cursor:pointer;transition:border-color .15s ease-in-out;border-radius:var(--df-radius);background:var(--df-surface);border:1px solid var(--df-border-2);box-shadow:none;overflow:hidden;height:100%;min-height:160px;display:flex;flex-direction:column}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:24px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;height:100%;justify-content:center}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1.6rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-muted);font-size:1.35rem;line-height:1.5}.security-config-container[_ngcontent-%COMP%] .security-option-card.selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background-color:var(--df-accent-soft)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%]{margin-top:32px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{width:100%;max-width:400px;margin-bottom:24px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-wrapper[_ngcontent-%COMP%]{padding-bottom:0}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .components-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin-bottom:24px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%]{border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);transition:border-color .15s ease-in-out;cursor:pointer;box-shadow:none;background:var(--df-surface)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:16px;display:flex;align-items:center;gap:12px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%] .checkbox-wrapper[_ngcontent-%COMP%]{margin-right:8px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card.selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background-color:var(--df-accent-soft)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%]{margin-top:32px;padding:24px;background:var(--df-surface);border-radius:var(--df-radius);border:1px solid var(--df-border-2)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%]{margin:0 0 24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);display:flex;align-items:center;gap:12px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:20px;width:20px;height:20px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;border:none;width:100%}@media (max-width: 768px){.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{grid-template-columns:1fr}}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);height:auto;width:100%;transition:border-color .15s ease-in-out}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%]{padding:16px;text-align:center}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:6px 0 0;font-size:1.3rem;color:var(--df-text-muted)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background:var(--df-accent-soft);border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-checked[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--df-accent)}.action-container[_ngcontent-%COMP%]{margin-top:24px;padding-top:16px;border-top:1px solid var(--df-border-2);display:flex;justify-content:space-between;align-items:center}.action-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%]{margin:0 0 24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm)}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.mcp-tools-container[_ngcontent-%COMP%]{padding:12px 0}.mcp-tools-container[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:1.2rem;padding:3px 8px;background:var(--df-accent-soft);color:var(--df-accent-strong);border-radius:4px;white-space:nowrap;font-weight:500}.mcp-service-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.toggle-col[_ngcontent-%COMP%]{width:60px}.disabled-row[_ngcontent-%COMP%]{opacity:.45;transition:opacity .2s ease}.disabled-row[_ngcontent-%COMP%]:hover{opacity:.65}.mcp-services-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.mcp-services-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .mcp-services-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:left;padding:12px;border-bottom:1px solid var(--df-border-2)}.mcp-services-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:600;color:var(--df-text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}.mcp-services-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:1.35rem}.mcp-services-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:44px;transition:background-color .15s ease}.mcp-services-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:var(--df-hover)}.custom-tools-container[_ngcontent-%COMP%]{padding:12px 0}.custom-tools-container[_ngcontent-%COMP%] .custom-tools-description[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem;line-height:1.6;margin-bottom:16px}.custom-tools-container[_ngcontent-%COMP%] .custom-tools-actions[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tools-container[_ngcontent-%COMP%] .no-tools-message[_ngcontent-%COMP%]{color:var(--df-text-faint);font-style:italic;padding:24px 16px;text-align:center;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm);background:var(--df-surface-2)}.custom-tools-container[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:1.2rem;padding:3px 8px;background:var(--df-accent-soft);color:var(--df-accent-strong);border-radius:4px;white-space:nowrap;font-weight:500}.custom-tools-container[_ngcontent-%COMP%] .url-cell[_ngcontent-%COMP%]{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--df-text-muted);font-size:1.3rem}.tool-type-toggle[_ngcontent-%COMP%]{margin-bottom:16px}.tool-type-toggle[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{min-width:110px}.custom-tool-form[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);padding:20px;margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 16px;font-weight:600;font-size:1.5rem;letter-spacing:-.01em;color:var(--df-text)}.custom-tool-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:flex-start}.custom-tool-form[_ngcontent-%COMP%] .form-field-half[_ngcontent-%COMP%]{flex:1}.custom-tool-form[_ngcontent-%COMP%] .form-field-quarter[_ngcontent-%COMP%]{width:160px;flex-shrink:0}.custom-tool-form[_ngcontent-%COMP%] .form-field-third[_ngcontent-%COMP%]{flex:1;min-width:0}.custom-tool-form[_ngcontent-%COMP%] .scm-link-section[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] .scm-actions[_ngcontent-%COMP%]{margin-top:8px;margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%]{margin:20px 0}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid var(--df-border-2);border-radius:var(--df-radius);padding:16px 20px 8px;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]:hover{border-color:var(--df-border)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]:focus-within{border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-index[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:600;color:var(--df-accent-strong);background:var(--df-accent-soft);padding:2px 8px;border-radius:var(--df-radius-sm);letter-spacing:.03em}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-remove-btn[_ngcontent-%COMP%]{opacity:.4;transition:opacity .15s ease;transform:scale(.85)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-remove-btn[_ngcontent-%COMP%]:hover{opacity:1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 120px 120px auto;gap:12px;align-items:start}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field[_ngcontent-%COMP%]{min-width:0}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--name[_ngcontent-%COMP%]{grid-column:1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--type[_ngcontent-%COMP%]{grid-column:2}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--location[_ngcontent-%COMP%]{grid-column:3}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--required[_ngcontent-%COMP%]{grid-column:4;padding-top:12px;white-space:nowrap}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--desc[_ngcontent-%COMP%]{grid-column:1/-1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .no-parameters-hint[_ngcontent-%COMP%]{color:var(--df-text-faint);font-size:1.3rem;text-align:center;padding:20px 16px;margin:0;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm)}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]{width:100%;padding:6px 10px;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.3rem;background:var(--df-surface);color:var(--df-text);transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]::placeholder{color:var(--df-text-faint)}.custom-tool-form[_ngcontent-%COMP%] .inline-select[_ngcontent-%COMP%]{padding:6px 10px;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.3rem;background:var(--df-surface);color:var(--df-text);cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .inline-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%]{display:block;font-size:1.3rem;font-weight:500;color:var(--df-text-muted);margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label-row[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%]{margin-bottom:0}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%]{border:1px solid var(--df-border);border-radius:var(--df-radius-sm);overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%]:focus-within{border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%]{display:block;min-height:200px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%] .editor{min-height:200px;border-radius:var(--df-radius-sm)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper--compact[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%]{min-height:100px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper--compact[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%] .editor{min-height:100px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-hint[_ngcontent-%COMP%]{display:block;font-size:1.2rem;color:var(--df-text-faint);margin-top:6px;padding-left:2px}.custom-tool-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:12px;margin-top:24px;padding-top:16px;border-top:1px solid var(--df-border-2)}.btn-icon[_ngcontent-%COMP%]{margin-right:6px}.action-col[_ngcontent-%COMP%]{width:100px;white-space:nowrap;text-align:right;padding-right:4px!important}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:2px}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:.6;transition:opacity .15s ease}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{opacity:1}.basic-fields-section[_ngcontent-%COMP%]{margin-bottom:24px}.advanced-section[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:24px}.first-time-guidance[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 16px;margin:16px 0;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);border-left:3px solid var(--df-accent)}.first-time-guidance[_ngcontent-%COMP%] .guidance-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:18px;flex-shrink:0}.first-time-guidance[_ngcontent-%COMP%] .guidance-text[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:1.35rem;line-height:1.5;flex:1}.service-overview-card[_ngcontent-%COMP%]{display:block;margin-bottom:var(--df-space-5)}.curl-import-action[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem}.curl-import-action[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:.5rem}.curl-import-action__hint[_ngcontent-%COMP%]{font-size:.85rem;opacity:.7}"]})}};st=ct=(0,ie.Cg)([(0,X.d)({checkProperties:!0})],st);const tn=[{key:"read",label:"Read data",warn:null,verbs:[{verb:"get_table_data",title:"Get Table Data",description:"Retrieve records from a table with filtering and paging"},{verb:"aggregate_data",title:"Aggregate Data",description:"Compute server-side aggregations (SUM, COUNT, AVG, MIN, MAX)"}]},{key:"schema",label:"Explore schema",warn:null,verbs:[{verb:"get_tables",title:"Get Tables",description:"List tables available in the database"},{verb:"get_table_schema",title:"Get Table Schema",description:"Retrieve schema definition for a table"},{verb:"get_table_fields",title:"Get Table Fields",description:"Retrieve field definitions for a table"},{verb:"get_table_relationships",title:"Get Table Relationships",description:"Retrieve relationships definition for a table"},{verb:"get_database_resources",title:"List Database Resources",description:"Get all resources available in the database service"},{verb:"get_api_spec",title:"Get API Spec",description:"Get the OpenAPI specification for this database service"},{verb:"get_data_model",title:"Get Data Model",description:"Get a condensed data model showing all tables and columns"}]},{key:"write",label:"Write data",warn:"writes",verbs:[{verb:"create_records",title:"Create Records",description:"Insert records into a table"},{verb:"update_records",title:"Update Records",description:"Update (patch) records in a table"},{verb:"delete_records",title:"Delete Records",description:"Delete records from a table"}]},{key:"procs",label:"Procedures & functions",warn:"executes",verbs:[{verb:"get_stored_procedures",title:"List Stored Procedures",description:"Get stored procedures available in the database"},{verb:"call_stored_procedure",title:"Call Stored Procedure",description:"Call a stored procedure"},{verb:"get_stored_functions",title:"List Stored Functions",description:"Get stored functions available in the database"},{verb:"call_stored_function",title:"Call Stored Function",description:"Call a stored function"}]}],nn=[{key:"fread",label:"Read files",warn:null,verbs:[{verb:"list_files",title:"List Files",description:"List files and folders in a path"},{verb:"get_file",title:"Get File",description:"Read the contents of a file"},{verb:"get_file_properties",title:"Get File Properties",description:"Get properties/metadata of a file or folder"}]},{key:"fwrite",label:"Write files",warn:"writes",verbs:[{verb:"create_file",title:"Create File",description:"Create or overwrite a file"},{verb:"create_folder",title:"Create Folder",description:"Create a new folder"},{verb:"delete_file",title:"Delete File or Folder",description:"Delete a file or folder"}]}],Me=[{verb:"discover_services",title:"Discover Services",description:"List the services and operations the calling role can access"},{verb:"request_access",title:"Request Access",description:"Explain how to request wider access"},{verb:"list_apis",title:"List Available APIs",description:"List all available database APIs and their tool prefixes"},{verb:"search",title:"Search",description:"Search records across the exposed services"},{verb:"fetch",title:"Fetch",description:"Fetch one record by id"}],Oe=[{verb:"all_get_tables",title:"Get Tables from All Databases",description:"Retrieve tables from all connected database services in one call"},{verb:"all_find_table",title:"Find Table Across Databases",description:"Search for a table by name across all connected databases"},{verb:"all_get_stored_procedures",title:"Get Stored Procedures from All",description:"Retrieve stored procedures from all connected databases"},{verb:"all_get_stored_functions",title:"Get Stored Functions from All",description:"Retrieve stored functions from all connected databases"},{verb:"all_get_resources",title:"Get Resources from All",description:"Retrieve all available resources from all connected databases"},{verb:"all_list_files",title:"List Files from All Storage",description:"List files from all connected file storage services"}],on=[{verb:"search_tools",title:"Search Tools",description:"Find tools by capability"},{verb:"describe_tool",title:"Describe Tool",description:"Get one tool\u2019s full schema"},{verb:"call_tool",title:"Call Tool",description:"Invoke a tool by name"},{verb:"list_tools",title:"List Tools",description:"Page through the full catalog"}];function cd(n,a){return"Database"===n?"db":"local_file"===a||"File"===n?"file":null}function Pe(n){return"db"===n?tn:nn}function J(n){return Pe(n).flatMap(a=>a.verbs)}const Ve=new Set(["write","procs","fwrite"]),an=81,cn=8e3,rd=["exposed_services","exposedServices","disabled_tools","disabledTools","tool_style","toolStyle","lazy_mode","lazyMode","allow_api_key_auth","allowApiKeyAuth","oauth_client_id","oauthClientId","oauth_client_secret","oauthClientSecret","custom_login_url","customLoginUrl","auto_oauth_service","autoOauthService","redirect_uris","redirectUris","registered_redirect_uris","registeredRedirectUris","custom_tools","customTools"];function W(n,a,t){return void 0!==n[a]?n[a]:n[t]}function lt(n){const a=n??{},t=W(a,"exposed_services","exposedServices"),o=W(a,"disabled_tools","disabledTools"),i=W(a,"tool_style","toolStyle"),c=W(a,"redirect_uris","redirectUris")??W(a,"registered_redirect_uris","registeredRedirectUris"),r={};for(const s of Object.keys(a))rd.includes(s)||(r[s]=a[s]);return{exposedServices:Array.isArray(t)?[...t]:[],disabledTools:new Set(Array.isArray(o)?o:[]),toolStyle:"merged"===i?"merged":"prefixed"===i?"prefixed":null,lazyMode:W(a,"lazy_mode","lazyMode")??"auto",allowApiKeyAuth:!!W(a,"allow_api_key_auth","allowApiKeyAuth"),oauthClientId:W(a,"oauth_client_id","oauthClientId")??"",oauthClientSecret:W(a,"oauth_client_secret","oauthClientSecret")??"",customLoginUrl:W(a,"custom_login_url","customLoginUrl")??"",autoOauthService:W(a,"auto_oauth_service","autoOauthService")??null,redirectUris:Array.isArray(c)?[...c]:[],customTools:W(a,"custom_tools","customTools")??[],rest:r}}function rn(n,a="mcp"){const t={...n.rest,exposedServices:[...n.exposedServices],disabledTools:[...n.disabledTools].sort(),toolStyle:n.toolStyle,lazyMode:n.lazyMode,allowApiKeyAuth:n.allowApiKeyAuth,oauthClientId:n.oauthClientId,oauthClientSecret:n.oauthClientSecret,customLoginUrl:n.customLoginUrl||null,autoOauthService:n.autoOauthService,redirectUris:[...n.redirectUris]};return"mcp"===a&&(t.customTools=(n.customTools??[]).map(o=>({id:o.id,toolType:o.toolType||"api",name:o.name,description:o.description,httpMethod:o.httpMethod,url:o.url,parameters:o.parameters,headers:o.headers,function:o.function||"",enabled:o.enabled,storageServiceId:o.storageServiceId||null,scmRepository:o.scmRepository||"",scmReference:o.scmReference||"",storagePath:o.storagePath||""}))),t}function sn(n,a){const t=[];for(const o of n){const i=cd(a[o.type]??"",o.type);i&&t.push({name:o.name,label:o.label||o.name,kind:i,active:o.isActive??o.is_active??!0})}return t}function z(n,a){return`${n}_${a}`}function ze(n,a){const t=J(n.kind);return{on:t.filter(o=>!a.has(z(n.name,o.verb))).length,total:t.length}}function Xe(n,a,t){const o=a.verbs.filter(i=>!t.has(z(n.name,i.verb))).length;return 0===o?"off":o===a.verbs.length?"on":"part"}function dt(n,a){const t=ze(n,a);if(0===t.on)return{kind:"zero",label:`0 of ${t.total}`};if(t.on===t.total)return{kind:"full",label:"Full"};const o=Pe(n.kind),i=o.filter(r=>Ve.has(r.key)).every(r=>"off"===Xe(n,r,a)),c=o.filter(r=>!Ve.has(r.key)).every(r=>"on"===Xe(n,r,a));return i&&c?{kind:"ro",label:"Read-only"}:{kind:"custom",label:`Custom ${t.on} of ${t.total}`}}function pt(n){return Pe(n.kind).filter(a=>Ve.has(a.key)).flatMap(a=>a.verbs.map(t=>z(n.name,t.verb)))}function mt(n){return J(n.kind).map(a=>z(n.name,a.verb))}function ln(n,a){return n.exposedServices.map(t=>({name:t,svc:a.find(o=>o.name===t)??null}))}function _t(n,a,t){return ln(n,a).map(o=>o.svc).filter(o=>!!o&&o.active&&(!t||o.kind===t))}function Ie(n,a){const t="merged"===n.toolStyle?"merged":"prefixed",o=_t(n,a,"db"),i=_t(n,a,"file"),c=n.disabledTools;let r=0;if(o.length)if("merged"===t)for(const h of J("db"))o.some(O=>!c.has(z(O.name,h.verb)))&&r++;else r=o.reduce((h,O)=>h+ze(O,c).on,0);const s=i.reduce((h,O)=>h+ze(O,c).on,0),l=Me.filter(h=>!c.has(h.verb)).length,p=o.length>=2?Oe.filter(h=>!c.has(h.verb)).length:0,v=(n.customTools??[]).filter(h=>!1!==h?.enabled&&0!==h?.enabled).length,k=new Set;let C=0,M=0;for(const h of[...o,...i]){const O=Pe(h.kind).filter(x=>Ve.has(x.key)).flatMap(x=>x.verbs).filter(x=>!c.has(z(h.name,x.verb)));O.length&&(C++,"db"===h.kind&&M++,O.forEach(x=>k.add(x.verb)))}const D=r+s+l+p+v,T=D*an;return{total:D,dbTools:r,dbServices:o.length,fileTools:s,fileServices:i.length,globalTools:l,aggregators:p,customTools:v,writeVerbs:k.size,writeReach:C,writeReachDb:M,readOnly:0===k.size,tokenEstimate:T,lazyEngaged:"always"===n.lazyMode||!0===n.lazyMode||"auto"===n.lazyMode&&T>cn,effectiveStyle:t}}function gt(n,a,t){const o=_t(a,t,"db");return{on:o.filter(i=>!a.disabledTools.has(z(i.name,n))).map(i=>i.name),total:o.length}}function ft(n,a,t){return"merged"===n?t:z(a,t)}function ut(n){return{...n,exposedServices:[...n.exposedServices],disabledTools:new Set(n.disabledTools),redirectUris:[...n.redirectUris],customTools:(n.customTools??[]).map(a=>({...a})),rest:{...n.rest}}}function dn(n){return JSON.stringify({e:[...n.exposedServices],d:[...n.disabledTools].sort(),s:n.toolStyle,l:n.lazyMode,k:n.allowApiKeyAuth,ci:n.oauthClientId,cs:n.oauthClientSecret,lu:n.customLoginUrl,ao:n.autoOauthService,r:[...n.redirectUris],ct:n.customTools})}class pn{constructor(){this.draftName="",this.draftLabel="",this.draftDescription="",this.draftIsActive=!0,this.backendServices=[],this.backendLoaded=!1,this.created=!1,this.checklistDismissed=!1,this.copiedUrl=!1,this.copiedClient=!1,this.reconnectBanner=!1,this.changes=new de.B}init(a,t){this.service=a,this.cfg=lt(t),this.savedCfg=ut(this.cfg),this.draftName=a.name,this.draftLabel=a.label,this.draftDescription=a.description,this.draftIsActive=a.isActive,this.created=!1,this.checklistDismissed=!1,this.copiedUrl=!1,this.copiedClient=!1,this.reconnectBanner=!1,this.touch()}get isSystemMcp(){return"system_mcp"===this.service?.type}touch(){this.changes.next()}dirty(){return dn(this.cfg)!==dn(this.savedCfg)||this.draftName!==this.service.name||this.draftLabel!==this.service.label||this.draftDescription!==this.service.description||this.draftIsActive!==this.service.isActive}connectionAffecting(){return this.draftName!==this.service.name||this.cfg.allowApiKeyAuth!==this.savedCfg.allowApiKeyAuth||this.cfg.toolStyle!==this.savedCfg.toolStyle||this.cfg.oauthClientSecret!==this.savedCfg.oauthClientSecret||JSON.stringify(this.cfg.redirectUris)!==JSON.stringify(this.savedCfg.redirectUris)}markSaved(){this.savedCfg=ut(this.cfg),this.service.name=this.draftName,this.service.label=this.draftLabel,this.service.description=this.draftDescription,this.service.isActive=this.draftIsActive,this.touch()}discard(){this.cfg=ut(this.savedCfg),this.draftName=this.service.name,this.draftLabel=this.service.label,this.draftDescription=this.service.description,this.draftIsActive=this.service.isActive,this.touch()}effective(){return Ie(this.cfg,this.backendServices)}savedEffective(){return Ie(this.savedCfg,this.backendServices)}totalTools(){return this.isSystemMcp?te.filter(a=>!this.cfg.disabledTools.has(a.name)).length:this.effective().total}savedTotalTools(){return this.isSystemMcp?te.filter(a=>!this.savedCfg.disabledTools.has(a.name)).length:this.savedEffective().total}rows(){return ln(this.cfg,this.backendServices)}fraction(a){return ze(a,this.cfg.disabledTools)}access(a){return dt(a,this.cfg.disabledTools)}orphans(){return function sd(n,a){const t=new Set([...Me.map(r=>r.verb),...Oe.map(r=>r.verb),...(n.customTools??[]).map(r=>r?.name).filter(Boolean)]),o=new Set(a.map(r=>r.name)),i=n.exposedServices.filter(r=>!o.has(r));return[...n.disabledTools].filter(r=>!(r=>t.has(r)||[...o,...i].some(s=>r.startsWith(s+"_")))(r))}(this.cfg,this.backendServices)}isToolEnabled(a,t){return!this.cfg.disabledTools.has(z(a,t))}setTool(a,t,o){const i=z(a,t);o?this.cfg.disabledTools.delete(i):this.cfg.disabledTools.add(i),this.touch()}isBareToolEnabled(a){return!this.cfg.disabledTools.has(a)}setBareTool(a,t){t?this.cfg.disabledTools.delete(a):this.cfg.disabledTools.add(a),this.touch()}setServiceFull(a){mt(a).forEach(t=>this.cfg.disabledTools.delete(t)),this.touch()}setServiceReadOnly(a){mt(a).forEach(t=>this.cfg.disabledTools.delete(t)),pt(a).forEach(t=>this.cfg.disabledTools.add(t)),this.touch()}exposeServices(a,t){for(const o of a){this.cfg.exposedServices.includes(o)||this.cfg.exposedServices.push(o);const i=this.backendServices.find(c=>c.name===o);!i||"keep"===t||("ro"===t?this.setServiceReadOnly(i):this.setServiceFull(i))}this.touch()}removeService(a,t=!1){if(this.cfg.exposedServices=this.cfg.exposedServices.filter(o=>o!==a),t)for(const o of[...this.cfg.disabledTools])o.startsWith(a+"_")&&this.cfg.disabledTools.delete(o);this.touch()}renameExposedEntry(a,t){this.cfg.exposedServices=this.cfg.exposedServices.map(o=>o===a?t:o);for(const o of[...this.cfg.disabledTools])o.startsWith(a+"_")&&(this.cfg.disabledTools.delete(o),this.cfg.disabledTools.add(t+o.slice(a.length)));this.touch()}makeReadOnly(){for(const a of this.rows())a.svc&&a.svc.active&&this.setServiceReadOnly(a.svc);this.touch()}dormantCurationCount(a){let t=0;for(const o of this.cfg.disabledTools)o.startsWith(a+"_")&&t++;return t}}function ld(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",34)(1,"span"),e.EFF(2," Connection details changed \u2014 clients may need to reconnect. The snippets below are updated. "),e.k0s(),e.j41(3,"button",35),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.dismissReconnect())}),e.EFF(4," \xd7 "),e.k0s()()}}function dd(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"span",40),e.EFF(2,"\u2713"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.j41(5,"button",22),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goToTab.emit("tools"))}),e.EFF(6," refine in Tools \u2192 "),e.k0s()(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(4),e.SpI(" ",t.exposedSummary," \u2014 ")}}function pd(n,a){if(1&n){const t=e.RV6();e.j41(0,"span",40),e.EFF(1,"\u2462"),e.k0s(),e.j41(2,"span")(3,"button",22),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.goToTab.emit("tools"))}),e.EFF(4," Expose your first service \u2192 Tools. "),e.k0s(),e.EFF(5," 0 services exposed \u2014 agents get global and custom tools only. "),e.j41(6,"b"),e.EFF(7,"Empty never means every service."),e.k0s()()}}function md(n,a){if(1&n){const t=e.RV6();e.j41(0,"section",36)(1,"div",37)(2,"h2"),e.EFF(3,"Server created \u2014 3 steps to your first tool call"),e.k0s(),e.j41(4,"button",38),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.dismissChecklist())}),e.EFF(5," \xd7 "),e.k0s()(),e.j41(6,"ol",39)(7,"li")(8,"span",40),e.EFF(9),e.k0s(),e.j41(10,"span"),e.EFF(11,"Copy your endpoint URL"),e.k0s()(),e.j41(12,"li")(13,"span",40),e.EFF(14),e.k0s(),e.j41(15,"span"),e.EFF(16,"Add it to a client below"),e.k0s()(),e.j41(17,"li"),e.DNE(18,dd,7,1,"ng-container",25),e.DNE(19,pd,8,0,"ng-template",null,41,e.C5r),e.k0s()()()}if(2&n){const t=e.sdS(20),o=e.XpG();e.R7$(7),e.AVh("done",o.store.copiedUrl),e.R7$(2),e.JRh(o.store.copiedUrl?"\u2713":"\u2460"),e.R7$(3),e.AVh("done",o.store.copiedClient),e.R7$(2),e.JRh(o.store.copiedClient?"\u2713":"\u2461"),e.R7$(3),e.AVh("done",o.step3Done),e.R7$(1),e.Y8G("ngIf",o.step3Done)("ngIfElse",t)}}const _d=function(){return["/api-connections/api-keys"]};function gd(n,a){1&n&&(e.qex(0),e.j41(1,"p"),e.EFF(2," Any DreamFactory API key whose role grants access to the exposed services can connect. "),e.j41(3,"a",42),e.EFF(4," Manage API keys \u2192 "),e.k0s()(),e.j41(5,"p",20),e.EFF(6," The URL plus any valid key grants access \u2014 treat the pair like a password. "),e.k0s(),e.bVm()),2&n&&(e.R7$(3),e.Y8G("routerLink",e.lJ4(1,_d)))}function fd(n,a){if(1&n){const t=e.RV6();e.j41(0,"p"),e.EFF(1," API-key auth is off \u2014 enable it in "),e.j41(2,"button",22),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.goToTab.emit("settings"))}),e.EFF(3," Settings \u2192 Authentication"),e.k0s(),e.EFF(4,". "),e.k0s()}}function ud(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",43),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG();return e.Njj(r.selectClient(c.id))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG();e.AVh("on",o.selectedClient===t.id),e.BMQ("data-testid","mcp-client-chip-"+t.id),e.R7$(1),e.SpI(" ",t.label," ")}}function hd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",44)(1,"span"),e.EFF(2,"Connect with:"),e.k0s(),e.j41(3,"button",45),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setAuthVariant("oauth"))}),e.EFF(4," OAuth "),e.k0s(),e.j41(5,"button",45),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setAuthVariant("apikey"))}),e.EFF(6," API key "),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(3),e.AVh("on","oauth"===t.authVariant),e.R7$(2),e.AVh("on","apikey"===t.authVariant)}}function bd(n,a){1&n&&(e.j41(0,"p",20),e.EFF(1," Claude connectors sign in with OAuth \u2014 API keys don't apply here. "),e.k0s())}function vd(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",12),e.EFF(2,"Claude \u2014 add a custom connector"),e.k0s(),e.j41(3,"ol",46)(4,"li"),e.EFF(5,"Settings \u2192 Connectors \u2192 Add custom connector."),e.k0s(),e.j41(6,"li"),e.EFF(7," Remote MCP server URL: "),e.j41(8,"code",47),e.EFF(9),e.k0s(),e.j41(10,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.mcpUrl,!0))}),e.EFF(11," Copy "),e.k0s()(),e.j41(12,"li"),e.EFF(13," Advanced settings \u2192 paste the OAuth Client ID and Client Secret from above. "),e.j41(14,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyClientId())}),e.EFF(15," Copy ID "),e.k0s(),e.j41(16,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copySecret())}),e.EFF(17," Copy secret "),e.k0s()(),e.j41(18,"li"),e.EFF(19," Allow Claude's callback: "),e.j41(20,"code",47),e.EFF(21),e.k0s(),e.j41(22,"button",48),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.addClaudeCallback())}),e.EFF(23),e.k0s()(),e.j41(24,"li"),e.EFF(25,"Connect and sign in with DreamFactory."),e.k0s()(),e.DNE(26,bd,2,0,"p",49),e.bVm()}if(2&n){const t=e.XpG();e.R7$(9),e.JRh(t.mcpUrl),e.R7$(12),e.JRh(t.claudeCallback),e.R7$(1),e.Y8G("disabled",t.claudeCallbackAdded),e.R7$(1),e.SpI(" ",t.claudeCallbackAdded?"\u2713 In redirect URIs":"+ Add to redirect URIs"," "),e.R7$(3),e.Y8G("ngIf",t.bothAuthOn)}}function Cd(n,a){1&n&&(e.j41(0,"p",20),e.EFF(1," Claude Code opens a browser to sign in with OAuth on first use. "),e.k0s())}function xd(n,a){1&n&&(e.j41(0,"p",20),e.EFF(1," Replace YOUR_API_KEY with a DreamFactory API key whose role grants access to the exposed services. "),e.k0s())}function kd(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",12),e.EFF(2,"Claude Code"),e.k0s(),e.j41(3,"p"),e.EFF(4,"Run in your terminal:"),e.k0s(),e.j41(5,"div",50)(6,"pre")(7,"code"),e.EFF(8),e.k0s()(),e.j41(9,"button",51),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.claudeCodeSnippet))}),e.EFF(10," Copy "),e.k0s()(),e.DNE(11,Cd,2,0,"p",49),e.DNE(12,xd,2,0,"p",49),e.bVm()}if(2&n){const t=e.XpG();e.R7$(8),e.JRh(t.claudeCodeSnippet),e.R7$(3),e.Y8G("ngIf",!t.keyMode),e.R7$(1),e.Y8G("ngIf",t.keyMode)}}function yd(n,a){1&n&&(e.j41(0,"p",20),e.EFF(1," Cursor opens a browser to sign in with OAuth on first use. "),e.k0s())}function Md(n,a){1&n&&(e.j41(0,"p",20),e.EFF(1," Replace YOUR_API_KEY with a DreamFactory API key whose role grants access to the exposed services. "),e.k0s())}function Od(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",12),e.EFF(2,"Cursor"),e.k0s(),e.j41(3,"p"),e.EFF(4," Add to "),e.j41(5,"code",47),e.EFF(6,".cursor/mcp.json"),e.k0s(),e.EFF(7," (project) or "),e.j41(8,"code",47),e.EFF(9,"~/.cursor/mcp.json"),e.k0s(),e.EFF(10," (global): "),e.k0s(),e.j41(11,"div",50)(12,"pre")(13,"code"),e.EFF(14),e.k0s()(),e.j41(15,"button",51),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.cursorSnippet))}),e.EFF(16," Copy "),e.k0s()(),e.DNE(17,yd,2,0,"p",49),e.DNE(18,Md,2,0,"p",49),e.bVm()}if(2&n){const t=e.XpG();e.R7$(14),e.JRh(t.cursorSnippet),e.R7$(3),e.Y8G("ngIf",!t.keyMode),e.R7$(1),e.Y8G("ngIf",t.keyMode)}}function Pd(n,a){1&n&&(e.j41(0,"p",20),e.EFF(1," VS Code opens a browser to sign in with OAuth on first use. "),e.k0s())}function Fd(n,a){1&n&&(e.j41(0,"p",20),e.EFF(1," Replace YOUR_API_KEY with a DreamFactory API key whose role grants access to the exposed services. "),e.k0s())}function wd(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",12),e.EFF(2,"VS Code"),e.k0s(),e.j41(3,"p"),e.EFF(4,"One-liner:"),e.k0s(),e.j41(5,"div",50)(6,"pre")(7,"code"),e.EFF(8),e.k0s()(),e.j41(9,"button",51),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.vscodeSnippet))}),e.EFF(10," Copy "),e.k0s()(),e.DNE(11,Pd,2,0,"p",49),e.DNE(12,Fd,2,0,"p",49),e.bVm()}if(2&n){const t=e.XpG();e.R7$(8),e.JRh(t.vscodeSnippet),e.R7$(3),e.Y8G("ngIf",!t.keyMode),e.R7$(1),e.Y8G("ngIf",t.keyMode)}}function Dd(n,a){1&n&&(e.j41(0,"p",20),e.EFF(1," ChatGPT connectors sign in with OAuth \u2014 API keys don't apply here. "),e.k0s())}function Td(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",12),e.EFF(2,"ChatGPT \u2014 add a connector"),e.k0s(),e.j41(3,"ol",46)(4,"li"),e.EFF(5,"Settings \u2192 Connectors \u2192 Create."),e.k0s(),e.j41(6,"li"),e.EFF(7," MCP server URL: "),e.j41(8,"code",47),e.EFF(9),e.k0s(),e.j41(10,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.mcpUrl,!0))}),e.EFF(11," Copy "),e.k0s()(),e.j41(12,"li"),e.EFF(13,"Authentication: OAuth \u2014 ChatGPT discovers the sign-in flow from the server."),e.k0s(),e.j41(14,"li"),e.EFF(15,"Create, then connect and sign in with DreamFactory."),e.k0s()(),e.DNE(16,Dd,2,0,"p",49),e.bVm()}if(2&n){const t=e.XpG();e.R7$(9),e.JRh(t.mcpUrl),e.R7$(7),e.Y8G("ngIf",t.bothAuthOn)}}function Sd(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",12),e.EFF(2,"Generic JSON"),e.k0s(),e.j41(3,"p"),e.EFF(4," For any MCP client that reads an "),e.j41(5,"code",47),e.EFF(6,"mcpServers"),e.k0s(),e.EFF(7," block: "),e.k0s(),e.j41(8,"div",50)(9,"pre")(10,"code"),e.EFF(11),e.k0s()(),e.j41(12,"button",51),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.genericSnippet))}),e.EFF(13," Copy "),e.k0s()(),e.j41(14,"p",20),e.EFF(15," Check reachability: "),e.j41(16,"code",47),e.EFF(17),e.k0s(),e.j41(18,"button",17),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyForClient(i.genericCurl))}),e.EFF(19," Copy "),e.k0s(),e.EFF(20," \u2014 a 401 challenge here means healthy auth. "),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(11),e.JRh(t.genericSnippet),e.R7$(6),e.JRh(t.genericCurl)}}const Rd=function(n){return["/api-connections/api-docs",n]},ht="https://claude.ai/api/mcp/auth_callback",mn="X-DreamFactory-API-Key",_n=new Set(["claude-code","cursor","vscode","json"]);let $d=(()=>{class n{constructor(t){this.snackbarService=t,this.goToTab=new e.bkB,this.claudeCallback=ht,this.clients=[{id:"claude",label:"Claude"},{id:"claude-code",label:"Claude Code"},{id:"cursor",label:"Cursor"},{id:"vscode",label:"VS Code"},{id:"chatgpt",label:"ChatGPT"},{id:"json",label:"Generic JSON"}],this.probe="pending",this.secretRevealed=!1,this.selectedClient="claude",this.authVariant="oauth",this.autoDismissTimer=null}ngOnInit(){this.restoreClientChoice(),this.runProbe()}ngOnChanges(t){t.mcpUrl&&!t.mcpUrl.firstChange&&(this.probe="pending",this.secretRevealed=!1,this.authVariant="oauth",this.restoreClientChoice(),this.runProbe())}runProbe(){const t=this.mcpUrl;fetch(t,{method:"GET"}).then(()=>{t===this.mcpUrl&&(this.probe="ok")}).catch(()=>{t===this.mcpUrl&&(this.probe="unknown")})}ngOnDestroy(){this.autoDismissTimer&&clearTimeout(this.autoDismissTimer)}get checklistVisible(){return this.store.created&&!this.store.checklistDismissed}get exposedCount(){return this.store.cfg.exposedServices.length}get step3Done(){return this.exposedCount>0}get exposedSummary(){const t=this.exposedCount,o=this.store.effective();return`${t} ${1===t?"service":"services"} exposed (${o.total} tools${o.readOnly?", read-only":""})`}dismissChecklist(){this.store.checklistDismissed=!0,this.store.touch()}maybeAutoDismiss(){!this.checklistVisible||this.autoDismissTimer||this.store.copiedUrl&&this.store.copiedClient&&this.step3Done&&(this.autoDismissTimer=setTimeout(()=>{this.store.checklistDismissed=!0,this.store.touch()},1500))}dismissReconnect(){this.store.reconnectBanner=!1,this.store.touch()}doCopy(t){try{navigator.clipboard?.writeText(t)?.catch(()=>{})}catch{}this.snackbarService.openSnackBar("Copied.","success")}copyEndpointUrl(){this.doCopy(this.mcpUrl),this.store.copiedUrl=!0,this.store.touch(),this.maybeAutoDismiss()}copyForClient(t,o=!1){this.doCopy(t),this.store.copiedClient=!0,o&&(this.store.copiedUrl=!0),this.store.touch(),this.maybeAutoDismiss()}copyClientId(){this.copyForClient(this.store.cfg.oauthClientId)}copySecret(){this.copyForClient(this.store.cfg.oauthClientSecret)}get secretDisplay(){return this.secretRevealed?this.store.cfg.oauthClientSecret||"\u2014":this.store.cfg.oauthClientSecret?"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022":"\u2014"}toggleSecret(){this.secretRevealed=!this.secretRevealed}regenerateSecret(){window.confirm("Clients using the old secret will stop connecting. Regenerate?")&&(this.store.cfg.oauthClientSecret=function Ed(){const n=new Uint8Array(32),a=globalThis.crypto;if(a?.getRandomValues)a.getRandomValues(n);else for(let t=0;tt.toString(16).padStart(2,"0")).join("")}(),this.store.touch(),this.snackbarService.openSnackBar("New client secret generated \u2014 save to apply.","success"))}get clientChoiceKey(){return"df-mcp-connect-client."+(this.store.service?.name??"")}restoreClientChoice(){try{const t=localStorage.getItem(this.clientChoiceKey);t&&this.clients.some(o=>o.id===t)&&(this.selectedClient=t)}catch{}}selectClient(t){this.selectedClient=t;try{localStorage.setItem(this.clientChoiceKey,t)}catch{}}get bothAuthOn(){return this.store.cfg.allowApiKeyAuth}get showAuthToggle(){return this.bothAuthOn&&_n.has(this.selectedClient)}setAuthVariant(t){this.authVariant=t}get keyMode(){return this.bothAuthOn&&"apikey"===this.authVariant&&_n.has(this.selectedClient)}get serviceName(){return this.store.service?.name??""}get origin(){return this.mcpUrl.replace(/\/mcp\/[^/]*\/?$/,"")}get legacyAlias(){return`${this.origin}/api/v2/${this.serviceName}/_mcp`}get claudeCallbackAdded(){return this.store.cfg.redirectUris.includes(ht)}addClaudeCallback(){this.claudeCallbackAdded||(this.store.cfg.redirectUris.push(ht),this.store.touch(),this.snackbarService.openSnackBar("Added Claude's callback to redirect URIs \u2014 save to apply.","success"))}get claudeCodeSnippet(){const t=`claude mcp add --transport http ${this.serviceName} ${this.mcpUrl}`;return this.keyMode?`${t} --header "${mn}: YOUR_API_KEY"`:t}serverEntry(t){const o=t?{type:"http",url:this.mcpUrl}:{url:this.mcpUrl};return this.keyMode&&(o.headers={[mn]:"YOUR_API_KEY"}),o}get cursorSnippet(){return JSON.stringify({mcpServers:{[this.serviceName]:this.serverEntry(!1)}},null,2)}get vscodeSnippet(){const t={name:this.serviceName,...this.serverEntry(!0)};return`code --add-mcp '${JSON.stringify(t)}'`}get genericSnippet(){return`${JSON.stringify({mcpServers:{[this.serviceName]:this.serverEntry(!0)}},null,2)}\n// Legacy alias (same server): ${this.legacyAlias}`}get genericCurl(){return`curl -i ${this.mcpUrl}`}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(se.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-connect"]],inputs:{store:"store",mcpUrl:"mcpUrl"},outputs:{goToTab:"goToTab"},standalone:!0,features:[e.OA$,e.aNF],decls:73,vars:28,consts:[["data-testid","mcp-connect-tab",1,"mcp-connect"],["class","mcp-reconnect-banner","data-testid","mcp-reconnect-banner",4,"ngIf"],["class","mcp-card mcp-checklist","data-testid","mcp-checklist",4,"ngIf"],["data-testid","mcp-endpoint-card",1,"mcp-card","mcp-endpoint"],[1,"mcp-endpoint-row"],[1,"mcp-endpoint-url"],["mat-stroked-button","","type","button","data-testid","mcp-endpoint-copy",3,"click"],[1,"mcp-endpoint-sub"],["data-testid","mcp-probe-chip",1,"mcp-chip",3,"matTooltip"],[1,"mcp-section-title"],[1,"mcp-auth-grid"],["data-testid","mcp-oauth-card",1,"mcp-card"],[1,"mcp-card-title"],[1,"mcp-chip","good"],[1,"mcp-cred-row"],[1,"mcp-cred-label"],[1,"mcp-cred-value"],["mat-button","","type","button",3,"click"],["mat-button","","type","button","data-testid","mcp-secret-reveal",3,"click"],["mat-stroked-button","","type","button","data-testid","mcp-secret-regenerate",1,"mcp-regenerate",3,"click"],[1,"mcp-caption"],[1,"mcp-redirects-line"],["type","button",1,"mcp-link",3,"click"],["data-testid","mcp-apikey-card",1,"mcp-card"],[1,"mcp-chip"],[4,"ngIf","ngIfElse"],["apiKeyOff",""],[1,"mcp-client-chips"],["type","button","class","mcp-client-chip",3,"on","click",4,"ngFor","ngForOf"],["class","mcp-auth-toggle",4,"ngIf"],["data-testid","mcp-client-panel",1,"mcp-card","mcp-client-panel",3,"ngSwitch"],[4,"ngSwitchCase"],[1,"mcp-connect-footer"],[1,"mcp-link","mcp-docs-link",3,"routerLink"],["data-testid","mcp-reconnect-banner",1,"mcp-reconnect-banner"],["type","button","aria-label","Dismiss",1,"mcp-x",3,"click"],["data-testid","mcp-checklist",1,"mcp-card","mcp-checklist"],[1,"mcp-checklist-head"],["type","button","data-testid","mcp-checklist-dismiss","aria-label","Dismiss checklist",1,"mcp-x",3,"click"],[1,"mcp-checklist-steps"],[1,"mcp-step-mark"],["exposePrompt",""],[1,"mcp-link",3,"routerLink"],["type","button",1,"mcp-client-chip",3,"click"],[1,"mcp-auth-toggle"],["type","button",3,"click"],[1,"mcp-steps"],[1,"mcp-inline-code"],["mat-stroked-button","","type","button","data-testid","mcp-add-redirect",3,"disabled","click"],["class","mcp-caption",4,"ngIf"],[1,"mcp-snippet-block"],["mat-stroked-button","","type","button",3,"click"]],template:function(o,i){if(1&o&&(e.j41(0,"div",0),e.DNE(1,ld,5,0,"div",1),e.DNE(2,md,21,10,"section",2),e.j41(3,"section",3)(4,"div",4)(5,"code",5),e.EFF(6),e.k0s(),e.j41(7,"button",6),e.bIt("click",function(){return i.copyEndpointUrl()}),e.EFF(8," Copy "),e.k0s()(),e.j41(9,"div",7)(10,"span"),e.EFF(11,"Streamable HTTP \xb7 MCP 2025-03-26"),e.k0s(),e.j41(12,"span",8),e.EFF(13),e.k0s()()(),e.j41(14,"h2",9),e.EFF(15,"Authentication"),e.k0s(),e.j41(16,"div",10)(17,"section",11)(18,"h3",12),e.EFF(19," OAuth 2.1 "),e.j41(20,"span",13),e.EFF(21,"always on"),e.k0s()(),e.j41(22,"div",14)(23,"span",15),e.EFF(24,"Client ID"),e.k0s(),e.j41(25,"code",16),e.EFF(26),e.k0s(),e.j41(27,"button",17),e.bIt("click",function(){return i.copyClientId()}),e.EFF(28,"Copy"),e.k0s()(),e.j41(29,"div",14)(30,"span",15),e.EFF(31,"Client secret"),e.k0s(),e.j41(32,"code",16),e.EFF(33),e.k0s(),e.j41(34,"button",18),e.bIt("click",function(){return i.toggleSecret()}),e.EFF(35),e.k0s(),e.j41(36,"button",17),e.bIt("click",function(){return i.copySecret()}),e.EFF(37,"Copy"),e.k0s()(),e.j41(38,"button",19),e.bIt("click",function(){return i.regenerateSecret()}),e.EFF(39," Regenerate\u2026 "),e.k0s(),e.j41(40,"p",20),e.EFF(41," These match the URL, Client ID, and Client Secret fields in your client's add-connector dialog. "),e.k0s(),e.j41(42,"p",21),e.EFF(43),e.j41(44,"button",22),e.bIt("click",function(){return i.goToTab.emit("settings")}),e.EFF(45," Manage \u2192 "),e.k0s()()(),e.j41(46,"section",23)(47,"h3",12),e.EFF(48," API key "),e.j41(49,"span",24),e.EFF(50),e.k0s()(),e.DNE(51,gd,7,2,"ng-container",25),e.DNE(52,fd,5,0,"ng-template",null,26,e.C5r),e.k0s()(),e.j41(54,"h2",9),e.EFF(55,"Connect a client"),e.k0s(),e.j41(56,"div",27),e.DNE(57,ud,2,4,"button",28),e.k0s(),e.DNE(58,hd,7,4,"div",29),e.j41(59,"section",30),e.DNE(60,vd,27,5,"ng-container",31),e.DNE(61,kd,13,3,"ng-container",31),e.DNE(62,Od,19,3,"ng-container",31),e.DNE(63,wd,13,3,"ng-container",31),e.DNE(64,Td,17,2,"ng-container",31),e.DNE(65,Sd,21,2,"ng-container",31),e.k0s(),e.j41(66,"footer",32)(67,"p"),e.EFF(68," Roles further filter tools per caller at runtime \u2014 this page sets the server-wide maximum. "),e.j41(69,"button",22),e.bIt("click",function(){return i.goToTab.emit("tools")}),e.EFF(70," Preview in Tools. "),e.k0s()(),e.j41(71,"a",33),e.EFF(72," \u25b8 Also available: REST endpoint & API Docs "),e.k0s()()()),2&o){const c=e.sdS(53);e.R7$(1),e.Y8G("ngIf",i.store.reconnectBanner),e.R7$(1),e.Y8G("ngIf",i.checklistVisible),e.R7$(4),e.JRh(i.mcpUrl),e.R7$(6),e.AVh("good","ok"===i.probe),e.Y8G("matTooltip","ok"===i.probe?"The endpoint answered with the expected sign-in challenge.":""),e.R7$(1),e.SpI(" ","ok"===i.probe?"\u2713 Reachable \u2014 auth enforced":"\u2014"," "),e.R7$(13),e.JRh(i.store.cfg.oauthClientId||"\u2014"),e.R7$(7),e.JRh(i.secretDisplay),e.R7$(2),e.SpI(" ",i.secretRevealed?"Hide":"Reveal"," "),e.R7$(8),e.SpI(" Redirect URIs: ",i.store.cfg.redirectUris.length," \xb7 "),e.R7$(6),e.AVh("good",i.store.cfg.allowApiKeyAuth),e.R7$(1),e.SpI(" ",i.store.cfg.allowApiKeyAuth?"on":"off"," "),e.R7$(1),e.Y8G("ngIf",i.store.cfg.allowApiKeyAuth)("ngIfElse",c),e.R7$(6),e.Y8G("ngForOf",i.clients),e.R7$(1),e.Y8G("ngIf",i.showAuthToggle),e.R7$(1),e.Y8G("ngSwitch",i.selectedClient),e.R7$(1),e.Y8G("ngSwitchCase","claude"),e.R7$(1),e.Y8G("ngSwitchCase","claude-code"),e.R7$(1),e.Y8G("ngSwitchCase","cursor"),e.R7$(1),e.Y8G("ngSwitchCase","vscode"),e.R7$(1),e.Y8G("ngSwitchCase","chatgpt"),e.R7$(1),e.Y8G("ngSwitchCase","json"),e.R7$(6),e.Y8G("routerLink",e.eq3(26,Rd,i.store.service.name))}},dependencies:[m.MD,m.Sq,m.bT,m.ux,m.e1,G.iI,G.Wk,u.Hl,u.$z,R.uc,R.oV],styles:[".mcp-connect[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;max-width:980px}.mcp-card[_ngcontent-%COMP%]{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:16px 18px}.mcp-card[_ngcontent-%COMP%] .mcp-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:14.5px;font-weight:700;margin:0 0 10px}.mcp-section-title[_ngcontent-%COMP%]{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.6;margin:6px 0 -4px}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid rgba(0,0,0,.14);background:rgba(0,0,0,.02);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:#e7f2e8;border-color:#2e7d3259;color:#2e7d32}.mcp-chip.warn[_ngcontent-%COMP%]{background:#fdf3dc;border-color:#9a670066;color:#9a6700}.mcp-chip.primary[_ngcontent-%COMP%]{background:rgba(92,86,153,.1);border-color:#5c569961;color:var(--df-accent, #5c5699)}.mcp-reconnect-banner[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fdf3dc;border:1px solid rgba(154,103,0,.4);color:#9a6700;border-radius:10px;padding:10px 14px;font-size:13.5px;font-weight:500}.mcp-x[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:18px;line-height:1;padding:2px 6px;border-radius:6px;color:inherit;opacity:.7}.mcp-x[_ngcontent-%COMP%]:hover{opacity:1;background:rgba(0,0,0,.05)}.mcp-checklist[_ngcontent-%COMP%]{border-color:#5c569961}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:15px;font-weight:700;margin:0 0 8px}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:7px}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:9px;font-size:13.5px}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%] li.done[_ngcontent-%COMP%]{color:#2e7d32}.mcp-checklist[_ngcontent-%COMP%] .mcp-checklist-steps[_ngcontent-%COMP%] .mcp-step-mark[_ngcontent-%COMP%]{flex:none;font-weight:700;width:18px;text-align:center}.mcp-endpoint[_ngcontent-%COMP%] .mcp-endpoint-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.mcp-endpoint[_ngcontent-%COMP%] .mcp-endpoint-url[_ngcontent-%COMP%]{font-size:16px;font-weight:600;background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:7px;padding:7px 12px;overflow-x:auto;max-width:100%}.mcp-endpoint[_ngcontent-%COMP%] .mcp-endpoint-sub[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:9px;font-size:12.5px;opacity:.85}.mcp-auth-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}.mcp-auth-grid[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13.5px;margin:0 0 8px}.mcp-cred-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px;font-size:13px}.mcp-cred-row[_ngcontent-%COMP%] .mcp-cred-label[_ngcontent-%COMP%]{flex:none;width:92px;font-weight:600;opacity:.75}.mcp-cred-row[_ngcontent-%COMP%] .mcp-cred-value[_ngcontent-%COMP%]{background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:6px;padding:3px 8px;font-size:12.5px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mcp-regenerate[_ngcontent-%COMP%]{margin:4px 0 6px}.mcp-caption[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7;margin:8px 0 0}.mcp-redirects-line[_ngcontent-%COMP%]{font-size:13px;margin:10px 0 0}.mcp-client-chips[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap}.mcp-client-chip[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:13px;font-weight:600;padding:6px 14px;border-radius:999px;border:1px solid rgba(0,0,0,.14);background:#fff}.mcp-client-chip[_ngcontent-%COMP%]:hover{border-color:#5c569961}.mcp-client-chip.on[_ngcontent-%COMP%]{background:rgba(92,86,153,.1);border-color:var(--df-accent, #5c5699);color:var(--df-accent, #5c5699)}.mcp-auth-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;opacity:.9}.mcp-auth-toggle[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:12.5px;font-weight:600;padding:3px 10px;border-radius:999px;border:1px solid rgba(0,0,0,.14);background:#fff}.mcp-auth-toggle[_ngcontent-%COMP%] button.on[_ngcontent-%COMP%]{background:rgba(92,86,153,.1);border-color:var(--df-accent, #5c5699);color:var(--df-accent, #5c5699)}.mcp-client-panel[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:13.5px;margin:0 0 8px}.mcp-client-panel[_ngcontent-%COMP%] .mcp-steps[_ngcontent-%COMP%]{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:7px;font-size:13.5px}.mcp-inline-code[_ngcontent-%COMP%]{background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:6px;padding:2px 7px;font-size:12.5px;word-break:break-all}.mcp-snippet-block[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px;background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:8px;padding:10px 12px;margin:6px 0 8px}.mcp-snippet-block[_ngcontent-%COMP%] pre[_ngcontent-%COMP%]{flex:1;margin:0;overflow-x:auto;font-size:12.5px;line-height:1.55}.mcp-snippet-block[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:none}.mcp-connect-footer[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;padding:4px 2px 8px;font-size:13px;opacity:.9}.mcp-connect-footer[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.mcp-link[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:inherit;padding:0;color:var(--df-accent, #5c5699);font-weight:600;text-decoration:none}.mcp-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.mcp-docs-link[_ngcontent-%COMP%]{display:inline-block}@media (max-width: 700px){.mcp-auth-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.mcp-endpoint[_ngcontent-%COMP%] .mcp-endpoint-url[_ngcontent-%COMP%]{font-size:13.5px}.mcp-cred-row[_ngcontent-%COMP%] .mcp-cred-label[_ngcontent-%COMP%]{width:100%}.mcp-snippet-block[_ngcontent-%COMP%]{flex-direction:column}}"]})}}return n})();function Gd(n,a){if(1&n&&(e.j41(0,"span",30),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.R7$(1),e.SpI(" saved curation: ",o.dormantCount(t)," tools off ")}}function jd(n,a){1&n&&(e.j41(0,"span",30),e.EFF(1,"inactive"),e.k0s())}function Nd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",24),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.toggle(c.name))}),e.j41(1,"mat-checkbox",25),e.bIt("click",function(i){return i.stopPropagation()})("change",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.toggle(c.name))}),e.k0s(),e.j41(2,"span",26),e.EFF(3),e.k0s(),e.j41(4,"span",27),e.EFF(5),e.k0s(),e.j41(6,"span",28),e.EFF(7),e.k0s(),e.DNE(8,Gd,2,1,"span",29),e.DNE(9,jd,2,0,"span",29),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("checked",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(o.toolDelta(t)),e.R7$(1),e.Y8G("ngIf",o.dormantCount(t)>0),e.R7$(1),e.Y8G("ngIf",!t.active)}}function Ad(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",20)(1,"div",21)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-checkbox",22),e.bIt("change",function(){e.eBV(t);const i=e.XpG().ngIf,c=e.XpG(2);return e.Njj(c.toggleGroup(i))}),e.EFF(5," Select all databases "),e.k0s()(),e.DNE(6,Nd,10,6,"div",23),e.k0s()}if(2&n){const t=e.XpG().ngIf,o=e.XpG(2);e.R7$(3),e.SpI("Databases (",t.length,")"),e.R7$(1),e.Y8G("checked",o.groupAllSelected(t))("indeterminate",o.groupSomeSelected(t)),e.R7$(2),e.Y8G("ngForOf",t)}}function Yd(n,a){if(1&n&&(e.qex(0),e.DNE(1,Ad,7,4,"div",19),e.bVm()),2&n){const t=a.ngIf;e.R7$(1),e.Y8G("ngIf",t.length>0)}}function Vd(n,a){if(1&n&&(e.j41(0,"span",30),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.R7$(1),e.SpI(" saved curation: ",o.dormantCount(t)," tools off ")}}function zd(n,a){1&n&&(e.j41(0,"span",30),e.EFF(1,"inactive"),e.k0s())}function Xd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",24),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.toggle(c.name))}),e.j41(1,"mat-checkbox",25),e.bIt("click",function(i){return i.stopPropagation()})("change",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.toggle(c.name))}),e.k0s(),e.j41(2,"span",26),e.EFF(3),e.k0s(),e.j41(4,"span",27),e.EFF(5),e.k0s(),e.j41(6,"span",28),e.EFF(7),e.k0s(),e.DNE(8,Vd,2,1,"span",29),e.DNE(9,zd,2,0,"span",29),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("checked",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(o.toolDelta(t)),e.R7$(1),e.Y8G("ngIf",o.dormantCount(t)>0),e.R7$(1),e.Y8G("ngIf",!t.active)}}function Bd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",20)(1,"div",21)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-checkbox",22),e.bIt("change",function(){e.eBV(t);const i=e.XpG().ngIf,c=e.XpG(2);return e.Njj(c.toggleGroup(i))}),e.EFF(5," Select all files "),e.k0s()(),e.DNE(6,Xd,10,6,"div",23),e.k0s()}if(2&n){const t=e.XpG().ngIf,o=e.XpG(2);e.R7$(3),e.SpI("File storage (",t.length,")"),e.R7$(1),e.Y8G("checked",o.groupAllSelected(t))("indeterminate",o.groupSomeSelected(t)),e.R7$(2),e.Y8G("ngForOf",t)}}function Ld(n,a){if(1&n&&(e.qex(0),e.DNE(1,Bd,7,4,"div",19),e.bVm()),2&n){const t=a.ngIf;e.R7$(1),e.Y8G("ngIf",t.length>0)}}function Ud(n,a){1&n&&(e.j41(0,"p",31),e.EFF(1," Every service on this instance is already exposed. "),e.k0s())}function Jd(n,a){if(1&n&&(e.qex(0),e.DNE(1,Yd,2,1,"ng-container",17),e.DNE(2,Ld,2,1,"ng-container",17),e.DNE(3,Ud,2,0,"p",18),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.dbCandidates()),e.R7$(1),e.Y8G("ngIf",t.fileCandidates()),e.R7$(1),e.Y8G("ngIf",0===t.dbCandidates().length&&0===t.fileCandidates().length&&!t.q.trim())}}function qd(n,a){if(1&n&&(e.j41(0,"p",31),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" No service matches \u201c",t.q.trim(),"\u201d. Create one under API Generation & Connections. ")}}function gn(n,a,t){const o=new Set;if(t)return o;for(const i of a)n.dormantCurationCount(i)>0&&o.add(i);return o}let Wd=(()=>{class n{constructor(t,o){this.dialogRef=t,this.data=o,this.q="",this.access="ro",this.accessTouched=!1,this.selected=new Set}get store(){return this.data.store}candidates(){return this.store.backendServices.filter(t=>!this.store.cfg.exposedServices.includes(t.name))}matches(t){const o=this.q.trim().toLowerCase();return!o||t.name.toLowerCase().includes(o)||t.label.toLowerCase().includes(o)}dbCandidates(){return this.candidates().filter(t=>"db"===t.kind&&this.matches(t))}fileCandidates(){return this.candidates().filter(t=>"file"===t.kind&&this.matches(t))}toolDelta(t){return`+${J(t.kind).length} tools`}dormantCount(t){return this.store.dormantCurationCount(t.name)}isSelected(t){return this.selected.has(t)}toggle(t){this.selected.has(t)?this.selected.delete(t):this.selected.add(t)}markAccessTouched(){this.accessTouched=!0}groupAllSelected(t){return t.length>0&&t.every(o=>this.selected.has(o.name))}groupSomeSelected(t){const o=t.filter(i=>this.selected.has(i.name)).length;return o>0&&o({...a})),rest:{...n.rest}}}(n.cfg),c=gn(n,a,o);for(const r of a){i.exposedServices.includes(r)||i.exposedServices.push(r);const s=n.backendServices.find(l=>l.name===r);!s||c.has(r)||(mt(s).forEach(l=>i.disabledTools.delete(l)),"ro"===t&&pt(s).forEach(l=>i.disabledTools.add(l)))}return Ie(i,n.backendServices).total}(this.store,[...this.selected],this.access,this.accessTouched);return`${t} selected \xb7 ${this.accessLabel()} \u2192 server will serve ${i} tools (was ${o})`}emptySearch(){return this.q.trim().length>0&&0===this.dbCandidates().length&&0===this.fileCandidates().length}confirm(){0!==this.selected.size&&this.dialogRef.close({names:[...this.selected],access:this.access,accessTouched:this.accessTouched})}cancel(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP),e.rXU(b.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-picker"]],standalone:!0,features:[e.aNF],decls:27,vars:9,consts:[["data-testid","mcp-picker-dialog",1,"mcp-picker"],[1,"mcp-picker-head"],["mat-icon-button","","type","button","aria-label","Close",3,"click"],["type","search","data-testid","mcp-picker-search","aria-label","Search available services",1,"mcp-picker-search",3,"ngModel","placeholder","ngModelChange"],[1,"mcp-picker-access"],[1,"mcp-picker-access-label"],[3,"ngModel","ngModelChange","change"],["value","ro","data-testid","mcp-picker-access-ro"],["value","rw"],[1,"mcp-picker-body"],[4,"ngIf","ngIfElse"],["noMatch",""],[1,"mcp-picker-foot"],["data-testid","mcp-picker-consequence",1,"mcp-picker-consequence"],[1,"mcp-picker-foot-btns"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-picker-confirm",3,"disabled","click"],[4,"ngIf"],["class","mcp-picker-empty",4,"ngIf"],["class","mcp-picker-group",4,"ngIf"],[1,"mcp-picker-group"],[1,"mcp-picker-group-head"],[3,"checked","indeterminate","change"],["class","mcp-picker-row",3,"click",4,"ngFor","ngForOf"],[1,"mcp-picker-row",3,"click"],[3,"checked","click","change"],[1,"mcp-picker-label"],[1,"mcp-chip"],[1,"mcp-picker-delta"],["class","mcp-chip warn",4,"ngIf"],[1,"mcp-chip","warn"],[1,"mcp-picker-empty"]],template:function(o,i){if(1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"h2"),e.EFF(3,"Expose services"),e.k0s(),e.j41(4,"button",2),e.bIt("click",function(){return i.cancel()}),e.EFF(5,"\u2715"),e.k0s()(),e.j41(6,"input",3),e.bIt("ngModelChange",function(r){return i.q=r}),e.k0s(),e.j41(7,"div",4)(8,"span",5),e.EFF(9,"Access for these services:"),e.k0s(),e.j41(10,"mat-radio-group",6),e.bIt("ngModelChange",function(r){return i.access=r})("change",function(){return i.markAccessTouched()}),e.j41(11,"mat-radio-button",7),e.EFF(12," Read-only \u2014 recommended "),e.k0s(),e.j41(13,"mat-radio-button",8),e.EFF(14,"Read & write"),e.k0s()()(),e.j41(15,"div",9),e.DNE(16,Jd,4,3,"ng-container",10),e.DNE(17,qd,2,1,"ng-template",null,11,e.C5r),e.k0s(),e.j41(19,"div",12)(20,"span",13),e.EFF(21),e.k0s(),e.j41(22,"span",14)(23,"button",15),e.bIt("click",function(){return i.cancel()}),e.EFF(24,"Cancel"),e.k0s(),e.j41(25,"button",16),e.bIt("click",function(){return i.confirm()}),e.EFF(26),e.k0s()()()()),2&o){const c=e.sdS(18);e.R7$(6),e.Mz_("placeholder","Search ",i.candidates().length," available services\u2026"),e.Y8G("ngModel",i.q),e.R7$(4),e.Y8G("ngModel",i.access),e.R7$(6),e.Y8G("ngIf",!i.emptySearch())("ngIfElse",c),e.R7$(5),e.SpI(" ",i.consequenceText()," "),e.R7$(4),e.Y8G("disabled",0===i.selected.size),e.R7$(1),e.Lme(" Expose ",i.selected.size," ",1===i.selected.size?"service":"services"," ")}},dependencies:[m.MD,m.Sq,m.bT,d.YN,d.me,d.BC,d.vS,u.Hl,u.$z,u.iY,q.g7,q.So,b.hM,V.Wk,V.VT,V._g],styles:['@charset "UTF-8";.mcp-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;font-family:Inter,Helvetica Neue,sans-serif;min-width:320px;max-height:80vh;padding:18px 20px 14px;box-sizing:border-box}.mcp-picker-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.mcp-picker-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:17px;font-weight:700}.mcp-picker-search[_ngcontent-%COMP%]{margin:12px 0 10px;width:100%;box-sizing:border-box;font:inherit;font-size:13.5px;padding:8px 12px;border:1px solid rgba(0,0,0,.18);border-radius:8px}.mcp-picker-search[_ngcontent-%COMP%]:focus{outline:2px solid var(--df-accent, #5c5699);outline-offset:-1px}.mcp-picker-access[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:13px;margin-bottom:8px}.mcp-picker-access[_ngcontent-%COMP%] .mcp-picker-access-label[_ngcontent-%COMP%]{font-weight:600}.mcp-picker-access[_ngcontent-%COMP%] mat-radio-group[_ngcontent-%COMP%]{display:inline-flex;gap:4px;flex-wrap:wrap}.mcp-picker-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;border:1px solid rgba(0,0,0,.08);border-radius:10px;background:#fff;min-height:160px}.mcp-picker-group-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:8px 12px 2px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.75}.mcp-picker-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:4px 12px;cursor:pointer;border-top:1px solid rgba(0,0,0,.04)}.mcp-picker-row[_ngcontent-%COMP%]:hover{background:rgba(92,86,153,.05)}.mcp-picker-row[_ngcontent-%COMP%] .mcp-picker-label[_ngcontent-%COMP%]{font-weight:600;font-size:13.5px}.mcp-picker-row[_ngcontent-%COMP%] .mcp-picker-delta[_ngcontent-%COMP%]{font-size:12px;opacity:.65;font-variant-numeric:tabular-nums}.mcp-picker-empty[_ngcontent-%COMP%]{padding:22px 16px;font-size:13.5px;opacity:.75}.mcp-picker-foot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-top:12px}.mcp-picker-foot[_ngcontent-%COMP%] .mcp-picker-consequence[_ngcontent-%COMP%]{font-size:13px;font-variant-numeric:tabular-nums;opacity:.85}.mcp-picker-foot[_ngcontent-%COMP%] .mcp-picker-foot-btns[_ngcontent-%COMP%]{display:inline-flex;gap:8px;margin-left:auto}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid rgba(0,0,0,.14);background:rgba(0,0,0,.02);white-space:nowrap}.mcp-chip.warn[_ngcontent-%COMP%]{background:#fdf3dc;border-color:#9a670066;color:#9a6700}@media (max-width: 700px){.mcp-picker[_ngcontent-%COMP%]{padding:14px 12px 10px;min-width:0}}']})}}return n})();function Zd(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",12)(1,"span",13),e.EFF(2,"Catalog:"),e.k0s(),e.j41(3,"mat-radio-group",14),e.bIt("ngModelChange",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.view=i)}),e.j41(4,"mat-radio-button",15),e.EFF(5,"First response"),e.k0s(),e.j41(6,"mat-radio-button",16),e.EFF(7,"Full catalog"),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("ngModel",t.view)}}function ep(n,a){1&n&&(e.j41(0,"p",18),e.EFF(1,"None served."),e.k0s())}function tp(n,a){if(1&n&&(e.j41(0,"span",22),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.JRh(t.meta)}}function np(n,a){if(1&n&&(e.j41(0,"div",19)(1,"code"),e.EFF(2),e.k0s(),e.DNE(3,tp,2,1,"span",20),e.j41(4,"span",21),e.EFF(5),e.k0s()()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.name),e.R7$(1),e.Y8G("ngIf",t.meta),e.R7$(2),e.JRh(t.description)}}function op(n,a){if(1&n&&(e.j41(0,"section",17)(1,"h3"),e.EFF(2),e.k0s(),e.DNE(3,ep,2,0,"p",7),e.DNE(4,np,6,3,"div",8),e.k0s()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.label),e.R7$(1),e.Y8G("ngIf",0===t.items.length),e.R7$(1),e.Y8G("ngForOf",t.items)}}function ip(n,a){1&n&&(e.j41(0,"p",18),e.EFF(1," Nothing is excluded \u2014 every catalog tool is served. "),e.k0s())}function ap(n,a){if(1&n&&(e.j41(0,"div",19)(1,"code"),e.EFF(2),e.k0s(),e.j41(3,"span",23),e.EFF(4),e.k0s()()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(t.reason)}}let cp=(()=>{class n{constructor(t,o,i){this.dialogRef=t,this.data=o,this.snackbar=i,this.groups=[],this.excluded=[],this.total=0,this.tokenEstimate=0,this.lazyEngaged=!1,this.lazyAuto=!0,this.view="full"}get store(){return this.data.store}ngOnInit(){this.store.isSystemMcp?this.buildSystem():this.buildMcp(),this.lazyEngaged&&(this.view="first")}buildMcp(){const t=this.store,o=t.cfg,i=o.disabledTools,c=t.effective(),r=c.effectiveStyle,s=t.rows(),l=s.filter(g=>!!g.svc),p=l.map(g=>g.svc).filter(g=>g.active&&"db"===g.kind),v=l.map(g=>g.svc).filter(g=>g.active&&"file"===g.kind),k=Me.filter(g=>!i.has(g.verb)).map(g=>({name:g.verb,description:g.description}));if(p.length>=2)for(const g of Oe)i.has(g.verb)||k.push({name:g.verb,description:g.description});this.groups.push({label:`Global (${k.length})`,items:k});const C=[];if(p.length>0)if("merged"===r){for(const g of J("db")){const h=gt(g.verb,o,t.backendServices);0!==h.on.length&&C.push({name:g.verb,description:g.description,meta:`service: ${h.on.join(", ")} (${h.on.length} of ${h.total})`})}this.groups.push({label:`Database \u2014 consolidated, service argument (${C.length})`,items:C})}else{for(const g of p)for(const h of J("db"))i.has(z(g.name,h.verb))||C.push({name:ft("prefixed",g.name,h.verb),description:h.description});this.groups.push({label:`Database (${C.length})`,items:C})}const M=[];for(const g of v)for(const h of J("file"))i.has(z(g.name,h.verb))||M.push({name:z(g.name,h.verb),description:h.description});v.length>0&&this.groups.push({label:`File (${M.length})`,items:M});const D=(o.customTools??[]).filter(g=>!1!==g?.enabled&&0!==g?.enabled).map(g=>({name:g.name??"",description:g.description??""}));D.length>0&&this.groups.push({label:`Custom (${D.length})`,items:D});const T=t.backendServices.filter(g=>!o.exposedServices.includes(g.name));if(T.length>0){const g=T.map(x=>x.name),h=g.slice(0,3).join(", ");this.excluded.push({name:h+(g.length>3?`, +${g.length-3} more`:""),reason:"not exposed"})}for(const g of l)g.svc.active||this.excluded.push({name:g.name,reason:"service inactive"});for(const g of s)g.svc||this.excluded.push({name:g.name,reason:"no service with this name exists"});for(const g of l)if(g.svc.active)for(const h of Pe(g.svc.kind)){const O=Xe(g.svc,h,i);if("off"===O)this.excluded.push({name:`${g.name} \xb7 ${h.label.toLowerCase()}`,reason:"turned off by you"});else if("part"===O&&("prefixed"===r||"file"===g.svc.kind))for(const x of h.verbs)i.has(z(g.name,x.verb))&&this.excluded.push({name:z(g.name,x.verb),reason:"turned off by you"})}if("merged"===r&&p.length>0)for(const g of J("db"))0===gt(g.verb,o,t.backendServices).on.length&&this.excluded.push({name:g.verb,reason:"turned off in every exposed database"});p.length<2&&this.excluded.push({name:"cross-database aggregators",reason:"served only with two or more databases"});for(const g of Me)i.has(g.verb)&&this.excluded.push({name:g.verb,reason:"turned off by you"});if(p.length>=2)for(const g of Oe)i.has(g.verb)&&this.excluded.push({name:g.verb,reason:"turned off by you"});for(const g of o.customTools??[])(!1===g?.enabled||0===g?.enabled)&&this.excluded.push({name:g.name??"",reason:"turned off by you"});this.total=c.total,this.tokenEstimate=c.tokenEstimate,this.lazyEngaged=c.lazyEngaged,this.lazyAuto="auto"===o.lazyMode}buildSystem(){const t=this.store,o=t.cfg.disabledTools,i=te.filter(r=>!o.has(r.name));this.groups.push({label:`System API (${i.length})`,items:i.map(r=>({name:r.name,description:r.description}))});for(const r of te)o.has(r.name)&&this.excluded.push({name:r.name,reason:"turned off by you"});this.total=i.length,this.tokenEstimate=this.total*an;const c=t.cfg.lazyMode;this.lazyAuto="auto"===c,this.lazyEngaged="always"===c||!0===c||"auto"===c&&this.tokenEstimate>cn}firstResponseItems(){return on.map(t=>({name:t.verb,description:t.description}))}visibleGroups(){return this.lazyEngaged&&"first"===this.view?[{label:`First response \u2014 discovery tools (${on.length})`,items:this.firstResponseItems()}]:this.groups}tokenLabel(){return`~${(this.tokenEstimate/1e3).toFixed(1)}k tokens of definitions`}lazyLabel(){return this.lazyEngaged?this.lazyAuto?"Lazy loading: engaged (auto)":"Lazy loading: engaged":"Lazy loading: not engaged"}copyJson(){const t=this.visibleGroups().flatMap(i=>i.items).map(i=>({name:i.name,description:i.description})),o=JSON.stringify(t,null,2);navigator.clipboard?.writeText(o).catch(()=>{}),this.snackbar.openSnackBar("tools/list JSON copied.","success")}close(){this.dialogRef.close()}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP),e.rXU(b.Vh),e.rXU(se.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-preview"]],standalone:!0,features:[e.aNF],decls:19,vars:8,consts:[["data-testid","mcp-preview-drawer",1,"mcp-preview"],[1,"mcp-preview-head"],["mat-icon-button","","type","button","aria-label","Close",3,"click"],["class","mcp-preview-controls",4,"ngIf"],[1,"mcp-preview-body"],["class","mcp-preview-group",4,"ngFor","ngForOf"],["data-testid","mcp-preview-excluded",1,"mcp-preview-group","mcp-preview-excluded"],["class","mcp-preview-none",4,"ngIf"],["class","mcp-preview-item",4,"ngFor","ngForOf"],[1,"mcp-preview-foot"],[1,"mcp-preview-foot-facts"],["mat-stroked-button","","type","button",3,"click"],[1,"mcp-preview-controls"],[1,"mcp-preview-controls-label"],[3,"ngModel","ngModelChange"],["value","first"],["value","full"],[1,"mcp-preview-group"],[1,"mcp-preview-none"],[1,"mcp-preview-item"],["class","mcp-preview-meta",4,"ngIf"],[1,"mcp-preview-desc"],[1,"mcp-preview-meta"],[1,"mcp-preview-reason"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"h2"),e.EFF(3),e.k0s(),e.j41(4,"button",2),e.bIt("click",function(){return i.close()}),e.EFF(5,"\u2715"),e.k0s()(),e.DNE(6,Zd,8,1,"div",3),e.j41(7,"div",4),e.DNE(8,op,5,3,"section",5),e.j41(9,"section",6)(10,"h3"),e.EFF(11,"Excluded (not served)"),e.k0s(),e.DNE(12,ip,2,0,"p",7),e.DNE(13,ap,5,2,"div",8),e.k0s()(),e.j41(14,"div",9)(15,"span",10),e.EFF(16),e.k0s(),e.j41(17,"button",11),e.bIt("click",function(){return i.copyJson()}),e.EFF(18," Copy tools/list JSON "),e.k0s()()()),2&o&&(e.R7$(3),e.SpI("What an agent sees \u2014 as served at /mcp/",i.store.service.name,""),e.R7$(3),e.Y8G("ngIf",i.lazyEngaged),e.R7$(2),e.Y8G("ngForOf",i.visibleGroups()),e.R7$(4),e.Y8G("ngIf",0===i.excluded.length),e.R7$(1),e.Y8G("ngForOf",i.excluded),e.R7$(3),e.E5c(" ",i.total," tools \xb7 ",i.tokenLabel()," \xb7 ",i.lazyLabel()," "))},dependencies:[m.MD,m.Sq,m.bT,d.YN,d.BC,d.vS,u.Hl,u.$z,u.iY,b.hM,V.Wk,V.VT,V._g],styles:[".mcp-preview[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;min-height:0;font-family:Inter,Helvetica Neue,sans-serif;padding:18px 20px 14px;box-sizing:border-box;background:#fff}.mcp-preview-head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.mcp-preview-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:15.5px;font-weight:700;line-height:1.35}.mcp-preview-controls[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:10px;font-size:13px}.mcp-preview-controls[_ngcontent-%COMP%] .mcp-preview-controls-label[_ngcontent-%COMP%]{font-weight:600}.mcp-preview-body[_ngcontent-%COMP%]{flex:1;overflow-y:auto;margin-top:12px;min-height:0}.mcp-preview-group[_ngcontent-%COMP%]{margin-bottom:18px}.mcp-preview-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;opacity:.7;margin:0 0 6px}.mcp-preview-item[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;padding:3px 0;font-size:13px}.mcp-preview-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:6px;padding:1px 7px}.mcp-preview-item[_ngcontent-%COMP%] .mcp-preview-meta[_ngcontent-%COMP%]{font-size:12px;color:var(--df-accent, #5c5699);font-variant-numeric:tabular-nums}.mcp-preview-item[_ngcontent-%COMP%] .mcp-preview-desc[_ngcontent-%COMP%]{font-size:12px;opacity:.65}.mcp-preview-item[_ngcontent-%COMP%] .mcp-preview-reason[_ngcontent-%COMP%]{font-size:12px;color:#9a6700}.mcp-preview-excluded[_ngcontent-%COMP%]{border-top:1px solid rgba(0,0,0,.08);padding-top:12px}.mcp-preview-excluded[_ngcontent-%COMP%] .mcp-preview-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{opacity:.75}.mcp-preview-none[_ngcontent-%COMP%]{font-size:12.5px;opacity:.6;margin:0}.mcp-preview-foot[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;border-top:1px solid rgba(0,0,0,.08);padding-top:10px}.mcp-preview-foot[_ngcontent-%COMP%] .mcp-preview-foot-facts[_ngcontent-%COMP%]{font-size:12.5px;font-variant-numeric:tabular-nums;opacity:.8}@media (max-width: 700px){.mcp-preview[_ngcontent-%COMP%]{padding:14px 12px 10px}}"]})}}return n})();function rp(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," A name is required. "),e.k0s())}function sp(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," Letters, numbers and underscores only. "),e.k0s())}function lp(n,a){if(1&n&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" A tool named ",t.form.controls.name.value," already exists. Choose another name. ")}}function dp(n,a){if(1&n&&(e.j41(0,"mat-option",23),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t),e.R7$(1),e.JRh(t)}}function pp(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," A URL is required for an API tool. "),e.k0s())}function mp(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," Not valid JSON. "),e.k0s())}function _p(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," Not valid JSON. "),e.k0s())}function gp(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",15)(2,"mat-form-field",16)(3,"mat-label"),e.EFF(4,"Method"),e.k0s(),e.j41(5,"mat-select",17),e.DNE(6,dp,2,2,"mat-option",18),e.k0s()(),e.j41(7,"mat-form-field",19)(8,"mat-label"),e.EFF(9,"URL"),e.k0s(),e.nrm(10,"input",20),e.DNE(11,pp,2,0,"mat-error",9),e.k0s()(),e.j41(12,"mat-form-field",7)(13,"mat-label"),e.EFF(14,"Parameters (JSON, optional)"),e.k0s(),e.nrm(15,"textarea",21),e.DNE(16,mp,2,0,"mat-error",9),e.k0s(),e.j41(17,"mat-form-field",7)(18,"mat-label"),e.EFF(19,"Headers (JSON, optional)"),e.k0s(),e.nrm(20,"textarea",22),e.DNE(21,_p,2,0,"mat-error",9),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(6),e.Y8G("ngForOf",t.methods),e.R7$(5),e.Y8G("ngIf",t.form.controls.url.hasError("required")),e.R7$(5),e.Y8G("ngIf",t.form.controls.parameters.hasError("json")),e.R7$(5),e.Y8G("ngIf",t.form.controls.headers.hasError("json"))}}function fp(n,a){1&n&&(e.j41(0,"mat-error"),e.EFF(1," Function code is required for a function tool. "),e.k0s())}function up(n,a){if(1&n&&(e.j41(0,"mat-form-field",7)(1,"mat-label"),e.EFF(2,"Function code"),e.k0s(),e.nrm(3,"textarea",24),e.DNE(4,fp,2,0,"mat-error",9),e.k0s()),2&n){const t=e.XpG();e.R7$(4),e.Y8G("ngIf",t.form.controls.functionCode.hasError("required"))}}let fn=(()=>{class n{constructor(t,o,i){this.dialogRef=t,this.data=o,this.fb=i,this.methods=["GET","POST","PUT","PATCH","DELETE"],this.takenNames=new Set}ngOnInit(){const t=this.data.tool;this.takenNames=function hp(n,a){const t=new Set;Me.forEach(i=>t.add(i.verb)),Oe.forEach(i=>t.add(i.verb));const o=n.effective().effectiveStyle;for(const i of n.rows())if(i.svc)for(const c of J(i.svc.kind))t.add("db"===i.svc.kind?ft(o,i.svc.name,c.verb):z(i.svc.name,c.verb));for(const i of n.cfg.customTools??[])i?.name&&i.name!==a&&t.add(i.name);return t}(this.data.store,t?.name),this.form=this.fb.group({toolType:[t?.toolType||"api"],name:[t?.name??"",[d.k0.required,d.k0.pattern(/^[a-zA-Z0-9_]+$/),o=>this.takenNames.has(o.value)?{collision:!0}:null]],description:[t?.description??""],httpMethod:[t?.httpMethod||"GET"],url:[t?.url??""],parameters:[this.toJsonText(t?.parameters)],headers:[this.toJsonText(t?.headers)],functionCode:[t?.function??""]})}toJsonText(t){if(null==t||""===t)return"";if("string"==typeof t)return t;try{return JSON.stringify(t,null,2)}catch{return""}}parseJson(t){const o=(t??"").trim();if(!o)return null;try{return JSON.parse(o)}catch{return}}save(){const t=this.form.value,o="api"===t.toolType;this.form.controls.url.setErrors(o&&!(t.url??"").trim()?{required:!0}:null),this.form.controls.functionCode.setErrors(o||(t.functionCode??"").trim()?null:{required:!0});let i=null,c=null;if(o&&(i=this.parseJson(t.parameters),c=this.parseJson(t.headers),this.form.controls.parameters.setErrors(void 0===i?{json:!0}:null),this.form.controls.headers.setErrors(void 0===c?{json:!0}:null)),this.form.markAllAsTouched(),this.form.invalid)return;const r=this.data.tool??{};this.dialogRef.close({...r,toolType:t.toolType,name:t.name,description:t.description??"",httpMethod:o?t.httpMethod:r.httpMethod??"GET",url:o?t.url:r.url??"",parameters:o?i:r.parameters??null,headers:o?c:r.headers??null,function:o?r.function??"":t.functionCode,enabled:!1!==r.enabled&&0!==r.enabled})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP),e.rXU(b.Vh),e.rXU(d.ok))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-custom-tool-dialog"]],standalone:!0,features:[e.aNF],decls:30,vars:8,consts:[["data-testid","mcp-custom-dialog",1,"mcp-ct-dialog"],[3,"formGroup","ngSubmit"],[1,"mcp-ct-type"],[1,"mcp-ct-type-label"],["formControlName","toolType"],["value","api"],["value","function"],["appearance","outline",1,"mcp-ct-field"],["matInput","","formControlName","name","data-testid","mcp-custom-name"],[4,"ngIf"],["matInput","","formControlName","description"],["appearance","outline","class","mcp-ct-field",4,"ngIf"],[1,"mcp-ct-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","submit","data-testid","mcp-custom-save"],[1,"mcp-ct-api-row"],["appearance","outline",1,"mcp-ct-method"],["formControlName","httpMethod"],[3,"value",4,"ngFor","ngForOf"],["appearance","outline",1,"mcp-ct-url"],["matInput","","formControlName","url","placeholder","https://\u2026"],["matInput","","formControlName","parameters","rows","3"],["matInput","","formControlName","headers","rows","3"],[3,"value"],["matInput","","formControlName","functionCode","rows","8"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2),e.k0s(),e.j41(3,"form",1),e.bIt("ngSubmit",function(){return i.save()}),e.j41(4,"div",2)(5,"span",3),e.EFF(6,"Tool type:"),e.k0s(),e.j41(7,"mat-radio-group",4)(8,"mat-radio-button",5),e.EFF(9,"API endpoint"),e.k0s(),e.j41(10,"mat-radio-button",6),e.EFF(11,"Server-side function"),e.k0s()()(),e.j41(12,"mat-form-field",7)(13,"mat-label"),e.EFF(14,"Name"),e.k0s(),e.nrm(15,"input",8),e.DNE(16,rp,2,0,"mat-error",9),e.DNE(17,sp,2,0,"mat-error",9),e.DNE(18,lp,2,1,"mat-error",9),e.k0s(),e.j41(19,"mat-form-field",7)(20,"mat-label"),e.EFF(21,"Description"),e.k0s(),e.nrm(22,"input",10),e.k0s(),e.DNE(23,gp,22,4,"ng-container",9),e.DNE(24,up,5,1,"mat-form-field",11),e.j41(25,"div",12)(26,"button",13),e.bIt("click",function(){return i.dialogRef.close()}),e.EFF(27,"Cancel"),e.k0s(),e.j41(28,"button",14),e.EFF(29),e.k0s()()()()),2&o&&(e.R7$(2),e.JRh(i.data.tool?"Edit custom tool":"Add custom tool"),e.R7$(1),e.Y8G("formGroup",i.form),e.R7$(13),e.Y8G("ngIf",i.form.controls.name.hasError("required")),e.R7$(1),e.Y8G("ngIf",i.form.controls.name.hasError("pattern")),e.R7$(1),e.Y8G("ngIf",i.form.controls.name.hasError("collision")),e.R7$(5),e.Y8G("ngIf","api"===i.form.controls.toolType.value),e.R7$(1),e.Y8G("ngIf","function"===i.form.controls.toolType.value),e.R7$(5),e.SpI(" ",i.data.tool?"Save tool":"Add tool"," "))},dependencies:[m.MD,m.Sq,m.bT,d.X1,d.qT,d.me,d.BC,d.cb,d.j4,d.JD,u.Hl,u.$z,b.hM,y.RG,y.rl,y.nJ,y.TL,E.fS,E.fg,V.Wk,V.VT,V._g,I.Ve,I.VO,Y.wT],styles:[".mcp-ct-dialog[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;min-width:320px;max-width:520px}h2[_ngcontent-%COMP%]{margin:0 0 12px;font-size:16px;font-weight:700}.mcp-ct-type[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px;font-size:13px}.mcp-ct-type-label[_ngcontent-%COMP%]{font-weight:600}.mcp-ct-field[_ngcontent-%COMP%]{width:100%}.mcp-ct-api-row[_ngcontent-%COMP%]{display:flex;gap:10px;flex-wrap:wrap}.mcp-ct-method[_ngcontent-%COMP%]{width:130px}.mcp-ct-url[_ngcontent-%COMP%]{flex:1;min-width:180px}.mcp-ct-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:4px}"]})}}return n})(),bp=(()=>{class n{constructor(t,o){this.dialogRef=t,this.data=o,this.clear=!1}get title(){return 1===this.data.names.length?`Remove ${this.data.names[0]} from this server?`:`Remove ${this.data.names.length} services from this server?`}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP),e.rXU(b.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-remove-dialog"]],standalone:!0,features:[e.aNF],decls:15,vars:7,consts:[[1,"mcp-remove-dialog"],[1,"mcp-remove-choices",3,"ngModel","ngModelChange"],[3,"value"],[1,"mcp-remove-note"],[1,"mcp-remove-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","warn","type","button","data-testid","mcp-remove-confirm",3,"click"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2),e.k0s(),e.j41(3,"mat-radio-group",1),e.bIt("ngModelChange",function(r){return i.clear=r}),e.j41(4,"mat-radio-button",2),e.EFF(5),e.k0s(),e.j41(6,"mat-radio-button",2),e.EFF(7),e.k0s()(),e.j41(8,"p",3),e.EFF(9),e.k0s(),e.j41(10,"div",4)(11,"button",5),e.bIt("click",function(){return i.dialogRef.close()}),e.EFF(12,"Cancel"),e.k0s(),e.j41(13,"button",6),e.bIt("click",function(){return i.dialogRef.close({clear:i.clear})}),e.EFF(14," Remove from server "),e.k0s()()()),2&o&&(e.R7$(2),e.JRh(i.title),e.R7$(1),e.Y8G("ngModel",i.clear),e.R7$(1),e.Y8G("value",!1),e.R7$(1),e.SpI(" ",1===i.data.names.length?"Keep its tool curation (recommended)":"Keep their tool curation (recommended)"," "),e.R7$(1),e.Y8G("value",!0),e.R7$(1),e.SpI(" ",1===i.data.names.length?"Also clear its saved tool settings":"Also clear their saved tool settings"," "),e.R7$(2),e.SpI(" Kept curation restores automatically if you expose ",1===i.data.names.length?"the service":"a service"," again. "))},dependencies:[m.MD,d.YN,d.BC,d.vS,u.Hl,u.$z,b.hM,V.Wk,V.VT,V._g],styles:[".mcp-remove-dialog[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;max-width:420px}h2[_ngcontent-%COMP%]{margin:0 0 10px;font-size:16px;font-weight:700}.mcp-remove-choices[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.mcp-remove-note[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7;margin:8px 0 0}.mcp-remove-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}"]})}}return n})();function vp(n,a){if(1&n&&(e.j41(0,"mat-option",9),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.name),e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function Cp(n,a){if(1&n&&(e.j41(0,"p",10),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.LHq(" Point this entry at ",t.newName," and rename its ",t.keyCount()," saved tool settings (",t.data.oldName,"_* \u2192 ",t.newName,"_*)? ")}}let xp=(()=>{class n{constructor(t,o){this.dialogRef=t,this.data=o,this.newName=void 0}candidates(){return this.data.store.backendServices.filter(t=>!this.data.store.cfg.exposedServices.includes(t.name))}keyCount(){return this.data.store.dormantCurationCount(this.data.oldName)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP),e.rXU(b.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-rename-dialog"]],standalone:!0,features:[e.aNF],decls:16,vars:5,consts:[[1,"mcp-rename-dialog"],[1,"mcp-rename-intro"],["appearance","outline",1,"mcp-rename-field"],["data-testid","mcp-rename-select",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],["class","mcp-rename-preview",4,"ngIf"],[1,"mcp-rename-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-rename-confirm",3,"disabled","click"],[3,"value"],[1,"mcp-rename-preview"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2,"Point this entry at its renamed service"),e.k0s(),e.j41(3,"p",1),e.EFF(4),e.k0s(),e.j41(5,"mat-form-field",2)(6,"mat-label"),e.EFF(7,"Renamed to"),e.k0s(),e.j41(8,"mat-select",3),e.bIt("ngModelChange",function(r){return i.newName=r}),e.DNE(9,vp,2,3,"mat-option",4),e.k0s()(),e.DNE(10,Cp,2,4,"p",5),e.j41(11,"div",6)(12,"button",7),e.bIt("click",function(){return i.dialogRef.close()}),e.EFF(13,"Cancel"),e.k0s(),e.j41(14,"button",8),e.bIt("click",function(){return i.dialogRef.close(i.newName)}),e.EFF(15," Rename entry "),e.k0s()()()),2&o&&(e.R7$(4),e.SpI(" \u201c",i.data.oldName,"\u201d no longer exists on this instance. Pick the service it was renamed to. "),e.R7$(4),e.Y8G("ngModel",i.newName),e.R7$(1),e.Y8G("ngForOf",i.candidates()),e.R7$(1),e.Y8G("ngIf",i.newName),e.R7$(4),e.Y8G("disabled",!i.newName))},dependencies:[m.MD,m.Sq,m.bT,d.YN,d.BC,d.vS,u.Hl,u.$z,b.hM,y.RG,y.rl,y.nJ,I.Ve,I.VO,Y.wT],styles:[".mcp-rename-dialog[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;max-width:440px}h2[_ngcontent-%COMP%]{margin:0 0 8px;font-size:16px;font-weight:700}.mcp-rename-intro[_ngcontent-%COMP%]{font-size:13px;opacity:.8;margin:0 0 12px}.mcp-rename-field[_ngcontent-%COMP%]{width:100%}.mcp-rename-preview[_ngcontent-%COMP%]{font-size:13px;background:#fdf3dc;border:1px solid rgba(154,103,0,.4);border-radius:8px;padding:8px 12px;margin:0 0 4px}.mcp-rename-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}"]})}}return n})();function kp(n,a){1&n&&(e.j41(0,"div",3),e.EFF(1,"Loading services\u2026"),e.k0s())}function yp(n,a){1&n&&(e.j41(0,"div",25),e.EFF(1," \u26a0 This server serves no tools. Agents can connect but can call nothing. "),e.k0s())}function Mp(n,a){1&n&&(e.j41(0,"span",36),e.EFF(1,"\u26a0 writes"),e.k0s())}function Op(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",39)(1,"mat-checkbox",40),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(5);return e.Njj(s.setBareChecked(r.name,i.checked))}),e.j41(2,"code"),e.EFF(3),e.k0s()(),e.j41(4,"span",41),e.EFF(5),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(5);e.R7$(1),e.Y8G("checked",o.bareEnabled(t.name)),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function Pp(n,a){if(1&n&&(e.j41(0,"div",37),e.DNE(1,Op,6,3,"div",38),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngForOf",t.tools)}}function Fp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",29)(1,"div",30)(2,"mat-checkbox",31),e.bIt("change",function(){const c=e.eBV(t).$implicit,r=e.XpG(3);return e.Njj(r.sysToggleGroup(c))}),e.EFF(3),e.k0s(),e.DNE(4,Mp,2,0,"span",32),e.j41(5,"span",33),e.EFF(6),e.k0s()(),e.j41(7,"button",34),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(3);return e.Njj(r.toggleToolsList(c.key))}),e.EFF(8),e.k0s(),e.DNE(9,Pp,2,1,"div",35),e.k0s()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(2),e.Y8G("checked","on"===o.sysGroupState(t))("indeterminate","part"===o.sysGroupState(t)),e.R7$(1),e.Lme(" ",t.label," (",t.tools.length,") "),e.R7$(1),e.Y8G("ngIf",t.warn),e.R7$(2),e.Lme(" ",o.sysGroupOn(t)," of ",t.tools.length," on "),e.R7$(2),e.Lme(" ",o.isToolsListOpen(t.key)?"\u25be":"\u25b8"," Individual tools (",t.tools.length,") "),e.R7$(1),e.Y8G("ngIf",o.isToolsListOpen(t.key))}}function wp(n,a){if(1&n&&(e.qex(0),e.j41(1,"div",26)(2,"h2"),e.EFF(3),e.k0s()(),e.j41(4,"div",27),e.DNE(5,Fp,10,10,"div",28),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(3),e.Lme("System API tools (",t.sysEnabledCount()," of ",t.sysTotal(),")"),e.R7$(2),e.Y8G("ngForOf",t.systemGroups)}}function Dp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",62)(1,"p"),e.EFF(2),e.k0s(),e.j41(3,"div",63)(4,"button",64),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.removeServices([c.name],!0))}),e.EFF(5," Remove from server "),e.k0s(),e.j41(6,"button",64),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.renameOrphan(c.name))}),e.EFF(7," It was renamed\u2026 "),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.BMQ("data-testid","mcp-orphan-row-"+t.name),e.R7$(2),e.JRh(o.orphanText(t.name))}}function Tp(n,a){if(1&n&&(e.j41(0,"section",59)(1,"h2",60),e.EFF(2),e.k0s(),e.DNE(3,Dp,8,2,"div",61),e.k0s()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI("\u26a0 Needs attention (",t.orphanRows().length,")"),e.R7$(1),e.Y8G("ngForOf",t.orphanRows())}}function Sp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",65)(1,"p"),e.EFF(2),e.j41(3,"b"),e.EFF(4,"empty never means every service."),e.k0s()(),e.j41(5,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.openPicker())}),e.EFF(6," Expose services "),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.SpI(" No services exposed. Agents get the ",t.eff().globalTools," global tools and any custom tools \u2014 ")}}function Rp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",66)(1,"input",67),e.bIt("ngModelChange",function(i){e.eBV(t);const c=e.XpG(3);return e.Njj(c.filterText=i)}),e.k0s(),e.j41(2,"button",68),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.setFilterKind("db"))}),e.EFF(3),e.k0s(),e.j41(4,"button",68),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.setFilterKind("file"))}),e.EFF(5),e.k0s(),e.j41(6,"button",69),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.filterModified=!i.filterModified)}),e.EFF(7," Modified only "),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngModel",t.filterText),e.R7$(1),e.AVh("primary","db"===t.filterKind),e.R7$(1),e.SpI(" Databases ",t.rowCountOf("db")," "),e.R7$(1),e.AVh("primary","file"===t.filterKind),e.R7$(1),e.SpI(" Files ",t.rowCountOf("file")," "),e.R7$(1),e.AVh("primary",t.filterModified)}}function Ip(n,a){if(1&n){const t=e.RV6();e.j41(0,"mat-checkbox",94),e.bIt("change",function(){e.eBV(t);const i=e.XpG().$implicit,c=e.XpG(4);return e.Njj(c.toggleSelected(i.name))})("click",function(i){return i.stopPropagation()}),e.k0s()}if(2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("checked",o.isSelected(t.name))}}function Ep(n,a){1&n&&(e.j41(0,"span",95),e.EFF(1," Inactive \u2014 tools not served "),e.k0s())}function $p(n,a){1&n&&(e.j41(0,"span",100),e.EFF(1,"\xb7"),e.k0s())}function Gp(n,a){if(1&n&&(e.qex(0),e.j41(1,"span",96)(2,"span",97),e.EFF(3),e.k0s(),e.j41(4,"span",98),e.EFF(5),e.k0s()(),e.DNE(6,$p,2,0,"span",99),e.bVm()),2&n){const t=a.$implicit,o=a.last,i=e.XpG().$implicit,c=e.XpG(4);e.R7$(1),e.AVh("off","off"===c.groupStateOf(i.svc,t))("part","part"===c.groupStateOf(i.svc,t)),e.R7$(2),e.Lme("","part"===c.groupStateOf(i.svc,t)?"\u25d0 ":"","",t.label,""),e.R7$(2),e.JRh("part"===c.groupStateOf(i.svc,t)?"\u25d0":t.label.charAt(0)),e.R7$(1),e.Y8G("ngIf",!o)}}function jp(n,a){if(1&n&&(e.j41(0,"button",101),e.EFF(1," Copy this selection to\u2026 "),e.k0s()),2&n){e.XpG();const t=e.sdS(43);e.Y8G("matMenuTriggerFor",t)}}function Np(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG().$implicit,s=e.XpG(4);return e.Njj(s.copySelectionTo(r.svc,c))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function Ap(n,a){if(1&n&&(e.j41(0,"p",107),e.EFF(1),e.k0s()),2&n){const t=e.XpG(6);e.R7$(1),e.SpI(" ",t.allOffLine," ")}}function Yp(n,a){if(1&n&&(e.j41(0,"p",108),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.R7$(1),e.SpI(" ",o.mergedCaption(t.svc)," ")}}function Vp(n,a){1&n&&(e.j41(0,"span",36),e.EFF(1,"\u26a0 writes"),e.k0s())}function zp(n,a){1&n&&(e.j41(0,"span",36),e.EFF(1,"\u26a0 executes"),e.k0s())}function Xp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",30)(1,"mat-checkbox",31),e.bIt("change",function(){const c=e.eBV(t).$implicit,r=e.XpG(2).$implicit,s=e.XpG(4);return e.Njj(s.toggleGroup(r.svc,c))}),e.EFF(2),e.k0s(),e.DNE(3,Vp,2,0,"span",32),e.DNE(4,zp,2,0,"span",32),e.j41(5,"span",33),e.EFF(6),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(2).$implicit,i=e.XpG(4);e.R7$(1),e.Y8G("checked","on"===i.groupStateOf(o.svc,t))("indeterminate","part"===i.groupStateOf(o.svc,t)),e.R7$(1),e.E5c(" ",t.label," (",i.groupOnCount(o.svc,t),"/",t.verbs.length,") "),e.R7$(1),e.Y8G("ngIf","writes"===t.warn),e.R7$(1),e.Y8G("ngIf","executes"===t.warn),e.R7$(2),e.Lme(" ",i.groupOnCount(o.svc,t)," of ",t.verbs.length," on ")}}function Bp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",39)(1,"mat-checkbox",40),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(4).$implicit,l=e.XpG(4);return e.Njj(l.setToolChecked(s.svc,r.verb,i.checked))}),e.j41(2,"code"),e.EFF(3),e.k0s()(),e.j41(4,"span",41),e.EFF(5),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(4).$implicit,i=e.XpG(4);e.R7$(1),e.Y8G("checked",i.toolEnabled(o.svc,t.verb)),e.R7$(2),e.JRh(i.emittedName(o.svc,t.verb)),e.R7$(2),e.JRh(t.description)}}function Lp(n,a){if(1&n&&(e.qex(0),e.DNE(1,Bp,6,3,"div",38),e.bVm()),2&n){const t=a.$implicit;e.R7$(1),e.Y8G("ngForOf",t.verbs)}}function Up(n,a){if(1&n&&(e.j41(0,"div",37),e.DNE(1,Lp,2,1,"ng-container",13),e.k0s()),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("ngForOf",o.groupsFor(t.svc))}}function Jp(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(3).$implicit,s=e.XpG(4);return e.Njj(s.copySelectionTo(r.svc,c))}),e.EFF(1),e.k0s()}if(2&n){const t=a.$implicit;e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function qp(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",109),e.EFF(2," Copy this selection to\u2026 "),e.k0s(),e.j41(3,"mat-menu",null,110),e.DNE(5,Jp,2,2,"button",91),e.j41(6,"button",84),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2).$implicit,c=e.XpG(4);return e.Njj(c.copySelectionTo(i.svc,null))}),e.EFF(7," All exposed databases "),e.k0s()(),e.bVm()}if(2&n){const t=e.sdS(4),o=e.XpG(2).$implicit,i=e.XpG(4);e.R7$(1),e.Y8G("matMenuTriggerFor",t),e.R7$(4),e.Y8G("ngForOf",i.copyTargets(o.svc))}}function Kp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",102),e.DNE(1,Ap,2,1,"p",103),e.DNE(2,Yp,2,1,"p",104),e.DNE(3,Xp,7,9,"div",105),e.j41(4,"button",34),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,c=e.XpG(4);return e.Njj(c.toggleToolsList(i.name))}),e.EFF(5),e.k0s(),e.DNE(6,Up,2,1,"div",35),e.j41(7,"div",106)(8,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG().$implicit,c=e.XpG(4);return e.Njj(c.setFull(i.svc))}),e.EFF(9),e.k0s(),e.DNE(10,qp,8,2,"ng-container",2),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("ngIf","zero"===o.accessKind(t.svc)),e.R7$(1),e.Y8G("ngIf",o.showMergedCaption(t.svc)),e.R7$(1),e.Y8G("ngForOf",o.groupsFor(t.svc)),e.R7$(2),e.Lme(" ",o.isToolsListOpen(t.name)?"\u25be":"\u25b8"," Individual tools (",o.verbCount(t.svc),") "),e.R7$(1),e.Y8G("ngIf",o.isToolsListOpen(t.name)),e.R7$(3),e.SpI(" Reset to all ",o.verbCount(t.svc)," "),e.R7$(1),e.Y8G("ngIf","db"===t.svc.kind&&o.copyTargets(t.svc).length>0)}}function Hp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",73)(1,"div",74),e.DNE(2,Ip,1,1,"mat-checkbox",75),e.j41(3,"button",76),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.toggleExpand(c.name))}),e.j41(4,"span",77),e.EFF(5),e.k0s(),e.j41(6,"span",78),e.EFF(7),e.k0s(),e.j41(8,"span",79),e.EFF(9),e.k0s(),e.j41(10,"span",80),e.EFF(11),e.k0s()(),e.DNE(12,Ep,2,0,"span",81),e.j41(13,"button",82),e.bIt("click",function(i){return i.stopPropagation()}),e.EFF(14),e.k0s(),e.j41(15,"mat-menu",null,83)(17,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.setFull(c.svc))}),e.EFF(18," Full access "),e.k0s(),e.j41(19,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.setReadOnly(c.svc))}),e.EFF(20," Read-only "),e.k0s(),e.j41(21,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.expanded.add(c.name))}),e.EFF(22," Choose tools\u2026 "),e.k0s()(),e.j41(23,"span",52),e.EFF(24),e.k0s(),e.j41(25,"span",85),e.DNE(26,Gp,7,8,"ng-container",13),e.k0s(),e.j41(27,"button",86),e.bIt("click",function(i){return i.stopPropagation()}),e.EFF(28," \u22ee "),e.k0s(),e.j41(29,"mat-menu",null,87)(31,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.expanded.add(c.name))}),e.EFF(32," Edit tools "),e.k0s(),e.j41(33,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.setFull(c.svc))}),e.EFF(34," Full access "),e.k0s(),e.j41(35,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.setReadOnly(c.svc))}),e.EFF(36," Read-only "),e.k0s(),e.j41(37,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.setFull(c.svc))}),e.EFF(38," Reset to all "),e.k0s(),e.DNE(39,jp,2,1,"button",88),e.j41(40,"button",89),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.removeServices([c.name]))}),e.EFF(41," Remove from server "),e.k0s()(),e.j41(42,"mat-menu",null,90),e.DNE(44,Np,2,2,"button",91),e.j41(45,"button",84),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.copySelectionTo(c.svc,null))}),e.EFF(46," All exposed databases "),e.k0s()(),e.j41(47,"button",92),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.toggleExpand(c.name))}),e.EFF(48),e.k0s()(),e.DNE(49,Kp,11,8,"div",93),e.k0s()}if(2&n){const t=a.$implicit,o=e.sdS(16),i=e.sdS(30),c=e.XpG(4);e.AVh("inactive",!t.svc.active),e.BMQ("data-testid","mcp-svc-row-"+t.name),e.R7$(2),e.Y8G("ngIf",c.showFilter()),e.R7$(3),e.JRh(c.typeIcon(t.svc.kind)),e.R7$(2),e.JRh(t.svc.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(c.typeBadge(t.svc.kind)),e.R7$(1),e.Y8G("ngIf",!t.svc.active),e.R7$(1),e.AVh("good","full"===c.accessKind(t.svc))("primary","ro"===c.accessKind(t.svc))("warn","zero"===c.accessKind(t.svc)),e.Y8G("matMenuTriggerFor",o),e.BMQ("data-testid","mcp-svc-access-"+t.name),e.R7$(1),e.SpI(" ",c.accessDisplay(t.svc)," "),e.R7$(9),e.BMQ("data-testid","mcp-svc-fraction-"+t.name),e.R7$(1),e.SpI(" ",c.fractionText(t.svc)," "),e.R7$(2),e.Y8G("ngForOf",c.groupsFor(t.svc)),e.R7$(1),e.Y8G("matMenuTriggerFor",i),e.BMQ("data-testid","mcp-svc-menu-"+t.name),e.R7$(12),e.Y8G("ngIf","db"===t.svc.kind&&c.copyTargets(t.svc).length>0),e.R7$(5),e.Y8G("ngForOf",c.copyTargets(t.svc)),e.R7$(3),e.BMQ("aria-expanded",c.isExpanded(t.name)),e.R7$(1),e.SpI(" ",c.isExpanded(t.name)?"\u25be":"\u25b8"," "),e.R7$(1),e.Y8G("ngIf",c.isExpanded(t.name))}}function Qp(n,a){1&n&&(e.j41(0,"p",111),e.EFF(1," No exposed service matches the current filter. "),e.k0s())}function Wp(n,a){if(1&n&&(e.j41(0,"div",70),e.DNE(1,Hp,50,28,"div",71),e.DNE(2,Qp,2,0,"p",72),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.visibleRows()),e.R7$(1),e.Y8G("ngIf",0===t.visibleRows().length)}}function Zp(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",112)(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.bulkReadOnly())}),e.EFF(4,"Read-only"),e.k0s(),e.j41(5,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.bulkFull())}),e.EFF(6,"Full access"),e.k0s(),e.j41(7,"button",64),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.bulkRemove())}),e.EFF(8,"Remove from server"),e.k0s(),e.j41(9,"button",113),e.bIt("click",function(){e.eBV(t);const i=e.XpG(3);return e.Njj(i.clearSelection())}),e.EFF(10,"Clear"),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.SpI("",t.selected.size," selected")}}function em(n,a){1&n&&(e.j41(0,"span",79),e.EFF(1,"Cross-database aggregators"),e.k0s())}function tm(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",39)(1,"mat-checkbox",40),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.setBareChecked(r.tool.verb,i.checked))}),e.j41(2,"code"),e.EFF(3),e.k0s()(),e.DNE(4,em,2,0,"span",114),e.j41(5,"span",41),e.EFF(6),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("checked",o.bareEnabled(t.tool.verb)),e.R7$(2),e.JRh(t.tool.verb),e.R7$(1),e.Y8G("ngIf",t.aggregator),e.R7$(2),e.JRh(t.tool.description)}}function nm(n,a){if(1&n&&(e.j41(0,"div",37),e.DNE(1,tm,7,4,"div",38),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.globalToolList())}}function om(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",117)(1,"mat-slide-toggle",40),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.setCustomEnabled(r,i.checked))}),e.k0s(),e.j41(2,"code"),e.EFF(3),e.k0s(),e.j41(4,"span",79),e.EFF(5),e.k0s(),e.j41(6,"span",41),e.EFF(7),e.k0s(),e.j41(8,"span",118)(9,"button",113),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.editCustomTool(c))}),e.EFF(10,"Edit"),e.k0s(),e.j41(11,"button",113),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(4);return e.Njj(r.deleteCustomTool(c))}),e.EFF(12,"Delete"),e.k0s()()()}if(2&n){const t=a.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("checked",o.customEnabled(t)),e.BMQ("aria-label","Enable "+t.name),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh("function"===t.toolType?"Function":"API"),e.R7$(2),e.JRh(o.customSummary(t))}}function im(n,a){if(1&n&&(e.j41(0,"div",115),e.DNE(1,om,13,5,"div",116),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.customTools())}}function am(n,a){1&n&&(e.j41(0,"p",119),e.EFF(1," No custom tools. Add an API endpoint or server-side function agents can call alongside the catalog above. "),e.k0s())}function cm(n,a){if(1&n){const t=e.RV6();e.DNE(0,Tp,4,2,"section",42),e.j41(1,"div",26)(2,"h2"),e.EFF(3),e.k0s(),e.j41(4,"button",43),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.openPicker())}),e.EFF(5," + Expose services\u2026 "),e.k0s()(),e.DNE(6,Sp,7,1,"div",44),e.DNE(7,Rp,8,9,"div",45),e.DNE(8,Wp,3,2,"div",46),e.DNE(9,Zp,11,1,"div",47),e.j41(10,"section",48)(11,"button",49),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.globalsOpen=!i.globalsOpen)}),e.j41(12,"span",50),e.EFF(13,"Global tools"),e.k0s(),e.j41(14,"span",51),e.EFF(15,"Work across the services exposed above."),e.k0s(),e.j41(16,"span",52),e.EFF(17),e.k0s(),e.j41(18,"span",53),e.EFF(19),e.k0s()(),e.DNE(20,nm,2,1,"div",35),e.k0s(),e.j41(21,"section",54)(22,"div",55)(23,"span",50),e.EFF(24),e.k0s(),e.j41(25,"button",56),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.addCustomTool())}),e.EFF(26," + Add custom tool "),e.k0s()(),e.DNE(27,im,2,1,"div",57),e.DNE(28,am,2,0,"p",58),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("ngIf",t.orphanRows().length>0),e.R7$(3),e.Lme(" Exposed services (",t.serviceRows().length," of ",t.store.backendServices.length,") "),e.R7$(3),e.Y8G("ngIf",0===t.store.cfg.exposedServices.length),e.R7$(1),e.Y8G("ngIf",t.showFilter()),e.R7$(1),e.Y8G("ngIf",t.serviceRows().length>0),e.R7$(1),e.Y8G("ngIf",t.selected.size>0),e.R7$(8),e.JRh(t.globalFractionText()),e.R7$(2),e.JRh(t.globalsOpen?"\u25be":"\u25b8"),e.R7$(1),e.Y8G("ngIf",t.globalsOpen),e.R7$(4),e.SpI("Custom tools (",t.customTools().length,")"),e.R7$(3),e.Y8G("ngIf",t.customTools().length>0),e.R7$(1),e.Y8G("ngIf",0===t.customTools().length)}}function rm(n,a){if(1&n&&(e.j41(0,"li"),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.R7$(1),e.JRh(t)}}function sm(n,a){1&n&&(e.qex(0),e.j41(1,"span",120),e.EFF(2,"Read-only \u2713"),e.k0s(),e.j41(3,"span",121),e.EFF(4,"zero write or execute tools enabled"),e.k0s(),e.bVm())}function lm(n,a){if(1&n){const t=e.RV6();e.j41(0,"span",121),e.EFF(1),e.k0s(),e.j41(2,"button",122),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.makeReadOnly())}),e.EFF(3," Make read-only "),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(1),e.Lme(" ",t.railWriteActive()," write ",1===t.railWriteActive()?"tool":"tools"," active ")}}function dm(n,a){if(1&n&&(e.j41(0,"p",123),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.servingLine())}}function pm(n,a){if(1&n&&(e.j41(0,"li")(1,"code"),e.EFF(2),e.k0s(),e.EFF(3),e.k0s()),2&n){const t=a.$implicit;e.R7$(2),e.JRh(t.verb),e.R7$(1),e.Lme(" \u2192 ",t.on," of ",t.total," ")}}function mm(n,a){if(1&n&&(e.j41(0,"ul"),e.DNE(1,pm,4,3,"li",13),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngForOf",t.reachList())}}function _m(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",124)(1,"button",34),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.railReachOpen=!i.railReachOpen)}),e.EFF(2),e.k0s(),e.DNE(3,mm,2,1,"ul",2),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.railReachOpen?"\u25be":"\u25b8"," Per-tool reach "),e.R7$(1),e.Y8G("ngIf",t.railReachOpen)}}function gm(n,a){if(1&n){const t=e.RV6();e.qex(0),e.DNE(1,yp,2,0,"div",4),e.j41(2,"div",5)(3,"div",6),e.DNE(4,wp,6,3,"ng-container",7),e.DNE(5,cm,29,13,"ng-template",null,8,e.C5r),e.k0s(),e.j41(7,"aside",9)(8,"h2",10),e.EFF(9,"What an agent gets"),e.k0s(),e.j41(10,"p",11)(11,"b"),e.EFF(12),e.k0s(),e.EFF(13," callable tools "),e.k0s(),e.j41(14,"ul",12),e.DNE(15,rm,2,1,"li",13),e.k0s(),e.j41(16,"div",14),e.DNE(17,sm,5,0,"ng-container",7),e.DNE(18,lm,4,2,"ng-template",null,15,e.C5r),e.k0s(),e.DNE(20,dm,2,1,"p",16),e.j41(21,"div",17)(22,"mat-form-field",18)(23,"mat-label"),e.EFF(24,"Preview as"),e.k0s(),e.j41(25,"mat-select",19)(26,"mat-option",20),e.EFF(27,"Server maximum"),e.k0s()(),e.j41(28,"mat-hint"),e.EFF(29,"Role preview arrives with the roles integration."),e.k0s()()(),e.j41(30,"button",21),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openPreview())}),e.EFF(31," Preview what an agent sees "),e.k0s(),e.DNE(32,_m,4,2,"div",22),e.j41(33,"p",23),e.EFF(34," Roles filter further per caller "),e.j41(35,"span",24),e.EFF(36,"\u24d8"),e.k0s()()()(),e.bVm()}if(2&n){const t=e.sdS(6),o=e.sdS(19),i=e.XpG();e.R7$(1),e.Y8G("ngIf",0===i.railTotal()),e.R7$(3),e.Y8G("ngIf",i.store.isSystemMcp)("ngIfElse",t),e.R7$(8),e.JRh(i.railTotal()),e.R7$(3),e.Y8G("ngForOf",i.railBreakdown()),e.R7$(2),e.Y8G("ngIf",i.railReadOnly())("ngIfElse",o),e.R7$(3),e.Y8G("ngIf",i.servingLine()),e.R7$(5),e.Y8G("value","max"),e.R7$(7),e.Y8G("ngIf",i.showReach()),e.R7$(3),e.Y8G("matTooltip",i.precedenceTooltip)}}function un(n){return/^(get_|list_)/.test(n.name)}let um=(()=>{class n{ngOnChanges(t){t.store&&!t.store.firstChange&&(this.expanded.clear(),this.toolsListOpen.clear(),this.selected.clear(),this.globalsOpen=!1,this.railReachOpen=!1,this.filterText="",this.filterKind="all",this.filterModified=!1)}constructor(t,o){this.dialog=t,this.snackbar=o,this.loading=!1,this.precedenceTooltip="1. Exposed services contribute their tools. 2. Minus tools you turn off. 3. Roles filter further per caller at runtime.",this.allOffLine="Agents see this service but can call nothing. Enable tools or remove it.",this.expanded=new Set,this.toolsListOpen=new Set,this.globalsOpen=!1,this.customsOpen=!0,this.railReachOpen=!1,this.filterText="",this.filterKind="all",this.filterModified=!1,this.selected=new Set,this.systemGroups=[{key:"sysread",label:"Read system",warn:!1,tools:te.filter(un)},{key:"sysmod",label:"Modify system",warn:!0,tools:te.filter(i=>!un(i))}]}eff(){return this.store.effective()}railTotal(){return this.store.isSystemMcp?this.sysEnabledCount():this.eff().total}railReadOnly(){return this.store.isSystemMcp?0===this.sysModifyOn():this.eff().readOnly}railWriteActive(){return this.store.isSystemMcp?this.sysModifyOn():this.eff().writeVerbs}serviceRows(){return this.store.rows().filter(t=>!!t.svc)}orphanRows(){return this.store.rows().filter(t=>!t.svc)}showFilter(){return this.serviceRows().length>8}rowCountOf(t){return this.serviceRows().filter(o=>o.svc.kind===t).length}isModified(t){return this.store.dormantCurationCount(t)>0}visibleRows(){let t=this.serviceRows();if(!this.showFilter())return t;const o=this.filterText.trim().toLowerCase();return o&&(t=t.filter(i=>i.name.toLowerCase().includes(o)||i.svc.label.toLowerCase().includes(o))),"all"!==this.filterKind&&(t=t.filter(i=>i.svc.kind===this.filterKind)),this.filterModified&&(t=t.filter(i=>this.isModified(i.name))),t}setFilterKind(t){this.filterKind=this.filterKind===t?"all":t}typeIcon(t){return"db"===t?"\u26c1":"\u{1f5c2}"}typeBadge(t){return"db"===t?"Database":"Files"}isExpanded(t){return this.expanded.has(t)}toggleExpand(t){this.expanded.has(t)?this.expanded.delete(t):this.expanded.add(t)}isToolsListOpen(t){return this.toolsListOpen.has(t)}toggleToolsList(t){this.toolsListOpen.has(t)?this.toolsListOpen.delete(t):this.toolsListOpen.add(t)}accessKind(t){return this.store.access(t).kind}accessDisplay(t){const o=this.store.access(t),i=this.store.fraction(t);switch(o.kind){case"full":return"Full";case"ro":return"Read-only";case"zero":return`0 of ${i.total} \u26a0`;default:return`Custom \u25d0 ${i.on} of ${i.total}`}}fractionText(t){const o=this.store.fraction(t);return`${o.on} of ${o.total}`}setFull(t){this.store.setServiceFull(t)}setReadOnly(t){this.store.setServiceReadOnly(t)}groupsFor(t){return Pe(t.kind)}groupStateOf(t,o){return Xe(t,o,this.store.cfg.disabledTools)}groupOnCount(t,o){return o.verbs.filter(i=>this.store.isToolEnabled(t.name,i.verb)).length}toggleGroup(t,o){const i="on"!==this.groupStateOf(t,o);for(const c of o.verbs)this.store.setTool(t.name,c.verb,i)}toolEnabled(t,o){return this.store.isToolEnabled(t.name,o)}setToolChecked(t,o,i){this.store.setTool(t.name,o,i)}emittedName(t,o){return ft("db"===t.kind?this.eff().effectiveStyle:"prefixed",t.name,o)}verbCount(t){return J(t.kind).length}mergedCaption(t){return`Tools are shared across your databases. Turning one off here removes ${t.name} from that tool's allowed services; turning it off in every database removes the tool.`}showMergedCaption(t){return"db"===t.kind&&"merged"===this.store.cfg.toolStyle}copyTargets(t){return this.serviceRows().map(o=>o.svc).filter(o=>"db"===o.kind&&o.name!==t.name)}copySelectionTo(t,o){const i=o?[o]:this.copyTargets(t);if(0!==i.length){for(const r of i)for(const s of J("db"))this.store.setTool(r.name,s.verb,this.store.isToolEnabled(t.name,s.verb));this.snackbar.openSnackBar(`Copied ${t.name}'s tool selection to ${o?o.name:"all exposed databases"}.`,"success")}}removeServices(t,o=!1){0!==t.length&&this.dialog.open(bp,{data:{names:t,orphan:o},maxWidth:"95vw"}).afterClosed().subscribe(i=>{if(!i)return;for(const r of t)this.store.removeService(r,i.clear);t.forEach(r=>this.selected.delete(r));const c=1===t.length?t[0]:`${t.length} services`;this.snackbar.openSnackBar(i.clear?`Removed ${c} and cleared the saved tool settings.`:`Removed ${c} \u2014 the tool selection is kept and restores if you expose it again.`,"success")})}orphanText(t){return`'${t}' no longer exists on this instance (renamed or deleted). Its ${this.store.dormantCurationCount(t)} saved tool settings are kept.`}renameOrphan(t){this.dialog.open(xp,{data:{store:this.store,oldName:t},maxWidth:"95vw"}).afterClosed().subscribe(o=>{o&&(this.store.renameExposedEntry(t,o),this.snackbar.openSnackBar(`Pointed the entry at ${o} and renamed its saved tool settings.`,"success"))})}openPicker(){this.dialog.open(Wd,{data:{store:this.store},width:"680px",maxWidth:"95vw"}).afterClosed().subscribe(t=>{!t||0===t.names.length||(function Qd(n,a){const t=gn(n,a.names,a.accessTouched),o=a.names.filter(i=>!t.has(i));o.length&&n.exposeServices(o,a.access),t.size&&n.exposeServices([...t],"keep")}(this.store,t),this.snackbar.openSnackBar(`Exposed ${t.names.length} ${1===t.names.length?"service":"services"}.`,"success"))})}isSelected(t){return this.selected.has(t)}toggleSelected(t){this.selected.has(t)?this.selected.delete(t):this.selected.add(t)}selectedServices(){return this.serviceRows().filter(t=>this.selected.has(t.name)).map(t=>t.svc)}bulkReadOnly(){this.selectedServices().forEach(t=>this.store.setServiceReadOnly(t))}bulkFull(){this.selectedServices().forEach(t=>this.store.setServiceFull(t))}bulkRemove(){this.removeServices([...this.selected])}clearSelection(){this.selected.clear()}aggregatorsShown(){return this.eff().dbServices>=2}globalToolList(){const t=Me.map(o=>({tool:o,aggregator:!1}));if(this.aggregatorsShown())for(const o of Oe)t.push({tool:o,aggregator:!0});return t}globalFractionText(){const t=this.globalToolList();return`${t.filter(i=>this.store.isBareToolEnabled(i.tool.verb)).length} of ${t.length}`}bareEnabled(t){return this.store.isBareToolEnabled(t)}setBareChecked(t,o){this.store.setBareTool(t,o)}customTools(){return this.store.cfg.customTools??[]}customEnabled(t){return!1!==t?.enabled&&0!==t?.enabled}setCustomEnabled(t,o){t.enabled=o,this.store.touch()}customSummary(t){return"function"===t?.toolType?t?.description||"Server-side function":`${t?.httpMethod||"GET"} ${t?.url||""}`.trim()}addCustomTool(){this.dialog.open(fn,{data:{store:this.store},width:"560px",maxWidth:"95vw"}).afterClosed().subscribe(t=>{t&&(this.store.cfg.customTools=[...this.customTools(),t],this.store.touch())})}editCustomTool(t){this.dialog.open(fn,{data:{store:this.store,tool:t},width:"560px",maxWidth:"95vw"}).afterClosed().subscribe(o=>{if(!o)return;const i=this.customTools().indexOf(t);i>=0&&(this.store.cfg.customTools=[...this.customTools().slice(0,i),o,...this.customTools().slice(i+1)],this.store.touch())})}deleteCustomTool(t){window.confirm(`Delete custom tool "${t?.name}"?`)&&(this.store.cfg.customTools=this.customTools().filter(i=>i!==t),this.store.touch())}railBreakdown(){if(this.store.isSystemMcp)return[`${this.sysGroupOn(this.systemGroups[0])} read system`,`${this.sysGroupOn(this.systemGroups[1])} modify system`];const t=this.eff(),o=[];return t.dbServices>0&&o.push(`${t.dbTools} database (${"merged"===t.effectiveStyle?"shared set \u2014 ":""}write reaches ${t.writeReachDb} of ${t.dbServices} ${1===t.dbServices?"database":"databases"})`),t.fileServices>0&&o.push(`${t.fileTools} file (${t.fileServices} ${1===t.fileServices?"service":"services"})`),o.push(`${t.globalTools} global`),t.aggregators>0&&o.push(`${t.aggregators} cross-database aggregators`),t.customTools>0&&o.push(`${t.customTools} custom`),o}servingLine(){return this.store.isSystemMcp||!this.eff().lazyEngaged?null:"auto"===this.store.cfg.lazyMode?"Delivered on demand (auto): the catalog exceeds ~8k tokens, so clients first see 4 discovery tools.":"Delivered on demand (always): clients first see 4 discovery tools."}makeReadOnly(){if(this.store.isSystemMcp){const i=this.systemGroups[1].tools.filter(r=>this.store.isBareToolEnabled(r.name));if(!window.confirm(`Turn off all ${i.length} write and execute tools? You can undo until you save.`))return;return void i.forEach(r=>this.store.setBareTool(r.name,!1))}const t=this.eff();window.confirm(`Turn off all ${t.writeVerbs} write and execute tools across ${t.writeReach} ${1===t.writeReach?"service":"services"}? You can undo until you save.`)&&this.store.makeReadOnly()}showReach(){return!this.store.isSystemMcp&&"merged"===this.eff().effectiveStyle&&this.eff().dbServices>0}reachList(){return J("db").map(t=>{const o=gt(t.verb,this.store.cfg,this.store.backendServices);return{verb:t.verb,on:o.on.length,total:o.total}})}openPreview(){this.dialog.open(cp,{data:{store:this.store},position:{top:"0",right:"0"},height:"100vh",width:"560px",maxWidth:"95vw",panelClass:"mcp-preview-pane"})}sysEnabledCount(){return te.filter(t=>this.store.isBareToolEnabled(t.name)).length}sysTotal(){return te.length}sysGroupOn(t){return t.tools.filter(o=>this.store.isBareToolEnabled(o.name)).length}sysGroupState(t){const o=this.sysGroupOn(t);return 0===o?"off":o===t.tools.length?"on":"part"}sysToggleGroup(t){const o="on"!==this.sysGroupState(t);t.tools.forEach(i=>this.store.setBareTool(i.name,o))}sysModifyOn(){return this.sysGroupOn(this.systemGroups[1])}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.bZ),e.rXU(se.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-tools"]],inputs:{store:"store",loading:"loading"},standalone:!0,features:[e.OA$,e.aNF],decls:3,vars:2,consts:[["data-testid","mcp-tools-tab",1,"mcp-tools"],["class","mcp-tools-loading",4,"ngIf"],[4,"ngIf"],[1,"mcp-tools-loading"],["class","mcp-tools-warnbanner",4,"ngIf"],[1,"mcp-tools-layout"],[1,"mcp-tools-main"],[4,"ngIf","ngIfElse"],["mcpMain",""],["data-testid","mcp-rail",1,"mcp-rail"],[1,"mcp-rail-title"],["data-testid","mcp-rail-total",1,"mcp-rail-total"],[1,"mcp-rail-breakdown"],[4,"ngFor","ngForOf"],["data-testid","mcp-rail-readonly",1,"mcp-rail-ro"],["writesActive",""],["class","mcp-rail-serving",4,"ngIf"],[1,"mcp-rail-previewas"],["appearance","outline",1,"mcp-rail-role"],["disabled","",3,"value"],["value","max"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-preview-btn",1,"mcp-rail-preview-btn",3,"click"],["class","mcp-rail-reach",4,"ngIf"],[1,"mcp-rail-roles"],["tabindex","0","aria-label","How access is computed",1,"mcp-info",3,"matTooltip"],[1,"mcp-tools-warnbanner"],[1,"mcp-section-head"],[1,"mcp-card"],["class","mcp-sys-group",4,"ngFor","ngForOf"],[1,"mcp-sys-group"],[1,"mcp-group-row"],[3,"checked","indeterminate","change"],["class","mcp-warn-tag",4,"ngIf"],[1,"mcp-group-count"],["type","button",1,"mcp-linklike",3,"click"],["class","mcp-tool-list",4,"ngIf"],[1,"mcp-warn-tag"],[1,"mcp-tool-list"],["class","mcp-tool-row",4,"ngFor","ngForOf"],[1,"mcp-tool-row"],[3,"checked","change"],[1,"mcp-tool-desc"],["class","mcp-orphans",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-expose-btn",3,"click"],["class","mcp-card mcp-empty",4,"ngIf"],["class","mcp-filter-strip",4,"ngIf"],["class","mcp-card mcp-rows",4,"ngIf"],["class","mcp-bulk-bar","data-testid","mcp-bulk-bar",4,"ngIf"],["data-testid","mcp-global-section",1,"mcp-card","mcp-peer-section"],["type","button",1,"mcp-peer-head",3,"click"],[1,"mcp-peer-title"],[1,"mcp-peer-caption"],[1,"mcp-fraction"],[1,"mcp-row-caret"],["data-testid","mcp-custom-section",1,"mcp-card","mcp-peer-section"],[1,"mcp-peer-head"],["mat-stroked-button","","type","button","data-testid","mcp-custom-add",3,"click"],["class","mcp-custom-list",4,"ngIf"],["class","mcp-tool-desc mcp-custom-empty",4,"ngIf"],[1,"mcp-orphans"],[1,"mcp-orphans-title"],["class","mcp-card mcp-orphan-row",4,"ngFor","ngForOf"],[1,"mcp-card","mcp-orphan-row"],[1,"mcp-orphan-actions"],["mat-stroked-button","","type","button",3,"click"],[1,"mcp-card","mcp-empty"],[1,"mcp-filter-strip"],["type","search","data-testid","mcp-filter-input","placeholder","Filter exposed services\u2026","aria-label","Filter exposed services",1,"mcp-filter-input",3,"ngModel","ngModelChange"],["type","button",1,"mcp-chip","mcp-chip-btn",3,"click"],["type","button","data-testid","mcp-filter-modified",1,"mcp-chip","mcp-chip-btn",3,"click"],[1,"mcp-card","mcp-rows"],["class","mcp-row",3,"inactive",4,"ngFor","ngForOf"],["class","mcp-rows-nomatch",4,"ngIf"],[1,"mcp-row"],[1,"mcp-row-head"],["class","mcp-row-bulk",3,"checked","change","click",4,"ngIf"],["type","button",1,"mcp-row-main",3,"click"],["aria-hidden","true",1,"mcp-row-icon"],[1,"mcp-row-label"],[1,"mcp-chip"],[1,"mcp-chip","mcp-type-badge"],["class","mcp-chip warn",4,"ngIf"],["type","button",1,"mcp-chip","mcp-chip-btn","mcp-access-chip",3,"matMenuTriggerFor","click"],["accessMenu","matMenu"],["mat-menu-item","","type","button",3,"click"],["aria-hidden","true",1,"mcp-cap-strip"],["mat-icon-button","","type","button","aria-label","Service actions",1,"mcp-row-menu-btn",3,"matMenuTriggerFor","click"],["rowMenu","matMenu"],["mat-menu-item","","type","button",3,"matMenuTriggerFor",4,"ngIf"],["mat-menu-item","","type","button",1,"mcp-menu-danger",3,"click"],["copyMenu","matMenu"],["mat-menu-item","","type","button",3,"click",4,"ngFor","ngForOf"],["type","button",1,"mcp-row-caret",3,"click"],["class","mcp-drill",4,"ngIf"],[1,"mcp-row-bulk",3,"checked","change","click"],[1,"mcp-chip","warn"],[1,"mcp-cap"],[1,"mcp-cap-full"],[1,"mcp-cap-init"],["class","mcp-cap-sep",4,"ngIf"],[1,"mcp-cap-sep"],["mat-menu-item","","type","button",3,"matMenuTriggerFor"],[1,"mcp-drill"],["class","mcp-drill-alloff",4,"ngIf"],["class","mcp-drill-caption",4,"ngIf"],["class","mcp-group-row",4,"ngFor","ngForOf"],[1,"mcp-drill-foot"],[1,"mcp-drill-alloff"],[1,"mcp-drill-caption"],["mat-stroked-button","","type","button",3,"matMenuTriggerFor"],["copyMenuFoot","matMenu"],[1,"mcp-rows-nomatch"],["data-testid","mcp-bulk-bar",1,"mcp-bulk-bar"],["mat-button","","type","button",3,"click"],["class","mcp-chip",4,"ngIf"],[1,"mcp-custom-list"],["class","mcp-custom-row",4,"ngFor","ngForOf"],[1,"mcp-custom-row"],[1,"mcp-custom-actions"],[1,"mcp-tool-desc","mcp-custom-empty"],[1,"mcp-chip","good"],[1,"mcp-rail-note"],["mat-stroked-button","","type","button","data-testid","mcp-make-readonly",3,"click"],[1,"mcp-rail-serving"],[1,"mcp-rail-reach"]],template:function(o,i){1&o&&(e.j41(0,"div",0),e.DNE(1,kp,2,0,"div",1),e.DNE(2,gm,37,11,"ng-container",2),e.k0s()),2&o&&(e.R7$(1),e.Y8G("ngIf",i.loading),e.R7$(1),e.Y8G("ngIf",!i.loading))},dependencies:[m.MD,m.Sq,m.bT,d.YN,d.me,d.BC,d.vS,u.Hl,u.$z,u.iY,q.g7,q.So,b.hM,y.RG,y.rl,y.nJ,y.MV,Q.Cn,Q.kk,Q.fb,Q.Cp,I.Ve,I.VO,Y.wT,ae.mV,ae.sG,R.uc,R.oV],styles:['@charset "UTF-8";.mcp-tools[_ngcontent-%COMP%]{font-family:Inter,Helvetica Neue,sans-serif}.mcp-tools-loading[_ngcontent-%COMP%]{padding:32px 0;font-size:13.5px;opacity:.65}.mcp-tools-warnbanner[_ngcontent-%COMP%]{background:#fdf3dc;border:1px solid rgba(154,103,0,.4);color:#9a6700;border-radius:10px;padding:10px 14px;font-size:13px;font-weight:600;margin-bottom:14px}.mcp-tools-layout[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:22px;align-items:start}.mcp-tools-main[_ngcontent-%COMP%]{min-width:0}@media (max-width: 1119px){.mcp-tools-layout[_ngcontent-%COMP%]{grid-template-columns:1fr}}.mcp-card[_ngcontent-%COMP%]{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;margin-bottom:14px}.mcp-section-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 0 10px}.mcp-section-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75;margin:0}.mcp-empty[_ngcontent-%COMP%]{padding:18px 16px}.mcp-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 10px;font-size:13.5px}.mcp-orphans[_ngcontent-%COMP%]{margin-bottom:16px}.mcp-orphans[_ngcontent-%COMP%] .mcp-orphans-title[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#9a6700;margin:0 0 8px}.mcp-orphan-row[_ngcontent-%COMP%]{border-color:#9a670066;background:#fffbf1;padding:12px 16px}.mcp-orphan-row[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 10px;font-size:13.5px}.mcp-orphan-row[_ngcontent-%COMP%] .mcp-orphan-actions[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap}.mcp-filter-strip[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}.mcp-filter-strip[_ngcontent-%COMP%] .mcp-filter-input[_ngcontent-%COMP%]{font:inherit;font-size:13px;padding:7px 12px;border:1px solid rgba(0,0,0,.18);border-radius:8px;min-width:200px;flex:1;max-width:320px}.mcp-filter-strip[_ngcontent-%COMP%] .mcp-filter-input[_ngcontent-%COMP%]:focus{outline:2px solid var(--df-accent, #5c5699);outline-offset:-1px}.mcp-rows[_ngcontent-%COMP%]{overflow:visible}.mcp-row[_ngcontent-%COMP%]{border-top:1px solid rgba(0,0,0,.06);padding:6px 12px}.mcp-row[_ngcontent-%COMP%]:first-child{border-top:none}.mcp-row.inactive[_ngcontent-%COMP%] .mcp-row-head[_ngcontent-%COMP%]{opacity:.55}.mcp-row-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.mcp-row-main[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:8px;flex-wrap:wrap;background:none;border:none;padding:4px 0;cursor:pointer;font:inherit;text-align:left;min-width:0}.mcp-row-main[_ngcontent-%COMP%] .mcp-row-icon[_ngcontent-%COMP%]{font-size:15px;opacity:.7}.mcp-row-main[_ngcontent-%COMP%] .mcp-row-label[_ngcontent-%COMP%]{font-weight:600;font-size:13.5px}.mcp-type-badge[_ngcontent-%COMP%]{opacity:.8}.mcp-fraction[_ngcontent-%COMP%]{font-size:13px;font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap}.mcp-access-chip[_ngcontent-%COMP%]{cursor:pointer}.mcp-cap-strip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;font-size:12px;opacity:.85;flex-wrap:wrap}.mcp-cap-strip[_ngcontent-%COMP%] .mcp-cap.off[_ngcontent-%COMP%]{text-decoration:line-through;opacity:.45}.mcp-cap-strip[_ngcontent-%COMP%] .mcp-cap-sep[_ngcontent-%COMP%]{opacity:.4}.mcp-cap-strip[_ngcontent-%COMP%] .mcp-cap-init[_ngcontent-%COMP%]{display:none}@media (max-width: 1279px){.mcp-cap-strip[_ngcontent-%COMP%] .mcp-cap-full[_ngcontent-%COMP%]{display:none}.mcp-cap-strip[_ngcontent-%COMP%] .mcp-cap-init[_ngcontent-%COMP%]{display:inline;font-weight:600}}.mcp-row-menu-btn[_ngcontent-%COMP%]{font-size:16px;line-height:1}.mcp-row-caret[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:13px;opacity:.7;padding:4px 6px;margin-left:auto}.mcp-menu-danger[_ngcontent-%COMP%]{color:#b3261e}.mcp-drill[_ngcontent-%COMP%]{padding:4px 8px 10px 30px}.mcp-drill[_ngcontent-%COMP%] .mcp-drill-alloff[_ngcontent-%COMP%]{font-size:13px;font-weight:600;color:#9a6700;background:#fdf3dc;border:1px solid rgba(154,103,0,.4);border-radius:8px;padding:7px 11px;margin:4px 0 8px}.mcp-drill[_ngcontent-%COMP%] .mcp-drill-caption[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7;margin:4px 0 8px}.mcp-group-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:1px 0}.mcp-group-row[_ngcontent-%COMP%] .mcp-group-count[_ngcontent-%COMP%]{font-size:12px;opacity:.6;font-variant-numeric:tabular-nums}.mcp-warn-tag[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;color:#9a6700}.mcp-linklike[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:13px;font-weight:600;color:var(--df-accent, #5c5699);padding:6px 0 2px;text-align:left}.mcp-tool-list[_ngcontent-%COMP%]{padding:2px 0 4px 8px}.mcp-tool-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;padding:1px 0}.mcp-tool-row[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px}.mcp-tool-desc[_ngcontent-%COMP%]{font-size:12px;opacity:.6}.mcp-drill-foot[_ngcontent-%COMP%]{display:flex;gap:8px;flex-wrap:wrap;padding-top:8px}.mcp-rows-nomatch[_ngcontent-%COMP%]{padding:14px 16px;font-size:13px;opacity:.65;margin:0}.mcp-bulk-bar[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;background:rgba(92,86,153,.08);border:1px solid rgba(92,86,153,.35);border-radius:10px;padding:8px 14px;margin-bottom:14px;font-size:13px;font-weight:600}.mcp-peer-section[_ngcontent-%COMP%]{padding:10px 14px}.mcp-peer-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;width:100%;background:none;border:none;padding:2px 0;font:inherit;text-align:left}.mcp-peer-head[_ngcontent-%COMP%] .mcp-peer-title[_ngcontent-%COMP%]{font-weight:700;font-size:13.5px}.mcp-peer-head[_ngcontent-%COMP%] .mcp-peer-caption[_ngcontent-%COMP%]{font-size:12px;opacity:.6}.mcp-peer-head[_ngcontent-%COMP%] .mcp-fraction[_ngcontent-%COMP%]{margin-left:auto}button.mcp-peer-head[_ngcontent-%COMP%]{cursor:pointer}.mcp-custom-list[_ngcontent-%COMP%]{margin-top:6px}.mcp-custom-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px solid rgba(0,0,0,.06);padding:5px 0}.mcp-custom-row[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;font-weight:600}.mcp-custom-row[_ngcontent-%COMP%] .mcp-custom-actions[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex;gap:2px}.mcp-custom-empty[_ngcontent-%COMP%]{margin:8px 0 2px}.mcp-sys-group[_ngcontent-%COMP%]{padding:10px 14px;border-top:1px solid rgba(0,0,0,.06)}.mcp-sys-group[_ngcontent-%COMP%]:first-child{border-top:none}.mcp-rail[_ngcontent-%COMP%]{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:14px 16px;position:sticky;top:12px}@media (max-width: 1119px){.mcp-rail[_ngcontent-%COMP%]{position:static}}.mcp-rail-title[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.7;margin:0 0 6px}.mcp-rail-total[_ngcontent-%COMP%]{font-size:15px;margin:0 0 6px}.mcp-rail-total[_ngcontent-%COMP%] b[_ngcontent-%COMP%]{font-size:22px;font-variant-numeric:tabular-nums}.mcp-rail-breakdown[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0 0 12px;font-size:12.5px;opacity:.85}.mcp-rail-breakdown[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:1px 0}.mcp-rail-ro[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.mcp-rail-ro[_ngcontent-%COMP%] .mcp-rail-note[_ngcontent-%COMP%]{font-size:12.5px}.mcp-rail-serving[_ngcontent-%COMP%]{font-size:12px;opacity:.75;background:rgba(0,0,0,.03);border-radius:8px;padding:8px 10px;margin:0 0 12px}.mcp-rail-previewas[_ngcontent-%COMP%]{margin-bottom:4px}.mcp-rail-previewas[_ngcontent-%COMP%] .mcp-rail-role[_ngcontent-%COMP%]{width:100%}.mcp-rail-previewas[_ngcontent-%COMP%] .mcp-rail-role[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper{height:auto}.mcp-rail-previewas[_ngcontent-%COMP%] .mcp-rail-role[_ngcontent-%COMP%] .mat-mdc-form-field-hint-wrapper{position:static}.mcp-rail-preview-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.mcp-rail-reach[_ngcontent-%COMP%]{margin-bottom:8px}.mcp-rail-reach[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style:none;padding:2px 0 0 14px;margin:0;font-size:12px;font-variant-numeric:tabular-nums}.mcp-rail-reach[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:11.5px}.mcp-rail-roles[_ngcontent-%COMP%]{font-size:12.5px;opacity:.8;border-top:1px solid rgba(0,0,0,.08);padding-top:10px;margin:8px 0 0}.mcp-rail-roles[_ngcontent-%COMP%] .mcp-info[_ngcontent-%COMP%]{cursor:help}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid rgba(0,0,0,.14);background:rgba(0,0,0,.02);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:#e7f2e8;border-color:#2e7d3259;color:#2e7d32}.mcp-chip.warn[_ngcontent-%COMP%]{background:#fdf3dc;border-color:#9a670066;color:#9a6700}.mcp-chip.primary[_ngcontent-%COMP%]{background:rgba(92,86,153,.1);border-color:#5c569961;color:var(--df-accent, #5c5699)}.mcp-chip-btn[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:12px;font-weight:600}@media (max-width: 700px){.mcp-row-head[_ngcontent-%COMP%]{row-gap:4px}.mcp-drill[_ngcontent-%COMP%]{padding-left:12px}.mcp-cap-strip[_ngcontent-%COMP%]{display:none}}']})}}return n})();function hm(n,a){if(1&n&&(e.j41(0,"span",9),e.EFF(1),e.k0s()),2&n){const t=a.ngIf;e.R7$(1),e.SpI(" \u2014 from \u201c",t,"\u201d? ")}}function bm(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"mat-checkbox",7),e.bIt("change",function(i){const r=e.eBV(t).$implicit,s=e.XpG();return e.Njj(s.toggle(r,i.checked))}),e.j41(2,"code"),e.EFF(3),e.k0s(),e.DNE(4,hm,2,1,"span",8),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG();e.R7$(1),e.Y8G("checked",o.checked[t]),e.BMQ("data-testid","mcp-orphan-"+t),e.R7$(2),e.JRh(t),e.R7$(1),e.Y8G("ngIf",o.originOf(t))}}const vm=[...tn,...nn].flatMap(n=>n.verbs.map(a=>a.verb)).sort((n,a)=>a.length-n.length);let xm=(()=>{class n{constructor(t,o){this.dialogRef=t,this.data=o,this.checked={};for(const i of o.keys)this.checked[i]=!0}toggle(t,o){this.checked[t]=o}get selected(){return this.data.keys.filter(t=>this.checked[t])}originOf(t){return function Cm(n){for(const a of vm)if(n.endsWith("_"+a)&&n.length>a.length+1)return n.slice(0,n.length-a.length-1);return null}(t)}deleteSelected(){this.dialogRef.close(this.selected)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(b.CP),e.rXU(b.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-housekeeping-dialog"]],standalone:!0,features:[e.aNF],decls:12,vars:2,consts:[["data-testid","mcp-housekeeping-dialog",1,"mcp-hk-dialog"],[1,"mcp-hk-note"],[1,"mcp-hk-list"],[4,"ngFor","ngForOf"],[1,"mcp-hk-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","warn","type","button","data-testid","mcp-housekeeping-delete",3,"disabled","click"],[3,"checked","change"],["class","mcp-hk-origin",4,"ngIf"],[1,"mcp-hk-origin"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"h2"),e.EFF(2,"Review & clean up"),e.k0s(),e.j41(3,"p",1),e.EFF(4," These saved tool settings reference services that no longer exist. Checked entries are deleted; unchecked entries are kept. "),e.k0s(),e.j41(5,"ul",2),e.DNE(6,bm,5,4,"li",3),e.k0s(),e.j41(7,"div",4)(8,"button",5),e.bIt("click",function(){return i.dialogRef.close()}),e.EFF(9," Cancel "),e.k0s(),e.j41(10,"button",6),e.bIt("click",function(){return i.deleteSelected()}),e.EFF(11," Delete selected "),e.k0s()()()),2&o&&(e.R7$(6),e.Y8G("ngForOf",i.data.keys),e.R7$(4),e.Y8G("disabled",0===i.selected.length))},dependencies:[m.MD,m.Sq,m.bT,u.Hl,u.$z,q.g7,q.So,b.hM],styles:[".mcp-hk-dialog[_ngcontent-%COMP%]{padding:18px 20px 14px;font-family:Inter,Helvetica Neue,sans-serif;max-width:460px}h2[_ngcontent-%COMP%]{margin:0 0 8px;font-size:16px;font-weight:700}.mcp-hk-note[_ngcontent-%COMP%]{font-size:13px;opacity:.75;margin:0 0 10px}.mcp-hk-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;max-height:320px;overflow-y:auto}.mcp-hk-list[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:5px;padding:1px 6px;word-break:break-all}.mcp-hk-origin[_ngcontent-%COMP%]{font-size:12px;opacity:.6;margin-left:4px}.mcp-hk-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}"]})}}return n})();function km(n,a){if(1&n&&(e.j41(0,"p",42),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" Renaming changes your endpoint URL to \u2026/mcp/",t.store.draftName,". Connected clients will break until they update. ")}}function ym(n,a){1&n&&(e.j41(0,"p",43),e.EFF(1," This server is inactive \u2014 the endpoint refuses connections. "),e.k0s())}function Mm(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"code"),e.EFF(2),e.k0s(),e.j41(3,"button",44),e.bIt("click",function(){const c=e.eBV(t).index,r=e.XpG();return e.Njj(r.removeRedirect(c))}),e.EFF(4," \xd7 "),e.k0s()()}if(2&n){const t=a.$implicit;e.R7$(2),e.JRh(t),e.R7$(1),e.BMQ("aria-label","Remove "+t)}}function Om(n,a){1&n&&(e.j41(0,"li",45),e.EFF(1," No redirect URIs yet \u2014 OAuth clients that need a callback can't connect until theirs is added. "),e.k0s())}function Pm(n,a){if(1&n&&(e.j41(0,"mat-option",20),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.Y8G("value",t.store.cfg.autoOauthService),e.R7$(1),e.SpI(" ",t.store.cfg.autoOauthService," (not found on this instance) ")}}function Fm(n,a){if(1&n&&(e.j41(0,"mat-option",20),e.EFF(1),e.k0s()),2&n){const t=a.$implicit;e.Y8G("value",t.name),e.R7$(1),e.Lme(" ",t.label," (",t.name,") ")}}function wm(n,a){1&n&&(e.j41(0,"span",52),e.EFF(1," Matches the recommended default. "),e.k0s())}function Dm(n,a){1&n&&(e.j41(0,"span",52),e.EFF(1," Server default (per-service names). "),e.k0s())}function Tm(n,a){1&n&&(e.j41(0,"p",53),e.EFF(1," Style changes rename emitted tools \u2014 preview before saving. Clients may need to reconnect. "),e.k0s())}function Sm(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"h3",10),e.EFF(2,"Tool naming"),e.k0s(),e.j41(3,"mat-radio-group",46),e.bIt("change",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.onToolStyleChange(i))}),e.j41(4,"mat-radio-button",47)(5,"span",48),e.EFF(6," Consolidated (merged) \u2014 one tool per verb with a service argument. Recommended. "),e.k0s(),e.DNE(7,wm,2,0,"span",49),e.k0s(),e.j41(8,"mat-radio-button",50)(9,"span",48),e.EFF(10," Per-service names (prefixed) \u2014 legacy compatibility for clients pinned to names like crm_get_tables. "),e.k0s(),e.DNE(11,Dm,2,0,"span",49),e.k0s()(),e.DNE(12,Tm,2,0,"p",51),e.bVm()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("value",t.toolStyleValue),e.R7$(4),e.Y8G("ngIf","merged"===t.store.cfg.toolStyle),e.R7$(4),e.Y8G("ngIf",null===t.store.cfg.toolStyle),e.R7$(1),e.Y8G("ngIf",t.styleChanged)}}function Rm(n,a){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"p",43),e.EFF(2),e.k0s(),e.j41(3,"button",54),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.openHousekeeping())}),e.EFF(4," Review & clean up "),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(2),e.Lme(" ",t.orphanCount," saved tool ",1===t.orphanCount?"setting references":"settings reference"," services that no longer exist. Nothing is removed automatically \u2014 review before deleting. ")}}function Im(n,a){1&n&&(e.j41(0,"p",23),e.EFF(1,"No orphaned tool settings."),e.k0s())}let Gm=(()=>{class n{ngOnChanges(t){t.store&&!t.store.firstChange&&(this.newRedirectUri="")}constructor(t,o,i,c,r){this.serviceTypeService=t,this.servicesService=o,this.cacheService=i,this.snackbarService=c,this.dialog=r,this.requestDelete=new e.bkB,this.oauthServices=[],this.oauthLoaded=!1,this.newRedirectUri="",this.flushingCache=!1}ngOnInit(){this.loadOauthServices()}loadOauthServices(){(0,le.p)({types:this.serviceTypeService.getAll({fields:"name,group",limit:1e3}),services:this.servicesService.getAll({limit:1e3,fields:"id,name,label,type",sort:"name"})}).subscribe({next:({types:t,services:o})=>{const i=new Set((t?.resource??[]).filter(c=>"OAuth"===c.group).map(c=>c.name));this.oauthServices=(o?.resource??[]).filter(c=>i.has(c.type)).map(c=>({name:c.name,label:c.label||c.name})),this.oauthLoaded=!0},error:()=>{this.oauthLoaded=!0}})}get renamePending(){return this.store.draftName!==this.store.service.name}setName(t){this.store.draftName=t,this.store.touch()}setLabel(t){this.store.draftLabel=t,this.store.touch()}setDescription(t){this.store.draftDescription=t,this.store.touch()}setActive(t){this.store.draftIsActive=t.checked,this.store.touch()}addRedirect(){const t=this.newRedirectUri.trim();if(t){if(this.store.cfg.redirectUris.includes(t))return void this.snackbarService.openSnackBar("That redirect URI is already listed.","warning");this.store.cfg.redirectUris.push(t),this.newRedirectUri="",this.store.touch()}}removeRedirect(t){this.store.cfg.redirectUris.splice(t,1),this.store.touch()}setLoginUrl(t){this.store.cfg.customLoginUrl=t,this.store.touch()}setAutoOauth(t){this.store.cfg.autoOauthService=t,this.store.touch()}get missingAutoOauth(){const t=this.store.cfg.autoOauthService;return!!t&&this.oauthLoaded&&!this.oauthServices.some(o=>o.name===t)}setAllowApiKey(t){this.store.cfg.allowApiKeyAuth=t.checked,this.store.touch()}regenerateSecret(){window.confirm("Clients using the old secret will stop connecting. Regenerate?")&&(this.store.cfg.oauthClientSecret=function $m(){const n=new Uint8Array(32),a=globalThis.crypto;if(a?.getRandomValues)a.getRandomValues(n);else for(let t=0;tt.toString(16).padStart(2,"0")).join("")}(),this.store.touch(),this.snackbarService.openSnackBar("New client secret generated \u2014 save to apply.","success"))}get toolStyleValue(){return"merged"===this.store.cfg.toolStyle?"merged":"prefixed"}onToolStyleChange(t){this.store.cfg.toolStyle="merged"===t.value?"merged":"prefixed",this.store.touch()}get styleChanged(){return this.store.cfg.toolStyle!==this.store.savedCfg.toolStyle}get lazyValue(){const t=this.store.cfg.lazyMode;return!0===t?"always":!1===t?"never":"always"===t||"never"===t?t:"auto"}setLazy(t){this.store.cfg.lazyMode=t,this.store.touch()}get scopeToolsOn(){const t=this.store.cfg.rest??{},o=t.scope_tools??t.scopeTools;return null==o||!!o}get orphanCount(){return this.store.backendLoaded?this.store.orphans().length:0}openHousekeeping(){const t=this.store.orphans();t.length&&this.dialog.open(xm,{data:{keys:t},width:"480px"}).afterClosed().subscribe(o=>{if(o&&0!==o.length){for(const i of o)this.store.cfg.disabledTools.delete(i);this.store.touch(),this.snackbarService.openSnackBar(`Removed ${o.length} saved tool setting${1===o.length?"":"s"} \u2014 save to apply.`,"success")}})}flushCache(){this.flushingCache||(this.flushingCache=!0,this.cacheService.delete(this.store.service.name).subscribe({next:()=>{this.flushingCache=!1,this.snackbarService.openSnackBar("Cache flushed.","success")},error:()=>{this.flushingCache=!1,this.snackbarService.openSnackBar("Cache flush failed.","error")}}))}get fullConfigJson(){const t=rn(this.store.cfg,this.store.service.type);return t.oauthClientSecret&&(t.oauthClientSecret="\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"),JSON.stringify(t,null,2)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(A.zs),e.rXU(A.Z1),e.rXU(A.j8),e.rXU(se.L),e.rXU(b.bZ))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-settings"]],inputs:{store:"store"},outputs:{requestDelete:"requestDelete"},standalone:!0,features:[e.OA$,e.aNF],decls:103,vars:22,consts:[["data-testid","mcp-settings-tab",1,"mcp-settings"],[1,"mcp-card"],[1,"mcp-card-title"],["appearance","outline",1,"mcp-field"],["matInput","","data-testid","mcp-set-name",3,"ngModel","ngModelChange"],["class","mcp-inline-warning","data-testid","mcp-rename-warning",4,"ngIf"],["matInput","","data-testid","mcp-set-label",3,"ngModel","ngModelChange"],["matInput","","rows","3","data-testid","mcp-set-description",3,"ngModel","ngModelChange"],["data-testid","mcp-set-active",3,"checked","change"],["class","mcp-hint warn",4,"ngIf"],[1,"mcp-sub-title"],["data-testid","mcp-redirect-list",1,"mcp-redirect-list"],[4,"ngFor","ngForOf"],["class","mcp-redirect-empty",4,"ngIf"],[1,"mcp-redirect-addrow"],["appearance","outline",1,"mcp-field","grow"],["matInput","","placeholder","https://client.example.com/callback","data-testid","mcp-redirect-add",3,"ngModel","ngModelChange","keyup.enter"],["mat-stroked-button","","type","button","data-testid","mcp-redirect-add-btn",3,"click"],["matInput","","placeholder","https://login.example.com","data-testid","mcp-login-url",3,"ngModel","ngModelChange"],["data-testid","mcp-auto-oauth",3,"value","selectionChange"],[3,"value"],[3,"value",4,"ngIf"],[3,"value",4,"ngFor","ngForOf"],[1,"mcp-hint"],["data-testid","mcp-apikey-toggle",3,"checked","change"],[1,"mcp-regenerate-row"],["mat-stroked-button","","type","button","data-testid","mcp-regenerate-secret",3,"click"],[4,"ngIf"],["data-testid","mcp-lazy-select",3,"value","selectionChange"],["value","auto"],["value","always"],["value","never"],["data-testid","mcp-scope-line",1,"mcp-scope-line"],["data-testid","mcp-housekeeping",1,"mcp-card"],[4,"ngIf","ngIfElse"],["noOrphans",""],[1,"mcp-flush-row"],["mat-stroked-button","","type","button","data-testid","mcp-flush-cache",3,"disabled","click"],["data-testid","mcp-fullconfig",1,"mcp-fullconfig"],[1,"mcp-card","mcp-danger"],[1,"mcp-danger-copy"],["mat-flat-button","","color","warn","type","button","data-testid","mcp-delete-server",3,"click"],["data-testid","mcp-rename-warning",1,"mcp-inline-warning"],[1,"mcp-hint","warn"],["type","button",1,"mcp-x",3,"click"],[1,"mcp-redirect-empty"],[1,"mcp-toolstyle",3,"value","change"],["value","merged","data-testid","mcp-toolstyle-merged"],[1,"mcp-radio-label"],["class","mcp-radio-note",4,"ngIf"],["value","prefixed","data-testid","mcp-toolstyle-prefixed"],["class","mcp-hint warn","data-testid","mcp-toolstyle-note",4,"ngIf"],[1,"mcp-radio-note"],["data-testid","mcp-toolstyle-note",1,"mcp-hint","warn"],["mat-stroked-button","","type","button","data-testid","mcp-housekeeping-review",3,"click"]],template:function(o,i){if(1&o&&(e.j41(0,"div",0)(1,"section",1)(2,"h2",2),e.EFF(3,"Identity"),e.k0s(),e.j41(4,"mat-form-field",3)(5,"mat-label"),e.EFF(6,"Name (namespace)"),e.k0s(),e.j41(7,"input",4),e.bIt("ngModelChange",function(r){return i.setName(r)}),e.k0s()(),e.DNE(8,km,2,1,"p",5),e.j41(9,"mat-form-field",3)(10,"mat-label"),e.EFF(11,"Label"),e.k0s(),e.j41(12,"input",6),e.bIt("ngModelChange",function(r){return i.setLabel(r)}),e.k0s()(),e.j41(13,"mat-form-field",3)(14,"mat-label"),e.EFF(15,"Description"),e.k0s(),e.j41(16,"textarea",7),e.bIt("ngModelChange",function(r){return i.setDescription(r)}),e.k0s()(),e.j41(17,"mat-slide-toggle",8),e.bIt("change",function(r){return i.setActive(r)}),e.EFF(18," Active "),e.k0s(),e.DNE(19,ym,2,0,"p",9),e.k0s(),e.j41(20,"section",1)(21,"h2",2),e.EFF(22,"Authentication"),e.k0s(),e.j41(23,"h3",10),e.EFF(24,"Redirect URIs"),e.k0s(),e.j41(25,"ul",11),e.DNE(26,Mm,5,2,"li",12),e.DNE(27,Om,2,0,"li",13),e.k0s(),e.j41(28,"div",14)(29,"mat-form-field",15)(30,"mat-label"),e.EFF(31,"Add redirect URI"),e.k0s(),e.j41(32,"input",16),e.bIt("ngModelChange",function(r){return i.newRedirectUri=r})("keyup.enter",function(){return i.addRedirect()}),e.k0s()(),e.j41(33,"button",17),e.bIt("click",function(){return i.addRedirect()}),e.EFF(34," Add "),e.k0s()(),e.j41(35,"mat-form-field",3)(36,"mat-label"),e.EFF(37,"Custom login URL"),e.k0s(),e.j41(38,"input",18),e.bIt("ngModelChange",function(r){return i.setLoginUrl(r)}),e.k0s()(),e.j41(39,"mat-form-field",3)(40,"mat-label"),e.EFF(41,"Auto OAuth service"),e.k0s(),e.j41(42,"mat-select",19),e.bIt("selectionChange",function(r){return i.setAutoOauth(r.value)}),e.j41(43,"mat-option",20),e.EFF(44,"None"),e.k0s(),e.DNE(45,Pm,2,2,"mat-option",21),e.DNE(46,Fm,2,3,"mat-option",22),e.k0s()(),e.j41(47,"p",23),e.EFF(48," Sign-ins are sent straight to this OAuth provider instead of the DreamFactory login form. "),e.k0s(),e.j41(49,"mat-slide-toggle",24),e.bIt("change",function(r){return i.setAllowApiKey(r)}),e.EFF(50," Allow API-key authentication "),e.k0s(),e.j41(51,"p",23),e.EFF(52," Anyone with the URL and a valid API key connects without a login prompt. The key's role decides which tools it can use. "),e.k0s(),e.j41(53,"div",25)(54,"button",26),e.bIt("click",function(){return i.regenerateSecret()}),e.EFF(55," Regenerate client secret\u2026 "),e.k0s(),e.j41(56,"span",23),e.EFF(57," Clients using the old secret will stop connecting. "),e.k0s()()(),e.j41(58,"section",1)(59,"h2",2),e.EFF(60,"Serving"),e.k0s(),e.DNE(61,Sm,13,4,"ng-container",27),e.j41(62,"h3",10),e.EFF(63,"Catalog delivery"),e.k0s(),e.j41(64,"mat-form-field",3)(65,"mat-label"),e.EFF(66,"Catalog delivery"),e.k0s(),e.j41(67,"mat-select",28),e.bIt("selectionChange",function(r){return i.setLazy(r.value)}),e.j41(68,"mat-option",29),e.EFF(69,"Auto \u2014 recommended"),e.k0s(),e.j41(70,"mat-option",30),e.EFF(71,"Always on-demand"),e.k0s(),e.j41(72,"mat-option",31),e.EFF(73,"Never"),e.k0s()()(),e.j41(74,"p",23),e.EFF(75," When tool definitions exceed ~8k tokens, agents first receive discovery tools instead of the full catalog. "),e.k0s(),e.j41(76,"p",32),e.EFF(77),e.k0s()(),e.j41(78,"section",33)(79,"h2",2),e.EFF(80,"Housekeeping"),e.k0s(),e.DNE(81,Rm,5,2,"ng-container",34),e.DNE(82,Im,2,0,"ng-template",null,35,e.C5r),e.j41(84,"div",36)(85,"button",37),e.bIt("click",function(){return i.flushCache()}),e.EFF(86," Flush cache now "),e.k0s(),e.j41(87,"span",23),e.EFF(88," Saves flush the cache automatically \u2014 this one is for support. "),e.k0s()()(),e.j41(89,"section",1)(90,"h2",2),e.EFF(91,"Full configuration"),e.k0s(),e.j41(92,"p",23),e.EFF(93," The stored config, read-only \u2014 what the audit sees is what you see. "),e.k0s(),e.j41(94,"pre",38),e.EFF(95),e.k0s()(),e.j41(96,"section",39)(97,"h2",2),e.EFF(98,"Danger zone"),e.k0s(),e.j41(99,"p",40),e.EFF(100," Delete this MCP server. Clients lose access immediately. "),e.k0s(),e.j41(101,"button",41),e.bIt("click",function(){return i.requestDelete.emit()}),e.EFF(102," Delete server\u2026 "),e.k0s()()()),2&o){const c=e.sdS(83);e.R7$(7),e.Y8G("ngModel",i.store.draftName),e.R7$(1),e.Y8G("ngIf",i.renamePending),e.R7$(4),e.Y8G("ngModel",i.store.draftLabel),e.R7$(4),e.Y8G("ngModel",i.store.draftDescription),e.R7$(1),e.Y8G("checked",i.store.draftIsActive),e.R7$(2),e.Y8G("ngIf",!i.store.draftIsActive),e.R7$(7),e.Y8G("ngForOf",i.store.cfg.redirectUris),e.R7$(1),e.Y8G("ngIf",0===i.store.cfg.redirectUris.length),e.R7$(5),e.Y8G("ngModel",i.newRedirectUri),e.R7$(6),e.Y8G("ngModel",i.store.cfg.customLoginUrl),e.R7$(4),e.Y8G("value",i.store.cfg.autoOauthService),e.R7$(1),e.Y8G("value",null),e.R7$(2),e.Y8G("ngIf",i.missingAutoOauth),e.R7$(1),e.Y8G("ngForOf",i.oauthServices),e.R7$(3),e.Y8G("checked",i.store.cfg.allowApiKeyAuth),e.R7$(12),e.Y8G("ngIf",!i.store.isSystemMcp),e.R7$(6),e.Y8G("value",i.lazyValue),e.R7$(10),e.SpI(" Scope tools to caller's role: ",i.scopeToolsOn?"on":"off"," \u2014 set by MCP_SCOPE_TOOLS on the server. "),e.R7$(4),e.Y8G("ngIf",i.orphanCount>0)("ngIfElse",c),e.R7$(4),e.Y8G("disabled",i.flushingCache),e.R7$(10),e.JRh(i.fullConfigJson)}},dependencies:[m.MD,m.Sq,m.bT,d.YN,d.me,d.BC,d.vS,u.Hl,u.$z,b.hM,y.RG,y.rl,y.nJ,E.fS,E.fg,V.Wk,V.VT,V._g,I.Ve,I.VO,Y.wT,ae.mV,ae.sG,R.uc],styles:[".mcp-settings[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:14px;max-width:760px}.mcp-card[_ngcontent-%COMP%]{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:16px 18px}.mcp-card[_ngcontent-%COMP%] .mcp-card-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;font-size:14.5px;font-weight:700;margin:0 0 12px}.mcp-sub-title[_ngcontent-%COMP%]{font-size:12.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.6;margin:14px 0 8px}.mcp-sub-title[_ngcontent-%COMP%]:first-of-type{margin-top:0}.mcp-field[_ngcontent-%COMP%]{display:block;width:100%}.mcp-hint[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7;margin:2px 0 12px}.mcp-hint.warn[_ngcontent-%COMP%]{color:#9a6700;opacity:1;font-weight:500}.mcp-inline-warning[_ngcontent-%COMP%]{background:#fdf3dc;border:1px solid rgba(154,103,0,.4);color:#9a6700;border-radius:8px;padding:8px 12px;font-size:13px;font-weight:500;margin:-6px 0 14px}.mcp-redirect-list[_ngcontent-%COMP%]{list-style:none;margin:0 0 8px;padding:0;display:flex;flex-direction:column;gap:6px}.mcp-redirect-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.mcp-redirect-list[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:12.5px;background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:6px;padding:3px 8px;word-break:break-all}.mcp-redirect-list[_ngcontent-%COMP%] .mcp-redirect-empty[_ngcontent-%COMP%]{font-size:12.5px;opacity:.7}.mcp-x[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;font-size:17px;line-height:1;padding:2px 6px;border-radius:6px;color:inherit;opacity:.6}.mcp-x[_ngcontent-%COMP%]:hover{opacity:1;background:rgba(0,0,0,.05)}.mcp-redirect-addrow[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:10px}.mcp-redirect-addrow[_ngcontent-%COMP%] .grow[_ngcontent-%COMP%]{flex:1}.mcp-redirect-addrow[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:6px}.mcp-regenerate-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:4px}.mcp-regenerate-row[_ngcontent-%COMP%] .mcp-hint[_ngcontent-%COMP%]{margin:0}.mcp-toolstyle[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px;margin-bottom:4px}.mcp-toolstyle[_ngcontent-%COMP%] .mcp-radio-label[_ngcontent-%COMP%]{display:block;font-size:13.5px;white-space:normal;line-height:1.45}.mcp-toolstyle[_ngcontent-%COMP%] .mcp-radio-note[_ngcontent-%COMP%]{display:block;font-size:12px;font-weight:600;color:var(--df-accent, #5c5699);margin-top:2px}.mcp-scope-line[_ngcontent-%COMP%]{font-size:13px;opacity:.8;margin:4px 0 0}.mcp-flush-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}.mcp-flush-row[_ngcontent-%COMP%] .mcp-hint[_ngcontent-%COMP%]{margin:0}.mcp-fullconfig[_ngcontent-%COMP%]{margin:0;background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:8px;padding:12px 14px;font-size:12px;line-height:1.55;overflow:auto;max-height:420px}.mcp-danger[_ngcontent-%COMP%]{background:#fdf0ef;border-color:#d32f2f59}.mcp-danger[_ngcontent-%COMP%] .mcp-danger-copy[_ngcontent-%COMP%]{font-size:13.5px;margin:0 0 10px}@media (max-width: 700px){.mcp-card[_ngcontent-%COMP%]{padding:14px}.mcp-redirect-addrow[_ngcontent-%COMP%]{flex-direction:column;align-items:stretch}.mcp-redirect-addrow[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:0}}"]})}}return n})();function jm(n,a){1&n&&(e.j41(0,"span",19),e.EFF(1," \u26a0 Serves no tools "),e.k0s())}function Nm(n,a){if(1&n){const t=e.RV6();e.j41(0,"df-mcp-connect",20),e.bIt("goToTab",function(i){e.eBV(t);const c=e.XpG(2);return e.Njj(c.setTab(i))}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("store",t.store)("mcpUrl",t.mcpUrl)}}function Am(n,a){if(1&n&&e.nrm(0,"df-mcp-tools",21),2&n){const t=e.XpG(2);e.Y8G("store",t.store)("loading",t.loading)}}function Ym(n,a){if(1&n){const t=e.RV6();e.j41(0,"df-mcp-settings",22),e.bIt("requestDelete",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.deleteServer())}),e.k0s()}if(2&n){const t=e.XpG(2);e.Y8G("store",t.store)}}function Vm(n,a){if(1&n&&(e.qex(0),e.EFF(1," \xb7 "),e.j41(2,"b"),e.EFF(3),e.k0s(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(3),e.Lme("",t.store.savedTotalTools()," \u2192 ",t.store.totalTools()," tools")}}function zm(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",23)(1,"div",24)(2,"span"),e.EFF(3," Unsaved changes "),e.DNE(4,Vm,4,2,"ng-container",25),e.k0s(),e.j41(5,"button",26),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.discard())}),e.EFF(6," Discard "),e.k0s(),e.j41(7,"button",27),e.bIt("click",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.save())}),e.EFF(8),e.k0s()()()}if(2&n){const t=e.XpG(2);e.R7$(4),e.Y8G("ngIf",t.store.savedTotalTools()!==t.store.totalTools()),e.R7$(3),e.Y8G("disabled",t.saving),e.R7$(1),e.SpI(" ",t.saving?"Saving\u2026":"Save"," ")}}function Xm(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",1)(1,"header",2)(2,"div",3)(3,"h1"),e.EFF(4),e.k0s(),e.j41(5,"span",4),e.EFF(6),e.k0s(),e.j41(7,"button",5),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setTab("tools"))}),e.EFF(8),e.k0s(),e.DNE(9,jm,2,0,"span",6),e.k0s(),e.j41(10,"div",7)(11,"code",8),e.EFF(12),e.k0s(),e.j41(13,"button",9),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.copyUrl())}),e.EFF(14," Copy "),e.k0s(),e.j41(15,"span",10),e.EFF(16),e.k0s()(),e.j41(17,"nav",11)(18,"button",12),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setTab("connect"))}),e.EFF(19," Connect "),e.k0s(),e.j41(20,"button",13),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setTab("tools"))}),e.EFF(21),e.k0s(),e.j41(22,"button",14),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setTab("settings"))}),e.EFF(23," Settings "),e.k0s()()(),e.DNE(24,Nm,1,2,"df-mcp-connect",15),e.DNE(25,Am,1,2,"df-mcp-tools",16),e.DNE(26,Ym,1,1,"df-mcp-settings",17),e.DNE(27,zm,9,3,"div",18),e.k0s()}if(2&n){const t=e.XpG();e.R7$(4),e.JRh(t.store.draftLabel||t.store.service.name),e.R7$(1),e.AVh("good",t.store.service.isActive)("warn",!t.store.service.isActive),e.R7$(1),e.SpI(" ",t.store.service.isActive?"\u25cf Active":"Inactive \u2014 endpoint refuses connections"," "),e.R7$(2),e.SpI(" ",t.store.totalTools()," tools live "),e.R7$(1),e.Y8G("ngIf",0===t.store.totalTools()),e.R7$(3),e.JRh(t.mcpUrl),e.R7$(4),e.SpI(" OAuth 2.1",t.store.cfg.allowApiKeyAuth?" \xb7 API key":""," \xb7 Streamable HTTP "),e.R7$(2),e.AVh("on","connect"===t.tab),e.BMQ("aria-selected","connect"===t.tab),e.R7$(2),e.AVh("on","tools"===t.tab),e.BMQ("aria-selected","tools"===t.tab),e.R7$(1),e.SpI(" Tools \xb7 ",t.store.totalTools()," "),e.R7$(1),e.AVh("on","settings"===t.tab),e.BMQ("aria-selected","settings"===t.tab),e.R7$(2),e.Y8G("ngIf","connect"===t.tab),e.R7$(1),e.Y8G("ngIf","tools"===t.tab),e.R7$(1),e.Y8G("ngIf","settings"===t.tab),e.R7$(1),e.Y8G("ngIf",t.store.dirty())}}let bt=class Ft{constructor(a,t,o,i,c,r){this.activatedRoute=a,this.router=t,this.servicesService=o,this.serviceTypeService=i,this.cacheService=c,this.snackbarService=r,this.store=new pn,this.tab="connect",this.loading=!0,this.saving=!1}ngOnInit(){this.routeSub=this.activatedRoute.data.subscribe(()=>this.initFromRoute())}initFromRoute(){const a=this.activatedRoute.snapshot.data.data,t=this.activatedRoute.snapshot.queryParamMap,o="system_mcp"===a?.type?"system_mcp":"mcp";this.sub?.unsubscribe(),this.store=new pn,this.sub=this.store.changes.subscribe(()=>{}),this.store.init({id:a?.id,name:a?.name??"",label:a?.label||a?.name||"",description:a?.description??"",isActive:a?.isActive??!0,type:o,raw:a},a?.config??{}),this.store.created="1"===t.get("created"),this.saving=!1,this.tab="connect";const i=t.get("tab");i&&["connect","tools","settings"].includes(i)&&(this.tab=i),this.snackbarService.setPageLabel(this.router.url,this.store.service.label||this.store.service.name),this.loading=!0,this.loadBackendServices()}ngOnDestroy(){this.sub?.unsubscribe(),this.routeSub?.unsubscribe()}loadBackendServices(){(0,le.p)({types:this.serviceTypeService.getAll({fields:"name,group",limit:1e3}),services:this.servicesService.getAll({limit:1e3,fields:"id,name,label,type,is_active",sort:"name"})}).subscribe({next:({types:a,services:t})=>{const o={};for(const i of a?.resource??[])o[i.name]=i.group;this.store.backendServices=sn(t?.resource??[],o),this.store.backendLoaded=!0,this.loading=!1,this.store.touch()},error:()=>{this.store.backendLoaded=!0,this.loading=!1,this.store.touch()}})}get mcpUrl(){return`${window.location.origin}/mcp/${this.store.service.name}`}copyUrl(){navigator.clipboard?.writeText(this.mcpUrl).catch(()=>{}),this.store.copiedUrl=!0,this.snackbarService.openSnackBar("Endpoint URL copied.","success")}setTab(a){this.tab=a}save(){if(this.saving||!this.store.dirty())return;const a=this.store,t=a.savedTotalTools(),o=a.draftName!==a.service.name,i=a.connectionAffecting();if(o&&!window.confirm(`Renaming changes your endpoint URL to \u2026/mcp/${a.draftName}. Connected clients will break until they update. Rename?`))return;this.saving=!0;const c={...a.service.raw,id:a.service.id,name:a.draftName,label:a.draftLabel,description:a.draftDescription,isActive:a.draftIsActive,type:a.service.type,config:rn(a.cfg,a.service.type)};delete c.serviceDocByServiceId,this.servicesService.update(a.service.id,c).subscribe({next:()=>{this.saving=!1,a.markSaved(),this.cacheService.delete(a.service.name).subscribe({next:()=>{},error:()=>{}});const r=a.totalTools();0===r?this.snackbarService.openSnackBar("Saved \u2014 this server serves no tools. Agents can connect but can call nothing.","warning"):this.snackbarService.openSnackBar(r!==t?`Saved \u2014 ${r} tools live (was ${t}).`:"Saved.","success"),i&&(a.reconnectBanner=!0),a.touch()},error:r=>{this.saving=!1,this.snackbarService.openSnackBar(r?.error?.error?.message??"Save failed.","error")}})}discard(){this.store.discard()}deleteServer(){const a=this.store;window.prompt(`Delete this MCP server? Clients lose access immediately.\nType the server name (${a.service.name}) to confirm:`)===a.service.name&&this.servicesService.delete(a.service.id).subscribe({next:()=>{this.snackbarService.openSnackBar("Server deleted.","success"),this.router.navigate(["../"],{relativeTo:this.activatedRoute})},error:()=>this.snackbarService.openSnackBar("Delete failed.","error")})}static{this.\u0275fac=function(t){return new(t||Ft)(e.rXU(G.nX),e.rXU(G.Ix),e.rXU(A.Z1),e.rXU(A.zs),e.rXU(A.j8),e.rXU(se.L))}}static{this.\u0275cmp=e.VBU({type:Ft,selectors:[["df-mcp-details"]],standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","mcp-page",4,"ngIf"],[1,"mcp-page"],[1,"mcp-head"],[1,"mcp-head-row"],[1,"mcp-chip"],["type","button","matTooltip","Open the Tools tab",1,"mcp-chip","primary","mcp-chip-btn",3,"click"],["class","mcp-chip warn",4,"ngIf"],[1,"mcp-head-url"],["data-testid","mcp-endpoint-url"],["mat-stroked-button","","type","button","data-testid","mcp-copy-url",3,"click"],[1,"mcp-head-auth"],["role","tablist",1,"mcp-tabs"],["type","button","role","tab","data-testid","mcp-tab-connect",1,"mcp-tab",3,"click"],["type","button","role","tab","data-testid","mcp-tab-tools",1,"mcp-tab",3,"click"],["type","button","role","tab","data-testid","mcp-tab-settings",1,"mcp-tab",3,"click"],[3,"store","mcpUrl","goToTab",4,"ngIf"],[3,"store","loading",4,"ngIf"],[3,"store","requestDelete",4,"ngIf"],["class","mcp-dirty-bar","data-testid","mcp-dirty-bar",4,"ngIf"],[1,"mcp-chip","warn"],[3,"store","mcpUrl","goToTab"],[3,"store","loading"],[3,"store","requestDelete"],["data-testid","mcp-dirty-bar",1,"mcp-dirty-bar"],[1,"mcp-dirty-inner"],[4,"ngIf"],["mat-button","","type","button","data-testid","mcp-discard",1,"mcp-dirty-discard",3,"click"],["mat-flat-button","","type","button","data-testid","mcp-save",1,"mcp-dirty-save",3,"disabled","click"]],template:function(t,o){1&t&&e.DNE(0,Xm,28,24,"div",0),2&t&&e.Y8G("ngIf",o.store.service)},dependencies:[m.MD,m.bT,u.Hl,u.$z,L.m_,R.uc,R.oV,$d,um,Gm],styles:[".mcp-page[_ngcontent-%COMP%]{position:relative;padding-bottom:72px}.mcp-head[_ngcontent-%COMP%]{margin-bottom:4px}.mcp-head[_ngcontent-%COMP%] .mcp-head-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.mcp-head[_ngcontent-%COMP%] .mcp-head-row[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:21px;font-weight:700;margin:0}.mcp-head[_ngcontent-%COMP%] .mcp-head-url[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:8px}.mcp-head[_ngcontent-%COMP%] .mcp-head-url[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:13px;background:rgba(0,0,0,.035);border:1px solid rgba(0,0,0,.08);border-radius:7px;padding:4px 10px;overflow-x:auto;max-width:100%}.mcp-head[_ngcontent-%COMP%] .mcp-head-url[_ngcontent-%COMP%] .mcp-head-auth[_ngcontent-%COMP%]{font-size:12.5px;opacity:.65}.mcp-tabs[_ngcontent-%COMP%]{display:flex;gap:2px;border-bottom:1px solid rgba(0,0,0,.12);margin:14px 0 18px}.mcp-tabs[_ngcontent-%COMP%] .mcp-tab[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font:inherit;padding:9px 16px;font-weight:600;font-size:13.5px;opacity:.65;border-bottom:2.5px solid transparent;margin-bottom:-1px}.mcp-tabs[_ngcontent-%COMP%] .mcp-tab.on[_ngcontent-%COMP%]{opacity:1;color:var(--df-accent, #5c5699);border-bottom-color:var(--df-accent, #5c5699)}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid rgba(0,0,0,.14);background:rgba(0,0,0,.02);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:#e7f2e8;border-color:#2e7d3259;color:#2e7d32}.mcp-chip.warn[_ngcontent-%COMP%]{background:#fdf3dc;border-color:#9a670066;color:#9a6700}.mcp-chip.primary[_ngcontent-%COMP%]{background:rgba(92,86,153,.1);border-color:#5c569961;color:var(--df-accent, #5c5699)}.mcp-chip-btn[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:12px;font-weight:600}.mcp-dirty-bar[_ngcontent-%COMP%]{position:fixed;left:0;right:0;bottom:0;z-index:30;display:flex;justify-content:center;padding:0 16px 14px;pointer-events:none}.mcp-dirty-bar[_ngcontent-%COMP%] .mcp-dirty-inner[_ngcontent-%COMP%]{pointer-events:auto;display:flex;align-items:center;gap:14px;background:#0f0761;color:#fff;border-radius:12px;padding:8px 12px 8px 18px;box-shadow:0 6px 24px #14122840;font-size:13.5px;flex-wrap:wrap}.mcp-dirty-bar[_ngcontent-%COMP%] .mcp-dirty-discard[_ngcontent-%COMP%]{color:#cfcbe8}.mcp-dirty-bar[_ngcontent-%COMP%] .mcp-dirty-save[_ngcontent-%COMP%]{background:#fff;color:#0f0761}@media (max-width: 700px){.mcp-head[_ngcontent-%COMP%] .mcp-head-row[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px}}"]})}};function Bm(n,a){if(1&n&&(e.j41(0,"p",30),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" A service named ",t.name," already exists. ")}}function Lm(n,a){1&n&&(e.j41(0,"p",30),e.EFF(1," Name is required. "),e.k0s())}function Um(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",31),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.showDescription=!0)}),e.EFF(1," + Add description "),e.k0s()}}function Jm(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",11)(1,"label",32),e.EFF(2,"Description"),e.k0s(),e.j41(3,"textarea",33),e.bIt("input",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.onDescriptionInput(i))}),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("value",t.description)}}function qm(n,a){if(1&n){const t=e.RV6();e.j41(0,"button",59),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(2);return e.Njj(r.pickClone(c))}),e.EFF(1),e.j41(2,"span",60),e.EFF(3),e.k0s()()}if(2&n){const t=a.$implicit;e.R7$(1),e.SpI(" ",t.label,"\xa0"),e.R7$(2),e.SpI("(",t.name,")")}}function Km(n,a){1&n&&(e.j41(0,"button",61),e.EFF(1," No other MCP servers yet "),e.k0s())}function Hm(n,a){if(1&n&&(e.j41(0,"span",62),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" Cloned from ",t.cloneSource," ")}}function Qm(n,a){1&n&&(e.j41(0,"p",63),e.EFF(1,"Loading services\u2026"),e.k0s())}function Wm(n,a){1&n&&(e.j41(0,"p",63),e.EFF(1," No database or file services yet. Create one under API Generation & Connections. "),e.k0s())}function Zm(n,a){if(1&n&&(e.j41(0,"p",63),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" No service matches '",t.q,"'. Create one under API Generation & Connections. ")}}function e_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",68)(1,"mat-checkbox",69),e.bIt("change",function(){const c=e.eBV(t).$implicit,r=e.XpG(3);return e.Njj(r.toggle(c.name))}),e.j41(2,"span",70),e.EFF(3),e.k0s()(),e.j41(4,"span",71),e.EFF(5),e.k0s(),e.j41(6,"span",72),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("checked",o.isSelected(t.name)),e.BMQ("data-testid","mcp-create-svc-"+t.name),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(o.toolDelta(t))}}function t_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",64)(1,"div",65)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-checkbox",66),e.bIt("change",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.toggleGroup(i.dbFiltered()))}),e.EFF(5," Select all "),e.k0s()(),e.DNE(6,e_,8,5,"div",67),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(3),e.SpI("Databases (",t.dbAll().length,")"),e.R7$(1),e.Y8G("checked",t.groupAllSelected(t.dbFiltered()))("indeterminate",t.groupSomeSelected(t.dbFiltered())),e.R7$(2),e.Y8G("ngForOf",t.dbFiltered())}}function n_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",68)(1,"mat-checkbox",69),e.bIt("change",function(){const c=e.eBV(t).$implicit,r=e.XpG(3);return e.Njj(r.toggle(c.name))}),e.j41(2,"span",70),e.EFF(3),e.k0s()(),e.j41(4,"span",71),e.EFF(5),e.k0s(),e.j41(6,"span",72),e.EFF(7),e.k0s()()}if(2&n){const t=a.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("checked",o.isSelected(t.name)),e.BMQ("data-testid","mcp-create-svc-"+t.name),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.name),e.R7$(2),e.JRh(o.toolDelta(t))}}function o_(n,a){if(1&n){const t=e.RV6();e.j41(0,"div",64)(1,"div",65)(2,"span"),e.EFF(3),e.k0s(),e.j41(4,"mat-checkbox",66),e.bIt("change",function(){e.eBV(t);const i=e.XpG(2);return e.Njj(i.toggleGroup(i.fileFiltered()))}),e.EFF(5," Select all "),e.k0s()(),e.DNE(6,n_,8,5,"div",67),e.k0s()}if(2&n){const t=e.XpG(2);e.R7$(3),e.SpI("File storage (",t.fileAll().length,")"),e.R7$(1),e.Y8G("checked",t.groupAllSelected(t.fileFiltered()))("indeterminate",t.groupSomeSelected(t.fileFiltered())),e.R7$(2),e.Y8G("ngForOf",t.fileFiltered())}}function i_(n,a){1&n&&(e.j41(0,"p",73),e.EFF(1," Nothing selected \u2014 agents get global tools only. "),e.k0s())}function a_(n,a){if(1&n&&(e.j41(0,"span",71),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ","db"===t.svc.kind?"Database":"File storage"," ")}}function c_(n,a){1&n&&(e.j41(0,"span",79),e.EFF(1,"Not on this instance"),e.k0s())}function r_(n,a){if(1&n&&(e.j41(0,"span",71),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(2);e.AVh("good","ro"===o.accessKindFor(t)),e.R7$(1),e.SpI(" ",o.accessLabelFor(t)," ")}}function s_(n,a){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"span",74),e.EFF(2),e.k0s(),e.DNE(3,a_,2,1,"span",75),e.DNE(4,c_,2,0,"span",76),e.DNE(5,r_,2,3,"span",77),e.j41(6,"button",78),e.bIt("click",function(){const c=e.eBV(t).$implicit,r=e.XpG(2);return e.Njj(r.toggle(c.name))}),e.EFF(7," \u2715 "),e.k0s()()}if(2&n){const t=a.$implicit;e.R7$(2),e.JRh((null==t.svc?null:t.svc.label)||t.name),e.R7$(1),e.Y8G("ngIf",t.svc),e.R7$(1),e.Y8G("ngIf",!t.svc),e.R7$(1),e.Y8G("ngIf",t.svc)}}function l_(n,a){if(1&n){const t=e.RV6();e.j41(0,"section",34)(1,"div",35)(2,"h2"),e.EFF(3,"Expose services"),e.k0s()(),e.j41(4,"div",36)(5,"button",37),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.presetAllDb())}),e.EFF(6," All databases (read-only) "),e.k0s(),e.j41(7,"button",38),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.presetChoose())}),e.EFF(8," Choose services "),e.k0s(),e.j41(9,"button",39),e.EFF(10," Clone another MCP server\u2026 "),e.k0s(),e.j41(11,"mat-menu",null,40),e.DNE(13,qm,4,2,"button",41),e.DNE(14,Km,2,0,"button",42),e.k0s(),e.DNE(15,Hm,2,1,"span",43),e.k0s(),e.j41(16,"div",44)(17,"span",45),e.EFF(18,"Access for these services:"),e.k0s(),e.j41(19,"div",46)(20,"button",47),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setAccess("ro"))}),e.EFF(21," Read-only \u2014 recommended "),e.k0s(),e.j41(22,"button",48),e.bIt("click",function(){e.eBV(t);const i=e.XpG();return e.Njj(i.setAccess("rw"))}),e.EFF(23," Read & write "),e.k0s()()(),e.j41(24,"div",49)(25,"div",50)(26,"input",51),e.bIt("ngModelChange",function(i){e.eBV(t);const c=e.XpG();return e.Njj(c.q=i)}),e.k0s(),e.DNE(27,Qm,2,0,"p",52),e.DNE(28,Wm,2,0,"p",52),e.DNE(29,Zm,2,1,"p",52),e.DNE(30,t_,7,4,"div",53),e.DNE(31,o_,7,4,"div",53),e.k0s(),e.j41(32,"aside",54)(33,"div",55),e.EFF(34),e.k0s(),e.DNE(35,i_,2,0,"p",56),e.j41(36,"ul",57),e.DNE(37,s_,8,4,"li",58),e.k0s()()()()}if(2&n){const t=e.sdS(12),o=e.XpG();e.R7$(5),e.AVh("primary","alldb"===o.preset),e.R7$(2),e.AVh("primary","choose"===o.preset),e.R7$(2),e.AVh("primary","clone"===o.preset),e.Y8G("matMenuTriggerFor",t),e.R7$(4),e.Y8G("ngForOf",o.mcpSiblings),e.R7$(1),e.Y8G("ngIf",0===o.mcpSiblings.length),e.R7$(1),e.Y8G("ngIf",o.cloneApplied),e.R7$(5),e.AVh("on","ro"===o.access),e.BMQ("aria-checked","ro"===o.access),e.R7$(2),e.AVh("on","rw"===o.access),e.BMQ("aria-checked","rw"===o.access),e.R7$(4),e.Y8G("placeholder","Search "+o.backendServices.length+" services\u2026")("ngModel",o.q),e.R7$(1),e.Y8G("ngIf",!o.instanceLoaded),e.R7$(1),e.Y8G("ngIf",o.instanceLoaded&&0===o.backendServices.length),e.R7$(1),e.Y8G("ngIf",o.emptySearch()),e.R7$(1),e.Y8G("ngIf",o.dbAll().length>0&&o.dbFiltered().length>0),e.R7$(1),e.Y8G("ngIf",o.fileAll().length>0&&o.fileFiltered().length>0),e.R7$(3),e.SpI("Selected (",o.selected.size,")"),e.R7$(1),e.Y8G("ngIf",0===o.selected.size),e.R7$(2),e.Y8G("ngForOf",o.selectedList())}}function d_(n,a){1&n&&(e.j41(0,"b"),e.EFF(1," Empty never means every service."),e.k0s())}bt=(0,ie.Cg)([(0,X.d)({checkProperties:!0})],bt);let p_=(()=>{class n{constructor(t,o,i,c,r){this.activatedRoute=t,this.router=o,this.servicesService=i,this.serviceTypeService=c,this.snackbarService=r,this.serverType="mcp",this.name="",this.label="",this.labelTouched=!1,this.nameBlurred=!1,this.description="",this.showDescription=!1,this.preset="choose",this.access="ro",this.selected=new Set,this.q="",this.cloneApplied=!1,this.cloneSource="",this.clonedDisabled=new Set,this.accessTouchedAfterClone=!1,this.toolStyle="merged",this.backendServices=[],this.existingNames=new Set,this.mcpSiblings=[],this.instanceLoaded=!1,this.saving=!1}ngOnInit(){this.loadInstance()}loadInstance(){(0,le.p)({types:this.serviceTypeService.getAll({fields:"name,group",limit:1e3}),services:this.servicesService.getAll({limit:1e3,fields:"id,name,label,type,is_active",sort:"name"})}).subscribe({next:({types:t,services:o})=>{const i={};for(const r of t?.resource??[])i[r.name]=r.group;const c=o?.resource??[];this.backendServices=sn(c,i),this.existingNames=new Set(c.map(r=>r.name).filter(Boolean)),this.mcpSiblings=c.filter(r=>"mcp"===r.type).map(r=>({id:r.id,name:r.name,label:r.label||r.name})),this.instanceLoaded=!0},error:()=>{this.instanceLoaded=!0}})}setType(t){this.serverType=t}onNameInput(t){const o=t.target;this.name=o.value.toLowerCase().replace(/\s+/g,"").replace(/[^a-z0-9_-]/g,""),o.value=this.name,this.labelTouched||(this.label=this.labelSuggestion())}onLabelInput(t){const o=t.target;this.label=o.value,this.labelTouched=o.value.length>0,this.labelTouched||(this.label=this.labelSuggestion())}onDescriptionInput(t){this.description=t.target.value}labelSuggestion(){return this.name.split(/[_-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}get urlPreview(){return`${window.location.origin}/mcp/${this.name||"\u2026"}`}nameTaken(){return""!==this.name&&this.existingNames.has(this.name)}matches(t){const o=this.q.trim().toLowerCase();return!o||t.name.toLowerCase().includes(o)||t.label.toLowerCase().includes(o)}dbAll(){return this.backendServices.filter(t=>"db"===t.kind)}fileAll(){return this.backendServices.filter(t=>"file"===t.kind)}dbFiltered(){return this.dbAll().filter(t=>this.matches(t))}fileFiltered(){return this.fileAll().filter(t=>this.matches(t))}emptySearch(){return this.q.trim().length>0&&0===this.dbFiltered().length&&0===this.fileFiltered().length}toolDelta(t){return`+${J(t.kind).length} tools`}isSelected(t){return this.selected.has(t)}toggle(t){this.selected.has(t)?this.selected.delete(t):this.selected.add(t),"alldb"===this.preset&&(this.preset="choose")}groupAllSelected(t){return t.length>0&&t.every(o=>this.selected.has(o.name))}groupSomeSelected(t){const o=t.filter(i=>this.selected.has(i.name)).length;return o>0&&o({name:t,svc:this.backendServices.find(o=>o.name===t)??null}))}accessLabelFor(t){if(!t.svc)return"";const o=dt(t.svc,this.compiledDisabledTools());return"full"===o.kind?"Full access":o.label}accessKindFor(t){return t.svc?dt(t.svc,this.compiledDisabledTools()).kind:""}presetAllDb(){this.selected=new Set(this.dbAll().map(t=>t.name)),this.access="ro",this.cloneApplied=!1,this.preset="alldb"}presetChoose(){this.cloneApplied=!1,this.preset="choose"}pickClone(t){this.servicesService.get(t.id).subscribe({next:o=>{const i=lt(o?.config);this.selected=new Set(i.exposedServices),this.clonedDisabled=new Set(i.disabledTools),this.toolStyle=i.toolStyle??"merged",this.cloneApplied=!0,this.cloneSource=t.label||t.name,this.accessTouchedAfterClone=!1,this.preset="clone"},error:()=>this.snackbarService.openSnackBar(`Could not load ${t.name}'s configuration.`,"error")})}setAccess(t){this.access=t,this.accessTouchedAfterClone=!0}compiledDisabledTools(){if("system_mcp"===this.serverType)return new Set;if(this.cloneApplied&&!this.accessTouchedAfterClone)return new Set(this.clonedDisabled);if("ro"===this.access){const t=new Set;for(const o of this.selected){const i=this.backendServices.find(c=>c.name===o);i&&pt(i).forEach(c=>t.add(c))}return t}return new Set}draftConfig(){const t=lt({});return t.exposedServices=[...this.selected],t.disabledTools=this.compiledDisabledTools(),t.toolStyle=this.toolStyle,t.lazyMode="auto",t.allowApiKeyAuth=!1,t}breakdown(){return Ie(this.draftConfig(),this.backendServices)}consequenceMain(){if("system_mcp"===this.serverType)return"Agents will get the 18 System API admin tools.";const t=this.breakdown();if(0===this.selected.size)return`Agents will get global tools only (${t.globalTools}) \u2014 no data access.`;const o=[];t.dbServices>0&&o.push(`${t.dbTools} database (shared set across ${t.dbServices} ${1===t.dbServices?"service":"services"})`),t.fileServices>0&&o.push(`${t.fileTools} file`),o.push(`${t.globalTools} global`);let i=`Agents will get ${t.total} tools: ${o.join(" \xb7 ")}.`;return t.readOnly&&(i+=" Write tools are off."),i}showEmptyBold(){return"mcp"===this.serverType&&0===this.selected.size}canSubmit(){return!this.saving&&this.name.length>0&&!this.nameTaken()}submit(){if(!this.canSubmit())return;this.saving=!0;const t="mcp"===this.serverType?{exposedServices:[...this.selected],disabledTools:[...this.compiledDisabledTools()].sort(),toolStyle:this.toolStyle,lazyMode:"auto",allowApiKeyAuth:!1}:{};this.servicesService.create({resource:[{name:this.name,label:this.label||this.name,description:this.description,isActive:!0,type:this.serverType,config:t}]}).subscribe({next:o=>{this.saving=!1;const i=o?.resource?.[0]?.id;null!=i?this.router.navigate(["../",i],{relativeTo:this.activatedRoute,queryParams:{created:1}}):this.router.navigate(["../"],{relativeTo:this.activatedRoute})},error:o=>{this.saving=!1,this.snackbarService.openSnackBar(o?.error?.error?.message??"Create failed.","error")}})}cancel(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(G.nX),e.rXU(G.Ix),e.rXU(A.Z1),e.rXU(A.zs),e.rXU(se.L))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-create"]],standalone:!0,features:[e.aNF],decls:53,vars:18,consts:[["data-testid","mcp-create-page",1,"mcp-create"],[1,"mcp-create-head"],[1,"mcp-create-tagline"],["role","radiogroup","aria-label","Server type",1,"mcp-create-types"],["type","button","role","radio","data-testid","mcp-create-type-mcp",1,"mcp-type-card",3,"click"],["aria-hidden","true",1,"mcp-type-dot"],[1,"mcp-type-body"],[1,"mcp-type-title"],[1,"mcp-type-desc"],["type","button","role","radio","data-testid","mcp-create-type-system",1,"mcp-type-card",3,"click"],[1,"mcp-card","mcp-create-card"],[1,"mcp-field"],["for","mcp-create-name-input"],[1,"req"],["id","mcp-create-name-input","type","text","autocomplete","off","spellcheck","false","placeholder","warehouse","data-testid","mcp-create-name",1,"mcp-input",3,"value","input","blur"],["data-testid","mcp-create-url-preview",1,"mcp-url-preview"],[1,"mcp-url-mono"],[1,"mcp-url-note"],["class","mcp-field-error",4,"ngIf"],["for","mcp-create-label-input"],["id","mcp-create-label-input","type","text","autocomplete","off",1,"mcp-input",3,"value","input"],["type","button","class","mcp-linklike",3,"click",4,"ngIf"],["class","mcp-field",4,"ngIf"],["class","mcp-create-expose",4,"ngIf"],["data-testid","mcp-create-consequence",1,"mcp-create-consequence"],[4,"ngIf"],[1,"mcp-create-auth"],[1,"mcp-create-actions"],["mat-stroked-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button","data-testid","mcp-create-submit",3,"disabled","click"],[1,"mcp-field-error"],["type","button",1,"mcp-linklike",3,"click"],["for","mcp-create-desc-input"],["id","mcp-create-desc-input","rows","3",1,"mcp-input","mcp-textarea",3,"value","input"],[1,"mcp-create-expose"],[1,"mcp-section-head"],[1,"mcp-preset-row"],["type","button","data-testid","mcp-create-preset-alldb",1,"mcp-chip","mcp-chip-btn",3,"click"],["type","button",1,"mcp-chip","mcp-chip-btn",3,"click"],["type","button",1,"mcp-chip","mcp-chip-btn",3,"matMenuTriggerFor"],["cloneMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","","disabled","",4,"ngIf"],["class","mcp-chip good",4,"ngIf"],[1,"mcp-access-row"],[1,"mcp-access-label"],["role","radiogroup","aria-label","Access for these services",1,"mcp-seg"],["type","button","role","radio","data-testid","mcp-create-access-ro",1,"mcp-seg-btn",3,"click"],["type","button","role","radio","data-testid","mcp-create-access-rw",1,"mcp-seg-btn",3,"click"],[1,"mcp-create-pickgrid"],[1,"mcp-card","mcp-pick-card"],["type","search","data-testid","mcp-create-search",1,"mcp-input","mcp-pick-search",3,"placeholder","ngModel","ngModelChange"],["class","mcp-pick-note",4,"ngIf"],["class","mcp-pick-group",4,"ngIf"],[1,"mcp-pick-side"],[1,"mcp-side-head"],["class","mcp-side-none",4,"ngIf"],[1,"mcp-side-list"],[4,"ngFor","ngForOf"],["mat-menu-item","",3,"click"],[1,"mcp-menu-name"],["mat-menu-item","","disabled",""],[1,"mcp-chip","good"],[1,"mcp-pick-note"],[1,"mcp-pick-group"],[1,"mcp-pick-grouphead"],[3,"checked","indeterminate","change"],["class","mcp-pick-row",4,"ngFor","ngForOf"],[1,"mcp-pick-row"],[3,"checked","change"],[1,"mcp-pick-label"],[1,"mcp-chip"],[1,"mcp-pick-delta"],[1,"mcp-side-none"],[1,"mcp-side-label"],["class","mcp-chip",4,"ngIf"],["class","mcp-chip warn",4,"ngIf"],["class","mcp-chip",3,"good",4,"ngIf"],["type","button","matTooltip","Remove from selection","aria-label","Remove from selection",1,"mcp-side-remove",3,"click"],[1,"mcp-chip","warn"]],template:function(o,i){1&o&&(e.j41(0,"div",0)(1,"header",1)(2,"h1"),e.EFF(3,"New MCP server"),e.k0s(),e.j41(4,"p",2),e.EFF(5," Choose what agents may reach. Naming, catalog size, and auth are handled automatically. "),e.k0s()(),e.j41(6,"div",3)(7,"button",4),e.bIt("click",function(){return i.setType("mcp")}),e.nrm(8,"span",5),e.j41(9,"span",6)(10,"span",7),e.EFF(11,"MCP server"),e.k0s(),e.j41(12,"span",8),e.EFF(13,"Expose your data services to AI agents."),e.k0s()()(),e.j41(14,"button",9),e.bIt("click",function(){return i.setType("system_mcp")}),e.nrm(15,"span",5),e.j41(16,"span",6)(17,"span",7),e.EFF(18,"System API MCP server"),e.k0s(),e.j41(19,"span",8),e.EFF(20,"Expose the DreamFactory admin API itself."),e.k0s()()()(),e.j41(21,"section",10)(22,"div",11)(23,"label",12),e.EFF(24,"Name "),e.j41(25,"span",13),e.EFF(26,"*"),e.k0s()(),e.j41(27,"input",14),e.bIt("input",function(r){return i.onNameInput(r)})("blur",function(){return i.nameBlurred=!0}),e.k0s(),e.j41(28,"p",15)(29,"span",16),e.EFF(30),e.k0s(),e.EFF(31," "),e.j41(32,"span",17),e.EFF(33,"\u2014 the name is the URL"),e.k0s()(),e.DNE(34,Bm,2,1,"p",18),e.DNE(35,Lm,2,0,"p",18),e.k0s(),e.j41(36,"div",11)(37,"label",19),e.EFF(38,"Label"),e.k0s(),e.j41(39,"input",20),e.bIt("input",function(r){return i.onLabelInput(r)}),e.k0s()(),e.DNE(40,Um,2,0,"button",21),e.DNE(41,Jm,4,1,"div",22),e.k0s(),e.DNE(42,l_,38,26,"section",23),e.j41(43,"p",24),e.EFF(44),e.DNE(45,d_,2,0,"b",25),e.k0s(),e.j41(46,"p",26),e.EFF(47," Secured with OAuth 2.1, configured automatically. Connection details appear after you create the server. "),e.k0s(),e.j41(48,"div",27)(49,"button",28),e.bIt("click",function(){return i.cancel()}),e.EFF(50,"Cancel"),e.k0s(),e.j41(51,"button",29),e.bIt("click",function(){return i.submit()}),e.EFF(52),e.k0s()()()),2&o&&(e.R7$(7),e.AVh("on","mcp"===i.serverType),e.BMQ("aria-checked","mcp"===i.serverType),e.R7$(7),e.AVh("on","system_mcp"===i.serverType),e.BMQ("aria-checked","system_mcp"===i.serverType),e.R7$(13),e.Y8G("value",i.name),e.R7$(3),e.SpI("\u2192 ",i.urlPreview,""),e.R7$(4),e.Y8G("ngIf",i.nameTaken()),e.R7$(1),e.Y8G("ngIf",i.nameBlurred&&""===i.name),e.R7$(4),e.Y8G("value",i.label),e.R7$(1),e.Y8G("ngIf",!i.showDescription),e.R7$(1),e.Y8G("ngIf",i.showDescription),e.R7$(1),e.Y8G("ngIf","mcp"===i.serverType),e.R7$(2),e.SpI(" ",i.consequenceMain(),""),e.R7$(1),e.Y8G("ngIf",i.showEmptyBold()),e.R7$(6),e.Y8G("disabled",!i.canSubmit()),e.R7$(1),e.SpI(" ",i.saving?"Creating\u2026":"Create server"," "))},dependencies:[m.MD,m.Sq,m.bT,d.YN,d.me,d.BC,d.vS,u.Hl,u.$z,q.g7,q.So,Q.Cn,Q.kk,Q.fb,Q.Cp,R.uc,R.oV],styles:['@charset "UTF-8";.mcp-create[_ngcontent-%COMP%]{font-family:Inter,Helvetica Neue,sans-serif;max-width:980px;padding:0 0 40px}.mcp-create-head[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:21px;font-weight:700;margin:0 0 4px}.mcp-create-head[_ngcontent-%COMP%] .mcp-create-tagline[_ngcontent-%COMP%]{font-size:13.5px;opacity:.65;margin:0 0 18px;max-width:560px}.mcp-create-types[_ngcontent-%COMP%]{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%]{flex:1 1 260px;display:flex;align-items:flex-start;gap:10px;text-align:left;background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:14px 16px;cursor:pointer;font:inherit}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card.on[_ngcontent-%COMP%]{border-color:var(--df-accent, #5c5699);box-shadow:inset 0 0 0 1px var(--df-accent, #5c5699);background:rgba(92,86,153,.04)}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%] .mcp-type-dot[_ngcontent-%COMP%]{flex:none;margin-top:2px;width:16px;height:16px;border-radius:50%;border:2px solid rgba(0,0,0,.3);background:#fff}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card.on[_ngcontent-%COMP%] .mcp-type-dot[_ngcontent-%COMP%]{border-color:var(--df-accent, #5c5699);box-shadow:inset 0 0 0 3.5px #fff;background:var(--df-accent, #5c5699)}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%] .mcp-type-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%] .mcp-type-title[_ngcontent-%COMP%]{font-size:14px;font-weight:700}.mcp-create-types[_ngcontent-%COMP%] .mcp-type-card[_ngcontent-%COMP%] .mcp-type-desc[_ngcontent-%COMP%]{font-size:12.5px;opacity:.65}.mcp-card[_ngcontent-%COMP%]{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;margin-bottom:14px}.mcp-create-card[_ngcontent-%COMP%]{padding:16px}.mcp-field[_ngcontent-%COMP%]{margin-bottom:14px}.mcp-field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;font-size:12.5px;font-weight:600;margin-bottom:4px}.mcp-field[_ngcontent-%COMP%] .req[_ngcontent-%COMP%]{color:#b3261e}.mcp-field[_ngcontent-%COMP%]:last-child{margin-bottom:0}.mcp-input[_ngcontent-%COMP%]{font:inherit;font-size:13.5px;padding:8px 12px;border:1px solid rgba(0,0,0,.18);border-radius:8px;background:#fff;width:100%;max-width:420px;box-sizing:border-box}.mcp-input[_ngcontent-%COMP%]:focus{outline:2px solid rgba(92,86,153,.35);outline-offset:0}.mcp-textarea[_ngcontent-%COMP%]{max-width:640px;resize:vertical}.mcp-url-preview[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12.5px}.mcp-url-preview[_ngcontent-%COMP%] .mcp-url-mono[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--df-accent, #5c5699);word-break:break-all}.mcp-url-preview[_ngcontent-%COMP%] .mcp-url-note[_ngcontent-%COMP%]{opacity:.6}.mcp-field-error[_ngcontent-%COMP%]{margin:6px 0 0;font-size:12.5px;font-weight:600;color:#b3261e}.mcp-linklike[_ngcontent-%COMP%]{background:none;border:none;padding:0;font:inherit;font-size:13px;font-weight:600;color:var(--df-accent, #5c5699);cursor:pointer}.mcp-section-head[_ngcontent-%COMP%]{margin:18px 0 10px}.mcp-section-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.75;margin:0}.mcp-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:999px;font-size:12px;font-weight:600;border:1px solid rgba(0,0,0,.14);background:rgba(0,0,0,.02);white-space:nowrap}.mcp-chip.good[_ngcontent-%COMP%]{background:#e7f2e8;border-color:#2e7d3259;color:#2e7d32}.mcp-chip.warn[_ngcontent-%COMP%]{background:#fdf3dc;border-color:#9a670066;color:#9a6700}.mcp-chip.primary[_ngcontent-%COMP%]{background:rgba(92,86,153,.1);border-color:#5c569961;color:var(--df-accent, #5c5699)}.mcp-chip-btn[_ngcontent-%COMP%]{cursor:pointer;font:inherit;font-size:12px;font-weight:600}.mcp-preset-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.mcp-menu-name[_ngcontent-%COMP%]{opacity:.55;font-size:12px}.mcp-access-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.mcp-access-row[_ngcontent-%COMP%] .mcp-access-label[_ngcontent-%COMP%]{font-size:13px;font-weight:600}.mcp-seg[_ngcontent-%COMP%]{display:inline-flex;border:1px solid rgba(0,0,0,.18);border-radius:8px;overflow:hidden}.mcp-seg[_ngcontent-%COMP%] .mcp-seg-btn[_ngcontent-%COMP%]{font:inherit;font-size:13px;font-weight:600;padding:7px 14px;background:#fff;border:none;cursor:pointer;opacity:.75}.mcp-seg[_ngcontent-%COMP%] .mcp-seg-btn[_ngcontent-%COMP%] + .mcp-seg-btn[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.12)}.mcp-seg[_ngcontent-%COMP%] .mcp-seg-btn.on[_ngcontent-%COMP%]{background:rgba(92,86,153,.12);color:var(--df-accent, #5c5699);opacity:1}.mcp-create-pickgrid[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:16px;align-items:start}.mcp-pick-card[_ngcontent-%COMP%]{padding:12px 14px;margin-bottom:0}.mcp-pick-search[_ngcontent-%COMP%]{max-width:none}.mcp-pick-note[_ngcontent-%COMP%]{font-size:13px;opacity:.65;margin:12px 2px 2px}.mcp-pick-group[_ngcontent-%COMP%]{margin-top:14px}.mcp-pick-grouphead[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.8;border-bottom:1px solid rgba(0,0,0,.06);padding-bottom:2px;margin-bottom:4px}.mcp-pick-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:2px 0}.mcp-pick-row[_ngcontent-%COMP%] .mcp-pick-label[_ngcontent-%COMP%]{font-size:13.5px;font-weight:600}.mcp-pick-row[_ngcontent-%COMP%] .mcp-pick-delta[_ngcontent-%COMP%]{margin-left:auto;font-size:12px;opacity:.6;white-space:nowrap}.mcp-pick-side[_ngcontent-%COMP%]{background:#fff;border:1px solid rgba(0,0,0,.08);border-radius:10px;padding:12px 14px}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-head[_ngcontent-%COMP%]{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;opacity:.8;margin-bottom:6px}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-none[_ngcontent-%COMP%]{font-size:13px;opacity:.65;margin:4px 0 0}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:5px 0;border-bottom:1px solid rgba(0,0,0,.05)}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:last-child{border-bottom:none}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-label[_ngcontent-%COMP%]{font-size:13px;font-weight:600}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-remove[_ngcontent-%COMP%]{margin-left:auto;background:none;border:none;cursor:pointer;font-size:13px;line-height:1;opacity:.45;padding:2px 4px}.mcp-pick-side[_ngcontent-%COMP%] .mcp-side-remove[_ngcontent-%COMP%]:hover{opacity:.9}.mcp-create-consequence[_ngcontent-%COMP%]{background:rgba(92,86,153,.07);border:1px solid rgba(92,86,153,.25);border-radius:10px;padding:10px 14px;font-size:13.5px;margin:16px 0}.mcp-create-auth[_ngcontent-%COMP%]{font-size:13px;opacity:.7;margin:0 0 18px}.mcp-create-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}@media (max-width: 860px){.mcp-create-pickgrid[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media (max-width: 700px){.mcp-create-head[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:18px}.mcp-input[_ngcontent-%COMP%], .mcp-textarea[_ngcontent-%COMP%]{max-width:none}.mcp-create-actions[_ngcontent-%COMP%]{justify-content:stretch}.mcp-create-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:1 1 auto}}']})}}return n})();function m_(n,a){1&n&&e.nrm(0,"df-mcp-details")}function __(n,a){1&n&&e.nrm(0,"df-mcp-create")}function g_(n,a){1&n&&e.nrm(0,"df-service-details")}let f_=(()=>{class n{constructor(t){this.activatedRoute=t,this.mode="generic"}ngOnInit(){this.routeSub=this.activatedRoute.data.subscribe(()=>this.computeMode())}ngOnDestroy(){this.routeSub?.unsubscribe()}computeMode(){const t=this.activatedRoute.snapshot,o=t.data.data;if("mcp"===o?.type||"system_mcp"===o?.type)return void(this.mode="mcp-edit");const i=!t.paramMap.get("id");this.mode=i&&(t.data.groups||t.parent?.data?.groups||[]).includes("MCP")?"mcp-create":"generic"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(G.nX))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-mcp-route-shim"]],standalone:!0,features:[e.aNF],decls:3,vars:3,consts:[[4,"ngIf"]],template:function(o,i){1&o&&(e.DNE(0,m_,1,0,"df-mcp-details",0),e.DNE(1,__,1,0,"df-mcp-create",0),e.DNE(2,g_,1,0,"df-service-details",0)),2&o&&(e.Y8G("ngIf","mcp-edit"===i.mode),e.R7$(1),e.Y8G("ngIf","mcp-create"===i.mode),e.R7$(1),e.Y8G("ngIf","generic"===i.mode))},dependencies:[m.MD,m.bT,st,bt,p_],encapsulation:2})}}return n})()}}]); \ No newline at end of file diff --git a/dist/1524.0427308cbd09bc81.js b/dist/1524.0427308cbd09bc81.js deleted file mode 100644 index 02b03fca..00000000 --- a/dist/1524.0427308cbd09bc81.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1524],{1524:(je,Y,p)=>{p.r(Y),p.d(Y,{DfApiBuilderComponent:()=>Bn});var c=p(18331),L=p(62572),e=p(1843),W=p(23135),ie=p(73907);function J(i){i||((0,e.Af3)(J),i=(0,e.WQX)(e.abz));const o=new W.c(t=>i.onDestroy(t.next.bind(t)));return t=>t.pipe((0,ie.Q)(o))}Error;var m=p(78227),pe=p(33492),P=p(68660),O=p(93138),ye=p(29167),w=p(54688),T=p(7263),H=p(453),K=p(42250),we=p(4965),Q=p(91900),Z=p(39258),de=p(96984),ee=p(98337),S=p(91974),Ee=p(31147),u=p(68686),G=p(56579),h=p(48444);function Ge(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",21)(1,"span")(2,"mat-icon",22),e.EFF(3,"storage"),e.k0s(),e.j41(4,"strong"),e.EFF(5),e.k0s(),e.j41(6,"small"),e.EFF(7),e.k0s()(),e.j41(8,"button",23),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(3);return e.Njj(a.removeService(s))}),e.j41(9,"mat-icon"),e.EFF(10,"close"),e.k0s()()()}if(2&i){const t=o.$implicit,n=e.XpG(3);e.R7$(5),e.JRh(n.serviceLabel(t.serviceId)),e.R7$(2),e.JRh(n.serviceType(t.serviceId))}}function Ve(i,o){if(1&i&&(e.j41(0,"div",19),e.DNE(1,Ge,11,2,"div",20),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.workspace)("ngForTrackBy",t.trackById)}}function Xe(i,o){1&i&&(e.j41(0,"p",24),e.EFF(1," Add the first data source before creating endpoints. "),e.k0s())}function Ye(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.id),e.R7$(1),e.Lme(" ",t.label||t.name," (",t.type,") ")}}function Le(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",28)(1,"mat-icon"),e.EFF(2,"account_tree"),e.k0s(),e.j41(3,"span")(4,"strong"),e.EFF(5),e.k0s(),e.j41(6,"small"),e.EFF(7),e.k0s()(),e.j41(8,"span",29),e.EFF(9,"Shared"),e.k0s(),e.j41(10,"button",30),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(3);return e.Njj(a.removeRelationship(s))}),e.j41(11,"mat-icon"),e.EFF(12,"delete"),e.k0s()()()}if(2&i){const t=o.$implicit,n=e.XpG(3);e.R7$(5),e.JRh(t.alias||t.name),e.R7$(2),e.JRh(n.relationshipSummary(t))}}function We(i,o){if(1&i&&(e.j41(0,"div",26),e.DNE(1,Le,13,2,"div",27),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.relationships)("ngForTrackBy",t.trackById)}}function Je(i,o){1&i&&(e.j41(0,"p",31),e.EFF(1," No related data configured yet. "),e.k0s())}function ze(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function qe(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Ue(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function He(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function Ke(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Qe(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Ze(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function et(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function tt(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function nt(i,o){if(1&i&&(e.j41(0,"mat-option",25),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function it(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",51)(1,"div",52)(2,"mat-icon"),e.EFF(3,"device_hub"),e.k0s(),e.j41(4,"span")(5,"strong"),e.EFF(6,"Junction table"),e.k0s(),e.j41(7,"small"),e.EFF(8,"Tell DreamFactory how the two datasets are connected."),e.k0s()()(),e.j41(9,"div",35)(10,"mat-form-field",10)(11,"mat-label"),e.EFF(12,"Junction source"),e.k0s(),e.j41(13,"mat-select",36),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(3);return e.Njj(s.rel.junction_service=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(3);return e.Njj(r.sourceChanged("junction"))}),e.DNE(14,Ze,2,2,"mat-option",12),e.k0s()(),e.j41(15,"mat-form-field",10)(16,"mat-label"),e.EFF(17,"Junction table"),e.k0s(),e.j41(18,"mat-select",37),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(3);return e.Njj(s.rel.junction_table=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(3);return e.Njj(r.tableChanged("junction"))}),e.DNE(19,et,2,2,"mat-option",38),e.k0s()(),e.j41(20,"mat-form-field",10)(21,"mat-label"),e.EFF(22,"Field matching start"),e.k0s(),e.j41(23,"mat-select",39),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(3);return e.Njj(s.rel.junction_field=r)}),e.DNE(24,tt,2,2,"mat-option",38),e.k0s()(),e.j41(25,"mat-form-field",10)(26,"mat-label"),e.EFF(27,"Field matching related"),e.k0s(),e.j41(28,"mat-select",39),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(3);return e.Njj(s.rel.junction_ref_field=r)}),e.DNE(29,nt,2,2,"mat-option",38),e.k0s()()()()}if(2&i){const t=e.XpG(3);e.R7$(13),e.Y8G("ngModel",t.rel.junction_service),e.R7$(1),e.Y8G("ngForOf",t.workspaceServices)("ngForTrackBy",t.trackById),e.R7$(4),e.Y8G("ngModel",t.rel.junction_table)("disabled",!t.rel.junction_service),e.R7$(1),e.Y8G("ngForOf",t.junctionTables),e.R7$(4),e.Y8G("ngModel",t.rel.junction_field)("disabled",!t.rel.junction_table),e.R7$(1),e.Y8G("ngForOf",t.junctionFields),e.R7$(4),e.Y8G("ngModel",t.rel.junction_ref_field)("disabled",!t.rel.junction_table),e.R7$(1),e.Y8G("ngForOf",t.junctionFields)}}function rt(i,o){if(1&i&&(e.j41(0,"p",53)(1,"mat-icon"),e.EFF(2,"arrow_forward"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(4),e.JRh(t.relPreview())}}function st(i,o){if(1&i){const t=e.RV6();e.j41(0,"section",32)(1,"div",33)(2,"span",34),e.EFF(3,"1"),e.k0s(),e.j41(4,"span")(5,"strong"),e.EFF(6,"Choose the starting data"),e.k0s(),e.j41(7,"small"),e.EFF(8,"The records your endpoint returns first."),e.k0s()()(),e.j41(9,"div",35)(10,"mat-form-field",10)(11,"mat-label"),e.EFF(12,"Data source"),e.k0s(),e.j41(13,"mat-select",36),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.service=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.sourceChanged("local"))}),e.DNE(14,ze,2,2,"mat-option",12),e.k0s()(),e.j41(15,"mat-form-field",10)(16,"mat-label"),e.EFF(17,"Table"),e.k0s(),e.j41(18,"mat-select",37),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.table=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.tableChanged("local"))}),e.DNE(19,qe,2,2,"mat-option",38),e.k0s()(),e.j41(20,"mat-form-field",10)(21,"mat-label"),e.EFF(22,"Matching field"),e.k0s(),e.j41(23,"mat-select",39),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.field=r)}),e.DNE(24,Ue,2,2,"mat-option",38),e.k0s()()(),e.j41(25,"div",33)(26,"span",34),e.EFF(27,"2"),e.k0s(),e.j41(28,"span")(29,"strong"),e.EFF(30,"Add the related data"),e.k0s(),e.j41(31,"small"),e.EFF(32,"Choose what should be attached to each starting record."),e.k0s()()(),e.j41(33,"div",35)(34,"mat-form-field",10)(35,"mat-label"),e.EFF(36,"Relationship"),e.k0s(),e.j41(37,"mat-select",11),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.type=r)}),e.j41(38,"mat-option",40),e.EFF(39,"Many to one"),e.k0s(),e.j41(40,"mat-option",41),e.EFF(41,"One to one"),e.k0s(),e.j41(42,"mat-option",42),e.EFF(43,"One to many"),e.k0s(),e.j41(44,"mat-option",43),e.EFF(45,"Many to many"),e.k0s()()(),e.j41(46,"mat-form-field",10)(47,"mat-label"),e.EFF(48,"Related source"),e.k0s(),e.j41(49,"mat-select",36),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.ref_service=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.sourceChanged("ref"))}),e.DNE(50,He,2,2,"mat-option",12),e.k0s()(),e.j41(51,"mat-form-field",10)(52,"mat-label"),e.EFF(53,"Related table"),e.k0s(),e.j41(54,"mat-select",37),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.ref_table=r)})("selectionChange",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.tableChanged("ref"))}),e.DNE(55,Ke,2,2,"mat-option",38),e.k0s()(),e.j41(56,"mat-form-field",10)(57,"mat-label"),e.EFF(58,"Related field"),e.k0s(),e.j41(59,"mat-select",39),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.ref_field=r)}),e.DNE(60,Qe,2,2,"mat-option",38),e.k0s()()(),e.j41(61,"p",44),e.EFF(62),e.k0s(),e.DNE(63,it,30,12,"div",45),e.j41(64,"div",46)(65,"mat-form-field",10)(66,"mat-label"),e.EFF(67,"Return this data as"),e.k0s(),e.j41(68,"input",47),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.rel.name=r)}),e.k0s(),e.j41(69,"mat-hint"),e.EFF(70,"Optional response field name"),e.k0s()()(),e.j41(71,"div",48),e.DNE(72,rt,5,1,"p",49),e.j41(73,"button",50),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.createRelationship())}),e.EFF(74," Save relationship "),e.k0s()()()}if(2&i){const t=e.XpG(2);e.R7$(13),e.Y8G("ngModel",t.rel.service),e.R7$(1),e.Y8G("ngForOf",t.workspaceServices)("ngForTrackBy",t.trackById),e.R7$(4),e.Y8G("ngModel",t.rel.table)("disabled",!t.rel.service),e.R7$(1),e.Y8G("ngForOf",t.localTables),e.R7$(4),e.Y8G("ngModel",t.rel.field)("disabled",!t.rel.table),e.R7$(1),e.Y8G("ngForOf",t.localFields),e.R7$(13),e.Y8G("ngModel",t.rel.type),e.R7$(12),e.Y8G("ngModel",t.rel.ref_service),e.R7$(1),e.Y8G("ngForOf",t.workspaceServices)("ngForTrackBy",t.trackById),e.R7$(4),e.Y8G("ngModel",t.rel.ref_table)("disabled",!t.rel.ref_service),e.R7$(1),e.Y8G("ngForOf",t.refTables),e.R7$(4),e.Y8G("ngModel",t.rel.ref_field)("disabled",!t.rel.ref_table),e.R7$(1),e.Y8G("ngForOf",t.refFields),e.R7$(2),e.JRh(t.typeHint()),e.R7$(1),e.Y8G("ngIf","many_many"===t.rel.type),e.R7$(5),e.Y8G("ngModel",t.rel.name),e.R7$(4),e.Y8G("ngIf",t.relPreview()),e.R7$(1),e.Y8G("disabled",!t.relReady())}}function ot(i,o){if(1&i){const t=e.RV6();e.j41(0,"mat-card",1)(1,"div",2)(2,"div")(3,"h3"),e.EFF(4,"Data sources"),e.k0s(),e.j41(5,"p"),e.EFF(6," Choose the services this API can use, then connect related records when an endpoint needs data from more than one source. "),e.k0s()(),e.j41(7,"span",3),e.EFF(8),e.k0s()(),e.j41(9,"p",4)(10,"mat-icon"),e.EFF(11,"info"),e.k0s(),e.j41(12,"span"),e.EFF(13," Relationships use DreamFactory's shared schema configuration and can be reused by other APIs. "),e.k0s()(),e.j41(14,"h4",5),e.EFF(15,"Available to this API"),e.k0s(),e.j41(16,"p",6),e.EFF(17,"Endpoints can only read from sources listed here."),e.k0s(),e.DNE(18,Ve,2,2,"div",7),e.DNE(19,Xe,2,0,"ng-template",null,8,e.C5r),e.j41(21,"div",9)(22,"mat-form-field",10)(23,"mat-label"),e.EFF(24,"Add a data source"),e.k0s(),e.j41(25,"mat-select",11),e.bIt("ngModelChange",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.serviceToAdd=r)}),e.DNE(26,Ye,2,3,"mat-option",12),e.k0s()(),e.j41(27,"button",13),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.addService())}),e.j41(28,"mat-icon"),e.EFF(29,"add"),e.k0s(),e.EFF(30," Add source "),e.k0s()(),e.nrm(31,"div",14),e.j41(32,"div",15)(33,"div")(34,"h4"),e.EFF(35,"Related data"),e.k0s(),e.j41(36,"p"),e.EFF(37," Connect records across sources so endpoints can return them together. "),e.k0s()(),e.j41(38,"button",13),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.toggleRelationshipEditor())}),e.j41(39,"mat-icon"),e.EFF(40),e.k0s(),e.EFF(41),e.k0s()(),e.DNE(42,We,2,2,"div",16),e.DNE(43,Je,2,0,"p",17),e.DNE(44,st,75,24,"section",18),e.k0s()}if(2&i){const t=e.sdS(20),n=e.XpG();e.R7$(8),e.Lme(" ",n.workspace.length," source",1===n.workspace.length?"":"s"," "),e.R7$(10),e.Y8G("ngIf",n.workspace.length)("ngIfElse",t),e.R7$(7),e.Y8G("ngModel",n.serviceToAdd),e.R7$(1),e.Y8G("ngForOf",n.addableServices)("ngForTrackBy",n.trackById),e.R7$(1),e.Y8G("disabled",!n.serviceToAdd),e.R7$(11),e.Y8G("disabled",n.workspace.length<1),e.R7$(2),e.JRh(n.relationshipEditorOpen?"close":"add_link"),e.R7$(1),e.SpI(" ",n.relationshipEditorOpen?"Close":"Add related data"," "),e.R7$(1),e.Y8G("ngIf",n.relationships.length),e.R7$(1),e.Y8G("ngIf",!n.relationships.length),e.R7$(1),e.Y8G("ngIf",n.relationshipEditorOpen)}}let at=(()=>{class i{constructor(){this.apiId=null,this.workspaceChanged=new e.bkB,this.http=(0,e.WQX)(L.Qq),this.transloco=(0,e.WQX)(Ee.JO),this.snack=(0,e.WQX)(Z.UG),this.allServices=[],this.workspace=[],this.relationships=[],this.serviceToAdd=null,this.relationshipEditorOpen=!1,this.localTables=[],this.localFields=[],this.refTables=[],this.refFields=[],this.junctionTables=[],this.junctionFields=[],this.rel=this.emptyRel(),this.workspaceServices=[],this.addableServices=[]}ngOnChanges(t){t.apiId&&this.apiId&&(this.loadServices(),this.loadWorkspace(),this.loadRelationships(),this.rel=this.emptyRel())}emptyRel(){return{service:null,table:null,field:null,type:"belongs_to",ref_service:null,ref_table:null,ref_field:null,junction_service:null,junction_table:null,junction_field:null,junction_ref_field:null,name:""}}serviceName(t){return this.allServices.find(n=>n.id===t)?.name??`#${t}`}serviceLabel(t){const n=this.allServices.find(r=>r.id===t);return n?.label||n?.name||`#${t}`}serviceType(t){return this.allServices.find(n=>n.id===t)?.type??"service"}refreshServiceLists(){const t=new Set(this.workspace.map(n=>n.serviceId));this.workspaceServices=this.allServices.filter(n=>t.has(n.id)),this.addableServices=this.allServices.filter(n=>!t.has(n.id))}trackById(t,n){return n.id}relReady(){const t=this.rel;return!!(t.service&&t.table&&t.field&&t.ref_service&&t.ref_table&&t.ref_field&&("many_many"!==t.type||t.junction_service&&t.junction_table&&t.junction_field&&t.junction_ref_field))}toggleRelationshipEditor(){this.relationshipEditorOpen=!this.relationshipEditorOpen,this.relationshipEditorOpen||(this.rel=this.emptyRel())}relationshipSummary(t){return`${this.relationshipTypeLabel(t.type)} from ${t.service}.${t.table} to ${t.refService&&t.refTable?`${t.refService}.${t.refTable}`:"related dataset"}`}relationshipTypeLabel(t){switch(t){case"belongs_to":return"Many to one";case"has_one":return"One to one";case"has_many":return"One to many";case"many_many":return"Many to many";default:return t.replaceAll("_"," ")}}relPreview(){const t=this.rel;return t.service&&t.table&&t.field?`${t.service}.${t.table}.${t.field} ${t.type.replace("_"," ")} ${t.ref_service&&t.ref_table&&t.ref_field?`${t.ref_service}.${t.ref_table}.${t.ref_field}`:"(choose the related record)"}${t.name?`, attached as "${t.name}"`:""}`:""}typeHint(){switch(this.rel.type){case"belongs_to":return"Each record here points to one record in the other service (an order belongs to one customer).";case"has_many":return"Each record here links to many records in the other service (a customer has many orders).";case"has_one":return"Each record here links to exactly one record in the other service.";case"many_many":return"Many records on each side connect through a junction table.";default:return""}}loadServices(){this.http.get(`${u.C}/system/service`,{params:{fields:"id,name,type,label",limit:500}}).subscribe(t=>{this.allServices=t.resource??[],this.refreshServiceLists()})}loadWorkspace(){this.http.get(`${u.C}/api_builder/services`,{params:{filter:`api_id=${this.apiId}`}}).subscribe(t=>{this.workspace=t.resource??[],this.refreshServiceLists()})}loadRelationships(){this.http.get(`${u.C}/api_builder/relationships`,{params:{api_id:`${this.apiId}`}}).subscribe(t=>this.relationships=t.resource??[])}addService(){!this.serviceToAdd||!this.apiId||this.http.post(`${u.C}/api_builder/services`,{resource:[{apiId:this.apiId,serviceId:this.serviceToAdd}]},{context:(0,h.PH)()}).subscribe({next:()=>{this.serviceToAdd=null,this.loadWorkspace(),this.workspaceChanged.emit()},error:t=>this.fail(t)})}removeService(t){this.http.delete(`${u.C}/api_builder/services/${t.id}`,{context:(0,h.PH)()}).subscribe({next:()=>{this.loadWorkspace(),this.workspaceChanged.emit()},error:n=>this.fail(n)})}sourceChanged(t){return"local"===t?(this.rel.table=null,this.rel.field=null,this.localTables=[],this.localFields=[],void this.loadTables(this.rel.service,t)):"ref"===t?(this.rel.ref_table=null,this.rel.ref_field=null,this.refTables=[],this.refFields=[],void this.loadTables(this.rel.ref_service,t)):(this.rel.junction_table=null,this.rel.junction_field=null,this.rel.junction_ref_field=null,this.junctionTables=[],this.junctionFields=[],void this.loadTables(this.rel.junction_service,t))}tableChanged(t){return"local"===t?(this.rel.field=null,void this.loadFields(this.rel.service,this.rel.table,t)):"ref"===t?(this.rel.ref_field=null,void this.loadFields(this.rel.ref_service,this.rel.ref_table,t)):(this.rel.junction_field=null,this.rel.junction_ref_field=null,void this.loadFields(this.rel.junction_service,this.rel.junction_table,t))}loadTables(t,n){t&&this.http.get(`${u.C}/${t}/_table`,{params:{fields:"name"}}).subscribe(r=>{const s=(r.resource??[]).map(a=>a.name);"local"===n?this.localTables=s:"ref"===n?this.refTables=s:this.junctionTables=s})}loadFields(t,n,r){!t||!n||this.http.get(`${u.C}/${t}/_schema/${n}`,{params:{fields:"name"}}).subscribe(s=>{const a=(s.field??[]).map(l=>l.name);"local"===r?this.localFields=a:"ref"===r?this.refFields=a:this.junctionFields=a})}createRelationship(){if(!this.relReady()||!this.apiId)return;const t=this.rel,n={apiId:this.apiId,service:t.service,table:t.table,field:t.field,type:t.type,refService:t.ref_service,refTable:t.ref_table,refField:t.ref_field,name:t.name||void 0};"many_many"===t.type&&(n.junctionService=t.junction_service,n.junctionTable=t.junction_table,n.junctionField=t.junction_field,n.junctionRefField=t.junction_ref_field),this.http.post(`${u.C}/api_builder/relationships`,n,{context:(0,h.PH)()}).subscribe({next:()=>{this.rel=this.emptyRel(),this.relationshipEditorOpen=!1,this.loadRelationships(),this.snack.open("Relationship created.","OK",{duration:2500})},error:r=>this.fail(r)})}removeRelationship(t){window.confirm(`Delete the shared relationship "${t.alias||t.name}"? Other APIs using this DreamFactory schema relationship may stop working.`)&&this.http.delete(`${u.C}/api_builder/relationships/${t.id}`,{context:(0,h.PH)()}).subscribe({next:()=>this.loadRelationships(),error:r=>this.fail(r)})}fail(t){this.snack.open(this.transloco.translate((0,G.cQ)(t).message),"Dismiss",{duration:5e3})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-api-builder-workspace"]],inputs:{apiId:"apiId"},outputs:{workspaceChanged:"workspaceChanged"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[["class","ws-card",4,"ngIf"],[1,"ws-card"],[1,"ws-intro"],[1,"ws-count"],[1,"ws-scope-note"],[1,"ws-step"],[1,"ws-hint"],["class","ws-source-list",4,"ngIf","ngIfElse"],["noSources",""],[1,"ws-add"],["appearance","outline"],[3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["mat-stroked-button","","type","button",3,"disabled","click"],[1,"ws-divider"],[1,"ws-section-head"],["class","ws-relationships",4,"ngIf"],["class","ws-empty-inline",4,"ngIf"],["class","ws-rel-editor",4,"ngIf"],[1,"ws-source-list"],["class","ws-source",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ws-source"],[1,"ws-li-icon"],["mat-icon-button","","type","button","aria-label","Remove data source","matTooltip","Remove from this API",3,"click"],[1,"ws-empty-card"],[3,"value"],[1,"ws-relationships"],["class","ws-relationship",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ws-relationship"],[1,"ws-shared-badge"],["mat-icon-button","","type","button","color","warn","aria-label","Delete shared relationship","matTooltip","Delete shared schema relationship",3,"click"],[1,"ws-empty-inline"],[1,"ws-rel-editor"],[1,"ws-editor-heading"],[1,"ws-step-number"],[1,"ws-rel-grid"],[3,"ngModel","ngModelChange","selectionChange"],[3,"ngModel","disabled","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"ngModel","disabled","ngModelChange"],["value","belongs_to"],["value","has_one"],["value","has_many"],["value","many_many"],[1,"ws-type-hint"],["class","ws-junction",4,"ngIf"],[1,"ws-output-name"],["matInput","","maxlength","100","placeholder","e.g. customer",3,"ngModel","ngModelChange"],[1,"ws-rel-footer"],["class","ws-rel-preview",4,"ngIf"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],[1,"ws-junction"],[1,"ws-editor-heading","compact"],[1,"ws-rel-preview"]],template:function(n,r){1&n&&e.DNE(0,ot,45,14,"mat-card",0),2&n&&e.Y8G("ngIf",r.apiId)},dependencies:[c.MD,c.Sq,c.bT,m.YN,m.me,m.BC,m.tU,m.vS,P.Hl,P.$z,P.iY,O.Hu,O.RN,w.RG,w.rl,w.nJ,w.MV,T.m_,T.An,H.fS,H.fg,K.Sy,K.wT,Q.Ve,Q.VO,Z._T,ee.uc,ee.oV],styles:[".ws-card[_ngcontent-%COMP%]{margin-top:16px;padding:16px}.ws-intro[_ngcontent-%COMP%]{border-left:3px solid #3f51b5;padding-left:12px;margin-bottom:16px}.ws-intro[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 4px}.ws-intro[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--df-text-2);font-size:13px;margin:0;max-width:720px}.ws-step[_ngcontent-%COMP%]{margin:20px 0 4px;font-size:15px}.ws-subhead[_ngcontent-%COMP%]{font-weight:600;font-size:13px;margin:14px 0 4px}.ws-hint[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:12px;margin:0 0 8px;max-width:720px}.ws-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0 0 12px}.ws-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:3px 0}.ws-li-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px;vertical-align:middle;margin-right:6px;opacity:.6}.ws-rel-detail[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:12px}.ws-empty[_ngcontent-%COMP%]{color:var(--df-text-faint);font-style:italic}.ws-add[_ngcontent-%COMP%], .ws-rel-form[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.ws-rel-form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{width:150px}.ws-rel-form[_ngcontent-%COMP%] .ws-name-field[_ngcontent-%COMP%]{width:240px}.ws-side-label[_ngcontent-%COMP%]{flex-basis:100%;font-weight:600;font-size:12px;color:#3f51b5;margin-top:8px}.ws-type-hint[_ngcontent-%COMP%]{flex-basis:100%;color:var(--df-text-muted);font-size:12px;margin:0}.ws-rel-footer[_ngcontent-%COMP%]{display:flex;align-items:center;gap:14px;margin-top:12px;flex-wrap:wrap}.ws-rel-preview[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin:0;font-family:monospace;font-size:13px;background:#f2f3fb;color:#303f9f;padding:6px 10px;border-radius:4px}.ws-rel-preview[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px}.ws-intro[_ngcontent-%COMP%]{align-items:flex-start;display:flex;justify-content:space-between}.ws-count[_ngcontent-%COMP%], .ws-shared-badge[_ngcontent-%COMP%]{background:rgba(63,81,181,.1);border-radius:999px;color:#303f9f;flex:none;font-size:11px;font-weight:700;padding:4px 9px}.ws-scope-note[_ngcontent-%COMP%]{align-items:center;background:rgba(63,81,181,.06);border-radius:6px;display:flex;font-size:12px;gap:8px;margin:0 0 14px;padding:8px 10px}.ws-scope-note[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#3f51b5;flex:none;font-size:18px;height:18px;width:18px}.ws-source-list[_ngcontent-%COMP%], .ws-relationships[_ngcontent-%COMP%]{display:grid;gap:8px;margin:8px 0 12px}.ws-source[_ngcontent-%COMP%], .ws-relationship[_ngcontent-%COMP%]{align-items:center;border:1px solid rgba(127,127,127,.22);border-radius:7px;display:flex;gap:10px;min-height:48px;padding:4px 6px 4px 12px}.ws-source[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .ws-relationship[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(.ws-shared-badge){align-items:center;display:flex;flex:1;gap:7px;min-width:0}.ws-source[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .ws-relationship[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.65}.ws-relationship[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{color:#3f51b5}.ws-relationship[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:not(.ws-shared-badge){align-items:flex-start;flex-direction:column;gap:1px}.ws-empty-card[_ngcontent-%COMP%], .ws-empty-inline[_ngcontent-%COMP%]{border:1px dashed rgba(127,127,127,.35);border-radius:7px;margin:8px 0 12px;opacity:.7;padding:12px}.ws-empty-inline[_ngcontent-%COMP%]{border:0;padding:0}.ws-add[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:320px}.ws-divider[_ngcontent-%COMP%]{border-top:1px solid rgba(127,127,127,.2);margin:10px 0 18px}.ws-section-head[_ngcontent-%COMP%]{align-items:center;display:flex;gap:12px;justify-content:space-between}.ws-section-head[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .ws-section-head[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}.ws-section-head[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font-size:12px;opacity:.7}.ws-rel-editor[_ngcontent-%COMP%]{background:rgba(127,127,127,.035);border:1px solid rgba(63,81,181,.3);border-radius:8px;display:grid;gap:14px;margin-top:14px;padding:14px}.ws-editor-heading[_ngcontent-%COMP%]{align-items:center;display:flex;gap:10px}.ws-editor-heading[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{display:flex;flex-direction:column}.ws-editor-heading[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.68}.ws-editor-heading.compact[_ngcontent-%COMP%]{margin-bottom:10px}.ws-step-number[_ngcontent-%COMP%]{align-items:center;background:#3f51b5;border-radius:50%;color:#fff;display:inline-flex;flex:none;font-weight:700;height:26px;justify-content:center;width:26px}.ws-rel-grid[_ngcontent-%COMP%]{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(150px,1fr))}.ws-rel-grid[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:0;width:auto}.ws-junction[_ngcontent-%COMP%]{background:rgba(63,81,181,.05);border-radius:7px;padding:12px}.ws-output-name[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{max-width:360px;width:100%}.ws-rel-footer[_ngcontent-%COMP%]{justify-content:space-between}@media (max-width: 980px){.ws-intro[_ngcontent-%COMP%], .ws-section-head[_ngcontent-%COMP%]{align-items:stretch;flex-direction:column}.ws-rel-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}.ws-add[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:0;width:100%}}"]})}}return i})(),lt=(()=>{class i{toApiPayload(t){return{name:t.name,base_path:t.basePath,label:t.label,description:t.description,status:t.status}}toEndpointPayload(t){return{api_id:t.apiId,method:t.method,path:t.path,label:t.label,description:t.description,is_active:t.isActive,request_schema:t.requestSchema,response_schema:t.responseSchema,execution_plan:t.executionPlan,response_mapping:t.responseMapping}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=e.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function ct(i,o){if(1&i&&(e.j41(0,"div",11)(1,"div")(2,"span"),e.EFF(3,"Fields"),e.k0s(),e.j41(4,"strong"),e.EFF(5),e.k0s()(),e.j41(6,"div")(7,"span"),e.EFF(8,"Related datasets"),e.k0s(),e.j41(9,"strong"),e.EFF(10),e.k0s()()()),2&i){const t=e.XpG();e.R7$(5),e.JRh(t.fieldNames.length),e.R7$(5),e.JRh(t.relationshipNames.length)}}function pt(i,o){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.JRh(t)}}function dt(i,o){if(1&i&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI("+",t.fieldNames.length-8,"")}}function ut(i,o){if(1&i&&(e.j41(0,"div",12),e.DNE(1,pt,2,1,"span",13),e.nI1(2,"slice"),e.DNE(3,dt,2,1,"span",9),e.k0s()),2&i){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",e.brH(2,2,t.fieldNames,0,8)),e.R7$(2),e.Y8G("ngIf",t.fieldNames.length>8)}}function mt(i,o){if(1&i&&(e.j41(0,"span")(1,"mat-icon"),e.EFF(2,"account_tree"),e.k0s(),e.EFF(3),e.k0s()),2&i){const t=o.$implicit;e.R7$(3),e.SpI(" ",t," ")}}function _t(i,o){if(1&i&&(e.j41(0,"div",14),e.DNE(1,mt,4,1,"span",13),e.k0s()),2&i){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.relationshipNames)}}function ft(i,o){if(1&i&&(e.j41(0,"p",15)(1,"mat-icon"),e.EFF(2,"visibility"),e.k0s(),e.j41(3,"span"),e.EFF(4),e.k0s()()),2&i){const t=e.XpG();e.R7$(4),e.SpI(" ",t.canPreview?"Run a preview to inspect the response before saving.":"Choose a data source and response fields to begin."," ")}}function ht(i,o){1&i&&(e.j41(0,"p",16)(1,"mat-icon"),e.EFF(2,"update"),e.k0s(),e.EFF(3," The definition changed. Refresh to see the current response. "),e.k0s())}function gt(i,o){if(1&i&&(e.j41(0,"pre"),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.R7$(1),e.JRh(t.previewResult)}}function bt(i,o){if(1&i&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.JRh(t.error)}}function Ft(i,o){if(1&i&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.JRh(t.preview)}}function vt(i,o){if(1&i&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&i){const t=e.XpG().$implicit;e.R7$(1),e.SpI("",t.ms,"ms")}}function xt(i,o){if(1&i&&(e.j41(0,"div",19)(1,"mat-icon"),e.EFF(2),e.k0s(),e.j41(3,"span")(4,"strong"),e.EFF(5),e.k0s(),e.j41(6,"small"),e.EFF(7),e.k0s(),e.DNE(8,bt,2,1,"small",9),e.DNE(9,Ft,2,1,"small",9),e.k0s(),e.DNE(10,vt,2,1,"small",9),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.AVh("failed",!1===t.ok),e.R7$(1),e.SpI(" ",!1===t.ok?"error":"check_circle"," "),e.R7$(3),e.JRh(t.key),e.R7$(2),e.E5c(" ",t.method," ",t.service,"/",t.resource," "),e.R7$(1),e.Y8G("ngIf",!1===t.ok),e.R7$(1),e.Y8G("ngIf",!1!==t.ok),e.R7$(1),e.Y8G("ngIf",null!=t.ms)}}function Ct(i,o){if(1&i&&(e.j41(0,"details",17)(1,"summary")(2,"mat-icon"),e.EFF(3),e.k0s(),e.EFF(4),e.k0s(),e.DNE(5,xt,11,10,"div",18),e.k0s()),2&i){const t=e.XpG();e.R7$(3),e.JRh(!1===t.previewOk?"error":"check_circle"),e.R7$(1),e.Lme(" Execution details \xb7 ",t.trace.length," step",1===t.trace.length?"":"s"," "),e.R7$(1),e.Y8G("ngForOf",t.trace)("ngForTrackBy",t.trackByIndex)}}let kt=(()=>{class i{constructor(){this.routeLabel="",this.sourceSummary="",this.fieldNames=[],this.relationshipNames=[],this.previewResult="",this.previewStale=!1,this.previewing=!1,this.canPreview=!1,this.previewOk=null,this.trace=[],this.previewRequested=new e.bkB}trackByIndex(t){return t}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-api-builder-preview"]],inputs:{routeLabel:"routeLabel",sourceSummary:"sourceSummary",fieldNames:"fieldNames",relationshipNames:"relationshipNames",previewResult:"previewResult",previewStale:"previewStale",previewing:"previewing",canPreview:"canPreview",previewOk:"previewOk",trace:"trace"},outputs:{previewRequested:"previewRequested"},standalone:!0,features:[e.aNF],decls:26,vars:11,consts:[[1,"preview-card"],[1,"preview-heading"],["mat-stroked-button","","type","button",3,"disabled","click"],[1,"route-summary"],["class","contract-summary",4,"ngIf"],["class","contract-tags",4,"ngIf"],["class","relationship-tags",4,"ngIf"],["class","preview-empty",4,"ngIf"],["class","preview-warning",4,"ngIf"],[4,"ngIf"],["class","trace",4,"ngIf"],[1,"contract-summary"],[1,"contract-tags"],[4,"ngFor","ngForOf"],[1,"relationship-tags"],[1,"preview-empty"],[1,"preview-warning"],[1,"trace"],["class","trace-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"trace-row"]],template:function(n,r){1&n&&(e.j41(0,"aside",0)(1,"div",1)(2,"span")(3,"strong"),e.EFF(4,"Response preview"),e.k0s(),e.j41(5,"small"),e.EFF(6,"What API consumers will receive"),e.k0s()(),e.j41(7,"button",2),e.bIt("click",function(){return r.previewRequested.emit()}),e.j41(8,"mat-icon"),e.EFF(9,"play_arrow"),e.k0s(),e.EFF(10),e.k0s()(),e.j41(11,"div",3)(12,"mat-icon"),e.EFF(13,"route"),e.k0s(),e.j41(14,"span")(15,"strong"),e.EFF(16),e.k0s(),e.j41(17,"small"),e.EFF(18),e.k0s()()(),e.DNE(19,ct,11,2,"div",4),e.DNE(20,ut,4,6,"div",5),e.DNE(21,_t,2,1,"div",6),e.DNE(22,ft,5,1,"p",7),e.DNE(23,ht,4,0,"p",8),e.DNE(24,gt,2,1,"pre",9),e.DNE(25,Ct,6,5,"details",10),e.k0s()),2&n&&(e.R7$(7),e.Y8G("disabled",!r.canPreview||r.previewing),e.R7$(3),e.SpI(" ",r.previewResult?"Refresh":"Run preview"," "),e.R7$(6),e.JRh(r.routeLabel),e.R7$(2),e.JRh(r.sourceSummary),e.R7$(1),e.Y8G("ngIf",r.canPreview),e.R7$(1),e.Y8G("ngIf",r.fieldNames.length),e.R7$(1),e.Y8G("ngIf",r.relationshipNames.length),e.R7$(1),e.Y8G("ngIf",!r.previewResult),e.R7$(1),e.Y8G("ngIf",r.previewResult&&r.previewStale),e.R7$(1),e.Y8G("ngIf",r.previewResult),e.R7$(1),e.Y8G("ngIf",r.trace.length))},dependencies:[c.MD,c.Sq,c.bT,c.P9,P.Hl,P.$z,T.m_,T.An],styles:["[_nghost-%COMP%]{align-self:start;display:block;max-width:100%;min-width:0;position:sticky;top:16px;width:100%}.preview-card[_ngcontent-%COMP%]{border:1px solid rgba(63,81,181,.3);border-radius:9px;display:grid;gap:12px;min-width:0;padding:14px;width:100%;box-sizing:border-box}.preview-heading[_ngcontent-%COMP%]{align-items:center;display:flex;gap:10px;justify-content:space-between}.preview-heading[_ngcontent-%COMP%] > span[_ngcontent-%COMP%], .route-summary[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}small[_ngcontent-%COMP%]{opacity:.68}.route-summary[_ngcontent-%COMP%]{align-items:flex-start;background:rgba(63,81,181,.08);border-radius:7px;display:flex;gap:8px;padding:10px}.route-summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#3f51b5}.route-summary[_ngcontent-%COMP%] strong[_ngcontent-%COMP%], .route-summary[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.contract-summary[_ngcontent-%COMP%]{display:grid;gap:8px;grid-template-columns:1fr 1fr}.contract-summary[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{background:rgba(127,127,127,.07);border-radius:6px;display:flex;flex-direction:column;padding:8px}.contract-summary[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{font-size:11px;opacity:.65;text-transform:uppercase}.contract-tags[_ngcontent-%COMP%], .relationship-tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:5px}.contract-tags[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .relationship-tags[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{align-items:center;border:1px solid rgba(127,127,127,.3);border-radius:999px;display:inline-flex;font-size:11px;gap:3px;max-width:100%;min-width:0;padding:3px 7px}.relationship-tags[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:13px;height:13px;width:13px}.preview-empty[_ngcontent-%COMP%], .preview-warning[_ngcontent-%COMP%]{align-items:center;border:1px dashed rgba(127,127,127,.35);border-radius:7px;display:flex;gap:8px;margin:0;padding:12px}.preview-empty[_ngcontent-%COMP%]{opacity:.7}.preview-warning[_ngcontent-%COMP%]{background:rgba(255,171,0,.08);border-color:#ffab0073}pre[_ngcontent-%COMP%]{background:#101418;border-radius:6px;color:#f4f7fb;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;margin:0;max-height:480px;overflow:auto;padding:12px;overflow-wrap:anywhere;word-break:break-word;white-space:pre-wrap}.preview-warning[_ngcontent-%COMP%], .preview-empty[_ngcontent-%COMP%], .trace-row[_ngcontent-%COMP%] small[_ngcontent-%COMP%], .route-summary[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{overflow-wrap:anywhere}.trace[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{align-items:center;cursor:pointer;display:flex;font-size:12px;font-weight:600;gap:5px}.trace[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%], .trace-row[_ngcontent-%COMP%] > mat-icon[_ngcontent-%COMP%]{color:#1a7f43;font-size:16px;height:16px;width:16px}.trace-row[_ngcontent-%COMP%]{align-items:flex-start;border-top:1px solid rgba(127,127,127,.16);display:flex;gap:7px;padding:7px 0}.trace-row[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;flex:1;flex-direction:column;min-width:0}.trace-row[_ngcontent-%COMP%] .failed[_ngcontent-%COMP%]{color:#c62828}@media (max-width: 1120px){[_nghost-%COMP%]{position:static}}"]})}}return i})();function yt(i,o){1&i&&(e.j41(0,"div")(1,"p",11),e.EFF(2,"API Builder"),e.k0s(),e.j41(3,"h1"),e.EFF(4,"Custom APIs"),e.k0s(),e.j41(5,"p"),e.EFF(6," Expose purpose-built datasets without publishing your underlying service structure. "),e.k0s()())}function wt(i,o){if(1&i){const t=e.RV6();e.j41(0,"a",12),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.closeEditor())})("keydown.enter",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.closeEditor())}),e.j41(1,"mat-icon"),e.EFF(2,"arrow_back"),e.k0s(),e.EFF(3," All APIs "),e.k0s()}}function Et(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",13),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.newApi())}),e.j41(1,"mat-icon"),e.EFF(2,"add"),e.k0s(),e.EFF(3," New API "),e.k0s()}}function jt(i,o){1&i&&e.nrm(0,"mat-progress-bar",14)}function Ot(i,o){if(1&i){const t=e.RV6();e.j41(0,"mat-card",18),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(2);return e.Njj(a.selectApi(s.id))}),e.j41(1,"mat-card-header")(2,"mat-icon",19),e.EFF(3,"api"),e.k0s(),e.j41(4,"mat-card-title"),e.EFF(5),e.k0s(),e.j41(6,"mat-card-subtitle"),e.EFF(7),e.k0s(),e.j41(8,"button",20),e.bIt("click",function(r){const a=e.eBV(t).$implicit,l=e.XpG(2);return e.Njj(l.deleteApi(a.id,r))}),e.j41(9,"mat-icon"),e.EFF(10,"delete"),e.k0s()()(),e.j41(11,"mat-card-content")(12,"p"),e.EFF(13),e.k0s(),e.j41(14,"div",21)(15,"span"),e.EFF(16),e.k0s(),e.j41(17,"span",22),e.EFF(18),e.k0s()()()()}if(2&i){const t=o.$implicit,n=e.XpG(2);let r;e.R7$(5),e.JRh(t.label||t.name),e.R7$(2),e.SpI("/",t.basePath||t.base_path,""),e.R7$(6),e.JRh(t.description||"No description yet."),e.R7$(2),e.ZvI("status-chip status-",t.status||"draft",""),e.R7$(1),e.JRh(t.status||"draft"),e.R7$(2),e.Lme(" ",null!==(r=n.endpointCounts.get(t.id))&&void 0!==r?r:0," ",1===(null!==(r=n.endpointCounts.get(t.id))&&void 0!==r?r:0)?"endpoint":"endpoints"," ")}}function Rt(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",15)(1,"mat-card",16),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.newApi())}),e.j41(2,"mat-card-content")(3,"mat-icon"),e.EFF(4,"add_circle"),e.k0s(),e.j41(5,"strong"),e.EFF(6,"Create API"),e.k0s(),e.j41(7,"span"),e.EFF(8,"Start a custom API with one or more endpoints."),e.k0s()()(),e.DNE(9,Ot,19,9,"mat-card",17),e.k0s()}if(2&i){const t=e.XpG();e.R7$(9),e.Y8G("ngForOf",t.apis)("ngForTrackBy",t.trackById)}}function Pt(i,o){1&i&&(e.j41(0,"div",23)(1,"mat-icon"),e.EFF(2,"api"),e.k0s(),e.j41(3,"strong"),e.EFF(4,"No custom APIs yet"),e.k0s(),e.j41(5,"span"),e.EFF(6,"Create one to start composing database, RWS, and scripted calls."),e.k0s()())}function St(i,o){if(1&i&&(e.j41(0,"code",47),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI("/api/v2/",t.apiForm.value.basePath,"")}}function It(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",41),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.updateApiStatus("published"))}),e.j41(1,"mat-icon"),e.EFF(2,"publish"),e.k0s(),e.EFF(3," Publish API "),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("disabled",t.saving)}}function Mt(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",34),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.updateApiStatus("draft"))}),e.EFF(1," Move to draft "),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("disabled",t.saving)}}function At(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.apiDetailsOpen=!r.apiDetailsOpen)}),e.j41(1,"mat-icon"),e.EFF(2),e.k0s(),e.EFF(3),e.k0s()}if(2&i){const t=e.XpG(2);e.R7$(2),e.JRh(t.apiDetailsOpen?"close":"edit"),e.R7$(1),e.SpI(" ",t.apiDetailsOpen?"Close details":"Edit details"," ")}}function $t(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.deleteApi(r.selectedApiId))}),e.j41(1,"mat-icon"),e.EFF(2,"delete"),e.k0s(),e.EFF(3," Delete "),e.k0s()}}function Tt(i,o){1&i&&(e.j41(0,"mat-error"),e.EFF(1," API URL is required. "),e.k0s())}function Dt(i,o){1&i&&(e.j41(0,"mat-error"),e.EFF(1," Use letters, numbers, dashes, or underscores only. "),e.k0s())}function Bt(i,o){if(1&i&&(e.j41(0,"div",50)(1,"mat-form-field",51)(2,"mat-label"),e.EFF(3,"API Name"),e.k0s(),e.nrm(4,"input",52),e.k0s(),e.j41(5,"mat-form-field",51)(6,"mat-label"),e.EFF(7,"Base URL Path"),e.k0s(),e.nrm(8,"input",53),e.j41(9,"mat-hint"),e.EFF(10,"Your endpoints start at /api/v2/"),e.k0s(),e.DNE(11,Tt,2,0,"mat-error",2),e.DNE(12,Dt,2,0,"mat-error",2),e.k0s(),e.j41(13,"mat-form-field",54)(14,"mat-label"),e.EFF(15,"Description"),e.k0s(),e.nrm(16,"textarea",55),e.k0s(),e.j41(17,"button",56)(18,"mat-icon"),e.EFF(19,"save"),e.k0s(),e.EFF(20," Save details "),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(11),e.Y8G("ngIf",t.apiForm.controls.basePath.hasError("required")),e.R7$(1),e.Y8G("ngIf",t.apiForm.controls.basePath.hasError("pattern")),e.R7$(5),e.Y8G("disabled",t.apiForm.invalid||t.saving)}}function Nt(i,o){if(1&i){const t=e.RV6();e.j41(0,"df-api-builder-workspace",57),e.bIt("workspaceChanged",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.loadWorkspaceServices(r.selectedApiId))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("apiId",t.selectedApiId)}}function Gt(i,o){1&i&&(e.j41(0,"p",58)(1,"mat-icon"),e.EFF(2,"info"),e.k0s(),e.j41(3,"span"),e.EFF(4,"Save the API above first \u2014 then you can add endpoints to it."),e.k0s()())}function Vt(i,o){1&i&&e.eu8(0)}function Xt(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",59)(1,"div",60)(2,"div",61)(3,"span",62),e.EFF(4,"NEW"),e.k0s(),e.j41(5,"span",63),e.EFF(6),e.k0s(),e.j41(7,"span",64),e.EFF(8),e.k0s()(),e.j41(9,"button",65),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.cancelAddEndpoint())}),e.j41(10,"mat-icon"),e.EFF(11,"close"),e.k0s()()(),e.j41(12,"div",66),e.DNE(13,Vt,1,0,"ng-container",67),e.k0s()()}if(2&i){const t=e.XpG(2),n=e.sdS(11);e.R7$(6),e.JRh(t.endpointForm.value.path||"new endpoint"),e.R7$(2),e.JRh(t.endpointForm.value.label||"Unsaved endpoint"),e.R7$(5),e.Y8G("ngTemplateOutlet",n)}}function Yt(i,o){1&i&&e.eu8(0)}function Lt(i,o){if(1&i&&(e.j41(0,"div",66),e.DNE(1,Yt,1,0,"ng-container",67),e.k0s()),2&i){e.XpG(3);const t=e.sdS(11);e.R7$(1),e.Y8G("ngTemplateOutlet",t)}}function Wt(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",68)(1,"div",60)(2,"button",69),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(2);return e.Njj(a.toggleEndpoint(s))}),e.j41(3,"span"),e.nI1(4,"lowercase"),e.EFF(5),e.k0s(),e.j41(6,"span",63),e.EFF(7),e.k0s(),e.j41(8,"span",64),e.EFF(9),e.k0s(),e.nrm(10,"span",70),e.j41(11,"mat-icon",71),e.EFF(12),e.k0s()(),e.j41(13,"button",72),e.bIt("click",function(r){const a=e.eBV(t).$implicit,l=e.XpG(2);return e.Njj(l.deleteEndpoint(a.id,r))}),e.j41(14,"mat-icon"),e.EFF(15,"delete"),e.k0s()()(),e.DNE(16,Lt,2,1,"div",73),e.k0s()}if(2&i){const t=o.$implicit,n=e.XpG(2);e.AVh("open",t.id===n.selectedEndpointId&&!n.addingEndpoint),e.R7$(3),e.ZvI("method-chip method-",e.bMT(4,10,t.method||"get"),""),e.R7$(2),e.JRh(t.method),e.R7$(2),e.JRh(t.path),e.R7$(2),e.JRh(t.label||"Untitled endpoint"),e.R7$(3),e.JRh(t.id!==n.selectedEndpointId||n.addingEndpoint?"expand_more":"expand_less"),e.R7$(4),e.Y8G("ngIf",t.id===n.selectedEndpointId&&!n.addingEndpoint)}}function Jt(i,o){1&i&&(e.j41(0,"div",74)(1,"mat-icon"),e.EFF(2,"route"),e.k0s(),e.j41(3,"strong"),e.EFF(4,"No endpoints yet"),e.k0s(),e.j41(5,"span"),e.EFF(6,"Add an endpoint to expose data from a source."),e.k0s()())}function zt(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",24)(1,"mat-card",25)(2,"form",26),e.bIt("ngSubmit",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.saveApi())}),e.j41(3,"div",27)(4,"div",28)(5,"p",11),e.EFF(6,"Custom API"),e.k0s(),e.j41(7,"h2"),e.EFF(8),e.k0s(),e.DNE(9,St,2,1,"code",29),e.k0s(),e.j41(10,"div",30)(11,"span"),e.EFF(12),e.k0s(),e.DNE(13,It,4,1,"button",31),e.DNE(14,Mt,2,1,"button",32),e.DNE(15,At,4,2,"button",33),e.j41(16,"button",34),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.openApiDocs())}),e.j41(17,"mat-icon"),e.EFF(18,"description"),e.k0s(),e.EFF(19," API Docs "),e.k0s(),e.DNE(20,$t,4,0,"button",35),e.k0s()(),e.DNE(21,Bt,21,3,"div",36),e.k0s()(),e.DNE(22,Nt,1,1,"df-api-builder-workspace",37),e.j41(23,"div",38)(24,"div",39)(25,"div")(26,"h3"),e.EFF(27,"Endpoints"),e.k0s(),e.j41(28,"p",40),e.EFF(29," Define the public paths and response shapes consumers will use. "),e.k0s()(),e.j41(30,"button",41),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.addEndpoint())}),e.j41(31,"mat-icon"),e.EFF(32,"add"),e.k0s(),e.EFF(33," Add Endpoint "),e.k0s()(),e.DNE(34,Gt,5,0,"p",42),e.j41(35,"div",43),e.DNE(36,Xt,14,3,"div",44),e.DNE(37,Wt,17,12,"div",45),e.DNE(38,Jt,7,0,"div",46),e.k0s()()()}if(2&i){const t=e.XpG();e.R7$(2),e.Y8G("formGroup",t.apiForm),e.R7$(6),e.SpI(" ",t.apiForm.value.label||t.apiForm.value.basePath||"Untitled API"," "),e.R7$(1),e.Y8G("ngIf",t.apiForm.value.basePath),e.R7$(2),e.ZvI("status-chip status-",t.apiForm.value.status,""),e.R7$(1),e.JRh(t.apiForm.value.status||"draft"),e.R7$(1),e.Y8G("ngIf",t.selectedApiId&&"published"!==t.apiForm.value.status),e.R7$(1),e.Y8G("ngIf",t.selectedApiId&&"published"===t.apiForm.value.status),e.R7$(1),e.Y8G("ngIf",t.selectedApiId),e.R7$(1),e.Y8G("disabled",!t.selectedApiId),e.R7$(4),e.Y8G("ngIf",t.selectedApiId),e.R7$(1),e.Y8G("ngIf",t.apiDetailsOpen||!t.selectedApiId),e.R7$(1),e.Y8G("ngIf",t.selectedApiId),e.R7$(8),e.Y8G("disabled",!t.selectedApiId),e.R7$(4),e.Y8G("ngIf",!t.selectedApiId),e.R7$(2),e.Y8G("ngIf",t.addingEndpoint),e.R7$(1),e.Y8G("ngForOf",t.selectedEndpoints)("ngForTrackBy",t.trackById),e.R7$(1),e.Y8G("ngIf",t.selectedApiId&&0===t.selectedEndpoints.length&&!t.addingEndpoint)}}function qt(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",146),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(2);return e.Njj(a.focusWorkflowStep(s.key))}),e.j41(1,"span",147)(2,"mat-icon",148),e.EFF(3),e.k0s(),e.j41(4,"span",149),e.EFF(5),e.k0s()(),e.j41(6,"span",150),e.EFF(7),e.k0s()()}if(2&i){const t=o.$implicit;e.AVh("complete",t.complete),e.R7$(3),e.JRh(t.complete?"check_circle":"radio_button_unchecked"),e.R7$(2),e.JRh(t.label),e.R7$(2),e.JRh(t.detail)}}function Ut(i,o){1&i&&(e.j41(0,"mat-option",151),e.EFF(1," Loading sources\u2026 "),e.k0s())}function Ht(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.j41(2,"small",153),e.EFF(3),e.k0s()()),2&i){const t=o.$implicit,n=e.XpG(2);e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||t.name," "),e.R7$(2),e.Lme("",t.type," \xb7 ",n.introspectionBadge(t),"")}}function Kt(i,o){1&i&&(e.j41(0,"mat-option",151),e.EFF(1," No matching data sources "),e.k0s())}function Qt(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",156),e.bIt("click",function(){const s=e.eBV(t).$implicit,a=e.XpG(3);return e.Njj(a.selectRecentSource(s.name))}),e.EFF(1),e.k0s()}if(2&i){const t=o.$implicit;e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function Zt(i,o){if(1&i&&(e.j41(0,"div",154),e.DNE(1,Qt,2,1,"button",155),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.recentSourceServices)("ngForTrackBy",t.trackByName)}}function en(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.k0s()),2&i){const t=o.$implicit,n=e.XpG(2);e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||n.titleFromName(t.name)," ")}}function tn(i,o){if(1&i&&(e.j41(0,"mat-option",151),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.sourceForm.value.service?"No matching tables":"Select a source API first"," ")}}function nn(i,o){if(1&i&&(e.j41(0,"p",157),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.sourceIntrospectionHint," ")}}function rn(i,o){1&i&&(e.j41(0,"span",170),e.EFF(1,"Primary key"),e.k0s())}function sn(i,o){1&i&&(e.j41(0,"span",170),e.EFF(1,"Unique"),e.k0s())}function on(i,o){1&i&&(e.j41(0,"span",170),e.EFF(1,"Relationship"),e.k0s())}function an(i,o){1&i&&(e.j41(0,"span",170),e.EFF(1,"Nullable"),e.k0s())}function ln(i,o){if(1&i){const t=e.RV6();e.j41(0,"input",171),e.bIt("input",function(r){e.eBV(t);const s=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.setAlias(s.name,r.target.value))})("blur",function(){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.finishRenaming(r.name))}),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.Y8G("value",n.aliasFor(t.name))("placeholder","Return as "+t.name)}}function cn(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.startRenaming(r.name))}),e.j41(1,"mat-icon"),e.EFF(2,"drive_file_rename_outline"),e.k0s(),e.EFF(3," Rename "),e.k0s()}}function pn(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",164)(1,"mat-checkbox",165),e.bIt("change",function(r){const a=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.toggleField(a.name,r.checked))}),e.j41(2,"span",166),e.EFF(3),e.k0s(),e.j41(4,"small"),e.EFF(5),e.k0s(),e.DNE(6,rn,2,0,"span",167),e.DNE(7,sn,2,0,"span",167),e.DNE(8,on,2,0,"span",167),e.DNE(9,an,2,0,"span",167),e.k0s(),e.DNE(10,ln,1,2,"input",168),e.DNE(11,cn,4,0,"button",169),e.k0s()}if(2&i){const t=o.$implicit,n=e.XpG(3);let r;e.R7$(1),e.Y8G("checked",n.isFieldSelected(t.name)),e.R7$(2),e.JRh(t.label||n.titleFromName(t.name)),e.R7$(2),e.JRh(n.fieldTypeLabel(t)),e.R7$(1),e.Y8G("ngIf",n.isPrimaryKey(t)),e.R7$(1),e.Y8G("ngIf",n.isUnique(t)),e.R7$(1),e.Y8G("ngIf",n.isForeignKey(t)),e.R7$(1),e.Y8G("ngIf",null!==(r=t.allowNull)&&void 0!==r?r:t.allow_null),e.R7$(1),e.Y8G("ngIf",n.isFieldSelected(t.name)&&n.isRenaming(t.name)),e.R7$(1),e.Y8G("ngIf",n.isFieldSelected(t.name)&&!n.isRenaming(t.name))}}function dn(i,o){if(1&i){const t=e.RV6();e.j41(0,"section",158)(1,"div",103)(2,"span",159)(3,"span",79),e.EFF(4,"3"),e.k0s(),e.j41(5,"span")(6,"strong"),e.EFF(7,"Choose response fields"),e.k0s(),e.j41(8,"small"),e.EFF(9,"Choose what consumers can see and rename it if needed."),e.k0s()()(),e.j41(10,"span"),e.EFF(11),e.k0s()(),e.j41(12,"div",160)(13,"mat-form-field",51)(14,"mat-label"),e.EFF(15,"Find Fields"),e.k0s(),e.j41(16,"input",161),e.bIt("input",function(r){e.eBV(t);const s=e.XpG(2);return e.Njj(s.fieldSearch=r.target.value)}),e.k0s()(),e.j41(17,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.selectAllFields())}),e.j41(18,"mat-icon"),e.EFF(19,"select_all"),e.k0s(),e.EFF(20," Select All "),e.k0s(),e.j41(21,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.clearAllFields())}),e.j41(22,"mat-icon"),e.EFF(23,"deselect"),e.k0s(),e.EFF(24," Clear "),e.k0s()(),e.j41(25,"div",162),e.DNE(26,pn,12,9,"div",163),e.k0s()()}if(2&i){const t=e.XpG(2);e.R7$(11),e.Lme("",t.selectedFieldNames.length," of ",t.sourceFields.length,""),e.R7$(5),e.Y8G("value",t.fieldSearch),e.R7$(10),e.Y8G("ngForOf",t.displayedSourceFields)("ngForTrackBy",t.trackByName)}}function un(i,o){if(1&i&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.SpI(" ",t," ")}}function mn(i,o){if(1&i&&(e.j41(0,"div",177)(1,"mat-icon"),e.EFF(2,"warning"),e.k0s(),e.j41(3,"span")(4,"strong"),e.EFF(5,"Relationship configuration changed"),e.k0s(),e.DNE(6,un,2,1,"small",178),e.k0s()()),2&i){const t=e.XpG(3);e.R7$(6),e.Y8G("ngForOf",t.relationshipContractWarnings)}}function _n(i,o){if(1&i){const t=e.RV6();e.j41(0,"input",171),e.bIt("input",function(r){e.eBV(t);const s=e.XpG().$implicit,a=e.XpG(3);return e.Njj(a.setAlias(s.name,r.target.value))})("blur",function(){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.finishRenaming(r.name))}),e.k0s()}if(2&i){const t=e.XpG().$implicit,n=e.XpG(3);e.Y8G("value",n.aliasFor(t.name))("placeholder","Return as "+t.name)}}function fn(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){e.eBV(t);const r=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.startRenaming(r.name))}),e.j41(1,"mat-icon"),e.EFF(2,"drive_file_rename_outline"),e.k0s(),e.EFF(3," Rename response field "),e.k0s()}}function hn(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",179)(1,"mat-checkbox",180),e.bIt("change",function(r){const a=e.eBV(t).$implicit,l=e.XpG(3);return e.Njj(l.toggleRelationship(a.name,r.checked))}),e.j41(2,"strong"),e.EFF(3),e.k0s(),e.j41(4,"small"),e.EFF(5),e.k0s()(),e.DNE(6,_n,1,2,"input",168),e.DNE(7,fn,4,0,"button",169),e.k0s()}if(2&i){const t=o.$implicit,n=e.XpG(3);e.R7$(1),e.Y8G("checked",n.isRelationshipSelected(t.name)),e.R7$(2),e.JRh(t.label||n.titleFromName(t.name)),e.R7$(2),e.E5c(" ",n.relationshipTypeLabel(t.type)," \xb7 ",n.relationshipContractLabel(t.type)," \xb7 ",t.refTable||t.ref_table||"related dataset"," "),e.R7$(1),e.Y8G("ngIf",n.isRelationshipSelected(t.name)&&n.isRenaming(t.name)),e.R7$(1),e.Y8G("ngIf",n.isRelationshipSelected(t.name)&&!n.isRenaming(t.name))}}function gn(i,o){if(1&i&&(e.j41(0,"section",173)(1,"div",103)(2,"span",159)(3,"span",79),e.EFF(4,"4"),e.k0s(),e.j41(5,"span")(6,"strong"),e.EFF(7,"Add related data"),e.k0s(),e.j41(8,"small"),e.EFF(9,"Choose related resources to include in the same call."),e.k0s()()()(),e.DNE(10,mn,7,1,"div",174),e.j41(11,"div",175),e.DNE(12,hn,8,7,"div",176),e.k0s()()),2&i){const t=e.XpG(2);e.R7$(10),e.Y8G("ngIf",t.relationshipContractWarnings.length),e.R7$(2),e.Y8G("ngForOf",t.sourceRelationships)("ngForTrackBy",t.trackByName)}}function bn(i,o){1&i&&(e.j41(0,"div",181)(1,"mat-icon"),e.EFF(2,"filter_alt_off"),e.k0s(),e.j41(3,"span"),e.EFF(4,"No filters yet. This endpoint will return matching records from the selected table."),e.k0s()())}function Fn(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.k0s()),2&i){const t=o.$implicit,n=e.XpG(3);e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||n.titleFromName(t.name)," ")}}function vn(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.Y8G("value",t.value),e.R7$(1),e.SpI(" ",t.label," ")}}function xn(i,o){if(1&i){const t=e.RV6();e.j41(0,"div",182)(1,"mat-form-field",51)(2,"mat-label"),e.EFF(3,"Field"),e.k0s(),e.j41(4,"mat-select",183),e.bIt("selectionChange",function(r){const a=e.eBV(t).index,l=e.XpG(2);return e.Njj(l.updateFilter(a,"field",r.value))}),e.DNE(5,Fn,2,2,"mat-option",94),e.k0s()(),e.j41(6,"mat-form-field",51)(7,"mat-label"),e.EFF(8,"Match"),e.k0s(),e.j41(9,"mat-select",183),e.bIt("selectionChange",function(r){const a=e.eBV(t).index,l=e.XpG(2);return e.Njj(l.updateFilter(a,"operator",r.value))}),e.DNE(10,vn,2,2,"mat-option",94),e.k0s()(),e.j41(11,"mat-form-field",51)(12,"mat-label"),e.EFF(13,"Value"),e.k0s(),e.j41(14,"input",161),e.bIt("input",function(r){const a=e.eBV(t).index,l=e.XpG(2);return e.Njj(l.updateFilter(a,"value",r.target.value))}),e.k0s()(),e.j41(15,"button",184),e.bIt("click",function(){const s=e.eBV(t).index,a=e.XpG(2);return e.Njj(a.removeFilter(s))}),e.j41(16,"mat-icon"),e.EFF(17,"delete"),e.k0s()()()}if(2&i){const t=o.$implicit,n=e.XpG(2);e.R7$(4),e.Y8G("value",t.field),e.R7$(1),e.Y8G("ngForOf",n.sourceFields)("ngForTrackBy",n.trackByName),e.R7$(4),e.Y8G("value",t.operator),e.R7$(1),e.Y8G("ngForOf",n.filterOperatorOptions(t.field))("ngForTrackBy",n.trackByOptionValue),e.R7$(4),e.Y8G("value",t.value)}}function Cn(i,o){if(1&i&&(e.j41(0,"mat-option",152),e.EFF(1),e.k0s()),2&i){const t=o.$implicit,n=e.XpG(2);e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label||n.titleFromName(t.name)," ")}}function kn(i,o){1&i&&(e.j41(0,"p",58)(1,"mat-icon"),e.EFF(2,"info"),e.k0s(),e.j41(3,"span"),e.EFF(4,"Save the API above first \u2014 then you can create endpoints inside it."),e.k0s()())}function yn(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.duplicateSelectedEndpoint())}),e.j41(1,"mat-icon"),e.EFF(2,"content_copy"),e.k0s(),e.EFF(3," Duplicate "),e.k0s()}}function wn(i,o){if(1&i){const t=e.RV6();e.j41(0,"button",49),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.deleteEndpoint(r.selectedEndpointId))}),e.j41(1,"mat-icon"),e.EFF(2,"delete"),e.k0s(),e.EFF(3," Delete "),e.k0s()}}function En(i,o){if(1&i&&(e.j41(0,"div",187)(1,"span"),e.EFF(2),e.k0s(),e.j41(3,"small"),e.EFF(4),e.k0s()()),2&i){const t=o.$implicit;e.R7$(2),e.JRh(t.title),e.R7$(2),e.JRh(t.detail)}}function jn(i,o){if(1&i&&(e.j41(0,"div",185),e.DNE(1,En,5,2,"div",186),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.executionStepsPreview)("ngForTrackBy",t.trackByTitle)}}function On(i,o){1&i&&(e.j41(0,"p",188),e.EFF(1," No execution steps in JSON yet. "),e.k0s())}function Rn(i,o){if(1&i&&(e.j41(0,"span",191),e.EFF(1),e.k0s()),2&i){const t=o.$implicit;e.R7$(1),e.JRh(t)}}function Pn(i,o){if(1&i&&(e.j41(0,"div",189),e.DNE(1,Rn,2,1,"span",190),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.responseFieldsPreview)("ngForTrackBy",t.trackByValue)}}function Sn(i,o){1&i&&(e.j41(0,"p",188),e.EFF(1," No response mapping fields yet. "),e.k0s())}function In(i,o){if(1&i&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.JRh(t.executionPlanError)}}function Mn(i,o){if(1&i&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(1),e.JRh(t.responseMappingError)}}function An(i,o){1&i&&(e.j41(0,"p",188),e.EFF(1," Save and select an endpoint to run a live test against it. "),e.k0s())}function $n(i,o){if(1&i&&(e.j41(0,"pre"),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(1),e.JRh(t.testResult)}}function Tn(i,o){if(1&i){const t=e.RV6();e.qex(0),e.j41(1,"mat-form-field",135)(2,"mat-label"),e.EFF(3,"Path Params JSON"),e.k0s(),e.nrm(4,"textarea",192),e.k0s(),e.j41(5,"mat-form-field",135)(6,"mat-label"),e.EFF(7,"Query JSON"),e.k0s(),e.nrm(8,"textarea",193),e.k0s(),e.j41(9,"button",41),e.bIt("click",function(){e.eBV(t);const r=e.XpG(2);return e.Njj(r.testEndpoint())}),e.j41(10,"mat-icon"),e.EFF(11,"play_arrow"),e.k0s(),e.EFF(12," Run Test "),e.k0s(),e.DNE(13,$n,2,1,"pre",2),e.bVm()}if(2&i){const t=e.XpG(2);e.R7$(9),e.Y8G("disabled",t.saving||t.testForm.invalid),e.R7$(4),e.Y8G("ngIf",t.testResult)}}function Dn(i,o){if(1&i){const t=e.RV6();e.j41(0,"form",75),e.bIt("ngSubmit",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.saveEndpoint(!1))}),e.j41(1,"div",76)(2,"section",77)(3,"div",78)(4,"span",79),e.EFF(5,"1"),e.k0s(),e.j41(6,"span")(7,"strong"),e.EFF(8,"Define the public endpoint"),e.k0s(),e.j41(9,"small"),e.EFF(10,"Name the operation and choose the path consumers use."),e.k0s()()(),e.j41(11,"div",80)(12,"mat-icon"),e.EFF(13,"route"),e.k0s(),e.j41(14,"span")(15,"strong"),e.EFF(16),e.k0s(),e.j41(17,"small"),e.EFF(18),e.k0s()()(),e.j41(19,"div",81)(20,"mat-form-field",51)(21,"mat-label"),e.EFF(22,"Endpoint name"),e.k0s(),e.nrm(23,"input",82),e.j41(24,"mat-hint"),e.EFF(25,"A friendly name for this endpoint."),e.k0s()(),e.j41(26,"mat-form-field",51)(27,"mat-label"),e.EFF(28,"Public URL path"),e.k0s(),e.nrm(29,"input",83),e.j41(30,"mat-hint"),e.EFF(31,"The path for this endpoint under the API (e.g. /customers)."),e.k0s()()()(),e.j41(32,"section",84),e.DNE(33,qt,8,5,"button",85),e.k0s(),e.j41(34,"section",86)(35,"div",78)(36,"span",79),e.EFF(37,"2"),e.k0s(),e.j41(38,"span")(39,"strong"),e.EFF(40,"Choose the primary data"),e.k0s(),e.j41(41,"small"),e.EFF(42,"Start with the dataset every response record represents."),e.k0s()()(),e.j41(43,"div",87)(44,"mat-form-field",88)(45,"mat-label"),e.EFF(46,"Data source"),e.k0s(),e.j41(47,"input",89),e.bIt("input",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.sourceServiceSearch=r.target.value)})("focus",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.onSourceFocus())})("blur",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.onSourceBlur())}),e.k0s(),e.j41(48,"mat-icon",90),e.EFF(49,"search"),e.k0s(),e.j41(50,"mat-autocomplete",91,92),e.bIt("optionSelected",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.chooseSourceService(r.option.value))}),e.DNE(52,Ut,2,0,"mat-option",93),e.DNE(53,Ht,4,4,"mat-option",94),e.DNE(54,Kt,2,0,"mat-option",93),e.k0s()(),e.DNE(55,Zt,2,2,"div",95),e.j41(56,"mat-form-field",88)(57,"mat-label"),e.EFF(58,"Dataset / table"),e.k0s(),e.j41(59,"input",96),e.bIt("input",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.sourceTableSearch=r.target.value)})("focus",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.onTableFocus())})("blur",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.onTableBlur())}),e.k0s(),e.j41(60,"mat-icon",90),e.EFF(61,"search"),e.k0s(),e.j41(62,"mat-autocomplete",91,97),e.bIt("optionSelected",function(r){e.eBV(t);const s=e.XpG();return e.Njj(s.chooseSourceTable(r.option.value))}),e.DNE(64,en,2,2,"mat-option",94),e.DNE(65,tn,2,1,"mat-option",93),e.k0s()(),e.DNE(66,nn,2,1,"p",98),e.j41(67,"mat-checkbox",99),e.bIt("change",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.EFF(68," Return one record by ID "),e.k0s()()(),e.DNE(69,dn,27,5,"section",100),e.DNE(70,gn,13,3,"section",101),e.j41(71,"section",102)(72,"div",103)(73,"span")(74,"strong"),e.EFF(75,"Filter records"),e.k0s(),e.j41(76,"small"),e.EFF(77,"Add simple rules to limit what this endpoint returns."),e.k0s()(),e.j41(78,"button",48),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.addFilter())}),e.j41(79,"mat-icon"),e.EFF(80,"add"),e.k0s(),e.EFF(81," Add Filter "),e.k0s()(),e.DNE(82,bn,5,0,"div",104),e.DNE(83,xn,18,7,"div",105),e.k0s(),e.j41(84,"details",106)(85,"summary",103)(86,"span")(87,"strong"),e.EFF(88,"Response options"),e.k0s(),e.j41(89,"small"),e.EFF(90,"Set the default sort, row limit, and response wrapper."),e.k0s()(),e.j41(91,"mat-icon"),e.EFF(92,"expand_more"),e.k0s()(),e.j41(93,"div",107)(94,"mat-form-field",51)(95,"mat-label"),e.EFF(96,"Sort By"),e.k0s(),e.j41(97,"mat-select",108),e.bIt("selectionChange",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.j41(98,"mat-option",109),e.EFF(99,"No sort"),e.k0s(),e.DNE(100,Cn,2,2,"mat-option",94),e.k0s()(),e.j41(101,"mat-form-field",51)(102,"mat-label"),e.EFF(103,"Direction"),e.k0s(),e.j41(104,"mat-select",110),e.bIt("selectionChange",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.j41(105,"mat-option",111),e.EFF(106,"Ascending"),e.k0s(),e.j41(107,"mat-option",112),e.EFF(108,"Descending"),e.k0s()()(),e.j41(109,"mat-form-field",51)(110,"mat-label"),e.EFF(111,"Limit"),e.k0s(),e.j41(112,"input",113),e.bIt("input",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.k0s()(),e.j41(113,"mat-form-field",51)(114,"mat-label"),e.EFF(115,"Response Shape"),e.k0s(),e.j41(116,"mat-select",114),e.bIt("selectionChange",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.generateEndpointFromSource())}),e.j41(117,"mat-option",115),e.EFF(118,'Wrap in "resource" key (DreamFactory default)'),e.k0s(),e.j41(119,"mat-option",116),e.EFF(120,'Wrap in "data" key'),e.k0s(),e.j41(121,"mat-option",117),e.EFF(122,"Wrap in table-named key"),e.k0s()()()()(),e.DNE(123,kn,5,0,"p",42),e.j41(124,"div",118)(125,"button",119)(126,"mat-icon"),e.EFF(127,"add_link"),e.k0s(),e.EFF(128),e.k0s(),e.j41(129,"button",120),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.saveEndpoint(!0))}),e.j41(130,"mat-icon"),e.EFF(131,"playlist_add"),e.k0s(),e.EFF(132," Save + New "),e.k0s(),e.j41(133,"button",120),e.bIt("click",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.runPreview())}),e.j41(134,"mat-icon"),e.EFF(135,"play_arrow"),e.k0s(),e.EFF(136),e.k0s(),e.nrm(137,"span",121),e.DNE(138,yn,4,0,"button",33),e.DNE(139,wn,4,0,"button",35),e.k0s()(),e.j41(140,"df-api-builder-preview",122),e.bIt("previewRequested",function(){e.eBV(t);const r=e.XpG();return e.Njj(r.runPreview())}),e.k0s()(),e.j41(141,"section",123)(142,"p",124),e.EFF(143,"Advanced tools"),e.k0s(),e.j41(144,"mat-tab-group",125)(145,"mat-tab",126)(146,"div",127)(147,"div",128)(148,"strong"),e.EFF(149,"Execution Steps"),e.k0s(),e.DNE(150,jn,2,2,"div",129),e.DNE(151,On,2,0,"ng-template",null,130,e.C5r),e.k0s(),e.j41(153,"div",128)(154,"strong"),e.EFF(155,"Response Fields"),e.k0s(),e.DNE(156,Pn,2,2,"div",131),e.DNE(157,Sn,2,0,"ng-template",null,132,e.C5r),e.k0s()()(),e.j41(159,"mat-tab",133)(160,"div",134)(161,"mat-form-field",135)(162,"mat-label"),e.EFF(163,"Execution Plan JSON"),e.k0s(),e.nrm(164,"textarea",136),e.DNE(165,In,2,1,"mat-error",2),e.k0s(),e.j41(166,"mat-form-field",135)(167,"mat-label"),e.EFF(168,"Response Mapping JSON"),e.k0s(),e.nrm(169,"textarea",137),e.DNE(170,Mn,2,1,"mat-error",2),e.k0s(),e.j41(171,"details",138)(172,"summary",139),e.EFF(173," Step types & examples "),e.k0s(),e.j41(174,"div",140)(175,"p")(176,"strong"),e.EFF(177,"service_request"),e.k0s(),e.EFF(178," \u2014 call a workspace service (database / file / remote). Selectors are static; "),e.j41(179,"code"),e.EFF(180,"params"),e.k0s(),e.EFF(181,"/"),e.j41(182,"code"),e.EFF(183,"body"),e.k0s(),e.EFF(184," resolve caller input via "),e.j41(185,"code"),e.EFF(186,"{path.*}"),e.k0s(),e.EFF(187,", "),e.j41(188,"code"),e.EFF(189,"{query.*}"),e.k0s(),e.EFF(190,", "),e.j41(191,"code"),e.EFF(192,"{body.*}"),e.k0s(),e.EFF(193,", "),e.j41(194,"code"),e.EFF(195,"{steps..*}"),e.k0s(),e.EFF(196,". "),e.k0s(),e.j41(197,"p")(198,"strong"),e.EFF(199,"transform"),e.k0s(),e.EFF(200," \u2014 reshape a prior step in-memory (no request). "),e.j41(201,"code"),e.EFF(202,"from"),e.k0s(),e.EFF(203," = a context path; "),e.j41(204,"code"),e.EFF(205,"ops"),e.k0s(),e.EFF(206," run in order. Ops: "),e.j41(207,"code"),e.EFF(208,"pick"),e.k0s(),e.EFF(209,", "),e.j41(210,"code"),e.EFF(211,"omit"),e.k0s(),e.EFF(212,", "),e.j41(213,"code"),e.EFF(214,"rename"),e.k0s(),e.EFF(215,", "),e.j41(216,"code"),e.EFF(217,"defaults"),e.k0s(),e.EFF(218,", "),e.j41(219,"code"),e.EFF(220,"first"),e.k0s(),e.EFF(221,", "),e.j41(222,"code"),e.EFF(223,"limit"),e.k0s(),e.EFF(224,", "),e.j41(225,"code"),e.EFF(226,"count"),e.k0s(),e.EFF(227,", "),e.j41(228,"code"),e.EFF(229,"wrap"),e.k0s(),e.EFF(230,", "),e.j41(231,"code"),e.EFF(232,"unwrap"),e.k0s(),e.EFF(233,". "),e.k0s(),e.j41(234,"p",141),e.EFF(235," Example \u2014 fetch rows, then shape them: "),e.k0s(),e.j41(236,"pre",142),e.EFF(237),e.k0s(),e.j41(238,"p"),e.EFF(239," Run "),e.j41(240,"strong"),e.EFF(241,"Preview Return"),e.k0s(),e.EFF(242," to execute it and see each step's result, status, and timing. "),e.k0s()()()()(),e.j41(243,"mat-tab",143)(244,"div",144),e.DNE(245,An,2,0,"p",145),e.DNE(246,Tn,14,2,"ng-container",2),e.k0s()()()()}if(2&i){const t=e.sdS(51),n=e.sdS(63),r=e.sdS(152),s=e.sdS(158),a=e.XpG();e.Y8G("formGroup",a.endpointForm),e.R7$(16),e.JRh(a.generatedRouteLabel),e.R7$(2),e.JRh(a.sourceSummary),e.R7$(1),e.Y8G("formGroup",a.endpointForm),e.R7$(14),e.Y8G("ngForOf",a.workflowSteps)("ngForTrackBy",a.trackByStepKey),e.R7$(10),e.Y8G("formGroup",a.sourceForm),e.R7$(4),e.Y8G("value",a.sourceServiceSearch)("matAutocomplete",t),e.R7$(5),e.Y8G("ngIf",a.sourceServicesLoading),e.R7$(1),e.Y8G("ngForOf",a.filteredSourceServices)("ngForTrackBy",a.trackByName),e.R7$(1),e.Y8G("ngIf",!a.sourceServicesLoading&&0===a.filteredSourceServices.length),e.R7$(1),e.Y8G("ngIf",a.recentSourceServices.length),e.R7$(4),e.Y8G("value",a.sourceTableSearch)("matAutocomplete",n)("disabled",!a.sourceForm.value.service),e.R7$(5),e.Y8G("ngForOf",a.filteredSourceTables)("ngForTrackBy",a.trackByName),e.R7$(1),e.Y8G("ngIf",0===a.filteredSourceTables.length),e.R7$(1),e.Y8G("ngIf",a.sourceIntrospectionHint),e.R7$(3),e.Y8G("ngIf",a.sourceFields.length),e.R7$(1),e.Y8G("ngIf",a.sourceRelationships.length||a.selectedRelationships.size),e.R7$(12),e.Y8G("ngIf",0===a.filterRules.length),e.R7$(1),e.Y8G("ngForOf",a.filterRules)("ngForTrackBy",a.trackByFilterIndex),e.R7$(10),e.Y8G("formGroup",a.sourceForm),e.R7$(7),e.Y8G("ngForOf",a.sourceFields)("ngForTrackBy",a.trackByName),e.R7$(23),e.Y8G("ngIf",!a.selectedApiId),e.R7$(2),e.Y8G("disabled",a.endpointForm.invalid||a.saving||a.hasJsonErrors),e.R7$(3),e.SpI(" ",a.selectedEndpointId?"Update Endpoint":"Create Endpoint"," "),e.R7$(1),e.Y8G("disabled",a.endpointForm.invalid||a.saving||a.hasJsonErrors),e.R7$(4),e.Y8G("disabled",a.saving||a.previewing||!a.canGenerateFromSource),e.R7$(3),e.SpI(" ",a.previewStale?"Refresh preview":"Preview results"," "),e.R7$(2),e.Y8G("ngIf",a.selectedEndpointId),e.R7$(1),e.Y8G("ngIf",a.selectedEndpointId),e.R7$(1),e.Y8G("routeLabel",a.generatedRouteLabel)("sourceSummary",a.sourceSummary)("fieldNames",a.responseContractFields)("relationshipNames",a.selectedRelationshipLabels)("previewResult",a.previewResult)("previewStale",a.previewStale)("previewing",a.previewing)("canPreview",a.canGenerateFromSource)("previewOk",a.previewOk)("trace",a.previewTrace),e.R7$(10),e.Y8G("ngIf",a.executionStepsPreview.length)("ngIfElse",r),e.R7$(6),e.Y8G("ngIf",a.responseFieldsPreview.length)("ngIfElse",s),e.R7$(4),e.Y8G("formGroup",a.endpointForm),e.R7$(5),e.Y8G("ngIf",a.executionPlanError),e.R7$(5),e.Y8G("ngIf",a.responseMappingError),e.R7$(67),e.JRh(a.stepExample),e.R7$(7),e.Y8G("formGroup",a.testForm),e.R7$(1),e.Y8G("ngIf",!a.selectedEndpointId),e.R7$(1),e.Y8G("ngIf",a.selectedEndpointId)}}let Bn=(()=>{class i{constructor(){this.fb=(0,e.WQX)(m.ok),this.http=(0,e.WQX)(L.Qq),this.transloco=(0,e.WQX)(Ee.JO),this.snackBar=(0,e.WQX)(Z.UG),this.mapper=(0,e.WQX)(lt),this.destroyRef=(0,e.WQX)(e.abz),this.apis=[],this.endpoints=[],this.endpointCounts=new Map,this.sourceServices=[],this.sourceTables=[],this.sourceFields=[],this.sourceRelationships=[],this.sourceOpenApiPaths=[],this.sourceServiceSearch="",this.sourceTableSearch="",this.sourceIntrospectionHint="",this.recentSourceKey="df_api_builder_recent_sources",this.NON_SOURCE_TYPES=new Set(["local_file","aws_s3","azure_blob","rackspace_cloud_files","openstack_object_storage","ftp","sftp","webdav","local_email","smtp","mailgun","mandrill","sendgrid","aws_ses","office365","user","oauth","oauth_azure_ad","oauth_facebook","oauth_github","oauth_google","oauth_linkedin","oauth_microsoft","oauth_twitter","oidc","saml","ldap","adldap","azure_ad","swagger","system","api_builder"]),this.recentSourceNames=[],this.selectedFields=new Set,this.selectedRelationships=new Set,this.fieldAliases={},this.renamingFields=new Set,this.pendingSelectedFieldNames=null,this.filterRules=[],this.fieldSearch="",this.textOperators=[{value:"=",label:"equals"},{value:"!=",label:"does not equal"},{value:"like",label:"contains"}],this.comparableOperators=[{value:"=",label:"equals"},{value:"!=",label:"does not equal"},{value:">",label:"greater than"},{value:">=",label:"greater than or equal"},{value:"<",label:"less than"},{value:"<=",label:"less than or equal"}],this.loading=!1,this.saving=!1,this.sourceServicesLoading=!1,this.editorOpen=!1,this.apiDetailsOpen=!1,this.selectedApiId=null,this.selectedEndpointId=null,this.addingEndpoint=!1,this.testResult="",this.previewResult="",this.previewTrace=[],this.previewOk=null,this.previewStale=!1,this.previewing=!1,this.stepExample='{\n "steps": [\n { "id": "rows", "type": "service_request",\n "service": "your_db", "resource": "_table/your_table",\n "method": "GET", "params": { "limit": "25" } },\n { "id": "shaped", "type": "transform", "from": "{steps.rows.resource}",\n "ops": [\n { "op": "pick", "fields": ["id", "name"] },\n { "op": "rename", "map": { "name": "title" } }\n ] }\n ]\n}\n\nResponse Mapping -> { "items": "{steps.shaped}" }',this.executionStepsCache=null,this.responseFieldsCache=null,this.lastGeneratedPath="",this.lastGeneratedLabel="",this.lastGeneratedDescription="",this.apiForm=this.fb.group({name:["",[m.k0.pattern(/^[A-Za-z0-9_-]+$/)]],basePath:["",[m.k0.required,m.k0.pattern(/^[A-Za-z0-9_-]+$/)]],label:[""],description:[""],status:["draft"]}),this.endpointForm=this.fb.group({apiId:[null,m.k0.required],method:["GET",m.k0.required],path:["",m.k0.required],label:[""],description:[""],executionPlan:["{}",m.k0.required],responseMapping:["{}",m.k0.required]}),this.testForm=this.fb.group({endpointId:[null,m.k0.required],pathParams:['{\n "id": 1\n}',m.k0.required],query:["{}",m.k0.required]}),this.sourceForm=this.fb.group({service:[""],table:[""],includeId:[!1],sortField:[""],sortDirection:["ASC"],limit:[25],outputShape:["resource"]}),this.selectedEndpointsCache=null,this.filteredSourceServicesCache=null,this.workspaceServiceIds=null,this.filteredSourceTablesCache=null,this.recentSourceServicesCache=null,this.workflowStepsCache=null,this.selectedFieldNamesCache=[],this.responseContractFieldsCache=[],this.selectedRelationshipLabelsCache=[],this.availableRelationshipNamesCache=null,this.relationshipContractWarningsCache=[],this.displayedSourceFieldsCache=null,this.fieldTypeLabelCache=new WeakMap,this.titleFromNameCache=new Map}get selectedEndpoints(){const t=this.selectedEndpointsCache;if(t&&t.endpoints===this.endpoints&&t.apiId===this.selectedApiId)return t.value;const n=this.selectedApiId?this.endpoints.filter(r=>(r.apiId??r.api_id)===this.selectedApiId):[];return this.selectedEndpointsCache={endpoints:this.endpoints,apiId:this.selectedApiId,value:n},n}get filteredSourceServices(){const t=this.filteredSourceServicesCache;if(t&&t.services===this.sourceServices&&t.workspaceIds===this.workspaceServiceIds&&t.search===this.sourceServiceSearch)return t.value;let n=this.sourceServices;this.workspaceServiceIds&&this.workspaceServiceIds.size&&(n=n.filter(s=>null!=s.id&&this.workspaceServiceIds.has(s.id)));const r=this.sourceServiceSearch.trim().toLowerCase();return r&&(n=n.filter(s=>`${s.name} ${s.label??""} ${s.type}`.toLowerCase().includes(r))),this.filteredSourceServicesCache={services:this.sourceServices,workspaceIds:this.workspaceServiceIds,search:this.sourceServiceSearch,value:n},n}loadWorkspaceServices(t){t?this.http.get(`${u.C}/api_builder/services`,{params:{filter:`api_id=${t}`,limit:500},context:(0,h.Ku)()}).subscribe({next:n=>{const r=(n.resource??[]).map(s=>s.serviceId??s.service_id).filter(s=>null!=s);this.workspaceServiceIds=r.length?new Set(r):null},error:()=>this.workspaceServiceIds=null}):this.workspaceServiceIds=null}get filteredSourceTables(){const t=this.filteredSourceTablesCache;if(t&&t.tables===this.sourceTables&&t.search===this.sourceTableSearch)return t.value;const n=this.sourceTableSearch.trim().toLowerCase(),r=n?this.sourceTables.filter(s=>`${s.name} ${s.label??""}`.toLowerCase().includes(n)):this.sourceTables;return this.filteredSourceTablesCache={tables:this.sourceTables,search:this.sourceTableSearch,value:r},r}get recentSourceServices(){const t=this.recentSourceServicesCache;if(t&&t.names===this.recentSourceNames&&t.services===this.sourceServices)return t.value;const n=this.recentSourceNames.map(r=>this.sourceServices.find(s=>s.name===r)).filter(r=>!!r);return this.recentSourceServicesCache={names:this.recentSourceNames,services:this.sourceServices,value:n},n}get workflowSteps(){const t=this.sourceForm.value.service,n=this.sourceForm.value.table,r=this.sourceForm.value.outputShape,s=this.selectedFields.size,a=this.filterRules.length,l=this.selectedEndpointId,_=this.workflowStepsCache;if(_&&_.service===t&&_.table===n&&_.outputShape===r&&_.fieldCount===s&&_.ruleCount===a&&_.endpointId===l)return _.value;const b=!!t,y=!!n,d=s>0,F=!!r,E=!!l,R=[{key:"source",label:"Data",detail:b&&y?"Service + table selected":"Pick service and table",complete:b&&y},{key:"shape",label:"Fields",detail:d?`${s} fields selected`:"Select fields",complete:d},{key:"rules",label:"Filters",detail:a>0?`${a} filters`:"None (optional)",complete:!0},{key:"output",label:"Response",detail:F?`Shape: ${r}`:"Set output options",complete:F},{key:"publish",label:"Save",detail:E?"Endpoint saved":"Save endpoint",complete:E}];return this.workflowStepsCache={service:t,table:n,outputShape:r,fieldCount:s,ruleCount:a,endpointId:l,value:R},R}get executionStepsPreview(){const t=this.endpointForm.value.executionPlan??"";if(this.executionStepsCache?.key===t)return this.executionStepsCache.value;const n=this.parseJsonObject(this.endpointForm.value.executionPlan),s=(Array.isArray(n?.steps)?n?.steps:[]).filter(a=>!!a&&"object"==typeof a).map(a=>{const l=String(a.service??"service"),_=String(a.method??"GET"),b=String(a.resource??"");return{title:`${String(a.id??l)}: ${_} ${l}`,detail:b||"Root resource"}});return this.executionStepsCache={key:t,value:s},s}get responseFieldsPreview(){const t=this.endpointForm.value.responseMapping??"";if(this.responseFieldsCache?.key===t)return this.responseFieldsCache.value;const n=this.parseJsonObject(this.endpointForm.value.responseMapping),r=n?Object.keys(n):[];return this.responseFieldsCache={key:t,value:r},r}get executionPlanError(){return this.jsonValidationError(this.endpointForm.controls.executionPlan.errors)}get responseMappingError(){return this.jsonValidationError(this.endpointForm.controls.responseMapping.errors)}get hasJsonErrors(){return!!this.executionPlanError||!!this.responseMappingError}get selectedFieldNames(){const t=Array.from(this.selectedFields);return te(t,this.selectedFieldNamesCache)||(this.selectedFieldNamesCache=t),this.selectedFieldNamesCache}get responseContractFields(){const t=this.selectedFieldNames.map(n=>this.aliasFor(n)||n);return te(t,this.responseContractFieldsCache)||(this.responseContractFieldsCache=t),this.responseContractFieldsCache}get selectedRelationshipLabels(){const t=Array.from(this.selectedRelationships).map(n=>{const r=this.sourceRelationships.find(s=>s.name===n);return this.aliasFor(n)||r?.label||this.titleFromName(n)});return te(t,this.selectedRelationshipLabelsCache)||(this.selectedRelationshipLabelsCache=t),this.selectedRelationshipLabelsCache}get relationshipContractWarnings(){let t=this.availableRelationshipNamesCache;(!t||t.relationships!==this.sourceRelationships)&&(t={relationships:this.sourceRelationships,value:new Set(this.sourceRelationships.map(s=>s.name))},this.availableRelationshipNamesCache=t);const n=t.value,r=Array.from(this.selectedRelationships).filter(s=>!n.has(s)).map(s=>`"${s}" is no longer available in the selected dataset schema.`);return te(r,this.relationshipContractWarningsCache)||(this.relationshipContractWarningsCache=r),this.relationshipContractWarningsCache}relationshipTypeLabel(t){switch(t){case"belongs_to":return"Many to one";case"has_one":return"One to one";case"has_many":return"One to many";case"many_many":return"Many to many";default:return"Related data"}}relationshipContractLabel(t){return"belongs_to"===t||"has_one"===t?"object or null":"array"}get displayedSourceFields(){const t=this.fieldSearch.trim().toLowerCase();if(!t)return this.sourceFields;const n=this.displayedSourceFieldsCache;if(n&&n.fields===this.sourceFields&&n.search===t)return n.value;const r=this.sourceFields.filter(s=>[s.name,s.label,s.type,s.dbType,s.db_type].filter(Boolean).some(a=>String(a).toLowerCase().includes(t)));return this.displayedSourceFieldsCache={fields:this.sourceFields,search:t,value:r},r}get canGenerateFromSource(){return!!this.sourceForm.value.service&&!!this.sourceForm.value.table&&this.selectedFields.size>0}get generatedRouteLabel(){return this.canGenerateFromSource?`${this.endpointForm.value.method??"GET"} ${this.endpointForm.value.path??""}`:"Choose a source API and table"}get sourceSummary(){const t=this.sourceForm.value.service,n=this.sourceForm.value.table;return t&&n?`Returns ${this.selectedFields.size} selected fields for ${this.sourceForm.value.includeId?"one record from":"records from"} ${t}.${n}${0===this.filterRules.length?"":` with ${this.filterRules.length} filter${1===this.filterRules.length?"":"s"}`}.`:"API Builder will inspect the source API and generate this endpoint."}ngOnInit(){this.recentSourceNames=this.readRecentSources(),this.validateJsonEditors(),this.endpointForm.controls.executionPlan.valueChanges.pipe(J(this.destroyRef)).subscribe(()=>{this.validateJsonEditors(),this.markPreviewStale()}),this.endpointForm.controls.responseMapping.valueChanges.pipe(J(this.destroyRef)).subscribe(()=>{this.validateJsonEditors(),this.markPreviewStale()}),this.loadSourceServices(),this.loadAll()}onGlobalShortcut(t){if(!this.editorOpen||this.saving)return;const n=t.target,r=n?.tagName?.toLowerCase()??"";if(n?.closest('input, textarea, [contenteditable="true"], mat-select')||["input","textarea","select"].includes(r))return;const a=t.key.toLowerCase();return"n"===a?(t.preventDefault(),void this.newEndpoint()):"d"===a?(t.preventDefault(),void this.duplicateSelectedEndpoint()):void("s"===a&&(t.preventDefault(),this.saveEndpoint(!1)))}introspectionBadge(t){const n=(t.type||"").toLowerCase();return["pgsql","mysql","sqlite","sqlsrv","oracle","ibmdb2"].includes(n)?"schema":["rest","soap","http"].includes(n)?"api_docs":"no metadata"}selectRecentSource(t){this.chooseSourceService(t)}chooseSourceService(t){t&&(this.sourceForm.patchValue({service:t}),this.sourceServiceSearch=this.serviceDisplay(t),this.loadTables(t))}chooseSourceTable(t){t&&(this.sourceForm.patchValue({table:t}),this.sourceTableSearch=this.tableDisplay(t),this.loadFields(t))}onSourceFocus(){this.sourceServiceSearch=""}onSourceBlur(){setTimeout(()=>{const t=this.sourceForm.value.service;this.sourceServiceSearch=t?this.serviceDisplay(t):""},150)}onTableFocus(){this.sourceTableSearch=""}onTableBlur(){setTimeout(()=>{const t=this.sourceForm.value.table;this.sourceTableSearch=t?this.tableDisplay(t):""},150)}serviceDisplay(t){const n=this.sourceServices.find(r=>r.name===t);return n?n.label||n.name:t}tableDisplay(t){const n=this.sourceTables.find(r=>r.name===t);return n?n.label||this.titleFromName(n.name):this.titleFromName(t)}rememberRecentSource(t){const n=[t,...this.recentSourceNames.filter(r=>r!==t)].slice(0,6);this.recentSourceNames=n,localStorage.setItem(this.recentSourceKey,JSON.stringify(n))}readRecentSources(){try{const t=localStorage.getItem(this.recentSourceKey);if(!t)return[];const n=JSON.parse(t);return Array.isArray(n)?n.filter(r=>"string"==typeof r):[]}catch{return[]}}loadAll(){this.loading=!0,this.http.get(`${u.C}/api_builder/apis`,{params:{limit:500},context:(0,h.PH)()}).pipe((0,S.j)(()=>this.loading=!1)).subscribe({next:t=>{this.apis=t.resource??[],this.loadEndpoints()},error:()=>this.toast("Could not load API Builder definitions.")})}loadEndpoints(){this.http.get(`${u.C}/api_builder/endpoints`,{params:{limit:500},context:(0,h.PH)()}).subscribe({next:t=>{this.endpoints=t.resource??[],this.rebuildEndpointCounts()},error:()=>this.toast("Could not load endpoint definitions.")})}loadSourceServices(){this.sourceServicesLoading=!0,this.http.get(`${u.C}/system/service`,{params:{fields:"id,name,label,type,is_active",limit:500},context:(0,h.PH)()}).pipe((0,S.j)(()=>this.sourceServicesLoading=!1)).subscribe({next:t=>{this.sourceServices=(t.resource??[]).filter(r=>"api_builder"!==r.name&&"system"!==r.name&&!1!==r.is_active&&!this.NON_SOURCE_TYPES.has((r.type||"").toLowerCase())),this.sourceForm.patchValue({service:"",table:""})},error:()=>this.toast("Could not load source APIs.")})}loadTables(t){t&&(this.rememberRecentSource(t),this.sourceTables=[],this.sourceFields=[],this.sourceRelationships=[],this.sourceOpenApiPaths=[],this.sourceIntrospectionHint="",this.sourceTableSearch="",this.selectedFields.clear(),this.selectedRelationships.clear(),this.sourceForm.patchValue({table:""}),this.http.get(`${u.C}/${t}/_schema`,{params:{fields:"name,label"},context:(0,h.Ku)()}).subscribe({next:n=>{try{const s=(Array.isArray(n?.resource)?n.resource:[]).map(a=>({...a,source:"schema"}));if(s.length)return this.sourceIntrospectionHint="Schema metadata loaded from native service schema.",void this.setSourceTables(s);this.loadTablesFromOpenApi(t)}catch(r){console.error("Failed to process source schema table list",{serviceName:t,response:n,error:r}),this.loadTablesFromOpenApi(t)}},error:()=>this.loadTablesFromOpenApi(t)}))}loadTablesFromOpenApi(t){this.http.get(`${u.C}/api_docs/${t}`,{params:{expand_schema:!0},context:(0,h.Ku)()}).subscribe({next:n=>{this.sourceOpenApiPaths=Object.keys(n.paths??{});const r=this.tablesFromOpenApi(this.sourceOpenApiPaths);if(r.length)return this.sourceIntrospectionHint="Using api_docs fallback for resource discovery (native schema unavailable).",void this.setSourceTables(r);this.loadTablesFromSchema(t)},error:()=>this.loadTablesFromSchema(t)})}loadTablesFromSchema(t){const n=this.sourceServices.find(s=>s.name===t)?.type;if(!["pgsql","mysql","sqlite","sqlsrv","oracle","ibmdb2"].includes(String(n)))return this.sourceIntrospectionHint="No metadata available for this source type. Choose a source with schema or api_docs support.",void this.toast("This source API does not expose table schema metadata for field selection.");this.http.get(`${u.C}/${t}/_table`,{params:{limit:500},context:(0,h.PH)()}).subscribe({next:s=>{this.setSourceTables((s.resource??[]).map(a=>({...a,source:"schema"})))},error:()=>this.toast("Could not load tables for source API.")})}setSourceTables(t){this.sourceTables=t;const n=this.sourceForm.value.table,s=(n?this.sourceTables.find(a=>a.name===n):void 0)??this.sourceTables.find(a=>"customers"===a.name)??this.sourceTables[0];s&&(this.sourceForm.patchValue({table:s.name}),this.sourceTableSearch=this.tableDisplay(s.name),this.loadFields(s.name))}populateSourceTablesQuietly(t){t&&this.http.get(`${u.C}/${t}/_schema`,{params:{fields:"name,label"},context:(0,h.Ku)()}).subscribe({next:n=>{const r=Array.isArray(n?.resource)?n.resource:[];r.length&&(this.sourceTables=r.map(s=>({...s,source:"schema"})))},error:()=>{}})}loadFields(t){const n=this.sourceForm.value.service;!n||!t||(this.sourceFields=[],this.sourceRelationships=[],this.selectedFields.clear(),this.fieldSearch="",this.http.get(`${u.C}/${n}/_schema/${t}`,{context:(0,h.Ku)()}).subscribe({next:r=>{try{const s=Array.isArray(r?.field)?r.field:[];if(this.sourceFields=s.map(a=>({...a,label:a.label||this.titleFromName(a.name)})),this.sourceRelationships=this.mapRelatedToRelationships(Array.isArray(r?.related)?r.related:[]),this.pendingSelectedFieldNames?.length){const a=new Set(this.pendingSelectedFieldNames);this.sourceFields.forEach(l=>{a.has(l.name)&&this.selectedFields.add(l.name)}),this.pendingSelectedFieldNames=null}else this.sourceFields.forEach(a=>this.selectedFields.add(a.name));this.generateEndpointFromSource()}catch(s){console.error("Failed to process source fields response",{serviceName:n,tableName:t,response:r,error:s}),this.loadFieldsFromOpenApi(t)}},error:()=>this.loadFieldsFromOpenApi(t)}))}isFieldSelected(t){return this.selectedFields.has(t)}aliasFor(t){return this.fieldAliases[t]??""}isRenaming(t){return this.renamingFields.has(t)||!!this.aliasFor(t)}startRenaming(t){this.renamingFields.add(t)}finishRenaming(t){this.aliasFor(t)||this.renamingFields.delete(t)}setAlias(t,n){const r=n.trim();r?this.fieldAliases[t]=r:delete this.fieldAliases[t],this.generateEndpointFromSource()}isRelationshipSelected(t){return this.selectedRelationships.has(t)}toggleRelationship(t,n){n?this.selectedRelationships.add(t):this.selectedRelationships.delete(t),this.generateEndpointFromSource()}toggleField(t,n){n?this.selectedFields.add(t):this.selectedFields.delete(t),this.generateEndpointFromSource()}selectAllFields(){this.sourceFields.forEach(t=>this.selectedFields.add(t.name)),this.generateEndpointFromSource()}clearAllFields(){this.selectedFields.clear(),this.generateEndpointFromSource()}addFilter(){const t=this.sourceFields.find(n=>"name"===n.name)??this.sourceFields.find(n=>!this.isPrimaryKey(n)&&(n.type??"").includes("string"))??this.sourceFields.find(n=>!this.isPrimaryKey(n))??this.sourceFields[0];t?(this.filterRules=[...this.filterRules,{field:t.name,operator:"=",value:""}],this.markPreviewStale()):this.toast("Choose a table before adding filters.")}removeFilter(t){this.filterRules=this.filterRules.filter((n,r)=>r!==t),this.generateEndpointFromSource()}updateFilter(t,n,r){const s=this.filterRules[t];s&&(s[n]=r,"field"===n&&(this.filterOperatorOptions(s.field).some(l=>l.value===s.operator)||(s.operator="=")),this.generateEndpointFromSource())}trackByFilterIndex(t){return t}trackByStepKey(t,n){return n.key}trackByName(t,n){return n.name}trackById(t,n){return n.id}trackByTitle(t,n){return n.title}trackByOptionValue(t,n){return n.value}trackByValue(t,n){return n}filterOperatorOptions(t){const n=this.sourceFields.find(s=>s.name===t),r=this.fieldType(n);return this.isNumericField(n)||["date","datetime","timestamp"].some(s=>r.includes(s))?this.comparableOperators:this.textOperators}generateEndpointFromSource(){const t=this.sourceForm.value.service,n=this.sourceForm.value.table,r=!!this.sourceForm.value.includeId,s=this.selectedFieldNames;if(!t||!n||0===s.length)return;const a=this.safeStepId(n),l=r?`Get ${this.titleFromName(n)}`:`List ${this.titleFromName(n)}`,_=r?`/${n}/{id}`:`/${n}`,b=r?`_table/${n}/{path.id}`:`_table/${n}`,y=this.buildFilterString(),d={fields:s.join(",")};this.selectedRelationships.size&&(d.related=Array.from(this.selectedRelationships).join(",")),y&&(d.filter=y);const v=this.sourceForm.value.sortField;v&&(d.order=`${v} ${this.sourceForm.value.sortDirection??"ASC"}`);const F=Number(this.sourceForm.value.limit);!r&&F>0&&(d.limit=String(F));const E=this.resolveOutputKey(n),R=`Returns selected fields from ${t}.${n}.`,V={};for(const X of[...this.selectedFieldNames,...this.selectedRelationships]){const B=this.fieldAliases[X];B&&B!==X&&(V[X]=B)}const ne={id:a,type:"service_request",service:t,method:"GET",resource:b,params:d};Object.keys(V).length&&(ne.aliases=V);const j=this.endpointForm.value,D={apiId:this.selectedApiId,method:"GET",executionPlan:JSON.stringify({steps:[ne]},null,2),responseMapping:JSON.stringify({[E]:r?`{steps.${a}}`:`{steps.${a}.resource}`},null,2)};(!j.path||j.path===this.lastGeneratedPath)&&(D.path=_,this.lastGeneratedPath=_),(!j.label||j.label===this.lastGeneratedLabel)&&(D.label=l,this.lastGeneratedLabel=l),(!j.description||j.description===this.lastGeneratedDescription)&&(D.description=R,this.lastGeneratedDescription=R),this.endpointForm.patchValue(D),this.testForm.patchValue({pathParams:r?'{\n "id": 1\n}':"{}",query:"{}"}),this.markPreviewStale()}runPreview(){let t,n;try{t=JSON.parse(this.endpointForm.value.executionPlan??"{}"),n=JSON.parse(this.endpointForm.value.responseMapping??"{}")}catch{return void this.toast("Generated endpoint details must be valid JSON before previewing.")}this.previewing=!0,this.http.post(`${u.C}/api_builder/test`,{endpoint:{apiId:this.selectedApiId??0,method:this.endpointForm.value.method??"GET",path:this.endpointForm.value.path??"",label:this.endpointForm.value.label??"",isActive:!0,requestSchema:this.buildRequestSchema(!!this.sourceForm.value.includeId),responseSchema:this.buildResponseSchema(this.resolveOutputKey(this.sourceForm.value.table??""),!!this.sourceForm.value.includeId),executionPlan:t,responseMapping:n},path_params:this.sourceForm.value.includeId?{id:1}:{},query:{},dry_run:!1,trace:!0},{context:(0,h.PH)()}).pipe((0,S.j)(()=>this.previewing=!1)).subscribe({next:r=>{this.previewTrace=r?.trace??[],this.previewOk=r?.ok??null,this.previewResult=JSON.stringify(r?.result??r,null,2),this.previewStale=!1},error:r=>{const s=(0,G.cQ)(r).raw;this.previewTrace=s?.trace??[],this.previewOk=!1,this.previewResult=JSON.stringify(s?.error??s,null,2),this.previewStale=!1}})}markPreviewStale(){this.previewResult&&(this.previewStale=!0)}openApiDocs(){if(!this.selectedApiId)return void this.toast("Save the API first so docs can be generated for it.");const t=this.apis.find(s=>s.id===this.selectedApiId),r=(t?.basePath??t?.base_path??this.apiForm.value.basePath??"").replace(/^\/+|\/+$/g,"");r?this.http.get(`${u.C}/api_docs/${r}`,{context:(0,h.PH)()}).subscribe({next:()=>{window.location.assign(`${window.location.origin}/dreamfactory/dist/#/api-connections/api-docs/${r}`)},error:s=>{this.toast(`Could not load generated OpenAPI spec for ${r}. ${this.describeHttpError(s)}`)}}):this.toast("API URL is empty. Set API URL and save before opening docs.")}saveApi(t="API saved."){if(this.apiForm.invalid)return;const n=this.withoutEmptyOptionalFields(this.mapper.toApiPayload({name:this.apiForm.value.name||this.safeStepId(this.apiForm.value.basePath||this.apiForm.value.label||"custom_api"),basePath:this.apiForm.value.basePath??"",label:this.apiForm.value.label??"",description:this.apiForm.value.description??"",status:this.apiForm.value.status??"draft"})),r=this.selectedApiId?this.http.put(`${u.C}/api_builder/apis/${this.selectedApiId}`,n,{context:(0,h.PH)()}):this.http.post(`${u.C}/api_builder/apis`,{resource:[n]},{context:(0,h.PH)()});this.saving=!0,r.pipe((0,S.j)(()=>this.saving=!1)).subscribe({next:s=>{const a="resource"in s?s.resource?.[0]:s;if(!a)return void this.toast("API save did not return a definition.");const l={...n,...a};this.toast(t),this.apis=[l,...this.apis.filter(_=>_.id!==l.id)],this.selectApi(l.id)},error:s=>this.toast(`Could not save API. ${this.describeHttpError(s)}`)})}updateApiStatus(t){!this.selectedApiId||this.saving||(this.apiForm.patchValue({status:t}),this.saveApi("published"===t?"API published.":"API moved to draft."))}saveEndpoint(t=!1){if(!this.selectedApiId)return void this.toast("Save the API first, then create endpoints inside it.");if(this.endpointForm.invalid)return;let n,r;try{n=JSON.parse(this.endpointForm.value.executionPlan??"{}"),r=JSON.parse(this.endpointForm.value.responseMapping??"{}")}catch{return void this.toast("Execution plan and response mapping must be valid JSON.")}const s=this.withoutEmptyOptionalFields(this.mapper.toEndpointPayload({apiId:this.endpointForm.value.apiId,method:this.endpointForm.value.method??"GET",path:this.endpointForm.value.path??"",label:this.endpointForm.value.label??"",description:this.endpointForm.value.description??"",isActive:!0,requestSchema:this.buildRequestSchema(!!this.sourceForm.value.includeId),responseSchema:this.buildResponseSchema(this.resolveOutputKey(this.sourceForm.value.table??""),!!this.sourceForm.value.includeId),executionPlan:n,responseMapping:r})),a=String(s.path??"").trim(),l=String(s.method??"GET").toUpperCase(),_=this.endpoints.find(d=>{if(this.selectedEndpointId&&d.id===this.selectedEndpointId)return!1;const F=d.apiId??d.api_id,E=String(d.path??"").trim(),R=String(d.method??"").toUpperCase();return F===s.api_id&&E===a&&R===l});let b=this.selectedEndpointId;_&&(this.toast(`Endpoint ${l} ${a} already exists in this API (id ${_.id}). Saving as update.`),this.selectEndpoint(_.id),b=_.id);const y=b?this.http.put(`${u.C}/api_builder/endpoints/${b}`,s,{context:(0,h.PH)()}):this.http.post(`${u.C}/api_builder/endpoints`,{resource:[s]},{context:(0,h.PH)()});this.saving=!0,y.pipe((0,S.j)(()=>this.saving=!1)).subscribe({next:d=>{const v="resource"in d?d.resource?.[0]:d;if(!v)return void this.toast("Endpoint save did not return a definition.");const F={...s,...v};if(this.toast(t?"Endpoint saved. Ready for next endpoint.":"Endpoint saved."),this.endpoints=[F,...this.endpoints.filter(E=>E.id!==F.id)],this.rebuildEndpointCounts(),t)return this.resetEndpointEditor(),void(this.addingEndpoint=!0);this.selectEndpoint(F.id)},error:d=>this.toast(`Could not save endpoint. ${this.describeHttpError(d)}`)})}testEndpoint(){if(this.testForm.invalid)return;let t,n;try{t=JSON.parse(this.testForm.value.pathParams??"{}"),n=JSON.parse(this.testForm.value.query??"{}")}catch{return void this.toast("Path params and query must be valid JSON.")}this.saving=!0,this.http.post(`${u.C}/api_builder/test`,{endpoint_id:this.testForm.value.endpointId,path_params:t,query:n,dry_run:!1},{context:(0,h.PH)()}).pipe((0,S.j)(()=>this.saving=!1)).subscribe({next:r=>this.testResult=JSON.stringify(r,null,2),error:r=>{const s=(0,G.cQ)(r);this.testResult=JSON.stringify(s.raw??s,null,2)}})}selectApi(t){this.editorOpen=!0,this.apiDetailsOpen=!1,this.selectedApiId=t,this.loadWorkspaceServices(t);const n=this.apis.find(r=>r.id===t);n&&this.apiForm.patchValue({name:n.name,basePath:n.basePath??n.base_path??"",label:n.label??"",description:n.description??"",status:n.status??"draft"}),this.endpointForm.patchValue({apiId:t}),this.selectedEndpointId=null,this.addingEndpoint=!1}selectEndpoint(t){this.selectedEndpointId=t,this.addingEndpoint=!1,this.lastGeneratedPath="",this.lastGeneratedLabel="",this.lastGeneratedDescription="";const n=this.endpoints.find(r=>r.id===t);if(n)try{this.endpointForm.patchValue({apiId:n.apiId??n.api_id??this.selectedApiId,method:n.method,path:n.path,label:n.label??"",description:n.description??"",executionPlan:JSON.stringify(n.executionPlan??n.execution_plan??{},null,2),responseMapping:JSON.stringify(n.responseMapping??n.response_mapping??{},null,2)});const r=n.executionPlan??n.execution_plan,s=Array.isArray(r?.steps)?r?.steps?.[0]:null,a=String(s?.resource??""),l=String(s?.service??""),b=a.match(/^_table\/([^/{]+)(?:\/\{path\.id\})?$/)?.[1]??"",y=a.endsWith("/{path.id}"),d=s?.params??{},v=String(d.fields??"").split(",").map(I=>I.trim()).filter(Boolean),F=String(d.related??"").split(",").map(I=>I.trim()).filter(Boolean),E=String(d.order??""),[R="",V="ASC"]=E.split(/\s+/,2),ne="DESC"===(V||"ASC").toUpperCase()?"DESC":"ASC",j=Number(d.limit??25),D=s?.aliases??{},B=Object.keys(n.responseMapping??n.response_mapping??{})[0]??"resource",Nn="data"===B?"data":B===this.safeStepId(b)?"table":"resource";l&&b&&(this.pendingSelectedFieldNames=v.length?v:null,this.selectedRelationships=new Set(F),this.fieldAliases=Object.fromEntries(Object.entries(D).filter(([,I])=>"string"==typeof I&&I).map(([I,Gn])=>[I,String(Gn)])),this.sourceForm.patchValue({service:l,table:b,includeId:y,sortField:R,sortDirection:ne,limit:Number.isFinite(j)&&j>0?j:25,outputShape:Nn}),this.sourceServiceSearch=this.serviceDisplay(l),this.sourceTableSearch=this.tableDisplay(b),this.filterRules=this.parseFilters(String(d.filter??"")),this.sourceIntrospectionHint="",this.loadFields(b),this.populateSourceTablesQuietly(l))}catch(r){return console.error("Failed to load endpoint into builder",{endpointId:t,error:r,endpoint:n}),this.toast(`Could not load endpoint ${t} into the builder. ${r?.message??""}`),void this.newEndpoint()}this.testForm.patchValue({endpointId:t})}newApi(){this.editorOpen=!0,this.apiDetailsOpen=!0,this.selectedApiId=null,this.workspaceServiceIds=null,this.apiForm.reset({name:"",basePath:"",label:"",description:"",status:"draft"}),this.resetEndpointEditor()}closeEditor(){this.editorOpen=!1,this.apiDetailsOpen=!1,this.selectedApiId=null,this.selectedEndpointId=null,this.addingEndpoint=!1,this.testResult=""}rebuildEndpointCounts(){const t=new Map;for(const n of this.endpoints){const r=n.apiId??n.api_id;"number"==typeof r&&t.set(r,(t.get(r)??0)+1)}this.endpointCounts=t}newEndpoint(){this.selectedApiId?this.resetEndpointEditor():this.toast("Save the API first, then add endpoints to it.")}addEndpoint(){this.selectedApiId?(this.resetEndpointEditor(),this.addingEndpoint=!0):this.toast("Save the API first, then add endpoints to it.")}cancelAddEndpoint(){this.addingEndpoint=!1,this.resetEndpointEditor()}toggleEndpoint(t){this.selectedEndpointId!==t.id||this.addingEndpoint?(this.addingEndpoint=!1,this.selectEndpoint(t.id)):this.selectedEndpointId=null}resetEndpointEditor(){this.selectedEndpointId=null,this.pendingSelectedFieldNames=null,this.endpointForm.reset({apiId:this.selectedApiId,method:"GET",path:"",label:"",description:"",executionPlan:"{}",responseMapping:"{}"}),this.testForm.patchValue({endpointId:null}),this.testResult="",this.previewResult="",this.previewTrace=[],this.previewOk=null,this.previewStale=!1,this.selectedFields.clear(),this.selectedRelationships.clear(),this.fieldAliases={},this.renamingFields.clear(),this.filterRules=[],this.sourceTables=[],this.sourceFields=[],this.sourceRelationships=[],this.sourceServiceSearch="",this.sourceTableSearch="",this.lastGeneratedPath="",this.lastGeneratedLabel="",this.lastGeneratedDescription="",this.sourceForm.patchValue({service:"",table:"",includeId:!1,sortField:"",sortDirection:"ASC",limit:25,outputShape:"resource"})}duplicateSelectedEndpoint(){const t=this.endpoints.find(l=>l.id===this.selectedEndpointId);if(!t||!this.selectedApiId)return void this.toast("Select an endpoint to duplicate.");this.selectEndpoint(t.id);const n=String(t.path??"").trim(),r=n?n.endsWith("-copy")?n:`${n}-copy`:"/new-endpoint",s=String(t.label??"").trim(),a=s?s.endsWith(" (copy)")?s:`${s} (copy)`:"Copied endpoint";this.selectedEndpointId=null,this.endpointForm.patchValue({apiId:this.selectedApiId,path:r,label:a}),this.testForm.patchValue({endpointId:null}),this.toast("Endpoint duplicated into a new draft. Save to create it.")}focusWorkflowStep(t){const r=document.getElementById(`workflow-${t}`);r&&r.scrollIntoView({behavior:"smooth",block:"center"})}deleteEndpoint(t,n){n?.stopPropagation();const r=this.endpoints.find(a=>a.id===t);window.confirm(`Delete ${r?`${r.method} ${r.path}`:`endpoint ${t}`}? This cannot be undone.`)&&(this.saving=!0,this.http.delete(`${u.C}/api_builder/endpoints/${t}`,{context:(0,h.PH)()}).pipe((0,S.j)(()=>this.saving=!1)).subscribe({next:()=>{this.endpoints=this.endpoints.filter(a=>a.id!==t),this.rebuildEndpointCounts(),this.toast("Endpoint deleted."),this.selectedEndpointId===t&&this.newEndpoint()},error:a=>this.toast(`Could not delete endpoint. ${this.describeHttpError(a)}`)}))}deleteApi(t,n){n?.stopPropagation();const r=this.apis.find(a=>a.id===t);window.confirm(`Delete "${r?r.label||r.name:`API ${t}`}" and all of its endpoints? This cannot be undone.`)&&(this.loading=!0,this.http.delete(`${u.C}/api_builder/apis/${t}`,{context:(0,h.PH)()}).pipe((0,S.j)(()=>this.loading=!1)).subscribe({next:()=>{this.apis=this.apis.filter(a=>a.id!==t),this.endpoints=this.endpoints.filter(a=>(a.apiId??a.api_id)!==t),this.rebuildEndpointCounts(),this.toast("API deleted."),this.selectedApiId===t&&this.closeEditor()},error:a=>this.toast(`Could not delete API. ${this.describeHttpError(a)}`)}))}validateJsonEditors(){this.applyJsonControlValidation(this.endpointForm.controls.executionPlan,"Execution plan"),this.applyJsonControlValidation(this.endpointForm.controls.responseMapping,"Response mapping")}applyJsonControlValidation(t,n){const r=t.value??"",s={...t.errors??{}};if(delete s.jsonInvalid,r.trim()){delete s.required;try{const a=JSON.parse(r);(!a||"object"!=typeof a||Array.isArray(a))&&(s.jsonInvalid=`${n} must be a JSON object.`)}catch(a){s.jsonInvalid=`${n} JSON is invalid: ${a?.message??"Parse error."}`}}else s.required=!0;t.setErrors(Object.keys(s).length?s:null)}jsonValidationError(t){return t?"string"==typeof t.jsonInvalid?t.jsonInvalid:t.required?"JSON is required.":"":""}withoutEmptyOptionalFields(t){return Object.fromEntries(Object.entries(t).filter(([n,r])=>!["label","description"].includes(n)||""!==r))}parseJsonObject(t){if("string"!=typeof t)return null;try{const n=JSON.parse(t);return n&&"object"==typeof n&&!Array.isArray(n)?n:null}catch{return null}}tablesFromOpenApi(t){const n=new Set;return t.forEach(r=>{const s=r.match(/^\/_table\/([^/{]+)$/);if(s?.[1])return void n.add(s[1]);const a=r.match(/^\/([^/{]+)(?:\/\{[^}]+\})?$/);a?.[1]&&!a[1].startsWith("_")&&n.add(a[1])}),Array.from(n).sort((r,s)=>r.localeCompare(s)).map(r=>({name:r,source:"openapi"}))}loadFieldsFromOpenApi(t){const n=this.sourceForm.value.service;n?this.http.get(`${u.C}/api_docs/${n}`,{params:{expand_schema:!0},context:(0,h.Ku)()}).subscribe({next:r=>{const s=this.fieldsFromOpenApi(r,t);if(s.length){if(this.sourceFields=s,this.sourceRelationships=[],this.pendingSelectedFieldNames?.length){const a=new Set(this.pendingSelectedFieldNames);this.sourceFields.forEach(l=>{a.has(l.name)&&this.selectedFields.add(l.name)}),this.pendingSelectedFieldNames=null}else this.sourceFields.forEach(a=>this.selectedFields.add(a.name));this.generateEndpointFromSource()}else this.toast("No field schema found in API spec for this resource.")},error:()=>this.toast("Could not load table fields.")}):this.toast("Could not load table fields.")}fieldsFromOpenApi(t,n){const r=t.paths??{},s=[`/_table/${n}`,`/${n}`,`/${n}/{id}`];for(const a of s){const b=r[a]?.get?.responses?.[200]?.content?.["application/json"]?.schema,d=this.resolveRowSchema(b)?.properties;if(d)return Object.entries(d).map(([v,F])=>({name:v,label:this.titleFromName(v),type:this.sourceFieldTypeFromOpenApi(F),openapi:F}))}return[]}resolveRowSchema(t){return t&&"object"==typeof t?"object"===t.type&&t.properties?Object.values(t.properties).find(s=>"array"===s?.type&&s?.items)?.items??t:"array"===t.type&&t.items?t.items:null:null}sourceFieldTypeFromOpenApi(t){const n=String(t?.type??"string"),r=String(t?.format??"");return r?`${n}:${r}`:n}mapRelatedToRelationships(t){return Array.isArray(t)?t.map(n=>({name:String(n?.name??n?.field??""),label:String(n?.label??this.titleFromName(String(n?.name??n?.field??""))),type:String(n?.type??"relationship"),field:String(n?.field??""),refTable:String(n?.refTable??n?.ref_table??n?.table??""),refField:String(n?.refField??n?.ref_field??n?.idField??n?.id_field??"")})).filter(n=>!!n.name):[]}buildFilterString(){return this.filterRules.filter(t=>t.field&&""!==t.value).map(t=>{const n=this.formatFilterValue(t);return"like"===t.operator?`${t.field} like ${n}`:`${t.field}${t.operator}${n}`}).join(" AND ")}parseFilters(t){return t.trim()?t.split(/\s+AND\s+/i).map(n=>n.trim()).filter(Boolean).map(n=>{const r=n.match(/^([A-Za-z0-9_]+)\s+like\s+'?(.*?)'?$/i);if(r){const[,a,l]=r;return{field:a,operator:"like",value:l.replace(/^%|%$/g,"")}}const s=n.match(/^([A-Za-z0-9_]+)\s*(=|!=|>=|<=|>|<)\s*'?(.+?)'?$/);if(s){const[,a,l,_]=s;return{field:a,operator:l,value:_}}return null}).filter(n=>!!n):[]}formatFilterValue(t){const n="like"===t.operator?`%${t.value}%`:t.value,r=this.sourceFields.find(s=>s.name===t.field);return r&&this.isNumericField(r)||/^-?\d+(\.\d+)?$/.test(n)?n:`'${n.replace(/'/g,"''")}'`}buildRequestSchema(t){if(!t)return{};const n=this.sourceFields.find(r=>this.isPrimaryKey(r))??this.sourceFields.find(r=>"id"===r.name);return{path:{id:{...this.openApiSchemaForField(n),required:!0,description:n?`Value for ${n.label||n.name}.`:"Record identifier."}}}}buildResponseSchema(t,n){const r=Object.fromEntries(this.selectedFieldNames.map(l=>{const _=this.sourceFields.find(b=>b.name===l);return[l,this.openApiSchemaForField(_)]})),s=this.sourceFields.filter(l=>this.selectedFields.has(l.name)&&!!l.required&&!(l.allowNull??l.allow_null)).map(l=>l.name),a={type:"object",properties:r,additionalProperties:!1};return s.length&&(a.required=s),{type:"object",properties:{[t]:n?a:{type:"array",items:a}},additionalProperties:!1}}openApiSchemaForField(t){if(t?.openapi)return t.openapi;const n=this.fieldType(t);if(this.isNumericField(t))return n.includes("int")||"id"===n?{type:"integer"}:{type:"number"};if(n.includes("bool"))return{type:"boolean"};if("date"===n)return{type:"string",format:"date"};if(n.includes("date")||n.includes("time"))return{type:"string",format:"date-time"};if("array"===n)return{type:"array",items:{}};if("object"===n)return{type:"object",additionalProperties:!0};const r={type:"string"};return t?.length&&(r.maxLength=t.length),t&&(t.allowNull??t.allow_null)&&(r.nullable=!0),r}fieldTypeLabel(t){const n=this.fieldTypeLabelCache.get(t);if(void 0!==n)return n;const r=[t.type,t.dbType??t.db_type].filter(Boolean),s=t.length??(t.precision?`${t.precision}${t.scale?`,${t.scale}`:""}`:null),a=`${r.join(" / ")}${s?` (${s})`:""}`;return this.fieldTypeLabelCache.set(t,a),a}isPrimaryKey(t){return!!(t.isPrimaryKey??t.is_primary_key)}isUnique(t){return!!(t.isUnique??t.is_unique)}isForeignKey(t){return!!(t.isForeignKey??t.is_foreign_key)}isNumericField(t){const n=this.fieldType(t);return["number","integer","decimal","float","double","id"].some(r=>n.includes(r))}fieldType(t){return String(t?.type??t?.dbType??t?.db_type??"").toLowerCase().trim()}safeStepId(t){return t.replace(/[^A-Za-z0-9_]+/g,"_")}resolveOutputKey(t){switch(this.sourceForm.value.outputShape){case"table":return this.safeStepId(t||"data");case"data":return"data";default:return"resource"}}describeHttpError(t){const n=(0,G.cQ)(t);if((0,G.zH)(n).includes("api_id_method_path_unique"))return"An endpoint with the same HTTP method and path already exists in this API.";const r=n.fields.length?n.fields.map(s=>s.message).join(" "):n.message;return this.transloco.translate(String(r)).replace(/\s+/g," ").replace(/"/g,'"').trim()}titleFromName(t){let n=this.titleFromNameCache.get(t);return void 0===n&&(n=t.split(/[_-]+/).filter(Boolean).map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(" "),this.titleFromNameCache.set(t,n)),n}toast(t){this.snackBar.open(t,"Dismiss",{duration:4e3})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=e.VBU({type:i,selectors:[["df-api-builder"]],hostBindings:function(n,r){1&n&&e.bIt("keydown",function(a){return r.onGlobalShortcut(a)},!1,e.EBC)},standalone:!0,features:[e.aNF],decls:12,vars:7,consts:[[1,"builder-shell"],[1,"builder-header"],[4,"ngIf"],["class","back-link","role","button","tabindex","0",3,"click","keydown.enter",4,"ngIf"],[1,"header-actions"],["mat-flat-button","","color","primary","type","button",3,"click",4,"ngIf"],["mode","indeterminate",4,"ngIf"],["class","api-list",4,"ngIf"],["class","empty-state",4,"ngIf"],["class","api-detail",4,"ngIf"],["endpointEditor",""],[1,"eyebrow"],["role","button","tabindex","0",1,"back-link",3,"click","keydown.enter"],["mat-flat-button","","color","primary","type","button",3,"click"],["mode","indeterminate"],[1,"api-list"],[1,"create-card",3,"click"],["class","api-card",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"api-card",3,"click"],["mat-card-avatar",""],["mat-icon-button","","type","button","aria-label","Delete API","matTooltip","Delete API",1,"api-card-delete",3,"click"],[1,"card-meta"],[1,"count-chip"],[1,"empty-state"],[1,"api-detail"],[1,"api-settings-card"],[1,"api-settings-form",3,"formGroup","ngSubmit"],[1,"api-settings-head"],[1,"api-title-block"],["class","base-url",4,"ngIf"],[1,"api-settings-actions"],["mat-flat-button","","color","primary","type","button",3,"disabled","click",4,"ngIf"],["mat-button","","type","button",3,"disabled","click",4,"ngIf"],["mat-button","","type","button",3,"click",4,"ngIf"],["mat-button","","type","button",3,"disabled","click"],["mat-button","","color","warn","type","button",3,"click",4,"ngIf"],["class","api-settings-grid",4,"ngIf"],[3,"apiId","workspaceChanged",4,"ngIf"],[1,"endpoints-section"],[1,"endpoints-bar"],[1,"muted"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],["class","save-hint",4,"ngIf"],[1,"endpoint-accordion"],["class","endpoint-card open",4,"ngIf"],["class","endpoint-card",3,"open",4,"ngFor","ngForOf","ngForTrackBy"],["class","empty-state small",4,"ngIf"],[1,"base-url"],["mat-button","","type","button",3,"click"],["mat-button","","color","warn","type","button",3,"click"],[1,"api-settings-grid"],["appearance","outline"],["matInput","","formControlName","label"],["matInput","","formControlName","basePath"],["appearance","outline",1,"span-all"],["matInput","","rows","2","formControlName","description"],["mat-flat-button","","color","primary","type","submit",1,"save-api-btn",3,"disabled"],[3,"apiId","workspaceChanged"],[1,"save-hint"],[1,"endpoint-card","open"],[1,"endpoint-row"],[1,"endpoint-row-main","static"],[1,"method-chip","method-get"],[1,"ep-path"],[1,"ep-label"],["mat-icon-button","","type","button","matTooltip","Discard",3,"click"],[1,"endpoint-editor"],[4,"ngTemplateOutlet"],[1,"endpoint-card"],["type","button",1,"endpoint-row-main",3,"click"],[1,"spacer"],[1,"ep-chevron"],["mat-icon-button","","type","button","matTooltip","Delete endpoint",1,"endpoint-row-delete",3,"click"],["class","endpoint-editor",4,"ngIf"],[1,"empty-state","small"],[1,"endpoint-shell",3,"formGroup","ngSubmit"],[1,"endpoint-main"],["id","workflow-route",1,"workflow-stage"],[1,"stage-heading"],[1,"stage-number"],[1,"route-preview","hero-preview"],[1,"endpoint-identity",3,"formGroup"],["matInput","","formControlName","label","placeholder","e.g. List active customers"],["matInput","","formControlName","path","placeholder","/customers"],["aria-label","Workflow status",1,"workflow-strip"],["type","button","class","workflow-step",3,"complete","click",4,"ngFor","ngForOf","ngForTrackBy"],["id","workflow-source",1,"workflow-stage"],[1,"source-builder",3,"formGroup"],["appearance","outline",1,"span-2"],["matInput","","type","text","placeholder","Search connected data sources\u2026",3,"value","matAutocomplete","input","focus","blur"],["matSuffix",""],[3,"optionSelected"],["svcAuto","matAutocomplete"],["disabled","",4,"ngIf"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["class","recent-source-chips",4,"ngIf"],["matInput","","type","text","placeholder","Search datasets and tables\u2026",3,"value","matAutocomplete","disabled","input","focus","blur"],["tblAuto","matAutocomplete"],["class","source-hint",4,"ngIf"],["formControlName","includeId",1,"id-toggle",3,"change"],["class","builder-section workflow-stage","id","workflow-shape",4,"ngIf"],["class","builder-section workflow-stage",4,"ngIf"],["id","workflow-rules",1,"builder-section"],[1,"section-heading"],["class","filter-empty",4,"ngIf"],["class","filter-row",4,"ngFor","ngForOf","ngForTrackBy"],["id","workflow-output",1,"builder-section","collapsible-section"],[1,"result-options",3,"formGroup"],["formControlName","sortField",3,"selectionChange"],["value",""],["formControlName","sortDirection",3,"selectionChange"],["value","ASC"],["value","DESC"],["matInput","","type","number","min","1","max","1000","formControlName","limit",3,"input"],["formControlName","outputShape",3,"selectionChange"],["value","resource"],["value","data"],["value","table"],["id","workflow-publish",1,"save-row"],["mat-flat-button","","color","primary","type","submit",3,"disabled"],["mat-stroked-button","","type","button",3,"disabled","click"],[1,"save-row-spacer"],[3,"routeLabel","sourceSummary","fieldNames","relationshipNames","previewResult","previewStale","previewing","canPreview","previewOk","trace","previewRequested"],[1,"endpoint-inspect"],[1,"inspect-heading"],[1,"endpoint-panel-tabs"],["label","Inspector"],[1,"inspector-panel"],[1,"inspector-block"],["class","preview-list",4,"ngIf","ngIfElse"],["noSteps",""],["class","response-tags",4,"ngIf","ngIfElse"],["noResponseFields",""],["label","Advanced JSON"],[1,"advanced-json-panel",3,"formGroup"],["appearance","outline",1,"json-field"],["matInput","","rows","10","formControlName","executionPlan"],["matInput","","rows","8","formControlName","responseMapping"],[2,"margin-top","4px"],[2,"cursor","pointer","color","#2a4b8d","font-weight","600"],[2,"font-size","0.88em","color","rgba(0,0,0,0.75)","padding","8px 2px"],[2,"margin-bottom","4px"],[2,"background","rgba(0,0,0,0.05)","padding","10px","border-radius","6px","overflow","auto"],["label","Test"],[1,"test-panel",3,"formGroup"],["class","inspector-empty",4,"ngIf"],["type","button",1,"workflow-step",3,"click"],[1,"step-top"],[1,"step-check"],[1,"step-label"],[1,"step-detail"],["disabled",""],[3,"value"],[1,"option-meta"],[1,"recent-source-chips"],["mat-stroked-button","","type","button",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-stroked-button","","type","button",3,"click"],[1,"source-hint"],["id","workflow-shape",1,"builder-section","workflow-stage"],[1,"stage-title"],[1,"field-toolbar"],["matInput","",3,"value","input"],[1,"field-grid"],["class","field-item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"field-item"],[3,"checked","change"],[1,"field-name"],["class","field-badge",4,"ngIf"],["class","rename-input",3,"value","placeholder","input","blur",4,"ngIf"],["class","rename-trigger","type","button",3,"click",4,"ngIf"],[1,"field-badge"],[1,"rename-input",3,"value","placeholder","input","blur"],["type","button",1,"rename-trigger",3,"click"],[1,"builder-section","workflow-stage"],["class","contract-warning",4,"ngIf"],[1,"relationship-grid"],["class","relationship-item",4,"ngFor","ngForOf","ngForTrackBy"],[1,"contract-warning"],[4,"ngFor","ngForOf"],[1,"relationship-item"],[1,"relationship-pill",3,"checked","change"],[1,"filter-empty"],[1,"filter-row"],[3,"value","selectionChange"],["mat-icon-button","","type","button","aria-label","Remove filter",3,"click"],[1,"preview-list"],["class","preview-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"preview-row"],[1,"inspector-empty"],[1,"response-tags"],["class","response-tag",4,"ngFor","ngForOf","ngForTrackBy"],[1,"response-tag"],["matInput","","rows","4","formControlName","pathParams"],["matInput","","rows","3","formControlName","query"]],template:function(n,r){1&n&&(e.j41(0,"section",0)(1,"header",1),e.DNE(2,yt,7,0,"div",2),e.DNE(3,wt,4,0,"a",3),e.j41(4,"div",4),e.DNE(5,Et,4,0,"button",5),e.k0s()(),e.DNE(6,jt,1,0,"mat-progress-bar",6),e.DNE(7,Rt,10,2,"div",7),e.DNE(8,Pt,7,0,"div",8),e.DNE(9,zt,39,20,"div",9),e.DNE(10,Dn,247,58,"ng-template",null,10,e.C5r),e.k0s()),2&n&&(e.R7$(2),e.Y8G("ngIf",!r.editorOpen),e.R7$(1),e.Y8G("ngIf",r.editorOpen),e.R7$(2),e.Y8G("ngIf",!r.editorOpen),e.R7$(1),e.Y8G("ngIf",r.loading||r.saving||r.previewing),e.R7$(1),e.Y8G("ngIf",!r.editorOpen),e.R7$(1),e.Y8G("ngIf",!r.editorOpen&&!r.loading&&0===r.apis.length),e.R7$(1),e.Y8G("ngIf",r.editorOpen))},dependencies:[c.MD,c.Sq,c.bT,c.T3,c.GH,m.X1,m.qT,m.me,m.Q0,m.BC,m.cb,m.VZ,m.zX,m.j4,m.JD,pe.jL,pe.$3,K.wT,pe.pN,P.Hl,P.$z,P.iY,O.Hu,O.RN,O.QG,O.m2,O.MM,O.Lc,O.dh,ye.g7,ye.So,w.RG,w.rl,w.nJ,w.MV,w.TL,w.yw,T.m_,T.An,H.fS,H.fg,K.Sy,we.PO,we.HM,Q.Ve,Q.VO,Z._T,de.RI,de.mq,de.T8,ee.uc,ee.oV,kt,at],styles:[".builder-shell[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;padding:24px}.builder-header[_ngcontent-%COMP%]{align-items:flex-start;display:flex;gap:16px;justify-content:space-between}.header-actions[_ngcontent-%COMP%]{display:flex;gap:8px}.back-link[_ngcontent-%COMP%]{align-items:center;cursor:pointer;display:inline-flex;font-weight:600;gap:6px;opacity:.85}.back-link[_ngcontent-%COMP%]:hover{opacity:1}.builder-header[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:28px;line-height:1.2;margin:0 0 6px}.builder-header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;max-width:720px}.eyebrow[_ngcontent-%COMP%]{font-size:12px;font-weight:700;letter-spacing:0;text-transform:uppercase}.api-detail[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:22px}.api-settings-card[_ngcontent-%COMP%]{border-radius:10px}.api-settings-head[_ngcontent-%COMP%]{align-items:flex-start;display:flex;gap:16px;justify-content:space-between;margin-bottom:14px}.api-title-block[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:22px;line-height:1.2;margin:4px 0 8px}.base-url[_ngcontent-%COMP%]{background:rgba(127,127,127,.12);border-radius:6px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;padding:3px 8px}.api-settings-actions[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.status-chip[_ngcontent-%COMP%]{border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.04em;padding:4px 10px;text-transform:uppercase}.status-draft[_ngcontent-%COMP%]{background:rgba(255,171,0,.16);color:#b07400}.status-published[_ngcontent-%COMP%]{background:rgba(34,197,94,.16);color:#1a7f43}.api-settings-grid[_ngcontent-%COMP%]{align-items:start;display:grid;gap:12px 14px;grid-template-columns:repeat(2,minmax(0,1fr))}.api-settings-grid[_ngcontent-%COMP%] .span-all[_ngcontent-%COMP%]{grid-column:1/-1}.api-settings-grid[_ngcontent-%COMP%] .save-api-btn[_ngcontent-%COMP%]{justify-self:start}.endpoints-section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.endpoints-bar[_ngcontent-%COMP%]{align-items:center;display:flex;gap:12px;justify-content:space-between}.endpoints-bar[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:18px;margin:0}.endpoints-bar[_ngcontent-%COMP%] .muted[_ngcontent-%COMP%]{margin:2px 0 0;opacity:.7}.endpoint-accordion[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.endpoint-card[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.28);border-radius:8px;overflow:hidden;transition:border-color .15s,box-shadow .15s}.endpoint-card.open[_ngcontent-%COMP%]{border-color:#3f51b58c;box-shadow:0 1px 12px #3f51b51f;overflow:visible}.endpoint-row[_ngcontent-%COMP%]{align-items:center;display:flex;gap:4px}.endpoint-row-main[_ngcontent-%COMP%]{align-items:center;background:transparent;border:none;color:inherit;cursor:pointer;display:flex;flex:1;font:inherit;gap:12px;min-width:0;padding:12px 14px;text-align:left;width:100%}.endpoint-row-main.static[_ngcontent-%COMP%]{cursor:default}.endpoint-row-main[_ngcontent-%COMP%]:hover:not(.static){background:rgba(127,127,127,.06)}.method-chip[_ngcontent-%COMP%]{border-radius:5px;color:#fff;flex:none;font-size:12px;font-weight:700;letter-spacing:.03em;min-width:56px;padding:4px 8px;text-align:center}.method-get[_ngcontent-%COMP%]{background:#49cc90}.method-post[_ngcontent-%COMP%]{background:#61affe}.method-put[_ngcontent-%COMP%]{background:#fca130}.method-delete[_ngcontent-%COMP%]{background:#f93e3e}.method-patch[_ngcontent-%COMP%]{background:#50e3c2}.ep-path[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ep-label[_ngcontent-%COMP%]{opacity:.68;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spacer[_ngcontent-%COMP%]{flex:1}.ep-chevron[_ngcontent-%COMP%]{flex:none;opacity:.55}.endpoint-row-delete[_ngcontent-%COMP%]{flex:none;opacity:.45}.endpoint-row[_ngcontent-%COMP%]:hover .endpoint-row-delete[_ngcontent-%COMP%]{opacity:1}.endpoint-editor[_ngcontent-%COMP%]{border-top:1px solid rgba(127,127,127,.2);display:flex;flex-direction:column;gap:16px;padding:18px 16px}.endpoint-inspect[_ngcontent-%COMP%]{border-top:1px solid rgba(127,127,127,.18);padding-top:10px}.inspect-heading[_ngcontent-%COMP%]{font-size:13px;font-weight:700;margin:0 0 4px;opacity:.7}.empty-state.small[_ngcontent-%COMP%]{gap:6px;padding:32px 16px}.endpoint-panel-tabs[_ngcontent-%COMP%]{margin-top:12px}.inspector-panel[_ngcontent-%COMP%]{display:grid;gap:12px;padding-top:12px}.inspector-block[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.25);border-radius:8px;display:grid;gap:8px;padding:10px}.inspector-empty[_ngcontent-%COMP%]{margin:0;opacity:.72}.response-tags[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px}.response-tag[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.3);border-radius:999px;font-size:12px;padding:2px 8px}.advanced-json-panel[_ngcontent-%COMP%]{display:grid;gap:10px;padding-top:12px}.workflow-strip[_ngcontent-%COMP%]{display:grid;gap:8px;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));margin-bottom:8px}.workflow-step[_ngcontent-%COMP%]{align-items:stretch;background:rgba(127,127,127,.05);border:1px solid rgba(148,163,184,.4);border-radius:8px;color:inherit;cursor:pointer;display:flex;flex-direction:column;font:inherit;gap:5px;line-height:1.3;padding:10px 12px;text-align:left}.workflow-step[_ngcontent-%COMP%]:hover{border-color:#94a3b8b3}.workflow-step.complete[_ngcontent-%COMP%]{background:rgba(34,197,94,.1);border-color:#22c55e8c}.step-top[_ngcontent-%COMP%]{align-items:center;display:flex;gap:6px}.step-check[_ngcontent-%COMP%]{font-size:17px;height:17px;opacity:.45;width:17px}.workflow-step.complete[_ngcontent-%COMP%] .step-check[_ngcontent-%COMP%]{color:#16a34a;opacity:1}.workflow-step[_ngcontent-%COMP%] .step-label[_ngcontent-%COMP%]{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase}.workflow-step.complete[_ngcontent-%COMP%] .step-label[_ngcontent-%COMP%]{color:#15803d}.workflow-step[_ngcontent-%COMP%] .step-detail[_ngcontent-%COMP%]{font-size:12.5px;opacity:.92}.api-list[_ngcontent-%COMP%]{display:grid;gap:16px;grid-template-columns:repeat(auto-fill,minmax(280px,1fr))}.api-card[_ngcontent-%COMP%], .create-card[_ngcontent-%COMP%]{border-radius:8px;cursor:pointer;min-height:156px}.create-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:8px;height:100%;justify-content:center;text-align:center}.create-card[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:34px;height:34px;width:34px}.api-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:8px 0 14px;min-height:40px}.card-meta[_ngcontent-%COMP%]{display:flex;gap:8px}.card-meta[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.35);border-radius:999px;font-size:12px;padding:4px 8px}.empty-state[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:8px;padding:48px 16px;text-align:center}.endpoint-shell[_ngcontent-%COMP%]{align-items:start;display:grid;gap:16px;grid-template-columns:minmax(0,1fr) minmax(290px,360px)}.endpoint-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px;min-width:0}.workflow-stage[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.24);border-radius:8px;display:grid;gap:12px;padding:12px}.stage-heading[_ngcontent-%COMP%], .stage-title[_ngcontent-%COMP%]{align-items:center;display:flex;gap:9px}.stage-heading[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child, .section-heading[_ngcontent-%COMP%] .stage-title[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]:last-child{display:flex;flex-direction:column}.stage-heading[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.68}.stage-number[_ngcontent-%COMP%]{align-items:center;background:#3f51b5;border-radius:50%;color:#fff;display:inline-flex;flex:none;font-size:12px;font-weight:700;height:24px;justify-content:center;width:24px}.preview-row[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.72}.preview-list[_ngcontent-%COMP%]{display:grid;gap:8px}.source-builder[_ngcontent-%COMP%]{display:grid;align-items:center;gap:12px;grid-template-columns:minmax(200px,1fr) minmax(200px,1fr) minmax(180px,auto)}.recent-source-chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px}.source-hint[_ngcontent-%COMP%]{font-size:12px;margin:0;opacity:.82}.option-meta[_ngcontent-%COMP%]{margin-left:6px;opacity:.6}.source-builder[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:-20px}.route-preview[_ngcontent-%COMP%]{align-items:flex-start;border:1px solid rgba(63,81,181,.24);border-radius:8px;display:flex;gap:10px;padding:12px}.hero-preview[_ngcontent-%COMP%]{background:rgba(63,81,181,.08)}.endpoint-identity[_ngcontent-%COMP%]{display:grid;gap:12px;grid-template-columns:minmax(0,1fr) minmax(0,1fr)}@media (max-width: 980px){.endpoint-identity[_ngcontent-%COMP%]{grid-template-columns:1fr}}.route-preview[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.route-preview[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.72}.builder-section[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.24);border-radius:8px;padding:12px}.collapsible-section[_ngcontent-%COMP%] > summary[_ngcontent-%COMP%]{cursor:pointer;list-style:none;margin-bottom:0}.collapsible-section[_ngcontent-%COMP%] > summary[_ngcontent-%COMP%]::-webkit-details-marker{display:none}.collapsible-section[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%]{margin-bottom:10px}.collapsible-section[_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.6;transition:transform .15s ease}.collapsible-section[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}.section-heading[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:space-between;gap:12px;margin-bottom:10px}.section-heading[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.section-heading[_ngcontent-%COMP%] .stage-title[_ngcontent-%COMP%]{align-items:center;flex-direction:row}.section-heading[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.72}.field-grid[_ngcontent-%COMP%]{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.field-toolbar[_ngcontent-%COMP%]{align-items:center;display:grid;gap:8px;grid-template-columns:minmax(220px,1fr) auto auto;margin-bottom:8px}.field-toolbar[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:-18px}.field-item[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.22);border-radius:6px;display:flex;flex-direction:column;gap:4px;padding:6px 8px}.rename-input[_ngcontent-%COMP%]{background:rgba(127,127,127,.06);border:1px solid rgba(127,127,127,.28);border-radius:4px;font-size:12px;margin-top:2px;outline:none;padding:3px 6px;width:100%}.rename-input[_ngcontent-%COMP%]:focus{border-color:#3f51b599}.rename-trigger[_ngcontent-%COMP%]{align-items:center;align-self:flex-start;background:transparent;border:0;color:#3f51b5;cursor:pointer;display:inline-flex;font:inherit;font-size:12px;gap:4px;padding:2px 0}.rename-trigger[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:15px;height:15px;width:15px}.field-name[_ngcontent-%COMP%]{font-weight:600}.field-grid[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{margin-left:4px;opacity:.7}.field-badge[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.32);border-radius:999px;font-size:11px;margin-left:5px;padding:2px 6px}.relationship-grid[_ngcontent-%COMP%]{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(220px,1fr))}.relationship-item[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.28);border-radius:6px;display:flex;flex-direction:column;gap:4px;padding:8px 10px}.relationship-pill[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.relationship-pill[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{opacity:.72}.filter-empty[_ngcontent-%COMP%]{align-items:center;border:1px dashed rgba(127,127,127,.35);border-radius:8px;display:flex;gap:8px;padding:12px}.contract-warning[_ngcontent-%COMP%]{align-items:flex-start;background:rgba(255,171,0,.1);border:1px solid rgba(255,171,0,.4);border-radius:7px;display:flex;gap:8px;margin-bottom:10px;padding:9px}.contract-warning[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{display:flex;flex-direction:column}.contract-warning[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#b36b00}.filter-row[_ngcontent-%COMP%]{align-items:center;display:grid;gap:10px;grid-template-columns:minmax(170px,1fr) minmax(160px,.8fr) minmax(160px,1fr) auto}.filter-row[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:-18px}.result-options[_ngcontent-%COMP%]{display:grid;gap:10px;grid-template-columns:repeat(4,minmax(140px,1fr))}.result-options[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{margin-bottom:-18px}.save-row[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:8px}.save-row-spacer[_ngcontent-%COMP%]{flex:1}.count-chip[_ngcontent-%COMP%]{border:1px solid rgba(127,127,127,.35);border-radius:999px;font-size:12px;padding:4px 8px}.save-hint[_ngcontent-%COMP%]{align-items:center;background:rgba(255,171,0,.1);border:1px solid rgba(255,171,0,.4);border-radius:8px;display:flex;gap:8px;margin:0;padding:10px 12px}.save-hint[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#c77700;flex:none}.preview-row[_ngcontent-%COMP%]{align-items:flex-start;border:1px solid rgba(127,127,127,.28);border-radius:8px;display:flex;gap:10px;padding:10px}.preview-row[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;min-width:0}.muted[_ngcontent-%COMP%]{opacity:.72}.span-2[_ngcontent-%COMP%]{grid-column:1/-1}.json-field[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%], pre[_ngcontent-%COMP%]{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace}.api-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{position:relative}.api-card-delete[_ngcontent-%COMP%]{position:absolute;right:4px;top:4px}.api-card[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{overflow:hidden;padding-right:32px;text-overflow:ellipsis;white-space:nowrap}.route-preview[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.test-panel[_ngcontent-%COMP%]{display:grid;gap:10px;padding-top:12px}pre[_ngcontent-%COMP%]{background:var(--df-code-bg);border-radius:6px;color:var(--df-code-text);margin:16px 0 0;max-height:420px;overflow:auto;padding:14px;white-space:pre-wrap}@media (max-width: 980px){.builder-header[_ngcontent-%COMP%]{display:flex;flex-direction:column}.header-actions[_ngcontent-%COMP%]{flex-wrap:wrap}.source-builder[_ngcontent-%COMP%], .filter-row[_ngcontent-%COMP%], .field-toolbar[_ngcontent-%COMP%], .result-options[_ngcontent-%COMP%]{grid-template-columns:1fr}}@media (max-width: 1120px){.endpoint-shell[_ngcontent-%COMP%]{grid-template-columns:1fr}}"]})}}return i})();function te(i,o){if(i.length!==o.length)return!1;for(let t=0;t{p.d(Y,{HM:()=>me,PO:()=>se});var c=p(1843),e=(p(18331),p(42250)),W=p(8275);const ie=new c.nKC("MAT_PROGRESS_BAR_DEFAULT_OPTIONS"),ue=(0,e.Zc)(class{constructor(f){this._elementRef=f}},"primary");let me=(()=>{class f extends ue{constructor(x,C,k,oe,g){super(x),this._ngZone=C,this._changeDetectorRef=k,this._animationMode=oe,this._isNoopAnimation=!1,this._value=0,this._bufferValue=0,this.animationEnd=new c.bkB,this._mode="determinate",this._transitionendHandler=M=>{0===this.animationEnd.observers.length||!M.target||!M.target.classList.contains("mdc-linear-progress__primary-bar")||("determinate"===this.mode||"buffer"===this.mode)&&this._ngZone.run(()=>this.animationEnd.next({value:this.value}))},this._isNoopAnimation="NoopAnimations"===oe,g&&(g.color&&(this.color=this.defaultColor=g.color),this.mode=g.mode||this.mode)}get value(){return this._value}set value(x){this._value=z((0,W.OE)(x)),this._changeDetectorRef.markForCheck()}get bufferValue(){return this._bufferValue||0}set bufferValue(x){this._bufferValue=z((0,W.OE)(x)),this._changeDetectorRef.markForCheck()}get mode(){return this._mode}set mode(x){this._mode=x,this._changeDetectorRef.markForCheck()}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._transitionendHandler)})}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._transitionendHandler)}_getPrimaryBarTransform(){return`scaleX(${this._isIndeterminate()?1:this.value/100})`}_getBufferBarFlexBasis(){return`${"buffer"===this.mode?this.bufferValue:100}%`}_isIndeterminate(){return"indeterminate"===this.mode||"query"===this.mode}static{this.\u0275fac=function(C){return new(C||f)(c.rXU(c.aKT),c.rXU(c.SKi),c.rXU(c.gRc),c.rXU(c.bc$,8),c.rXU(ie,8))}}static{this.\u0275cmp=c.VBU({type:f,selectors:[["mat-progress-bar"]],hostAttrs:["role","progressbar","aria-valuemin","0","aria-valuemax","100","tabindex","-1",1,"mat-mdc-progress-bar","mdc-linear-progress"],hostVars:8,hostBindings:function(C,k){2&C&&(c.BMQ("aria-valuenow",k._isIndeterminate()?null:k.value)("mode",k.mode),c.AVh("_mat-animation-noopable",k._isNoopAnimation)("mdc-linear-progress--animation-ready",!k._isNoopAnimation)("mdc-linear-progress--indeterminate",k._isIndeterminate()))},inputs:{color:"color",value:"value",bufferValue:"bufferValue",mode:"mode"},outputs:{animationEnd:"animationEnd"},exportAs:["matProgressBar"],features:[c.Vt3],decls:7,vars:4,consts:[["aria-hidden","true",1,"mdc-linear-progress__buffer"],[1,"mdc-linear-progress__buffer-bar"],[1,"mdc-linear-progress__buffer-dots"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__primary-bar"],[1,"mdc-linear-progress__bar-inner"],["aria-hidden","true",1,"mdc-linear-progress__bar","mdc-linear-progress__secondary-bar"]],template:function(C,k){1&C&&(c.j41(0,"div",0),c.nrm(1,"div",1)(2,"div",2),c.k0s(),c.j41(3,"div",3),c.nrm(4,"span",4),c.k0s(),c.j41(5,"div",5),c.nrm(6,"span",4),c.k0s()),2&C&&(c.R7$(1),c.xc7("flex-basis",k._getBufferBarFlexBasis()),c.R7$(2),c.xc7("transform",k._getPrimaryBarTransform()))},styles:["@keyframes mdc-linear-progress-primary-indeterminate-translate{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half))}100%{transform:translateX(var(--mdc-linear-progress-primary-full))}}@keyframes mdc-linear-progress-primary-indeterminate-scale{0%{transform:scaleX(0.08)}36.65%{animation-timing-function:cubic-bezier(0.334731, 0.12482, 0.785844, 1);transform:scaleX(0.08)}69.15%{animation-timing-function:cubic-bezier(0.06, 0.11, 0.6, 1);transform:scaleX(0.661479)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-secondary-indeterminate-translate{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full))}}@keyframes mdc-linear-progress-secondary-indeterminate-scale{0%{animation-timing-function:cubic-bezier(0.205028, 0.057051, 0.57661, 0.453971);transform:scaleX(0.08)}19.15%{animation-timing-function:cubic-bezier(0.152313, 0.196432, 0.648374, 1.004315);transform:scaleX(0.457104)}44.15%{animation-timing-function:cubic-bezier(0.257759, -0.003163, 0.211762, 1.38179);transform:scaleX(0.72796)}100%{transform:scaleX(0.08)}}@keyframes mdc-linear-progress-primary-indeterminate-translate-reverse{0%{transform:translateX(0)}20%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(0)}59.15%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(var(--mdc-linear-progress-primary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-primary-full-neg))}}@keyframes mdc-linear-progress-secondary-indeterminate-translate-reverse{0%{animation-timing-function:cubic-bezier(0.15, 0, 0.515058, 0.409685);transform:translateX(0)}25%{animation-timing-function:cubic-bezier(0.31033, 0.284058, 0.8, 0.733712);transform:translateX(var(--mdc-linear-progress-secondary-quarter-neg))}48.35%{animation-timing-function:cubic-bezier(0.4, 0.627035, 0.6, 0.902026);transform:translateX(var(--mdc-linear-progress-secondary-half-neg))}100%{transform:translateX(var(--mdc-linear-progress-secondary-full-neg))}}@keyframes mdc-linear-progress-buffering-reverse{from{transform:translateX(-10px)}}.mdc-linear-progress{position:relative;width:100%;transform:translateZ(0);outline:1px solid rgba(0,0,0,0);overflow-x:hidden;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}@media screen and (forced-colors: active){.mdc-linear-progress{outline-color:CanvasText}}.mdc-linear-progress__bar{position:absolute;top:0;bottom:0;margin:auto 0;width:100%;animation:none;transform-origin:top left;transition:transform 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__bar-inner{display:inline-block;position:absolute;width:100%;animation:none;border-top-style:solid}.mdc-linear-progress__buffer{display:flex;position:absolute;top:0;bottom:0;margin:auto 0;width:100%;overflow:hidden}.mdc-linear-progress__buffer-dots{background-repeat:repeat-x;flex:auto;transform:rotate(180deg);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='xMinYMin slice'%3E%3Ccircle cx='1' cy='1' r='1'/%3E%3C/svg%3E\");animation:mdc-linear-progress-buffering 250ms infinite linear}.mdc-linear-progress__buffer-bar{flex:0 1 100%;transition:flex-basis 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-linear-progress__primary-bar{transform:scaleX(0)}.mdc-linear-progress__secondary-bar{display:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__bar{transition:none}.mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{left:-145.166611%}.mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{left:-54.888891%;display:block}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation:mdc-linear-progress-primary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-primary-indeterminate-scale 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation:mdc-linear-progress-secondary-indeterminate-translate 2s infinite linear}.mdc-linear-progress--indeterminate.mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar>.mdc-linear-progress__bar-inner{animation:mdc-linear-progress-secondary-indeterminate-scale 2s infinite linear}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__bar{right:0;-webkit-transform-origin:center right;transform-origin:center right}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__primary-bar{animation-name:mdc-linear-progress-primary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--animation-ready .mdc-linear-progress__secondary-bar{animation-name:mdc-linear-progress-secondary-indeterminate-translate-reverse}[dir=rtl] .mdc-linear-progress:not([dir=ltr]) .mdc-linear-progress__buffer-dots,.mdc-linear-progress[dir=rtl]:not([dir=ltr]) .mdc-linear-progress__buffer-dots{animation:mdc-linear-progress-buffering-reverse 250ms infinite linear;transform:rotate(0)}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__primary-bar{right:-145.166611%;left:auto}[dir=rtl] .mdc-linear-progress:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar,.mdc-linear-progress[dir=rtl]:not([dir=ltr]).mdc-linear-progress--indeterminate .mdc-linear-progress__secondary-bar{right:-54.888891%;left:auto}.mdc-linear-progress--closed{opacity:0}.mdc-linear-progress--closed-animation-off .mdc-linear-progress__buffer-dots{animation:none}.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar,.mdc-linear-progress--closed-animation-off.mdc-linear-progress--indeterminate .mdc-linear-progress__bar .mdc-linear-progress__bar-inner{animation:none}@keyframes mdc-linear-progress-buffering{from{transform:rotate(180deg) translateX(calc(var(--mdc-linear-progress-track-height) * -2.5))}}.mdc-linear-progress__bar-inner{border-color:var(--mdc-linear-progress-active-indicator-color)}@media(forced-colors: active){.mdc-linear-progress__buffer-dots{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-color:rgba(0,0,0,0);background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill=''/%3E%3C/svg%3E\")}}.mdc-linear-progress{height:max(var(--mdc-linear-progress-track-height), var(--mdc-linear-progress-active-indicator-height))}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress{height:4px}}.mdc-linear-progress__bar{height:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__bar-inner{border-top-width:var(--mdc-linear-progress-active-indicator-height)}.mdc-linear-progress__buffer{height:var(--mdc-linear-progress-track-height)}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mdc-linear-progress__buffer-dots{background-size:10px var(--mdc-linear-progress-track-height)}}.mdc-linear-progress__buffer{border-radius:var(--mdc-linear-progress-track-shape)}.mat-mdc-progress-bar{--mdc-linear-progress-active-indicator-height:4px;--mdc-linear-progress-track-height:4px;--mdc-linear-progress-track-shape:0}.mat-mdc-progress-bar{display:block;text-align:left;--mdc-linear-progress-primary-half: 83.67142%;--mdc-linear-progress-primary-full: 200.611057%;--mdc-linear-progress-secondary-quarter: 37.651913%;--mdc-linear-progress-secondary-half: 84.386165%;--mdc-linear-progress-secondary-full: 160.277782%;--mdc-linear-progress-primary-half-neg: -83.67142%;--mdc-linear-progress-primary-full-neg: -200.611057%;--mdc-linear-progress-secondary-quarter-neg: -37.651913%;--mdc-linear-progress-secondary-half-neg: -84.386165%;--mdc-linear-progress-secondary-full-neg: -160.277782%}[dir=rtl] .mat-mdc-progress-bar{text-align:right}.mat-mdc-progress-bar[mode=query]{transform:scaleX(-1)}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-dots,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__secondary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__bar-inner.mdc-linear-progress__bar-inner{animation:none}.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__primary-bar,.mat-mdc-progress-bar._mat-animation-noopable .mdc-linear-progress__buffer-bar{transition:transform 1ms}"],encapsulation:2,changeDetection:0})}}return f})();function z(f,A=0,x=100){return Math.max(A,Math.min(x,f))}let se=(()=>{class f{static{this.\u0275fac=function(C){return new(C||f)}}static{this.\u0275mod=c.$C({type:f})}static{this.\u0275inj=c.G2t({imports:[e.yE]})}}return f})()}}]); \ No newline at end of file diff --git a/dist/1643.4893b3dc0dbd730c.js b/dist/1643.4893b3dc0dbd730c.js deleted file mode 100644 index 733fc54b..00000000 --- a/dist/1643.4893b3dc0dbd730c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1643],{61643:(V,E,c)=>{c.r(E),c.d(E,{DfRoleDetailsComponent:()=>z});var m=c(21406),s=c(78227),t=c(18331),_=c(31147),C=c(75066),D=c(54688),v=c(91789),M=c(37385),F=c(453),g=c(60368),b=c(68660),R=c(18724),h=c(58497),k=c(94093),N=c(91900),x=c(28600),S=c(54342),w=c(58781),$=c(97828),Y=c(85390),A=c(89411),e=c(1843),G=c(11863),K=c(42250);function B(a,r){1&a&&(e.j41(0,"th",17),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"roles.accessOverview.tableHeadings.service")," "))}function J(a,r){if(1&a&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&a){const n=r.$implicit;e.Y8G("value",n.id),e.R7$(1),e.JRh(n.name)}}function L(a,r){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Service is required "),e.k0s())}function X(a,r){if(1&a){const n=e.RV6();e.j41(0,"td",18)(1,"mat-form-field",19)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"mat-select",20),e.bIt("selectionChange",function(){const i=e.eBV(n).dataIndex,p=e.XpG();return e.Njj(p.getComponents(p.getFormArrayIndex(i)))}),e.j41(6,"mat-option",21),e.EFF(7,"All"),e.k0s(),e.DNE(8,J,2,2,"mat-option",22),e.k0s(),e.DNE(9,L,2,0,"mat-error",23),e.k0s()()}if(2&a){const n=r.dataIndex,o=e.XpG();let l;e.Y8G("formGroupName",o.getFormArrayIndex(n)),e.R7$(3),e.JRh(e.bMT(4,6,"roles.accessOverview.tableHeadings.service")),e.R7$(3),e.Y8G("value",0),e.R7$(2),e.Y8G("ngForOf",o.serviceOptions)("ngForTrackBy",o.trackById),e.R7$(1),e.Y8G("ngIf",null==o.formArray.controls[o.getFormArrayIndex(n)]||null==(l=o.formArray.controls[o.getFormArrayIndex(n)].get("service"))?null:l.hasError("required"))}}function j(a,r){1&a&&(e.j41(0,"th",17),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"roles.accessOverview.tableHeadings.component")," "))}function d(a,r){if(1&a&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&a){const n=r.$implicit;e.Y8G("value",n),e.R7$(1),e.JRh(n)}}function f(a,r){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Component is required "),e.k0s())}function u(a,r){if(1&a&&(e.j41(0,"td",18)(1,"mat-form-field",19)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"mat-select",24),e.DNE(6,d,2,2,"mat-option",25),e.k0s(),e.DNE(7,f,2,0,"mat-error",23),e.k0s()()),2&a){const n=r.dataIndex,o=e.XpG();let l;e.Y8G("formGroupName",o.getFormArrayIndex(n)),e.R7$(3),e.JRh(e.bMT(4,4,"roles.accessOverview.tableHeadings.component")),e.R7$(3),e.Y8G("ngForOf",o.getComponentArray(o.getFormArrayIndex(n))),e.R7$(1),e.Y8G("ngIf",null==o.formArray.controls[o.getFormArrayIndex(n)]||null==(l=o.formArray.controls[o.getFormArrayIndex(n)].get("component"))?null:l.hasError("required"))}}function T(a,r){1&a&&(e.j41(0,"th",17),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"roles.accessOverview.tableHeadings.access")," "))}function O(a,r){if(1&a&&(e.j41(0,"span",28),e.EFF(1),e.k0s()),2&a){const n=e.XpG(2).dataIndex,o=e.XpG();e.R7$(1),e.Lme(" (+",(o.formArray.controls[o.getFormArrayIndex(n)].value.access.length||0)-1," ",2===o.formArray.controls[o.getFormArrayIndex(n)].value.access.length?"other":"others",") ")}}function U(a,r){if(1&a&&(e.j41(0,"mat-option",21),e.EFF(1),e.DNE(2,O,2,2,"span",27),e.k0s()),2&a){const n=r.$implicit,o=e.XpG().dataIndex,l=e.XpG();e.Y8G("value",n.value),e.R7$(1),e.SpI("",n.label," "),e.R7$(1),e.Y8G("ngIf",(l.formArray.controls[l.getFormArrayIndex(o)].value.access.length||0)>1)}}function W(a,r){1&a&&(e.j41(0,"mat-error"),e.EFF(1," Access is required "),e.k0s())}function ae(a,r){if(1&a){const n=e.RV6();e.j41(0,"td",18)(1,"mat-form-field",19)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"mat-select",26),e.bIt("selectionChange",function(l){const p=e.eBV(n).dataIndex,y=e.XpG();return e.Njj(y.accessChange(y.getFormArrayIndex(p),l.value))}),e.DNE(6,U,3,3,"mat-option",25),e.k0s(),e.DNE(7,W,2,0,"mat-error",23),e.k0s()()}if(2&a){const n=r.dataIndex,o=e.XpG();let l;e.Y8G("formGroupName",o.getFormArrayIndex(n)),e.R7$(3),e.JRh(e.bMT(4,4,"roles.accessOverview.tableHeadings.access")),e.R7$(3),e.Y8G("ngForOf",o.accessOptions),e.R7$(1),e.Y8G("ngIf",null==o.formArray.controls[o.getFormArrayIndex(n)]||null==(l=o.formArray.controls[o.getFormArrayIndex(n)].get("access"))?null:l.hasError("required"))}}function se(a,r){1&a&&(e.j41(0,"th",17),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"roles.accessOverview.tableHeadings.requester")," "))}function le(a,r){if(1&a&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&a){const n=r.$implicit;e.Y8G("value",n.value),e.R7$(1),e.JRh(n.label)}}function ie(a,r){if(1&a&&(e.j41(0,"td",18)(1,"mat-form-field",19)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"mat-select",29),e.DNE(6,le,2,2,"mat-option",25),e.k0s()()()),2&a){const n=r.dataIndex,o=e.XpG();e.Y8G("formGroupName",o.getFormArrayIndex(n)),e.R7$(3),e.JRh(e.bMT(4,3,"roles.accessOverview.tableHeadings.requester")),e.R7$(3),e.Y8G("ngForOf",o.requesterOptions)}}function ce(a,r){1&a&&(e.j41(0,"th",17),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"roles.accessOverview.tableHeadings.advancedFilters")," "))}function me(a,r){if(1&a){const n=e.RV6();e.j41(0,"td",18)(1,"button",30),e.bIt("click",function(){const l=e.eBV(n),i=l.$implicit,p=l.dataIndex,y=e.XpG();return e.Njj(y.toggleRow(i,y.getFormArrayIndex(p)))}),e.nrm(2,"fa-icon",31),e.k0s()()}if(2&a){const n=r.dataIndex,o=e.XpG();e.Y8G("formGroupName",o.getFormArrayIndex(n)),e.R7$(2),e.Y8G("icon",o.faPlus)}}function de(a,r){if(1&a){const n=e.RV6();e.j41(0,"th",17)(1,"button",32),e.bIt("click",function(){e.eBV(n);const l=e.XpG();return e.Njj(l.add())}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",33),e.k0s()()}if(2&a){const n=e.XpG();e.R7$(1),e.BMQ("aria-label",e.bMT(2,2,"newEntry")),e.R7$(2),e.Y8G("icon",n.faPlus)}}function pe(a,r){if(1&a){const n=e.RV6();e.j41(0,"td",18)(1,"button",34),e.bIt("click",function(){const i=e.eBV(n).dataIndex,p=e.XpG();return e.Njj(p.remove(i))}),e.nrm(2,"fa-icon",31),e.k0s()()}if(2&a){const n=r.dataIndex,o=e.XpG();e.Y8G("formGroupName",o.getFormArrayIndex(n)),e.R7$(2),e.Y8G("icon",o.faTrashCan)}}function ue(a,r){if(1&a&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&a){const n=r.$implicit;e.Y8G("value",n.value),e.R7$(1),e.JRh(n.label)}}function fe(a,r){if(1&a){const n=e.RV6();e.qex(0),e.j41(1,"div",37)(2,"mat-form-field",19)(3,"mat-label"),e.EFF(4,"Field"),e.k0s(),e.nrm(5,"input",38),e.k0s(),e.j41(6,"mat-form-field",19)(7,"mat-label"),e.EFF(8,"Operator"),e.k0s(),e.j41(9,"mat-select",39),e.DNE(10,ue,2,2,"mat-option",25),e.k0s()(),e.j41(11,"mat-form-field",19)(12,"mat-label"),e.EFF(13,"Value"),e.k0s(),e.nrm(14,"input",40),e.k0s(),e.j41(15,"div")(16,"mat-button-toggle-group",41),e.bIt("change",function(l){e.eBV(n);const i=e.XpG().dataIndex,p=e.XpG();return e.Njj(p.filterOpChange(l,p.getFormArrayIndex(i)))}),e.j41(17,"mat-button-toggle",42),e.EFF(18,"AND"),e.k0s(),e.j41(19,"mat-button-toggle",43),e.EFF(20,"OR"),e.k0s()()(),e.j41(21,"button",44),e.bIt("click",function(){e.eBV(n);const l=e.XpG().dataIndex,i=e.XpG();return e.Njj(i.addAdvancedFilter(i.getFormArrayIndex(l)))}),e.nrm(22,"fa-icon",31),e.k0s(),e.j41(23,"button",44),e.bIt("click",function(){const i=e.eBV(n).index,p=e.XpG().dataIndex,y=e.XpG();return e.Njj(y.removeAdvancedFilter(y.getFormArrayIndex(p),i))}),e.nrm(24,"fa-icon",31),e.k0s()(),e.bVm()}if(2&a){const n=r.index,o=e.XpG(2);e.R7$(1),e.Y8G("formArrayName",n),e.R7$(9),e.Y8G("ngForOf",o.operatorOptions),e.R7$(12),e.Y8G("icon",o.faPlus),e.R7$(2),e.Y8G("icon",o.faTrashCan)}}function _e(a,r){if(1&a&&(e.j41(0,"td",18)(1,"div",35),e.DNE(2,fe,25,4,"ng-container",36),e.k0s()()),2&a){const n=r.$implicit,o=r.dataIndex,l=e.XpG();e.Y8G("formGroupName",l.getFormArrayIndex(o)),e.BMQ("colspan",6),e.R7$(1),e.Y8G("@detailExpand",n===l.expandedElement?"expanded":"collapsed"),e.R7$(1),e.Y8G("ngForOf",l.getAdvancedFilters(l.getFormArrayIndex(o)).controls)}}function he(a,r){1&a&&e.nrm(0,"tr",45)}function ve(a,r){1&a&&e.nrm(0,"tr",46)}function ge(a,r){1&a&&(e.j41(0,"tr",47)(1,"td",48),e.nrm(2,"br"),e.EFF(3),e.nI1(4,"transloco"),e.k0s()()),2&a&&(e.R7$(3),e.SpI(" ",e.bMT(4,1,"roles.accessOverview.noAccessRules")," "))}function De(a,r){1&a&&e.nrm(0,"tr",49)}c(69099);const oe=function(){return["service","component","access","requester","advancedFilters","actions"]},be=function(){return["expandedDetail"]};let H=class Z{constructor(r,n,o){this.activatedRoute=r,this.baseService=n,this.fb=o,this.displayedColumns=["service","component","access","requester","advancedFilters","actions"],this.expandField=new s.MJ(""),this.faTrashCan=k.sjs,this.faPlus=k.QLR,this.serviceOptions=[{id:0,name:""}],this.trackById=(l,i)=>i.id,this.expandOperator=new s.MJ(""),this.expandValue=new s.MJ(""),this.componentOptions=[{serviceId:0,components:["*"]}],this.accessOptions=[{value:1,label:"GET (read)"},{value:2,label:"POST (create)"},{value:4,label:"PUT (replace)"},{value:8,label:"PATCH (update)"},{value:16,label:"DELETE (remove)"}],this.requesterOptions=[{value:1,label:"API"},{value:2,label:"SCRIPT"}],this.operatorOptions=[{value:"=",label:"="},{value:"!=",label:"!="},{value:">",label:">"},{value:"<",label:"<"},{value:">=",label:">="},{value:"<=",label:"<="},{value:"in",label:"in"},{value:"not in",label:"not in"},{value:"start with",label:"start with"},{value:"end with",label:"end with"},{value:"contains",label:"contains"},{value:"is null",label:"is null"},{value:"is not null",label:"is not null"}],this.filteredComponentArray=[],this.expandedElement$=new Y.t(1),this.expandedElement=null,this.form=this.fb.group({cFormArray:this.fb.array([this.createItem()])})}createItem(){return this.fb.group({service:[""],component:[""]})}ngOnInit(){this.activatedRoute.data.subscribe(r=>{this.serviceOptions=r?.services?.resource.sort((n,o)=>n.nameo.name?1:0)||[],"edit"===r.type&&r.data.roleServiceAccessByRoleId.length>0&&r.data.roleServiceAccessByRoleId.forEach(n=>{const o=n.serviceId,l=this.serviceOptions.find(i=>i.id===o)?.name||"";"email"!==l?this.baseService.get(l,{additionalParams:[{key:"as_access_list",value:!0}]}).subscribe(i=>{this.componentOptions.push({serviceId:o,components:i.resource})}):this.componentOptions.push({serviceId:o,components:["*"]})})}),this.initializeFilteredComponents(),this.updateDataSource()}get cFormArray(){return this.form.get("formArray")}initializeFilteredComponents(){this.filteredComponentArray=this.formArray.controls.map((r,n)=>this.getComponentArray(n))}getComponentArray(r){const n=this.formArray.at(r).get("service")?.value;return this.componentOptions.find(l=>l.serviceId===n)?.components||[]}getFormArrayIndex(r){let n=0;for(let o=0;op.serviceId===l)?.components||[];this.filteredComponentArray[n]=i.filter(p=>p.includes(o))}getComponents(r){var n=this;return(0,R.A)(function*(){const o=n.formArray.controls[r].get("service")?.value,l=n.serviceOptions.find(i=>i.id===o)?.name||"";"email"!==l?n.componentOptions.some(i=>i.serviceId===o)||n.baseService.get(l,{additionalParams:[{key:"as_access_list",value:!0}]}).subscribe(i=>{n.componentOptions.push({serviceId:o,components:i.resource})}):n.componentOptions.push({serviceId:o,components:["*"]})})()}getExtendOperator(r){const n=this.serviceAccess.at(r).get("extend-operator")?.value;return this.componentOptions.find(l=>l.serviceId===n)?.components||[]}toggleRow(r,n){this.expandedElement=this.expandedElement===r?null:r,this.expandedElement&&0===this.getAdvancedFilters(n).length&&this.addAdvancedFilter(n)}accessChange(r,n){this.formArray.at(r).get("access")}updateDataSource(){const r=this.formArray.controls.filter((n,o)=>this.visible[o]);this.dataSource=new h.I6(r)}get hasServiceAccess(){return this.rootForm.controls.serviceAccess.value.length>0}add(){const r=new s.Yp([]);this.formArray.push(new s.gE({service:new s.MJ(0,s.k0.required),component:new s.MJ("",s.k0.required),access:new s.MJ("",s.k0.required),requester:new s.MJ([1],s.k0.required),advancedFilters:r,id:new s.MJ(null),serviceAccess:new s.MJ("")})),this.visible.push(!0),this.updateDataSource()}getAdvancedFilters(r){return this.formArray.controls[r].get("advancedFilters")}addAdvancedFilter(r){this.getAdvancedFilters(r).push(new s.gE({expandField:new s.MJ("",s.k0.required),expandOperator:new s.MJ("",s.k0.required),expandValue:new s.MJ("",s.k0.required),filterOp:new s.MJ("AND")})),this.updateDataSource()}removeAdvancedFilter(r,n){this.getAdvancedFilters(r).removeAt(n),0===this.getAdvancedFilters(r).length&&(this.expandedElement=null),this.updateDataSource()}remove(r){if(r>=0&&r{o.get("filterOp")?.setValue(r.value)})}static{this.\u0275fac=function(n){return new(n||Z)(e.rXU(G.nX),e.rXU(C.qJ),e.rXU(s.ok))}}static{this.\u0275cmp=e.VBU({type:Z,selectors:[["df-roles-access"]],inputs:{formArray:"formArray",roleForm:"roleForm",visible:"visible"},standalone:!0,features:[e.aNF],decls:39,vars:17,consts:[[1,"service-access-accordion","full-width",3,"formGroup"],["expanded","true"],["formArrayName","serviceAccess"],["mat-table","","multiTemplateDataRows","",3,"dataSource"],["matColumnDef","service"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"formGroupName",4,"matCellDef"],["matColumnDef","component"],["matColumnDef","access"],["matColumnDef","requester"],["matColumnDef","advancedFilters"],["matColumnDef","actions"],["matColumnDef","expandedDetail"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],["mat-row","","class","detail-row",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell","",3,"formGroupName"],["subscriptSizing","dynamic","appearance","outline"],["formControlName","service","panelWidth","null","required","",3,"selectionChange"],[3,"value"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],["formControlName","component","panelWdith","null","required",""],[3,"value",4,"ngFor","ngForOf"],["formControlName","access","multiple","","panelWidth","null","required","",3,"selectionChange"],["class","example-additional-selection",4,"ngIf"],[1,"example-additional-selection"],["formControlName","requester","multiple","","panelWidth","null"],["mat-icon-button","","color","primary","type","button",3,"click"],["size","xs",3,"icon"],["mat-mini-fab","","color","primary","type","button",3,"click"],["size","xl",3,"icon"],["mat-icon-button","",3,"click"],["formArrayName","advancedFilters",1,"element-detail"],[4,"ngFor","ngForOf"],[1,"expandedItems",3,"formArrayName"],["matInput","","formControlName","expandField"],["formControlName","expandOperator","panelWidth","null"],["formControlName","expandValue","matInput",""],["aria-label","Service Definition Type","formControlName","filterOp",3,"change"],["value","AND"],["value","OR"],["mat-icon-button","","type","button",3,"click"],["mat-header-row",""],["mat-row",""],[1,"mat-row"],["colspan","4",1,"mat-cell"],["mat-row","",1,"detail-row"]],template:function(n,o){1&n&&(e.j41(0,"div",0)(1,"mat-accordion")(2,"mat-expansion-panel",1)(3,"mat-expansion-panel-header")(4,"mat-panel-title"),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.j41(7,"mat-panel-description"),e.EFF(8),e.nI1(9,"transloco"),e.k0s()(),e.j41(10,"p"),e.EFF(11),e.nI1(12,"transloco"),e.k0s(),e.qex(13,2),e.j41(14,"table",3),e.qex(15,4),e.DNE(16,B,3,3,"th",5),e.DNE(17,X,10,8,"td",6),e.bVm(),e.qex(18,7),e.DNE(19,j,3,3,"th",5),e.DNE(20,u,8,6,"td",6),e.bVm(),e.qex(21,8),e.DNE(22,T,3,3,"th",5),e.DNE(23,ae,8,6,"td",6),e.bVm(),e.qex(24,9),e.DNE(25,se,3,3,"th",5),e.DNE(26,ie,7,5,"td",6),e.bVm(),e.qex(27,10),e.DNE(28,ce,3,3,"th",5),e.DNE(29,me,3,2,"td",6),e.bVm(),e.qex(30,11),e.DNE(31,de,4,4,"th",5),e.DNE(32,pe,3,2,"td",6),e.bVm(),e.qex(33,12),e.DNE(34,_e,3,4,"td",6),e.bVm(),e.DNE(35,he,1,0,"tr",13),e.DNE(36,ve,1,0,"tr",14),e.DNE(37,ge,5,3,"tr",15),e.DNE(38,De,1,0,"tr",16),e.k0s(),e.bVm(),e.k0s()()()),2&n&&(e.Y8G("formGroup",o.roleForm),e.R7$(5),e.SpI(" ",e.bMT(6,8,"roles.accessOverview.heading"),""),e.R7$(3),e.SpI(" ",e.bMT(9,10,"roles.accessOverview.tableDescription")," "),e.R7$(3),e.SpI(" ",e.bMT(12,12,"roles.accessOverview.description")," "),e.R7$(3),e.Y8G("dataSource",o.dataSource),e.R7$(21),e.Y8G("matHeaderRowDef",e.lJ4(14,oe)),e.R7$(1),e.Y8G("matRowDefColumns",e.lJ4(15,oe)),e.R7$(2),e.Y8G("matRowDefColumns",e.lJ4(16,be)))},dependencies:[_.Kj,h.tP,h.Zl,h.tL,h.ji,h.cC,h.YV,h.iL,h.KS,h.$R,h.YZ,h.NB,h.ky,s.X1,s.me,s.BC,s.cb,s.YS,s.j4,s.JD,s.$R,s.v8,D.RG,D.rl,D.nJ,D.TL,N.Ve,N.VO,K.wT,F.fS,F.fg,x.MY,x.BS,x.GK,x.Z2,x.WN,x.Q6,S.dX,S.aY,b.Hl,b.iY,b.$0,t.MD,t.Sq,t.bT,w.Vg,w.ec,w.pc,s.YN],styles:["mat-expansion-panel[_ngcontent-%COMP%]{overflow-x:auto!important}.mat-mdc-cell[_ngcontent-%COMP%]{padding:8px}table[_ngcontent-%COMP%]{width:100%}tr.detail-row[_ngcontent-%COMP%]{height:0}tr.element-row[_ngcontent-%COMP%]:not(.example-expanded-row):hover{background:whitesmoke}tr.element-row[_ngcontent-%COMP%]:not(.example-expanded-row):active{background:#efefef}.element-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom-width:0}.element-detail[_ngcontent-%COMP%]{overflow:hidden;display:flex;flex-direction:column;gap:8px;padding-top:8px}.element-detail[_ngcontent-%COMP%] .expandedItems[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:5px}.detail-input[_ngcontent-%COMP%]{margin-right:20px} .cdk-overlay-pane{width:max-content!important}"],data:{animation:[(0,A.hZ)("detailExpand",[(0,A.wk)("collapsed,void",(0,A.iF)({height:"*",minHeight:"0"})),(0,A.wk)("expanded",(0,A.iF)({height:"*"})),(0,A.kY)("expanded <=> collapsed",(0,A.i0)("225ms cubic-bezier(0.4, 0.0, 0.2, 1)"))])]}})}};H=(0,m.Cg)([(0,$.d)({checkProperties:!0})],H);var Re=c(51407),ne=c(52483),re=c(80972),P=c(56579),Ce=c(19206),ye=c(10056);function Fe(a,r){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"roles.rolesOverview.error.name")," "))}function Ae(a,r){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&a){const n=e.XpG();e.R7$(1),e.SpI(" ",n.roleForm.controls.name.getError("server")," ")}}function Ie(a,r){if(1&a){const n=e.RV6();e.j41(0,"button",15),e.bIt("click",function(){e.eBV(n);const l=e.XpG();return e.Njj(l.viewScope())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"roles.roleScope.action")," "))}function Ee(a,r){1&a&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"save")," "))}function ke(a,r){1&a&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"update")," "))}let z=class q{constructor(r,n,o,l,i,p){this.roleService=r,this.fb=n,this.router=o,this.activatedRoute=l,this.themeService=i,this.snackbarService=p,this.type="",this.alertMsg="",this.showAlert=!1,this.alertType="error",this.visibilityArray=[],this.originalLookupKeyIds=[],this.deletedLookupKeys=[],this.isDarkMode=this.themeService.darkMode$,this.filterOp="",this.roleForm=this.fb.group({id:[0],name:["",s.k0.required],description:[""],active:[!1],serviceAccess:this.fb.array([]),lookupKeys:this.fb.array([])})}ngOnInit(){this.activatedRoute.data.subscribe(({data:r,type:n})=>{this.type=n,this.deletedLookupKeys=[],r&&(this.snackbarService.setSnackbarLastEle(r.label?r.label:r.name,!0),this.roleForm.patchValue({id:r.id,name:r.name,description:r.description,active:r.isActive}),r.roleServiceAccessByRoleId.length>0&&(this.filterOp=r.roleServiceAccessByRoleId[0].filterOp,r.roleServiceAccessByRoleId.forEach(o=>{this.visibilityArray.push(!0);const l=new s.Yp((o.filters||[]).map(i=>new s.gE({expandField:new s.MJ(i.name),expandOperator:new s.MJ(i.operator),expandValue:new s.MJ(i.value),filterOp:new s.MJ(o.filterOp)})));this.roleForm.controls.serviceAccess.push(new s.gE({service:new s.MJ(o.serviceId?o.serviceId:0,[s.k0.required]),component:new s.MJ(o.component),access:new s.MJ(this.handleAccessValue(o.verbMask),[s.k0.required]),requester:new s.MJ(this.handleRequesterValue(o.requestorMask)),advancedFilters:l,id:new s.MJ(o.id),extendField:new s.MJ(o.extendField),extendOperator:new s.MJ(o.extendOperator),extendValue:new s.MJ(o.extendValue),filterOp:new s.MJ(o.filterOp)}))})),r.lookupByRoleId.length>0&&r.lookupByRoleId.forEach(o=>{o.id&&this.originalLookupKeyIds.push(o.id),this.roleForm.controls.lookupKeys.push(new s.gE({id:new s.MJ(o.id),name:new s.MJ(o.name,[s.k0.required,M.Z]),value:new s.MJ(o.value),private:new s.MJ(o.private)}))}))})}handleRequesterValue(r){return 3===r?[1,2]:[r]}handleAccessValue(r){const n=[1,2,4,8,16],o=[];for(let l=n.length-1;l>=0;l--){const i=n[l];r>=i&&(o.push(i),r-=i)}return o}onLookupDeleted(r){this.deletedLookupKeys.push({...r,roleId:null})}triggerAlert(r,n){this.alertType=r,this.alertMsg=n,this.showAlert=!0}get serviceAccess(){return this.roleForm.get("serviceAccess")}onSubmit(){if(this.roleForm.get("serviceAccess").controls.forEach((i,p)=>{this.visibilityArray[p]||(i.get("service")?.clearValidators(),i.get("component")?.clearValidators(),i.get("access")?.clearValidators(),i.get("requester")?.clearValidators(),i.get("service")?.updateValueAndValidity(),i.get("component")?.updateValueAndValidity(),i.get("access")?.updateValueAndValidity(),i.get("requester")?.updateValueAndValidity())}),this.roleForm.invalid)return void this.roleForm.markAllAsTouched();const n=this.roleForm.getRawValue();if(""===n.name||null===n.name)return;const o={id:n.id,name:n.name,description:n.description,isActive:n.active,roleServiceAccessByRoleId:n.serviceAccess.map((i,p)=>{const y=i.advancedFilters.map(I=>({name:I.expandField,operator:I.expandOperator,value:I.expandValue})),xe=i.advancedFilters.map(I=>I.filterOp);return{id:i.id,roleId:this.visibilityArray[p]?n.id:null,serviceId:0===i.service?null:i.service,component:i.component,verbMask:i.access.reduce((I,Q)=>I+Q,0),requestorMask:i.requester.reduce((I,Q)=>I+Q,0),filters:y,filterOp:xe[0]}}),lookupByRoleId:this.getLookupKeysWithDeletions(n)},l={resource:[o]};"edit"===this.type&&o.id?this.roleService.update(o.id,o).pipe((0,ne.W)(i=>(this.showServerErrors(i),(0,re.$)(()=>(0,P.cQ)(i))))).subscribe(()=>{this.goBack()}):this.roleService.create(l,{snackbarSuccess:"roles.createSuccess",fields:"*",related:"role_service_access_by_role_id,lookup_by_role_id"}).pipe((0,ne.W)(i=>(this.showServerErrors(i),(0,re.$)(()=>(0,P.cQ)(i))))).subscribe(()=>{this.goBack()})}showServerErrors(r){const n=(0,P.cQ)(r),o=(0,P.aI)(this.roleForm,n);(o.length||!n.fields.length)&&this.triggerAlert("error",o.length?o.join("\n"):n.message)}getLookupKeysWithDeletions(r){const n=r.lookupKeys,o=[...n],l=n.map(p=>p.id).filter(p=>p);return this.originalLookupKeyIds.filter(p=>!l.includes(p)).forEach(p=>{o.push({id:p,role_id:null})}),o}goBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}viewScope(){this.router.navigate(["scope"],{relativeTo:this.activatedRoute})}static{this.\u0275fac=function(n){return new(n||q)(e.rXU(C.h1),e.rXU(s.ok),e.rXU(G.Ix),e.rXU(G.nX),e.rXU(Ce.n),e.rXU(ye.L))}}static{this.\u0275cmp=e.VBU({type:q,selectors:[["df-role-details"]],standalone:!0,features:[e.aNF],decls:39,vars:35,consts:[[3,"showAlert","alertType","alertClosed"],[1,"details-section",3,"formGroup","ngSubmit"],["appearance","outline","subscriptSizing","dynamic",1,"dynamic-width"],["matInput","","formControlName","name","required",""],[4,"ngIf"],["formControlName","active",1,"dynamic-width"],["appearance","outline","subscriptSizing","dynamic"],["rows","1","matInput","","formControlName","description"],["formArrayName","serviceAccess",1,"full-width"],[1,"full-width",3,"visible","formArray","roleForm"],["formArrayName","lookupKeys",1,"full-width",3,"lookupDeleted"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],["mat-flat-button","","type","button",3,"click",4,"ngIf"],["mat-flat-button","","color","primary",1,"save-btn"],["mat-flat-button","","type","button",3,"click"]],template:function(n,o){1&n&&(e.j41(0,"p"),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"df-alert",0),e.bIt("alertClosed",function(){return o.showAlert=!1}),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"form",1),e.bIt("ngSubmit",function(){return o.onSubmit()}),e.j41(7,"mat-form-field",2)(8,"mat-label"),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.nrm(11,"input",3),e.DNE(12,Fe,3,3,"mat-error",4),e.DNE(13,Ae,2,1,"mat-error",4),e.j41(14,"mat-hint"),e.EFF(15),e.nI1(16,"transloco"),e.k0s()(),e.j41(17,"mat-slide-toggle",5),e.EFF(18),e.nI1(19,"transloco"),e.k0s(),e.j41(20,"mat-form-field",6)(21,"mat-label"),e.EFF(22),e.nI1(23,"transloco"),e.k0s(),e.nrm(24,"textarea",7),e.k0s(),e.j41(25,"div",8),e.nrm(26,"df-roles-access",9),e.k0s(),e.j41(27,"p"),e.EFF(28),e.nI1(29,"transloco"),e.k0s(),e.j41(30,"df-lookup-keys",10),e.bIt("lookupDeleted",function(i){return o.onLookupDeleted(i)}),e.k0s(),e.j41(31,"div",11)(32,"button",12),e.bIt("click",function(){return o.goBack()}),e.EFF(33),e.nI1(34,"transloco"),e.k0s(),e.DNE(35,Ie,3,3,"button",13),e.j41(36,"button",14),e.DNE(37,Ee,3,3,"span",4),e.DNE(38,ke,3,3,"span",4),e.k0s()()()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,19,"roles.rolesOverview.description"),"\n"),e.R7$(2),e.Y8G("showAlert",o.showAlert)("alertType",o.alertType),e.R7$(1),e.SpI(" ",e.bMT(5,21,o.alertMsg),"\n"),e.R7$(2),e.Y8G("formGroup",o.roleForm),e.R7$(3),e.JRh(e.bMT(10,23,"name")),e.R7$(3),e.Y8G("ngIf",o.roleForm.controls.name.hasError("required")),e.R7$(1),e.Y8G("ngIf",o.roleForm.controls.name.hasError("server")),e.R7$(2),e.JRh(e.bMT(16,25,"roles.rolesOverview.nameHint")),e.R7$(3),e.JRh(e.bMT(19,27,"active")),e.R7$(4),e.JRh(e.bMT(23,29,"description")),e.R7$(4),e.Y8G("visible",o.visibilityArray)("formArray",o.serviceAccess)("roleForm",o.roleForm),e.R7$(2),e.SpI(" ",e.bMT(29,31,"roles.lookupKeys.description")," "),e.R7$(5),e.SpI(" ",e.bMT(34,33,"cancel")," "),e.R7$(2),e.Y8G("ngIf","edit"===o.type),e.R7$(2),e.Y8G("ngIf","create"===o.type),e.R7$(1),e.Y8G("ngIf","edit"===o.type))},dependencies:[_.Kj,s.YN,s.qT,s.me,s.BC,s.cb,s.YS,F.fS,F.fg,D.rl,D.nJ,D.MV,D.TL,D.RG,s.X1,s.j4,s.JD,s.v8,v.S,g.mV,g.sG,b.Hl,b.$z,H,t.bT,Re.W],encapsulation:2})}};z=(0,m.Cg)([(0,$.d)({checkProperties:!0})],z)},51407:(V,E,c)=>{c.d(E,{W:()=>F});var m=c(1843),s=c(18331),t=c(68660),_=c(54342),C=c(94093);function D(g,b){if(1&g){const R=m.RV6();m.j41(0,"button",5),m.bIt("click",function(){m.eBV(R);const k=m.XpG(2);return m.Njj(k.dismissAlert())}),m.j41(1,"fa-icon",6),m.EFF(2),m.k0s()()}if(2&g){const R=m.XpG(2);m.R7$(1),m.Y8G("icon",R.faXmark),m.R7$(1),m.JRh("alerts.close")}}function v(g,b){if(1&g&&(m.j41(0,"div",1),m.nrm(1,"fa-icon",2),m.j41(2,"span",3),m.SdG(3),m.k0s(),m.DNE(4,D,3,2,"button",4),m.k0s()),2&g){const R=m.XpG();m.HbH(R.alertType),m.R7$(1),m.Y8G("icon",R.icon),m.R7$(3),m.Y8G("ngIf",R.dismissible)}}const M=["*"];let F=(()=>{class g{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new m.bkB,this.faXmark=C.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return C.SGM;case"error":return C.rfe;case"warning":return C.tUE;default:return C.iW_}}static{this.\u0275fac=function(h){return new(h||g)}}static{this.\u0275cmp=m.VBU({type:g,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[m.aNF],ngContentSelectors:M,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(h,k){1&h&&(m.NAR(),m.DNE(0,v,5,4,"div",0)),2&h&&m.Y8G("ngIf",k.showAlert)},dependencies:[s.bT,t.Hl,t.iY,_.dX,_.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return g})()},91789:(V,E,c)=>{c.d(E,{S:()=>j});var m=c(21406),s=c(18331),t=c(1843),_=c(78227),C=c(54688),D=c(68660),v=c(58497),M=c(453),F=c(60368),g=c(54342),b=c(28600),R=c(94093),h=c(31147),k=c(97828),N=c(37385),x=c(19206);function S(d,f){if(1&d&&(t.j41(0,"mat-accordion")(1,"mat-expansion-panel")(2,"mat-expansion-panel-header")(3,"mat-panel-title"),t.EFF(4),t.nI1(5,"transloco"),t.k0s(),t.j41(6,"mat-panel-description"),t.EFF(7),t.nI1(8,"transloco"),t.k0s()(),t.eu8(9,3),t.k0s()()),2&d){t.XpG();const u=t.sdS(3);t.R7$(4),t.SpI(" ",t.bMT(5,3,"lookupKeys.label"),""),t.R7$(3),t.JRh(t.bMT(8,5,"lookupKeys.desc")),t.R7$(2),t.Y8G("ngTemplateOutlet",u)}}function w(d,f){1&d&&(t.j41(0,"mat-header-cell"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&d&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"name")," "))}function $(d,f){1&d&&(t.j41(0,"mat-cell",16)(1,"mat-form-field",17)(2,"mat-label"),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.nrm(5,"input",18),t.k0s()()),2&d&&(t.Y8G("formGroupName",f.index),t.R7$(3),t.JRh(t.bMT(4,2,"name")))}function Y(d,f){1&d&&(t.j41(0,"mat-header-cell"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&d&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"value")," "))}function A(d,f){1&d&&(t.j41(0,"mat-cell",16)(1,"mat-form-field",17)(2,"mat-label"),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.nrm(5,"input",19),t.k0s()()),2&d&&(t.Y8G("formGroupName",f.index),t.R7$(3),t.JRh(t.bMT(4,2,"value")))}function e(d,f){1&d&&(t.j41(0,"mat-header-cell"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&d&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"private")," "))}function G(d,f){1&d&&(t.j41(0,"mat-cell",16),t.nrm(1,"mat-slide-toggle",20),t.nI1(2,"transloco"),t.k0s()),2&d&&(t.Y8G("formGroupName",f.index),t.R7$(1),t.BMQ("aria-label",t.bMT(2,2,"name")))}function K(d,f){if(1&d){const u=t.RV6();t.j41(0,"mat-header-cell")(1,"button",21),t.bIt("click",function(){t.eBV(u);const O=t.XpG(2);return t.Njj(O.add())}),t.nI1(2,"transloco"),t.nrm(3,"fa-icon",22),t.k0s()()}if(2&d){const u=t.XpG(2);t.R7$(1),t.BMQ("aria-label",t.bMT(2,2,"newEntry")),t.R7$(2),t.Y8G("icon",u.faPlus)}}function te(d,f){if(1&d){const u=t.RV6();t.j41(0,"mat-cell",16)(1,"button",23),t.bIt("click",function(){const U=t.eBV(u).index,W=t.XpG(2);return t.Njj(W.remove(U))}),t.nrm(2,"fa-icon",24),t.k0s()()}if(2&d){const u=f.index,T=t.XpG(2);t.Y8G("formGroupName",u),t.R7$(2),t.Y8G("icon",T.faTrashCan)}}function B(d,f){1&d&&t.nrm(0,"mat-header-row")}function J(d,f){1&d&&t.nrm(0,"mat-row")}function L(d,f){1&d&&(t.j41(0,"tr",25)(1,"td",26),t.EFF(2),t.nI1(3,"transloco"),t.k0s()()),2&d&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"lookupKeys.noKeys")," "))}function X(d,f){if(1&d&&(t.qex(0,4)(1,5),t.j41(2,"mat-table",6),t.qex(3,7),t.DNE(4,w,3,3,"mat-header-cell",8),t.DNE(5,$,6,4,"mat-cell",9),t.bVm(),t.qex(6,10),t.DNE(7,Y,3,3,"mat-header-cell",8),t.DNE(8,A,6,4,"mat-cell",9),t.bVm(),t.qex(9,11),t.DNE(10,e,3,3,"mat-header-cell",8),t.DNE(11,G,3,4,"mat-cell",9),t.bVm(),t.qex(12,12),t.DNE(13,K,4,4,"mat-header-cell",8),t.DNE(14,te,3,2,"mat-cell",9),t.bVm(),t.DNE(15,B,1,0,"mat-header-row",13),t.DNE(16,J,1,0,"mat-row",14),t.DNE(17,L,4,3,"tr",15),t.k0s(),t.bVm()()),2&d){const u=t.XpG();t.Y8G("formGroup",u.rootForm),t.R7$(2),t.Y8G("dataSource",u.dataSource),t.R7$(13),t.Y8G("matHeaderRowDef",u.displayedColumns),t.R7$(1),t.Y8G("matRowDefColumns",u.displayedColumns)}}let j=class ee{constructor(f,u){this.rootFormGroup=f,this.themeService=u,this.displayedColumns=["name","value","private","actions"],this.faTrashCan=R.sjs,this.faPlus=R.QLR,this.showAccordion=!0,this.lookupDeleted=new t.bkB,this.isDarkMode=this.themeService.darkMode$}ngOnInit(){this.rootForm=this.rootFormGroup.control,this.rootFormGroup.ngSubmit.subscribe(()=>{this.lookupKeys.markAllAsTouched()}),this.lookupKeys=this.rootForm.get("lookupKeys"),this.updateDataSource()}updateDataSource(){this.lookupKeys.controls.forEach(f=>{f.get("id")?.value&&f.get("name")?.disable()}),this.dataSource=new v.I6(this.lookupKeys.controls)}add(){this.lookupKeys.push(new _.gE({name:new _.MJ("",[_.k0.required,N.Z]),value:new _.MJ(""),private:new _.MJ(!1)})),this.updateDataSource()}remove(f){const u=this.lookupKeys.at(f).value;u.id&&this.lookupDeleted.emit(u),this.lookupKeys.removeAt(f),this.updateDataSource()}static{this.\u0275fac=function(u){return new(u||ee)(t.rXU(_.j4),t.rXU(x.n))}}static{this.\u0275cmp=t.VBU({type:ee,selectors:[["df-lookup-keys"]],inputs:{showAccordion:"showAccordion"},outputs:{lookupDeleted:"lookupDeleted"},standalone:!0,features:[t.aNF],decls:4,vars:2,consts:[[1,"lookup-keys-accordion"],[4,"ngIf","ngIfElse"],["lookupKeys",""],[3,"ngTemplateOutlet"],[3,"formGroup"],["formArrayName","lookupKeys"],[3,"dataSource"],["matColumnDef","name"],[4,"matHeaderCellDef"],[3,"formGroupName",4,"matCellDef"],["matColumnDef","value"],["matColumnDef","private"],["matColumnDef","actions","stickyEnd",""],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[3,"formGroupName"],["appearance","outline","subscriptSizing","dynamic"],["matInput","","formControlName","name"],["matInput","","formControlName","value"],["color","primary","formControlName","private"],["mat-mini-fab","","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-icon-button","","type","button",1,"remove-btn",3,"click"],["size","xs",3,"icon"],[1,"mat-row","no-data-row"],["colspan","4",1,"mat-cell"]],template:function(u,T){if(1&u&&(t.j41(0,"div",0),t.DNE(1,S,10,7,"mat-accordion",1),t.DNE(2,X,18,4,"ng-template",null,2,t.C5r),t.k0s()),2&u){const O=t.sdS(3);t.R7$(1),t.Y8G("ngIf",T.showAccordion)("ngIfElse",O)}},dependencies:[_.YN,_.me,_.BC,_.cb,_.X1,_.j4,_.JD,_.$R,_.v8,s.bT,s.T3,C.RG,C.rl,C.nJ,D.Hl,D.iY,D.$0,v.tP,v.Zl,v.tL,v.ji,v.cC,v.YV,v.iL,v.KS,v.$R,v.YZ,v.NB,v.ky,M.fS,M.fg,F.mV,F.sG,g.dX,g.aY,b.MY,b.BS,b.GK,b.Z2,b.WN,b.Q6,h.Kj],styles:[".lookup-keys-accordion[_ngcontent-%COMP%]{padding:16px 0}.mat-column-actions[_ngcontent-%COMP%], .mat-column-private[_ngcontent-%COMP%]{max-width:10%}.mat-mdc-cell[_ngcontent-%COMP%]{padding:8px}.mat-mdc-row[_ngcontent-%COMP%]{height:auto!important;min-height:44px;padding:4px 0}"]})}};j=(0,m.Cg)([(0,k.d)({checkProperties:!0})],j)},37385:(V,E,c)=>{c.d(E,{Z:()=>m});const m=s=>{const t=s.value;return null==t||""===t?null:/\s/.test(String(t))?{hasWhitespace:!0}:null}}}]); \ No newline at end of file diff --git a/dist/1830.d5c7fb0b06fa17c1.js b/dist/1830.d5c7fb0b06fa17c1.js new file mode 100644 index 00000000..5adc52d4 --- /dev/null +++ b/dist/1830.d5c7fb0b06fa17c1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1830],{31830:($,b,i)=>{i.r(b),i.d(b,{DfRelationshipDetailsComponent:()=>T});var a=i(31635),s=i(89417),E=i(24784),d=i(88834),m=i(32102),g=i(99631),v=i(33609),F=i(60177),R=i(82798),c=i(30450),I=i(49894),p=i(51425),_=i(99437),h=i(18810),D=i(95753),e=i(17705),C=i(95245),S=i(52608),M=i(86600);function k(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.name.getError("server")," ")}}function O(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.alias.getError("server")," ")}}function y(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.label.getError("server")," ")}}function N(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.description.getError("server")," ")}}function G(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.label," ")}}function P(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function B(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.type.getError("server")," ")}}function Y(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.label," ")}}function A(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function U(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.field.getError("server")," ")}}function W(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.name," ")}}function X(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function L(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.refServiceId.getError("server")," ")}}function V(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.label," ")}}function K(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function w(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.refTable.getError("server")," ")}}function J(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.label," ")}}function x(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function H(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.refField.getError("server")," ")}}function z(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.label," ")}}function Q(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function Z(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.junctionServiceId.getError("server")," ")}}function q(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.label," ")}}function ee(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function te(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.junctionTable.getError("server")," ")}}function re(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.label," ")}}function oe(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function ne(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.junctionField.getError("server")," ")}}function ae(r,t){if(1&r&&(e.j41(0,"mat-option",24),e.EFF(1),e.k0s()),2&r){const o=t.$implicit;e.Y8G("value",o.value),e.R7$(1),e.SpI(" ",o.label," ")}}function ie(r,t){1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.alerts.tableNameError")," "))}function se(r,t){if(1&r&&(e.j41(0,"mat-error"),e.EFF(1),e.k0s()),2&r){const o=e.XpG();e.R7$(1),e.SpI(" ",o.relationshipForm.controls.junctionRefField.getError("server")," ")}}function le(r,t){1&r&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.JRh(e.bMT(2,1,"update")))}function ce(r,t){1&r&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&r&&(e.R7$(1),e.JRh(e.bMT(2,1,"save")))}i(36225);let T=class j{constructor(t,o,n,l,f){this.crudService=t,this.fb=o,this.activatedRoute=n,this.router=l,this.breakpointService=f,this.typeOptions=[{label:"Belongs To",value:"belongs_to"},{label:"Has Many",value:"has_many"},{label:"Has One",value:"has_one"},{label:"Many To Many",value:"many_many"}],this.trackByValue=(u,me)=>me.value,this.isXSmallScreen=this.breakpointService.isXSmallScreen,this.alertMsg="",this.showAlert=!1,this.alertType="error",this.relationshipForm=this.fb.group({name:[{value:null,disabled:!0}],alias:[null],label:[null],description:[null],alwaysFetch:[!1],type:[null,s.k0.required],isVirtual:[{value:!0,disabled:!0}],field:[null,s.k0.required],refServiceId:[null,s.k0.required],refTable:[null,s.k0.required],refField:[null,s.k0.required],junctionServiceId:[{value:null,disabled:!0}],junctionTable:[{value:null,disabled:!0}],junctionField:[{value:null,disabled:!0}],junctionRefField:[{value:null,disabled:!0}]})}ngOnInit(){this.activatedRoute.data.subscribe(t=>{this.type=t.type,this.dbName=this.activatedRoute.snapshot.params.name,this.tableName=this.activatedRoute.snapshot.params.id,this.fieldOptions=t.fields.resource.map(o=>({label:o.label,value:o.name})),this.serviceOptions=t.services.resource.map(o=>({label:"edit"===this.type?o.type:o.label,value:o.id,name:o.name})),"edit"===this.type&&(this.relationshipForm.patchValue({name:t.data.name,alias:t.data.alias,label:t.data.label,description:t.data.description,alwaysFetch:t.data.alwaysFetch,type:t.data.type,isVirtual:t.data.isVirtual,field:t.data.field,refServiceId:t.data.refServiceId,refTable:t.data.refTable,refField:t.data.refField,junctionServiceId:t.data.junctionServiceId,junctionTable:t.data.junctionTable,junctionField:t.data.junctionField,junctionRefField:t.data.junctionRefField}),t.data.refServiceId&&(this.getTables("reference",t.data.refServiceId),this.getFields("reference",t.data.refTable,t.data.refServiceId)),t.data.junctionServiceId&&(this.getTables("junction",t.data.junctionServiceId),this.getFields("junction",t.data.junctionTable,t.data.junctionServiceId)),"many_many"===t.data.type&&(this.relationshipForm.get("junctionServiceId")?.enable(),this.relationshipForm.get("junctionServiceId")?.addValidators([s.k0.required]),this.relationshipForm.get("junctionTable")?.enable(),this.relationshipForm.get("junctionTable")?.addValidators([s.k0.required]),this.relationshipForm.get("junctionField")?.enable(),this.relationshipForm.get("junctionField")?.addValidators([s.k0.required]),this.relationshipForm.get("junctionRefField")?.enable(),this.relationshipForm.get("junctionRefField")?.addValidators([s.k0.required])))}),this.relationshipForm.get("type")?.valueChanges.subscribe(t=>{"many_many"===t?this.relationshipForm.get("junctionServiceId")?.enable():(this.relationshipForm.get("junctionServiceId")?.disable(),this.relationshipForm.get("junctionTable")?.disable(),this.relationshipForm.get("junctionField")?.disable(),this.relationshipForm.get("junctionRefField")?.disable())}),this.relationshipForm.get("refServiceId")?.valueChanges.subscribe(t=>{t&&(this.relationshipForm.get("refTable")?.reset(),this.relationshipForm.get("refField")?.reset(),this.getTables("reference",t))}),this.relationshipForm.get("refTable")?.valueChanges.subscribe(t=>{t&&(this.relationshipForm.get("refField")?.reset(),this.getFields("reference",t,this.relationshipForm.get("refServiceId")?.value))}),this.relationshipForm.get("junctionServiceId")?.valueChanges.subscribe(t=>{t&&(this.relationshipForm.get("junctionTable")?.reset(),this.relationshipForm.get("junctionTable")?.enable(),this.getTables("junction",t))}),this.relationshipForm.get("junctionTable")?.valueChanges.subscribe(t=>{t&&(this.relationshipForm.get("junctionField")?.reset(),this.relationshipForm.get("junctionField")?.enable(),this.relationshipForm.get("junctionRefField")?.reset(),this.relationshipForm.get("junctionRefField")?.enable(),this.getFields("junction",t,this.relationshipForm.get("junctionServiceId")?.value))})}getServiceName(t){return this.serviceOptions.find(n=>n.value===t?n.name:null)?.name}getTables(t,o){if("reference"===t){const n=this.getServiceName(o);this.crudService.get(`${n}/_schema`).subscribe(l=>{this.referenceTableOptions=l.resource.map(f=>({label:f.name,value:f.name}))})}else if("junction"===t){const n=this.getServiceName(o);this.crudService.get(`${n}/_schema`).subscribe(l=>{this.junctionTableOptions=l.resource.map(f=>({label:f.name,value:f.name}))})}}getFields(t,o,n){if("reference"===t){const l=this.getServiceName(n);this.crudService.get(`${l}/_schema/${o}`).subscribe(f=>{this.referenceFieldOptions=f.field.map(u=>({label:u.label,value:u.name}))})}else if("junction"===t){const l=this.getServiceName(n);this.crudService.get(`${l}/_schema/${o}`).subscribe(f=>{this.junctionFieldOptions=f.field.map(u=>({label:u.label,value:u.name}))})}}triggerAlert(t,o){this.alertType=t,this.alertMsg=o,this.showAlert=!0}goBack(){("create"===this.type||"edit"===this.type)&&this.router.navigate(["../../"],{relativeTo:this.activatedRoute})}save(){if(this.relationshipForm.invalid)return;const t={resource:[{...this.relationshipForm.getRawValue()}]};"create"===this.type?this.crudService.create(t,{snackbarSuccess:"schema.relationships.alerts.createSuccess"},`${this.dbName}/_schema/${this.tableName}/_related`).pipe((0,_.W)(o=>{const n=(0,D.cQ)(o),l=(0,D.aI)(this.relationshipForm,n);return(l.length||!n.fields.length)&&this.triggerAlert("error",l.length?l.join(" "):n.message),(0,h.$)(()=>n)})).subscribe(()=>{this.goBack()}):"edit"===this.type&&this.crudService.patch(`${this.dbName}/_schema/${this.tableName}/_related`,t,{snackbarSuccess:"schema.relationships.alerts.updateSuccess"}).pipe((0,_.W)(o=>{const n=(0,D.cQ)(o);return this.triggerAlert("error",n.message),(0,h.$)(()=>n)})).subscribe(()=>{this.goBack()})}static{this.\u0275fac=function(o){return new(o||j)(e.rXU(E.qJ),e.rXU(s.ok),e.rXU(C.nX),e.rXU(C.Ix),e.rXU(S.R))}}static{this.\u0275cmp=e.VBU({type:j,selectors:[["df-relationship-details"]],standalone:!0,features:[e.aNF],decls:131,vars:120,consts:[[3,"showAlert","alertType","alertClosed"],[1,"details-section",3,"formGroup","ngSubmit"],["subscriptSizing","dynamic",1,"dynamic-width"],["matInput","","formControlName","name",3,"placeholder"],[4,"ngIf"],["matInput","","formControlName","alias"],["matInput","","formControlName","label"],["matInput","","formControlName","description"],["formControlName","alwaysFetch",1,"dynamic-width"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["formControlName","isVirtual",1,"dynamic-width"],["formControlName","field"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["formControlName","refServiceId"],["formControlName","refTable"],["formControlName","refField"],["formControlName","junctionServiceId"],["formControlName","junctionTable"],["formControlName","junctionField"],["formControlName","junctionRefField"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],["mat-flat-button","","color","primary",1,"save-btn"],[3,"value"]],template:function(o,n){1&o&&(e.j41(0,"df-alert",0),e.bIt("alertClosed",function(){return n.showAlert=!1}),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"form",1),e.bIt("ngSubmit",function(){return n.save()}),e.nI1(4,"async"),e.j41(5,"mat-form-field",2)(6,"mat-label"),e.EFF(7),e.nI1(8,"transloco"),e.nI1(9,"transloco"),e.k0s(),e.nrm(10,"input",3),e.nI1(11,"transloco"),e.DNE(12,k,2,1,"mat-error",4),e.k0s(),e.j41(13,"mat-form-field",2)(14,"mat-label"),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.nrm(17,"input",5),e.DNE(18,O,2,1,"mat-error",4),e.k0s(),e.j41(19,"mat-form-field",2)(20,"mat-label"),e.EFF(21),e.nI1(22,"transloco"),e.k0s(),e.nrm(23,"input",6),e.DNE(24,y,2,1,"mat-error",4),e.k0s(),e.j41(25,"mat-form-field",2)(26,"mat-label"),e.EFF(27),e.nI1(28,"transloco"),e.k0s(),e.nrm(29,"input",7),e.DNE(30,N,2,1,"mat-error",4),e.k0s(),e.j41(31,"mat-slide-toggle",8),e.EFF(32),e.nI1(33,"transloco"),e.k0s(),e.j41(34,"mat-form-field",2)(35,"mat-label"),e.EFF(36),e.nI1(37,"transloco"),e.k0s(),e.j41(38,"mat-select",9),e.DNE(39,G,2,2,"mat-option",10),e.k0s(),e.DNE(40,P,3,3,"mat-error",4),e.DNE(41,B,2,1,"mat-error",4),e.k0s(),e.j41(42,"mat-slide-toggle",11),e.EFF(43),e.nI1(44,"transloco"),e.k0s(),e.j41(45,"mat-form-field",2)(46,"mat-label"),e.EFF(47),e.nI1(48,"transloco"),e.k0s(),e.j41(49,"mat-select",12),e.DNE(50,Y,2,2,"mat-option",13),e.k0s(),e.DNE(51,A,3,3,"mat-error",4),e.DNE(52,U,2,1,"mat-error",4),e.k0s(),e.j41(53,"mat-form-field",2)(54,"mat-label"),e.EFF(55),e.nI1(56,"transloco"),e.k0s(),e.j41(57,"mat-select",14),e.DNE(58,W,2,2,"mat-option",13),e.k0s(),e.DNE(59,X,3,3,"mat-error",4),e.DNE(60,L,2,1,"mat-error",4),e.k0s(),e.j41(61,"mat-form-field",2)(62,"mat-label"),e.EFF(63),e.nI1(64,"transloco"),e.k0s(),e.j41(65,"mat-select",15)(66,"mat-option"),e.EFF(67),e.nI1(68,"transloco"),e.k0s(),e.DNE(69,V,2,2,"mat-option",13),e.k0s(),e.DNE(70,K,3,3,"mat-error",4),e.DNE(71,w,2,1,"mat-error",4),e.k0s(),e.j41(72,"mat-form-field",2)(73,"mat-label"),e.EFF(74),e.nI1(75,"transloco"),e.k0s(),e.j41(76,"mat-select",16)(77,"mat-option"),e.EFF(78),e.nI1(79,"transloco"),e.k0s(),e.DNE(80,J,2,2,"mat-option",13),e.k0s(),e.DNE(81,x,3,3,"mat-error",4),e.DNE(82,H,2,1,"mat-error",4),e.k0s(),e.j41(83,"mat-form-field",2)(84,"mat-label"),e.EFF(85),e.nI1(86,"transloco"),e.k0s(),e.j41(87,"mat-select",17),e.DNE(88,z,2,2,"mat-option",13),e.k0s(),e.DNE(89,Q,3,3,"mat-error",4),e.DNE(90,Z,2,1,"mat-error",4),e.k0s(),e.j41(91,"mat-form-field",2)(92,"mat-label"),e.EFF(93),e.nI1(94,"transloco"),e.k0s(),e.j41(95,"mat-select",18)(96,"mat-option"),e.EFF(97),e.nI1(98,"transloco"),e.k0s(),e.DNE(99,q,2,2,"mat-option",13),e.k0s(),e.DNE(100,ee,3,3,"mat-error",4),e.DNE(101,te,2,1,"mat-error",4),e.k0s(),e.j41(102,"mat-form-field",2)(103,"mat-label"),e.EFF(104),e.nI1(105,"transloco"),e.k0s(),e.j41(106,"mat-select",19)(107,"mat-option"),e.EFF(108),e.nI1(109,"transloco"),e.k0s(),e.DNE(110,re,2,2,"mat-option",13),e.k0s(),e.DNE(111,oe,3,3,"mat-error",4),e.DNE(112,ne,2,1,"mat-error",4),e.k0s(),e.j41(113,"mat-form-field",2)(114,"mat-label"),e.EFF(115),e.nI1(116,"transloco"),e.k0s(),e.j41(117,"mat-select",20)(118,"mat-option"),e.EFF(119),e.nI1(120,"transloco"),e.k0s(),e.DNE(121,ae,2,2,"mat-option",13),e.k0s(),e.DNE(122,ie,3,3,"mat-error",4),e.DNE(123,se,2,1,"mat-error",4),e.k0s(),e.j41(124,"div",21)(125,"button",22),e.bIt("click",function(){return n.goBack()}),e.EFF(126),e.nI1(127,"transloco"),e.k0s(),e.j41(128,"button",23),e.DNE(129,le,3,3,"span",4),e.DNE(130,ce,3,3,"span",4),e.k0s()()()),2&o&&(e.Y8G("showAlert",n.showAlert)("alertType",n.alertType),e.R7$(1),e.SpI(" ",e.bMT(2,70,n.alertMsg),"\n"),e.R7$(2),e.AVh("x-small",e.bMT(4,72,n.isXSmallScreen)),e.Y8G("formGroup",n.relationshipForm),e.R7$(4),e.Lme(" ",e.bMT(8,74,"name")," - ",e.bMT(9,76,"schema.relationships.name.tooltip")," "),e.R7$(3),e.FS9("placeholder",e.bMT(11,78,"name")),e.R7$(2),e.Y8G("ngIf",n.relationshipForm.controls.name.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(16,80,"schema.alias")," "),e.R7$(3),e.Y8G("ngIf",n.relationshipForm.controls.alias.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(22,82,"label")," "),e.R7$(3),e.Y8G("ngIf",n.relationshipForm.controls.label.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(28,84,"description")," "),e.R7$(3),e.Y8G("ngIf",n.relationshipForm.controls.description.hasError("server")),e.R7$(2),e.JRh(e.bMT(33,86,"schema.relationships.fetch")),e.R7$(4),e.SpI(" ",e.bMT(37,88,"schema.relationships.type")," "),e.R7$(3),e.Y8G("ngForOf",n.typeOptions),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.type.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.type.hasError("server")),e.R7$(2),e.JRh(e.bMT(44,90,"schema.relationships.virtualRelationship")),e.R7$(4),e.SpI(" ",e.bMT(48,92,"schema.relationships.field.label")," "),e.R7$(3),e.Y8G("ngForOf",n.fieldOptions)("ngForTrackBy",n.trackByValue),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.field.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.field.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(56,94,"schema.relationships.referenceService.label")," "),e.R7$(3),e.Y8G("ngForOf",n.serviceOptions)("ngForTrackBy",n.trackByValue),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.refServiceId.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.refServiceId.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(64,96,"schema.relationships.referenceTable.label")," "),e.R7$(4),e.SpI(" - ",e.bMT(68,98,"schema.relationships.referenceTable.default")," - "),e.R7$(2),e.Y8G("ngForOf",n.referenceTableOptions)("ngForTrackBy",n.trackByValue),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.refTable.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.refTable.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(75,100,"schema.relationships.referenceField.label")," "),e.R7$(4),e.SpI(" - ",e.bMT(79,102,"schema.relationships.referenceField.default")," - "),e.R7$(2),e.Y8G("ngForOf",n.referenceFieldOptions)("ngForTrackBy",n.trackByValue),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.refField.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.refField.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(86,104,"schema.relationships.junctionService.label")," "),e.R7$(3),e.Y8G("ngForOf",n.serviceOptions)("ngForTrackBy",n.trackByValue),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.junctionServiceId.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.junctionServiceId.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(94,106,"schema.relationships.junctionTable.label")," "),e.R7$(4),e.SpI(" - ",e.bMT(98,108,"schema.relationships.junctionTable.default")," - "),e.R7$(2),e.Y8G("ngForOf",n.junctionTableOptions)("ngForTrackBy",n.trackByValue),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.junctionTable.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.junctionTable.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(105,110,"schema.relationships.junctionField.label")," "),e.R7$(4),e.SpI(" - ",e.bMT(109,112,"schema.relationships.junctionField.default")," - "),e.R7$(2),e.Y8G("ngForOf",n.junctionFieldOptions)("ngForTrackBy",n.trackByValue),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.junctionField.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.junctionField.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(116,114,"schema.relationships.junctionReferenceField.label")," "),e.R7$(4),e.SpI(" - ",e.bMT(120,116,"schema.relationships.junctionReferenceField.default")," - "),e.R7$(2),e.Y8G("ngForOf",n.junctionFieldOptions)("ngForTrackBy",n.trackByValue),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.junctionRefField.hasError("required")),e.R7$(1),e.Y8G("ngIf",n.relationshipForm.controls.junctionRefField.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(127,118,"cancel")," "),e.R7$(3),e.Y8G("ngIf","edit"===n.type),e.R7$(1),e.Y8G("ngIf","create"===n.type))},dependencies:[s.X1,s.qT,s.me,s.BC,s.cb,s.j4,s.JD,d.Hl,d.$z,m.RG,m.rl,m.nJ,m.TL,g.fS,g.fg,R.Ve,R.VO,M.wT,c.mV,c.sG,v.Kj,F.Jj,F.pM,F.bT,p.W],styles:[".action-bar[_ngcontent-%COMP%]{justify-content:flex-end;gap:12px;margin-top:8px;border-top:1px solid var(--df-border-2)}"]})}};T=(0,a.Cg)([(0,I.d)({checkProperties:!0})],T)},51425:($,b,i)=>{i.d(b,{W:()=>R});var a=i(17705),s=i(60177),E=i(88834),d=i(20060),m=i(45383);function g(c,I){if(1&c){const p=a.RV6();a.j41(0,"button",5),a.bIt("click",function(){a.eBV(p);const h=a.XpG(2);return a.Njj(h.dismissAlert())}),a.j41(1,"fa-icon",6),a.EFF(2),a.k0s()()}if(2&c){const p=a.XpG(2);a.R7$(1),a.Y8G("icon",p.faXmark),a.R7$(1),a.JRh("alerts.close")}}function v(c,I){if(1&c&&(a.j41(0,"div",1),a.nrm(1,"fa-icon",2),a.j41(2,"span",3),a.SdG(3),a.k0s(),a.DNE(4,g,3,2,"button",4),a.k0s()),2&c){const p=a.XpG();a.HbH(p.alertType),a.R7$(1),a.Y8G("icon",p.icon),a.R7$(3),a.Y8G("ngIf",p.dismissible)}}const F=["*"];let R=(()=>{class c{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new a.bkB,this.faXmark=m.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return m.SGM;case"error":return m.rfe;case"warning":return m.tUE;default:return m.iW_}}static{this.\u0275fac=function(_){return new(_||c)}}static{this.\u0275cmp=a.VBU({type:c,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[a.aNF],ngContentSelectors:F,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(_,h){1&_&&(a.NAR(),a.DNE(0,v,5,4,"div",0)),2&_&&a.Y8G("ngIf",h.showAlert)},dependencies:[s.bT,E.Hl,E.iY,d.dX,d.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return c})()}}]); \ No newline at end of file diff --git a/dist/1900.a12604cdc6136544.js b/dist/1900.a12604cdc6136544.js deleted file mode 100644 index dc0ffed1..00000000 --- a/dist/1900.a12604cdc6136544.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1900],{91900:(de,R,l)=>{l.d(R,{VO:()=>ie,Ve:()=>ae});var g=l(3819),f=l(18331),t=l(1843),o=l(42250),M=l(54688),D=l(18144),y=l(83607),B=l(10165),v=l(8275),L=l(81538),c=l(25150),b=l(78227),C=l(89115),F=l(19424),O=l(85012),k=l(28930),w=l(57588),I=l(89371),T=l(98474),A=l(12324),W=l(11224),u=l(73907),d=l(89411);const K=["trigger"],G=["panel"];function U(n,_){if(1&n&&(t.j41(0,"span",10),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(1),t.JRh(e.placeholder)}}function V(n,_){if(1&n&&(t.j41(0,"span",14),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(1),t.JRh(e.triggerValue)}}function j(n,_){1&n&&t.SdG(0,0,["*ngSwitchCase","true"])}function X(n,_){if(1&n&&(t.j41(0,"span",11),t.DNE(1,V,2,1,"span",12),t.DNE(2,j,1,0,"ng-content",13),t.k0s()),2&n){const e=t.XpG();t.Y8G("ngSwitch",!!e.customTrigger),t.R7$(2),t.Y8G("ngSwitchCase",!0)}}function Y(n,_){if(1&n){const e=t.RV6();t.qSk(),t.joV(),t.j41(0,"div",15,16),t.bIt("@transformPanel.done",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s._panelDoneAnimatingStream.next(a.toState))})("keydown",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s._handleKeydown(a))}),t.SdG(2,1),t.k0s()}if(2&n){const e=t.XpG();t.ZvI("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),t.Y8G("ngClass",e.panelClass)("@transformPanel","showing"),t.BMQ("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}const Q=[[["mat-select-trigger"]],"*"],z=["mat-select-trigger","*"],H={transformPanelWrap:(0,d.hZ)("transformPanelWrap",[(0,d.kY)("* => void",(0,d.P)("@transformPanel",[(0,d.MA)()],{optional:!0}))]),transformPanel:(0,d.hZ)("transformPanel",[(0,d.wk)("void",(0,d.iF)({opacity:0,transform:"scale(1, 0.8)"})),(0,d.kY)("void => showing",(0,d.i0)("120ms cubic-bezier(0, 0, 0.2, 1)",(0,d.iF)({opacity:1,transform:"scale(1, 1)"}))),(0,d.kY)("* => void",(0,d.i0)("100ms linear",(0,d.iF)({opacity:0})))])};let x=0;const P=new t.nKC("mat-select-scroll-strategy"),N=new t.nKC("MAT_SELECT_CONFIG"),Z={provide:P,deps:[g.hJ],useFactory:function $(n){return()=>n.scrollStrategies.reposition()}},J=new t.nKC("MatSelectTrigger");class q{constructor(_,e){this.source=_,this.value=e}}const ee=(0,o.GG)((0,o.BF)((0,o.Ob)((0,o.J8)(class{constructor(n,_,e,i,a){this._elementRef=n,this._defaultErrorStateMatcher=_,this._parentForm=e,this._parentFormGroup=i,this.ngControl=a,this.stateChanges=new C.B}}))));let te=(()=>{class n extends ee{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(b.k0.required)??!1}set required(e){this._required=(0,v.he)(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=(0,v.he)(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=(0,v.he)(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=(0,v.OE)(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,i,a,s,r,m,h,ne,se,le,re,oe,ce,S){super(r,s,h,ne,le),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=a,this._dir=m,this._parentFormField=se,this._liveAnnouncer=ce,this._defaultOptions=S,this._panelOpen=!1,this._compareWith=(p,E)=>p===E,this._uid="mat-select-"+x++,this._triggerAriaLabelledBy=null,this._destroy=new C.B,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+x++,this._panelDoneAnimatingStream=new C.B,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=(0,F.v)(()=>{const p=this.options;return p?p.changes.pipe((0,k.Z)(p),(0,w.n)(()=>(0,O.h)(...p.map(E=>E.onSelectionChange)))):this._ngZone.onStable.pipe((0,I.s)(1),(0,w.n)(()=>this.optionSelectionChanges))}),this.openedChange=new t.bkB,this._openedStream=this.openedChange.pipe((0,T.p)(p=>p),(0,A.T)(()=>{})),this._closedStream=this.openedChange.pipe((0,T.p)(p=>!p),(0,A.T)(()=>{})),this.selectionChange=new t.bkB,this.valueChange=new t.bkB,this._trackedModal=null,this.ngControl&&(this.ngControl.valueAccessor=this),null!=S?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=S.typeaheadDebounceInterval),this._scrollStrategyFactory=oe,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(re)||0,this.id=this.id}ngOnInit(){this._selectionModel=new L.CB(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe((0,W.F)(),(0,u.Q)(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe((0,u.Q)(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe((0,k.Z)(null),(0,u.Q)(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){const a=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?a.setAttribute("aria-labelledby",e):a.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}_applyModalPanelOwnership(){const e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;const i=`${this.id}-panel`;this._trackedModal&&(0,y.Ae)(this._trackedModal,"aria-owns",i),(0,y.px)(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){this._trackedModal&&((0,y.Ae)(this._trackedModal,"aria-owns",`${this.id}-panel`),this._trackedModal=null)}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){const i=e.keyCode,a=i===c.n6||i===c.i7||i===c.UQ||i===c.LE,s=i===c.Fm||i===c.t6,r=this._keyManager;if(!r.isTyping()&&s&&!(0,c.rp)(e)||(this.multiple||e.altKey)&&a)e.preventDefault(),this.open();else if(!this.multiple){const m=this.selected;r.onKeydown(e);const h=this.selected;h&&m!==h&&this._liveAnnouncer.announce(h.viewValue,1e4)}}_handleOpenKeydown(e){const i=this._keyManager,a=e.keyCode,s=a===c.n6||a===c.i7,r=i.isTyping();if(s&&e.altKey)e.preventDefault(),this.close();else if(r||a!==c.Fm&&a!==c.t6||!i.activeItem||(0,c.rp)(e))if(!r&&this._multiple&&a===c.A&&e.ctrlKey){e.preventDefault();const m=this.options.some(h=>!h.disabled&&!h.selected);this.options.forEach(h=>{h.disabled||(m?h.select():h.deselect())})}else{const m=i.activeItemIndex;i.onKeydown(e),this._multiple&&s&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==m&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe((0,I.s)(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){const i=this.options.find(a=>{if(this._selectionModel.isSelected(a))return!1;try{return null!=a.value&&this._compareWith(a.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_skipPredicate(e){return e.disabled}_initKeyManager(){this._keyManager=new y.Au(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const e=(0,O.h)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe((0,u.Q)(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),(0,O.h)(...this.options.map(i=>i._stateChanges)).pipe((0,u.Q)(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){const a=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(a!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),a!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const e=this.options.toArray();this._selectionModel.sort((i,a)=>this.sortComparator?this.sortComparator(i,a,e):e.indexOf(i)-e.indexOf(a)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(a=>a.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let i=0;i0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();let i=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(D.Xj),t.rXU(t.gRc),t.rXU(t.SKi),t.rXU(o.es),t.rXU(t.aKT),t.rXU(B.dS,8),t.rXU(b.cV,8),t.rXU(b.j4,8),t.rXU(M.xb,8),t.rXU(b.vO,10),t.kS0("tabindex"),t.rXU(P),t.rXU(y.Ai),t.rXU(N,8))}}static{this.\u0275dir=t.FsC({type:n,viewQuery:function(i,a){if(1&i&&(t.GBs(K,5),t.GBs(G,5),t.GBs(g.WB,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.trigger=s.first),t.mGM(s=t.lsd())&&(a.panel=s.first),t.mGM(s=t.lsd())&&(a._overlayDir=s.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[t.Vt3,t.OA$]})}}return n})(),ie=(()=>{class n extends te{constructor(){super(...arguments),this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._skipPredicate=e=>!this.panelOpen&&e.disabled}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe((0,u.Q)(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}open(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(e){const i=this.options.toArray()[e];if(i){const a=this.panel.nativeElement,s=(0,o.jb)(e,this.options,this.optionGroups),r=i._getHostElement();a.scrollTop=0===e&&1===s?0:(0,o.TL)(r.offsetTop,r.offsetHeight,a.scrollTop,a.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new q(this,e)}_getOverlayWidth(e){return"auto"===this.panelWidth?(e instanceof g.$Q?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:null===this.panelWidth?"":this.panelWidth}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=(0,v.he)(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const e of this.options)e._changeDetectorRef.markForCheck()}static{this.\u0275fac=function(){let e;return function(a){return(e||(e=t.xGo(n)))(a||n)}}()}static{this.\u0275cmp=t.VBU({type:n,selectors:[["mat-select"]],contentQueries:function(i,a,s){if(1&i&&(t.wni(s,J,5),t.wni(s,o.wT,5),t.wni(s,o.QC,5)),2&i){let r;t.mGM(r=t.lsd())&&(a.customTrigger=r.first),t.mGM(r=t.lsd())&&(a.options=r),t.mGM(r=t.lsd())&&(a.optionGroups=r)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox","ngSkipHydration","",1,"mat-mdc-select"],hostVars:19,hostBindings:function(i,a){1&i&&t.bIt("keydown",function(r){return a._handleKeydown(r)})("focus",function(){return a._onFocus()})("blur",function(){return a._onBlur()}),2&i&&(t.BMQ("id",a.id)("tabindex",a.tabIndex)("aria-controls",a.panelOpen?a.id+"-panel":null)("aria-expanded",a.panelOpen)("aria-label",a.ariaLabel||null)("aria-required",a.required.toString())("aria-disabled",a.disabled.toString())("aria-invalid",a.errorState)("aria-activedescendant",a._getAriaActiveDescendant()),t.AVh("mat-mdc-select-disabled",a.disabled)("mat-mdc-select-invalid",a.errorState)("mat-mdc-select-required",a.required)("mat-mdc-select-empty",a.empty)("mat-mdc-select-multiple",a.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",panelWidth:"panelWidth",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[t.Jv_([{provide:M.qT,useExisting:n},{provide:o.is,useExisting:n}]),t.Vt3],ngContentSelectors:z,decls:11,vars:10,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(i,a){if(1&i&&(t.NAR(Q),t.j41(0,"div",0,1),t.bIt("click",function(){return a.toggle()}),t.j41(3,"div",2),t.DNE(4,U,2,1,"span",3),t.DNE(5,X,3,2,"span",4),t.k0s(),t.j41(6,"div",5)(7,"div",6),t.qSk(),t.j41(8,"svg",7),t.nrm(9,"path",8),t.k0s()()()(),t.DNE(10,Y,3,9,"ng-template",9),t.bIt("backdropClick",function(){return a.close()})("attach",function(){return a._onAttached()})("detach",function(){return a.close()})),2&i){const s=t.sdS(1);t.R7$(3),t.Y8G("ngSwitch",a.empty),t.BMQ("id",a._valueId),t.R7$(1),t.Y8G("ngSwitchCase",!0),t.R7$(1),t.Y8G("ngSwitchCase",!1),t.R7$(5),t.Y8G("cdkConnectedOverlayPanelClass",a._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",a._scrollStrategy)("cdkConnectedOverlayOrigin",a._preferredOverlayOrigin||s)("cdkConnectedOverlayOpen",a.panelOpen)("cdkConnectedOverlayPositions",a._positions)("cdkConnectedOverlayWidth",a._overlayWidth)}},dependencies:[f.YU,f.ux,f.e1,f.fG,g.WB,g.$Q],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[H.transformPanel]},changeDetection:0})}}return n})(),ae=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({providers:[Z],imports:[f.MD,g.z_,o.Sy,o.yE,D.Gj,M.RG,o.Sy,o.yE]})}}return n})()}}]); \ No newline at end of file diff --git a/dist/1917.445d714240916a62.js b/dist/1917.445d714240916a62.js deleted file mode 100644 index e3d91e54..00000000 --- a/dist/1917.445d714240916a62.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[1917],{41917:(Ml,it,d)=>{d.r(it),d.d(it,{DfServiceDetailsComponent:()=>He});var ge=d(18724),Z=d(21406),_=d(18331),m=d(78227),xe=d(29167),te=d(28600),P=d(54688),E=d(453),V=d(91900),ye=d(60368),ne=d(96984),I=d(31147),e=d(1843),b=d(68660),k=d(54342),g=d(94093),$=d(98337),j=d(97828),Ie=d(33492),fe=d(28930),z=d(12324),Tt=d(97195),h=d(62633),oe=d(69069),A=d(7263),C=d(58497),X=d(62572),ue=d(69099),he=d(23135),R=d(52483),ie=d(14087),ae=d(80972),Te=d(73475),ke=d(56579),at=d(89905);let rt=(()=>{class n{constructor(t,o){this.http=t,this.userDataService=o,this.excludedServices=["logs","log"]}getAbsoluteApiUrl(t){const c=`${window.location.origin}/${(t.startsWith("/")?t.substring(1):t).replace(/^(dreamfactory\/dist\/)?/,"")}`;return console.log(`\u{1f50d} Constructed absolute URL for API request: ${c}`),c}isSelectableFileService(t){return!this.excludedServices.some(o=>t.name.toLowerCase().includes(o)||t.label.toLowerCase().includes(o))}getHeaders(){const t={},o=this.userDataService.token;return o&&(t[Te.Zl]=o),console.log("Auth headers:",t),t}getFileServices(){console.log("Getting file services, session token:",this.userDataService.token);const t={resource:[{id:3,name:"files",label:"Local File Storage",type:"local_file"}]};return this.userDataService.token?new he.c(o=>{o.next(t);const a=`${window.location.origin}/api/v2/system/service`;console.log(`Loading file services from absolute URL: ${a}`);const c=this.getHeaders();this.http.get(a,{params:{filter:"type=local_file",fields:"id,name,label,type"},headers:c}).pipe((0,z.T)(s=>s&&s.resource&&Array.isArray(s.resource)?(s.resource=s.resource.filter(l=>this.isSelectableFileService(l)),0===s.resource.length?(console.warn("No valid file services found in API response, using defaults"),t):s):(console.warn("Invalid response format from API, using default services"),t)),(0,R.W)(s=>(console.error("Error fetching file services:",s),console.warn("API call failed, using default file services"),new he.c(l=>{l.next(t),l.complete()})))).subscribe({next:s=>{JSON.stringify(s)!==JSON.stringify(t)&&o.next(s),o.complete()},error:()=>{o.complete()}})}):(console.warn("No session token available, using hardcoded file services"),new he.c(o=>{o.next(t),o.complete()}))}listFiles(t,o=""){if(!t)return console.warn("No service name provided for listFiles, returning empty list"),new he.c(p=>{p.next({resource:[]}),p.complete()});const a=o?`api/v2/${t}/${o}`:`api/v2/${t}`;console.log(`Listing files from path: ${a}`);const r=`${window.location.origin}/${a}`;console.log(`Using absolute URL: ${r}`);const s={},l=this.userDataService.token;return l&&(s[Te.Zl]=l),this.http.get(r,{headers:s,params:{include_properties:"content_type",fields:"name,path,type,content_type,last_modified,size"}}).pipe((0,ie.M)(p=>console.log("Files response:",p)),(0,R.W)(p=>{console.error(`Error fetching files from ${r}:`,p);let f="Error loading files. ";return f+=500===p.status?"The server encountered an internal error. This might be a temporary issue.":404===p.status?"The specified folder does not exist.":403===p.status||401===p.status?"You do not have permission to access this location.":"Please check your connection and try again.",console.warn(f),new he.c(x=>{x.next({resource:[],error:f}),x.complete()})}))}uploadFile(t,o,a=""){let r;r=a?`api/v2/${t}/${a.replace(/\/$/,"")}/${o.name}`:`api/v2/${t}/${o.name}`;const c=this.getAbsoluteApiUrl(r);console.log(`\u2b50\u2b50\u2b50 UPLOADING FILE ${o.name} (${o.size} bytes), type: ${o.type} \u2b50\u2b50\u2b50`),console.log(`To absolute URL: ${c}`),console.log(`Current document baseURI: ${document.baseURI}`),console.log(`Current window location: ${window.location.href}`),(o.name.endsWith(".pem")||o.name.endsWith(".p8")||o.name.endsWith(".key"))&&console.log("Detected private key file - using standard FormData upload method");const l=new FormData;l.append("files",o);const p=this.getHeaders();return this.http.post(c,l,{headers:p}).pipe((0,ie.M)(f=>console.log("Upload complete with response:",f)),(0,R.W)(f=>(console.error(`Error uploading file: ${f.status} ${f.statusText}`,f),(0,ae.$)(()=>(0,ke.cQ)(f)))))}createDirectoryWithPost(t,o,a){const r={resource:[{name:a,type:"folder"}]},s=this.getAbsoluteApiUrl(o?`api/v2/${t}/${o}`:`api/v2/${t}`);console.log(`Creating directory using POST at absolute URL: ${s}`,r);const l=this.getHeaders();return l["X-Http-Method"]="POST",this.http.post(s,r,{headers:l}).pipe((0,ie.M)(p=>console.log("Create directory response:",p)),(0,R.W)(p=>{throw console.error(`Error creating directory at ${s}:`,p),p}))}getFileContent(t,o){const r=this.getAbsoluteApiUrl(`api/v2/${t}/${o}`);return console.log(`Getting file content from absolute URL: ${r}`),this.http.get(r,{responseType:"blob",headers:this.getHeaders()}).pipe((0,R.W)(c=>{throw console.error(`Error getting file content from ${r}:`,c),c}))}deleteFile(t,o){const r=this.getAbsoluteApiUrl(`api/v2/${t}/${o}`);return console.log(`Deleting file at absolute URL: ${r}`),this.http.delete(r,{headers:this.getHeaders()}).pipe((0,ie.M)(c=>console.log("Delete response:",c)),(0,R.W)(c=>{throw console.error(`Error deleting file at ${r}:`,c),c}))}createDirectory(t,o,a){const r={resource:[{name:a,type:"folder"}]},s=this.getAbsoluteApiUrl(o?`api/v2/${t}/${o}`:`api/v2/${t}`);return console.log(`Creating directory at absolute URL: ${s}`,r),this.http.post(s,r,{headers:this.getHeaders()}).pipe((0,ie.M)(l=>console.log("Create directory response:",l)),(0,R.W)(l=>{throw console.error(`Error creating directory at ${s}:`,l),l}))}static{this.\u0275fac=function(o){return new(o||n)(e.KVO(X.Qq),e.KVO(at.T))}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const Rt=["fileUploadInput"];function Et(n,i){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2,"Upload Private Key File"),e.k0s(),e.bVm())}function Gt(n,i){1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2,"Select File"),e.k0s(),e.bVm())}function $t(n,i){if(1&n&&(e.j41(0,"small"),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" Allowed file types: ",t.data.allowedExtensions.join(", ")," ")}}function jt(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",10),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.selectFileApi(r))}),e.j41(1,"div",11),e.nrm(2,"fa-icon",12),e.k0s(),e.j41(3,"div",13)(4,"div",14),e.EFF(5),e.k0s(),e.j41(6,"div",15),e.EFF(7),e.k0s()()()}if(2&n){const t=i.$implicit,o=e.XpG(2);e.R7$(2),e.Y8G("icon",o.faFolderOpen),e.R7$(3),e.JRh(t.label||t.name),e.R7$(2),e.JRh(t.type)}}function Nt(n,i){if(1&n&&(e.j41(0,"div",7)(1,"h3"),e.EFF(2,"Select a File Service"),e.k0s(),e.j41(3,"div",8),e.DNE(4,jt,8,3,"div",9),e.k0s()()),2&n){const t=e.XpG();e.R7$(4),e.Y8G("ngForOf",t.data.fileApis)}}function At(n,i){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.currentPath)}}function Yt(n,i){1&n&&(e.j41(0,"div",32)(1,"p"),e.EFF(2," Select a file from the list below. To upload new files, please use the File Manager. "),e.k0s()())}function Vt(n,i){1&n&&(e.j41(0,"div",33),e.nrm(1,"mat-spinner",34),e.j41(2,"div"),e.EFF(3,"Loading files..."),e.k0s()())}function zt(n,i){1&n&&(e.j41(0,"th",46),e.EFF(1,"Name"),e.k0s())}function Xt(n,i){if(1&n){const t=e.RV6();e.j41(0,"td",47),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj("folder"===r.type?c.openFolder(r):c.selectFile(r))}),e.j41(1,"div",48),e.nrm(2,"fa-icon",19),e.j41(3,"span"),e.EFF(4),e.k0s()()()}if(2&n){const t=i.$implicit,o=e.XpG(3);e.R7$(2),e.Y8G("icon","folder"===t.type?o.faFolderOpen:o.faFile),e.R7$(2),e.JRh(t.name)}}function Bt(n,i){1&n&&(e.j41(0,"th",46),e.EFF(1,"Type"),e.k0s())}function Lt(n,i){if(1&n&&(e.j41(0,"td",49),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.R7$(1),e.SpI(" ","folder"===t.type?"Folder":t.contentType||"File"," ")}}function Ut(n,i){1&n&&(e.j41(0,"th",46),e.EFF(1,"Actions"),e.k0s())}function Jt(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",52),e.bIt("click",function(){e.eBV(t);const a=e.XpG().$implicit,r=e.XpG(3);return e.Njj(r.openFolder(a))}),e.j41(1,"mat-icon"),e.EFF(2,"folder_open"),e.k0s()()}}function qt(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",53),e.bIt("click",function(){e.eBV(t);const a=e.XpG().$implicit,r=e.XpG(3);return e.Njj(r.selectFile(a))}),e.j41(1,"mat-icon"),e.EFF(2,"check_circle"),e.k0s()()}if(2&n){const t=e.XpG(4);e.Y8G("disabled",t.data.uploadMode)}}function Ht(n,i){if(1&n&&(e.j41(0,"td",49),e.DNE(1,Jt,3,0,"button",50),e.DNE(2,qt,3,1,"button",51),e.k0s()),2&n){const t=i.$implicit;e.R7$(1),e.Y8G("ngIf","folder"===t.type),e.R7$(1),e.Y8G("ngIf","file"===t.type)}}function Kt(n,i){1&n&&e.nrm(0,"tr",54)}function Qt(n,i){if(1&n){const t=e.RV6();e.j41(0,"tr",55),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj("folder"===r.type?c.openFolder(r):null)}),e.k0s()}if(2&n){const t=i.$implicit,o=e.XpG(3);e.AVh("selected-row",(null==o.selectedFile?null:o.selectedFile.name)===t.name)}}function Wt(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",58),e.bIt("click",function(){e.eBV(t);const a=e.XpG(4);return e.Njj(a.triggerFileUpload())}),e.j41(1,"mat-icon"),e.EFF(2,"upload_file"),e.k0s(),e.EFF(3," Upload File Here "),e.k0s()}}function Zt(n,i){if(1&n&&(e.j41(0,"div",56)(1,"p"),e.EFF(2,"This directory is empty."),e.k0s(),e.DNE(3,Wt,4,0,"button",57),e.k0s()),2&n){const t=e.XpG(3);e.R7$(3),e.Y8G("ngIf",!t.isSelectorOnly)}}function en(n,i){if(1&n&&(e.j41(0,"div",35)(1,"table",36),e.qex(2,37),e.DNE(3,zt,2,0,"th",38),e.DNE(4,Xt,5,2,"td",39),e.bVm(),e.qex(5,40),e.DNE(6,Bt,2,0,"th",38),e.DNE(7,Lt,2,1,"td",41),e.bVm(),e.qex(8,42),e.DNE(9,Ut,2,0,"th",38),e.DNE(10,Ht,3,2,"td",41),e.bVm(),e.DNE(11,Kt,1,0,"tr",43),e.DNE(12,Qt,1,2,"tr",44),e.k0s(),e.DNE(13,Zt,4,1,"div",45),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("dataSource",t.files),e.R7$(10),e.Y8G("matHeaderRowDef",t.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",t.displayedColumns),e.R7$(1),e.Y8G("ngIf",0===t.files.length)}}function tn(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",59)(1,"h3"),e.EFF(2),e.k0s(),e.j41(3,"button",6),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.uploadFile())}),e.nrm(4,"fa-icon",19),e.EFF(5," Upload Here "),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI('Upload "',null==t.data.fileToUpload?null:t.data.fileToUpload.name,'" to this location?'),e.R7$(1),e.Y8G("disabled",t.uploadInProgress),e.R7$(1),e.Y8G("icon",t.faUpload)}}function nn(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",16)(1,"div",17)(2,"button",18),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.navigateBack())}),e.nrm(3,"fa-icon",19),e.k0s(),e.j41(4,"div",20)(5,"span",21),e.EFF(6),e.k0s(),e.DNE(7,At,2,1,"span",1),e.k0s()(),e.j41(8,"div",22)(9,"button",23),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.showCreateFolderDialog())}),e.j41(10,"span",24),e.EFF(11,"cr"),e.k0s(),e.EFF(12," Create Folder "),e.k0s(),e.j41(13,"button",25),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.triggerFileUpload())}),e.j41(14,"span",24),e.EFF(15,"up"),e.k0s(),e.EFF(16," Upload File "),e.k0s(),e.j41(17,"input",26,27),e.bIt("change",function(a){e.eBV(t);const r=e.XpG();return e.Njj(r.handleFileUpload(a))}),e.k0s()(),e.DNE(19,Yt,3,0,"div",28),e.DNE(20,Vt,4,0,"div",29),e.DNE(21,en,14,4,"div",30),e.DNE(22,tn,6,3,"div",31),e.k0s()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("icon",t.faArrowLeft),e.R7$(3),e.JRh(t.selectedFileApi.name),e.R7$(1),e.Y8G("ngIf",t.currentPath),e.R7$(10),e.Y8G("accept",t.data.allowedExtensions.join(",")),e.R7$(2),e.Y8G("ngIf",t.isSelectorOnly),e.R7$(1),e.Y8G("ngIf",t.isLoading),e.R7$(1),e.Y8G("ngIf",!t.isLoading),e.R7$(1),e.Y8G("ngIf",t.data.uploadMode)}}let on=(()=>{class n{constructor(t){this.dialogRef=t,this.folderName=""}onCancel(){this.dialogRef.close()}onConfirm(){this.dialogRef.close(this.folderName)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-create-folder-dialog"]],standalone:!0,features:[e.aNF],decls:12,vars:2,consts:[["mat-dialog-title",""],["appearance","outline",1,"full-width"],["matInput","","placeholder","Enter folder name",3,"ngModel","ngModelChange"],["align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"]],template:function(o,a){1&o&&(e.j41(0,"h2",0),e.EFF(1,"Create New Folder"),e.k0s(),e.j41(2,"mat-dialog-content")(3,"mat-form-field",1)(4,"mat-label"),e.EFF(5,"Folder Name"),e.k0s(),e.j41(6,"input",2),e.bIt("ngModelChange",function(c){return a.folderName=c}),e.k0s()()(),e.j41(7,"mat-dialog-actions",3)(8,"button",4),e.bIt("click",function(){return a.onCancel()}),e.EFF(9,"Cancel"),e.k0s(),e.j41(10,"button",5),e.bIt("click",function(){return a.onConfirm()}),e.EFF(11," Create "),e.k0s()()),2&o&&(e.R7$(6),e.Y8G("ngModel",a.folderName),e.R7$(4),e.Y8G("disabled",!a.folderName))},dependencies:[h.hM,h.BI,h.Yi,h.E7,b.Hl,b.$z,P.RG,P.rl,P.nJ,E.fS,E.fg,m.YN,m.me,m.BC,m.vS,_.MD],styles:[".full-width[_ngcontent-%COMP%]{width:100%}"]})}}return n})(),Re=class Qe{get isSelectorOnly(){return console.log("isSelectorOnly getter called, data.selectorOnly =",this.data.selectorOnly),!!this.data.selectorOnly}constructor(i,t,o,a,r,c){this.dialogRef=i,this.data=t,this.dialog=o,this.http=a,this.fileApiService=r,this.crudService=c,this.faFolderOpen=g.Uj9,this.faFile=g.A4h,this.faArrowLeft=g.CeG,this.faUpload=g.JmV,this.selectedFileApi=null,this.currentPath="",this.files=[],this.navigationStack=[],this.isLoading=!1,this.uploadInProgress=!1,this.displayedColumns=["name","type","actions"],this.selectedFile=null}ngOnInit(){this.data.uploadMode&&this.data.fileApis.length>0&&this.selectFileApi(this.data.fileApis[0]),console.log("Dialog initialized with data:",{uploadMode:this.data.uploadMode,selectorOnly:this.data.selectorOnly,allowedExtensions:this.data.allowedExtensions,fileApis:this.data.fileApis?.length||0})}selectFileApi(i){this.selectedFileApi=i,this.currentPath="",this.navigationStack=[],this.loadFiles()}loadFiles(){this.selectedFileApi&&(this.isLoading=!0,this.fileApiService.listFiles(this.selectedFileApi.name,this.currentPath).pipe((0,j.s)(this)).subscribe({next:i=>{if(this.isLoading=!1,i.error&&(console.warn("File listing contained error:",i.error),i.error.includes("Internal Server Error")))return console.log("Server error encountered, showing empty directory"),void(this.files=[]);let t=[];Array.isArray(i)?t=i:i.resource&&Array.isArray(i.resource)&&(t=i.resource),this.files=t.map(o=>({name:o.name||(o.path?o.path.split("/").pop():""),path:o.path||((this.currentPath?this.currentPath+"/":"")+o.name).replace("//","/"),type:"folder"===o.type?"folder":"file",contentType:o.content_type||o.contentType,lastModified:o.last_modified||o.lastModified,size:o.size})),console.log("Processed files:",this.files)},error:i=>{console.error("Error loading files:",i),this.files=[];let t="Failed to load files. ";500===i.status?(t+="The server encountered an internal error. Using empty directory view.",console.warn(t)):404===i.status?(t+="The specified folder does not exist.",alert(t)):403===i.status||401===i.status?(t+="You do not have permission to access this location.",alert(t)):(t+="Please check your connection and try again.",alert(t)),this.isLoading=!1}}))}openFolder(i){this.navigationStack.push(this.currentPath),this.currentPath=i.path,this.loadFiles()}navigateBack(){this.navigationStack.length>0?(this.currentPath=this.navigationStack.pop()||"",this.loadFiles()):this.selectedFileApi&&(this.selectedFileApi=null,this.files=[])}selectFile(i){const t="."+i.name.split(".").pop()?.toLowerCase();this.data.allowedExtensions.includes(t)?this.selectedFile=i:alert(`Only ${this.data.allowedExtensions.join(", ")} files are allowed.`)}confirmSelection(){if(!this.selectedFile||!this.selectedFileApi)return;const i=this.selectedFileApi,a={path:"/opt/dreamfactory/storage/app/"+this.selectedFile.path,relativePath:this.selectedFile.path,fileName:this.selectedFile.name,name:this.selectedFile.name,serviceId:i.id,serviceName:i.name};console.log("Selected file with absolute path:",a),this.dialogRef.close(a)}uploadFileDirectly(i){this.selectedFileApi?(this.uploadInProgress=!0,this.performUpload(i,this.currentPath)):alert("Please select a file service first.")}performUpload(i,t){if(!this.selectedFileApi)return void(this.uploadInProgress=!1);this.uploadInProgress=!0;const o=this.selectedFileApi;console.log(`Starting upload of ${i.name} (${i.size} bytes) to ${o.name}/${t}`),this.fileApiService.uploadFile(o.name,i,t).pipe((0,j.s)(this)).subscribe({next:a=>{this.uploadInProgress=!1,console.log("Upload successful:",a);const r=t?`${t}/${i.name}`:i.name;console.log("File uploaded successfully, returning:",{path:"/opt/dreamfactory/storage/app/"+r,relativePath:r,fileName:i.name,name:i.name,serviceId:o.id,serviceName:o.name}),this.loadFiles(),setTimeout(()=>{const l=this.files.find(p=>p.name===i.name);l&&(this.selectedFile=l)},500)},error:a=>{console.error("Error uploading file:",a),this.uploadInProgress=!1;let r="Failed to upload file. ";r+=400===a.status?"Bad request - check if the file type is allowed or if the file is too large.":401===a.status||403===a.status?"Permission denied - you may not have access to upload to this location.":404===a.status?"The specified folder does not exist.":413===a.status?"The file is too large.":500===a.status?a.error?.error?.message||"Server error occurred.":"Please try again.",alert(r)}})}uploadFile(){this.data.fileToUpload&&this.selectedFileApi&&(this.uploadInProgress=!0,this.performUploadAndClose(this.data.fileToUpload,this.currentPath))}performUploadAndClose(i,t){if(!this.selectedFileApi)return void(this.uploadInProgress=!1);this.uploadInProgress=!0;const o=this.selectedFileApi;console.log(`Starting upload of ${i.name} (${i.size} bytes) to ${o.name}/${t}`),this.fileApiService.uploadFile(o.name,i,t).pipe((0,j.s)(this)).subscribe({next:a=>{this.uploadInProgress=!1,console.log("Upload successful:",a);const r=t?`${t}/${i.name}`:i.name,s={path:"/opt/dreamfactory/storage/app/"+r,relativePath:r,fileName:i.name,name:i.name,serviceId:o.id,serviceName:o.name};console.log("File uploaded successfully, returning with absolute path:",s),this.dialogRef.close(s)},error:a=>{console.error("Error uploading file:",a),this.uploadInProgress=!1;let r="Failed to upload file. ";r+=400===a.status?"Bad request - check if the file type is allowed or if the file is too large.":401===a.status||403===a.status?"Permission denied - you may not have access to upload to this location.":404===a.status?"The specified folder does not exist.":413===a.status?"The file is too large.":500===a.status?a.error?.error?.message||"Server error occurred.":"Please try again.",alert(r)}})}triggerFileUpload(){console.log("triggerFileUpload called, isSelectorOnly =",this.isSelectorOnly),this.isSelectorOnly?console.log("Blocked file upload due to selector-only mode"):this.fileUploadInput?(console.log("Clicking file upload input element"),this.fileUploadInput.nativeElement.click()):console.log("File upload input element not found")}showCreateFolderDialog(){console.log("showCreateFolderDialog called, isSelectorOnly =",this.isSelectorOnly),this.isSelectorOnly?console.log("Blocked folder creation due to selector-only mode"):this.dialog.open(on,{width:"350px"}).afterClosed().subscribe(t=>{t&&this.selectedFileApi&&this.createFolder(t)})}createFolder(i){this.selectedFileApi&&(this.isLoading=!0,this.fileApiService.createDirectory(this.selectedFileApi.name,this.currentPath,i).pipe((0,j.s)(this)).subscribe({next:()=>{console.log("Folder created successfully"),this.loadFiles()},error:t=>{console.error("Error creating folder:",t),alert("Failed to create folder. Please try again."),this.isLoading=!1}}))}cancel(){this.dialogRef.close()}handleFileUpload(i){const t=i.target;if(t.files&&t.files.length>0){const o=t.files[0];console.log(`File selected: ${o.name}`),console.log(`File size: ${o.size} bytes`),console.log(`File type: ${o.type}`),(o.name.endsWith(".pem")||o.name.endsWith(".p8")||o.name.endsWith(".key"))&&console.log("Handling private key file with special care for Snowflake authentication");const r=new FileReader;r.onload=c=>{const s=c.target?.result;console.log(`File content read successfully, content length: ${s?s.byteLength:0} bytes`);const l="."+o.name.split(".").pop()?.toLowerCase();this.data.allowedExtensions.includes(l)?this.uploadFileDirectly(o):alert(`Only ${this.data.allowedExtensions.join(", ")} files are allowed`)},r.onerror=c=>{console.error("Error reading file:",c),alert("Error reading file content. Please try again with another file.")},r.readAsArrayBuffer(o)}}static{this.\u0275fac=function(t){return new(t||Qe)(e.rXU(h.CP),e.rXU(h.Vh),e.rXU(h.bZ),e.rXU(X.Qq),e.rXU(rt),e.rXU(ue.h))}}static{this.\u0275cmp=e.VBU({type:Qe,selectors:[["df-file-selector-dialog"]],viewQuery:function(t,o){if(1&t&&e.GBs(Rt,5),2&t){let a;e.mGM(a=e.lsd())&&(o.fileUploadInput=a.first)}},standalone:!0,features:[e.Jv_([{provide:ue.h,useFactory:i=>new ue.h("api/v2",i),deps:[X.Qq]}]),e.aNF],decls:12,vars:6,consts:[["mat-dialog-title",""],[4,"ngIf"],["class","file-api-selection",4,"ngIf"],["class","file-browser",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","",3,"click"],["mat-raised-button","","color","primary",3,"disabled","click"],[1,"file-api-selection"],[1,"file-api-grid"],["class","file-api-card",3,"click",4,"ngFor","ngForOf"],[1,"file-api-card",3,"click"],[1,"file-api-icon"],["size","2x",3,"icon"],[1,"file-api-details"],[1,"file-api-name"],[1,"file-api-type"],[1,"file-browser"],[1,"navigation-bar"],["mat-icon-button","","matTooltip","Go back",3,"click"],[3,"icon"],[1,"current-location"],[1,"service-name"],[1,"action-row"],[1,"action-button","create-folder-btn",3,"click"],[1,"button-content"],[1,"action-button","upload-file-btn",3,"click"],["type","file",2,"display","none",3,"accept","change"],["fileUploadInput",""],["class","selector-info",4,"ngIf"],["class","loading-container",4,"ngIf"],["class","file-list",4,"ngIf"],["class","upload-section",4,"ngIf"],[1,"selector-info"],[1,"loading-container"],["diameter","40"],[1,"file-list"],["mat-table","",1,"file-table",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",3,"click",4,"matCellDef"],["matColumnDef","type"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"selected-row","click",4,"matRowDef","matRowDefColumns"],["class","empty-directory",4,"ngIf"],["mat-header-cell",""],["mat-cell","",3,"click"],[1,"file-name-cell"],["mat-cell",""],["mat-icon-button","","color","primary","matTooltip","Open folder",3,"click",4,"ngIf"],["mat-icon-button","","color","primary","matTooltip","Select file",3,"disabled","click",4,"ngIf"],["mat-icon-button","","color","primary","matTooltip","Open folder",3,"click"],["mat-icon-button","","color","primary","matTooltip","Select file",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click"],[1,"empty-directory"],["mat-stroked-button","","color","primary",3,"click",4,"ngIf"],["mat-stroked-button","","color","primary",3,"click"],[1,"upload-section"]],template:function(t,o){1&t&&(e.j41(0,"h2",0),e.DNE(1,Et,3,0,"ng-container",1),e.DNE(2,Gt,3,0,"ng-container",1),e.DNE(3,$t,2,1,"small",1),e.k0s(),e.j41(4,"mat-dialog-content"),e.DNE(5,Nt,5,1,"div",2),e.DNE(6,nn,23,8,"div",3),e.k0s(),e.j41(7,"div",4)(8,"button",5),e.bIt("click",function(){return o.cancel()}),e.EFF(9,"Cancel"),e.k0s(),e.j41(10,"button",6),e.bIt("click",function(){return o.confirmSelection()}),e.EFF(11," Choose "),e.k0s()()),2&t&&(e.R7$(1),e.Y8G("ngIf",o.data.uploadMode),e.R7$(1),e.Y8G("ngIf",!o.data.uploadMode),e.R7$(1),e.Y8G("ngIf",o.data.allowedExtensions.length>0),e.R7$(2),e.Y8G("ngIf",!o.selectedFileApi),e.R7$(1),e.Y8G("ngIf",o.selectedFileApi),e.R7$(4),e.Y8G("disabled",!o.selectedFile||"folder"===o.selectedFile.type))},dependencies:[_.MD,_.Sq,_.bT,h.hM,h.BI,h.Yi,h.E7,b.Hl,b.$z,b.iY,ne.RI,P.RG,E.fS,V.Ve,oe.D6,oe.LG,A.m_,A.An,C.tP,C.Zl,C.tL,C.ji,C.cC,C.YV,C.iL,C.KS,C.$R,C.YZ,C.NB,$.uc,$.oV,m.YN,m.X1,k.dX,k.aY],styles:["mat-dialog-content[_ngcontent-%COMP%]{min-height:400px;max-height:600px;overflow-y:auto}h2[_ngcontent-%COMP%]{margin-bottom:0}h2[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{display:block;font-size:1.2rem;font-weight:400;color:var(--df-text-muted);margin-top:4px}.file-api-selection[_ngcontent-%COMP%]{padding:16px 0}.file-api-selection[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:16px;font-size:1.6rem;font-weight:600;letter-spacing:-.01em}.file-api-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:16px}.file-api-card[_ngcontent-%COMP%]{display:flex;align-items:center;padding:16px;border-radius:var(--df-radius);border:1px solid var(--df-border);cursor:pointer;transition:background-color .2s ease,border-color .2s ease}.file-api-card[_ngcontent-%COMP%]:hover{background-color:var(--df-hover);border-color:var(--df-accent)}.file-api-icon[_ngcontent-%COMP%]{margin-right:16px;color:var(--df-accent)}.file-api-details[_ngcontent-%COMP%] .file-api-name[_ngcontent-%COMP%]{font-weight:500;margin-bottom:4px}.file-api-details[_ngcontent-%COMP%] .file-api-type[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-muted)}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:16px}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%] .current-location[_ngcontent-%COMP%]{margin-left:8px}.file-browser[_ngcontent-%COMP%] .navigation-bar[_ngcontent-%COMP%] .current-location[_ngcontent-%COMP%] .service-name[_ngcontent-%COMP%]{font-weight:500;margin-right:8px}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%]{display:flex;gap:16px;margin-bottom:20px;padding:10px;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm);background-color:var(--df-surface-2)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{display:flex;align-items:center;border:none;border-radius:var(--df-radius-sm);padding:8px 16px;font-size:1.4rem;font-weight:500;cursor:pointer;transition:all .2s ease}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .button-content[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border:1px solid currentColor;border-radius:var(--df-radius-sm);margin-right:8px;font-weight:700;font-size:1.2rem;opacity:.85}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:hover{opacity:.9}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:active{transform:translateY(1px)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .create-folder-btn[_ngcontent-%COMP%]{background-color:var(--df-accent);color:var(--df-accent-contrast)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .upload-file-btn[_ngcontent-%COMP%]{background-color:transparent;border:1px solid var(--df-border);color:var(--df-text-2)}.file-browser[_ngcontent-%COMP%] .action-row[_ngcontent-%COMP%] .upload-file-btn[_ngcontent-%COMP%]:hover{background-color:var(--df-hover)}.loading-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:32px}.loading-container[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin-top:16px;color:var(--df-text-muted)}.file-table[_ngcontent-%COMP%]{width:100%}.file-table[_ngcontent-%COMP%] .mat-column-name[_ngcontent-%COMP%]{width:60%}.file-table[_ngcontent-%COMP%] .mat-column-type[_ngcontent-%COMP%]{width:20%}.file-table[_ngcontent-%COMP%] .mat-column-actions[_ngcontent-%COMP%]{width:20%;text-align:right}.file-table[_ngcontent-%COMP%] .file-name-cell[_ngcontent-%COMP%]{display:flex;align-items:center}.file-table[_ngcontent-%COMP%] .file-name-cell[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:8px;color:var(--df-accent)}.file-table[_ngcontent-%COMP%] .selected-row[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)}.empty-directory[_ngcontent-%COMP%]{padding:24px 16px;text-align:center;color:var(--df-text-muted)}.empty-directory[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:16px;font-style:italic}.empty-directory[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-top:8px}.upload-section[_ngcontent-%COMP%]{margin-top:24px;padding:16px;border-radius:var(--df-radius);border:1px solid var(--df-border-2);background-color:var(--df-surface-2);text-align:center}.upload-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-top:0;margin-bottom:16px}"]})}};Re=(0,Z.Cg)([(0,j.d)({checkProperties:!0})],Re);var K=d(75066),G=d(16994),B=d(11863);function an(n,i){if(1&n&&(e.j41(0,"span",8),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.label)}}function rn(n,i){if(1&n&&e.nrm(0,"div",9),2&n){const t=e.XpG(2);e.Y8G("innerHTML",t.description,e.npT)}}function cn(n,i){if(1&n&&(e.j41(0,"div",5),e.DNE(1,an,2,1,"span",6),e.DNE(2,rn,1,1,"div",7),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.label),e.R7$(1),e.Y8G("ngIf",t.description)}}function sn(n,i){1&n&&(e.j41(0,"div",17),e.EFF(1," No file services configured. Contact your administrator. "),e.k0s())}function ln(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",10)(1,"div",11)(2,"button",12),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.openFileSelector())}),e.nrm(3,"fa-icon",13),e.EFF(4," Select File "),e.k0s(),e.j41(5,"button",14),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.goToFilesManager())}),e.nrm(6,"fa-icon",13),e.EFF(7," File Manager "),e.k0s()(),e.j41(8,"div",15),e.EFF(9,' You can upload and select files directly with "Select File" or manage files via the "File Manager". '),e.k0s(),e.DNE(10,sn,2,0,"div",16),e.k0s()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("icon",t.faFolderOpen),e.R7$(3),e.Y8G("icon",t.faExternalLinkAlt),e.R7$(4),e.Y8G("ngIf",0===t.fileApis.length)}}function dn(n,i){if(1&n&&(e.j41(0,"div",31)(1,"strong"),e.EFF(2,"Service:"),e.k0s(),e.EFF(3),e.k0s()),2&n){const t=e.XpG(2);e.R7$(3),e.SpI(" ",t.selectedFile.serviceName," ")}}function pn(n,i){if(1&n&&(e.j41(0,"div",32)(1,"span",33),e.EFF(2,"Service Relative Path:"),e.k0s(),e.j41(3,"span",34),e.EFF(4),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(4),e.JRh(t.selectedFile.relativePath)}}function mn(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",18)(1,"div",19),e.nrm(2,"fa-icon",20),e.j41(3,"div",21)(4,"div",22),e.EFF(5),e.k0s(),e.DNE(6,dn,4,1,"div",23),e.j41(7,"div",24)(8,"div",25),e.EFF(9,"Full Absolute Path:"),e.k0s(),e.j41(10,"div",26)(11,"div",27),e.EFF(12),e.k0s()(),e.DNE(13,pn,5,1,"div",28),e.k0s()()(),e.j41(14,"div",29)(15,"button",30),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.clearSelection())}),e.EFF(16," Clear selection "),e.k0s(),e.j41(17,"button",12),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.openFileSelector())}),e.EFF(18," Choose Different "),e.k0s(),e.j41(19,"button",14),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.goToFilesManager())}),e.nrm(20,"fa-icon",13),e.EFF(21," File Manager "),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(2),e.Y8G("icon",t.faFile),e.R7$(3),e.SpI(" ",t.selectedFile.fileName||t.selectedFile.name," "),e.R7$(1),e.Y8G("ngIf","Unknown"!==t.selectedFile.serviceName),e.R7$(6),e.JRh(t.selectedFile.path),e.R7$(1),e.Y8G("ngIf",t.selectedFile.relativePath),e.R7$(7),e.Y8G("icon",t.faExternalLinkAlt)}}let Ee=class We{constructor(i,t,o,a){this.dialog=i,this.fileApiService=t,this.crudService=o,this.router=a,this.label="Private Key File",this.description="",this.allowedExtensions=[".pem",".p8",".key"],this.initialValue="",this.fileSelected=new e.bkB,this.faFile=g.A4h,this.faFolderOpen=g.Uj9,this.faCheck=g.e68,this.faUpload=g.JmV,this.faExternalLinkAlt=g.AaJ,this.selectedFile=void 0,this.fileApis=[],this.isLoading=!1}ngOnInit(){this.loadFileApis(),this.initialValue&&this.parseInitialValue(),this.ensureFallbackService()}goToFilesManager(){this.router.navigate([G.b.ADMIN_SETTINGS,G.b.FILES])}ensureFallbackService(){0===this.fileApis.length&&(console.log("Creating fallback file service entry"),this.fileApis=[{id:1,name:"files",label:"Local Files",type:"local_file"}])}loadFileApis(){this.isLoading=!0,this.ensureFallbackService(),this.fileApiService.getFileServices().pipe((0,j.s)(this)).subscribe({next:i=>{i&&i.resource&&i.resource.length>0?this.fileApis=i.resource:this.ensureFallbackService(),this.isLoading=!1},error:i=>{console.error("Error loading file APIs:",i),this.ensureFallbackService(),this.isLoading=!1}})}openFileSelector(){this.ensureFallbackService(),console.log("Opening file selector dialog with selectorOnly = false"),this.dialog.open(Re,{width:"800px",data:{fileApis:this.fileApis,allowedExtensions:this.allowedExtensions,selectorOnly:!1}}).afterClosed().subscribe(t=>{t&&(this.selectedFile=t,this.fileSelected.emit(this.selectedFile))})}clearSelection(){this.selectedFile=void 0,this.fileSelected.emit(void 0)}parseInitialValue(i){try{const t=i||this.initialValue;if(t){console.log("Parsing path value:",t);const o=t.split("/"),a=o[o.length-1];this.selectedFile={path:t,fileName:a,name:a,serviceId:0,serviceName:"Unknown"},console.log("Generated selected file:",this.selectedFile)}}catch(t){console.error("Failed to parse path value:",t)}}setPath(i){i&&(console.log("Setting path manually:",i),this.parseInitialValue(i))}static{this.\u0275fac=function(t){return new(t||We)(e.rXU(h.bZ),e.rXU(rt),e.rXU(ue.h),e.rXU(B.Ix))}}static{this.\u0275cmp=e.VBU({type:We,selectors:[["df-file-selector"]],inputs:{label:"label",description:"description",allowedExtensions:"allowedExtensions",initialValue:"initialValue"},outputs:{fileSelected:"fileSelected"},standalone:!0,features:[e.Jv_([{provide:K.Wi,useValue:"api/v2/system/service"},ue.h]),e.aNF],decls:5,vars:3,consts:[[1,"file-selector-container"],["class","file-selector-header",4,"ngIf"],[1,"file-selector-content"],["class","file-selector-empty",4,"ngIf"],["class","file-selector-selected",4,"ngIf"],[1,"file-selector-header"],["class","file-selector-label",4,"ngIf"],["class","file-selector-description",3,"innerHTML",4,"ngIf"],[1,"file-selector-label"],[1,"file-selector-description",3,"innerHTML"],[1,"file-selector-empty"],[1,"file-selector-actions"],["mat-raised-button","","color","primary",1,"select-file-button",3,"click"],[3,"icon"],["mat-button","","color","accent","matTooltip","Upload and manage files in the file manager",1,"manage-files-button",3,"click"],[1,"help-text"],["class","no-apis-message",4,"ngIf"],[1,"no-apis-message"],[1,"file-selector-selected"],[1,"selected-file-info"],[1,"file-icon",3,"icon"],[1,"file-details"],[1,"file-name"],["class","file-service",4,"ngIf"],[1,"file-path-container"],[1,"file-path-header"],[1,"file-path-section"],[1,"file-path-value"],["class","relative-path-section",4,"ngIf"],[1,"file-actions"],[1,"clear-button",3,"click"],[1,"file-service"],[1,"relative-path-section"],[1,"relative-path-label"],[1,"relative-path-value"]],template:function(t,o){1&t&&(e.j41(0,"div",0),e.DNE(1,cn,3,2,"div",1),e.j41(2,"div",2),e.DNE(3,ln,11,3,"div",3),e.DNE(4,mn,22,6,"div",4),e.k0s()()),2&t&&(e.R7$(1),e.Y8G("ngIf",o.label||o.description),e.R7$(2),e.Y8G("ngIf",!o.selectedFile),e.R7$(1),e.Y8G("ngIf",o.selectedFile))},dependencies:[_.MD,_.bT,h.hM,b.Hl,b.$z,P.RG,E.fS,V.Ve,m.YN,m.X1,$.uc,$.oV,k.dX,k.aY,A.m_],styles:[".file-selector-container[_ngcontent-%COMP%]{width:100%;border:1px solid var(--df-border);border-radius:var(--df-radius);padding:16px;margin-bottom:16px}.file-selector-header[_ngcontent-%COMP%]{margin-bottom:16px}.file-selector-label[_ngcontent-%COMP%]{font-size:1.5rem;font-weight:600;letter-spacing:-.01em;margin-right:8px;color:var(--df-text)}.file-selector-description[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.file-selector-description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none}.file-selector-description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.file-selector-content[_ngcontent-%COMP%]{width:100%}.file-selector-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;padding:16px 0}.file-selector-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;margin-bottom:16px}.select-file-button[_ngcontent-%COMP%]{padding:8px 24px;font-size:1.4rem}.select-file-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:8px}.file-selector-selected[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px;background-color:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm)}.selected-file-info[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.file-icon[_ngcontent-%COMP%]{font-size:2.4rem;color:var(--df-accent)}.file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column}.file-name[_ngcontent-%COMP%]{color:var(--df-text);font-weight:500;margin-bottom:4px}.file-path-container[_ngcontent-%COMP%]{margin-top:12px;padding:4px;border-radius:var(--df-radius-sm)}.file-path-header[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;color:var(--df-text-muted)}.file-path-section[_ngcontent-%COMP%]{display:flex;margin-bottom:8px;flex-wrap:wrap;padding:12px;background-color:var(--df-surface-2);border-radius:var(--df-radius-sm);border:1px solid var(--df-border)}.file-path-label[_ngcontent-%COMP%]{font-weight:600;margin-right:8px;color:var(--df-text);font-size:1.3rem}.file-path-value[_ngcontent-%COMP%]{font-size:1.3rem;word-break:break-all;flex:1;font-family:SFMono-Regular,Menlo,Consolas,monospace;background-color:var(--df-code-bg);color:var(--df-code-text);padding:4px 8px;border-radius:var(--df-radius-sm);border:1px solid var(--df-border-2)}.file-service[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-2)}.file-actions[_ngcontent-%COMP%]{display:flex;gap:12px;align-items:center}.clear-button[_ngcontent-%COMP%]{background:none;border:none;color:var(--df-danger);cursor:pointer;font-size:1.3rem;padding:0;font-weight:500}.clear-button[_ngcontent-%COMP%]:hover{text-decoration:underline}.no-apis-message[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic}.relative-path-section[_ngcontent-%COMP%]{display:flex;margin-top:6px;font-size:1.2rem;color:var(--df-text-muted)}.relative-path-label[_ngcontent-%COMP%]{font-weight:600;margin-right:8px}.relative-path-value[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace}"]})}};Ee=(0,Z.Cg)([(0,j.d)({checkProperties:!0})],Ee);var Me=d(19206),L=d(42250);const _n=["fileSelector"];function gn(n,i){if(1&n&&(e.j41(0,"mat-label"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.schema.label)}}function fn(n,i){if(1&n&&e.nrm(0,"input",8),2&n){const t=e.XpG(2);e.Y8G("formControl",t.control)("type","integer"===t.schema.type?"number":"password"===t.schema.type?"password":"text"),e.BMQ("autocomplete","password"===t.schema.type?"current-password":"off")("aria-label",t.schema.label)}}function un(n,i){if(1&n&&(e.j41(0,"mat-option",11),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label," ")}}function hn(n,i){if(1&n&&(e.j41(0,"mat-select",9),e.DNE(1,un,2,2,"mat-option",10),e.k0s()),2&n){const t=e.XpG(2);e.Y8G("multiple","multi_picklist"===t.schema.type)("formControl",t.control),e.R7$(1),e.Y8G("ngForOf",t.schema.values)("ngForTrackBy",t.trackByOptionName)}}function bn(n,i){if(1&n&&e.nrm(0,"fa-icon",12),2&n){const t=e.XpG(2);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}const vn=function(){return["integer","string","password","text"]},Cn=function(){return["picklist","multi_picklist"]};function xn(n,i){if(1&n&&(e.j41(0,"mat-form-field",4),e.DNE(1,gn,2,1,"mat-label",1),e.DNE(2,fn,1,4,"input",5),e.DNE(3,hn,2,4,"mat-select",6),e.DNE(4,bn,1,2,"fa-icon",7),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.showLabel),e.R7$(1),e.Y8G("ngIf",e.lJ4(4,vn).includes(t.schema.type)),e.R7$(1),e.Y8G("ngIf",e.lJ4(5,Cn).includes(t.schema.type)),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}const yn=function(){return[".p8",".pem",".key"]};function kn(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"df-file-selector",13,14),e.bIt("fileSelected",function(a){e.eBV(t);const r=e.XpG();return e.Njj(r.onFileSelected(a))}),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();e.R7$(1),e.Y8G("label",t.schema.label)("description",t.schema.description||"")("allowedExtensions",e.lJ4(4,yn))("initialValue",t.control.value)}}function Mn(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"input",15,16),e.bIt("change",function(a){e.eBV(t);const r=e.XpG();return e.Njj(r.handleFileInput(a))}),e.k0s(),e.j41(3,"button",17),e.bIt("click",function(){e.eBV(t);const a=e.sdS(2);return e.Njj(a.click())}),e.EFF(4),e.k0s(),e.EFF(5),e.nI1(6,"transloco"),e.bVm()}if(2&n){const t=e.XpG();let o;e.R7$(3),e.Y8G("matTooltip",null!==(o=t.schema.description)&&void 0!==o?o:""),e.R7$(1),e.SpI(" ",t.schema.label," "),e.R7$(1),e.SpI(" ",t.control.value?t.control.value.name:e.bMT(6,3,"noFileSelected")," ")}}function Pn(n,i){if(1&n&&(e.qex(0),e.j41(1,"span"),e.EFF(2),e.k0s(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(t.schema.label)}}function On(n,i){if(1&n&&(e.j41(0,"mat-slide-toggle",18),e.DNE(1,Pn,3,1,"ng-container",1),e.k0s()),2&n){const t=e.XpG();let o;e.Y8G("formControl",t.control)("matTooltip",null!==(o=t.schema.description)&&void 0!==o?o:""),e.BMQ("aria-label",t.schema.label),e.R7$(1),e.Y8G("ngIf",t.showLabel)}}function Fn(n,i){if(1&n&&(e.j41(0,"mat-label"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t.schema.label)}}function Dn(n,i){if(1&n&&(e.j41(0,"mat-option",11),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function wn(n,i){if(1&n&&(e.j41(0,"mat-form-field",19),e.DNE(1,Fn,2,1,"mat-label",1),e.nrm(2,"input",20),e.j41(3,"mat-autocomplete",null,21),e.DNE(5,Dn,2,2,"mat-option",10),e.nI1(6,"async"),e.k0s()()),2&n){const t=e.sdS(4),o=e.XpG();e.R7$(1),e.Y8G("ngIf",o.showLabel),e.R7$(1),e.Y8G("formControl",o.control)("matAutocomplete",t),e.BMQ("aria-label",o.schema.label),e.R7$(3),e.Y8G("ngForOf",e.bMT(6,6,o.filteredEventList))("ngForTrackBy",o.trackByValue)}}const Sn=function(){return["integer","password","string","string","picklist","multi_picklist","text"]};let Pe=class Ze{constructor(i,t,o){this.controlDir=i,this.activedRoute=t,this.themeService=o,this.showLabel=!0,this.faCircleInfo=g.mEO,this.control=new m.MJ,this.pendingFilePath=null,this.eventList=[],this.isDarkMode=this.themeService.darkMode$,i.valueAccessor=this}trackByOptionName(i,t){return t.name}trackByValue(i,t){return t}ngOnInit(){"event_picklist"===this.schema.type&&(this.activedRoute.data.subscribe(i=>{i.systemEvents&&i.systemEvents.resource&&(this.eventList=(0,Tt.$)(i.systemEvents.resource))}),this.filteredEventList=this.control.valueChanges.pipe((0,fe.Z)(""),(0,z.T)(i=>i&&this.eventList?this.eventList.filter(t=>t.toLowerCase().includes(i.toLowerCase())):[])))}ngDoCheck(){this.controlDir.control instanceof m.MJ&&this.controlDir.control.hasValidator(m.k0.required)&&this.control.addValidators(m.k0.required)}ngAfterViewInit(){"file_certificate_api"===this.schema?.type&&this.fileSelector&&(this.pendingFilePath?(console.log("Applying pending file path after view init:",this.pendingFilePath),this.fileSelector.setPath(this.pendingFilePath),this.pendingFilePath=null):this.control.value&&"string"==typeof this.control.value&&(console.log("Setting file selector path after view init:",this.control.value),this.fileSelector.setPath(this.control.value)))}handleFileInput(i){const t=i.target;t.files&&this.control.setValue(t.files[0])}onFileSelected(i){i?(this.control.setValue(i.path),console.log("File selected in dynamic field:",i)):this.control.setValue(null)}writeValue(i){if(console.log("Dynamic field writeValue:",i,"Schema type:",this.schema?.type),"file_certificate_api"===this.schema?.type&&"string"==typeof i&&i)return console.log("Setting file path value:",i),this.control.setValue(i,{emitEvent:!1}),void(this.fileSelector?(console.log("Setting path on file selector:",i),this.fileSelector.setPath(i)):(console.log("File selector not yet available, storing pending path:",i),this.pendingFilePath=i));this.control.setValue(i,{emitEvent:!1})}registerOnChange(i){this.onChange=i,this.control.valueChanges.subscribe(t=>this.onChange(t))}registerOnTouched(i){this.onTouched=i}setDisabledState(i){i?this.control.disable():this.control.enable()}static{this.\u0275fac=function(t){return new(t||Ze)(e.rXU(m.vO,10),e.rXU(B.nX),e.rXU(Me.n))}}static{this.\u0275cmp=e.VBU({type:Ze,selectors:[["df-dynamic-field"]],viewQuery:function(t,o){if(1&t&&e.GBs(_n,5),2&t){let a;e.mGM(a=e.lsd())&&(o.fileSelector=a.first)}},inputs:{schema:"schema",showLabel:"showLabel"},standalone:!0,features:[e.aNF],decls:6,vars:6,consts:[["subscriptSizing","dynamic","appearance","outline",4,"ngIf"],[4,"ngIf"],["color","primary",3,"formControl","matTooltip",4,"ngIf"],["subscriptSizing","dynamic",4,"ngIf"],["subscriptSizing","dynamic","appearance","outline"],["matInput","",3,"formControl","type",4,"ngIf"],[3,"multiple","formControl",4,"ngIf"],["class","tool-tip-trigger","matSuffix","",3,"icon","matTooltip",4,"ngIf"],["matInput","",3,"formControl","type"],[3,"multiple","formControl"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[3,"label","description","allowedExtensions","initialValue","fileSelected"],["fileSelector",""],["type","file",2,"display","none",3,"change"],["fileInput",""],["mat-flat-button","","color","primary",3,"matTooltip","click"],["color","primary",3,"formControl","matTooltip"],["subscriptSizing","dynamic"],["type","text","matInput","",3,"formControl","matAutocomplete"],["auto","matAutocomplete"]],template:function(t,o){1&t&&(e.j41(0,"div"),e.DNE(1,xn,5,6,"mat-form-field",0),e.DNE(2,kn,3,5,"ng-container",1),e.DNE(3,Mn,7,5,"ng-container",1),e.DNE(4,On,2,4,"mat-slide-toggle",2),e.DNE(5,wn,7,8,"mat-form-field",3),e.k0s()),2&t&&(e.R7$(1),e.Y8G("ngIf",e.lJ4(5,Sn).includes(o.schema.type)),e.R7$(1),e.Y8G("ngIf","file_certificate_api"===o.schema.type),e.R7$(1),e.Y8G("ngIf","file_certificate"===o.schema.type),e.R7$(1),e.Y8G("ngIf","boolean"===o.schema.type),e.R7$(1),e.Y8G("ngIf","event_picklist"===o.schema.type))},dependencies:[P.RG,P.rl,P.nJ,P.yw,E.fS,E.fg,_.bT,V.Ve,V.VO,L.wT,ye.mV,ye.sG,m.X1,m.me,m.BC,m.l_,_.pM,b.Hl,b.$z,I.Kj,k.dX,k.aY,$.uc,$.oV,Ie.jL,Ie.$3,Ie.pN,_.Jj,Ee],encapsulation:2})}};Pe=(0,Z.Cg)([(0,j.d)({checkProperties:!0})],Pe);var Ge,re=d(93138),In=d(1803);function Tn(n,i){if(1&n&&e.nrm(0,"fa-icon",10),2&n){const t=e.XpG(2);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}function Rn(n,i){if(1&n&&(e.j41(0,"mat-card-header"),e.EFF(1),e.DNE(2,Tn,1,2,"fa-icon",9),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.schema.label),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}function En(n,i){if(1&n&&e.nrm(0,"fa-icon",10),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleInfo)("matTooltip",t.schema.description)}}function Gn(n,i){if(1&n&&(e.j41(0,"th",12),e.EFF(1),e.DNE(2,En,1,2,"fa-icon",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.schema.label,""),e.R7$(1),e.Y8G("ngIf",t.schema.description)}}function $n(n,i){if(1&n&&(e.j41(0,"td",13)(1,"mat-form-field",14),e.nrm(2,"input",15),e.k0s()()),2&n){const t=i.index,o=e.XpG(2);e.R7$(2),e.Y8G("formControl",o.controls[t]),e.BMQ("aria-label",o.schema.label)}}function jn(n,i){if(1&n&&(e.qex(0,11),e.DNE(1,Gn,3,2,"th",5),e.DNE(2,$n,3,2,"td",6),e.bVm()),2&n){const t=e.XpG();e.Y8G("matColumnDef",t.schema.name)}}function Nn(n,i){if(1&n&&(e.j41(0,"th",12),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t.label," ")}}function An(n,i){if(1&n&&e.nrm(0,"df-verb-picker",20),2&n){const t=e.XpG(2).$implicit;e.Y8G("formControlName",t.name)("schema",t)}}function Yn(n,i){if(1&n&&e.nrm(0,"df-dynamic-field",21),2&n){const t=e.XpG(2).$implicit;e.Y8G("showLabel",!1)("schema",t)("formControlName",t.name)}}function Vn(n,i){if(1&n&&(e.j41(0,"td",13),e.qex(1,17),e.DNE(2,An,1,2,"df-verb-picker",18),e.DNE(3,Yn,1,3,"df-dynamic-field",19),e.bVm(),e.k0s()),2&n){const t=i.index,o=e.XpG().$implicit,a=e.XpG(2);e.R7$(1),e.Y8G("formGroup",a.getFormGroup(t)),e.R7$(1),e.Y8G("ngIf","verb_mask"===o.type),e.R7$(1),e.Y8G("ngIf","verb_mask"!==o.type)}}function zn(n,i){1&n&&(e.qex(0,11),e.DNE(1,Nn,2,1,"th",5),e.DNE(2,Vn,4,3,"td",6),e.bVm()),2&n&&e.Y8G("matColumnDef",i.$implicit.name)}function Xn(n,i){if(1&n&&e.DNE(0,zn,3,1,"ng-container",16),2&n){const t=e.XpG();e.Y8G("ngForOf",t.schemas)}}function Bn(n,i){if(1&n){const t=e.RV6();e.j41(0,"th",12)(1,"button",22),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.add())}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",23),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(1),e.BMQ("aria-label",e.bMT(2,2,"newEntry")),e.R7$(2),e.Y8G("icon",t.faPlus)}}const Ln=function(n){return{id:n}};function Un(n,i){if(1&n){const t=e.RV6();e.j41(0,"td",13)(1,"button",24),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG();return e.Njj(c.remove(r))}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",23),e.k0s()()}if(2&n){const t=i.index,o=e.XpG();e.R7$(1),e.BMQ("aria-label",e.i5U(2,2,"deleteRow",e.eq3(5,Ln,t))),e.R7$(2),e.Y8G("icon",o.faTrashCan)}}function Jn(n,i){1&n&&e.nrm(0,"tr",25)}function qn(n,i){1&n&&e.nrm(0,"tr",26)}let $e=class et{static{Ge=this}updateDataSource(){this.dataSource=new C.I6(this.fieldArray.controls)}constructor(i,t){this.fb=i,this.themeService=t,this.faPlus=g.QLR,this.faTrashCan=g.sjs,this.faCircleInfo=g.mEO,this.isDarkMode=this.themeService.darkMode$,this._displayedColumns=[]}get controls(){return this.fieldArray.controls}ngOnInit(){this.fieldArray||this.initialize()}get schemas(){return"array"===this.schema.type?this.schema.items:[{name:"key",label:this.schema.object?.key.label,type:this.schema.object?.key.type},{name:"value",label:this.schema.object?.value.label,type:this.schema.object?.value.type}]}get displayedColumns(){if(this._displayedColumnsSchema!==this.schema){this._displayedColumnsSchema=this.schema;const i="array"===this.schema.type?"string"===this.schema.items?[this.schema.name]:this.schemas.map(t=>t.name):["key","value"];i.push("actions"),this._displayedColumns=i}return this._displayedColumns}getFormGroup(i){return this.fieldArray.at(i)}createGroup(i){const t=this.fb.group({});return this.schemas.forEach(o=>{t.addControl(o.name,new m.MJ(i?i[o.name]:o.default))}),i&&t.patchValue(i),t}initialize(){this.fieldArray=this.fb.array([]),this.updateDataSource()}writeValue(i){this.fieldArray||this.initialize(),this.fieldArray.clear({emitEvent:!1}),i&&Array.isArray(i)&&"array"===this.schema.type?i.forEach(t=>this.fieldArray.push("string"===this.schema.items?new m.MJ(t):this.createGroup(t),{emitEvent:!1})):i&&"object"===this.schema.type&&Object.keys(i).forEach(t=>this.fieldArray.push(this.createGroup({key:t,value:i[t]}),{emitEvent:!1})),this.updateDataSource()}registerOnChange(i){this.onChange=i,this.fieldArray.valueChanges.pipe((0,z.T)(t=>"object"===this.schema.type?t.reduce((o,a)=>(o[a.key]=a.value,o),{}):t)).subscribe(t=>{this.onChange(t),this.updateDataSource()})}registerOnTouched(i){this.onTouched=i}setDisabledState(i){i?this.fieldArray.disable():this.fieldArray.enable()}add(){this.fieldArray.push("string"===this.schema.items?new m.MJ(""):this.createGroup())}remove(i){this.fieldArray.removeAt(i)}static{this.\u0275fac=function(t){return new(t||et)(e.rXU(m.ok),e.rXU(Me.n))}}static{this.\u0275cmp=e.VBU({type:et,selectors:[["df-array-field"]],inputs:{schema:"schema"},standalone:!0,features:[e.Jv_([{provide:m.kq,useExisting:(0,e.Rfq)(()=>Ge),multi:!0}]),e.aNF],decls:11,vars:6,consts:[[4,"ngIf"],["mat-table","",3,"dataSource"],[3,"matColumnDef",4,"ngIf","ngIfElse"],["dynamic",""],["matColumnDef","actions","stickyEnd",""],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["class","tool-tip-trigger","matSuffix","",3,"icon","matTooltip",4,"ngIf"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[3,"matColumnDef"],["mat-header-cell",""],["mat-cell",""],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["matInput","","type","text",3,"formControl"],[3,"matColumnDef",4,"ngFor","ngForOf"],[3,"formGroup"],["type","number","class","full-width",3,"formControlName","schema",4,"ngIf"],["class","full-width",3,"showLabel","schema","formControlName",4,"ngIf"],["type","number",1,"full-width",3,"formControlName","schema"],[1,"full-width",3,"showLabel","schema","formControlName"],["type","button","mat-mini-fab","","color","primary",3,"click"],["size","lg",3,"icon"],["type","button","mat-mini-fab","",1,"remove-btn",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,o){if(1&t&&(e.j41(0,"mat-card"),e.DNE(1,Rn,3,2,"mat-card-header",0),e.j41(2,"table",1),e.DNE(3,jn,3,1,"ng-container",2),e.DNE(4,Xn,1,1,"ng-template",null,3,e.C5r),e.qex(6,4),e.DNE(7,Bn,4,4,"th",5),e.DNE(8,Un,4,7,"td",6),e.bVm(),e.DNE(9,Jn,1,0,"tr",7),e.DNE(10,qn,1,0,"tr",8),e.k0s()()),2&t){const a=e.sdS(5);e.R7$(1),e.Y8G("ngIf","string"!==o.schema.items),e.R7$(1),e.Y8G("dataSource",o.dataSource),e.R7$(1),e.Y8G("ngIf","string"===o.schema.items)("ngIfElse",a),e.R7$(6),e.Y8G("matHeaderRowDef",o.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",o.displayedColumns)}},dependencies:[m.X1,m.me,m.BC,m.cb,m.l_,m.j4,m.JD,_.pM,P.RG,P.rl,P.yw,E.fS,E.fg,b.Hl,b.$0,k.dX,k.aY,Pe,_.bT,C.tP,C.Zl,C.tL,C.ji,C.cC,C.YV,C.iL,C.KS,C.$R,C.YZ,C.NB,re.Hu,re.RN,re.MM,$.uc,$.oV,I.Kj,In.N,V.Ve],styles:[".mat-ripple[_ngcontent-%COMP%]{overflow:hidden;position:relative}.mat-ripple[_ngcontent-%COMP%]:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded[_ngcontent-%COMP%]{overflow:visible}.mat-ripple-element[_ngcontent-%COMP%]{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0)}.cdk-high-contrast-active[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%]{display:none}.cdk-visually-hidden[_ngcontent-%COMP%]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl][_ngcontent-%COMP%] .cdk-visually-hidden[_ngcontent-%COMP%]{left:auto;right:0}.cdk-overlay-container[_ngcontent-%COMP%], .cdk-global-overlay-wrapper[_ngcontent-%COMP%]{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container[_ngcontent-%COMP%]{position:fixed;z-index:1000}.cdk-overlay-container[_ngcontent-%COMP%]:empty{display:none}.cdk-global-overlay-wrapper[_ngcontent-%COMP%]{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop[_ngcontent-%COMP%]{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:1}.cdk-high-contrast-active[_ngcontent-%COMP%] .cdk-overlay-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:.6}.cdk-overlay-dark-backdrop[_ngcontent-%COMP%]{background:rgba(0,0,0,.32)}.cdk-overlay-transparent-backdrop[_ngcontent-%COMP%]{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing[_ngcontent-%COMP%]{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation[_ngcontent-%COMP%]{transition:none}.cdk-overlay-connected-position-bounding-box[_ngcontent-%COMP%]{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock[_ngcontent-%COMP%]{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize[_ngcontent-%COMP%]{resize:none}textarea.cdk-textarea-autosize-measuring[_ngcontent-%COMP%]{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox[_ngcontent-%COMP%]{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes _ngcontent-%COMP%_cdk-text-field-autofill-start{}@keyframes _ngcontent-%COMP%_cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored[_ngcontent-%COMP%]:-webkit-autofill{animation:_ngcontent-%COMP%_cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored[_ngcontent-%COMP%]:not(:-webkit-autofill){animation:_ngcontent-%COMP%_cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator[_ngcontent-%COMP%]{position:relative}.mat-focus-indicator[_ngcontent-%COMP%]:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator[_ngcontent-%COMP%]:focus:before{content:\"\"}.cdk-high-contrast-active[_ngcontent-%COMP%]{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator[_ngcontent-%COMP%]{position:relative}.mat-mdc-focus-indicator[_ngcontent-%COMP%]:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator[_ngcontent-%COMP%]:focus:before{content:\"\"}.cdk-high-contrast-active[_ngcontent-%COMP%]{--mat-mdc-focus-indicator-display: block}@font-face{font-family:Inter;src:url(Inter-VariableFont_slnt,wght.1cccc37b0c8d2802.ttf)}.mat-ripple-element[_ngcontent-%COMP%]{background-color:#0000001a}html[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #0f0761;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-accent[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #dd7345}.mat-warn[_ngcontent-%COMP%]{--mat-option-selected-state-label-text-color: #f44336}html[_ngcontent-%COMP%]{--mat-optgroup-label-text-color: rgba(0, 0, 0, .87)}.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{color:#0000008a}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled[_ngcontent-%COMP%]{color:#b0b0b0}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#0f0761}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#0f0761}.mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-primary[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#dd7345}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#dd7345}.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#dd7345}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#dd7345}.mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-accent[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#f44336}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#f44336}.mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after, .mat-warn[_ngcontent-%COMP%] .mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]:after{color:#fafafa}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after, .mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-minimal[_ngcontent-%COMP%]:after{color:#b0b0b0}.mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-full[_ngcontent-%COMP%], .mat-pseudo-checkbox-disabled.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-full[_ngcontent-%COMP%]{background:#b0b0b0}.mat-app-background[_ngcontent-%COMP%]{background-color:#fafafa;color:#000000de}.mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:0 0 #0003,0 0 #00000024,0 0 #0000001f}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:0 2px 1px -1px #0003,0 1px 1px #00000024,0 1px 3px #0000001f}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:0 3px 1px -2px #0003,0 2px 2px #00000024,0 1px 5px #0000001f}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:0 3px 3px -2px #0003,0 3px 4px #00000024,0 1px 8px #0000001f}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:0 2px 4px -1px #0003,0 4px 5px #00000024,0 1px 10px #0000001f}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 5px 8px #00000024,0 1px 14px #0000001f}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:0 4px 5px -2px #0003,0 7px 10px 1px #00000024,0 2px 16px 1px #0000001f}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:0 5px 6px -3px #0003,0 9px 12px 1px #00000024,0 3px 16px 2px #0000001f}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:0 6px 6px -3px #0003,0 10px 14px 1px #00000024,0 4px 18px 3px #0000001f}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:0 6px 7px -4px #0003,0 11px 15px 1px #00000024,0 4px 20px 3px #0000001f}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:0 7px 8px -4px #0003,0 12px 17px 2px #00000024,0 5px 22px 4px #0000001f}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:0 7px 8px -4px #0003,0 13px 19px 2px #00000024,0 5px 24px 4px #0000001f}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:0 7px 9px -4px #0003,0 14px 21px 2px #00000024,0 5px 26px 4px #0000001f}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:0 8px 9px -5px #0003,0 15px 22px 2px #00000024,0 6px 28px 5px #0000001f}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:0 8px 10px -5px #0003,0 16px 24px 2px #00000024,0 6px 30px 5px #0000001f}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:0 8px 11px -5px #0003,0 17px 26px 2px #00000024,0 6px 32px 5px #0000001f}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:0 9px 11px -5px #0003,0 18px 28px 2px #00000024,0 7px 34px 6px #0000001f}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:0 9px 12px -6px #0003,0 19px 29px 2px #00000024,0 7px 36px 6px #0000001f}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:0 10px 13px -6px #0003,0 20px 31px 3px #00000024,0 8px 38px 7px #0000001f}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:0 10px 13px -6px #0003,0 21px 33px 3px #00000024,0 8px 40px 7px #0000001f}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:0 10px 14px -6px #0003,0 22px 35px 3px #00000024,0 8px 42px 7px #0000001f}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:0 11px 14px -7px #0003,0 23px 36px 3px #00000024,0 9px 44px 8px #0000001f}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.mat-theme-loaded-marker[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-option-label-text-font: Inter;--mat-option-label-text-line-height: 19px;--mat-option-label-text-size: 13px;--mat-option-label-text-tracking: normal;--mat-option-label-text-weight: 400}html[_ngcontent-%COMP%]{--mat-optgroup-label-text-font: Inter;--mat-optgroup-label-text-line-height: 19px;--mat-optgroup-label-text-size: 13px;--mat-optgroup-label-text-tracking: normal;--mat-optgroup-label-text-weight: 400}.mat-mdc-card[_ngcontent-%COMP%]{--mdc-elevated-card-container-color: white;--mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-outlined-card-container-color: white;--mdc-outlined-card-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-card-subtitle-text-color: rgba(0, 0, 0, .54)}.mat-mdc-card[_ngcontent-%COMP%]{--mat-card-title-text-font: Inter;--mat-card-title-text-line-height: 21px;--mat-card-title-text-size: 16px;--mat-card-title-text-tracking: normal;--mat-card-title-text-weight: 600;--mat-card-subtitle-text-font: Inter;--mat-card-subtitle-text-line-height: 19px;--mat-card-subtitle-text-size: 13px;--mat-card-subtitle-text-tracking: normal;--mat-card-subtitle-text-weight: 500}.mat-mdc-progress-bar[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #0f0761;--mdc-linear-progress-track-color: rgba(15, 7, 97, .25)}.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#0f076140;background-color:var(--mdc-linear-progress-track-color, rgba(15, 7, 97, .25))}@media (forced-colors: active){.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(15, 7, 97, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#0f076140;background-color:var(--mdc-linear-progress-track-color, rgba(15, 7, 97, .25))}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #dd7345;--mdc-linear-progress-track-color: rgba(221, 115, 69, .25)}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#dd734540;background-color:var(--mdc-linear-progress-track-color, rgba(221, 115, 69, .25))}@media (forced-colors: active){.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(221, 115, 69, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar.mat-accent[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#dd734540;background-color:var(--mdc-linear-progress-track-color, rgba(221, 115, 69, .25))}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%]{--mdc-linear-progress-active-indicator-color: #f44336;--mdc-linear-progress-track-color: rgba(244, 67, 54, .25)}@keyframes _ngcontent-%COMP%_mdc-linear-progress-buffering{}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:#f4433640;background-color:var(--mdc-linear-progress-track-color, rgba(244, 67, 54, .25))}@media (forced-colors: active){.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:ButtonBorder}}@media all and (-ms-high-contrast: none),(-ms-high-contrast: active){.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-dots[_ngcontent-%COMP%]{background-color:transparent;background-image:url(\"data:image/svg+xml,%3Csvg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' enable-background='new 0 0 5 2' xml:space='preserve' viewBox='0 0 5 2' preserveAspectRatio='none slice'%3E%3Ccircle cx='1' cy='1' r='1' fill='rgba(244, 67, 54, 0.25)'/%3E%3C/svg%3E\")}}.mat-mdc-progress-bar.mat-warn[_ngcontent-%COMP%] .mdc-linear-progress__buffer-bar[_ngcontent-%COMP%]{background-color:#f4433640;background-color:var(--mdc-linear-progress-track-color, rgba(244, 67, 54, .25))}.mat-mdc-tooltip[_ngcontent-%COMP%]{--mdc-plain-tooltip-container-color: #616161;--mdc-plain-tooltip-supporting-text-color: #fff}.mat-mdc-tooltip[_ngcontent-%COMP%]{--mdc-plain-tooltip-supporting-text-font: Inter;--mdc-plain-tooltip-supporting-text-size: 12px;--mdc-plain-tooltip-supporting-text-weight: 400;--mdc-plain-tooltip-supporting-text-tracking: normal}html[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #0f0761;--mdc-filled-text-field-focus-active-indicator-color: #0f0761;--mdc-filled-text-field-focus-label-text-color: rgba(15, 7, 97, .87);--mdc-filled-text-field-container-color: whitesmoke;--mdc-filled-text-field-disabled-container-color: #fafafa;--mdc-filled-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-error-focus-label-text-color: #f44336;--mdc-filled-text-field-error-label-text-color: #f44336;--mdc-filled-text-field-error-caret-color: #f44336;--mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color: #f44336;--mdc-filled-text-field-error-focus-active-indicator-color: #f44336;--mdc-filled-text-field-error-hover-active-indicator-color: #f44336;--mdc-outlined-text-field-caret-color: #0f0761;--mdc-outlined-text-field-focus-outline-color: #0f0761;--mdc-outlined-text-field-focus-label-text-color: rgba(15, 7, 97, .87);--mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-error-caret-color: #f44336;--mdc-outlined-text-field-error-focus-label-text-color: #f44336;--mdc-outlined-text-field-error-label-text-color: #f44336;--mdc-outlined-text-field-outline-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, .06);--mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-error-focus-outline-color: #f44336;--mdc-outlined-text-field-error-hover-outline-color: #f44336;--mdc-outlined-text-field-error-outline-color: #f44336;--mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, .38)}.mat-mdc-form-field-error[_ngcontent-%COMP%]{color:var(--mdc-theme-error, #f44336)}.mat-mdc-form-field-subscript-wrapper[_ngcontent-%COMP%], .mat-mdc-form-field-bottom-align[_ngcontent-%COMP%]:before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{background-color:#000000de}.mat-mdc-form-field[_ngcontent-%COMP%]:hover .mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{opacity:.04}.mat-mdc-form-field.mat-focused[_ngcontent-%COMP%] .mat-mdc-form-field-focus-overlay[_ngcontent-%COMP%]{opacity:.12}.mat-mdc-form-field-type-mat-native-select[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#0000008a}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-primary[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#0f0761de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-accent[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#dd7345de}.mat-mdc-form-field-type-mat-native-select.mat-focused.mat-warn[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#f44336de}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]:after{color:#00000061}.mat-mdc-form-field.mat-accent[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #dd7345;--mdc-filled-text-field-focus-active-indicator-color: #dd7345;--mdc-filled-text-field-focus-label-text-color: rgba(221, 115, 69, .87);--mdc-outlined-text-field-caret-color: #dd7345;--mdc-outlined-text-field-focus-outline-color: #dd7345;--mdc-outlined-text-field-focus-label-text-color: rgba(221, 115, 69, .87)}.mat-mdc-form-field.mat-warn[_ngcontent-%COMP%]{--mdc-filled-text-field-caret-color: #f44336;--mdc-filled-text-field-focus-active-indicator-color: #f44336;--mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mdc-outlined-text-field-caret-color: #f44336;--mdc-outlined-text-field-focus-outline-color: #f44336;--mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, .87)}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field[_ngcontent-%COMP%] .mdc-notched-outline__notch[_ngcontent-%COMP%]{border-left:1px solid transparent}[dir=rtl][_ngcontent-%COMP%] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field[_ngcontent-%COMP%] .mdc-notched-outline__notch[_ngcontent-%COMP%]{border-left:none;border-right:1px solid transparent}.mat-mdc-form-field-infix[_ngcontent-%COMP%]{min-height:48px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%] .mat-mdc-form-field-flex[_ngcontent-%COMP%] .mat-mdc-floating-label[_ngcontent-%COMP%]{top:24px}.mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mdc-notched-outline--upgraded[_ngcontent-%COMP%] .mdc-floating-label--float-above[_ngcontent-%COMP%]{--mat-mdc-form-field-label-transform: translateY( -30.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mdc-text-field--no-label[_ngcontent-%COMP%]:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:12px;padding-bottom:12px}.mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-floating-label[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mdc-filled-text-field-label-text-font: Inter;--mdc-filled-text-field-label-text-size: 13px;--mdc-filled-text-field-label-text-tracking: normal;--mdc-filled-text-field-label-text-weight: 400;--mdc-outlined-text-field-label-text-font: Inter;--mdc-outlined-text-field-label-text-size: 13px;--mdc-outlined-text-field-label-text-tracking: normal;--mdc-outlined-text-field-label-text-weight: 400;--mat-form-field-container-text-font: Inter;--mat-form-field-container-text-line-height: 19px;--mat-form-field-container-text-size: 13px;--mat-form-field-container-text-tracking: normal;--mat-form-field-container-text-weight: 400;--mat-form-field-outlined-label-text-populated-size: 13px;--mat-form-field-subscript-text-font: Inter;--mat-form-field-subscript-text-line-height: 16px;--mat-form-field-subscript-text-size: 12px;--mat-form-field-subscript-text-tracking: normal;--mat-form-field-subscript-text-weight: 400}html[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(15, 7, 97, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html[_ngcontent-%COMP%] .mat-mdc-form-field.mat-accent[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(221, 115, 69, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html[_ngcontent-%COMP%] .mat-mdc-form-field.mat-warn[_ngcontent-%COMP%]{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(244, 67, 54, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}.mat-form-field-appearance-fill[_ngcontent-%COMP%] .mat-mdc-select-arrow-wrapper[_ngcontent-%COMP%]{transform:none}html[_ngcontent-%COMP%]{--mat-select-trigger-text-font: Inter;--mat-select-trigger-text-line-height: 19px;--mat-select-trigger-text-size: 13px;--mat-select-trigger-text-tracking: normal;--mat-select-trigger-text-weight: 400}html[_ngcontent-%COMP%]{--mat-autocomplete-background-color: white}.mat-mdc-dialog-container[_ngcontent-%COMP%]{--mdc-dialog-container-color: white;--mdc-dialog-subhead-color: rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color: rgba(0, 0, 0, .6)}.mat-mdc-dialog-container[_ngcontent-%COMP%]{--mdc-dialog-subhead-font: Inter;--mdc-dialog-subhead-line-height: 21px;--mdc-dialog-subhead-size: 16px;--mdc-dialog-subhead-weight: 600;--mdc-dialog-subhead-tracking: normal;--mdc-dialog-supporting-text-font: Inter;--mdc-dialog-supporting-text-line-height: 19px;--mdc-dialog-supporting-text-size: 13px;--mdc-dialog-supporting-text-weight: 400;--mdc-dialog-supporting-text-tracking: normal}.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: #212121;--mdc-chip-elevated-container-color: #e0e0e0;--mdc-chip-elevated-disabled-container-color: #e0e0e0;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: #212121;--mdc-chip-with-icon-icon-color: #212121;--mdc-chip-with-icon-disabled-icon-color: #212121;--mdc-chip-with-icon-selected-icon-color: #212121;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: #212121;--mdc-chip-with-trailing-icon-trailing-icon-color: #212121}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-primary[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-primary[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #0f0761;--mdc-chip-elevated-disabled-container-color: #0f0761;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-accent[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-accent[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #dd7345;--mdc-chip-elevated-disabled-container-color: #dd7345;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-standard-chip.mat-mdc-chip-selected.mat-warn[_ngcontent-%COMP%], .mat-mdc-standard-chip.mat-mdc-chip-highlighted.mat-warn[_ngcontent-%COMP%]{--mdc-chip-disabled-label-text-color: white;--mdc-chip-elevated-container-color: #f44336;--mdc-chip-elevated-disabled-container-color: #f44336;--mdc-chip-focus-state-layer-color: black;--mdc-chip-focus-state-layer-opacity: .12;--mdc-chip-label-text-color: white;--mdc-chip-with-icon-icon-color: white;--mdc-chip-with-icon-disabled-icon-color: white;--mdc-chip-with-icon-selected-icon-color: white;--mdc-chip-with-trailing-icon-disabled-trailing-icon-color: white;--mdc-chip-with-trailing-icon-trailing-icon-color: white}.mat-mdc-chip.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-container-height: 24px}.mat-mdc-standard-chip[_ngcontent-%COMP%]{--mdc-chip-label-text-font: Inter;--mdc-chip-label-text-line-height: 19px;--mdc-chip-label-text-size: 13px;--mdc-chip-label-text-tracking: normal;--mdc-chip-label-text-weight: 400}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #5c5699;--mdc-switch-selected-handle-color: #5c5699;--mdc-switch-selected-hover-state-layer-color: #5c5699;--mdc-switch-selected-pressed-state-layer-color: #5c5699;--mdc-switch-selected-focus-handle-color: #0f0761;--mdc-switch-selected-hover-handle-color: #0f0761;--mdc-switch-selected-pressed-handle-color: #0f0761;--mdc-switch-selected-focus-track-color: #aaa8ca;--mdc-switch-selected-hover-track-color: #aaa8ca;--mdc-switch-selected-pressed-track-color: #aaa8ca;--mdc-switch-selected-track-color: #aaa8ca;--mdc-switch-disabled-selected-handle-color: #424242;--mdc-switch-disabled-selected-icon-color: #fff;--mdc-switch-disabled-selected-track-color: #424242;--mdc-switch-disabled-unselected-handle-color: #424242;--mdc-switch-disabled-unselected-icon-color: #fff;--mdc-switch-disabled-unselected-track-color: #424242;--mdc-switch-handle-surface-color: var(--mdc-theme-surface, #fff);--mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-switch-handle-shadow-color: black;--mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-switch-selected-icon-color: #fff;--mdc-switch-unselected-focus-handle-color: #212121;--mdc-switch-unselected-focus-state-layer-color: #424242;--mdc-switch-unselected-focus-track-color: #e0e0e0;--mdc-switch-unselected-handle-color: #616161;--mdc-switch-unselected-hover-handle-color: #212121;--mdc-switch-unselected-hover-state-layer-color: #424242;--mdc-switch-unselected-hover-track-color: #e0e0e0;--mdc-switch-unselected-icon-color: #fff;--mdc-switch-unselected-pressed-handle-color: #212121;--mdc-switch-unselected-pressed-state-layer-color: #424242;--mdc-switch-unselected-pressed-track-color: #e0e0e0;--mdc-switch-unselected-track-color: #e0e0e0}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-switch--disabled[_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{color:#00000061}.mat-mdc-slide-toggle.mat-accent[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #914b2d;--mdc-switch-selected-handle-color: #914b2d;--mdc-switch-selected-hover-state-layer-color: #914b2d;--mdc-switch-selected-pressed-state-layer-color: #914b2d;--mdc-switch-selected-focus-handle-color: #2b160d;--mdc-switch-selected-hover-handle-color: #2b160d;--mdc-switch-selected-pressed-handle-color: #2b160d;--mdc-switch-selected-focus-track-color: #ff8c5a;--mdc-switch-selected-hover-track-color: #ff8c5a;--mdc-switch-selected-pressed-track-color: #ff8c5a;--mdc-switch-selected-track-color: #ff8c5a}.mat-mdc-slide-toggle.mat-warn[_ngcontent-%COMP%]{--mdc-switch-selected-focus-state-layer-color: #e53935;--mdc-switch-selected-handle-color: #e53935;--mdc-switch-selected-hover-state-layer-color: #e53935;--mdc-switch-selected-pressed-state-layer-color: #e53935;--mdc-switch-selected-focus-handle-color: #b71c1c;--mdc-switch-selected-hover-handle-color: #b71c1c;--mdc-switch-selected-pressed-handle-color: #b71c1c;--mdc-switch-selected-focus-track-color: #e57373;--mdc-switch-selected-hover-track-color: #e57373;--mdc-switch-selected-pressed-track-color: #e57373;--mdc-switch-selected-track-color: #e57373}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mdc-switch-state-layer-size: 40px}.mat-mdc-slide-toggle[_ngcontent-%COMP%]{--mat-slide-toggle-label-text-font: Inter;--mat-slide-toggle-label-text-size: 13px;--mat-slide-toggle-label-text-tracking: normal;--mat-slide-toggle-label-text-line-height: 19px;--mat-slide-toggle-label-text-weight: 400}.mat-mdc-slide-toggle[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform, inherit)}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-radio-button.mat-primary[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0f0761;--mdc-radio-selected-hover-icon-color: #0f0761;--mdc-radio-selected-icon-color: #0f0761;--mdc-radio-selected-pressed-icon-color: #0f0761;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #0f0761;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-accent[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #dd7345;--mdc-radio-selected-hover-icon-color: #dd7345;--mdc-radio-selected-icon-color: #dd7345;--mdc-radio-selected-pressed-icon-color: #dd7345;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #dd7345;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button.mat-warn[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336;--mat-radio-ripple-color: #000;--mat-radio-checked-ripple-color: #f44336;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38)}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-radio[_ngcontent-%COMP%]{--mdc-radio-state-layer-size: 32px}.mat-mdc-radio-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-radio-button[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-body2-font-size, 13px);line-height:var(--mdc-typography-body2-line-height, 19px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-slider[_ngcontent-%COMP%]{--mdc-slider-label-container-color: black;--mdc-slider-label-label-text-color: white;--mdc-slider-disabled-handle-color: #000;--mdc-slider-disabled-active-track-color: #000;--mdc-slider-disabled-inactive-track-color: #000;--mdc-slider-with-tick-marks-disabled-container-color: #000;--mat-mdc-slider-value-indicator-opacity: .6}.mat-mdc-slider.mat-primary[_ngcontent-%COMP%]{--mdc-slider-handle-color: #0f0761;--mdc-slider-focus-handle-color: #0f0761;--mdc-slider-hover-handle-color: #0f0761;--mdc-slider-active-track-color: #0f0761;--mdc-slider-inactive-track-color: #0f0761;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #0f0761;--mat-mdc-slider-ripple-color: #0f0761;--mat-mdc-slider-hover-ripple-color: rgba(15, 7, 97, .05);--mat-mdc-slider-focus-ripple-color: rgba(15, 7, 97, .2)}.mat-mdc-slider.mat-accent[_ngcontent-%COMP%]{--mdc-slider-handle-color: #dd7345;--mdc-slider-focus-handle-color: #dd7345;--mdc-slider-hover-handle-color: #dd7345;--mdc-slider-active-track-color: #dd7345;--mdc-slider-inactive-track-color: #dd7345;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #dd7345;--mat-mdc-slider-ripple-color: #dd7345;--mat-mdc-slider-hover-ripple-color: rgba(221, 115, 69, .05);--mat-mdc-slider-focus-ripple-color: rgba(221, 115, 69, .2)}.mat-mdc-slider.mat-warn[_ngcontent-%COMP%]{--mdc-slider-handle-color: #f44336;--mdc-slider-focus-handle-color: #f44336;--mdc-slider-hover-handle-color: #f44336;--mdc-slider-active-track-color: #f44336;--mdc-slider-inactive-track-color: #f44336;--mdc-slider-with-tick-marks-active-container-color: #fff;--mdc-slider-with-tick-marks-inactive-container-color: #f44336;--mat-mdc-slider-ripple-color: #f44336;--mat-mdc-slider-hover-ripple-color: rgba(244, 67, 54, .05);--mat-mdc-slider-focus-ripple-color: rgba(244, 67, 54, .2)}.mat-mdc-slider[_ngcontent-%COMP%]{--mdc-slider-label-label-text-font: Inter;--mdc-slider-label-label-text-size: 13px;--mdc-slider-label-label-text-line-height: 19px;--mdc-slider-label-label-text-tracking: normal;--mdc-slider-label-label-text-weight: 500}html[_ngcontent-%COMP%]{--mat-menu-item-label-text-color: rgba(0, 0, 0, .87);--mat-menu-item-icon-color: rgba(0, 0, 0, .87);--mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-container-color: white}html[_ngcontent-%COMP%]{--mat-menu-item-label-text-font: Inter;--mat-menu-item-label-text-size: 13px;--mat-menu-item-label-text-tracking: normal;--mat-menu-item-label-text-line-height: 19px;--mat-menu-item-label-text-weight: 400}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color: black;--mdc-list-list-item-disabled-leading-icon-color: black;--mdc-list-list-item-disabled-trailing-icon-color: black;--mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color: black;--mdc-list-list-item-hover-state-layer-opacity: .04;--mdc-list-list-item-focus-state-layer-color: black;--mdc-list-list-item-focus-state-layer-opacity: .12}.mdc-list-item__start[_ngcontent-%COMP%], .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #0f0761;--mdc-radio-selected-hover-icon-color: #0f0761;--mdc-radio-selected-icon-color: #0f0761;--mdc-radio-selected-pressed-icon-color: #0f0761}.mat-accent[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-accent[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #dd7345;--mdc-radio-selected-hover-icon-color: #dd7345;--mdc-radio-selected-icon-color: #dd7345;--mdc-radio-selected-pressed-icon-color: #dd7345}.mat-warn[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-warn[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{--mdc-radio-disabled-selected-icon-color: #000;--mdc-radio-disabled-unselected-icon-color: #000;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-list-option[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #0f0761;--mdc-checkbox-selected-hover-icon-color: #0f0761;--mdc-checkbox-selected-icon-color: #0f0761;--mdc-checkbox-selected-pressed-icon-color: #0f0761;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0f0761;--mdc-checkbox-selected-hover-state-layer-color: #0f0761;--mdc-checkbox-selected-pressed-state-layer-color: #0f0761;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-accent[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #dd7345;--mdc-checkbox-selected-hover-icon-color: #dd7345;--mdc-checkbox-selected-icon-color: #dd7345;--mdc-checkbox-selected-pressed-icon-color: #dd7345;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #dd7345;--mdc-checkbox-selected-hover-state-layer-color: #dd7345;--mdc-checkbox-selected-pressed-state-layer-color: #dd7345;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-warn[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--selected[_ngcontent-%COMP%] .mdc-list-item__primary-text[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--activated[_ngcontent-%COMP%] .mdc-list-item__primary-text[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--selected.mdc-list-item--with-leading-icon[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-mdc-list-base.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--activated.mdc-list-item--with-leading-icon[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%]{color:#0f0761}.mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__start[_ngcontent-%COMP%], .mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__content[_ngcontent-%COMP%], .mat-mdc-list-base[_ngcontent-%COMP%] .mdc-list-item--disabled[_ngcontent-%COMP%] .mdc-list-item__end[_ngcontent-%COMP%]{opacity:1}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-one-line-container-height: 40px;--mdc-list-list-item-two-line-container-height: 56px;--mdc-list-list-item-three-line-container-height: 80px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line[_ngcontent-%COMP%]{height:48px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines[_ngcontent-%COMP%], .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines[_ngcontent-%COMP%]{height:64px}.mat-mdc-list-base[_ngcontent-%COMP%]{--mdc-list-list-item-label-text-font: Inter;--mdc-list-list-item-label-text-line-height: 19px;--mdc-list-list-item-label-text-size: 13px;--mdc-list-list-item-label-text-tracking: normal;--mdc-list-list-item-label-text-weight: 400;--mdc-list-list-item-supporting-text-font: Inter;--mdc-list-list-item-supporting-text-line-height: 19px;--mdc-list-list-item-supporting-text-size: 13px;--mdc-list-list-item-supporting-text-tracking: normal;--mdc-list-list-item-supporting-text-weight: 400;--mdc-list-list-item-trailing-supporting-text-font: Inter;--mdc-list-list-item-trailing-supporting-text-line-height: 16px;--mdc-list-list-item-trailing-supporting-text-size: 12px;--mdc-list-list-item-trailing-supporting-text-tracking: normal;--mdc-list-list-item-trailing-supporting-text-weight: 400}.mdc-list-group__subheader[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:22px;font-family:Inter;letter-spacing:normal}html[_ngcontent-%COMP%]{--mat-paginator-container-text-color: rgba(0, 0, 0, .87);--mat-paginator-container-background-color: white;--mat-paginator-enabled-icon-color: rgba(0, 0, 0, .54);--mat-paginator-disabled-icon-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-paginator-container-size: 48px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{min-height:40px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%] .mat-mdc-form-field-flex[_ngcontent-%COMP%] .mat-mdc-floating-label[_ngcontent-%COMP%]{top:20px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mdc-notched-outline--upgraded[_ngcontent-%COMP%] .mdc-floating-label--float-above[_ngcontent-%COMP%]{--mat-mdc-form-field-label-transform: translateY( -26.75px) scale(var(--mat-mdc-form-field-floating-label-scale, .75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper.mdc-text-field--outlined[_ngcontent-%COMP%] .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mdc-text-field--no-label[_ngcontent-%COMP%]:not(.mdc-text-field--outlined):not(.mdc-text-field--textarea) .mat-mdc-form-field-infix[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.mat-mdc-paginator[_ngcontent-%COMP%] .mat-mdc-text-field-wrapper[_ngcontent-%COMP%]:not(.mdc-text-field--outlined) .mat-mdc-floating-label[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-paginator-container-text-font: Inter;--mat-paginator-container-text-line-height: 16px;--mat-paginator-container-text-size: 12px;--mat-paginator-container-text-tracking: normal;--mat-paginator-container-text-weight: 400;--mat-paginator-select-trigger-text-size: 12px}.mat-mdc-tab-group[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #0f0761;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #0f0761;--mat-tab-header-active-ripple-color: #0f0761;--mat-tab-header-inactive-ripple-color: #0f0761;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #0f0761;--mat-tab-header-active-hover-label-text-color: #0f0761;--mat-tab-header-active-focus-indicator-color: #0f0761;--mat-tab-header-active-hover-indicator-color: #0f0761}.mat-mdc-tab-group.mat-accent[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-accent[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #dd7345;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #dd7345;--mat-tab-header-active-ripple-color: #dd7345;--mat-tab-header-inactive-ripple-color: #dd7345;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #dd7345;--mat-tab-header-active-hover-label-text-color: #dd7345;--mat-tab-header-active-focus-indicator-color: #dd7345;--mat-tab-header-active-hover-indicator-color: #dd7345}.mat-mdc-tab-group.mat-warn[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-warn[_ngcontent-%COMP%]{--mdc-tab-indicator-active-indicator-color: #f44336;--mat-tab-header-disabled-ripple-color: rgba(0, 0, 0, .38);--mat-tab-header-pagination-icon-color: #000;--mat-tab-header-inactive-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-label-text-color: #f44336;--mat-tab-header-active-ripple-color: #f44336;--mat-tab-header-inactive-ripple-color: #f44336;--mat-tab-header-inactive-focus-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-inactive-hover-label-text-color: rgba(0, 0, 0, .6);--mat-tab-header-active-focus-label-text-color: #f44336;--mat-tab-header-active-hover-label-text-color: #f44336;--mat-tab-header-active-focus-indicator-color: #f44336;--mat-tab-header-active-hover-indicator-color: #f44336}.mat-mdc-tab-group.mat-background-primary[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-primary[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #0f0761;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-accent[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-accent[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #dd7345;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-group.mat-background-warn[_ngcontent-%COMP%], .mat-mdc-tab-nav-bar.mat-background-warn[_ngcontent-%COMP%]{--mat-tab-header-with-background-background-color: #f44336;--mat-tab-header-with-background-foreground-color: white}.mat-mdc-tab-header[_ngcontent-%COMP%]{--mdc-secondary-navigation-tab-container-height: 40px}.mat-mdc-tab-header[_ngcontent-%COMP%]{--mat-tab-header-label-text-font: Inter;--mat-tab-header-label-text-size: 13px;--mat-tab-header-label-text-tracking: normal;--mat-tab-header-label-text-line-height: 19px;--mat-tab-header-label-text-weight: 500}html[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #dd7345;--mdc-checkbox-selected-hover-icon-color: #dd7345;--mdc-checkbox-selected-icon-color: #dd7345;--mdc-checkbox-selected-pressed-icon-color: #dd7345;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #dd7345;--mdc-checkbox-selected-hover-state-layer-color: #dd7345;--mdc-checkbox-selected-pressed-state-layer-color: #dd7345;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-primary[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #0f0761;--mdc-checkbox-selected-hover-icon-color: #0f0761;--mdc-checkbox-selected-icon-color: #0f0761;--mdc-checkbox-selected-pressed-icon-color: #0f0761;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #0f0761;--mdc-checkbox-selected-hover-state-layer-color: #0f0761;--mdc-checkbox-selected-pressed-state-layer-color: #0f0761;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-warn[_ngcontent-%COMP%]{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, .87))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{color:#00000061}html[_ngcontent-%COMP%]{--mdc-checkbox-state-layer-size: 32px}.mat-mdc-checkbox-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-checkbox[_ngcontent-%COMP%] .mdc-form-field[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-body2-font-size, 13px);line-height:var(--mdc-typography-body2-line-height, 19px);font-weight:var(--mdc-typography-body2-font-weight, 400);letter-spacing:var(--mdc-typography-body2-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-decoration:var(--mdc-typography-body2-text-decoration, inherit);text-transform:var(--mdc-typography-body2-text-transform, none)}.mat-mdc-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #000}.mat-mdc-button.mat-primary[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #0f0761}.mat-mdc-button.mat-accent[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #dd7345}.mat-mdc-button.mat-warn[_ngcontent-%COMP%]{--mdc-text-button-label-text-color: #f44336}.mat-mdc-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-text-button-label-text-color: rgba(0, 0, 0, .38)}.mat-mdc-unelevated-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #fff;--mdc-filled-button-label-text-color: #000}.mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #0f0761;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button.mat-accent[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #dd7345;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button.mat-warn[_ngcontent-%COMP%]{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: #fff}.mat-mdc-unelevated-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-filled-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-button-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-label-text-color: rgba(0, 0, 0, .38)}.mat-mdc-raised-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #fff;--mdc-protected-button-label-text-color: #000}.mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #0f0761;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button.mat-accent[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #dd7345;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button.mat-warn[_ngcontent-%COMP%]{--mdc-protected-button-container-color: #f44336;--mdc-protected-button-label-text-color: #fff}.mat-mdc-raised-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-protected-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-label-text-color: rgba(0, 0, 0, .38);--mdc-protected-button-container-elevation: 0}.mat-mdc-outlined-button[_ngcontent-%COMP%]{--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-outlined-button.mat-unthemed[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #000}.mat-mdc-outlined-button.mat-primary[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #0f0761}.mat-mdc-outlined-button.mat-accent[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #dd7345}.mat-mdc-outlined-button.mat-warn[_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: #f44336}.mat-mdc-outlined-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-outlined-button-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-button[_ngcontent-%COMP%], .mat-mdc-outlined-button[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-outlined-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-primary[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #0f0761;--mat-mdc-button-ripple-color: rgba(15, 7, 97, .1)}.mat-mdc-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-accent[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #dd7345;--mat-mdc-button-ripple-color: rgba(221, 115, 69, .1)}.mat-mdc-button.mat-warn[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-raised-button[_ngcontent-%COMP%], .mat-mdc-unelevated-button[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-raised-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-raised-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-raised-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-raised-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-unelevated-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-accent[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-warn[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%]{height:28px;margin-top:0;margin-bottom:0}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%] .mdc-button__touch[_ngcontent-%COMP%]{height:100%}.mat-mdc-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-unelevated-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%], .mat-mdc-outlined-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}.mdc-button[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-button-font-size, 13px);line-height:var(--mdc-typography-button-line-height, 19px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-icon-button[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: inherit;--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-icon-button[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-icon-button.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-icon-button.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-icon-button[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-icon-button.mat-primary[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #6200ee;--mat-mdc-button-ripple-color: rgba(98, 0, 238, .1)}.mat-mdc-icon-button.mat-accent[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #018786;--mat-mdc-button-ripple-color: rgba(1, 135, 134, .1)}.mat-mdc-icon-button.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #b00020;--mat-mdc-button-ripple-color: rgba(176, 0, 32, .1)}.mat-mdc-icon-button.mat-primary[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #0f0761;--mat-mdc-button-persistent-ripple-color: #0f0761;--mat-mdc-button-ripple-color: rgba(15, 7, 97, .1)}.mat-mdc-icon-button.mat-accent[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #dd7345;--mat-mdc-button-persistent-ripple-color: #dd7345;--mat-mdc-button-ripple-color: rgba(221, 115, 69, .1)}.mat-mdc-icon-button.mat-warn[_ngcontent-%COMP%]{--mdc-icon-button-icon-color: #f44336;--mat-mdc-button-persistent-ripple-color: #f44336;--mat-mdc-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-icon-button[disabled][disabled][_ngcontent-%COMP%]{--mdc-icon-button-icon-color: rgba(0, 0, 0, .38);--mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, .38)}.mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%]{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}.mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}.mat-mdc-fab[_ngcontent-%COMP%], .mat-mdc-mini-fab[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #000;--mat-mdc-button-ripple-color: rgba(0, 0, 0, .1)}.mat-mdc-fab[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab[_ngcontent-%COMP%]:hover .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.04}.mat-mdc-fab.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-fab.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab.cdk-program-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab.cdk-keyboard-focused[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-fab[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before, .mat-mdc-mini-fab[_ngcontent-%COMP%]:active .mat-mdc-button-persistent-ripple[_ngcontent-%COMP%]:before{opacity:.12}.mat-mdc-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-fab.mat-warn[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-warn[_ngcontent-%COMP%]{--mat-mdc-button-persistent-ripple-color: #fff;--mat-mdc-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-fab[disabled][disabled][_ngcontent-%COMP%], .mat-mdc-mini-fab[disabled][disabled][_ngcontent-%COMP%]{--mdc-fab-container-color: rgba(0, 0, 0, .12);--mdc-fab-icon-color: rgba(0, 0, 0, .38);--mat-mdc-fab-color: rgba(0, 0, 0, .38)}.mat-mdc-fab.mat-unthemed[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-unthemed[_ngcontent-%COMP%]{--mdc-fab-container-color: white;--mdc-fab-icon-color: black;--mat-mdc-fab-color: #000}.mat-mdc-fab.mat-primary[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-primary[_ngcontent-%COMP%]{--mdc-fab-container-color: #0f0761;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-accent[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-accent[_ngcontent-%COMP%]{--mdc-fab-container-color: #dd7345;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mat-mdc-fab.mat-warn[_ngcontent-%COMP%], .mat-mdc-mini-fab.mat-warn[_ngcontent-%COMP%]{--mdc-fab-container-color: #f44336;--mdc-fab-icon-color: white;--mat-mdc-fab-color: #fff}.mdc-fab--extended[_ngcontent-%COMP%]{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Inter));font-size:var(--mdc-typography-button-font-size, 13px);line-height:var(--mdc-typography-button-line-height, 19px);font-weight:var(--mdc-typography-button-font-weight, 500);letter-spacing:var(--mdc-typography-button-letter-spacing, normal);-webkit-text-decoration:var(--mdc-typography-button-text-decoration, none);text-decoration:var(--mdc-typography-button-text-decoration, none);text-transform:var(--mdc-typography-button-text-transform, none)}.mat-mdc-extended-fab[_ngcontent-%COMP%]{--mdc-extended-fab-label-text-font: Inter;--mdc-extended-fab-label-text-size: 13px;--mdc-extended-fab-label-text-tracking: normal;--mdc-extended-fab-label-text-weight: 500}.mat-mdc-snack-bar-container[_ngcontent-%COMP%]{--mdc-snackbar-container-color: #333333;--mdc-snackbar-supporting-text-color: rgba(255, 255, 255, .87);--mat-snack-bar-button-color: #dd7345}.mat-mdc-snack-bar-container[_ngcontent-%COMP%]{--mdc-snackbar-supporting-text-font: Inter;--mdc-snackbar-supporting-text-line-height: 19px;--mdc-snackbar-supporting-text-size: 13px;--mdc-snackbar-supporting-text-weight: 400}html[_ngcontent-%COMP%]{--mat-table-background-color: white;--mat-table-header-headline-color: rgba(0, 0, 0, .87);--mat-table-row-item-label-text-color: rgba(0, 0, 0, .87);--mat-table-row-item-outline-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-table-header-container-height: 48px;--mat-table-footer-container-height: 44px;--mat-table-row-item-container-height: 44px}html[_ngcontent-%COMP%]{--mat-table-header-headline-font: Inter;--mat-table-header-headline-line-height: 19px;--mat-table-header-headline-size: 13px;--mat-table-header-headline-weight: 500;--mat-table-header-headline-tracking: normal;--mat-table-row-item-label-text-font: Inter;--mat-table-row-item-label-text-line-height: 19px;--mat-table-row-item-label-text-size: 13px;--mat-table-row-item-label-text-weight: 400;--mat-table-row-item-label-text-tracking: normal;--mat-table-footer-supporting-text-font: Inter;--mat-table-footer-supporting-text-line-height: 19px;--mat-table-footer-supporting-text-size: 13px;--mat-table-footer-supporting-text-weight: 400;--mat-table-footer-supporting-text-tracking: normal}.mat-mdc-progress-spinner[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #0f0761}.mat-mdc-progress-spinner.mat-accent[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #dd7345}.mat-mdc-progress-spinner.mat-warn[_ngcontent-%COMP%]{--mdc-circular-progress-active-indicator-color: #f44336}.mat-badge[_ngcontent-%COMP%]{position:relative}.mat-badge.mat-badge[_ngcontent-%COMP%]{overflow:visible}.mat-badge-content[_ngcontent-%COMP%]{position:absolute;text-align:center;display:inline-block;border-radius:50%;transition:transform .2s ease-in-out;transform:scale(.6);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;pointer-events:none;background-color:var(--mat-badge-background-color);color:var(--mat-badge-text-color);font-family:Roboto,sans-serif;font-family:var(--mat-badge-text-font, Roboto, sans-serif);font-size:12px;font-size:var(--mat-badge-text-size, 12px);font-weight:600;font-weight:var(--mat-badge-text-weight, 600)}.cdk-high-contrast-active[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{outline:solid 1px;border-radius:0}.mat-badge-disabled[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{background-color:var(--mat-badge-disabled-state-background-color);color:var(--mat-badge-disabled-state-text-color)}.mat-badge-hidden[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{display:none}.ng-animate-disabled[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%], .mat-badge-content._mat-animation-noopable[_ngcontent-%COMP%]{transition:none}.mat-badge-content.mat-badge-active[_ngcontent-%COMP%]{transform:none}.mat-badge-small[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:16px;height:16px;line-height:16px;font-size:9px;font-size:var(--mat-badge-small-size-text-size, 9px)}.mat-badge-small.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-8px}.mat-badge-small.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-8px}.mat-badge-small.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-16px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-16px}.mat-badge-small.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-16px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-16px}.mat-badge-small.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-8px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-8px}.mat-badge-small.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-8px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-small.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-8px}.mat-badge-medium[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:22px;height:22px;line-height:22px}.mat-badge-medium.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-11px}.mat-badge-medium.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-11px}.mat-badge-medium.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-22px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-22px}.mat-badge-medium.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-22px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-22px}.mat-badge-medium.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-11px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-11px}.mat-badge-medium.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-11px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-medium.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-11px}.mat-badge-large[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{width:28px;height:28px;line-height:28px;font-size:24px;font-size:var(--mat-badge-large-size-text-size, 24px)}.mat-badge-large.mat-badge-above[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{top:-14px}.mat-badge-large.mat-badge-below[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{bottom:-14px}.mat-badge-large.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-28px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-28px}.mat-badge-large.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-28px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-28px}.mat-badge-large.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:-14px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-overlap.mat-badge-before[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{left:auto;right:-14px}.mat-badge-large.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:-14px}[dir=rtl][_ngcontent-%COMP%] .mat-badge-large.mat-badge-overlap.mat-badge-after[_ngcontent-%COMP%] .mat-badge-content[_ngcontent-%COMP%]{right:auto;left:-14px}html[_ngcontent-%COMP%]{--mat-badge-background-color: #0f0761;--mat-badge-text-color: white;--mat-badge-disabled-state-background-color: #b9b9b9;--mat-badge-disabled-state-text-color: rgba(0, 0, 0, .38)}.mat-badge-accent[_ngcontent-%COMP%]{--mat-badge-background-color: #dd7345;--mat-badge-text-color: white}.mat-badge-warn[_ngcontent-%COMP%]{--mat-badge-background-color: #f44336;--mat-badge-text-color: white}html[_ngcontent-%COMP%]{--mat-badge-text-font: Inter;--mat-badge-text-size: 12px;--mat-badge-text-weight: 600;--mat-badge-small-size-text-size: 9px;--mat-badge-large-size-text-size: 24px}html[_ngcontent-%COMP%]{--mat-bottom-sheet-container-text-color: rgba(0, 0, 0, .87);--mat-bottom-sheet-container-background-color: white}html[_ngcontent-%COMP%]{--mat-bottom-sheet-container-text-font: Inter;--mat-bottom-sheet-container-text-line-height: 19px;--mat-bottom-sheet-container-text-size: 13px;--mat-bottom-sheet-container-text-tracking: normal;--mat-bottom-sheet-container-text-weight: 400}html[_ngcontent-%COMP%]{--mat-legacy-button-toggle-text-color: rgba(0, 0, 0, .38);--mat-legacy-button-toggle-state-layer-color: rgba(0, 0, 0, .12);--mat-legacy-button-toggle-selected-state-text-color: rgba(0, 0, 0, .54);--mat-legacy-button-toggle-selected-state-background-color: #e0e0e0;--mat-legacy-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-legacy-button-toggle-disabled-state-background-color: #eeeeee;--mat-legacy-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-background-color: white;--mat-standard-button-toggle-state-layer-color: black;--mat-standard-button-toggle-selected-state-background-color: #e0e0e0;--mat-standard-button-toggle-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-standard-button-toggle-disabled-state-background-color: white;--mat-standard-button-toggle-disabled-selected-state-text-color: rgba(0, 0, 0, .87);--mat-standard-button-toggle-disabled-selected-state-background-color: #bdbdbd;--mat-standard-button-toggle-divider-color: #e0e0e0}html[_ngcontent-%COMP%]{--mat-standard-button-toggle-height: 40px}html[_ngcontent-%COMP%]{--mat-legacy-button-toggle-text-font: Inter;--mat-standard-button-toggle-text-font: Inter}html[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #0f0761;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(15, 7, 97, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(15, 7, 97, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(15, 7, 97, .3);--mat-datepicker-toggle-active-state-icon-color: #0f0761;--mat-datepicker-calendar-date-in-range-state-background-color: rgba(15, 7, 97, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e;--mat-datepicker-toggle-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-body-label-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-period-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-navigation-button-icon-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-header-divider-color: rgba(0, 0, 0, .12);--mat-datepicker-calendar-header-text-color: rgba(0, 0, 0, .54);--mat-datepicker-calendar-date-today-outline-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-today-disabled-state-outline-color: rgba(0, 0, 0, .18);--mat-datepicker-calendar-date-text-color: rgba(0, 0, 0, .87);--mat-datepicker-calendar-date-outline-color: transparent;--mat-datepicker-calendar-date-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-date-preview-state-outline-color: rgba(0, 0, 0, .24);--mat-datepicker-range-input-separator-color: rgba(0, 0, 0, .87);--mat-datepicker-range-input-disabled-state-separator-color: rgba(0, 0, 0, .38);--mat-datepicker-range-input-disabled-state-text-color: rgba(0, 0, 0, .38);--mat-datepicker-calendar-container-background-color: white;--mat-datepicker-calendar-container-text-color: rgba(0, 0, 0, .87)}.mat-datepicker-content.mat-accent[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #dd7345;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(221, 115, 69, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(221, 115, 69, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(221, 115, 69, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(221, 115, 69, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-content.mat-warn[_ngcontent-%COMP%]{--mat-datepicker-calendar-date-selected-state-text-color: white;--mat-datepicker-calendar-date-selected-state-background-color: #f44336;--mat-datepicker-calendar-date-selected-disabled-state-background-color: rgba(244, 67, 54, .4);--mat-datepicker-calendar-date-today-selected-state-outline-color: white;--mat-datepicker-calendar-date-focus-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-hover-state-background-color: rgba(244, 67, 54, .3);--mat-datepicker-calendar-date-in-range-state-background-color: rgba(244, 67, 54, .2);--mat-datepicker-calendar-date-in-comparison-range-state-background-color: rgba(249, 171, 0, .2);--mat-datepicker-calendar-date-in-overlap-range-state-background-color: #a8dab5;--mat-datepicker-calendar-date-in-overlap-range-selected-state-background-color: #46a35e}.mat-datepicker-toggle-active.mat-accent[_ngcontent-%COMP%]{--mat-datepicker-toggle-active-state-icon-color: #dd7345}.mat-datepicker-toggle-active.mat-warn[_ngcontent-%COMP%]{--mat-datepicker-toggle-active-state-icon-color: #f44336}.mat-calendar-controls[_ngcontent-%COMP%] .mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%]{--mdc-icon-button-state-layer-size: 40px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:8px}.mat-calendar-controls[_ngcontent-%COMP%] .mat-mdc-icon-button.mat-mdc-button-base[_ngcontent-%COMP%] .mat-mdc-button-touch-target[_ngcontent-%COMP%]{display:none}html[_ngcontent-%COMP%]{--mat-datepicker-calendar-text-font: Inter;--mat-datepicker-calendar-text-size: 13px;--mat-datepicker-calendar-body-label-text-size: 13px;--mat-datepicker-calendar-body-label-text-weight: 500;--mat-datepicker-calendar-period-button-text-size: 13px;--mat-datepicker-calendar-period-button-text-weight: 500;--mat-datepicker-calendar-header-text-size: 11px;--mat-datepicker-calendar-header-text-weight: 400}html[_ngcontent-%COMP%]{--mat-divider-color: rgba(0, 0, 0, .12)}html[_ngcontent-%COMP%]{--mat-expansion-container-background-color: white;--mat-expansion-container-text-color: rgba(0, 0, 0, .87);--mat-expansion-actions-divider-color: rgba(0, 0, 0, .12);--mat-expansion-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-expansion-header-disabled-state-text-color: rgba(0, 0, 0, .26);--mat-expansion-header-text-color: rgba(0, 0, 0, .87);--mat-expansion-header-description-color: rgba(0, 0, 0, .54);--mat-expansion-header-indicator-color: rgba(0, 0, 0, .54)}html[_ngcontent-%COMP%]{--mat-expansion-header-collapsed-state-height: 40px;--mat-expansion-header-expanded-state-height: 56px}html[_ngcontent-%COMP%]{--mat-expansion-header-text-font: Inter;--mat-expansion-header-text-size: 13px;--mat-expansion-header-text-weight: 500;--mat-expansion-header-text-line-height: inherit;--mat-expansion-header-text-tracking: inherit;--mat-expansion-container-text-font: Inter;--mat-expansion-container-text-line-height: 19px;--mat-expansion-container-text-size: 13px;--mat-expansion-container-text-tracking: normal;--mat-expansion-container-text-weight: 400}html[_ngcontent-%COMP%]{--mat-grid-list-tile-header-primary-text-size: 13px;--mat-grid-list-tile-header-secondary-text-size: 12px;--mat-grid-list-tile-footer-primary-text-size: 13px;--mat-grid-list-tile-footer-secondary-text-size: 12px}html[_ngcontent-%COMP%]{--mat-icon-color: inherit}.mat-icon.mat-primary[_ngcontent-%COMP%]{--mat-icon-color: #0f0761}.mat-icon.mat-accent[_ngcontent-%COMP%]{--mat-icon-color: #dd7345}.mat-icon.mat-warn[_ngcontent-%COMP%]{--mat-icon-color: #f44336}html[_ngcontent-%COMP%]{--mat-sidenav-container-divider-color: rgba(0, 0, 0, .12);--mat-sidenav-container-background-color: white;--mat-sidenav-container-text-color: rgba(0, 0, 0, .87);--mat-sidenav-content-background-color: #fafafa;--mat-sidenav-content-text-color: rgba(0, 0, 0, .87);--mat-sidenav-scrim-color: rgba(0, 0, 0, .6)}html[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #0f0761;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #0f0761;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #0f0761;--mat-stepper-header-edit-state-icon-foreground-color: white;--mat-stepper-container-color: white;--mat-stepper-line-color: rgba(0, 0, 0, .12);--mat-stepper-header-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-stepper-header-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-optional-label-text-color: rgba(0, 0, 0, .54);--mat-stepper-header-selected-state-label-text-color: rgba(0, 0, 0, .87);--mat-stepper-header-error-state-label-text-color: #f44336;--mat-stepper-header-icon-background-color: rgba(0, 0, 0, .54);--mat-stepper-header-error-state-icon-foreground-color: #f44336;--mat-stepper-header-error-state-icon-background-color: transparent}html[_ngcontent-%COMP%] .mat-step-header.mat-accent[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #dd7345;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #dd7345;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #dd7345;--mat-stepper-header-edit-state-icon-foreground-color: white}html[_ngcontent-%COMP%] .mat-step-header.mat-warn[_ngcontent-%COMP%]{--mat-stepper-header-icon-foreground-color: white;--mat-stepper-header-selected-state-icon-background-color: #f44336;--mat-stepper-header-selected-state-icon-foreground-color: white;--mat-stepper-header-done-state-icon-background-color: #f44336;--mat-stepper-header-done-state-icon-foreground-color: white;--mat-stepper-header-edit-state-icon-background-color: #f44336;--mat-stepper-header-edit-state-icon-foreground-color: white}html[_ngcontent-%COMP%]{--mat-stepper-header-height: 64px}html[_ngcontent-%COMP%]{--mat-stepper-container-text-font: Inter;--mat-stepper-header-label-text-font: Inter;--mat-stepper-header-label-text-size: 13px;--mat-stepper-header-label-text-weight: 400;--mat-stepper-header-error-state-label-text-size: 13px;--mat-stepper-header-selected-state-label-text-size: 13px;--mat-stepper-header-selected-state-label-text-weight: 400}.mat-sort-header-arrow[_ngcontent-%COMP%]{color:#757575}html[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: whitesmoke;--mat-toolbar-container-text-color: rgba(0, 0, 0, .87)}.mat-toolbar.mat-primary[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #0f0761;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-accent[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #dd7345;--mat-toolbar-container-text-color: white}.mat-toolbar.mat-warn[_ngcontent-%COMP%]{--mat-toolbar-container-background-color: #f44336;--mat-toolbar-container-text-color: white}html[_ngcontent-%COMP%]{--mat-toolbar-standard-height: 56px;--mat-toolbar-mobile-height: 48px}html[_ngcontent-%COMP%]{--mat-toolbar-title-text-font: Inter;--mat-toolbar-title-text-line-height: 21px;--mat-toolbar-title-text-size: 16px;--mat-toolbar-title-text-tracking: normal;--mat-toolbar-title-text-weight: 600}.mat-tree[_ngcontent-%COMP%]{background:white}.mat-tree-node[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]{color:#000000de}.mat-tree-node[_ngcontent-%COMP%]{min-height:40px}.mat-tree[_ngcontent-%COMP%]{font-family:Inter}.mat-tree-node[_ngcontent-%COMP%], .mat-nested-tree-node[_ngcontent-%COMP%]{font-weight:400;font-size:13px}.mat-h1[_ngcontent-%COMP%], .mat-headline-5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h1[_ngcontent-%COMP%]{font-size:20px;font-weight:600;line-height:24px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h2[_ngcontent-%COMP%], .mat-headline-6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:21px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h3[_ngcontent-%COMP%], .mat-subtitle-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h3[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-subtitle-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-size:16px;font-weight:600;line-height:22px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h4[_ngcontent-%COMP%], .mat-body-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h4[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{font-size:13px;font-weight:400;line-height:19px;font-family:Inter;letter-spacing:normal;margin:0 0 16px}.mat-h5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h5[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{font:400 10.79px/19px Inter;margin:0 0 12px}.mat-h6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-h6[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{font:400 8.71px/19px Inter;margin:0 0 12px}.mat-body-strong[_ngcontent-%COMP%], .mat-subtitle-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-strong[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-subtitle-2[_ngcontent-%COMP%]{font-size:13px;font-weight:500;line-height:19px;font-family:Inter;letter-spacing:normal}.mat-body[_ngcontent-%COMP%], .mat-body-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%]{font-size:13px;font-weight:400;line-height:19px;font-family:Inter;letter-spacing:normal}.mat-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-body-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-body-2[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0 0 12px}.mat-small[_ngcontent-%COMP%], .mat-caption[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-small[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-caption[_ngcontent-%COMP%]{font-size:12px;font-weight:400;line-height:16px;font-family:Inter;letter-spacing:normal}.mat-headline-1[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-1[_ngcontent-%COMP%]{font-size:56px;font-weight:600;line-height:62px;font-family:Inter;letter-spacing:normal;margin:0 0 56px}.mat-headline-2[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-2[_ngcontent-%COMP%]{font-size:44px;font-weight:600;line-height:50px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-headline-3[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-3[_ngcontent-%COMP%]{font-size:36px;font-weight:600;line-height:43px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-headline-4[_ngcontent-%COMP%], .mat-typography[_ngcontent-%COMP%] .mat-headline-4[_ngcontent-%COMP%]{font-size:28px;font-weight:600;line-height:34px;font-family:Inter;letter-spacing:normal;margin:0 0 64px}.mat-ripple-element[_ngcontent-%COMP%]{display:none!important}.mat-mdc-unelevated-button.mat-primary[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-raised-button.mat-primary[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-fab[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%], .mat-mdc-mini-fab[_ngcontent-%COMP%] .mat-ripple-element[_ngcontent-%COMP%]{display:block!important}.mat-toolbar[_ngcontent-%COMP%]{box-shadow:none!important}.shell-brand-logo[_ngcontent-%COMP%]{filter:brightness(0);opacity:.87}.dark-theme[_ngcontent-%COMP%] .shell-brand-logo[_ngcontent-%COMP%]{filter:brightness(0) invert(1);opacity:.9}.mat-column-actions[_ngcontent-%COMP%]{width:50px;padding:0 8px}.mat-column-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{height:30px;width:30px}.mat-mdc-cell[_ngcontent-%COMP%]{padding:8px}.mat-mdc-card[_ngcontent-%COMP%]{overflow-y:auto}.add-btn[_ngcontent-%COMP%]{background-color:#7571a9}"]})}};$e=Ge=(0,Z.Cg)([(0,j.d)({checkProperties:!0})],$e);var ct=d(14207),Oe=d(86606),Q=d(73151),N=d(68686);function Hn(n,i){1&n&&(e.qex(0),e.EFF(1,"loading\u2026"),e.bVm())}function Kn(n,i){if(1&n&&(e.qex(0),e.EFF(1),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",t.connections.length," available ")}}function Qn(n,i){1&n&&(e.j41(0,"p",14),e.EFF(1," Click one to use it for this chat service: "),e.k0s())}function Wn(n,i){if(1&n&&e.nrm(0,"fa-icon",20),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function Zn(n,i){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",17),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.selectConnection.emit(r.id))}),e.DNE(2,Wn,1,1,"fa-icon",18),e.j41(3,"span",19),e.EFF(4),e.k0s()()()}if(2&n){const t=i.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("prereqs__chip--selected",t.id===o.selectedConnectionId),e.R7$(1),e.Y8G("ngIf",t.id===o.selectedConnectionId),e.R7$(2),e.JRh(t.label||t.name)}}function eo(n,i){if(1&n&&(e.j41(0,"ul",15),e.DNE(1,Zn,5,4,"li",16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.connections)("ngForTrackBy",t.trackById)}}function to(n,i){1&n&&(e.j41(0,"p",21),e.EFF(1," No AI Connections yet. The chat service can't run without one. Use the button above to create one, then come back. "),e.k0s())}function no(n,i){1&n&&(e.qex(0),e.EFF(1,"loading\u2026"),e.bVm())}function oo(n,i){if(1&n&&(e.qex(0),e.EFF(1),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.SpI(" ",t.roles.length," available ")}}function io(n,i){1&n&&(e.j41(0,"p",14),e.EFF(1," Click one to scope the AI's data access: "),e.k0s())}function ao(n,i){if(1&n&&e.nrm(0,"fa-icon",20),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}const ro=function(n){return["/api-connections/role-based-access",n,"scope"]};function co(n,i){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",17),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.selectRole.emit(r.id))}),e.DNE(2,ao,1,1,"fa-icon",18),e.j41(3,"span",19),e.EFF(4),e.k0s()(),e.j41(5,"a",22),e.EFF(6,"what can this role see?"),e.k0s()()}if(2&n){const t=i.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("prereqs__chip--selected",t.id===o.selectedRoleId),e.R7$(1),e.Y8G("ngIf",t.id===o.selectedRoleId),e.R7$(2),e.JRh(t.name),e.R7$(1),e.Y8G("routerLink",e.eq3(5,ro,t.id))}}function so(n,i){if(1&n&&(e.j41(0,"ul",15),e.DNE(1,co,7,7,"li",16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.roles)("ngForTrackBy",t.trackById)}}function lo(n,i){1&n&&(e.j41(0,"p",21),e.EFF(1," No Roles configured. The AI operates under a Role that limits what data it can access. Create a restricted role and come back. "),e.k0s())}const po=function(){return["/ai/connections/create"]},mo=function(){return["/api-connections/role-based-access/create"]};let _o=(()=>{class n{constructor(){this.http=(0,e.WQX)(X.Qq),this.selectedConnectionId=null,this.selectedRoleId=null,this.selectConnection=new e.bkB,this.selectRole=new e.bkB,this.loading=!0,this.connections=[],this.roles=[],this.faCheck=g.e68,this.faCircleCheck=g.QRE,this.faCircleExclamation=g.lEd,this.faPlus=g.QLR,this.faRobot=g.UBk,this.faShieldHalved=g.fLc}ngOnInit(){(0,Oe.p)({conn:this.http.get(`${N.C}/system/service`,{params:{filter:'type = "ai_connection"',fields:"id,name,label",sort:"name"}}).pipe((0,R.W)(()=>(0,Q.of)({resource:[]}))),roles:this.http.get(`${N.C}/system/role`,{params:{fields:"id,name",sort:"name"}}).pipe((0,R.W)(()=>(0,Q.of)({resource:[]})))}).subscribe(({conn:t,roles:o})=>{this.connections=t.resource??[],this.roles=o.resource??[],this.loading=!1})}trackById(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-chat-prereqs"]],inputs:{selectedConnectionId:"selectedConnectionId",selectedRoleId:"selectedRoleId"},outputs:{selectConnection:"selectConnection",selectRole:"selectRole"},standalone:!0,features:[e.aNF],decls:38,vars:34,consts:[[1,"prereqs"],[1,"prereqs__header"],[1,"prereqs__section"],[1,"prereqs__row"],[1,"prereqs__icon",3,"icon"],[1,"prereqs__kind-icon",3,"icon"],[1,"prereqs__title"],[1,"prereqs__count"],[4,"ngIf"],["mat-stroked-button","",1,"prereqs__action",3,"routerLink"],[3,"icon"],["class","prereqs__pick-hint",4,"ngIf"],["class","prereqs__list",4,"ngIf"],["class","prereqs__hint",4,"ngIf"],[1,"prereqs__pick-hint"],[1,"prereqs__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"prereqs__chip",3,"click"],["class","prereqs__chip-check",3,"icon",4,"ngIf"],[1,"prereqs__name"],[1,"prereqs__chip-check",3,"icon"],[1,"prereqs__hint"],[1,"prereqs__link",3,"routerLink"]],template:function(o,a){1&o&&(e.j41(0,"div",0)(1,"header",1)(2,"h4"),e.EFF(3,"AI Chat setup"),e.k0s(),e.j41(4,"p"),e.EFF(5," An AI Chat service ties an AI Connection (the LLM) to a DreamFactory Role (the data scope). Pick one of each below; your selection writes straight into the form. "),e.k0s()(),e.j41(6,"section",2)(7,"div",3),e.nrm(8,"fa-icon",4)(9,"fa-icon",5),e.j41(10,"span",6),e.EFF(11,"AI Connection"),e.k0s(),e.j41(12,"span",7),e.DNE(13,Hn,2,0,"ng-container",8),e.DNE(14,Kn,2,1,"ng-container",8),e.k0s(),e.j41(15,"a",9),e.nrm(16,"fa-icon",10),e.j41(17,"span"),e.EFF(18),e.k0s()()(),e.DNE(19,Qn,2,0,"p",11),e.DNE(20,eo,2,2,"ul",12),e.DNE(21,to,2,0,"p",13),e.k0s(),e.j41(22,"section",2)(23,"div",3),e.nrm(24,"fa-icon",4)(25,"fa-icon",5),e.j41(26,"span",6),e.EFF(27,"AI Role"),e.k0s(),e.j41(28,"span",7),e.DNE(29,no,2,0,"ng-container",8),e.DNE(30,oo,2,1,"ng-container",8),e.k0s(),e.j41(31,"a",9),e.nrm(32,"fa-icon",10),e.j41(33,"span"),e.EFF(34),e.k0s()()(),e.DNE(35,io,2,0,"p",11),e.DNE(36,so,2,2,"ul",12),e.DNE(37,lo,2,0,"p",13),e.k0s()()),2&o&&(e.R7$(6),e.AVh("prereqs__section--missing",!a.loading&&0===a.connections.length),e.R7$(2),e.AVh("prereqs__icon--ok",a.connections.length)("prereqs__icon--miss",!a.connections.length),e.Y8G("icon",a.connections.length?a.faCheck:a.faCircleExclamation),e.R7$(1),e.Y8G("icon",a.faRobot),e.R7$(4),e.Y8G("ngIf",a.loading),e.R7$(1),e.Y8G("ngIf",!a.loading),e.R7$(1),e.Y8G("routerLink",e.lJ4(32,po)),e.R7$(1),e.Y8G("icon",a.faPlus),e.R7$(2),e.JRh(a.connections.length?"Add another":"Create one now"),e.R7$(1),e.Y8G("ngIf",a.connections.length&&null==a.selectedConnectionId),e.R7$(1),e.Y8G("ngIf",a.connections.length),e.R7$(1),e.Y8G("ngIf",!a.loading&&0===a.connections.length),e.R7$(1),e.AVh("prereqs__section--missing",!a.loading&&0===a.roles.length),e.R7$(2),e.AVh("prereqs__icon--ok",a.roles.length)("prereqs__icon--miss",!a.roles.length),e.Y8G("icon",a.roles.length?a.faCheck:a.faCircleExclamation),e.R7$(1),e.Y8G("icon",a.faShieldHalved),e.R7$(4),e.Y8G("ngIf",a.loading),e.R7$(1),e.Y8G("ngIf",!a.loading),e.R7$(1),e.Y8G("routerLink",e.lJ4(33,mo)),e.R7$(1),e.Y8G("icon",a.faPlus),e.R7$(2),e.JRh(a.roles.length?"Add another":"Create one now"),e.R7$(1),e.Y8G("ngIf",a.roles.length&&null==a.selectedRoleId),e.R7$(1),e.Y8G("ngIf",a.roles.length),e.R7$(1),e.Y8G("ngIf",!a.loading&&0===a.roles.length))},dependencies:[_.MD,_.Sq,_.bT,B.Wk,b.Hl,b.It,k.dX,k.aY],styles:["[_nghost-%COMP%]{--prereqs-surface: rgba(0, 0, 0, .03)}.dark-theme[_nghost-%COMP%], .dark-theme [_nghost-%COMP%]{--prereqs-surface: rgba(255, 255, 255, .02)}.prereqs[_ngcontent-%COMP%]{border:1px solid rgba(96,165,250,.3);background:rgba(96,165,250,.05);border-radius:8px;padding:1.5rem 1.75rem;margin:1rem 0;display:flex;flex-direction:column;gap:1.25rem;font-size:16px}.prereqs__header[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 .4rem;font-size:19px;font-weight:600}.prereqs__header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:15px;line-height:1.55}.prereqs__section[_ngcontent-%COMP%]{padding:1rem 1.25rem;border-radius:6px;background:var(--prereqs-surface)}.prereqs__section--missing[_ngcontent-%COMP%]{background:rgba(220,53,69,.06);border:1px solid rgba(220,53,69,.25)}.prereqs__row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.prereqs__icon[_ngcontent-%COMP%]{font-size:19px}.prereqs__icon--ok[_ngcontent-%COMP%]{color:#4ade80}.prereqs__icon--miss[_ngcontent-%COMP%]{color:#ff6b6b}.prereqs__kind-icon[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:17px}.prereqs__title[_ngcontent-%COMP%]{font-weight:600;font-size:18px}.prereqs__count[_ngcontent-%COMP%]{font-size:14px;color:var(--df-text-2)}.prereqs__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:.8125rem!important;padding:0 .75rem!important;min-height:32px!important}.prereqs__list[_ngcontent-%COMP%]{list-style:none;margin:.625rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.5rem .625rem}.prereqs__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem}.prereqs__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.55rem 1.05rem;background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:999px;font:inherit;font-size:16px;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.prereqs__chip[_ngcontent-%COMP%]:hover{border-color:#60a5fa99;background:rgba(96,165,250,.08)}.prereqs__chip--selected[_ngcontent-%COMP%]{border-color:#60a5fa;background:rgba(96,165,250,.18);color:var(--df-text)}.prereqs__chip-check[_ngcontent-%COMP%]{color:#60a5fa}.prereqs__name[_ngcontent-%COMP%]{font-weight:500}.prereqs__pick-hint[_ngcontent-%COMP%]{margin:.625rem 0 0;font-size:14px;color:var(--df-text-2);font-style:italic}.prereqs__link[_ngcontent-%COMP%]{font-size:12px;color:var(--df-text-muted);text-decoration:none}.prereqs__link[_ngcontent-%COMP%]:hover{color:#60a5fa;text-decoration:underline}.prereqs__hint[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:13px;color:var(--df-text-2);line-height:1.5}.prereqs__hint[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;padding:.1rem .375rem;border-radius:3px;background:var(--df-surface-2)}.prereqs__hint[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--df-text)}"]})}}return n})();function go(n,i){1&n&&e.nrm(0,"mat-spinner",5)}function fo(n,i){if(1&n&&e.nrm(0,"fa-icon",6),2&n){const t=e.XpG();e.Y8G("icon",t.faPlugCircleCheck)}}function uo(n,i){if(1&n&&(e.j41(0,"p"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",null==t.result.error?null:t.result.error.message," ")}}function ho(n,i){if(1&n&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.SpI(", including ",t.firstModelLabel,"")}}function bo(n,i){if(1&n&&(e.j41(0,"p",11),e.EFF(1),e.DNE(2,ho,2,1,"span",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.modelCount," models available "),e.R7$(1),e.Y8G("ngIf",t.firstModelLabel)}}function vo(n,i){if(1&n&&(e.j41(0,"div",7),e.nrm(1,"fa-icon",6),e.j41(2,"div",8)(3,"strong"),e.EFF(4),e.k0s(),e.DNE(5,uo,2,1,"p",9),e.DNE(6,bo,3,2,"p",10),e.k0s()()),2&n){const t=e.XpG();e.AVh("test-conn__result--ok",t.result.success)("test-conn__result--err",!t.result.success),e.R7$(1),e.Y8G("icon",t.result.success?t.faCheckCircle:t.faCircleXmark),e.R7$(3),e.JRh(t.result.success?"Connection succeeded":"Connection failed"),e.R7$(1),e.Y8G("ngIf",!t.result.success&&(null==t.result.error?null:t.result.error.message)),e.R7$(1),e.Y8G("ngIf",t.result.success&&t.modelCount>0)}}let Co=(()=>{class n{constructor(){this.serviceId=null,this.http=(0,e.WQX)(X.Qq),this.loading=!1,this.result=null,this.faPlugCircleCheck=g.e6V,this.faCheckCircle=g.SGM,this.faCircleXmark=g.bnw}get modelCount(){return this.result?.resource?.length??0}get firstModelLabel(){const t=this.result?.resource?.[0];return t?"string"==typeof t?t:t.name||t.id||null:null}run(){const t=this.form.get("config")?.value??{},o=t.provider,a=t.api_key??t.apiKey??null,r="**********"===a?null:a,c=t.base_url??t.baseUrl??null,s=t.organization_id??t.organizationId??null,l=t.extra_headers??t.extraHeaders??null,p=t.timeout??null;if(!o)return void(this.result={success:!1,error:{message:"Pick a provider before testing."}});const x="openai_compatible"===o,u=null!=this.serviceId;if("ollama"!==o&&"openai_compatible"!==o&&!r&&!u)return void(this.result={success:!1,error:{message:o+" requires an API key. Fill in API Key, then test. (Existing connections fall back to the saved key automatically.)"}});if(x&&!c&&!u)return void(this.result={success:!1,error:{message:o+" requires a Base URL (e.g. http://host:8090/v1). Fill in Base URL, then test."}});this.loading=!0,this.result=null;const M={provider:o,api_key:r,base_url:c,organization_id:s,extra_headers:l,timeout:p};this.serviceId&&(M.service_id=this.serviceId),this.http.post("/_internal/ai/test-connection",M).subscribe({next:w=>{this.result=w,this.loading=!1},error:w=>{this.result={success:!1,error:{message:w?.error?.error?.message??w?.error?.message??w?.message??"Network error."}},this.loading=!1}})}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-test-connection"]],inputs:{form:"form",serviceId:"serviceId"},standalone:!0,features:[e.aNF],decls:7,vars:5,consts:[[1,"test-conn"],["type","button","mat-stroked-button","",1,"test-conn__button",3,"disabled","click"],["diameter","16",4,"ngIf"],[3,"icon",4,"ngIf"],["class","test-conn__result",3,"test-conn__result--ok","test-conn__result--err",4,"ngIf"],["diameter","16"],[3,"icon"],[1,"test-conn__result"],[1,"test-conn__detail"],[4,"ngIf"],["class","test-conn__models",4,"ngIf"],[1,"test-conn__models"]],template:function(o,a){1&o&&(e.j41(0,"div",0)(1,"button",1),e.bIt("click",function(){return a.run()}),e.DNE(2,go,1,0,"mat-spinner",2),e.DNE(3,fo,1,1,"fa-icon",3),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.DNE(6,vo,7,8,"div",4),e.k0s()),2&o&&(e.R7$(1),e.Y8G("disabled",a.loading),e.R7$(1),e.Y8G("ngIf",a.loading),e.R7$(1),e.Y8G("ngIf",!a.loading),e.R7$(2),e.JRh(a.loading?"Testing\u2026":"Test connection"),e.R7$(1),e.Y8G("ngIf",a.result))},dependencies:[_.MD,_.bT,b.Hl,b.$z,oe.D6,oe.LG,k.dX,k.aY],styles:[".test-conn[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;margin:1rem 0;font-size:1.4rem}.test-conn__button[_ngcontent-%COMP%]{align-self:flex-start;display:inline-flex!important;align-items:center;gap:.5rem;font-size:1.3rem!important;min-height:38px!important}.test-conn__result[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding:.875rem 1.125rem;border-radius:var(--df-radius-sm);align-items:flex-start;font-size:1.4rem}.test-conn__result--ok[_ngcontent-%COMP%]{background:var(--df-success-soft);border:1px solid var(--df-success-border);color:var(--df-success)}.test-conn__result--err[_ngcontent-%COMP%]{background:var(--df-danger-soft);border:1px solid var(--df-danger-border);color:var(--df-danger)}.test-conn__detail[_ngcontent-%COMP%]{flex:1;color:var(--df-text);display:flex;flex-direction:column;gap:.35rem}.test-conn__detail[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{font-weight:600;font-size:1.4rem}.test-conn__detail[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:1.3rem}.test-conn__models[_ngcontent-%COMP%]{font-size:1.3rem}"]})}}return n})();function xo(n,i){1&n&&e.nrm(0,"mat-spinner",12)}function yo(n,i){if(1&n&&e.nrm(0,"fa-icon",5),2&n){const t=e.XpG(2);e.Y8G("icon",t.faArrowsRotate)}}function ko(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",9),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.fetch())}),e.DNE(1,xo,1,0,"mat-spinner",10),e.DNE(2,yo,1,1,"fa-icon",11),e.j41(3,"span"),e.EFF(4),e.k0s()()}if(2&n){const t=e.XpG();e.Y8G("disabled",t.loading),e.R7$(1),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading),e.R7$(2),e.JRh(t.models.length?"Refresh":"Fetch available models")}}function Mo(n,i){if(1&n&&(e.j41(0,"div",13),e.nrm(1,"fa-icon",5),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("icon",t.faCircleXmark),e.R7$(2),e.JRh(t.error)}}function Po(n,i){if(1&n&&(e.j41(0,"span",24),e.EFF(1),e.nI1(2,"number"),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI("",e.bMT(2,1,t.context)," ctx")}}function Oo(n,i){if(1&n&&(e.j41(0,"mat-option",20)(1,"span",21)(2,"span",22),e.EFF(3),e.k0s(),e.DNE(4,Po,3,3,"span",23),e.k0s()()),2&n){const t=i.$implicit;e.Y8G("value",t.id),e.R7$(3),e.JRh(t.label),e.R7$(1),e.Y8G("ngIf",t.context)}}function Fo(n,i){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",17)(1,"mat-label"),e.EFF(2,"Model"),e.k0s(),e.j41(3,"mat-select",18),e.bIt("selectionChange",function(a){e.eBV(t);const r=e.XpG(2);return e.Njj(r.select(a.value))}),e.DNE(4,Oo,5,3,"mat-option",19),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(3),e.Y8G("value",t.currentValue),e.R7$(1),e.Y8G("ngForOf",t.models)("ngForTrackBy",t.trackModel)}}function Do(n,i){if(1&n&&(e.j41(0,"p",25),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.SpI(" ",t.fetchHint," ")}}function wo(n,i){1&n&&(e.j41(0,"p",25),e.EFF(1,' No models reported by the provider. Switch to "Type custom" if you know the model id. '),e.k0s())}function So(n,i){if(1&n&&(e.j41(0,"p",26),e.nrm(1,"fa-icon",27),e.EFF(2," Selected: "),e.j41(3,"code"),e.EFF(4),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("icon",t.faCircleCheck),e.R7$(3),e.JRh(t.currentValue)}}function Io(n,i){if(1&n&&(e.qex(0),e.DNE(1,Fo,5,3,"mat-form-field",14),e.DNE(2,Do,2,1,"p",15),e.DNE(3,wo,2,0,"p",15),e.DNE(4,So,5,2,"p",16),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngIf",t.models.length>0),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.models.length&&!t.error&&!t.lastFetched),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.models.length&&t.lastFetched),e.R7$(1),e.Y8G("ngIf",t.currentValue)}}function To(n,i){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",28)(1,"mat-label"),e.EFF(2,"Model id"),e.k0s(),e.j41(3,"input",29),e.bIt("input",function(a){e.eBV(t);const r=e.XpG();return e.Njj(r.onCustomInput(a))}),e.k0s()()}if(2&n){const t=e.XpG();e.R7$(3),e.Y8G("value",t.currentValue||"")}}let Ro=(()=>{class n{constructor(){this.serviceId=null,this.http=(0,e.WQX)(X.Qq),this.loading=!1,this.models=[],this.error=null,this.customMode=!1,this.lastFetched=!1,this.faArrowsRotate=g.$3Z,this.faCircleCheck=g.QRE,this.faCircleXmark=g.bnw,this.faKeyboard=g.Lhe}ngOnInit(){this.currentValue&&(this.customMode=!0)}get currentValue(){return this.form.get("config.defaultModel")?.value??""}get fetchHint(){const t=this.form.get("config.provider")?.value;return t?"openai_compatible"===t||"ollama"===t?'Fill in Base URL (and API Key if your endpoint requires one), then click "Fetch available models".':'Fill in API Key above, then click "Fetch available models".':'Pick a provider above first, then click "Fetch available models".'}select(t){this.form.get("config.defaultModel")?.setValue(t)}onCustomInput(t){const o=t.target.value;this.form.get("config.defaultModel")?.setValue(o)}toggleCustom(){this.customMode=!this.customMode}fetch(){const t=this.form.get("config")?.value??{},o=t.provider;if(!o)return void(this.error="Pick a provider above first.");this.loading=!0,this.error=null;const a=t.api_key??t.apiKey??null,r={provider:o,api_key:"**********"===a?null:a,base_url:t.base_url??t.baseUrl??null,organization_id:t.organization_id??t.organizationId??null,extra_headers:t.extra_headers??t.extraHeaders??null,timeout:t.timeout??null};this.serviceId&&(r.service_id=this.serviceId),this.http.post("/_internal/ai/test-connection",r).subscribe({next:c=>{this.loading=!1,this.lastFetched=!0,c.success?this.models=(c.resource??[]).map(this.normalize):this.error=c.error?.message??"Provider rejected the request."},error:c=>{this.loading=!1,this.lastFetched=!0,this.error=c?.error?.error?.message??c?.error?.message??c?.message??"Network error fetching models."}})}normalize(t){return"string"==typeof t?{id:t,label:t}:{id:t.id??t.name??"unknown",label:t.name??t.id??"unknown",context:t.context_window??null}}trackModel(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-model-picker"]],inputs:{form:"form",serviceId:"serviceId"},standalone:!0,features:[e.aNF],decls:12,vars:6,consts:[[1,"model-picker"],[1,"model-picker__header"],[1,"model-picker__title"],["type","button","mat-stroked-button","","class","model-picker__refresh",3,"disabled","click",4,"ngIf"],["type","button","mat-button","",1,"model-picker__custom-toggle",3,"click"],[3,"icon"],["class","model-picker__error",4,"ngIf"],[4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","model-picker__custom",4,"ngIf"],["type","button","mat-stroked-button","",1,"model-picker__refresh",3,"disabled","click"],["diameter","14",4,"ngIf"],[3,"icon",4,"ngIf"],["diameter","14"],[1,"model-picker__error"],["appearance","outline","subscriptSizing","dynamic","class","model-picker__select",4,"ngIf"],["class","model-picker__hint",4,"ngIf"],["class","model-picker__current",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic",1,"model-picker__select"],[3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],[1,"model-picker__option"],[1,"model-picker__option-label"],["class","model-picker__option-meta",4,"ngIf"],[1,"model-picker__option-meta"],[1,"model-picker__hint"],[1,"model-picker__current"],[1,"model-picker__current-ok",3,"icon"],["appearance","outline","subscriptSizing","dynamic",1,"model-picker__custom"],["matInput","","placeholder","e.g. claude-sonnet-4-5-20250929",3,"value","input"]],template:function(o,a){1&o&&(e.j41(0,"div",0)(1,"div",1)(2,"span",2),e.EFF(3,"Default Model"),e.k0s(),e.DNE(4,ko,5,4,"button",3),e.j41(5,"button",4),e.bIt("click",function(){return a.toggleCustom()}),e.nrm(6,"fa-icon",5),e.j41(7,"span"),e.EFF(8),e.k0s()()(),e.DNE(9,Mo,4,2,"div",6),e.DNE(10,Io,5,4,"ng-container",7),e.DNE(11,To,4,1,"mat-form-field",8),e.k0s()),2&o&&(e.R7$(4),e.Y8G("ngIf",!a.customMode),e.R7$(2),e.Y8G("icon",a.faKeyboard),e.R7$(2),e.JRh(a.customMode?"Use list":"Type custom"),e.R7$(1),e.Y8G("ngIf",a.error),e.R7$(1),e.Y8G("ngIf",!a.customMode),e.R7$(1),e.Y8G("ngIf",a.customMode))},dependencies:[_.MD,_.Sq,_.bT,_.QX,m.YN,m.X1,b.Hl,b.$z,P.RG,P.rl,P.nJ,E.fS,E.fg,oe.D6,oe.LG,V.Ve,V.VO,L.wT,k.dX,k.aY],styles:[".model-picker[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.875rem;padding:1.25rem 1.5rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.model-picker__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.875rem;flex-wrap:wrap}.model-picker__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em;margin-right:auto}.model-picker__refresh[_ngcontent-%COMP%], .model-picker__custom-toggle[_ngcontent-%COMP%]{display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.model-picker__select[_ngcontent-%COMP%], .model-picker__custom[_ngcontent-%COMP%]{width:100%}.model-picker__option[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:.75rem;width:100%}.model-picker__option-label[_ngcontent-%COMP%]{flex:1}.model-picker__option-meta[_ngcontent-%COMP%]{font-size:1.2rem;color:var(--df-text-muted);font-family:SFMono-Regular,Menlo,Consolas,monospace}.model-picker__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);font-style:italic;line-height:1.5}.model-picker__error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.625rem .875rem;border-radius:var(--df-radius-sm);background:var(--df-danger-soft);border:1px solid var(--df-danger-border);color:var(--df-danger);font-size:1.3rem}.model-picker__current[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text);display:flex;align-items:center;gap:.5rem}.model-picker__current[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.2rem;background:var(--df-surface-2);border:1px solid var(--df-border-2);padding:.2rem .5rem;border-radius:var(--df-radius-sm)}.model-picker__current-ok[_ngcontent-%COMP%]{color:var(--df-success)}"]})}}return n})();var Eo=d(15629);function Go(n,i){if(1&n&&(e.j41(0,"div",14),e.nrm(1,"fa-icon",7),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("icon",o.faTriangleExclamation),e.R7$(2),e.JRh(t("noneWarning"))}}function $o(n,i){if(1&n&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t("loading")," ")}}function jo(n,i){if(1&n&&e.nrm(0,"fa-icon",21),2&n){const t=e.XpG(4);e.Y8G("icon",t.faCircleCheck)}}function No(n,i){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",18),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(3);return e.Njj(c.toggle(r.id))}),e.DNE(2,jo,1,1,"fa-icon",19),e.j41(3,"span",20),e.EFF(4),e.k0s()()()}if(2&n){const t=i.$implicit,o=e.XpG(3);e.R7$(1),e.AVh("allowed-roles__chip--selected",o.isSelected(t.id)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.id)),e.R7$(2),e.JRh(t.name)}}function Ao(n,i){if(1&n&&(e.j41(0,"ul",16),e.DNE(1,No,5,4,"li",17),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.roles)("ngForTrackBy",t.trackById)}}function Yo(n,i){if(1&n&&(e.j41(0,"p",22),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" ",t("empty")," ")}}const Vo=function(n){return{role:n}};function zo(n,i){if(1&n&&(e.j41(0,"div",26)(1,"div",27),e.EFF(2),e.k0s(),e.nrm(3,"df-scope-map",28),e.k0s()),2&n){const t=i.$implicit,o=e.XpG(2).$implicit;e.R7$(2),e.SpI(" ",o("reachRole",e.eq3(2,Vo,t.name))," "),e.R7$(1),e.Y8G("roleId",t.id)}}function Xo(n,i){if(1&n&&(e.j41(0,"section",23)(1,"div",24),e.nrm(2,"fa-icon",7),e.j41(3,"span"),e.EFF(4),e.k0s()(),e.j41(5,"p",8),e.EFF(6),e.k0s(),e.DNE(7,zo,4,4,"div",25),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(2),e.Y8G("icon",o.faShieldHalved),e.R7$(2),e.JRh(t("reachTitle")),e.R7$(2),e.JRh(t("reachHint")),e.R7$(1),e.Y8G("ngForOf",o.selectedRoles)("ngForTrackBy",o.trackById)}}const Bo=function(n,i){return{selected:n,available:i}},Lo=function(){return["/api-connections/role-based-access/create"]};function Uo(n,i){if(1&n&&(e.j41(0,"div",1)(1,"div",2),e.nrm(2,"fa-icon",3),e.j41(3,"span",4),e.EFF(4),e.k0s(),e.j41(5,"span",5),e.EFF(6),e.k0s(),e.j41(7,"a",6),e.nrm(8,"fa-icon",7),e.j41(9,"span"),e.EFF(10),e.k0s()()(),e.j41(11,"p",8),e.EFF(12),e.k0s(),e.DNE(13,Go,4,2,"div",9),e.DNE(14,$o,2,1,"div",10),e.DNE(15,Ao,2,2,"ul",11),e.DNE(16,Yo,2,1,"p",12),e.DNE(17,Xo,8,5,"section",13),e.k0s()),2&n){const t=i.$implicit,o=e.XpG();e.R7$(2),e.Y8G("icon",o.faShieldHalved),e.R7$(2),e.JRh(t("title")),e.R7$(2),e.SpI(" ",t("count",e.l_i(12,Bo,o.selected.length,o.roles.length))," "),e.R7$(1),e.Y8G("routerLink",e.lJ4(15,Lo)),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(2),e.JRh(t("createRole")),e.R7$(2),e.JRh(t("hint")),e.R7$(1),e.Y8G("ngIf",0===o.selected.length&&!o.loading),e.R7$(1),e.Y8G("ngIf",o.loading),e.R7$(1),e.Y8G("ngIf",!o.loading&&o.roles.length>0),e.R7$(1),e.Y8G("ngIf",!o.loading&&0===o.roles.length),e.R7$(1),e.Y8G("ngIf",!o.loading&&o.selectedRoles.length>0)}}let Jo=(()=>{class n{constructor(){this.http=(0,e.WQX)(X.Qq),this.loading=!0,this.roles=[],this.faShieldHalved=g.fLc,this.faCheck=g.e68,this.faCircleCheck=g.QRE,this.faPlus=g.QLR,this.faTriangleExclamation=g.JAe}ngOnInit(){this.http.get(`${N.C}/system/role`,{params:{fields:"id,name,description",sort:"name"}}).subscribe({next:t=>{this.roles=t.resource??[],this.loading=!1},error:()=>{this.loading=!1}})}get selected(){const t=this.form.get("config.allowedRoles")?.value;return this.parse(t)}isSelected(t){return this.selected.includes(t)}get selectedRoles(){const t=this.selected;return this.roles.filter(o=>t.includes(o.id))}toggle(t){const o=this.selected,a=o.includes(t)?o.filter(r=>r!==t):[...o,t];this.form.get("config.allowedRoles")?.setValue(a)}parse(t){if(Array.isArray(t))return t.map(Number).filter(o=>Number.isFinite(o));if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(Number).filter(a=>Number.isFinite(a))}catch{return[]}return[]}trackById(t,o){return o.id}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-allowed-roles"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","allowed-roles",4,"transloco","translocoRead"],[1,"allowed-roles"],[1,"allowed-roles__header"],[1,"allowed-roles__icon",3,"icon"],[1,"allowed-roles__title"],[1,"allowed-roles__count"],["mat-stroked-button","",1,"allowed-roles__action",3,"routerLink"],[3,"icon"],[1,"allowed-roles__hint"],["class","allowed-roles__warn",4,"ngIf"],["class","allowed-roles__loading",4,"ngIf"],["class","allowed-roles__list",4,"ngIf"],["class","allowed-roles__empty",4,"ngIf"],["class","allowed-roles__reach",4,"ngIf"],[1,"allowed-roles__warn"],[1,"allowed-roles__loading"],[1,"allowed-roles__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"allowed-roles__chip",3,"click"],["class","allowed-roles__chip-check",3,"icon",4,"ngIf"],[1,"allowed-roles__name"],[1,"allowed-roles__chip-check",3,"icon"],[1,"allowed-roles__empty"],[1,"allowed-roles__reach"],[1,"allowed-roles__reach-head"],["class","allowed-roles__reach-role",4,"ngFor","ngForOf","ngForTrackBy"],[1,"allowed-roles__reach-role"],[1,"allowed-roles__reach-role-name"],[3,"roleId"]],template:function(o,a){1&o&&e.DNE(0,Uo,18,16,"div",0),2&o&&e.Y8G("translocoRead","aiAllowedRoles")},dependencies:[_.MD,_.Sq,_.bT,B.Wk,b.Hl,b.It,k.dX,k.aY,I.Q8,I.bA,Eo.A],styles:[".allowed-roles[_ngcontent-%COMP%]{--roles-warning: #9a5b00;display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.allowed-roles__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.allowed-roles__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.allowed-roles__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.allowed-roles__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.allowed-roles__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.allowed-roles__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.allowed-roles__warn[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.625rem;padding:.875rem 1.125rem;background:color-mix(in srgb,var(--df-warning, var(--roles-warning)) 10%,transparent);border:1px solid color-mix(in srgb,var(--df-warning, var(--roles-warning)) 40%,transparent);border-radius:var(--df-radius-sm);color:var(--df-warning, var(--roles-warning));font-size:1.3rem}.allowed-roles__loading[_ngcontent-%COMP%], .allowed-roles__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.allowed-roles__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.allowed-roles__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.allowed-roles__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.allowed-roles__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.allowed-roles__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.allowed-roles__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.allowed-roles__name[_ngcontent-%COMP%]{font-weight:500}.allowed-roles__reach[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;margin-top:.5rem;padding-top:1.25rem;border-top:1px solid var(--df-border-2)}.allowed-roles__reach-head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.625rem;font-weight:600;font-size:1.4rem;letter-spacing:-.01em}.allowed-roles__reach-head[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.6rem}.allowed-roles__reach-role[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.625rem}.allowed-roles__reach-role-name[_ngcontent-%COMP%]{font-weight:600;font-size:1.3rem;color:var(--df-text-2)}.dark-theme[_nghost-%COMP%] .allowed-roles[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .allowed-roles[_ngcontent-%COMP%]{--roles-warning: #ffb74d}"]})}}return n})();function qo(n,i){1&n&&(e.j41(0,"div",11),e.EFF(1," Loading MCP servers\u2026 "),e.k0s())}function Ho(n,i){if(1&n&&e.nrm(0,"fa-icon",17),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function Ko(n,i){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",14),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.toggle(r.name))}),e.DNE(2,Ho,1,1,"fa-icon",15),e.j41(3,"span",16),e.EFF(4),e.k0s()()()}if(2&n){const t=i.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("mcp-servers__chip--selected",o.isSelected(t.name)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label||t.name)}}function Qo(n,i){if(1&n&&(e.j41(0,"ul",12),e.DNE(1,Ko,5,4,"li",13),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.servers)("ngForTrackBy",t.trackByName)}}function Wo(n,i){1&n&&(e.j41(0,"p",18),e.EFF(1," No MCP services exist yet. Create one (service type \u201cMCP Server\u201d) and come back. "),e.k0s())}const Zo=function(){return["/api-connections/api-types/database"]};let ei=(()=>{class n{constructor(){this.http=(0,e.WQX)(X.Qq),this.loading=!0,this.servers=[],this.faPlug=g.QtJ,this.faCircleCheck=g.QRE,this.faPlus=g.QLR}ngOnInit(){this.http.get(`${N.C}/system/service`,{params:{filter:'type = "mcp"',fields:"id,name,label",sort:"name"}}).subscribe({next:t=>{this.servers=t.resource??[],this.loading=!1},error:()=>{this.loading=!1}})}get selected(){return this.parse(this.form.get("config.mcpServers")?.value)}isSelected(t){return this.selected.includes(t)}toggle(t){const o=this.selected,a=o.includes(t)?o.filter(r=>r!==t):[...o,t];this.form.get("config.mcpServers")?.setValue(a)}parse(t){if(Array.isArray(t))return t.map(String).filter(o=>o.length>0);if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(String).filter(a=>a.length>0)}catch{return[]}return[]}trackByName(t,o){return o.name}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-mcp-servers"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:16,vars:9,consts:[[1,"mcp-servers"],[1,"mcp-servers__header"],[1,"mcp-servers__icon",3,"icon"],[1,"mcp-servers__title"],[1,"mcp-servers__count"],["mat-stroked-button","",1,"mcp-servers__action",3,"routerLink"],[3,"icon"],[1,"mcp-servers__hint"],["class","mcp-servers__loading",4,"ngIf"],["class","mcp-servers__list",4,"ngIf"],["class","mcp-servers__empty",4,"ngIf"],[1,"mcp-servers__loading"],[1,"mcp-servers__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"mcp-servers__chip",3,"click"],["class","mcp-servers__chip-check",3,"icon",4,"ngIf"],[1,"mcp-servers__name"],[1,"mcp-servers__chip-check",3,"icon"],[1,"mcp-servers__empty"]],template:function(o,a){1&o&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"fa-icon",2),e.j41(3,"span",3),e.EFF(4,"MCP Servers"),e.k0s(),e.j41(5,"span",4),e.EFF(6),e.k0s(),e.j41(7,"a",5),e.nrm(8,"fa-icon",6),e.j41(9,"span"),e.EFF(10,"Create MCP service"),e.k0s()()(),e.j41(11,"p",7),e.EFF(12," Pick the MCP servers this chat may call as tools. The AI sees the intersection of these and what the caller's role can access, so a conversation can never reach a server the person talking to it can't. Leave all unselected to allow every MCP server the role grants. "),e.k0s(),e.DNE(13,qo,2,0,"div",8),e.DNE(14,Qo,2,2,"ul",9),e.DNE(15,Wo,2,0,"p",10),e.k0s()),2&o&&(e.R7$(2),e.Y8G("icon",a.faPlug),e.R7$(4),e.Lme(" ",a.selected.length," selected \xb7 ",a.servers.length," available "),e.R7$(1),e.Y8G("routerLink",e.lJ4(8,Zo)),e.R7$(1),e.Y8G("icon",a.faPlus),e.R7$(5),e.Y8G("ngIf",a.loading),e.R7$(1),e.Y8G("ngIf",!a.loading&&a.servers.length>0),e.R7$(1),e.Y8G("ngIf",!a.loading&&0===a.servers.length))},dependencies:[_.MD,_.Sq,_.bT,B.Wk,b.Hl,b.It,k.dX,k.aY],styles:[".mcp-servers[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.mcp-servers__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.mcp-servers__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.mcp-servers__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.mcp-servers__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.mcp-servers__action[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex!important;align-items:center;gap:.4rem;font-size:1.3rem!important;padding:0 .875rem!important;min-height:38px!important}.mcp-servers__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.mcp-servers__loading[_ngcontent-%COMP%], .mcp-servers__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.mcp-servers__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.mcp-servers__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.mcp-servers__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.mcp-servers__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.mcp-servers__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.mcp-servers__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.mcp-servers__name[_ngcontent-%COMP%]{font-weight:500}"]})}}return n})();const ni=[{name:"list_services",title:"List Services",description:"List the services configured on this DreamFactory instance."},{name:"get_service",title:"Get Service",description:"Retrieve one service, including its configuration."},{name:"create_service",title:"Create Service",description:"Create a new service (database, file, MCP, etc.)."},{name:"update_service",title:"Update Service",description:"Update an existing service, its label, or its configuration."},{name:"delete_service",title:"Delete Service",description:"Permanently delete a service by ID or name."},{name:"list_service_types",title:"List Service Types",description:"List the service types available on this instance."},{name:"get_service_type_schema",title:"Get Service Type Schema",description:"Return the configuration schema required to create a given service type."},{name:"get_environment",title:"Get Environment",description:"Read platform, license, and server environment information."},{name:"list_roles",title:"List Roles",description:"List the roles that control API access for apps and users."},{name:"create_role",title:"Create Role",description:"Create a role with service and component access rules."},{name:"get_role",title:"Get Role",description:"Retrieve one role with its access rules and lookups."},{name:"update_role",title:"Update Role",description:"Update a role, including its service access rules."},{name:"list_apps",title:"List Apps",description:"List apps (API keys) and the roles they are bound to."},{name:"create_app",title:"Create App",description:"Create an app, generating a new API key bound to a role."},{name:"get_app",title:"Get App",description:"Retrieve one app, including its API key and role."},{name:"list_admins",title:"List Admins",description:"List the administrator accounts on this instance."},{name:"get_access_audit",title:"Get Access Audit",description:"Report last-used / never-used / stale API keys, roles and users from system/access_usage."},{name:"call_system_api",title:"Call System API",description:"Call any /api/v2/system/* or /api/v2/user/* endpoint directly for operations not covered by a dedicated tool."}];function st(n){return"system_mcp"===(n??"").toString().trim().toLowerCase()}function oi(n,i){1&n&&(e.j41(0,"div",9),e.EFF(1," Loading data services\u2026 "),e.k0s())}function ii(n,i){if(1&n&&e.nrm(0,"fa-icon",15),2&n){const t=e.XpG(3);e.Y8G("icon",t.faCircleCheck)}}function ai(n,i){if(1&n){const t=e.RV6();e.j41(0,"li")(1,"button",12),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(2);return e.Njj(c.toggle(r.name))}),e.DNE(2,ii,1,1,"fa-icon",13),e.j41(3,"span",14),e.EFF(4),e.k0s()()()}if(2&n){const t=i.$implicit,o=e.XpG(2);e.R7$(1),e.AVh("data-services__chip--selected",o.isSelected(t.name)),e.R7$(1),e.Y8G("ngIf",o.isSelected(t.name)),e.R7$(2),e.JRh(t.label||t.name)}}function ri(n,i){if(1&n&&(e.j41(0,"ul",10),e.DNE(1,ai,5,4,"li",11),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.services)("ngForTrackBy",t.trackByName)}}function ci(n,i){1&n&&(e.j41(0,"p",16),e.EFF(1," No database services exist yet. Create one under API Generation & Connections and come back. "),e.k0s())}const si=new Set(["Database","Big Data","File","Excel"]);let li=(()=>{class n{constructor(){this.http=(0,e.WQX)(X.Qq),this.loading=!0,this.services=[],this.faDatabase=g.hem,this.faCircleCheck=g.QRE}ngOnInit(){(0,Oe.p)({types:this.http.get(`${N.C}/system/service_type`,{params:{fields:"name,group"}}),services:this.http.get(`${N.C}/system/service`,{params:{fields:"id,name,label,type",sort:"name"}})}).subscribe({next:({types:t,services:o})=>{const a=new Set((t.resource??[]).filter(r=>si.has(r.group??"")).map(r=>r.name));this.services=(o.resource??[]).filter(r=>a.has(r.type)),this.loading=!1},error:()=>{this.loading=!1}})}get selected(){return this.parse(this.form.get("config.defaultDataServices")?.value)}isSelected(t){return this.selected.includes(t)}toggle(t){const o=this.selected,a=o.includes(t)?o.filter(r=>r!==t):[...o,t];this.form.get("config.defaultDataServices")?.setValue(a)}parse(t){if(Array.isArray(t))return t.map(String).filter(o=>o.length>0);if("string"==typeof t&&t.trim().length>0)try{const o=JSON.parse(t);if(Array.isArray(o))return o.map(String).filter(a=>a.length>0)}catch{return[]}return[]}trackByName(t,o){return o.name}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-ai-data-services"]],inputs:{form:"form"},standalone:!0,features:[e.aNF],decls:12,vars:6,consts:[[1,"data-services"],[1,"data-services__header"],[1,"data-services__icon",3,"icon"],[1,"data-services__title"],[1,"data-services__count"],[1,"data-services__hint"],["class","data-services__loading",4,"ngIf"],["class","data-services__list",4,"ngIf"],["class","data-services__empty",4,"ngIf"],[1,"data-services__loading"],[1,"data-services__list"],[4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"data-services__chip",3,"click"],["class","data-services__chip-check",3,"icon",4,"ngIf"],[1,"data-services__name"],[1,"data-services__chip-check",3,"icon"],[1,"data-services__empty"]],template:function(o,a){1&o&&(e.j41(0,"div",0)(1,"div",1),e.nrm(2,"fa-icon",2),e.j41(3,"span",3),e.EFF(4,"Data Services"),e.k0s(),e.j41(5,"span",4),e.EFF(6),e.k0s()(),e.j41(7,"p",5),e.EFF(8," Pick the databases the AI may query. The AI sees the intersection of these and what the caller's role can read. Leave all unselected to allow every data service the role grants. "),e.k0s(),e.DNE(9,oi,2,0,"div",6),e.DNE(10,ri,2,2,"ul",7),e.DNE(11,ci,2,0,"p",8),e.k0s()),2&o&&(e.R7$(2),e.Y8G("icon",a.faDatabase),e.R7$(4),e.Lme(" ",a.selected.length," selected \xb7 ",a.services.length," available "),e.R7$(3),e.Y8G("ngIf",a.loading),e.R7$(1),e.Y8G("ngIf",!a.loading&&a.services.length>0),e.R7$(1),e.Y8G("ngIf",!a.loading&&0===a.services.length))},dependencies:[_.MD,_.Sq,_.bT,k.dX,k.aY],styles:[".data-services[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:1.5rem 1.75rem;margin:1rem 0;background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);font-size:1.4rem;color:var(--df-text)}.data-services__header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.data-services__icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:1.8rem}.data-services__title[_ngcontent-%COMP%]{font-weight:600;font-size:1.5rem;letter-spacing:-.01em}.data-services__count[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}.data-services__hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-2);line-height:1.55}.data-services__loading[_ngcontent-%COMP%], .data-services__empty[_ngcontent-%COMP%]{color:var(--df-text-muted);font-style:italic;font-size:1.3rem}.data-services__list[_ngcontent-%COMP%]{list-style:none;margin:.25rem 0 0;padding:0;display:flex;flex-wrap:wrap;gap:.625rem .75rem}.data-services__list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.625rem}.data-services__chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font:inherit;font-size:1.4rem;color:inherit;cursor:pointer;transition:border-color .12s ease,background .12s ease}.data-services__chip[_ngcontent-%COMP%]:hover{border-color:var(--df-accent);background:var(--df-hover)}.data-services__chip--selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-text)}.data-services__chip-check[_ngcontent-%COMP%]{color:var(--df-accent)}.data-services__name[_ngcontent-%COMP%]{font-weight:500}"]})}}return n})();var lt=d(23695),ce=d(58781),se=d(89115),di=d(82954),dt=d(82182),W=d(73907);function mi(n,i){1&n&&e.nrm(0,"div",18),2&n&&e.xc7("--confetti-index",i.$implicit)}function _i(n,i){1&n&&e.nrm(0,"div",19),2&n&&e.xc7("--firework-index",i.$implicit)}const gi=function(){return[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]},fi=function(){return[1,2,3,4,5]};function ui(n,i){1&n&&(e.j41(0,"div",15),e.DNE(1,mi,1,2,"div",16),e.DNE(2,_i,1,2,"div",17),e.k0s()),2&n&&(e.R7$(1),e.Y8G("ngForOf",e.lJ4(2,gi)),e.R7$(1),e.Y8G("ngForOf",e.lJ4(3,fi)))}function hi(n,i){1&n&&e.nrm(0,"div",29)}function bi(n,i){if(1&n&&(e.j41(0,"div",20),e.DNE(1,hi,1,0,"div",21),e.j41(2,"div",22),e.nrm(3,"fa-icon",23),e.k0s(),e.j41(4,"div",24)(5,"h4",25),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"p",26),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"span",27),e.nrm(12,"fa-icon",28),e.EFF(13),e.k0s()()()),2&n){const t=i.$implicit,o=i.index,a=e.XpG();e.AVh("revealed",a.currentStep>=o)("pulse-animation",a.currentStep===o),e.R7$(1),e.Y8G("ngIf",o0),e.R7$(2),e.SpI(" ",e.bMT(8,8,"services.celebration.exploreLater")," "),e.R7$(3),e.SpI(" ",e.bMT(11,10,"services.celebration.autoRedirectTest")," ")}}const yi=function(n){return{name:n}};let ki=(()=>{class n{constructor(t,o,a){this.dialogRef=t,this.data=o,this.router=a,this.destroy$=new se.B,this.faCheckCircle=g.SGM,this.faRocket=g.KMJ,this.faShieldAlt=g.imB,this.faKey=g.bMg,this.faBolt=g.zm_,this.faDatabase=g.hem,this.faCopy=g.jPR,this.faCheck=g.e68,this.faFlask=g.rIc,this.faInfoCircle=g.iW_,this.showConfetti=!0,this.currentStep=-1,this.allStepsRevealed=!1,this.countdown=15,this.apiKeyCopied=!1,this.baseUrl=window.location.origin,this.steps=[{icon:g.hem,title:"services.celebration.steps.database.title",description:"services.celebration.steps.database.description",timing:"< 100ms"},{icon:g.zm_,title:"services.celebration.steps.endpoints.title",description:"services.celebration.steps.endpoints.description",timing:"< 50ms"},{icon:g.imB,title:"services.celebration.steps.security.title",description:"services.celebration.steps.security.description",timing:"< 200ms"},{icon:g.bMg,title:"services.celebration.steps.apiKey.title",description:"services.celebration.steps.apiKey.description",timing:"Instant"}],t.disableClose=!0}ngOnInit(){this.revealSteps(),setTimeout(()=>{this.startCountdown()},3e3)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}revealSteps(){this.steps.forEach((o,a)=>{setTimeout(()=>{this.currentStep=a,a===this.steps.length-1&&(this.allStepsRevealed=!0)},500*(a+1))})}startCountdown(){(function pi(n=0,i=di.E){return n<0&&(n=0),(0,dt.O)(n,n,i)})(1e3).pipe((0,W.Q)(this.destroy$)).subscribe(()=>{this.countdown--,0===this.countdown&&this.goToApiDocs()})}goToApiDocs(){this.dialogRef.close(),this.router.navigate(["/api-connections/api-docs",this.data.serviceName])}copyApiKey(){this.data.apiKey&&(navigator.clipboard.writeText(this.data.apiKey),this.apiKeyCopied=!0,setTimeout(()=>{this.apiKeyCopied=!1},2e3))}skipToHome(){this.dialogRef.close(),this.router.navigate(["/home"])}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP),e.rXU(h.Vh),e.rXU(B.Ix))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-celebration-dialog"]],standalone:!0,features:[e.aNF],decls:21,vars:18,consts:[[1,"celebration-dialog"],["class","celebration-effects",4,"ngIf"],[1,"dialog-content"],[1,"success-header"],[1,"success-icon-wrapper"],[1,"rocket-icon",3,"icon"],[1,"success-circle"],[1,"celebration-title"],[1,"celebration-subtitle"],[1,"steps-container"],[1,"steps-title"],[1,"steps-timeline"],["class","step-item",3,"revealed","pulse-animation",4,"ngFor","ngForOf"],["class","api-connection-section",4,"ngIf"],["class","dialog-actions",4,"ngIf"],[1,"celebration-effects"],["class","confetti",3,"--confetti-index",4,"ngFor","ngForOf"],["class","firework",3,"--firework-index",4,"ngFor","ngForOf"],[1,"confetti"],[1,"firework"],[1,"step-item"],["class","step-connector",4,"ngIf"],[1,"step-icon"],[3,"icon"],[1,"step-content"],[1,"step-title"],[1,"step-description"],[1,"step-timing"],[1,"timing-icon",3,"icon"],[1,"step-connector"],[1,"api-connection-section"],[1,"endpoint-preview"],[1,"endpoint-label"],[1,"endpoint-icon",3,"icon"],[1,"endpoint-display"],[1,"endpoint-hint"],[1,"api-key-subsection"],[1,"api-key-label"],[1,"key-icon",3,"icon"],[1,"api-key-display"],["mat-icon-button","",3,"matTooltip","click"],[1,"usage-hint"],[1,"info-icon",3,"icon"],[1,"dialog-actions"],["mat-raised-button","","color","primary",1,"test-api-button",3,"click"],[1,"button-icon",3,"icon"],["class","countdown",4,"ngIf"],["mat-stroked-button","",1,"explore-later-button",3,"click"],[1,"auto-redirect-note"],[1,"countdown"]],template:function(o,a){1&o&&(e.j41(0,"div",0),e.DNE(1,ui,3,4,"div",1),e.j41(2,"div",2)(3,"div",3)(4,"div",4),e.nrm(5,"fa-icon",5)(6,"div",6),e.k0s(),e.j41(7,"h1",7),e.EFF(8),e.nI1(9,"transloco"),e.k0s(),e.j41(10,"p",8),e.EFF(11),e.nI1(12,"transloco"),e.k0s()(),e.j41(13,"div",9)(14,"h3",10),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.j41(17,"div",11),e.DNE(18,bi,14,14,"div",12),e.k0s()(),e.DNE(19,vi,29,25,"div",13),e.DNE(20,xi,12,12,"div",14),e.k0s()()),2&o&&(e.R7$(1),e.Y8G("ngIf",a.showConfetti),e.R7$(2),e.Y8G("@fadeIn",void 0),e.R7$(2),e.Y8G("icon",a.faRocket),e.R7$(3),e.SpI(" ",e.bMT(9,9,"services.celebration.title")," "),e.R7$(3),e.SpI(" ",e.i5U(12,11,"services.celebration.subtitle",e.eq3(16,yi,a.data.serviceName))," "),e.R7$(4),e.SpI(" ",e.bMT(16,14,"services.celebration.whatHappened")," "),e.R7$(3),e.Y8G("ngForOf",a.steps),e.R7$(1),e.Y8G("ngIf",a.data.apiKey&&a.allStepsRevealed),e.R7$(1),e.Y8G("ngIf",a.allStepsRevealed))},dependencies:[_.MD,_.Sq,_.bT,h.hM,b.Hl,b.$z,b.iY,A.m_,$.uc,$.oV,I.Q8,I.Kj,k.dX,k.aY],styles:['.celebration-dialog[_ngcontent-%COMP%]{position:relative;padding:0;overflow:hidden;height:100%;display:flex;flex-direction:column;background:var(--df-surface);animation:_ngcontent-%COMP%_subtle-entrance .4s ease-out}@keyframes _ngcontent-%COMP%_subtle-entrance{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.celebration-effects[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;overflow:hidden;z-index:1}.confetti[_ngcontent-%COMP%]{position:absolute;width:10px;height:10px;top:-10px;animation:_ngcontent-%COMP%_confetti-fall calc(3s + var(--confetti-index) * .1s) linear infinite;animation-delay:calc(var(--confetti-index) * -.2s)}.confetti[_ngcontent-%COMP%]:before{content:"";position:absolute;width:100%;height:100%;background:linear-gradient(45deg,#7f11e0,#ff4081,#4caf50,#ffc107,#2196f3);background-size:500%;animation:_ngcontent-%COMP%_confetti-rotate 1s linear infinite;border-radius:2px;transform:rotate(calc(var(--confetti-index) * 30deg))}.confetti[_ngcontent-%COMP%]:nth-child(odd){left:calc(var(--confetti-index) * 6.5%)}.confetti[_ngcontent-%COMP%]:nth-child(2n){right:calc(var(--confetti-index) * 6.5%)}@keyframes _ngcontent-%COMP%_confetti-fall{0%{transform:translateY(-10px) rotate(0);opacity:1}to{transform:translateY(550px) rotate(720deg);opacity:0}}@keyframes _ngcontent-%COMP%_confetti-rotate{0%{background-position:0% 50%}to{background-position:100% 50%}}.firework[_ngcontent-%COMP%]{position:absolute;width:4px;height:4px;border-radius:50%;animation:_ngcontent-%COMP%_firework-launch calc(2s + var(--firework-index) * .3s) ease-out infinite;animation-delay:calc(var(--firework-index) * .5s)}.firework[_ngcontent-%COMP%]:nth-child(1){left:20%;background:#7f11e0}.firework[_ngcontent-%COMP%]:nth-child(2){left:40%;background:#ff4081}.firework[_ngcontent-%COMP%]:nth-child(3){left:50%;background:#4caf50}.firework[_ngcontent-%COMP%]:nth-child(4){left:60%;background:#ffc107}.firework[_ngcontent-%COMP%]:nth-child(5){left:80%;background:#2196f3}.firework[_ngcontent-%COMP%]:after{content:"";position:absolute;width:100px;height:100px;border-radius:50%;top:-48px;left:-48px;background:radial-gradient(circle,currentColor 0%,transparent 70%);opacity:0;animation:_ngcontent-%COMP%_firework-explode calc(2s + var(--firework-index) * .3s) ease-out infinite;animation-delay:calc(var(--firework-index) * .5s + .8s)}@keyframes _ngcontent-%COMP%_firework-launch{0%{transform:translateY(100vh) scale(1);opacity:1}40%{transform:translateY(30vh) scale(1);opacity:1}to{transform:translateY(30vh) scale(0);opacity:0}}@keyframes _ngcontent-%COMP%_firework-explode{0%{transform:scale(0);opacity:0}50%{transform:scale(1);opacity:.8}to{transform:scale(1.5);opacity:0}}.dialog-content[_ngcontent-%COMP%]{position:relative;z-index:2;padding:20px;max-width:100%;margin:0 auto;text-align:center;overflow-y:auto;overflow-x:hidden;flex:1;max-height:calc(85vh - 40px)}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:var(--df-surface-2)}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--df-border);border-radius:3px}.dialog-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb:hover{background:var(--df-text-faint)}.success-header[_ngcontent-%COMP%]{text-align:center;margin-bottom:16px;animation:_ngcontent-%COMP%_fadeInDown .6s ease-out}.success-icon-wrapper[_ngcontent-%COMP%]{position:relative;width:64px;height:64px;margin:0 auto 16px}.success-icon-wrapper[_ngcontent-%COMP%] .rocket-icon[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);font-size:32px;color:var(--df-accent);z-index:2;animation:_ngcontent-%COMP%_rocket-launch 2s ease-in-out infinite}.success-icon-wrapper[_ngcontent-%COMP%] .success-circle[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;border-radius:50%;background:var(--df-accent);opacity:.1;animation:_ngcontent-%COMP%_pulse-circle 2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_rocket-launch{0%,to{transform:translate(-50%,-50%) translateY(0)}50%{transform:translate(-50%,-50%) translateY(-5px)}}@keyframes _ngcontent-%COMP%_pulse-circle{0%,to{transform:scale(1);opacity:.1}50%{transform:scale(1.2);opacity:.2}}.celebration-title[_ngcontent-%COMP%]{font-size:2rem;font-weight:650;letter-spacing:-.015em;color:var(--df-text);margin:0 0 6px;animation:_ngcontent-%COMP%_bounce-in .8s ease-out;text-align:center}.celebration-subtitle[_ngcontent-%COMP%]{font-size:1.4rem;color:var(--df-text-2);margin:0;text-align:center}.steps-container[_ngcontent-%COMP%]{margin:12px 0;text-align:left;padding:0 8px}.steps-title[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);margin-bottom:12px;text-align:center}.steps-timeline[_ngcontent-%COMP%]{position:relative;padding-left:52px;max-width:450px;margin:0 auto}.step-item[_ngcontent-%COMP%]{position:relative;display:flex;align-items:flex-start;margin-bottom:12px;opacity:0;transform:translate(-20px);transition:all .5s ease-out}.step-item.revealed[_ngcontent-%COMP%]{opacity:1;transform:translate(0)}.step-item.pulse-animation[_ngcontent-%COMP%] .step-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_icon-pulse .6s ease-out}.step-item[_ngcontent-%COMP%] .step-connector[_ngcontent-%COMP%]{position:absolute;left:-35px;top:36px;width:2px;height:36px;background:var(--df-border)}.step-icon[_ngcontent-%COMP%]{position:absolute;left:-52px;width:36px;height:36px;border-radius:50%;background:var(--df-accent);display:flex;align-items:center;justify-content:center;color:var(--df-accent-contrast);font-size:16px;flex-shrink:0}@keyframes _ngcontent-%COMP%_icon-pulse{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}.step-content[_ngcontent-%COMP%]{margin-left:0;flex:1}.step-title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin:0 0 3px}.step-description[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-2);margin:0 0 6px;line-height:1.4}.step-timing[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:4px;font-size:1.2rem;color:var(--df-success);font-weight:500}.step-timing[_ngcontent-%COMP%] .timing-icon[_ngcontent-%COMP%]{font-size:1.2rem}.api-connection-section[_ngcontent-%COMP%]{margin:12px auto;padding:14px;background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:var(--df-radius);animation:_ngcontent-%COMP%_slideUp .5s ease-out;max-width:480px}.endpoint-preview[_ngcontent-%COMP%]{margin-bottom:12px;padding-bottom:10px;border-bottom:1px solid var(--df-border-2)}.endpoint-label[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin-bottom:10px;display:flex;align-items:center;gap:8px}.endpoint-label[_ngcontent-%COMP%] .endpoint-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px}.endpoint-display[_ngcontent-%COMP%]{position:relative}.endpoint-display[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{display:block;padding:12px 16px;background:var(--df-code-bg);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.3rem;color:var(--df-code-text);overflow-x:auto;margin-bottom:4px}.endpoint-display[_ngcontent-%COMP%] .endpoint-hint[_ngcontent-%COMP%]{font-size:1.1rem;color:var(--df-text-faint);font-style:italic}.api-key-subsection[_ngcontent-%COMP%]{margin-bottom:10px}.api-key-label[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:500;color:var(--df-text);margin-bottom:10px;display:flex;align-items:center;gap:8px}.api-key-label[_ngcontent-%COMP%] .key-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:16px}.api-key-display[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.api-key-display[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{flex:1;padding:10px 14px;background:var(--df-code-bg);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.3rem;color:var(--df-code-text);overflow-x:auto}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{transition:all .2s ease}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{font-size:16px;color:var(--df-text-2);transition:color .2s ease}.api-key-display[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover fa-icon[_ngcontent-%COMP%]{color:var(--df-accent)}.usage-hint[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:8px;padding:10px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);font-size:1.2rem;color:var(--df-text-2);line-height:1.4}.usage-hint[_ngcontent-%COMP%] .info-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:14px;margin-top:1px}.dialog-actions[_ngcontent-%COMP%]{text-align:center;margin-top:12px;padding-bottom:8px;animation:_ngcontent-%COMP%_fadeIn .5s ease-out}.test-api-button[_ngcontent-%COMP%]{padding:10px 28px;font-size:1.5rem;font-weight:500;letter-spacing:.3px;margin-bottom:10px;min-width:200px}.test-api-button[_ngcontent-%COMP%] .button-icon[_ngcontent-%COMP%]{margin-right:8px;font-size:18px}.test-api-button[_ngcontent-%COMP%] .countdown[_ngcontent-%COMP%]{margin-left:8px;opacity:.7;font-size:1.4rem}.explore-later-button[_ngcontent-%COMP%]{font-size:1.4rem;color:var(--df-text-2)}.explore-later-button[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.auto-redirect-note[_ngcontent-%COMP%]{margin-top:10px;font-size:1.2rem;color:var(--df-text-faint);text-align:center}@keyframes _ngcontent-%COMP%_fadeInDown{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}@keyframes _ngcontent-%COMP%_slideUp{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_bounce-in{0%{transform:scale(.8);opacity:0}50%{transform:scale(1.05)}to{transform:scale(1);opacity:1}}']})}}return n})();var le=d(57588),pt=d(39258),mt=d(82444),_t=d(10056);function Mi(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",11)(1,"mat-button-toggle-group",12),e.bIt("click",function(a){return a.stopPropagation()})("change",function(a){e.eBV(t);const r=e.XpG().$implicit,c=e.XpG();return e.Njj(c.onAccessLevelChange(r,a.value))}),e.j41(2,"mat-button-toggle",13)(3,"span",14),e.nrm(4,"fa-icon",15),e.k0s(),e.EFF(5," Read Only "),e.k0s(),e.j41(6,"mat-button-toggle",16)(7,"span",14),e.nrm(8,"fa-icon",15),e.k0s(),e.EFF(9," Read & Write "),e.k0s(),e.j41(10,"mat-button-toggle",17)(11,"span",14),e.nrm(12,"fa-icon",15),e.k0s(),e.EFF(13," Full Access "),e.k0s()()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("value",t.selected?t.level:null)("disabled",!t.selected),e.R7$(3),e.Y8G("icon",o.faEye),e.R7$(4),e.Y8G("icon",o.faPen),e.R7$(4),e.Y8G("icon",o.faLockOpen)}}function Pi(n,i){if(1&n){const t=e.RV6();e.j41(0,"mat-card",6),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG();return e.Njj(c.toggleCard(r))}),e.j41(1,"div",7)(2,"div",8),e.EFF(3),e.k0s(),e.j41(4,"div",9),e.EFF(5),e.k0s()(),e.DNE(6,Mi,14,5,"div",10),e.k0s()}if(2&n){const t=i.$implicit;e.AVh("selected",t.selected)("read-level",t.selected&&"read"===t.level)("write-level",t.selected&&"write"===t.level)("full-level",t.selected&&"full"===t.level),e.R7$(3),e.JRh(t.label),e.R7$(2),e.JRh(t.description),e.R7$(1),e.Y8G("ngIf","fullAccess"!==t.key)}}let Oi=(()=>{class n{constructor(t,o,a,r,c){this.router=t,this.snackBar=o,this.systemService=a,this.snackbarService=r,this.dialog=c,this.serviceName="",this.serviceId=null,this.isDatabase=!1,this.isFirstTimeUser=!1,this.goBack=new e.bkB,this.faEye=g.pS3,this.faPen=g.hpd,this.faLockOpen=g.pNp,this.securityConfigurations=[],this.accessOptions=[]}ngOnInit(){this.initializeAccessOptions()}initializeAccessOptions(){this.accessOptions=[{key:"fullAccess",label:"Full Access",description:"Grant complete access to all database components",selected:!1,level:"read"},{key:"schemaAccess",label:"Schema Access",description:"Configure access to specific database schemas",selected:!1,level:"read"},{key:"tableAccess",label:"Table Access",description:"Manage access to individual database tables",selected:!1,level:"read"},{key:"storedProcedures",label:"Stored Procedures",description:"Control access to stored procedures",selected:!1,level:"read"},{key:"functions",label:"Functions",description:"Set access levels for database functions",selected:!1,level:"read"}]}toggleCard(t){if("fullAccess"===t.key)t.selected||this.accessOptions.forEach(o=>{"fullAccess"!==o.key&&o.selected&&(o.selected=!1,this.removeSecurityConfiguration(o.key))});else{const o=this.accessOptions.find(a=>"fullAccess"===a.key);o&&o.selected&&(o.selected=!1,this.removeSecurityConfiguration(o.key))}t.selected=!t.selected,t.selected?this.addSecurityConfiguration(t):this.removeSecurityConfiguration(t.key)}addSecurityConfiguration(t){let o="",a="";switch(t.key){case"fullAccess":o="all",a="*";break;case"schemaAccess":o="schema",a="_schema/*";break;case"tableAccess":o="tables",a="_table/*";break;case"storedProcedures":o="procedures",a="_proc/*";break;case"functions":o="functions",a="_func/*"}const r={accessType:o,accessLevel:t.level,component:a};this.securityConfigurations.push(r),console.log("Added security configuration:",r),console.log("All configurations:",this.securityConfigurations)}removeSecurityConfiguration(t){const o=this.securityConfigurations.findIndex(a=>{switch(t){case"fullAccess":return"all"===a.accessType;case"schemaAccess":return"schema"===a.accessType;case"tableAccess":return"tables"===a.accessType;case"storedProcedures":return"procedures"===a.accessType;case"functions":return"functions"===a.accessType;default:return!1}});if(-1!==o){const a=this.securityConfigurations.splice(o,1)[0];console.log("Removed security configuration:",a),console.log("Remaining configurations:",this.securityConfigurations)}}onAccessLevelChange(t,o){t.level=o;const a=this.securityConfigurations.findIndex(r=>{switch(t.key){case"fullAccess":return"all"===r.accessType;case"schemaAccess":return"schema"===r.accessType;case"tableAccess":return"tables"===r.accessType;case"storedProcedures":return"procedures"===r.accessType;case"functions":return"functions"===r.accessType;default:return!1}});-1!==a&&(this.securityConfigurations[a].accessLevel=o,console.log("Updated access level for configuration:",this.securityConfigurations[a]))}handleGoBack(){console.log("Back button clicked"),this.goBack.emit()}isSecurityConfigValid(){if(!this.accessOptions.some(o=>o.selected)||0===this.securityConfigurations.length)return!1;for(const o of this.securityConfigurations){if(!o.accessType||!o.accessLevel||!o.component)return!1;if("all"===o.accessType){if("*"!==o.component)return!1}else if(!o.component.includes("/*"))return!1}return!0}saveSecurityConfig(){if(!this.isSecurityConfigValid())return void this.snackbarService.openSnackBar("Please select at least one access option and ensure all required fields are filled","error");if(!this.serviceId)return void this.snackBar.open("No service ID found. Please try again.","Close",{duration:3e3});const t=this.formatServiceName(this.serviceName),o=`${this.serviceName}_auto_role`,a=this.securityConfigurations.map(c=>({service_id:this.serviceId,component:c.component,verb_mask:this.getAccessLevel(c.accessLevel),requestor_mask:3,filters:[],filter_op:"AND"})),r={resource:[{name:o,description:`Auto-generated role for service ${this.serviceName}`,is_active:!0,role_service_access_by_role_id:a,user_to_app_to_role_by_role_id:[]}]};console.log("Creating role with multiple configurations:",r),this.systemService.post("role",r).pipe((0,R.W)(c=>(0,ae.$)(()=>c)),(0,le.n)(c=>c?.resource?.[0]?.id?this.systemService.post("app?fields=*&related=role_by_role_id",{resource:[{name:`${this.serviceName}_app`,description:`Auto-generated app for service ${this.serviceName}`,type:"0",role_id:c.resource[0].id,is_active:!0,url:null,storage_service_id:null,storage_container:null,path:null}]}).pipe((0,R.W)(p=>(this.snackBar.open(`Error creating app: ${(0,ke.cQ)(p).message}`,"Close",{duration:5e3}),(0,ae.$)(()=>p))),(0,z.T)(p=>{if(!p?.resource?.[0])throw new Error("App response missing resource array");const f=p.resource[0];if(!f.apiKey)throw new Error("App response missing apiKey");return{apiKey:f.apiKey,formattedName:t}}),(0,R.W)(p=>(0,ae.$)(()=>p))):(0,ae.$)(()=>new Error("Invalid role response"))),(0,z.T)(c=>{if(!c?.apiKey)throw new Error("Invalid app response");return{apiKey:c.apiKey,formattedName:t}})).subscribe({next:c=>{navigator.clipboard?navigator.clipboard.writeText(c.apiKey).then(()=>{this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s) and API Key copied to clipboard`,"success")}).catch(()=>{this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s), but failed to copy API Key`,"success")}):this.snackbarService.openSnackBar(`API Created with ${this.securityConfigurations.length} security configuration(s), but failed to copy API Key`,"success"),this.isFirstTimeUser&&this.isDatabase?this.dialog.open(ki,{width:"550px",maxWidth:"90vw",maxHeight:"85vh",disableClose:!0,panelClass:"celebration-dialog-container",data:{serviceName:c.formattedName,apiKey:c.apiKey,isFirstTime:!0}}):this.router.navigateByUrl(`/api-connections/api-docs/${c.formattedName}`,{replaceUrl:!0}).then(s=>{s||this.router.navigate(["api-connections","api-docs",c.formattedName],{replaceUrl:!0})})},error:c=>{this.snackbarService.openSnackBar("Error saving security configuration","error")}})}getAccessLevel(t){switch(t){case"read":return 1;case"write":return 7;case"full":return 15;default:return 0}}formatServiceName(t){return t.toLowerCase().replace(/\s+/g,"").replace(/[^a-z0-9_-]/g,"")}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(B.Ix),e.rXU(pt.UG),e.rXU(mt.D),e.rXU(_t.L),e.rXU(h.bZ))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-security-config"]],inputs:{serviceName:"serviceName",serviceId:"serviceId",isDatabase:"isDatabase",isFirstTimeUser:"isFirstTimeUser"},outputs:{goBack:"goBack"},standalone:!0,features:[e.aNF],decls:10,vars:2,consts:[[1,"security-config-wrapper"],[1,"security-cards-container"],["class","security-option-card",3,"selected","read-level","write-level","full-level","click",4,"ngFor","ngForOf"],[1,"action-buttons"],["mat-stroked-button","",3,"click"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],[1,"security-option-card",3,"click"],[1,"card-header"],[1,"card-title"],[1,"card-description"],["class","toggle-container",4,"ngIf"],[1,"toggle-container"],["appearance","legacy",1,"access-toggle-group",3,"value","disabled","click","change"],["value","read",1,"read-toggle"],[1,"toggle-icon"],[3,"icon"],["value","write",1,"write-toggle"],["value","full",1,"full-toggle"]],template:function(o,a){1&o&&(e.j41(0,"div",0)(1,"h3"),e.EFF(2,"Security Configuration"),e.k0s(),e.j41(3,"div",1),e.DNE(4,Pi,7,11,"mat-card",2),e.k0s(),e.j41(5,"div",3)(6,"button",4),e.bIt("click",function(){return a.handleGoBack()}),e.EFF(7,"Back"),e.k0s(),e.j41(8,"button",5),e.bIt("click",function(){return a.saveSecurityConfig()}),e.EFF(9," Apply Security Configuration "),e.k0s()()()),2&o&&(e.R7$(4),e.Y8G("ngForOf",a.accessOptions),e.R7$(4),e.Y8G("disabled",!a.isSecurityConfigValid()))},dependencies:[_.MD,_.Sq,_.bT,m.YN,re.Hu,re.RN,ce.Vg,ce.ec,ce.pc,b.Hl,b.$z,xe.g7,A.m_,k.dX,k.aY],styles:[".security-config-wrapper[_ngcontent-%COMP%]{padding:24px;max-width:1200px;margin:0 auto}.security-config-wrapper[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin-bottom:24px;font-size:24px;font-weight:600;color:#1976d2;text-align:center}.security-cards-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:20px;margin-bottom:32px}@media (max-width: 768px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:1fr;gap:16px}}@media (min-width: 769px) and (max-width: 1024px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media (min-width: 1025px){.security-cards-container[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}.security-option-card[_ngcontent-%COMP%]{padding:20px;cursor:pointer;border:2px solid #e0e0e0;border-radius:12px;transition:all .3s cubic-bezier(.4,0,.2,1);background:linear-gradient(135deg,#ffffff 0%,#f8f9fa 100%);position:relative;overflow:hidden}.security-option-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 8px 25px #0000001a;border-color:#1976d2}.security-option-card.selected[_ngcontent-%COMP%]{border-color:#1976d2;box-shadow:0 4px 20px #1976d226}.security-option-card.selected.read-level[_ngcontent-%COMP%]{border-color:#2196f3;background:linear-gradient(135deg,#e3f2fd 0%,#bbdefb 100%)}.security-option-card.selected.write-level[_ngcontent-%COMP%]{border-color:#fbc02d;background:linear-gradient(135deg,#fffde7 0%,#fff9c4 100%)}.security-option-card.selected.full-level[_ngcontent-%COMP%]{border-color:#43a047;background:linear-gradient(135deg,#e8f5e9 0%,#c8e6c9 100%)}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%]{margin-bottom:16px}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] .card-title[_ngcontent-%COMP%]{font-weight:600;font-size:18px;margin-bottom:8px;color:#333}.security-option-card[_ngcontent-%COMP%] .card-header[_ngcontent-%COMP%] .card-description[_ngcontent-%COMP%]{font-size:14px;color:#666;line-height:1.5}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-level-label[_ngcontent-%COMP%]{font-size:12px;font-weight:600;color:#666;margin-bottom:8px;text-transform:uppercase;letter-spacing:.5px}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:4px;box-shadow:none}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle-checked[_ngcontent-%COMP%]{color:#666}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{background-color:#eee;font-size:12px;padding:6px 12px;width:100%;border-radius:6px;transition:all .2s ease}@media (max-width: 768px){.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{width:150px}}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none;background-color:#f5f5f5;color:#999;border-color:#ddd}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-icon[_ngcontent-%COMP%]{margin-right:4px;font-size:14px}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.read-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#2196f3;color:#fff}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.write-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#fbc02d;color:#fff}.security-option-card[_ngcontent-%COMP%] .toggle-container[_ngcontent-%COMP%] .access-toggle-group[_ngcontent-%COMP%] .mat-button-toggle.full-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background-color:#43a047;color:#fff}.action-buttons[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:12px;margin-top:24px;padding-top:16px;border-top:1px solid #e0e0e0}"]})}}return n})();var je=d(20271),U=d(84246),Fi=d(83801),gt=d(31933),Di=d(67261);let Ne=class tt{constructor(i,t,o,a,r){this.dialog=i,this.fileService=t,this.cacheService=o,this.baseService=a,this.themeService=r,this.storageServices=[],this.checked=!1,this.isDarkMode=this.themeService.darkMode$,this.baseService.getAll({additionalParams:[{key:"group",value:"source control,file"}]}).subscribe(c=>{this.storageServices=c.services})}ngOnInit(){this.content.setValue(this.contentText)}fileUpload(i){const t=i.target;t.files&&(0,gt.Sj)(t.files[0]).subscribe(o=>{this.content.setValue(o)})}githubImport(){this.dialog.open(Di.z).afterClosed().subscribe(t=>{t&&this.content.setValue(window.atob(t.data.content))})}static{this.\u0275fac=function(t){return new(t||tt)(e.rXU(h.bZ),e.rXU(K.qJ),e.rXU(K.j8),e.rXU(K.qJ),e.rXU(Me.n))}}static{this.\u0275cmp=e.VBU({type:tt,selectors:[["df-file-github"]],inputs:{cache:"cache",type:"type",contentText:"contentText",content:"content"},standalone:!0,features:[e.aNF],decls:11,vars:8,consts:[[1,"details-section"],[1,"actions","full-width"],["type","file",2,"display","none",3,"accept","change"],["fileInput",""],["type","button","mat-flat-button","",1,"save-btn",3,"click"],[1,"full-width",3,"formControl","mode"]],template:function(t,o){if(1&t){const a=e.RV6();e.j41(0,"div",0)(1,"div",1)(2,"input",2,3),e.bIt("change",function(c){return o.fileUpload(c)}),e.k0s(),e.j41(4,"button",4),e.bIt("click",function(){e.eBV(a);const c=e.sdS(3);return e.Njj(c.click())}),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.j41(7,"button",4),e.bIt("click",function(){return o.githubImport()}),e.EFF(8),e.nI1(9,"transloco"),e.k0s()(),e.nrm(10,"df-ace-editor",5),e.k0s()}2&t&&(e.R7$(5),e.SpI(" ",e.bMT(6,4,"desktopFile")," "),e.R7$(3),e.SpI(" ",e.bMT(9,6,"githubFile")," "),e.R7$(2),e.Y8G("formControl",o.content)("mode",o.type.getRawValue()))},dependencies:[b.Hl,b.$z,I.Kj,P.RG,V.Ve,xe.g7,m.YN,m.BC,h.hM,E.fS,lt.s,m.X1,m.l_],styles:[".actions[_ngcontent-%COMP%]{display:flex;gap:16px}"]})}};Ne=(0,Z.Cg)([(0,j.d)({checkProperties:!0})],Ne);var wi=d(40426),de=d(48444),pe=d(17612),Si=d(58359),Fe=d(87621),Ae=d(86953),ft=d(83607),Ye=d(10165),me=d(8275),Ve=d(25150),Ii=d(29094);function Ti(n,i){1&n&&e.SdG(0)}const Ri=["*"];let ut=(()=>{class n{constructor(t){this._elementRef=t}focus(){this._elementRef.nativeElement.focus()}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.aKT))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["","cdkStepHeader",""]],hostAttrs:["role","tab"]})}}return n})(),ht=(()=>{class n{constructor(t){this.template=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["","cdkStepLabel",""]]})}}return n})(),Ei=0;const bt=new e.nKC("STEPPER_GLOBAL_OPTIONS");let ze=(()=>{class n{get editable(){return this._editable}set editable(t){this._editable=(0,me.he)(t)}get optional(){return this._optional}set optional(t){this._optional=(0,me.he)(t)}get completed(){return null==this._completedOverride?this._getDefaultCompleted():this._completedOverride}set completed(t){this._completedOverride=(0,me.he)(t)}_getDefaultCompleted(){return this.stepControl?this.stepControl.valid&&this.interacted:this.interacted}get hasError(){return null==this._customError?this._getDefaultError():this._customError}set hasError(t){this._customError=(0,me.he)(t)}_getDefaultError(){return this.stepControl&&this.stepControl.invalid&&this.interacted}constructor(t,o){this._stepper=t,this.interacted=!1,this.interactedStream=new e.bkB,this._editable=!0,this._optional=!1,this._completedOverride=null,this._customError=null,this._stepperOptions=o||{},this._displayDefaultIndicatorType=!1!==this._stepperOptions.displayDefaultIndicatorType}select(){this._stepper.selected=this}reset(){this.interacted=!1,null!=this._completedOverride&&(this._completedOverride=!1),null!=this._customError&&(this._customError=!1),this.stepControl&&this.stepControl.reset()}ngOnChanges(){this._stepper._stateChanged()}_markAsInteracted(){this.interacted||(this.interacted=!0,this.interactedStream.emit(this))}_showError(){return this._stepperOptions.showError??null!=this._customError}static{this.\u0275fac=function(o){return new(o||n)(e.rXU((0,e.Rfq)(()=>be)),e.rXU(bt,8))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["cdk-step"]],contentQueries:function(o,a,r){if(1&o&&e.wni(r,ht,5),2&o){let c;e.mGM(c=e.lsd())&&(a.stepLabel=c.first)}},viewQuery:function(o,a){if(1&o&&e.GBs(e.C4Q,7),2&o){let r;e.mGM(r=e.lsd())&&(a.content=r.first)}},inputs:{stepControl:"stepControl",label:"label",errorMessage:"errorMessage",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],state:"state",editable:"editable",optional:"optional",completed:"completed",hasError:"hasError"},outputs:{interactedStream:"interacted"},exportAs:["cdkStep"],features:[e.OA$],ngContentSelectors:Ri,decls:1,vars:0,template:function(o,a){1&o&&(e.NAR(),e.DNE(0,Ti,1,0,"ng-template"))},encapsulation:2,changeDetection:0})}}return n})(),be=(()=>{class n{get linear(){return this._linear}set linear(t){this._linear=(0,me.he)(t)}get selectedIndex(){return this._selectedIndex}set selectedIndex(t){const o=(0,me.OE)(t);this.steps&&this._steps?(this._isValidIndex(o),this.selected?._markAsInteracted(),this._selectedIndex!==o&&!this._anyControlsInvalidOrPending(o)&&(o>=this._selectedIndex||this.steps.toArray()[o].editable)&&this._updateSelectedItemIndex(o)):this._selectedIndex=o}get selected(){return this.steps?this.steps.toArray()[this.selectedIndex]:void 0}set selected(t){this.selectedIndex=t&&this.steps?this.steps.toArray().indexOf(t):-1}get orientation(){return this._orientation}set orientation(t){this._orientation=t,this._keyManager&&this._keyManager.withVerticalOrientation("vertical"===t)}constructor(t,o,a){this._dir=t,this._changeDetectorRef=o,this._elementRef=a,this._destroyed=new se.B,this.steps=new e.rOR,this._sortedHeaders=new e.rOR,this._linear=!1,this._selectedIndex=0,this.selectionChange=new e.bkB,this.selectedIndexChange=new e.bkB,this._orientation="horizontal",this._groupId=Ei++}ngAfterContentInit(){this._steps.changes.pipe((0,fe.Z)(this._steps),(0,W.Q)(this._destroyed)).subscribe(t=>{this.steps.reset(t.filter(o=>o._stepper===this)),this.steps.notifyOnChanges()})}ngAfterViewInit(){this._stepHeader.changes.pipe((0,fe.Z)(this._stepHeader),(0,W.Q)(this._destroyed)).subscribe(t=>{this._sortedHeaders.reset(t.toArray().sort((o,a)=>o._elementRef.nativeElement.compareDocumentPosition(a._elementRef.nativeElement)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)),this._sortedHeaders.notifyOnChanges()}),this._keyManager=new ft.Bu(this._sortedHeaders).withWrap().withHomeAndEnd().withVerticalOrientation("vertical"===this._orientation),(this._dir?this._dir.change:(0,Q.of)()).pipe((0,fe.Z)(this._layoutDirection()),(0,W.Q)(this._destroyed)).subscribe(t=>this._keyManager.withHorizontalOrientation(t)),this._keyManager.updateActiveItem(this._selectedIndex),this.steps.changes.subscribe(()=>{this.selected||(this._selectedIndex=Math.max(this._selectedIndex-1,0))}),this._isValidIndex(this._selectedIndex)||(this._selectedIndex=0)}ngOnDestroy(){this._keyManager?.destroy(),this.steps.destroy(),this._sortedHeaders.destroy(),this._destroyed.next(),this._destroyed.complete()}next(){this.selectedIndex=Math.min(this._selectedIndex+1,this.steps.length-1)}previous(){this.selectedIndex=Math.max(this._selectedIndex-1,0)}reset(){this._updateSelectedItemIndex(0),this.steps.forEach(t=>t.reset()),this._stateChanged()}_getStepLabelId(t){return`cdk-step-label-${this._groupId}-${t}`}_getStepContentId(t){return`cdk-step-content-${this._groupId}-${t}`}_stateChanged(){this._changeDetectorRef.markForCheck()}_getAnimationDirection(t){const o=t-this._selectedIndex;return o<0?"rtl"===this._layoutDirection()?"next":"previous":o>0?"rtl"===this._layoutDirection()?"previous":"next":"current"}_getIndicatorType(t,o="number"){const a=this.steps.toArray()[t],r=this._isCurrentStep(t);return a._displayDefaultIndicatorType?this._getDefaultIndicatorLogic(a,r):this._getGuidelineLogic(a,r,o)}_getDefaultIndicatorLogic(t,o){return t._showError()&&t.hasError&&!o?"error":!t.completed||o?"number":t.editable?"edit":"done"}_getGuidelineLogic(t,o,a="number"){return t._showError()&&t.hasError&&!o?"error":t.completed&&!o?"done":t.completed&&o?a:t.editable&&o?"edit":a}_isCurrentStep(t){return this._selectedIndex===t}_getFocusIndex(){return this._keyManager?this._keyManager.activeItemIndex:this._selectedIndex}_updateSelectedItemIndex(t){const o=this.steps.toArray();this.selectionChange.emit({selectedIndex:t,previouslySelectedIndex:this._selectedIndex,selectedStep:o[t],previouslySelectedStep:o[this._selectedIndex]}),this._containsFocus()?this._keyManager.setActiveItem(t):this._keyManager.updateActiveItem(t),this._selectedIndex=t,this.selectedIndexChange.emit(this._selectedIndex),this._stateChanged()}_onKeydown(t){const o=(0,Ve.rp)(t),a=t.keyCode,r=this._keyManager;null==r.activeItemIndex||o||a!==Ve.t6&&a!==Ve.Fm?r.setFocusOrigin("keyboard").onKeydown(t):(this.selectedIndex=r.activeItemIndex,t.preventDefault())}_anyControlsInvalidOrPending(t){return!!(this._linear&&t>=0)&&this.steps.toArray().slice(0,t).some(o=>{const a=o.stepControl;return(a?a.invalid||a.pending||!o.interacted:!o.completed)&&!o.optional&&!o._completedOverride})}_layoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_containsFocus(){const t=this._elementRef.nativeElement,o=(0,Ii.vc)();return t===o||t.contains(o)}_isValidIndex(t){return t>-1&&(!this.steps||t{class n{constructor(t){this._stepper=t,this.type="submit"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(be))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","cdkStepperNext",""]],hostVars:1,hostBindings:function(o,a){1&o&&e.bIt("click",function(){return a._stepper.next()}),2&o&&e.Mr5("type",a.type)},inputs:{type:"type"}})}}return n})(),$i=(()=>{class n{constructor(t){this._stepper=t,this.type="button"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(be))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","cdkStepperPrevious",""]],hostVars:1,hostBindings:function(o,a){1&o&&e.bIt("click",function(){return a._stepper.previous()}),2&o&&e.Mr5("type",a.type)},inputs:{type:"type"}})}}return n})(),ji=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({imports:[Ye.jI]})}}return n})();var Ni=d(52693),Ai=d(11224),F=d(89411);function Yi(n,i){if(1&n&&e.eu8(0,8),2&n){const t=e.XpG();e.Y8G("ngTemplateOutlet",t.iconOverrides[t.state])("ngTemplateOutletContext",t._getIconContext())}}function Vi(n,i){if(1&n&&(e.j41(0,"span",13),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._getDefaultTextForState(t.state))}}function zi(n,i){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._intl.completedLabel)}}function Xi(n,i){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._intl.editableLabel)}}function Bi(n,i){if(1&n&&(e.j41(0,"mat-icon",13),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.JRh(t._getDefaultTextForState(t.state))}}function Li(n,i){if(1&n&&(e.qex(0,9),e.DNE(1,Vi,2,1,"span",10),e.DNE(2,zi,2,1,"span",11),e.DNE(3,Xi,2,1,"span",11),e.DNE(4,Bi,2,1,"mat-icon",12),e.bVm()),2&n){const t=e.XpG();e.Y8G("ngSwitch",t.state),e.R7$(1),e.Y8G("ngSwitchCase","number"),e.R7$(1),e.Y8G("ngIf","done"===t.state),e.R7$(1),e.Y8G("ngIf","edit"===t.state)}}function Ui(n,i){if(1&n&&(e.j41(0,"div",15),e.eu8(1,16),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngTemplateOutlet",t._templateLabel().template)}}function Ji(n,i){if(1&n&&(e.j41(0,"div",15),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.label)}}function qi(n,i){if(1&n&&(e.j41(0,"div",17),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t._intl.optionalLabel)}}function Hi(n,i){if(1&n&&(e.j41(0,"div",18),e.EFF(1),e.k0s()),2&n){const t=e.XpG();e.R7$(1),e.JRh(t.errorMessage)}}function Ki(n,i){}function Qi(n,i){if(1&n&&(e.SdG(0),e.DNE(1,Ki,0,0,"ng-template",0)),2&n){const t=e.XpG();e.R7$(1),e.Y8G("cdkPortalOutlet",t._portal)}}const Wi=["*"];function Zi(n,i){1&n&&e.nrm(0,"div",11)}const vt=function(n,i){return{step:n,i}};function ea(n,i){if(1&n&&(e.qex(0),e.eu8(1,9),e.DNE(2,Zi,1,0,"div",10),e.bVm()),2&n){const t=i.$implicit,o=i.index,a=i.last;e.XpG(2);const r=e.sdS(4);e.R7$(1),e.Y8G("ngTemplateOutlet",r)("ngTemplateOutletContext",e.l_i(3,vt,t,o)),e.R7$(1),e.Y8G("ngIf",!a)}}const Ct=function(n){return{animationDuration:n}},xt=function(n,i){return{value:n,params:i}};function ta(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",12),e.bIt("@horizontalStepTransition.done",function(a){e.eBV(t);const r=e.XpG(2);return e.Njj(r._animationDone.next(a))}),e.eu8(1,13),e.k0s()}if(2&n){const t=i.$implicit,o=i.index,a=e.XpG(2);e.AVh("mat-horizontal-stepper-content-inactive",a.selectedIndex!==o),e.Y8G("@horizontalStepTransition",e.l_i(8,xt,a._getAnimationDirection(o),e.eq3(6,Ct,a._getAnimationDuration())))("id",a._getStepContentId(o)),e.BMQ("aria-labelledby",a._getStepLabelId(o)),e.R7$(1),e.Y8G("ngTemplateOutlet",t.content)}}function na(n,i){if(1&n&&(e.j41(0,"div",4)(1,"div",5),e.DNE(2,ea,3,6,"ng-container",6),e.k0s(),e.j41(3,"div",7),e.DNE(4,ta,2,11,"div",8),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngForOf",t.steps),e.R7$(2),e.Y8G("ngForOf",t.steps)}}function oa(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",15),e.eu8(1,9),e.j41(2,"div",16)(3,"div",17),e.bIt("@verticalStepTransition.done",function(a){e.eBV(t);const r=e.XpG(2);return e.Njj(r._animationDone.next(a))}),e.j41(4,"div",18),e.eu8(5,13),e.k0s()()()()}if(2&n){const t=i.$implicit,o=i.index,a=i.last,r=e.XpG(2),c=e.sdS(4);e.R7$(1),e.Y8G("ngTemplateOutlet",c)("ngTemplateOutletContext",e.l_i(10,vt,t,o)),e.R7$(1),e.AVh("mat-stepper-vertical-line",!a),e.R7$(1),e.AVh("mat-vertical-stepper-content-inactive",r.selectedIndex!==o),e.Y8G("@verticalStepTransition",e.l_i(15,xt,r._getAnimationDirection(o),e.eq3(13,Ct,r._getAnimationDuration())))("id",r._getStepContentId(o)),e.BMQ("aria-labelledby",r._getStepLabelId(o)),e.R7$(2),e.Y8G("ngTemplateOutlet",t.content)}}function ia(n,i){if(1&n&&(e.qex(0),e.DNE(1,oa,6,18,"div",14),e.bVm()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("ngForOf",t.steps)}}function aa(n,i){if(1&n){const t=e.RV6();e.j41(0,"mat-step-header",19),e.bIt("click",function(){const r=e.eBV(t).step;return e.Njj(r.select())})("keydown",function(a){e.eBV(t);const r=e.XpG();return e.Njj(r._onKeydown(a))}),e.k0s()}if(2&n){const t=i.step,o=i.i,a=e.XpG();e.AVh("mat-horizontal-stepper-header","horizontal"===a.orientation)("mat-vertical-stepper-header","vertical"===a.orientation),e.Y8G("tabIndex",a._getFocusIndex()===o?0:-1)("id",a._getStepLabelId(o))("index",o)("state",a._getIndicatorType(o,t.state))("label",t.stepLabel||t.label)("selected",a.selectedIndex===o)("active",a._stepIsNavigable(o,t))("optional",t.optional)("errorMessage",t.errorMessage)("iconOverrides",a._iconOverrides)("disableRipple",a.disableRipple||!a._stepIsNavigable(o,t))("color",t.color||a.color),e.BMQ("aria-posinset",o+1)("aria-setsize",a.steps.length)("aria-controls",a._getStepContentId(o))("aria-selected",a.selectedIndex==o)("aria-label",t.ariaLabel||null)("aria-labelledby",!t.ariaLabel&&t.ariaLabelledby?t.ariaLabelledby:null)("aria-disabled",!a._stepIsNavigable(o,t)||null)}}let De=(()=>{class n extends ht{static{this.\u0275fac=function(){let t;return function(a){return(t||(t=e.xGo(n)))(a||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["","matStepLabel",""]],features:[e.Vt3]})}}return n})(),we=(()=>{class n{constructor(){this.changes=new se.B,this.optionalLabel="Optional",this.completedLabel="Completed",this.editableLabel="Editable"}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();const ca={provide:we,deps:[[new e.Xx1,new e.kdw,we]],useFactory:function ra(n){return n||new we}},sa=(0,L.Zc)(class extends ut{constructor(i){super(i)}},"primary");let yt=(()=>{class n extends sa{constructor(t,o,a,r){super(a),this._intl=t,this._focusMonitor=o,this._intlSubscription=t.changes.subscribe(()=>r.markForCheck())}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._intlSubscription.unsubscribe(),this._focusMonitor.stopMonitoring(this._elementRef)}focus(t,o){t?this._focusMonitor.focusVia(this._elementRef,t,o):this._elementRef.nativeElement.focus(o)}_stringLabel(){return this.label instanceof De?null:this.label}_templateLabel(){return this.label instanceof De?this.label:null}_getHostElement(){return this._elementRef.nativeElement}_getIconContext(){return{index:this.index,active:this.active,optional:this.optional}}_getDefaultTextForState(t){return"number"==t?`${this.index+1}`:"edit"==t?"create":"error"==t?"warning":t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(we),e.rXU(ft.FN),e.rXU(e.aKT),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-step-header"]],hostAttrs:["role","tab",1,"mat-step-header"],inputs:{color:"color",state:"state",label:"label",errorMessage:"errorMessage",iconOverrides:"iconOverrides",index:"index",selected:"selected",active:"active",optional:"optional",disableRipple:"disableRipple"},features:[e.Vt3],decls:10,vars:19,consts:[["matRipple","",1,"mat-step-header-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-step-icon-content",3,"ngSwitch"],[3,"ngTemplateOutlet","ngTemplateOutletContext",4,"ngSwitchCase"],[3,"ngSwitch",4,"ngSwitchDefault"],[1,"mat-step-label"],["class","mat-step-text-label",4,"ngIf"],["class","mat-step-optional",4,"ngIf"],["class","mat-step-sub-label-error",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngSwitch"],["aria-hidden","true",4,"ngSwitchCase"],["class","cdk-visually-hidden",4,"ngIf"],["aria-hidden","true",4,"ngSwitchDefault"],["aria-hidden","true"],[1,"cdk-visually-hidden"],[1,"mat-step-text-label"],[3,"ngTemplateOutlet"],[1,"mat-step-optional"],[1,"mat-step-sub-label-error"]],template:function(o,a){1&o&&(e.nrm(0,"div",0),e.j41(1,"div")(2,"div",1),e.DNE(3,Yi,1,2,"ng-container",2),e.DNE(4,Li,5,4,"ng-container",3),e.k0s()(),e.j41(5,"div",4),e.DNE(6,Ui,2,1,"div",5),e.DNE(7,Ji,2,1,"div",5),e.DNE(8,qi,2,1,"div",6),e.DNE(9,Hi,2,1,"div",7),e.k0s()),2&o&&(e.Y8G("matRippleTrigger",a._getHostElement())("matRippleDisabled",a.disableRipple),e.R7$(1),e.ZvI("mat-step-icon-state-",a.state," mat-step-icon"),e.AVh("mat-step-icon-selected",a.selected),e.R7$(1),e.Y8G("ngSwitch",!(!a.iconOverrides||!a.iconOverrides[a.state])),e.R7$(1),e.Y8G("ngSwitchCase",!0),e.R7$(2),e.AVh("mat-step-label-active",a.active)("mat-step-label-selected",a.selected)("mat-step-label-error","error"==a.state),e.R7$(1),e.Y8G("ngIf",a._templateLabel()),e.R7$(1),e.Y8G("ngIf",a._stringLabel()),e.R7$(1),e.Y8G("ngIf",a.optional&&"error"!=a.state),e.R7$(1),e.Y8G("ngIf","error"==a.state))},dependencies:[_.bT,_.T3,_.ux,_.e1,_.fG,A.An,L.r6],styles:['.mat-step-header{overflow:hidden;outline:none;cursor:pointer;position:relative;box-sizing:content-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-step-header:focus .mat-focus-indicator::before{content:""}.mat-step-header:hover[aria-disabled=true]{cursor:default}.mat-step-header:hover:not([aria-disabled]),.mat-step-header:hover[aria-disabled=false]{background-color:var(--mat-stepper-header-hover-state-layer-color)}.mat-step-header.cdk-keyboard-focused,.mat-step-header.cdk-program-focused{background-color:var(--mat-stepper-header-focus-state-layer-color)}@media(hover: none){.mat-step-header:hover{background:none}}.cdk-high-contrast-active .mat-step-header{outline:solid 1px}.cdk-high-contrast-active .mat-step-header[aria-selected=true] .mat-step-label{text-decoration:underline}.cdk-high-contrast-active .mat-step-header[aria-disabled=true]{outline-color:GrayText}.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-label,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-icon,.cdk-high-contrast-active .mat-step-header[aria-disabled=true] .mat-step-optional{color:GrayText}.mat-step-optional{font-size:12px;color:var(--mat-stepper-header-optional-label-text-color)}.mat-step-sub-label-error{font-size:12px;font-weight:normal}.mat-step-icon{border-radius:50%;height:24px;width:24px;flex-shrink:0;position:relative;color:var(--mat-stepper-header-icon-foreground-color);background-color:var(--mat-stepper-header-icon-background-color)}.mat-step-icon-content{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);display:flex}.mat-step-icon .mat-icon{font-size:16px;height:16px;width:16px}.mat-step-icon-state-error{background-color:var(--mat-stepper-header-error-state-icon-background-color);color:var(--mat-stepper-header-error-state-icon-foreground-color)}.mat-step-icon-state-error .mat-icon{font-size:24px;height:24px;width:24px}.mat-step-label{display:inline-block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:50px;vertical-align:middle;font-family:var(--mat-stepper-header-label-text-font);font-size:var(--mat-stepper-header-label-text-size);font-weight:var(--mat-stepper-header-label-text-weight);color:var(--mat-stepper-header-label-text-color)}.mat-step-label.mat-step-label-active{color:var(--mat-stepper-header-selected-state-label-text-color)}.mat-step-label.mat-step-label-error{color:var(--mat-stepper-header-error-state-label-text-color);font-size:var(--mat-stepper-header-error-state-label-text-size)}.mat-step-label.mat-step-label-selected{font-size:var(--mat-stepper-header-selected-state-label-text-size);font-weight:var(--mat-stepper-header-selected-state-label-text-weight)}.mat-step-text-label{text-overflow:ellipsis;overflow:hidden}.mat-step-header .mat-step-header-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-step-icon-selected{background-color:var(--mat-stepper-header-selected-state-icon-background-color);color:var(--mat-stepper-header-selected-state-icon-foreground-color)}.mat-step-icon-state-done{background-color:var(--mat-stepper-header-done-state-icon-background-color);color:var(--mat-stepper-header-done-state-icon-foreground-color)}.mat-step-icon-state-edit{background-color:var(--mat-stepper-header-edit-state-icon-background-color);color:var(--mat-stepper-header-edit-state-icon-foreground-color)}'],encapsulation:2,changeDetection:0})}}return n})();const Pt={horizontalStepTransition:(0,F.hZ)("horizontalStepTransition",[(0,F.wk)("previous",(0,F.iF)({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"})),(0,F.wk)("current",(0,F.iF)({transform:"none",visibility:"inherit"})),(0,F.wk)("next",(0,F.iF)({transform:"translate3d(100%, 0, 0)",visibility:"hidden"})),(0,F.kY)("* => *",(0,F.Os)([(0,F.i0)("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)"),(0,F.P)("@*",(0,F.MA)(),{optional:!0})]),{params:{animationDuration:"500ms"}})]),verticalStepTransition:(0,F.hZ)("verticalStepTransition",[(0,F.wk)("previous",(0,F.iF)({height:"0px",visibility:"hidden"})),(0,F.wk)("next",(0,F.iF)({height:"0px",visibility:"hidden"})),(0,F.wk)("current",(0,F.iF)({height:"*",visibility:"inherit"})),(0,F.kY)("* <=> current",(0,F.Os)([(0,F.i0)("{{animationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)"),(0,F.P)("@*",(0,F.MA)(),{optional:!0})]),{params:{animationDuration:"225ms"}})])};let Ot=(()=>{class n{constructor(t){this.templateRef=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["ng-template","matStepperIcon",""]],inputs:{name:["matStepperIcon","name"]}})}}return n})(),la=(()=>{class n{constructor(t){this._template=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(e.C4Q))}}static{this.\u0275dir=e.FsC({type:n,selectors:[["ng-template","matStepContent",""]]})}}return n})(),Ft=(()=>{class n extends ze{constructor(t,o,a,r){super(t,r),this._errorStateMatcher=o,this._viewContainerRef=a,this._isSelected=Ni.yU.EMPTY,this.stepLabel=void 0}ngAfterContentInit(){this._isSelected=this._stepper.steps.changes.pipe((0,le.n)(()=>this._stepper.selectionChange.pipe((0,z.T)(t=>t.selectedStep===this),(0,fe.Z)(this._stepper.selected===this)))).subscribe(t=>{t&&this._lazyContent&&!this._portal&&(this._portal=new Ae.VA(this._lazyContent._template,this._viewContainerRef))})}ngOnDestroy(){this._isSelected.unsubscribe()}isErrorState(t,o){return this._errorStateMatcher.isErrorState(t,o)||!!(t&&t.invalid&&this.interacted)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU((0,e.Rfq)(()=>Dt)),e.rXU(L.es,4),e.rXU(e.c1b),e.rXU(bt,8))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-step"]],contentQueries:function(o,a,r){if(1&o&&(e.wni(r,De,5),e.wni(r,la,5)),2&o){let c;e.mGM(c=e.lsd())&&(a.stepLabel=c.first),e.mGM(c=e.lsd())&&(a._lazyContent=c.first)}},inputs:{color:"color"},exportAs:["matStep"],features:[e.Jv_([{provide:L.es,useExisting:n},{provide:ze,useExisting:n}]),e.Vt3],ngContentSelectors:Wi,decls:1,vars:0,consts:[[3,"cdkPortalOutlet"]],template:function(o,a){1&o&&(e.NAR(),e.DNE(0,Qi,2,1,"ng-template"))},dependencies:[Ae.I3],encapsulation:2,changeDetection:0})}}return n})(),Dt=(()=>{class n extends be{get animationDuration(){return this._animationDuration}set animationDuration(t){this._animationDuration=/^\d+$/.test(t)?t+"ms":t}constructor(t,o,a){super(t,o,a),this._stepHeader=void 0,this._steps=void 0,this.steps=new e.rOR,this.animationDone=new e.bkB,this.labelPosition="end",this.headerPosition="top",this._iconOverrides={},this._animationDone=new se.B,this._animationDuration="";const r=a.nativeElement.nodeName.toLowerCase();this.orientation="mat-vertical-stepper"===r?"vertical":"horizontal"}ngAfterContentInit(){super.ngAfterContentInit(),this._icons.forEach(({name:t,templateRef:o})=>this._iconOverrides[t]=o),this.steps.changes.pipe((0,W.Q)(this._destroyed)).subscribe(()=>{this._stateChanged()}),this._animationDone.pipe((0,Ai.F)((t,o)=>t.fromState===o.fromState&&t.toState===o.toState),(0,W.Q)(this._destroyed)).subscribe(t=>{"current"===t.toState&&this.animationDone.emit()})}_stepIsNavigable(t,o){return o.completed||this.selectedIndex===t||!this.linear}_getAnimationDuration(){return this.animationDuration?this.animationDuration:"horizontal"===this.orientation?"500ms":"225ms"}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(Ye.dS,8),e.rXU(e.gRc),e.rXU(e.aKT))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["mat-stepper"],["mat-vertical-stepper"],["mat-horizontal-stepper"],["","matStepper",""]],contentQueries:function(o,a,r){if(1&o&&(e.wni(r,Ft,5),e.wni(r,Ot,5)),2&o){let c;e.mGM(c=e.lsd())&&(a._steps=c),e.mGM(c=e.lsd())&&(a._icons=c)}},viewQuery:function(o,a){if(1&o&&e.GBs(yt,5),2&o){let r;e.mGM(r=e.lsd())&&(a._stepHeader=r)}},hostAttrs:["role","tablist","ngSkipHydration",""],hostVars:11,hostBindings:function(o,a){2&o&&(e.BMQ("aria-orientation",a.orientation),e.AVh("mat-stepper-horizontal","horizontal"===a.orientation)("mat-stepper-vertical","vertical"===a.orientation)("mat-stepper-label-position-end","horizontal"===a.orientation&&"end"==a.labelPosition)("mat-stepper-label-position-bottom","horizontal"===a.orientation&&"bottom"==a.labelPosition)("mat-stepper-header-position-bottom","bottom"===a.headerPosition))},inputs:{selectedIndex:"selectedIndex",disableRipple:"disableRipple",color:"color",labelPosition:"labelPosition",headerPosition:"headerPosition",animationDuration:"animationDuration"},outputs:{animationDone:"animationDone"},exportAs:["matStepper","matVerticalStepper","matHorizontalStepper"],features:[e.Jv_([{provide:be,useExisting:n}]),e.Vt3],decls:5,vars:3,consts:[[3,"ngSwitch"],["class","mat-horizontal-stepper-wrapper",4,"ngSwitchCase"],[4,"ngSwitchCase"],["stepTemplate",""],[1,"mat-horizontal-stepper-wrapper"],[1,"mat-horizontal-stepper-header-container"],[4,"ngFor","ngForOf"],[1,"mat-horizontal-content-container"],["class","mat-horizontal-stepper-content","role","tabpanel",3,"id","mat-horizontal-stepper-content-inactive",4,"ngFor","ngForOf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","mat-stepper-horizontal-line",4,"ngIf"],[1,"mat-stepper-horizontal-line"],["role","tabpanel",1,"mat-horizontal-stepper-content",3,"id"],[3,"ngTemplateOutlet"],["class","mat-step",4,"ngFor","ngForOf"],[1,"mat-step"],[1,"mat-vertical-content-container"],["role","tabpanel",1,"mat-vertical-stepper-content",3,"id"],[1,"mat-vertical-content"],[3,"tabIndex","id","index","state","label","selected","active","optional","errorMessage","iconOverrides","disableRipple","color","click","keydown"]],template:function(o,a){1&o&&(e.qex(0,0),e.DNE(1,na,5,2,"div",1),e.DNE(2,ia,2,1,"ng-container",2),e.bVm(),e.DNE(3,aa,1,23,"ng-template",null,3,e.C5r)),2&o&&(e.Y8G("ngSwitch",a.orientation),e.R7$(1),e.Y8G("ngSwitchCase","horizontal"),e.R7$(1),e.Y8G("ngSwitchCase","vertical"))},dependencies:[_.Sq,_.bT,_.T3,_.ux,_.e1,yt],styles:['.mat-stepper-vertical,.mat-stepper-horizontal{display:block;font-family:var(--mat-stepper-container-text-font);background:var(--mat-stepper-container-color)}.mat-horizontal-stepper-header-container{white-space:nowrap;display:flex;align-items:center}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header-container{align-items:flex-start}.mat-stepper-header-position-bottom .mat-horizontal-stepper-header-container{order:1}.mat-stepper-horizontal-line{border-top-width:1px;border-top-style:solid;flex:auto;height:0;margin:0 -16px;min-width:32px;border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-stepper-horizontal-line{margin:0;min-width:0;position:relative;top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{border-top-width:1px;border-top-style:solid;content:"";display:inline-block;height:0;position:absolute;width:calc(50% - 20px)}.mat-horizontal-stepper-header{display:flex;height:72px;overflow:hidden;align-items:center;padding:0 24px;height:var(--mat-stepper-header-height)}.mat-horizontal-stepper-header .mat-step-icon{margin-right:8px;flex:none}[dir=rtl] .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:8px}.mat-horizontal-stepper-header::before,.mat-horizontal-stepper-header::after{border-top-color:var(--mat-stepper-line-color)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::before,.mat-stepper-label-position-bottom .mat-horizontal-stepper-header::after{top:calc(calc((var(--mat-stepper-header-height) - 24px) / 2) + 12px)}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header{box-sizing:border-box;flex-direction:column;height:auto}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::after,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::after{right:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:first-child)::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:not(:last-child)::before{left:0}[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:last-child::before,[dir=rtl] .mat-stepper-label-position-bottom .mat-horizontal-stepper-header:first-child::after{display:none}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-icon{margin-right:0;margin-left:0}.mat-stepper-label-position-bottom .mat-horizontal-stepper-header .mat-step-label{padding:16px 0 0 0;text-align:center;width:100%}.mat-vertical-stepper-header{display:flex;align-items:center;height:24px;padding:calc((var(--mat-stepper-header-height) - 24px) / 2) 24px}.mat-vertical-stepper-header .mat-step-icon{margin-right:12px}[dir=rtl] .mat-vertical-stepper-header .mat-step-icon{margin-right:0;margin-left:12px}.mat-horizontal-stepper-wrapper{display:flex;flex-direction:column}.mat-horizontal-stepper-content{outline:0}.mat-horizontal-stepper-content.mat-horizontal-stepper-content-inactive{height:0;overflow:hidden}.mat-horizontal-stepper-content:not(.mat-horizontal-stepper-content-inactive){visibility:inherit !important}.mat-horizontal-content-container{overflow:hidden;padding:0 24px 24px 24px}.cdk-high-contrast-active .mat-horizontal-content-container{outline:solid 1px}.mat-stepper-header-position-bottom .mat-horizontal-content-container{padding:24px 24px 0 24px}.mat-vertical-content-container{margin-left:36px;border:0;position:relative}.cdk-high-contrast-active .mat-vertical-content-container{outline:solid 1px}[dir=rtl] .mat-vertical-content-container{margin-left:0;margin-right:36px}.mat-stepper-vertical-line::before{content:"";position:absolute;left:0;border-left-width:1px;border-left-style:solid;border-left-color:var(--mat-stepper-line-color);top:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2));bottom:calc(8px - calc((var(--mat-stepper-header-height) - 24px) / 2))}[dir=rtl] .mat-stepper-vertical-line::before{left:auto;right:0}.mat-vertical-stepper-content{overflow:hidden;outline:0}.mat-vertical-stepper-content:not(.mat-vertical-stepper-content-inactive){visibility:inherit !important}.mat-vertical-content{padding:0 24px 24px 24px}.mat-step:last-child .mat-vertical-content-container{border:none}'],encapsulation:2,data:{animation:[Pt.horizontalStepTransition,Pt.verticalStepTransition]},changeDetection:0})}}return n})(),da=(()=>{class n extends Gi{static{this.\u0275fac=function(){let t;return function(a){return(t||(t=e.xGo(n)))(a||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","matStepperNext",""]],hostAttrs:[1,"mat-stepper-next"],hostVars:1,hostBindings:function(o,a){2&o&&e.Mr5("type",a.type)},inputs:{type:"type"},features:[e.Vt3]})}}return n})(),pa=(()=>{class n extends $i{static{this.\u0275fac=function(){let t;return function(a){return(t||(t=e.xGo(n)))(a||n)}}()}static{this.\u0275dir=e.FsC({type:n,selectors:[["button","matStepperPrevious",""]],hostAttrs:[1,"mat-stepper-previous"],hostVars:1,hostBindings:function(o,a){2&o&&e.Mr5("type",a.type)},inputs:{type:"type"},features:[e.Vt3]})}}return n})(),ma=(()=>{class n{static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275mod=e.$C({type:n})}static{this.\u0275inj=e.G2t({providers:[ca,L.es],imports:[L.yE,_.MD,Ae.jc,ji,A.m_,L.pZ,L.yE]})}}return n})();var _a=d(58001),ga=d(7967),wt=d(16396),fa=d(35877);const ua=["calendlyWidget"];let ha=(()=>{class n{constructor(t,o,a,r){this.userDataService=t,this.systemConfigService=o,this.dfPaywallService=a,this.data=r}ngOnInit(){const o=this.userDataService.userData?.email,a=this.systemConfigService?.environment?.client?.ipAddress;this.dfPaywallService.trackPaywallHit(o,a,this.data.serviceName)}ngAfterViewInit(){window.Calendly.initInlineWidget({url:"https://calendly.com/dreamfactory-platform/unlock-all-features",parentElement:this.calendlyWidget.nativeElement,autoLoad:!1})}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(at.T),e.rXU(wt.f),e.rXU(fa.o),e.rXU(h.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-paywall-modal"]],viewQuery:function(o,a){if(1&o&&e.GBs(ua,5),2&o){let r;e.mGM(r=e.lsd())&&(a.calendlyWidget=r.first)}},standalone:!0,features:[e.aNF],decls:39,vars:27,consts:[[1,"app-container",2,"padding","12px 20px"],["mat-dialog-title","",2,"text-align","center"],[1,"paywall-container"],[1,"details-section"],[1,"info-columns"],[1,"info-column"],[3,"innerHTML"],[1,"paywall-contact"],["href","tel:+1 415-993-5877"],["href","mailto:info@dreamfactory.com"],[1,"calendly-inline-widget"],["calendlyWidget",""]],template:function(o,a){1&o&&(e.j41(0,"div",0)(1,"h1",1),e.EFF(2,"Unlock Service"),e.k0s(),e.j41(3,"mat-dialog-content")(4,"div",2)(5,"h2"),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"h2"),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"div",3)(12,"div",4)(13,"div",5)(14,"h4"),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.nrm(17,"p",6),e.nI1(18,"transloco"),e.k0s(),e.j41(19,"div",5)(20,"h4"),e.EFF(21),e.nI1(22,"transloco"),e.k0s(),e.j41(23,"p"),e.EFF(24),e.nI1(25,"transloco"),e.k0s()()()(),e.j41(26,"h2"),e.EFF(27),e.nI1(28,"transloco"),e.k0s()(),e.j41(29,"h3",7)(30,"a",8),e.EFF(31),e.nI1(32,"transloco"),e.k0s(),e.EFF(33," | "),e.j41(34,"a",9),e.EFF(35),e.nI1(36,"transloco"),e.k0s()(),e.nrm(37,"div",10,11),e.k0s()()),2&o&&(e.R7$(6),e.JRh(e.bMT(7,9,"paywall.header")),e.R7$(3),e.JRh(e.bMT(10,11,"paywall.subheader")),e.R7$(6),e.JRh(e.bMT(16,13,"paywall.hostedTrial")),e.R7$(2),e.Y8G("innerHTML",e.bMT(18,15,"paywall.bookTime"),e.npT),e.R7$(4),e.JRh(e.bMT(22,17,"paywall.learnMoreTitle")),e.R7$(3),e.JRh(e.bMT(25,19,"paywall.gain")),e.R7$(3),e.JRh(e.bMT(28,21,"paywall.speakToHuman")),e.R7$(4),e.SpI("",e.bMT(32,23,"phone"),": +1 415-993-5877"),e.R7$(4),e.SpI(" ",e.bMT(36,25,"email"),": info@dreamfactory.com "))},dependencies:[h.hM,h.BI,h.Yi,b.Hl,I.Kj]})}}return n})();var ba=d(81137),Xe=d(17189),va=d(60875);function Ca(n,i){if(1&n&&(e.j41(0,"span",29),e.EFF(1),e.k0s()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.SpI(" \xb7 ",t.role,"")}}function xa(n,i){if(1&n&&(e.j41(0,"mat-option",27),e.EFF(1),e.DNE(2,Ca,2,1,"span",28),e.k0s()),2&n){const t=i.$implicit;e.Y8G("value",t.apiKey),e.R7$(1),e.SpI(" ",t.label,""),e.R7$(1),e.Y8G("ngIf",t.role)}}function ya(n,i){if(1&n){const t=e.RV6();e.j41(0,"mat-form-field",9)(1,"mat-label"),e.EFF(2),e.k0s(),e.j41(3,"mat-select",10),e.bIt("selectionChange",function(a){e.eBV(t);const r=e.XpG(2);return e.Njj(r.selectedKey=a.value)}),e.DNE(4,xa,3,3,"mat-option",26),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();let a;e.R7$(2),e.JRh(t("keyLabel")),e.R7$(1),e.Y8G("value",null!==(a=o.selectedKey)&&void 0!==a?a:o.keyOptions[0].apiKey),e.R7$(1),e.Y8G("ngForOf",o.keyOptions)("ngForTrackBy",o.trackByLabel)}}function ka(n,i){if(1&n){const t=e.RV6();e.j41(0,"dd",15)(1,"code",16),e.EFF(2),e.k0s(),e.j41(3,"button",17),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onCopy("authHeader",a.headerName+": "+a.activeKey))}),e.nrm(4,"fa-icon",18),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(2),e.Lme("",o.headerName,": ",o.activeKey,""),e.R7$(1),e.Y8G("matTooltip",t("authHeader"===o.copiedBlock?"copied":"copy")),e.BMQ("aria-label",t("copy")),e.R7$(1),e.AVh("is-copied","authHeader"===o.copiedBlock),e.Y8G("icon","authHeader"===o.copiedBlock?o.faCheck:o.faCopy)}}function Ma(n,i){if(1&n){const t=e.RV6();e.j41(0,"dd",30),e.nrm(1,"df-badge",31),e.j41(2,"span",32),e.EFF(3),e.k0s(),e.j41(4,"button",33),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.createKey.emit())}),e.nrm(5,"fa-icon",18),e.EFF(6),e.k0s()()}if(2&n){const t=e.XpG().$implicit,o=e.XpG();e.R7$(1),e.Y8G("label",t("noKeyBadge")),e.R7$(2),e.JRh(t("noKeyHint")),e.R7$(2),e.Y8G("icon",o.faPlus),e.R7$(1),e.SpI(" ",t("createKey")," ")}}function Pa(n,i){1&n&&e.eu8(0)}function Oa(n,i){1&n&&e.eu8(0)}function Fa(n,i){1&n&&e.eu8(0)}function Da(n,i){if(1&n&&(e.EFF(0),e.nrm(1,"df-badge",34)),2&n){const t=e.XpG().$implicit;e.SpI(" ",t("tabs.mcp")," "),e.R7$(1),e.Y8G("dot",!1)}}function wa(n,i){1&n&&e.eu8(0)}function Sa(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",35)(1,"div",36)(2,"span",37),e.EFF(3),e.k0s(),e.j41(4,"button",38),e.bIt("click",function(){const a=e.eBV(t),r=a.id,c=a.code,s=e.XpG(2);return e.Njj(s.onCopy(r,c))}),e.nrm(5,"fa-icon",18),e.EFF(6),e.k0s()(),e.j41(7,"pre",39)(8,"code"),e.EFF(9),e.k0s()()()}if(2&n){const t=i.id,o=i.code,a=i.note,r=e.XpG().$implicit,c=e.XpG();e.R7$(3),e.JRh(a),e.R7$(1),e.AVh("is-copied",c.copiedBlock===t),e.R7$(1),e.Y8G("icon",c.copiedBlock===t?c.faCheck:c.faCopy),e.R7$(1),e.SpI(" ",r(c.copiedBlock===t?"copied":"copy")," "),e.R7$(3),e.JRh(o)}}const _e=function(n){return{table:n}},Ia=function(n,i){return{id:"curl",code:n,note:i}},Ta=function(n,i){return{id:"javascript",code:n,note:i}},Ra=function(n,i){return{id:"python",code:n,note:i}},Ea=function(n,i){return{id:"mcp",code:n,note:i}};function Ga(n,i){if(1&n){const t=e.RV6();e.j41(0,"section",1)(1,"header",2)(2,"div",3)(3,"span",4),e.EFF(4),e.k0s(),e.j41(5,"h3",5),e.EFF(6),e.k0s(),e.j41(7,"p",6),e.EFF(8),e.k0s()(),e.j41(9,"div",7),e.DNE(10,ya,5,4,"mat-form-field",8),e.j41(11,"mat-form-field",9)(12,"mat-label"),e.EFF(13),e.k0s(),e.j41(14,"mat-select",10),e.bIt("selectionChange",function(a){e.eBV(t);const r=e.XpG();return e.Njj(r.format=a.value)}),e.j41(15,"mat-option",11),e.EFF(16,"JSON"),e.k0s(),e.j41(17,"mat-option",12),e.EFF(18,"XML"),e.k0s()()()()(),e.j41(19,"dl",13)(20,"div",14)(21,"dt",4),e.EFF(22),e.k0s(),e.j41(23,"dd",15)(24,"code",16),e.EFF(25),e.k0s(),e.j41(26,"button",17),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.onCopy("baseUrl",a.resolvedBase))}),e.nrm(27,"fa-icon",18),e.k0s()()(),e.j41(28,"div",14)(29,"dt",4),e.EFF(30),e.k0s(),e.DNE(31,ka,5,7,"dd",19),e.DNE(32,Ma,7,4,"ng-template",null,20,e.C5r),e.k0s()(),e.j41(34,"mat-tab-group",21)(35,"mat-tab",22),e.DNE(36,Pa,1,0,"ng-container",23),e.k0s(),e.j41(37,"mat-tab",22),e.DNE(38,Oa,1,0,"ng-container",23),e.k0s(),e.j41(39,"mat-tab",22),e.DNE(40,Fa,1,0,"ng-container",23),e.k0s(),e.j41(41,"mat-tab"),e.DNE(42,Da,2,2,"ng-template",24),e.DNE(43,wa,1,0,"ng-container",23),e.k0s()(),e.DNE(44,Sa,10,6,"ng-template",null,25,e.C5r),e.k0s()}if(2&n){const t=i.$implicit,o=e.sdS(33),a=e.sdS(45),r=e.XpG();e.R7$(4),e.JRh(t("eyebrow")),e.R7$(2),e.JRh(t("title")),e.R7$(2),e.JRh(t("subtitle")),e.R7$(2),e.Y8G("ngIf",r.hasKey),e.R7$(3),e.JRh(t("formatLabel")),e.R7$(1),e.Y8G("value",r.format),e.R7$(8),e.JRh(t("baseUrlLabel")),e.R7$(3),e.JRh(r.resolvedBase),e.R7$(1),e.Y8G("matTooltip",t("baseUrl"===r.copiedBlock?"copied":"copy")),e.BMQ("aria-label",t("copy")),e.R7$(1),e.AVh("is-copied","baseUrl"===r.copiedBlock),e.Y8G("icon","baseUrl"===r.copiedBlock?r.faCheck:r.faCopy),e.R7$(3),e.JRh(t("authHeaderLabel")),e.R7$(1),e.Y8G("ngIf",r.hasKey)("ngIfElse",o),e.R7$(3),e.Y8G("mat-stretch-tabs",!1),e.R7$(1),e.Y8G("label",t("tabs.curl")),e.R7$(1),e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.l_i(32,Ia,r.curlSnippet,r.activeKeyVerified?t("runNote",e.eq3(28,_e,r.sampleTable)):t("previewNote",e.eq3(30,_e,r.sampleTable)))),e.R7$(1),e.Y8G("label",t("tabs.javascript")),e.R7$(1),e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.l_i(39,Ta,r.javascriptSnippet,r.activeKeyVerified?t("runNote",e.eq3(35,_e,r.sampleTable)):t("previewNote",e.eq3(37,_e,r.sampleTable)))),e.R7$(1),e.Y8G("label",t("tabs.python")),e.R7$(1),e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.l_i(46,Ra,r.pythonSnippet,r.activeKeyVerified?t("runNote",e.eq3(42,_e,r.sampleTable)):t("previewNote",e.eq3(44,_e,r.sampleTable)))),e.R7$(3),e.Y8G("ngTemplateOutlet",a)("ngTemplateOutletContext",e.l_i(49,Ea,r.mcpSnippet,t("mcpNote")))}}let $a=(()=>{class n{get keyOptions(){return this.keys?.length?this.keys:this.apiKey?[{label:"Default key",apiKey:this.apiKey}]:[]}get hasKey(){return this.keyOptions.length>0}get activeKey(){return this.hasKey?(this.keyOptions.find(o=>o.apiKey===this.selectedKey)??this.keyOptions[0]).apiKey:"YOUR_API_KEY"}get activeKeyVerified(){return!!this.hasKey&&!!(this.keyOptions.find(o=>o.apiKey===this.selectedKey)??this.keyOptions[0]).verified}get resolvedBase(){return(this.baseUrl??"").replace(/\/+$/,"")||`${this.origin}${N.C}/${this.serviceName}`}get endpointUrl(){return`${this.resolvedBase}/_table/${this.sampleTable}?limit=5`}get resolvedMcpUrl(){return(this.mcpUrl??`${this.resolvedBase}/_mcp`).replace(/\/+$/,"")}get acceptHeader(){return"xml"===this.format?"application/xml":"application/json"}get curlSnippet(){return[`curl -X GET '${this.endpointUrl}' \\`,` -H 'Accept: ${this.acceptHeader}' \\`,` -H '${this.headerName}: ${this.activeKey}'`].join("\n")}get javascriptSnippet(){return[`const res = await fetch('${this.endpointUrl}', {`," headers: {",` 'Accept': '${this.acceptHeader}',`,` '${this.headerName}': '${this.activeKey}',`," },","});",`const data = await res.${"xml"===this.format?"text":"json"}();`,"console.log(data);"].join("\n")}get pythonSnippet(){return["import requests","","res = requests.get(",` '${this.endpointUrl}',`," headers={",` 'Accept': '${this.acceptHeader}',`,` '${this.headerName}': '${this.activeKey}',`," },",")",`print(${"xml"===this.format?"res.text":"res.json()"})`].join("\n")}get mcpSnippet(){return["{",' "mcpServers": {',` "dreamfactory-${this.serviceName||"service"}": {`,' "type": "http",',` "url": "${this.resolvedMcpUrl}",`,' "headers": {',` "${this.headerName}": "${this.activeKey}"`," }"," }"," }","}"].join("\n")}onCopy(t,o){this.clipboard.copy(o),this.copiedBlock=t,this.copied.emit(t),this.copyTimer&&clearTimeout(this.copyTimer),this.copyTimer=setTimeout(()=>{this.copiedBlock=null},1600)}trackByLabel(t,o){return o.apiKey}constructor(t){this.clipboard=t,this.serviceName="",this.sampleTable="your_table",this.keys=[],this.createKey=new e.bkB,this.copied=new e.bkB,this.selectedKey=null,this.format="json",this.copiedBlock=null,this.headerName=Te.dE,this.faCopy=g.jPR,this.faCheck=g.e68,this.faPlus=g.QLR,this.origin=typeof window<"u"&&window.location?window.location.origin:""}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(va.B0))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-artifact-card"]],inputs:{serviceName:"serviceName",baseUrl:"baseUrl",apiKey:"apiKey",sampleTable:"sampleTable",keys:"keys",mcpUrl:"mcpUrl"},outputs:{createKey:"createKey",copied:"copied"},standalone:!0,features:[e.aNF],decls:1,vars:1,consts:[["class","artifact-card",4,"transloco","translocoRead"],[1,"artifact-card"],[1,"artifact-card__head"],[1,"artifact-card__intro"],[1,"df-eyebrow"],[1,"artifact-card__title"],[1,"artifact-card__subtitle"],[1,"artifact-card__switchers"],["appearance","outline","class","artifact-card__field",4,"ngIf"],["appearance","outline",1,"artifact-card__field"],["panelClass","artifact-card__panel",3,"value","selectionChange"],["value","json"],["value","xml"],[1,"artifact-card__meta"],[1,"artifact-card__meta-row"],[1,"artifact-card__meta-val"],[1,"artifact-card__inline"],["type","button","mat-icon-button","",1,"artifact-card__copy",3,"matTooltip","click"],[3,"icon"],["class","artifact-card__meta-val",4,"ngIf","ngIfElse"],["noKey",""],["animationDuration","0ms","disableRipple","",1,"artifact-card__tabs",3,"mat-stretch-tabs"],[3,"label"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["mat-tab-label",""],["block",""],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["class","artifact-card__opt-role",4,"ngIf"],[1,"artifact-card__opt-role"],[1,"artifact-card__meta-val","artifact-card__nokey"],["variant","neutral",3,"label"],[1,"artifact-card__nokey-hint"],["type","button","mat-button","",1,"artifact-card__nokey-cta",3,"click"],["variant","ai","label","MCP",1,"artifact-card__mcp-badge",3,"dot"],[1,"artifact-card__block"],[1,"artifact-card__code-head"],[1,"artifact-card__note"],["type","button","mat-button","",1,"artifact-card__copy-btn",3,"click"],[1,"artifact-card__code"]],template:function(o,a){1&o&&e.DNE(0,Ga,46,52,"section",0),2&o&&e.Y8G("translocoRead","artifactCard")},dependencies:[_.bT,_.pM,_.T3,I.Q8,I.bA,ne.RI,ne.ES,ne.mq,ne.T8,V.Ve,P.rl,P.nJ,V.VO,L.wT,P.RG,b.Hl,b.$z,b.iY,$.uc,$.oV,k.dX,k.aY,Xe.v],styles:["[_nghost-%COMP%]{display:block}.artifact-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4);padding:var(--df-space-5);background-color:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius)}.artifact-card__head[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:var(--df-space-4)}.artifact-card__intro[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);min-width:0}.artifact-card__title[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-lg);font-weight:var(--df-font-weight-heading);line-height:var(--df-lh-tight);color:var(--df-text)}.artifact-card__subtitle[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm);color:var(--df-text-muted)}.artifact-card__switchers[_ngcontent-%COMP%]{display:flex;gap:var(--df-space-3);flex-wrap:wrap}.artifact-card__field[_ngcontent-%COMP%]{width:11rem}.artifact-card__field[_ngcontent-%COMP%] .mat-mdc-form-field-subscript-wrapper{display:none}.artifact-card__opt-role[_ngcontent-%COMP%]{color:var(--df-text-muted)}.artifact-card__meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);margin:0;padding:var(--df-space-3) var(--df-space-4);background-color:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm)}.artifact-card__meta-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);min-width:0}.artifact-card__meta-row[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{flex:0 0 5.5rem}.artifact-card__meta-val[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2);margin:0;min-width:0;flex:1 1 auto}.artifact-card__inline[_ngcontent-%COMP%]{font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-text-2);overflow-x:auto;white-space:nowrap;padding:var(--df-space-1) 0}.artifact-card__copy[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted);transition:color var(--df-duration-fast) var(--df-ease-standard)}.artifact-card__copy[_ngcontent-%COMP%]:hover{color:var(--df-text)}.artifact-card__copy[_ngcontent-%COMP%] .is-copied[_ngcontent-%COMP%]{color:var(--df-success)}.artifact-card__nokey[_ngcontent-%COMP%]{flex-wrap:wrap}.artifact-card__nokey-hint[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);color:var(--df-text-muted)}.artifact-card__nokey-cta[_ngcontent-%COMP%]{color:var(--df-accent)}.artifact-card__nokey-cta[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--df-space-1)}.artifact-card__mcp-badge[_ngcontent-%COMP%]{margin-left:var(--df-space-2)}.artifact-card__block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);padding-top:var(--df-space-3)}.artifact-card__code-head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--df-space-3)}.artifact-card__note[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);color:var(--df-text-muted)}.artifact-card__copy-btn[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted);font-size:var(--df-font-size-xs);transition:color var(--df-duration-fast) var(--df-ease-standard)}.artifact-card__copy-btn[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:var(--df-space-1)}.artifact-card__copy-btn[_ngcontent-%COMP%]:hover{color:var(--df-text)}.artifact-card__copy-btn.is-copied[_ngcontent-%COMP%]{color:var(--df-success)}.artifact-card__code[_ngcontent-%COMP%]{margin:0;padding:var(--df-space-4);background-color:var(--df-code-bg);color:var(--df-code-text);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);line-height:var(--df-lh-base);overflow-x:auto}.artifact-card__code[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-family:inherit;white-space:pre}"]})}}return n})();var St=d(61417),It=d(98443),ve=d(28067);function ja(n,i){1&n&&(e.j41(0,"div",6),e.nrm(1,"df-skeleton",7),e.k0s()),2&n&&(e.R7$(1),e.Y8G("count",4))}function Na(n,i){if(1&n&&e.nrm(0,"df-empty-state",8),2&n){const t=e.XpG().$implicit;e.Y8G("title",t("emptyTitle"))("description",t("emptyHint"))}}function Aa(n,i){if(1&n&&(e.j41(0,"span",14),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.R7$(1),e.JRh(t)}}function Ya(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",18),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG().$implicit,s=e.XpG(3);return e.Njj(s.onCellClick(c,r))}),e.nrm(1,"span",19),e.k0s()}if(2&n){const t=i.$implicit,o=e.XpG().$implicit,a=e.XpG(2).$implicit,r=e.XpG();e.AVh("scope-matrix__cell--full","full"===r.cellState(o,t))("scope-matrix__cell--filtered","filtered"===r.cellState(o,t))("scope-matrix__cell--none","none"===r.cellState(o,t)),e.Y8G("disabled","none"===r.cellState(o,t))("title",a("state."+r.cellState(o,t))),e.BMQ("aria-label",o.roleName+" "+t+": "+a("state."+r.cellState(o,t)))}}function Va(n,i){if(1&n&&(e.j41(0,"div",15)(1,"span",16),e.EFF(2),e.k0s(),e.DNE(3,Ya,2,9,"button",17),e.k0s()),2&n){const t=i.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("title",t.roleName),e.R7$(1),e.JRh(t.roleName),e.R7$(1),e.Y8G("ngForOf",o.verbs)("ngForTrackBy",o.trackByVerb)}}function za(n,i){if(1&n&&(e.j41(0,"div",9)(1,"div",10)(2,"span",11),e.EFF(3),e.k0s(),e.DNE(4,Aa,2,1,"span",12),e.k0s(),e.DNE(5,Va,4,4,"div",13),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG();e.BMQ("aria-label",t("ariaLabel")),e.R7$(3),e.JRh(t("roleHeader")),e.R7$(1),e.Y8G("ngForOf",o.verbs)("ngForTrackBy",o.trackByVerb),e.R7$(1),e.Y8G("ngForOf",o.rows)("ngForTrackBy",o.trackByRoleId)}}function Xa(n,i){if(1&n&&(e.j41(0,"div",20)(1,"span",21),e.nrm(2,"span",22),e.EFF(3),e.k0s(),e.j41(4,"span",21),e.nrm(5,"span",23),e.EFF(6),e.k0s(),e.j41(7,"span",21),e.nrm(8,"span",24),e.EFF(9),e.k0s()()),2&n){const t=e.XpG().$implicit;e.R7$(3),e.JRh(t("state.full")),e.R7$(3),e.JRh(t("state.filtered")),e.R7$(3),e.JRh(t("state.none"))}}function Ba(n,i){if(1&n&&(e.qex(0),e.j41(1,"section",1),e.DNE(2,ja,2,1,"div",2),e.DNE(3,Na,1,2,"df-empty-state",3),e.DNE(4,za,6,6,"div",4),e.DNE(5,Xa,10,3,"div",5),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading&&0===t.rows.length),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.rows.length>0),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.rows.length>0)}}let La=(()=>{class n{constructor(t){this.scope=t,this.cellClick=new e.bkB,this.verbs=ve.e,this.rows=[],this.loading=!1,this.destroy$=new se.B}ngOnChanges(t){"serviceId"in t&&this.load()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onCellClick(t,o){"none"!==t.verbs[o]&&this.cellClick.emit({roleId:t.roleId,verb:o})}trackByRoleId(t,o){return o.roleId}trackByVerb(t,o){return o}load(){const t=this.serviceId;this.rows=[],null!=t&&(this.loading=!0,this.scope.matrixForService(t).pipe((0,W.Q)(this.destroy$)).subscribe(o=>{this.loading=!1,this.rows=o.roles}))}cellState(t,o){return t.verbs[o]}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(ve.q))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-scope-matrix"]],inputs:{serviceId:"serviceId"},outputs:{cellClick:"cellClick"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["data-testid","df-scope-matrix",1,"scope-matrix"],["class","scope-matrix__loading",4,"ngIf"],["icon","security",3,"title","description",4,"ngIf"],["class","scope-matrix__grid","role","table",4,"ngIf"],["class","scope-matrix__legend","aria-hidden","true",4,"ngIf"],[1,"scope-matrix__loading"],["variant","table-row",3,"count"],["icon","security",3,"title","description"],["role","table",1,"scope-matrix__grid"],["role","row",1,"scope-matrix__row","scope-matrix__row--head"],["role","columnheader",1,"scope-matrix__corner"],["class","scope-matrix__verb","role","columnheader",4,"ngFor","ngForOf","ngForTrackBy"],["class","scope-matrix__row","role","row",4,"ngFor","ngForOf","ngForTrackBy"],["role","columnheader",1,"scope-matrix__verb"],["role","row",1,"scope-matrix__row"],["role","rowheader",1,"scope-matrix__role",3,"title"],["type","button","class","scope-matrix__cell","role","cell",3,"scope-matrix__cell--full","scope-matrix__cell--filtered","scope-matrix__cell--none","disabled","title","click",4,"ngFor","ngForOf","ngForTrackBy"],["type","button","role","cell",1,"scope-matrix__cell",3,"disabled","title","click"],["aria-hidden","true",1,"scope-matrix__dot"],["aria-hidden","true",1,"scope-matrix__legend"],[1,"scope-matrix__legend-item"],[1,"scope-matrix__dot","scope-matrix__dot--full"],[1,"scope-matrix__dot","scope-matrix__dot--filtered"],[1,"scope-matrix__dot","scope-matrix__dot--none"]],template:function(o,a){1&o&&e.DNE(0,Ba,6,4,"ng-container",0),2&o&&e.Y8G("translocoRead","scopeMatrix")},dependencies:[_.MD,_.Sq,_.bT,I.Q8,I.bA,St.M,It.d],styles:["[_nghost-%COMP%]{display:block}.scope-matrix[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4)}.scope-matrix__loading[_ngcontent-%COMP%]{padding:var(--df-space-2) 0}.scope-matrix__grid[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);overflow-x:auto;padding-bottom:var(--df-space-1)}.scope-matrix__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(12rem,1.4fr) repeat(5,minmax(4.4rem,1fr));align-items:center;gap:var(--df-space-2);min-width:40rem}.scope-matrix__row--head[_ngcontent-%COMP%]{padding-bottom:var(--df-space-1);border-bottom:1px solid var(--df-border-2)}.scope-matrix__corner[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-heading);color:var(--df-text-muted);text-transform:uppercase;letter-spacing:.04em}.scope-matrix__verb[_ngcontent-%COMP%]{justify-self:center;font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-heading);color:var(--df-text-2);letter-spacing:.02em}.scope-matrix__role[_ngcontent-%COMP%]{font-size:var(--df-font-size-sm);color:var(--df-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.scope-matrix__cell[_ngcontent-%COMP%]{justify-self:center;display:inline-flex;align-items:center;justify-content:center;width:2.8rem;height:2.8rem;padding:0;border:1px solid transparent;border-radius:var(--df-radius-sm);background:transparent;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}.scope-matrix__cell[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--df-hover);border-color:var(--df-border)}.scope-matrix__cell[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:1px}.scope-matrix__cell[_ngcontent-%COMP%]:disabled{cursor:default}.scope-matrix__dot[_ngcontent-%COMP%]{width:1.2rem;height:1.2rem;border-radius:50%;display:inline-block;flex:none;background:var(--df-text-muted);box-shadow:0 0 0 .3rem transparent}.scope-matrix__cell--full[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--full[_ngcontent-%COMP%]{background:var(--df-success);box-shadow:0 0 0 .3rem var(--df-success-soft)}.scope-matrix__cell--filtered[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--filtered[_ngcontent-%COMP%]{background:var(--df-warning);box-shadow:0 0 0 .3rem var(--df-warning-soft)}.scope-matrix__cell--none[_ngcontent-%COMP%] .scope-matrix__dot[_ngcontent-%COMP%], .scope-matrix__dot--none[_ngcontent-%COMP%]{background:var(--df-text-faint);box-shadow:none}.scope-matrix__legend[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--df-space-4);padding-top:var(--df-space-1)}.scope-matrix__legend-item[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-2);font-size:var(--df-font-size-xs);color:var(--df-text-muted)}"]})}}return n})();var Ua=d(81663),Ja=d(23667),qa=d(43521);function Ha(n,i){if(1&n&&(e.qex(0),e.j41(1,"span",13),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"df-error-detail",14),e.bVm()),2&n){const t=e.XpG(4);e.R7$(2),e.JRh(e.bMT(3,2,t.probeError.message)),e.R7$(2),e.Y8G("error",t.probeError)}}function Ka(n,i){if(1&n&&(e.j41(0,"li",11)(1,"span",12),e.EFF(2),e.nI1(3,"transloco"),e.DNE(4,Ha,5,4,"ng-container",0),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(2),e.SpI(" ",e.bMT(3,2,"services.health.probe.failed")," "),e.R7$(2),e.Y8G("ngIf",t.probeError)}}function Qa(n,i){if(1&n&&(e.j41(0,"a",16),e.EFF(1),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",5),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(3);e.Y8G("routerLink",t.fix),e.R7$(1),e.SpI(" ",e.bMT(2,3,"services.health.fix."+t.id)," "),e.R7$(2),e.Y8G("icon",o.faArrowRight)}}function Wa(n,i){if(1&n&&(e.j41(0,"li",11)(1,"span",12),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.DNE(4,Qa,4,5,"a",15),e.k0s()),2&n){const t=i.$implicit;e.R7$(2),e.JRh(e.bMT(3,2,"services.health.rules."+t.id)),e.R7$(2),e.Y8G("ngIf",t.fix)}}function Za(n,i){if(1&n&&(e.j41(0,"section",3),e.nI1(1,"transloco"),e.j41(2,"header",4),e.nrm(3,"fa-icon",5),e.j41(4,"span",6),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.nrm(7,"df-badge",7),e.nI1(8,"transloco"),e.k0s(),e.j41(9,"ul",8),e.DNE(10,Ka,5,4,"li",9),e.DNE(11,Wa,5,4,"li",10),e.k0s()()),2&n){const t=e.XpG(2);e.AVh("health-panel--danger","danger"===t.level),e.BMQ("aria-label",e.bMT(1,9,"services.health.panelAria")),e.R7$(3),e.Y8G("icon",t.faShieldHalved),e.R7$(2),e.JRh(e.bMT(6,11,"services.health.header")),e.R7$(2),e.Y8G("variant",t.level)("label",e.bMT(8,13,"services.health.level."+t.level)),e.R7$(3),e.Y8G("ngIf","failed"===t.probe),e.R7$(1),e.Y8G("ngForOf",null==t.health?null:t.health.rules)}}function er(n,i){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.checking")))}function tr(n,i){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.unsupported")))}function nr(n,i){1&n&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"services.health.probe.ok")))}function or(n,i){if(1&n&&(e.j41(0,"p",17),e.nrm(1,"fa-icon",5),e.j41(2,"span",18),e.DNE(3,er,3,3,"ng-container",19),e.DNE(4,tr,3,3,"ng-container",19),e.DNE(5,nr,3,3,"ng-container",20),e.k0s()()),2&n){const t=e.XpG(2);e.AVh("health-panel__ok--muted","ok"!==t.probe),e.R7$(1),e.Y8G("icon","ok"===t.probe?t.faCircleCheck:t.faShieldHalved),e.R7$(1),e.Y8G("ngSwitch",t.probe),e.R7$(1),e.Y8G("ngSwitchCase","checking"),e.R7$(1),e.Y8G("ngSwitchCase","unsupported")}}function ir(n,i){if(1&n&&(e.qex(0),e.DNE(1,Za,12,15,"section",1),e.DNE(2,or,6,6,"ng-template",null,2,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG();e.R7$(1),e.Y8G("ngIf",o.hasFindings)("ngIfElse",t)}}let Be=class nt{constructor(i,t,o){this.healthService=i,this.probeService=t,this.cdr=o,this.serviceName="",this.probe="idle",this.probeError=null,this.faShieldHalved=g.fLc,this.faCircleCheck=g.QRE,this.faArrowRight=g.dmS}ngOnInit(){this.score(),this.runProbe()}ngOnChanges(i){(i.serviceId||i.deprecated)&&this.score(),(i.serviceId||i.serviceName||i.serviceGroup)&&this.runProbe()}get level(){return"failed"===this.probe?"danger":this.health?.level??"success"}get hasFindings(){return"failed"===this.probe||!!this.health?.rules.length}score(){if(!this.serviceId)return void(this.health=void 0);const i=this.serviceId;this.healthService.getContext().pipe((0,j.s)(this)).subscribe(t=>{this.serviceId===i&&(this.health=this.healthService.derive({id:i,name:this.serviceName,deprecated:this.deprecated},t),this.cdr.markForCheck())})}runProbe(){if(!this.serviceId||!this.serviceName)return void(this.probe="idle");const i=this.serviceName;this.probeError=null,this.probeService.probe(i,this.serviceGroup).pipe((0,j.s)(this)).subscribe(t=>{this.serviceName===i&&(this.probe=t.state,this.probeError=t.error??null,this.cdr.markForCheck())})}static{this.\u0275fac=function(t){return new(t||nt)(e.rXU(Ja.d),e.rXU(qa.j),e.rXU(e.gRc))}}static{this.\u0275cmp=e.VBU({type:nt,selectors:[["df-service-health-panel"]],inputs:{serviceId:"serviceId",serviceName:"serviceName",serviceGroup:"serviceGroup",deprecated:"deprecated"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"ngIf"],["class","health-panel",3,"health-panel--danger",4,"ngIf","ngIfElse"],["clean",""],[1,"health-panel"],[1,"health-panel__head"],["aria-hidden","true",3,"icon"],[1,"df-eyebrow"],[3,"variant","label"],[1,"health-panel__rules"],["class","health-panel__rule",4,"ngIf"],["class","health-panel__rule",4,"ngFor","ngForOf"],[1,"health-panel__rule"],[1,"health-panel__reason"],[1,"health-panel__detail"],[3,"error"],["class","health-panel__fix",3,"routerLink",4,"ngIf"],[1,"health-panel__fix",3,"routerLink"],[1,"health-panel__ok"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"]],template:function(t,o){1&t&&e.DNE(0,ir,4,2,"ng-container",0),2&t&&e.Y8G("ngIf",o.health||"idle"!==o.probe)},dependencies:[_.bT,_.pM,_.ux,_.e1,_.fG,B.Wk,I.Kj,k.dX,k.aY,Xe.v,Ua.R],styles:[".health-panel[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-warning-border);border-radius:var(--df-radius);background:var(--df-warning-soft);color:var(--df-text)}.health-panel[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-warning)}.health-panel--danger[_ngcontent-%COMP%]{border-color:var(--df-danger-border);background:var(--df-danger-soft)}.health-panel--danger[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.health-panel__head[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2)}.health-panel__rules[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);margin:0;padding:0;list-style:none}.health-panel__rule[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:var(--df-space-2) var(--df-space-3)}.health-panel__reason[_ngcontent-%COMP%]{flex:1 1 20rem}.health-panel__detail[_ngcontent-%COMP%]{display:block;margin-top:var(--df-space-1);font-size:var(--df-font-size-xs);color:var(--df-text-muted);overflow-wrap:anywhere}.health-panel__fix[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-1);color:var(--df-accent);font-weight:var(--df-font-weight-medium);text-decoration:none;white-space:nowrap}.health-panel__fix[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:currentColor}.health-panel__fix[_ngcontent-%COMP%]:hover{text-decoration:underline}.health-panel__fix[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:var(--df-focus-ring);border-radius:var(--df-radius-sm, var(--df-radius))}.health-panel__ok[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2);margin:0;color:var(--df-text-muted)}.health-panel__ok[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-success)}.health-panel__ok--muted[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-text-muted)}"],changeDetection:0})}};function ar(n,i){1&n&&(e.j41(0,"div",5),e.nrm(1,"df-skeleton",6),e.k0s()),2&n&&(e.R7$(1),e.Y8G("count",5))}function rr(n,i){if(1&n&&e.nrm(0,"df-empty-state",7),2&n){const t=e.XpG().$implicit;e.Y8G("title",t("error.title"))("description",t("error.hint"))}}function cr(n,i){if(1&n&&(e.j41(0,"a",21)(1,"mat-icon"),e.EFF(2,"add"),e.k0s(),e.EFF(3),e.k0s()),2&n){const t=e.XpG().$implicit,o=e.XpG(2).$implicit;e.Y8G("routerLink",t.addLink),e.R7$(3),e.SpI(" ",o("addPolicy")," ")}}function sr(n,i){if(1&n&&(e.j41(0,"li",10)(1,"div",11)(2,"span",12)(3,"mat-icon"),e.EFF(4),e.k0s()()(),e.j41(5,"div",13)(6,"div",14)(7,"span",15),e.EFF(8),e.k0s(),e.nrm(9,"df-badge",16),e.k0s(),e.j41(10,"p",17),e.EFF(11),e.k0s(),e.j41(12,"div",18)(13,"a",19),e.EFF(14),e.j41(15,"mat-icon"),e.EFF(16,"chevron_right"),e.k0s()(),e.DNE(17,cr,4,2,"a",20),e.k0s()()()),2&n){const t=i.$implicit,o=e.XpG(2).$implicit,a=e.XpG();e.AVh("pipeline-strip__node--open",!t.present),e.R7$(2),e.AVh("pipeline-strip__marker--active","active"===t.status)("pipeline-strip__marker--filtered","filtered"===t.status)("pipeline-strip__marker--handler","handler"===t.status),e.R7$(2),e.JRh(t.icon),e.R7$(4),e.JRh(o("nodes."+t.kind+".title")),e.R7$(1),e.Y8G("variant",a.badgeVariant(t))("label",o("status."+t.status)),e.R7$(2),e.SpI(" ",o(t.detailKey,t.detailParams)," "),e.R7$(2),e.Y8G("routerLink",t.link),e.R7$(1),e.SpI(" ",o("view")," "),e.R7$(3),e.Y8G("ngIf",t.addLink)}}function lr(n,i){if(1&n&&(e.j41(0,"ol",8),e.DNE(1,sr,18,16,"li",9),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.nodes)("ngForTrackBy",t.trackByKind)}}function dr(n,i){if(1&n&&(e.qex(0),e.j41(1,"section",1),e.DNE(2,ar,2,1,"div",2),e.DNE(3,rr,1,2,"df-empty-state",3),e.DNE(4,lr,2,2,"ol",4),e.k0s(),e.bVm()),2&n){const t=e.XpG();e.R7$(2),e.Y8G("ngIf",t.loading),e.R7$(1),e.Y8G("ngIf",!t.loading&&t.errored),e.R7$(1),e.Y8G("ngIf",!t.loading&&!t.errored&&t.nodes.length>0)}}Be=(0,Z.Cg)([(0,j.d)({checkProperties:!0})],Be);const pr={active:"success",filtered:"warning",open:"neutral",handler:"build"};let mr=(()=>{class n{constructor(t,o,a){this.scope=t,this.limitService=o,this.appService=a,this.nodes=[],this.loading=!1,this.errored=!1,this.destroy$=new se.B}ngOnChanges(t){("serviceId"in t||"serviceName"in t)&&this.load()}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}badgeVariant(t){return pr[t.status]}trackByKind(t,o){return o.kind}load(){const t=this.serviceId;this.nodes=[],this.errored=!1,null!=t&&(this.loading=!0,(0,Oe.p)({matrix:this.scope.matrixForService(t),limits:this.limitService.getAll({limit:0,sort:"name"}).pipe((0,z.T)(o=>o.resource??[]),(0,R.W)(()=>(0,Q.of)([]))),apps:this.appService.getAll({limit:0}).pipe((0,z.T)(o=>o.resource??[]),(0,R.W)(()=>(0,Q.of)([])))}).pipe((0,W.Q)(this.destroy$)).subscribe({next:({matrix:o,limits:a,apps:r})=>{this.loading=!1,this.nodes=this.buildNodes(t,o.roles,a,r)},error:()=>{this.loading=!1,this.errored=!0}}))}buildNodes(t,o,a,r){const c=o.filter(O=>ve.e.some(D=>"none"!==O.verbs[D])),s=o.filter(O=>ve.e.some(D=>"filtered"===O.verbs[D])),l=a.find(O=>O.serviceId===t)??a.find(O=>null==O.serviceId),p=["/",G.b.API_CONNECTIONS,G.b.API_KEYS],f=["/",G.b.API_CONNECTIONS,G.b.ROLE_BASED_ACCESS],x=["/",G.b.API_SECURITY,G.b.RATE_LIMITING];return[{kind:"key",icon:"key",present:r.length>0,status:r.length>0?"active":"open",detailKey:r.length>0?"nodes.key.detail":"nodes.key.empty",detailParams:{count:r.length},link:p,addLink:r.length>0?void 0:[...p,G.b.CREATE]},{kind:"role",icon:"security",present:c.length>0,status:c.length>0?"active":"open",detailKey:c.length>0?"nodes.role.detail":"nodes.role.empty",detailParams:{count:c.length},link:1===c.length?[...f,String(c[0].roleId)]:f,addLink:c.length>0?void 0:[...f,G.b.CREATE]},{kind:"rate",icon:"speed",present:!!l,status:l?"active":"open",detailKey:l?"nodes.rate.detail":"nodes.rate.empty",detailParams:l?{rate:l.rate,period:l.period}:void 0,link:l?[...x,String(l.id)]:x,addLink:l?void 0:[...x,G.b.CREATE]},{kind:"filter",icon:"filter_alt",present:s.length>0,status:s.length>0?"filtered":"open",detailKey:s.length>0?"nodes.filter.detail":"nodes.filter.empty",detailParams:{count:s.length},link:f},{kind:"handler",icon:"bolt",present:!0,status:"handler",detailKey:this.serviceType?"nodes.handler.detail":"nodes.handler.empty",detailParams:this.serviceType?{type:this.serviceType}:void 0,link:this.serviceName?["/",G.b.API_CONNECTIONS,G.b.API_DOCS,this.serviceName]:["/",G.b.API_CONNECTIONS,G.b.API_DOCS]}]}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(ve.q),e.rXU(K.gu),e.rXU(K.u7))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-pipeline-strip"]],inputs:{serviceId:"serviceId",serviceName:"serviceName",serviceType:"serviceType"},standalone:!0,features:[e.OA$,e.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["data-testid","df-pipeline-strip",1,"pipeline-strip"],["class","pipeline-strip__loading",4,"ngIf"],["icon","error_outline",3,"title","description",4,"ngIf"],["class","pipeline-strip__list",4,"ngIf"],[1,"pipeline-strip__loading"],["variant","card",3,"count"],["icon","error_outline",3,"title","description"],[1,"pipeline-strip__list"],["class","pipeline-strip__node",3,"pipeline-strip__node--open",4,"ngFor","ngForOf","ngForTrackBy"],[1,"pipeline-strip__node"],["aria-hidden","true",1,"pipeline-strip__rail"],[1,"pipeline-strip__marker"],[1,"pipeline-strip__card"],[1,"pipeline-strip__head"],[1,"pipeline-strip__name"],[3,"variant","label"],[1,"pipeline-strip__detail"],[1,"pipeline-strip__actions"],[1,"pipeline-strip__link",3,"routerLink"],["class","pipeline-strip__link pipeline-strip__link--add",3,"routerLink",4,"ngIf"],[1,"pipeline-strip__link","pipeline-strip__link--add",3,"routerLink"]],template:function(o,a){1&o&&e.DNE(0,dr,5,3,"ng-container",0),2&o&&e.Y8G("translocoRead","pipelineStrip")},dependencies:[_.MD,_.Sq,_.bT,B.iI,B.Wk,I.Q8,I.bA,A.m_,A.An,Xe.v,St.M,It.d],styles:['[_nghost-%COMP%]{display:block}.pipeline-strip[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4)}.pipeline-strip__loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-3)}.pipeline-strip__list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:var(--df-space-3)}.pipeline-strip__node[_ngcontent-%COMP%]{display:grid;grid-template-columns:3.6rem 1fr;gap:var(--df-space-3);align-items:stretch}.pipeline-strip__rail[_ngcontent-%COMP%]{position:relative;display:flex;justify-content:center;padding-top:var(--df-space-2)}.pipeline-strip__node[_ngcontent-%COMP%]:not(:last-child) .pipeline-strip__rail[_ngcontent-%COMP%]:after{content:"";position:absolute;top:4rem;bottom:calc(var(--df-space-3) * -1);left:50%;width:1px;transform:translate(-50%);background:var(--df-border)}.pipeline-strip__marker[_ngcontent-%COMP%]{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;width:3.2rem;height:3.2rem;flex:none;border-radius:50%;border:1px solid var(--df-border);background:var(--df-surface);color:var(--df-text-muted)}.pipeline-strip__marker[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:1.8rem;height:1.8rem;font-size:1.8rem;line-height:1.8rem}.pipeline-strip__marker--active[_ngcontent-%COMP%]{border-color:var(--df-success-border);background:var(--df-success-soft);color:var(--df-success)}.pipeline-strip__marker--filtered[_ngcontent-%COMP%]{border-color:var(--df-warning-border);background:var(--df-warning-soft);color:var(--df-warning)}.pipeline-strip__marker--handler[_ngcontent-%COMP%]{border-color:var(--df-accent);background:var(--df-accent-soft);color:var(--df-accent)}.pipeline-strip__node--open[_ngcontent-%COMP%] .pipeline-strip__marker[_ngcontent-%COMP%]{border-style:dashed;color:var(--df-text-faint)}.pipeline-strip__card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-border);border-radius:var(--df-radius);background:var(--df-surface)}.pipeline-strip__node--open[_ngcontent-%COMP%] .pipeline-strip__card[_ngcontent-%COMP%]{background:var(--df-surface-2);border-style:dashed}.pipeline-strip__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--df-space-2)}.pipeline-strip__name[_ngcontent-%COMP%]{font-size:var(--df-font-size-md);font-weight:var(--df-font-weight-heading);color:var(--df-text)}.pipeline-strip__detail[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm);color:var(--df-text-muted)}.pipeline-strip__actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:center;gap:var(--df-space-4);margin-top:var(--df-space-1)}.pipeline-strip__link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:var(--df-space-1);font-size:var(--df-font-size-sm);font-weight:var(--df-font-weight-medium);color:var(--df-accent);text-decoration:none;cursor:pointer}.pipeline-strip__link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:1.6rem;height:1.6rem;font-size:1.6rem;line-height:1.6rem}.pipeline-strip__link[_ngcontent-%COMP%]:hover{text-decoration:underline}.pipeline-strip__link[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:2px;border-radius:var(--df-radius-sm)}.pipeline-strip__link--add[_ngcontent-%COMP%]{color:var(--df-text-2)}']})}}return n})();const _r=function(n,i){return{verb:n,service:i}};let gr=(()=>{class n{constructor(t){this.data=t}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.Vh))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-service-role-scope-dialog"]],standalone:!0,features:[e.aNF],decls:22,vars:20,consts:[[1,"scope-role-dialog"],["mat-dialog-title","",1,"scope-role-dialog__head"],[1,"scope-role-dialog__heading"],[1,"scope-role-dialog__eyebrow"],[1,"scope-role-dialog__title"],["mat-icon-button","","mat-dialog-close","",1,"scope-role-dialog__close"],[1,"scope-role-dialog__content"],[1,"scope-role-dialog__hint"],[3,"roleId"],["align","end",1,"scope-role-dialog__actions"],["mat-stroked-button","","mat-dialog-close",""]],template:function(o,a){1&o&&(e.j41(0,"div",0)(1,"header",1)(2,"div",2)(3,"p",3),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"h2",4),e.EFF(7),e.nI1(8,"transloco"),e.k0s()(),e.j41(9,"button",5),e.nI1(10,"transloco"),e.j41(11,"mat-icon"),e.EFF(12,"close"),e.k0s()()(),e.j41(13,"mat-dialog-content",6)(14,"p",7),e.EFF(15),e.nI1(16,"transloco"),e.k0s(),e.nrm(17,"df-role-scope",8),e.k0s(),e.j41(18,"mat-dialog-actions",9)(19,"button",10),e.EFF(20),e.nI1(21,"transloco"),e.k0s()()()),2&o&&(e.R7$(4),e.SpI(" ",e.bMT(5,6,"services.access.dialog.eyebrow")," "),e.R7$(3),e.SpI(" ",e.i5U(8,8,"services.access.dialog.title",e.l_i(17,_r,a.data.verb,a.data.serviceLabel))," "),e.R7$(2),e.BMQ("aria-label",e.bMT(10,11,"services.access.dialog.close")),e.R7$(6),e.SpI(" ",e.bMT(16,13,"services.access.dialog.hint")," "),e.R7$(2),e.Y8G("roleId",a.data.roleId),e.R7$(3),e.SpI(" ",e.bMT(21,15,"services.access.dialog.close")," "))},dependencies:[_.MD,I.Q8,I.Kj,b.Hl,b.$z,b.iY,A.m_,A.An,h.hM,h.tx,h.BI,h.Yi,h.E7,ct.e],styles:[".scope-role-dialog__head[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:1.6rem;margin:0}.scope-role-dialog__eyebrow[_ngcontent-%COMP%]{margin:0 0 .2rem;font-size:1.1rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--df-text-muted)}.scope-role-dialog__title[_ngcontent-%COMP%]{margin:0;font-size:1.8rem;line-height:1.3;color:var(--df-text)}.scope-role-dialog__close[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted)}.scope-role-dialog__hint[_ngcontent-%COMP%]{margin:0 0 1.6rem;color:var(--df-text-muted);font-size:1.3rem;line-height:1.5}"]})}}return n})();class H extends Error{}const fr=new Set(["-s","--silent","-S","--show-error","-v","--verbose","-i","--include","-f","--fail","-#","--progress-bar","-N","--no-buffer","-g","--globoff","-4","--ipv4","-6","--ipv6","--no-progress-meter"]),ur=new Set(["-o","--output","-w","--write-out","-D","--dump-header","--trace","--trace-ascii","--stderr"]),hr=new Set(["-d","--data","--data-raw","--data-ascii","--data-binary","--data-urlencode"]);function vr(n){if(n.endsWith(";")&&!n.includes(":"))return{name:n.slice(0,-1).trim(),value:""};const i=n.indexOf(":");if(-1===i)return null;const t=n.slice(0,i).trim();return t?{name:t,value:n.slice(i+1).trim()}:null}function xr(n){const i=encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(t,o)=>String.fromCharCode(parseInt(o,16)));return btoa(i)}function Se(n){try{return decodeURIComponent(n.replace(/\+/g," "))}catch{return n}}function kr(n,i){if(1&n&&(e.j41(0,"div",10),e.nrm(1,"fa-icon",11),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=e.XpG();e.R7$(1),e.Y8G("icon",t.faTriangleExclamation),e.R7$(2),e.JRh(t.error)}}function Mr(n,i){1&n&&(e.j41(0,"th",26),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"name")," "))}function Pr(n,i){if(1&n&&(e.j41(0,"td",27),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.R7$(1),e.JRh(t.name)}}function Or(n,i){1&n&&(e.j41(0,"th",26),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"value")," "))}function Fr(n,i){if(1&n&&(e.j41(0,"td",28),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.R7$(1),e.SpI(" ",t.value," ")}}function Dr(n,i){1&n&&e.nrm(0,"tr",29)}function wr(n,i){1&n&&e.nrm(0,"tr",30)}function Sr(n,i){if(1&n&&(e.qex(0),e.j41(1,"h3",12),e.EFF(2),e.k0s(),e.j41(3,"table",18),e.qex(4,19),e.DNE(5,Mr,3,3,"th",20),e.DNE(6,Pr,2,1,"td",21),e.bVm(),e.qex(7,22),e.DNE(8,Or,3,3,"th",20),e.DNE(9,Fr,2,1,"td",23),e.bVm(),e.DNE(10,Dr,1,0,"tr",24),e.DNE(11,wr,1,0,"tr",25),e.k0s(),e.bVm()),2&n){const t=e.XpG(),o=t.caption,a=t.$implicit,r=e.XpG(2);e.R7$(2),e.Lme("",o," (",a.length,")"),e.R7$(1),e.Y8G("dataSource",a),e.R7$(7),e.Y8G("matHeaderRowDef",r.keyValueColumns),e.R7$(1),e.Y8G("matRowDefColumns",r.keyValueColumns)}}function Ir(n,i){1&n&&e.DNE(0,Sr,12,5,"ng-container",6),2&n&&e.Y8G("ngIf",i.$implicit.length)}function Tr(n,i){1&n&&e.eu8(0)}function Rr(n,i){1&n&&e.eu8(0)}function Er(n,i){1&n&&e.eu8(0)}function Gr(n,i){if(1&n&&(e.j41(0,"div",33),e.nrm(1,"fa-icon",11),e.j41(2,"span"),e.EFF(3),e.k0s()()),2&n){const t=i.$implicit,o=e.XpG(3);e.R7$(1),e.Y8G("icon",o.faTriangleExclamation),e.R7$(2),e.JRh(t)}}function $r(n,i){if(1&n&&(e.j41(0,"div",31),e.DNE(1,Gr,4,2,"div",32),e.k0s()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("ngForOf",t.parsed.warnings)}}const Le=function(n,i){return{$implicit:n,caption:i}};function jr(n,i){if(1&n&&(e.qex(0),e.j41(1,"h2",12),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"dl",13)(5,"dt"),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"dd",14),e.EFF(9),e.k0s(),e.j41(10,"dt"),e.EFF(11),e.nI1(12,"transloco"),e.k0s(),e.j41(13,"dd"),e.EFF(14),e.k0s()(),e.DNE(15,Ir,1,1,"ng-template",null,15,e.C5r),e.DNE(17,Tr,1,0,"ng-container",16),e.nI1(18,"transloco"),e.DNE(19,Rr,1,0,"ng-container",16),e.nI1(20,"transloco"),e.DNE(21,Er,1,0,"ng-container",16),e.nI1(22,"transloco"),e.DNE(23,$r,2,1,"div",17),e.bVm()),2&n){const t=e.sdS(16),o=e.XpG();e.R7$(2),e.SpI(" ",e.bMT(3,12,"services.curlImport.preview")," "),e.R7$(4),e.JRh(e.bMT(7,14,"services.curlImport.baseUrl")),e.R7$(3),e.JRh(o.parsed.baseUrl),e.R7$(2),e.JRh(e.bMT(12,16,"services.curlImport.method")),e.R7$(3),e.JRh(o.parsed.method),e.R7$(3),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(24,Le,o.parsed.parameters,e.bMT(18,18,"services.curlImport.parameters"))),e.R7$(2),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(27,Le,o.parsed.headers,e.bMT(20,20,"services.curlImport.headers"))),e.R7$(2),e.Y8G("ngTemplateOutlet",t)("ngTemplateOutletContext",e.l_i(30,Le,o.optionEntries,e.bMT(22,22,"services.curlImport.curlOptions"))),e.R7$(2),e.Y8G("ngIf",o.parsed.warnings.length)}}let Nr=(()=>{class n{constructor(t){this.dialogRef=t,this.command="",this.parsed=null,this.error="",this.faUpload=g.JmV,this.faTriangleExclamation=g.JAe,this.keyValueColumns=["name","value"]}get optionEntries(){return Object.entries(this.parsed?.options??{}).map(([t,o])=>({name:t,value:o}))}onCommandChange(){if(this.error="",this.parsed=null,this.command.trim())try{this.parsed=function yr(n){const i=(n??"").trim();if(!i)throw new H("Enter a cURL command.");const t=function br(n){const i=[];let t="",o=!1,a=0;for(;a{if(void 0!==v)return v;if(u++,u>=t.length)throw new H(`Missing value for ${y}.`);return t[u]};for(;u2&&"HXduexAebm".includes(y[1])&&(v=y.slice(0,2),T=y.slice(2)),!fr.has(v)){if(ur.has(v)){M(v,T);continue}if(hr.has(v)){c.push(M(v,T));continue}switch(v){case"-X":case"--request":l=M(v,T).toUpperCase();break;case"-H":case"--header":{const Ce=vr(M(v,T));Ce?o.push(Ce):r.push("Skipped a header that could not be parsed.");break}case"--url":s.push(M(v,T));break;case"-u":case"--user":p=M(v,T);break;case"-A":case"--user-agent":o.push({name:"User-Agent",value:M(v,T)});break;case"-e":case"--referer":o.push({name:"Referer",value:M(v,T)});break;case"-b":case"--cookie":o.push({name:"Cookie",value:M(v,T)});break;case"-k":case"--insecure":a.CURLOPT_SSL_VERIFYPEER="0",a.CURLOPT_SSL_VERIFYHOST="0";break;case"-L":case"--location":a.CURLOPT_FOLLOWLOCATION="1";break;case"-x":case"--proxy":a.CURLOPT_PROXY=M(v,T);break;case"-U":case"--proxy-user":a.CURLOPT_PROXYUSERPWD=M(v,T);break;case"--connect-timeout":a.CURLOPT_CONNECTTIMEOUT=M(v,T);break;case"-m":case"--max-time":a.CURLOPT_TIMEOUT=M(v,T);break;case"--compressed":a.CURLOPT_ENCODING="";break;case"-G":case"--get":f=!0;break;case"-I":case"--head":l=l||"HEAD";break;case"-F":case"--form":x=!0,c.push(M(v,T));break;default:if(r.push(`Ignored unsupported option "${v}".`),void 0===T&&!1===t[u+1]?.startsWith("-")){const Ce=t[u+1];Ce&&!/^[a-z][a-z0-9+.-]*:\/\//i.test(Ce)&&u++}}}}if(!s.length)throw new H("No URL found in the command.");s.length>1&&r.push(`Command contains ${s.length} URLs; only the first was imported.`);const{baseUrl:w,parameters:S}=function Cr(n){const i=[],t=n.indexOf("#"),o=-1===t?n:n.slice(0,t),a=o.indexOf("?");if(-1===a)return{baseUrl:o,parameters:i};const r=o.slice(0,a),c=o.slice(a+1);for(const s of c.split("&")){if(!s)continue;const l=s.indexOf("="),p=-1===l?s:s.slice(0,l),f=-1===l?"":s.slice(l+1);i.push({name:Se(p),value:Se(f)})}return{baseUrl:r,parameters:i}}(s[0]);if(!w)throw new H("No URL found in the command.");const Y=w.match(/^([a-z][a-z0-9+.-]*):(?=\/)/i);if(Y){const y=Y[1].toLowerCase();"http"!==y&&"https"!==y&&r.push(`The URL uses the "${y}" scheme, not http or https. The service sends requests with that scheme server-side, which can read local files or reach internal hosts. Import only if you trust the source.`)}const O=c.length?c.join("&"):void 0;if(f&&O)for(const y of O.split("&")){if(!y)continue;const v=y.indexOf("=");S.push({name:Se(-1===v?y:y.slice(0,v)),value:Se(-1===v?"":y.slice(v+1))})}let D=l;return D||(D=O&&!f?"POST":"GET"),x?r.push("Multipart form fields (-F) cannot be stored on an HTTP service and were not imported."):O&&!f&&r.push("The request body was not imported. An HTTP service passes through the body it receives at request time."),p&&(o.some(v=>"authorization"===v.name.toLowerCase())?r.push("Credentials from -u were ignored because the command already sets an Authorization header."):(o.push({name:"Authorization",value:`Basic ${xr(p)}`}),r.push("Credentials from -u were imported as an Authorization header. Base64 is encoding, not encryption, so they are stored in a recoverable form."))),{baseUrl:w,method:D,parameters:S,headers:o,options:a,body:f?void 0:O,warnings:r}}(this.command)}catch(t){this.error=t instanceof H?t.message:"Could not parse the cURL command."}}onImport(){this.parsed&&this.dialogRef.close(this.parsed)}static{this.\u0275fac=function(o){return new(o||n)(e.rXU(h.CP))}}static{this.\u0275cmp=e.VBU({type:n,selectors:[["df-curl-import-dialog"]],standalone:!0,features:[e.aNF],decls:22,vars:22,consts:[["mat-dialog-title",""],["mat-dialog-content","",1,"curl-import-content"],[1,"curl-import-hint"],["appearance","outline",1,"full-width"],["matInput","","rows","7","spellcheck","false","data-testid","curl-import-command",3,"placeholder","ngModel","ngModelChange"],["class","curl-import-error","data-testid","curl-import-error",4,"ngIf"],[4,"ngIf"],["mat-dialog-actions",""],["mat-flat-button","","mat-dialog-close","","type","button"],["mat-flat-button","","color","primary","type","button","data-testid","curl-import-submit",3,"disabled","click"],["data-testid","curl-import-error",1,"curl-import-error"],[3,"icon"],[1,"curl-import-section"],[1,"curl-import-summary"],["data-testid","curl-import-base-url"],["keyValueTable",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","curl-import-warnings","data-testid","curl-import-warnings",4,"ngIf"],["mat-table","",1,"full-width",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","value"],["mat-cell","","class","curl-import-value",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-cell","",1,"curl-import-value"],["mat-header-row",""],["mat-row",""],["data-testid","curl-import-warnings",1,"curl-import-warnings"],["class","curl-import-warning",4,"ngFor","ngForOf"],[1,"curl-import-warning"]],template:function(o,a){1&o&&(e.j41(0,"h1",0),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"div",1)(4,"p",2),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.j41(7,"mat-form-field",3)(8,"mat-label"),e.EFF(9),e.nI1(10,"transloco"),e.k0s(),e.j41(11,"textarea",4),e.bIt("ngModelChange",function(c){return a.command=c})("ngModelChange",function(){return a.onCommandChange()}),e.nI1(12,"transloco"),e.k0s()(),e.DNE(13,kr,4,2,"div",5),e.DNE(14,jr,24,33,"ng-container",6),e.k0s(),e.j41(15,"div",7)(16,"button",8),e.EFF(17),e.nI1(18,"transloco"),e.k0s(),e.j41(19,"button",9),e.bIt("click",function(){return a.onImport()}),e.EFF(20),e.nI1(21,"transloco"),e.k0s()()),2&o&&(e.R7$(1),e.JRh(e.bMT(2,10,"services.curlImport.title")),e.R7$(4),e.SpI(" ",e.bMT(6,12,"services.curlImport.hint")," "),e.R7$(4),e.JRh(e.bMT(10,14,"services.curlImport.commandLabel")),e.R7$(2),e.Y8G("placeholder",e.bMT(12,16,"services.curlImport.placeholder"))("ngModel",a.command),e.R7$(2),e.Y8G("ngIf",a.error),e.R7$(1),e.Y8G("ngIf",a.parsed),e.R7$(3),e.SpI(" ",e.bMT(18,18,"cancel")," "),e.R7$(2),e.Y8G("disabled",!a.parsed),e.R7$(1),e.SpI(" ",e.bMT(21,20,"services.curlImport.import")," "))},dependencies:[_.bT,_.pM,_.T3,m.YN,m.me,m.BC,m.vS,h.hM,h.tx,h.BI,h.Yi,h.E7,b.Hl,b.$z,P.RG,P.rl,P.nJ,E.fS,E.fg,C.tP,C.Zl,C.tL,C.ji,C.cC,C.YV,C.iL,C.KS,C.$R,C.YZ,C.NB,k.dX,k.aY,I.Kj],styles:[".curl-import-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:34rem;max-width:44rem}.curl-import-hint[_ngcontent-%COMP%]{margin:0 0 1rem;opacity:.75}.full-width[_ngcontent-%COMP%]{width:100%}textarea[matInput][_ngcontent-%COMP%]{font-family:monospace;white-space:pre;overflow-x:auto}.curl-import-section[_ngcontent-%COMP%]{font-size:.95rem;font-weight:600;margin:1rem 0 .5rem}.curl-import-summary[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;gap:.25rem 1rem;margin:0}.curl-import-summary[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{font-weight:600}.curl-import-summary[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;overflow-wrap:anywhere}.curl-import-value[_ngcontent-%COMP%]{overflow-wrap:anywhere}.curl-import-error[_ngcontent-%COMP%], .curl-import-warning[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.5rem 0}.curl-import-error[_ngcontent-%COMP%]{color:var(--mdc-theme-error, #b3261e)}.curl-import-warnings[_ngcontent-%COMP%]{margin-top:1rem}"]})}}return n})();var Ar=d(68788),Yr=d(29810);let Vr=(()=>{class n{constructor(t){this.http=t,this.CACHE_KEY="df_dashboard_stats",this.CACHE_DURATION=3e4,this.REFRESH_INTERVAL=9e5,this.stats$=(0,dt.O)(0,this.REFRESH_INTERVAL).pipe((0,le.n)(()=>this.fetchStats()),(0,Yr.t)(1))}getDashboardStats(){const t=this.getCachedStats();return t?(0,Q.of)(t):this.stats$}fetchStats(){const t=(0,de.Ku)(),o={services:this.http.get("/api/v2/system/service?fields=id,name,type&include_count=true",{context:t}),roles:this.http.get("/api/v2/system/role?fields=id,name&include_count=true",{context:t}),appKeys:this.http.get("/api/v2/system/app?include_count=true",{context:t})};return(0,Oe.p)(o).pipe((0,z.T)(a=>this.transformResponses(a)),(0,ie.M)(a=>this.cacheStats(a)),(0,R.W)(()=>(0,Q.of)(this.getSimpleStats())))}transformResponses(t){const{services:o,roles:a,appKeys:r}=t,c=["system","api_docs","files","logs","db","email","user","script","ui","schema","api_doc","file","log","admin","df-admin","dreamfactory","cache","push","pub_sub"].map(u=>u.toLowerCase()),s=["admin","api_docs","file_manager"].map(u=>u.toLowerCase()),l=["administrator","user","admin","sys_admin"].map(u=>u.toLowerCase()),p=(o.resource||[]).filter(u=>!c.includes(u.name.toLowerCase())),f=(r.resource||[]).filter(u=>{const w=!!(u.apiKey||u.api_key||u.apikey);return!s.includes(u.name.toLowerCase())&&w}),x=(a.resource||[]).filter(u=>!l.includes(u.name.toLowerCase()));return{services:{total:p.length},apiKeys:{total:f.length},roles:{total:x.length}}}calculateTrend(t,o){return 0===t?0:Math.round((o-t)/t*100)}getCachedStats(){const t=localStorage.getItem(this.CACHE_KEY);if(!t)return null;try{const{data:o,timestamp:a}=JSON.parse(t);if(Date.now()-a{class n{constructor(){this.http=(0,e.WQX)(X.Qq)}resolveWorkingKeyAndTable(t,o){var a=this;return(0,ge.A)(function*(r,c,s="your_table"){let l=s;if(!c||"number"!=typeof r)return{apiKey:"",sampleTable:l,keys:[]};try{const p=yield a.introspectTables(c);p[0]&&(l=p[0]);const f=yield a.resolveCandidates(r);if(!f.length)return{apiKey:"",sampleTable:l,keys:[]};const x=window.location.origin,u=[],M=[];for(const S of f){const Y={label:S.label,apiKey:S.apiKey},O=(S.grantsAll?p:S.tables.filter(v=>p.includes(v))).slice(0,5),D=(S.writeCapable?2:0)+(S.grantsAll?1:0);let y="";for(const v of O)try{if((yield fetch(`${x}${N.C}/${c}/_table/${encodeURIComponent(v)}?limit=1`,{headers:{"X-DreamFactory-API-Key":S.apiKey},credentials:"omit"})).ok){y=v;break}}catch{}y?u.push({option:{...Y,verified:!0},table:y,score:D}):M.push(Y)}if(!u.length)return{apiKey:"",sampleTable:l,keys:[]};u.sort((S,Y)=>S.score-Y.score),l=u[0].table;const w=[...u.map(S=>S.option),...M];return{apiKey:w[0].apiKey,sampleTable:l,keys:w}}catch{return{apiKey:"",sampleTable:l,keys:[]}}}).apply(this,arguments)}resolveCandidates(t){var o=this;return(0,ge.A)(function*(){const a=yield(0,Ue._)(o.http.get(`${N.C}/system/role?related=role_service_access_by_role_id&limit=200`,{context:(0,de.Ku)()})),r=new Map;for(const p of a?.resource??[]){if(!1===p?.isActive)continue;let f=!1,x=!1;const u=[];for(const M of p?.roleServiceAccessByRoleId??[]){const w=M?.serviceId;if(w!==t&&null!=w)continue;const Y=M?.verbMask??0;if(30&Y&&(x=!0),!(1&Y))continue;const O=M?.component??"";if(""===O||"*"===O||"_table/*"===O)f=!0;else if(O.startsWith("_table/")){const D=O.slice(7).replace(/\/\*$/,"").replace(/\/$/,"");D&&"*"!==D&&u.push(D)}}(f||u.length)&&r.set(p.id,{tables:u,grantsAll:f,writeCapable:x})}if(!r.size)return[];const c=[...r.keys()],s=yield Promise.all(c.map(p=>(0,Ue._)(o.http.get(`${N.C}/system/app?filter=role_id=${p}&fields=*`,{context:(0,de.Ku)()})).catch(()=>({resource:[]})))),l=[];return c.forEach((p,f)=>{const x=r.get(p);if(x)for(const u of s[f]?.resource??[])!1===u?.isActive||!u?.apiKey||l.push({label:u.name||"API key",apiKey:u.apiKey,tables:x.tables,grantsAll:x.grantsAll,writeCapable:x.writeCapable})}),l})()}introspectTables(t){var o=this;return(0,ge.A)(function*(){try{return((yield(0,Ue._)(o.http.get(`${N.C}/${t}/_table`,{context:(0,de.Ku)()})))?.resource??[]).map(r=>"string"==typeof r?r:r?.name).filter(r=>!!r)}catch{return[]}})()}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Je;const Xr=["stepper"],Br=["functionEditor"],Lr=["headersEditor"],Ur=["unsavedToolDialog"];function Jr(n,i){1&n&&(e.EFF(0),e.nI1(1,"transloco")),2&n&&e.SpI(" ",e.bMT(1,1,"services.controls.serviceType.label"),"")}function qr(n,i){if(1&n){const t=e.RV6();e.j41(0,"label",30)(1,"input",31),e.bIt("input",function(){e.eBV(t),e.XpG();const a=e.sdS(2),r=e.XpG();return e.Njj(r.nextStep(a))}),e.k0s(),e.j41(2,"div",32),e.nrm(3,"span",33),e.j41(4,"div",34),e.nrm(5,"img",35),e.j41(6,"h4"),e.EFF(7),e.k0s()()()()}if(2&n){const t=i.$implicit,o=e.XpG(2);e.R7$(1),e.Y8G("value",t.name),e.R7$(1),e.HbH(t.class),e.R7$(3),e.Y8G("src",o.getBackgroundImage(t.name),e.B4B)("alt",t.label),e.R7$(2),e.SpI(" ",t.label," ")}}function Hr(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",37),e.bIt("click",function(){e.eBV(t);const a=e.XpG().$implicit,r=e.XpG(2);return e.Njj(r.openDialog(a.label||a.name))}),e.EFF(2," Unlock Now "),e.k0s(),e.bVm()}}function Kr(n,i){if(1&n){const t=e.RV6();e.j41(0,"label",30)(1,"input",31),e.bIt("input",function(){e.eBV(t),e.XpG();const a=e.sdS(2),r=e.XpG();return e.Njj(r.nextStep(a))}),e.k0s(),e.j41(2,"div",32),e.nrm(3,"span",33),e.j41(4,"div",34),e.nrm(5,"img",35),e.j41(6,"h4",36),e.EFF(7),e.k0s()()(),e.DNE(8,Hr,3,0,"ng-container",24),e.k0s()}if(2&n){const t=i.$implicit,o=e.XpG(2);e.R7$(1),e.Y8G("value",t.name),e.BMQ("disabled",!0),e.R7$(1),e.HbH(t.class),e.R7$(3),e.Y8G("src",o.getBackgroundImage(t.name),e.B4B)("alt",t.label),e.R7$(2),e.SpI(" ",t.label," "),e.R7$(1),e.Y8G("ngIf","not-included"===t.class)}}function Qr(n,i){1&n&&e.EFF(0,"Service Details")}function Wr(n,i){if(1&n&&(e.j41(0,"mat-form-field",38)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",39)(5,"fa-icon",11),e.nI1(6,"transloco"),e.j41(7,"mat-hint"),e.EFF(8),e.nI1(9,"transloco"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,4,"services.controls.namespace.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,6,"services.controls.namespace.tooltip")),e.R7$(3),e.JRh(e.bMT(9,8,"services.controls.namespace.hint"))}}function Zr(n,i){if(1&n&&(e.j41(0,"mat-form-field",40)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",41)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.label.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.label.tooltip"))}}function ec(n,i){if(1&n&&(e.j41(0,"mat-form-field",42)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"textarea",43)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.description.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.description.tooltip"))}}function tc(n,i){1&n&&(e.j41(0,"mat-slide-toggle",44),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.JRh(e.bMT(2,1,"active")))}function nc(n,i){1&n&&e.EFF(0,"Service Options")}function oc(n,i){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function ic(n,i){if(1&n&&(e.qex(0),e.DNE(1,oc,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(5);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}const J=function(){return["file_certificate","file_certificate_api"]};function ac(n,i){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,J).indexOf(t.type))("full-width",-1!==e.lJ4(7,J).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function rc(n,i){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}const ee=function(){return["integer","password","string","text","picklist","multi_picklist","boolean","file_certificate","file_certificate_api"]};function cc(n,i){if(1&n&&(e.DNE(0,ac,1,8,"df-dynamic-field",49),e.DNE(1,rc,1,2,"df-array-field",50)),2&n){const t=e.XpG().$implicit;e.Y8G("ngIf",e.lJ4(2,ee).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function sc(n,i){if(1&n&&(e.qex(0),e.DNE(1,ic,2,1,"ng-container",1),e.DNE(2,cc,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=i.$implicit,o=e.sdS(3);e.R7$(1),e.Y8G("ngIf","text"===t.type&&"content"===t.name)("ngIfElse",o)}}function lc(n,i){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"div",9),e.DNE(3,sc,4,2,"ng-container",46),e.k0s()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(3),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName)}}function dc(n,i){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width","file_certificate"!==t.type)("full-width","file_certificate"===t.type),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function pc(n,i){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function mc(n,i){if(1&n&&(e.qex(0),e.DNE(1,dc,1,6,"df-dynamic-field",49),e.DNE(2,pc,1,2,"df-array-field",50),e.bVm()),2&n){const t=i.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,ee).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function _c(n,i){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(7);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function gc(n,i){if(1&n&&(e.qex(0),e.DNE(1,_c,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}function fc(n,i){if(1&n&&e.nrm(0,"df-dynamic-field",51),2&n){const t=e.XpG(2).$implicit,o=e.XpG(5);e.AVh("dynamic-width","file_certificate"!==t.type&&"file_certificate_api"!==t.type)("full-width","file_certificate"===t.type||"file_certificate_api"===t.type),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function uc(n,i){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(5);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function hc(n,i){if(1&n&&(e.DNE(0,fc,1,6,"df-dynamic-field",49),e.DNE(1,uc,1,2,"df-array-field",50)),2&n){const t=e.XpG().$implicit;e.Y8G("ngIf",e.lJ4(2,ee).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function bc(n,i){if(1&n&&(e.qex(0),e.DNE(1,gc,2,1,"ng-container",1),e.DNE(2,hc,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=i.$implicit,o=e.sdS(3);e.R7$(1),e.Y8G("ngIf","text"===t.type&&"content"===t.name)("ngIfElse",o)}}function vc(n,i){if(1&n&&(e.j41(0,"div",55)(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"div",9),e.DNE(7,bc,4,2,"ng-container",46),e.k0s()()()()),2&n){const t=e.XpG(4);e.R7$(2),e.Y8G("expanded",!1),e.R7$(2),e.SpI(" ",e.bMT(5,4,"services.options")," "),e.R7$(3),e.Y8G("ngForOf",t.advancedFields)("ngForTrackBy",t.trackByName)}}function Cc(n,i){if(1&n&&(e.qex(0),e.j41(1,"div",53),e.DNE(2,mc,3,3,"ng-container",46),e.k0s(),e.DNE(3,vc,8,6,"div",54),e.bVm()),2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("ngForOf",t.basicFields)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngIf",t.showAdvancedOptions)}}function xc(n,i){if(1&n&&(e.qex(0)(1,45),e.DNE(2,lc,4,2,"ng-container",24),e.DNE(3,Cc,4,3,"ng-container",24),e.bVm()()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",!t.isDatabase||!t.hasStandardFields),e.R7$(1),e.Y8G("ngIf",t.isDatabase&&t.hasStandardFields)}}function yc(n,i){if(1&n&&(e.j41(0,"div",57),e.nrm(1,"fa-icon",58),e.j41(2,"p",59),e.EFF(3),e.nI1(4,"transloco"),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("icon",t.faCircleInfo),e.R7$(2),e.SpI(" ",e.bMT(4,2,"services.firstTimeGuidance")," ")}}function kc(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",66),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.goToSecurityConfig())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",!t.serviceForm.valid),e.R7$(1),e.SpI(" ",e.bMT(2,2,"services.controls.nextSecurityConfig")," ")}}function Mc(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",67),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.goToSecurityConfig())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}if(2&n){const t=e.XpG(3);e.Y8G("disabled",!t.serviceForm.valid),e.R7$(1),e.SpI(" ",e.bMT(2,2,"services.controls.securityConfig")," ")}}function Pc(n,i){1&n&&(e.j41(0,"button",68),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"services.controls.createAndTest")," "))}function Oc(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",60)(1,"button",61),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.goBack())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"div",62),e.DNE(5,kc,3,4,"button",63),e.DNE(6,Mc,3,4,"button",64),e.DNE(7,Pc,3,3,"button",65),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,4,"cancel")," "),e.R7$(3),e.Y8G("ngIf",t.isFirstTimeUser&&t.isDatabase),e.R7$(1),e.Y8G("ngIf",!(t.isFirstTimeUser&&t.isDatabase)),e.R7$(1),e.Y8G("ngIf",!(t.isFirstTimeUser&&t.isDatabase))}}function Fc(n,i){1&n&&e.EFF(0,"Security Configuration")}function Dc(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",9)(1,"df-security-config",69),e.bIt("goBack",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.goBack())}),e.k0s()()}if(2&n){const t=e.XpG(2);let o;e.R7$(1),e.Y8G("serviceName",null==(o=t.serviceForm.get("name"))?null:o.value)("serviceId",t.currentServiceId)("isDatabase",t.isDatabase)("isFirstTimeUser",t.isFirstTimeUser)}}function wc(n,i){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,' Please complete the previous steps and click "Security Config" to configure security settings. '),e.k0s(),e.j41(3,"div",21)(4,"div")(5,"button",23),e.EFF(6," Back "),e.k0s()()()())}function Sc(n,i){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"1"),e.k0s())}function Ic(n,i){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"2"),e.k0s())}function Tc(n,i){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"3"),e.k0s())}function Rc(n,i){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"4"),e.k0s())}function Ec(n,i){1&n&&(e.qex(0,70),e.DNE(1,Sc,2,0,"mat-icon",71),e.DNE(2,Ic,2,0,"mat-icon",71),e.DNE(3,Tc,2,0,"mat-icon",71),e.DNE(4,Rc,2,0,"mat-icon",71),e.bVm()),2&n&&(e.Y8G("ngSwitch",i.index),e.R7$(1),e.Y8G("ngSwitchCase",0),e.R7$(1),e.Y8G("ngSwitchCase",1),e.R7$(1),e.Y8G("ngSwitchCase",2),e.R7$(1),e.Y8G("ngSwitchCase",3))}function Gc(n,i){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"1"),e.k0s())}function $c(n,i){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"2"),e.k0s())}function jc(n,i){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"3"),e.k0s())}function Nc(n,i){1&n&&(e.j41(0,"mat-icon"),e.EFF(1,"4"),e.k0s())}function Ac(n,i){1&n&&(e.qex(0,70),e.DNE(1,Gc,2,0,"mat-icon",71),e.DNE(2,$c,2,0,"mat-icon",71),e.DNE(3,jc,2,0,"mat-icon",71),e.DNE(4,Nc,2,0,"mat-icon",71),e.bVm()),2&n&&(e.Y8G("ngSwitch",i.index),e.R7$(1),e.Y8G("ngSwitchCase",0),e.R7$(1),e.Y8G("ngSwitchCase",1),e.R7$(1),e.Y8G("ngSwitchCase",2),e.R7$(1),e.Y8G("ngSwitchCase",3))}const qe=function(){return{standalone:!0}};function Yc(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-stepper",5,6)(3,"mat-step",7),e.DNE(4,Jr,2,3,"ng-template",8),e.j41(5,"div",9)(6,"div",10)(7,"h3"),e.EFF(8),e.nI1(9,"transloco"),e.nrm(10,"fa-icon",11),e.nI1(11,"transloco"),e.k0s(),e.j41(12,"div")(13,"button",12),e.EFF(14," Next "),e.k0s()()(),e.j41(15,"mat-form-field",13)(16,"mat-label"),e.EFF(17,"Search service types..."),e.k0s(),e.j41(18,"input",14),e.bIt("ngModelChange",function(a){e.eBV(t);const r=e.XpG();return e.Njj(r.search=a)}),e.k0s()(),e.j41(19,"div",15)(20,"div",16),e.DNE(21,qr,8,6,"label",17),e.DNE(22,Kr,9,8,"label",17),e.k0s()(),e.j41(23,"div")(24,"button",12),e.EFF(25," Next "),e.k0s()()()(),e.j41(26,"mat-step"),e.DNE(27,Qr,1,0,"ng-template",8),e.nrm(28,"br"),e.j41(29,"div",9),e.DNE(30,Wr,10,10,"mat-form-field",18),e.DNE(31,Zr,7,7,"mat-form-field",19),e.DNE(32,ec,7,7,"mat-form-field",20),e.j41(33,"div",21),e.DNE(34,tc,3,3,"mat-slide-toggle",22),e.j41(35,"div")(36,"button",23),e.EFF(37," Back "),e.k0s(),e.j41(38,"button",12),e.EFF(39," Next "),e.k0s()(),e.nrm(40,"div"),e.k0s()()(),e.j41(41,"mat-step"),e.DNE(42,nc,1,0,"ng-template",8),e.nrm(43,"br"),e.DNE(44,xc,4,2,"ng-container",24),e.DNE(45,yc,5,4,"div",25),e.DNE(46,Oc,8,6,"div",26),e.k0s(),e.j41(47,"mat-step"),e.DNE(48,Fc,1,0,"ng-template",8),e.DNE(49,Dc,2,4,"div",27),e.DNE(50,wc,7,0,"div",27),e.k0s(),e.DNE(51,Ec,5,5,"ng-template",28),e.DNE(52,Ac,5,5,"ng-template",29),e.k0s(),e.bVm()}if(2&n){const t=e.XpG();let o,a,r;e.R7$(3),e.Y8G("editable",!0),e.R7$(5),e.SpI(" Search for your ",e.bMT(9,22,"services.controls.serviceType.label")," to get started "),e.R7$(2),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(11,24,"services.controls.serviceType.tooltip")),e.R7$(3),e.Y8G("disabled",""===(null==(o=t.serviceForm.get("type"))?null:o.value)),e.R7$(5),e.Y8G("ngModel",t.search)("ngModelOptions",e.lJ4(26,qe)),e.R7$(3),e.Y8G("ngForOf",t.filteredServiceTypes)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngForOf",t.notIncludedServices)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("disabled",""===(null==(a=t.serviceForm.get("type"))?null:a.value)),e.R7$(6),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(2),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(4),e.Y8G("disabled",""===(null==(r=t.serviceForm.get("type"))?null:r.value)&&""===(null==(r=t.serviceForm.get("description"))?null:r.value)),e.R7$(6),e.Y8G("ngIf",t.viewSchema&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",t.isFirstTimeUser&&t.isDatabase&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(3),e.Y8G("ngIf",t.showSecurityConfig),e.R7$(1),e.Y8G("ngIf",!t.showSecurityConfig)}}function Vc(n,i){if(1&n&&e.nrm(0,"df-service-health-panel",78),2&n){const t=e.XpG(2);e.Y8G("serviceId",t.serviceData.id)("serviceName",t.serviceData.name)("serviceGroup",t.serviceGroup)("deprecated",t.serviceData.deprecated)}}function zc(n,i){if(1&n&&(e.j41(0,"section",83),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.nI1(4,"transloco"),e.j41(5,"p",84),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.nrm(8,"df-pipeline-strip",85),e.k0s()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,7,"services.pipeline.eyebrow"))("title",e.bMT(3,9,"services.pipeline.title"))("description",e.bMT(4,11,"services.pipeline.description")),e.R7$(5),e.SpI(" ",e.bMT(7,13,"services.pipeline.hint")," "),e.R7$(2),e.Y8G("serviceId",t.serviceData.id)("serviceName",t.serviceData.name)("serviceType",t.serviceData.type)}}function Xc(n,i){if(1&n){const t=e.RV6();e.j41(0,"section",86),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.nI1(4,"transloco"),e.j41(5,"p",87),e.EFF(6),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"df-scope-matrix",88),e.bIt("cellClick",function(a){e.eBV(t);const r=e.XpG(3);return e.Njj(r.onScopeCellClick(a))}),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,5,"services.access.eyebrow"))("title",e.bMT(3,7,"services.access.title"))("description",e.bMT(4,9,"services.access.description")),e.R7$(5),e.SpI(" ",e.bMT(7,11,"services.access.hint")," "),e.R7$(2),e.Y8G("serviceId",t.serviceData.id)}}function Bc(n,i){if(1&n){const t=e.RV6();e.qex(0),e.nrm(1,"df-page-header",79),e.nI1(2,"transloco"),e.nI1(3,"transloco"),e.j41(4,"df-artifact-card",80),e.bIt("createKey",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.onCreateApiKey())}),e.k0s(),e.DNE(5,zc,9,15,"section",81),e.DNE(6,Xc,9,13,"section",82),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(1),e.Y8G("eyebrow",e.bMT(2,9,"services.overview.eyebrow"))("title",t.serviceData.label||t.serviceData.name)("description",e.bMT(3,11,"services.overview.description")),e.R7$(3),e.Y8G("serviceName",t.serviceData.name)("baseUrl",t.artifactBaseUrl)("sampleTable",t.artifactSampleTable)("keys",t.artifactKeys),e.R7$(1),e.Y8G("ngIf",t.serviceData.id),e.R7$(1),e.Y8G("ngIf",t.serviceData.id)}}function Lc(n,i){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.label," ")}}function Uc(n,i){if(1&n&&(e.j41(0,"mat-form-field",38)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",39)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.namespace.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.namespace.tooltip"))}}function Jc(n,i){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.Y8G("value",t.id),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function qc(n,i){if(1&n&&(e.qex(0),e.j41(1,"mat-form-field",90)(2,"mat-label"),e.EFF(3,"Storage Service *"),e.k0s(),e.j41(4,"mat-select",91),e.DNE(5,Jc,2,2,"mat-option",74),e.k0s()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(5),e.Y8G("ngForOf",t.availableFileServices)("ngForTrackBy",t.trackById)}}function Hc(n,i){if(1&n&&(e.j41(0,"mat-form-field",92)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",41)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.label.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.label.tooltip"))}}function Kc(n,i){if(1&n&&(e.j41(0,"mat-form-field",92)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"textarea",43)(5,"fa-icon",11),e.nI1(6,"transloco"),e.k0s()),2&n){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,3,"services.controls.description.label")),e.R7$(3),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(6,5,"services.controls.description.tooltip"))}}function Qc(n,i){1&n&&(e.j41(0,"mat-slide-toggle",93)(1,"span"),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()),2&n&&(e.R7$(2),e.JRh(e.bMT(3,1,"active")))}function Wc(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",95),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.gotoSchema())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.bVm()}2&n&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"schema")," "))}function Zc(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",95),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.gotoAPIDocs())}),e.EFF(1),e.nI1(2,"transloco"),e.k0s()}2&n&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"apiDocs")," "))}function es(n,i){if(1&n&&(e.qex(0),e.DNE(1,Wc,4,3,"ng-container",1),e.DNE(2,Zc,3,3,"ng-template",null,94,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG(2);e.R7$(1),e.Y8G("ngIf",o.isDatabase)("ngIfElse",t)}}function ts(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",97)(1,"button",98),e.bIt("click",function(){e.eBV(t);const a=e.XpG(4);return e.Njj(a.openCurlImport())}),e.nrm(2,"fa-icon",99),e.j41(3,"span"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()(),e.j41(6,"span",100),e.EFF(7),e.nI1(8,"transloco"),e.k0s()()}if(2&n){const t=e.XpG(4);e.R7$(2),e.Y8G("icon",t.faFileImport),e.R7$(2),e.JRh(e.bMT(5,3,"services.curlImport.button")),e.R7$(3),e.SpI(" ",e.bMT(8,5,"services.curlImport.buttonHint")," ")}}function ns(n,i){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,J).indexOf(t.type))("full-width",-1!==e.lJ4(7,J).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function os(n,i){if(1&n&&(e.qex(0),e.DNE(1,ns,1,8,"df-dynamic-field",101),e.bVm()),2&n){const t=i.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(1,ee).includes(t.type))}}function is(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-button-toggle-group",103),e.bIt("ngModelChange",function(a){e.eBV(t);const r=e.XpG(4);return e.Njj(r.serviceDefinitionType=a)})("change",function(){e.eBV(t);const a=e.XpG(4);return e.Njj(a.onServiceDefinitionTypeChange(a.serviceDefinitionType))}),e.j41(2,"mat-button-toggle",104),e.EFF(3,"JSON"),e.k0s(),e.j41(4,"mat-button-toggle",105),e.EFF(5,"YAML"),e.k0s()(),e.bVm()}if(2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("ngModel",t.serviceDefinitionType)("ngModelOptions",e.lJ4(2,qe))}}function as(n,i){if(1&n&&(e.qex(0),e.nrm(1,"df-file-github",106),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("type",t.getControl("type"))("content",t.getConfigControl("content"))("contentText",t.content)}}function rs(n,i){if(1&n&&(e.qex(0),e.nrm(1,"df-file-github",106),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("type",t.getControl("type"))("content",t.getConfigControl("content"))("contentText",t.content)}}function cs(n,i){if(1&n&&(e.qex(0),e.nrm(1,"df-ace-editor",107),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("formControl",t.getConfigControl("content"))("mode",t.serviceDefinitionMode)}}function ss(n,i){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,J).indexOf(t.type))("full-width",-1!==e.lJ4(7,J).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function ls(n,i){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG().$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function ds(n,i){if(1&n&&(e.qex(0),e.DNE(1,ss,1,8,"df-dynamic-field",101),e.DNE(2,ls,1,2,"df-array-field",50),e.bVm()),2&n){const t=i.$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,ee).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function ps(n,i){if(1&n&&(e.qex(0),e.DNE(1,ts,9,7,"div",96),e.DNE(2,os,2,2,"ng-container",46),e.j41(3,"mat-accordion",15)(4,"mat-expansion-panel",56)(5,"mat-expansion-panel-header"),e.EFF(6," Advanced Options "),e.k0s(),e.j41(7,"div",9),e.DNE(8,is,6,3,"ng-container",24),e.j41(9,"mat-label",15),e.EFF(10,"Service Definition"),e.k0s(),e.DNE(11,as,2,3,"ng-container",24),e.DNE(12,rs,2,3,"ng-container",24),e.DNE(13,cs,2,2,"ng-container",24),e.DNE(14,ds,3,3,"ng-container",46),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngIf",t.showCurlImport),e.R7$(1),e.Y8G("ngForOf",t.networkRequiredFields)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("expanded",!1),e.R7$(4),e.Y8G("ngIf","soap"!==t.serviceForm.getRawValue().type),e.R7$(3),e.Y8G("ngIf","rws"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","soap"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","rest"===t.serviceForm.getRawValue().type||"http"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngForOf",t.networkAdvancedFields)("ngForTrackBy",t.trackByName)}}function ms(n,i){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",108),e.bVm()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("isScript",t.isScriptService)("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getConfigControl("content"))("cache",t.serviceData?t.serviceData.name:"")("hideScmActions",!0)}}function _s(n,i){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,J).indexOf(t.type))("full-width",-1!==e.lJ4(7,J).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function gs(n,i){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(2).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function fs(n,i){if(1&n&&(e.qex(0),e.DNE(1,_s,1,8,"df-dynamic-field",101),e.DNE(2,gs,1,2,"df-array-field",50),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf",e.lJ4(2,ee).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function us(n,i){if(1&n&&(e.qex(0),e.DNE(1,fs,3,3,"ng-container",24),e.bVm()),2&n){const t=i.$implicit;e.R7$(1),e.Y8G("ngIf","content"!==t.name)}}function hs(n,i){if(1&n){const t=e.RV6();e.qex(0),e.DNE(1,ms,2,7,"ng-container",24),e.j41(2,"mat-accordion",15)(3,"mat-expansion-panel",56)(4,"mat-expansion-panel-header"),e.EFF(5," Advanced Options "),e.k0s(),e.j41(6,"div",9)(7,"mat-button-toggle-group",103),e.bIt("ngModelChange",function(a){e.eBV(t);const r=e.XpG(3);return e.Njj(r.serviceDefinitionType=a)})("change",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.onServiceDefinitionTypeChange(a.serviceDefinitionType))}),e.j41(8,"mat-button-toggle",104),e.EFF(9,"JSON"),e.k0s(),e.j41(10,"mat-button-toggle",105),e.EFF(11,"YAML"),e.k0s()(),e.j41(12,"mat-label",15),e.EFF(13,"OpenAPI Service Definition (Optional)"),e.k0s(),e.nrm(14,"df-ace-editor",107),e.DNE(15,us,2,1,"ng-container",46),e.k0s()()(),e.bVm()}if(2&n){const t=e.XpG(3);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId")),e.R7$(2),e.Y8G("expanded",!1),e.R7$(4),e.Y8G("ngModel",t.serviceDefinitionType)("ngModelOptions",e.lJ4(8,qe)),e.R7$(7),e.Y8G("formControl",t.getServiceDocByServiceIdControl("content"))("mode",t.serviceDefinitionMode),e.R7$(1),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName)}}function bs(n,i){if(1&n){const t=e.RV6();e.j41(0,"df-ai-chat-prereqs",113),e.bIt("selectConnection",function(a){e.eBV(t);const r=e.XpG(4);return e.Njj(r.setAiServiceId(a))})("selectRole",function(a){e.eBV(t);const r=e.XpG(4);return e.Njj(r.setAiRoleId(a))}),e.k0s()}if(2&n){const t=e.XpG(4);e.Y8G("selectedConnectionId",t.aiServiceId)("selectedRoleId",t.aiRoleId)}}function vs(n,i){if(1&n&&e.nrm(0,"df-ai-data-services",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function Cs(n,i){if(1&n&&e.nrm(0,"df-ai-mcp-servers",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function xs(n,i){if(1&n&&e.nrm(0,"df-ai-test-connection",115),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)("serviceId",t.edit&&t.serviceData?t.serviceData.id:null)}}function ys(n,i){if(1&n&&e.nrm(0,"df-ai-model-picker",115),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)("serviceId",t.edit&&t.serviceData?t.serviceData.id:null)}}function ks(n,i){if(1&n&&e.nrm(0,"df-ai-allowed-roles",114),2&n){const t=e.XpG(4);e.Y8G("form",t.serviceForm)}}function Ms(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"div",116)(2,"input",117,118),e.bIt("change",function(a){e.eBV(t);const r=e.XpG(4);return e.Njj(r.excelUpload(a))}),e.k0s(),e.j41(4,"button",95),e.bIt("click",function(){e.eBV(t);const a=e.sdS(3);return e.Njj(a.click())}),e.EFF(5," Upload Excel "),e.k0s()(),e.nrm(6,"df-ace-editor",107),e.bVm()}if(2&n){const t=e.XpG(4);e.R7$(6),e.Y8G("formControl",t.getConfigControl("excelContent"))("mode",t.excelMode)}}function Ps(n,i){if(1&n&&(e.qex(0),e.nrm(1,"df-script-editor",48),e.bVm()),2&n){const t=e.XpG(7);e.R7$(1),e.Y8G("type",t.getControl("type"))("storageServiceId",t.getConfigControl("storageServiceId"))("storagePath",t.getConfigControl("storagePath"))("content",t.getServiceDocByServiceIdControl("content"))("cache",t.serviceData?t.serviceData.name:"")}}function Os(n,i){if(1&n&&(e.qex(0),e.DNE(1,Ps,2,5,"ng-container",24),e.bVm()),2&n){const t=e.XpG(6);e.R7$(1),e.Y8G("ngIf",t.getConfigControl("storageServiceId"))}}function Fs(n,i){if(1&n&&e.nrm(0,"df-dynamic-field",102),2&n){const t=e.XpG(3).$implicit,o=e.XpG(4);e.AVh("dynamic-width",-1===e.lJ4(6,J).indexOf(t.type))("full-width",-1!==e.lJ4(7,J).indexOf(t.type)),e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function Ds(n,i){if(1&n&&e.nrm(0,"df-array-field",52),2&n){const t=e.XpG(3).$implicit,o=e.XpG(4);e.Y8G("schema",t)("formControl",o.getConfigControl(t.name))}}function ws(n,i){if(1&n&&(e.DNE(0,Fs,1,8,"df-dynamic-field",101),e.DNE(1,Ds,1,2,"df-array-field",50)),2&n){const t=e.XpG(2).$implicit;e.Y8G("ngIf",e.lJ4(2,ee).includes(t.type)),e.R7$(1),e.Y8G("ngIf","array"===t.type||"object"===t.type)}}function Ss(n,i){if(1&n&&(e.qex(0),e.DNE(1,Os,2,1,"ng-container",1),e.DNE(2,ws,2,3,"ng-template",null,47,e.C5r),e.bVm()),2&n){const t=e.sdS(3),o=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf","text"===o.type&&"content"===o.name)("ngIfElse",t)}}function Is(n,i){if(1&n&&(e.qex(0),e.DNE(1,Ss,4,2,"ng-container",24),e.bVm()),2&n){const t=i.$implicit,o=e.XpG(4);e.R7$(1),e.Y8G("ngIf",!("ai_chat"===o.serviceForm.getRawValue().type&&("aiServiceId"===t.name||"aiRoleId"===t.name||"mcpServers"===t.name||"defaultDataServices"===t.name)||"ai_connection"===o.serviceForm.getRawValue().type&&("defaultModel"===t.name||"allowedRoles"===t.name)))}}function Ts(n,i){if(1&n&&e.nrm(0,"df-role-scope",119),2&n){const t=e.XpG(4);e.Y8G("roleId",t.aiRoleId)}}function Rs(n,i){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"div",9),e.DNE(7,bs,1,2,"df-ai-chat-prereqs",109),e.DNE(8,vs,1,1,"df-ai-data-services",110),e.DNE(9,Cs,1,1,"df-ai-mcp-servers",110),e.DNE(10,xs,1,2,"df-ai-test-connection",111),e.DNE(11,ys,1,2,"df-ai-model-picker",111),e.DNE(12,ks,1,1,"df-ai-allowed-roles",110),e.DNE(13,Ms,7,2,"ng-container",24),e.DNE(14,Is,2,1,"ng-container",46),e.DNE(15,Ts,1,1,"df-role-scope",112),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("expanded",t.serviceForm.getRawValue().type),e.R7$(2),e.SpI("",e.bMT(5,12,"services.options")," "),e.R7$(3),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf","ai_connection"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf",t.isFile&&"local_file"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngForOf",t.viewSchema)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("ngIf","ai_chat"===t.serviceForm.getRawValue().type&&t.aiRoleId)}}function Es(n,i){if(1&n&&(e.qex(0)(1,45),e.DNE(2,ps,15,10,"ng-container",24),e.DNE(3,hs,16,9,"ng-container",24),e.DNE(4,Rs,16,14,"ng-container",24),e.bVm()()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("ngIf",t.isNetworkService),e.R7$(1),e.Y8G("ngIf",t.isScriptService),e.R7$(1),e.Y8G("ngIf",!t.isNetworkService&&!t.isScriptService)}}function Gs(n,i){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(a){const c=e.eBV(t).$implicit,s=e.XpG(3);return e.Njj(s.toggleTool(c.name,a.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=i.$implicit,o=e.XpG(3);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function $s(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Built-in Tools "),e.k0s(),e.j41(5,"div",120)(6,"mat-accordion",121)(7,"mat-expansion-panel",56)(8,"mat-expansion-panel-header")(9,"mat-panel-title",122)(10,"mat-slide-toggle",123),e.bIt("change",function(a){e.eBV(t);const r=e.XpG(2);return e.Njj(r.toggleAllSystemTools(a.checked))})("click",function(a){return a.stopPropagation()}),e.k0s(),e.j41(11,"span"),e.EFF(12,"System API"),e.k0s()(),e.j41(13,"mat-panel-description"),e.EFF(14),e.k0s()(),e.j41(15,"table",124)(16,"thead")(17,"tr"),e.nrm(18,"th",125),e.j41(19,"th"),e.EFF(20,"Tool Name"),e.k0s(),e.j41(21,"th"),e.EFF(22,"Description"),e.k0s()()(),e.j41(23,"tbody"),e.DNE(24,Gs,8,5,"tr",126),e.k0s()()()()()()(),e.bVm()}if(2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",!0),e.R7$(5),e.Y8G("expanded",!0),e.R7$(3),e.Y8G("checked",t.isAllSystemToolsEnabled()),e.R7$(4),e.SpI(" System API \xb7 ",t.systemMcpTools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.systemMcpTools)("ngForTrackBy",t.trackByName)}}function js(n,i){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,"Loading services..."),e.k0s()())}function Ns(n,i){1&n&&(e.j41(0,"div",9)(1,"p"),e.EFF(2,"No database or file services found."),e.k0s()())}function As(n,i){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(a){const c=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.toggleTool(c.name,a.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=i.$implicit,o=e.XpG(4);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function Ys(n,i){if(1&n&&(e.j41(0,"th")(1,"code"),e.EFF(2),e.k0s()()),2&n){const t=i.$implicit;e.R7$(2),e.JRh(t.name)}}function Vs(n,i){if(1&n){const t=e.RV6();e.j41(0,"td")(1,"mat-slide-toggle",127),e.bIt("change",function(a){const c=e.eBV(t).$implicit,s=e.XpG().$implicit,l=e.XpG(5);return e.Njj(l.toggleVerbFor(s.name,c.name,a.checked))}),e.k0s()()}if(2&n){const t=i.$implicit,o=e.XpG().$implicit,a=e.XpG(5);e.R7$(1),e.Y8G("checked",a.isVerbEnabledFor(o.name,t.name))}}function zs(n,i){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(a){const c=e.eBV(t).$implicit,s=e.XpG(5);return e.Njj(s.toggleVerbEverywhere(c.name,a.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.DNE(6,Vs,2,1,"td",46),e.k0s()}if(2&n){const t=i.$implicit,o=e.XpG(5);e.AVh("disabled-row",!o.isVerbEnabledAnywhere(t.name)),e.R7$(2),e.Y8G("checked",o.isVerbEnabledAnywhere(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(1),e.Y8G("ngForOf",o.dbServices)("ngForTrackBy",o.trackByName)}}function Xs(n,i){if(1&n&&(e.j41(0,"mat-expansion-panel",132)(1,"mat-expansion-panel-header")(2,"mat-panel-title",122)(3,"span"),e.EFF(4,"Database Tools (merged)"),e.k0s()(),e.j41(5,"mat-panel-description"),e.EFF(6),e.k0s()(),e.j41(7,"p",9),e.EFF(8," Each verb is registered once and takes a "),e.j41(9,"code"),e.EFF(10,"service"),e.k0s(),e.EFF(11," argument. Turning a verb off for one database removes that database from the tool's allowed services; turning it off everywhere removes the tool. "),e.k0s(),e.j41(12,"table",124)(13,"thead")(14,"tr"),e.nrm(15,"th",125),e.j41(16,"th"),e.EFF(17,"Tool Name"),e.k0s(),e.DNE(18,Ys,3,1,"th",46),e.k0s()(),e.j41(19,"tbody"),e.DNE(20,zs,7,6,"tr",126),e.k0s()()()),2&n){const t=e.XpG(4);e.R7$(6),e.Lme(" ",t.mergedDbVerbs.length," tools \xb7 ",t.dbServices.length," databases "),e.R7$(12),e.Y8G("ngForOf",t.dbServices)("ngForTrackBy",t.trackByName),e.R7$(2),e.Y8G("ngForOf",t.mergedDbVerbs)("ngForTrackBy",t.trackByName)}}function Bs(n,i){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(a){const c=e.eBV(t).$implicit,s=e.XpG(5);return e.Njj(s.toggleTool(c.name,a.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td"),e.EFF(7),e.k0s()()}if(2&n){const t=i.$implicit,o=e.XpG(5);e.AVh("disabled-row",!o.isToolEnabled(t.name)),e.R7$(2),e.Y8G("checked",o.isToolEnabled(t.name)),e.R7$(3),e.JRh(t.name),e.R7$(2),e.JRh(t.description)}}function Ls(n,i){if(1&n){const t=e.RV6();e.j41(0,"mat-expansion-panel",56)(1,"mat-expansion-panel-header")(2,"mat-panel-title",122)(3,"mat-slide-toggle",123),e.bIt("change",function(a){const c=e.eBV(t).$implicit,s=e.XpG(4);return e.Njj(s.toggleService(c,a.checked))})("click",function(a){return a.stopPropagation()}),e.k0s(),e.j41(4,"span"),e.EFF(5),e.k0s()(),e.j41(6,"mat-panel-description"),e.EFF(7),e.k0s()(),e.j41(8,"table",124)(9,"thead")(10,"tr"),e.nrm(11,"th",125),e.j41(12,"th"),e.EFF(13,"Tool Name"),e.k0s(),e.j41(14,"th"),e.EFF(15,"Description"),e.k0s()()(),e.j41(16,"tbody"),e.DNE(17,Bs,8,5,"tr",126),e.k0s()()()}if(2&n){const t=i.$implicit,o=e.XpG(4);e.Y8G("expanded",t.expanded),e.R7$(3),e.Y8G("checked",o.isServiceEnabled(t)),e.R7$(2),e.JRh(t.label),e.R7$(2),e.Lme(" ",t.category," \xb7 ",t.tools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.tools)("ngForTrackBy",o.trackByName)}}function Us(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",120)(1,"mat-accordion",121)(2,"mat-expansion-panel")(3,"mat-expansion-panel-header")(4,"mat-panel-title",122)(5,"mat-slide-toggle",123),e.bIt("change",function(a){e.eBV(t);const r=e.XpG(3);return e.Njj(r.toggleAllGlobalTools(a.checked))})("click",function(a){return a.stopPropagation()}),e.k0s(),e.j41(6,"span"),e.EFF(7,"Global Tools"),e.k0s()(),e.j41(8,"mat-panel-description"),e.EFF(9),e.k0s()(),e.j41(10,"table",124)(11,"thead")(12,"tr"),e.nrm(13,"th",125),e.j41(14,"th"),e.EFF(15,"Tool Name"),e.k0s(),e.j41(16,"th"),e.EFF(17,"Description"),e.k0s()()(),e.j41(18,"tbody"),e.DNE(19,As,8,5,"tr",129),e.k0s()()(),e.DNE(20,Xs,21,6,"mat-expansion-panel",130),e.DNE(21,Ls,18,7,"mat-expansion-panel",131),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(5),e.Y8G("checked",t.isAllGlobalToolsEnabled()),e.R7$(4),e.SpI(" Cross-service \xb7 ",t.mcpGlobalTools.length," tools "),e.R7$(10),e.Y8G("ngForOf",t.mcpGlobalTools),e.R7$(1),e.Y8G("ngIf",t.isMergedStyle&&t.dbServices.length>0),e.R7$(1),e.Y8G("ngForOf",t.visibleServices)("ngForTrackBy",t.trackByName)}}function Js(n,i){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Built-in Tools "),e.k0s(),e.DNE(5,js,3,0,"div",27),e.DNE(6,Ns,3,0,"div",27),e.DNE(7,Us,22,6,"div",128),e.k0s()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",!0),e.R7$(3),e.Y8G("ngIf",!t.mcpServicesLoaded),e.R7$(1),e.Y8G("ngIf",t.mcpServicesLoaded&&0===t.mcpServices.length&&0===t.mcpGlobalTools.length),e.R7$(1),e.Y8G("ngIf",t.mcpServicesLoaded)}}function qs(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",139)(1,"button",140),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.addCustomTool())}),e.nrm(2,"fa-icon",141),e.EFF(3," Add Custom Tool "),e.k0s()()}if(2&n){const t=e.XpG(3);e.R7$(2),e.Y8G("icon",t.faPlus)}}function Hs(n,i){1&n&&(e.j41(0,"mat-form-field",161)(1,"mat-label"),e.EFF(2,"HTTP Method"),e.k0s(),e.j41(3,"mat-select",162)(4,"mat-option",163),e.EFF(5,"GET"),e.k0s(),e.j41(6,"mat-option",164),e.EFF(7,"POST"),e.k0s(),e.j41(8,"mat-option",165),e.EFF(9,"PUT"),e.k0s(),e.j41(10,"mat-option",166),e.EFF(11,"PATCH"),e.k0s(),e.j41(12,"mat-option",167),e.EFF(13,"DELETE"),e.k0s()()())}function Ks(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(5);return e.Njj(c.insertLookup(r.name,"url"))}),e.EFF(1),e.k0s()}if(2&n){const t=i.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function Qs(n,i){if(1&n&&(e.j41(0,"mat-form-field",90)(1,"mat-label"),e.EFF(2,"URL"),e.k0s(),e.nrm(3,"input",168),e.j41(4,"button",169),e.nrm(5,"fa-icon",99),e.k0s(),e.j41(6,"mat-menu",null,170),e.DNE(8,Ks,2,1,"button",171),e.k0s(),e.j41(9,"mat-hint"),e.EFF(10,"Use {LOOKUP_NAME} for secrets or {param} for path parameters"),e.k0s()()),2&n){const t=e.sdS(7),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(3),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName)}}function Ws(n,i){1&n&&(e.j41(0,"mat-form-field",193)(1,"mat-label"),e.EFF(2,"Location"),e.k0s(),e.j41(3,"mat-select",194)(4,"mat-option",195),e.EFF(5,"query"),e.k0s(),e.j41(6,"mat-option",196),e.EFF(7,"path"),e.k0s(),e.j41(8,"mat-option",197),e.EFF(9,"body"),e.k0s(),e.j41(10,"mat-option",198),e.EFF(11,"header"),e.k0s()()())}function Zs(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",175)(1,"div",176)(2,"span",177),e.EFF(3),e.k0s(),e.j41(4,"button",178),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG(5);return e.Njj(c.removeToolParameter(r))}),e.nrm(5,"fa-icon",99),e.k0s()(),e.j41(6,"div",179)(7,"mat-form-field",180)(8,"mat-label"),e.EFF(9,"Name"),e.k0s(),e.nrm(10,"input",181),e.k0s(),e.j41(11,"mat-form-field",182)(12,"mat-label"),e.EFF(13,"Type"),e.k0s(),e.j41(14,"mat-select",183)(15,"mat-option",184),e.EFF(16,"string"),e.k0s(),e.j41(17,"mat-option",185),e.EFF(18,"number"),e.k0s(),e.j41(19,"mat-option",186),e.EFF(20,"integer"),e.k0s(),e.j41(21,"mat-option",187),e.EFF(22,"boolean"),e.k0s()()(),e.DNE(23,Ws,12,0,"mat-form-field",188),e.j41(24,"div",189)(25,"mat-checkbox",190),e.EFF(26,"Required"),e.k0s()(),e.j41(27,"mat-form-field",191)(28,"mat-label"),e.EFF(29,"Description"),e.k0s(),e.nrm(30,"input",192),e.k0s()()()}if(2&n){const t=i.index,o=e.XpG(5);let a;e.Y8G("formGroupName",t),e.R7$(3),e.SpI("#",t+1,""),e.R7$(2),e.Y8G("icon",o.faTrashCan),e.R7$(18),e.Y8G("ngIf","api"===(null==(a=o.customToolForm.get("toolType"))?null:a.value))}}function el(n,i){if(1&n&&(e.j41(0,"div",173),e.DNE(1,Zs,31,4,"div",174),e.k0s()),2&n){const t=e.XpG(4);e.R7$(1),e.Y8G("ngForOf",t.customToolParameters.controls)}}function tl(n,i){1&n&&(e.j41(0,"p",199),e.EFF(1," No parameters yet. Add one to define inputs for this tool. "),e.k0s())}function nl(n,i){if(1&n&&(e.j41(0,"mat-option",89),e.EFF(1),e.k0s()),2&n){const t=i.$implicit;e.Y8G("value",t.id),e.R7$(1),e.SpI(" ",t.label||t.name," ")}}function ol(n,i){1&n&&(e.j41(0,"div",146)(1,"mat-form-field",204)(2,"mat-label"),e.EFF(3,"Repository"),e.k0s(),e.nrm(4,"input",205),e.k0s(),e.j41(5,"mat-form-field",204)(6,"mat-label"),e.EFF(7,"Branch / Tag"),e.k0s(),e.nrm(8,"input",206),e.k0s(),e.j41(9,"mat-form-field",204)(10,"mat-label"),e.EFF(11,"File Path"),e.k0s(),e.nrm(12,"input",207),e.k0s()())}function il(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",208)(1,"button",209),e.bIt("click",function(){e.eBV(t);const a=e.XpG(5);return e.Njj(a.viewLatestScmContent())}),e.EFF(2," View Latest "),e.k0s()()}}function al(n,i){if(1&n&&(e.j41(0,"div",200)(1,"mat-expansion-panel",56)(2,"mat-expansion-panel-header")(3,"mat-panel-title"),e.EFF(4,"Link to Repository"),e.k0s()(),e.j41(5,"div",146)(6,"mat-form-field",147)(7,"mat-label"),e.EFF(8,"SCM Service"),e.k0s(),e.j41(9,"mat-select",201)(10,"mat-option",89),e.EFF(11,"None"),e.k0s(),e.DNE(12,nl,2,2,"mat-option",74),e.k0s(),e.j41(13,"mat-hint"),e.EFF(14,"Select a GitHub, GitLab, or Bitbucket service"),e.k0s()()(),e.DNE(15,ol,13,0,"div",202),e.DNE(16,il,3,0,"div",203),e.k0s()()),2&n){const t=e.XpG(4);let o,a,r;e.Y8G("formGroup",t.customToolForm),e.R7$(1),e.Y8G("expanded",!(null==(o=t.customToolForm.get("storageServiceId"))||!o.value)),e.R7$(9),e.Y8G("value",null),e.R7$(2),e.Y8G("ngForOf",t.availableScmServices)("ngForTrackBy",t.trackById),e.R7$(3),e.Y8G("ngIf",null==(a=t.customToolForm.get("storageServiceId"))?null:a.value),e.R7$(1),e.Y8G("ngIf",null==(r=t.customToolForm.get("storageServiceId"))?null:r.value)}}function rl(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(5);return e.Njj(c.insertLookup(r.name,"function"))}),e.EFF(1),e.k0s()}if(2&n){const t=i.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function cl(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",210)(1,"div",211)(2,"label",212),e.EFF(3,"Function (JavaScript function body)"),e.k0s(),e.j41(4,"button",213),e.nrm(5,"fa-icon",141),e.EFF(6," Insert Lookup "),e.k0s(),e.j41(7,"mat-menu",null,214),e.DNE(9,rl,2,1,"button",171),e.k0s()(),e.j41(10,"div",215)(11,"df-ace-editor",216,217),e.bIt("valueChange",function(a){e.eBV(t);const r=e.XpG(4);return e.Njj(r.onFunctionChange(a))}),e.k0s()(),e.j41(13,"span",218),e.EFF(14," Write a JavaScript function body. Parameters are available as variables by name. Use "),e.j41(15,"code"),e.EFF(16,"secrets.LOOKUP_NAME"),e.k0s(),e.EFF(17," to reference lookup values. "),e.k0s()()}if(2&n){const t=e.sdS(8),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(4),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName),e.R7$(2),e.Y8G("mode",o.functionEditorMode)}}function sl(n,i){if(1&n){const t=e.RV6();e.j41(0,"button",172),e.bIt("click",function(){const r=e.eBV(t).$implicit,c=e.XpG(5);return e.Njj(c.insertLookup(r.name,"headers"))}),e.EFF(1),e.k0s()}if(2&n){const t=i.$implicit;e.R7$(1),e.SpI(" ",t.name," ")}}function ll(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",210)(1,"div",211)(2,"label",212),e.EFF(3,"Static Headers (JSON)"),e.k0s(),e.j41(4,"button",213),e.nrm(5,"fa-icon",141),e.EFF(6," Insert Lookup "),e.k0s(),e.j41(7,"mat-menu",null,219),e.DNE(9,sl,2,1,"button",171),e.k0s()(),e.j41(10,"div",220)(11,"df-ace-editor",221,222),e.bIt("valueChange",function(a){e.eBV(t);const r=e.XpG(4);return e.Njj(r.onHeadersChange(a))}),e.k0s()()()}if(2&n){const t=e.sdS(8),o=e.XpG(4);e.R7$(4),e.Y8G("matMenuTriggerFor",t)("disabled",0===o.availableLookups.length),e.R7$(1),e.Y8G("icon",o.faPlus),e.R7$(4),e.Y8G("ngForOf",o.availableLookups)("ngForTrackBy",o.trackByName),e.R7$(2),e.Y8G("mode",o.headersEditorMode)}}function dl(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",142)(1,"h4"),e.EFF(2),e.k0s(),e.j41(3,"mat-button-toggle-group",143)(4,"mat-button-toggle",144),e.EFF(5,"API"),e.k0s(),e.j41(6,"mat-button-toggle",145),e.EFF(7,"Function"),e.k0s()(),e.j41(8,"div",146)(9,"mat-form-field",147)(10,"mat-label"),e.EFF(11,"Tool Name"),e.k0s(),e.nrm(12,"input",148),e.j41(13,"mat-hint"),e.EFF(14,"Letters, numbers, and underscores only"),e.k0s()(),e.DNE(15,Hs,14,0,"mat-form-field",149),e.k0s(),e.DNE(16,Qs,11,5,"mat-form-field",150),e.j41(17,"mat-form-field",90)(18,"mat-label"),e.EFF(19,"Description"),e.k0s(),e.nrm(20,"textarea",151),e.j41(21,"mat-hint"),e.EFF(22,"This description is shown to the LLM"),e.k0s()(),e.j41(23,"div",152)(24,"div",10)(25,"h5"),e.EFF(26,"Parameters"),e.k0s(),e.j41(27,"button",153),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.addToolParameter())}),e.nrm(28,"fa-icon",141),e.EFF(29," Add Parameter "),e.k0s()(),e.DNE(30,el,2,1,"div",154),e.DNE(31,tl,2,0,"p",155),e.k0s(),e.DNE(32,al,17,7,"div",156),e.DNE(33,cl,18,6,"div",157),e.DNE(34,ll,13,6,"div",157),e.j41(35,"div",158)(36,"button",159),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.cancelCustomToolEdit())}),e.EFF(37," Cancel "),e.k0s(),e.j41(38,"button",160),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.saveCustomTool())}),e.EFF(39),e.k0s()()()}if(2&n){const t=e.XpG(3);let o,a,r,c,s;e.Y8G("formGroup",t.customToolForm),e.R7$(2),e.SpI(" ",-1===t.editingToolIndex?"Add Custom Tool":"Edit Custom Tool"," "),e.R7$(13),e.Y8G("ngIf","api"===(null==(o=t.customToolForm.get("toolType"))?null:o.value)),e.R7$(1),e.Y8G("ngIf","api"===(null==(a=t.customToolForm.get("toolType"))?null:a.value)),e.R7$(12),e.Y8G("icon",t.faPlus),e.R7$(2),e.Y8G("ngIf",t.customToolParameters.length>0),e.R7$(1),e.Y8G("ngIf",0===t.customToolParameters.length),e.R7$(1),e.Y8G("ngIf","function"===(null==(r=t.customToolForm.get("toolType"))?null:r.value)&&t.availableScmServices.length>0),e.R7$(1),e.Y8G("ngIf","function"===(null==(c=t.customToolForm.get("toolType"))?null:c.value)),e.R7$(1),e.Y8G("ngIf","api"===(null==(s=t.customToolForm.get("toolType"))?null:s.value)),e.R7$(4),e.Y8G("disabled",t.customToolForm.invalid),e.R7$(1),e.SpI(" ",-1===t.editingToolIndex?"Add":"Update"," ")}}function pl(n,i){if(1&n&&(e.qex(0),e.j41(1,"code"),e.EFF(2),e.k0s(),e.EFF(3),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(2),e.JRh(t.httpMethod),e.R7$(1),e.SpI(" ",t.url," ")}}function ml(n,i){1&n&&(e.j41(0,"em"),e.EFF(1,"Function"),e.k0s())}function _l(n,i){if(1&n&&(e.j41(0,"em"),e.EFF(1),e.k0s()),2&n){const t=e.XpG(2).$implicit;e.R7$(1),e.Lme("SCM: ",t.scmRepository,"/",t.storagePath,"")}}function gl(n,i){if(1&n&&(e.qex(0),e.DNE(1,ml,2,0,"em",24),e.DNE(2,_l,2,2,"em",24),e.bVm()),2&n){const t=e.XpG().$implicit;e.R7$(1),e.Y8G("ngIf",!t.storageServiceId),e.R7$(1),e.Y8G("ngIf",t.storageServiceId)}}function fl(n,i){if(1&n){const t=e.RV6();e.j41(0,"tr")(1,"td",125)(2,"mat-slide-toggle",127),e.bIt("change",function(a){const c=e.eBV(t).index,s=e.XpG(4);return e.Njj(s.toggleCustomTool(c,a.checked))}),e.k0s()(),e.j41(3,"td")(4,"code"),e.EFF(5),e.k0s()(),e.j41(6,"td")(7,"code"),e.EFF(8),e.k0s()(),e.j41(9,"td",224),e.DNE(10,pl,4,2,"ng-container",24),e.DNE(11,gl,3,2,"ng-container",24),e.k0s(),e.j41(12,"td"),e.EFF(13),e.k0s(),e.j41(14,"td",223)(15,"div",225)(16,"button",226),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG(4);return e.Njj(c.editCustomTool(r))}),e.nrm(17,"fa-icon",99),e.k0s(),e.j41(18,"button",227),e.bIt("click",function(){const r=e.eBV(t).index,c=e.XpG(4);return e.Njj(c.deleteCustomTool(r))}),e.nrm(19,"fa-icon",99),e.k0s()()()()}if(2&n){const t=i.$implicit,o=e.XpG(4);e.AVh("disabled-row",!t.enabled),e.R7$(2),e.Y8G("checked",t.enabled),e.R7$(3),e.JRh(t.name),e.R7$(3),e.JRh((t.toolType||"api").toUpperCase()),e.R7$(2),e.Y8G("ngIf","api"===(t.toolType||"api")),e.R7$(1),e.Y8G("ngIf","function"===t.toolType),e.R7$(2),e.JRh(t.description),e.R7$(3),e.Y8G("disabled",null!==o.editingToolIndex),e.R7$(1),e.Y8G("icon",o.faPenToSquare),e.R7$(1),e.Y8G("disabled",null!==o.editingToolIndex),e.R7$(1),e.Y8G("icon",o.faTrashCan)}}function ul(n,i){if(1&n&&(e.j41(0,"table",124)(1,"thead")(2,"tr"),e.nrm(3,"th",125),e.j41(4,"th"),e.EFF(5,"Name"),e.k0s(),e.j41(6,"th"),e.EFF(7,"Type"),e.k0s(),e.j41(8,"th"),e.EFF(9,"Method / URL"),e.k0s(),e.j41(10,"th"),e.EFF(11,"Description"),e.k0s(),e.nrm(12,"th",223),e.k0s()(),e.j41(13,"tbody"),e.DNE(14,fl,20,12,"tr",129),e.k0s()()),2&n){const t=e.XpG(3);e.R7$(14),e.Y8G("ngForOf",t.customTools)}}function hl(n,i){1&n&&(e.j41(0,"p",228),e.EFF(1,' No custom tools defined. Click "Add Custom Tool" to create one. '),e.k0s())}function bl(n,i){if(1&n&&(e.qex(0),e.j41(1,"mat-accordion",15)(2,"mat-expansion-panel",56)(3,"mat-expansion-panel-header"),e.EFF(4," Custom Tools "),e.k0s(),e.j41(5,"div",133)(6,"p",134),e.EFF(7," Define custom tools that make HTTP requests to external APIs or execute server-side functions. These tools will be available to MCP clients alongside the built-in DreamFactory tools. "),e.k0s(),e.DNE(8,qs,4,1,"div",135),e.DNE(9,dl,40,12,"div",136),e.DNE(10,ul,15,1,"table",137),e.DNE(11,hl,2,0,"p",138),e.k0s()()(),e.bVm()),2&n){const t=e.XpG(2);e.R7$(2),e.Y8G("expanded",t.customTools.length>0),e.R7$(6),e.Y8G("ngIf",null===t.editingToolIndex),e.R7$(1),e.Y8G("ngIf",null!==t.editingToolIndex),e.R7$(1),e.Y8G("ngIf",t.customTools.length>0),e.R7$(1),e.Y8G("ngIf",0===t.customTools.length&&null===t.editingToolIndex)}}function vl(n,i){if(1&n){const t=e.RV6();e.qex(0),e.j41(1,"button",229),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.save(!0,!1))}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"button",229),e.bIt("click",function(){e.eBV(t);const a=e.XpG(3);return e.Njj(a.save(!0,!0))}),e.EFF(5),e.nI1(6,"transloco"),e.k0s(),e.bVm()}2&n&&(e.R7$(1),e.Y8G("value",!0),e.R7$(1),e.SpI(" ",e.bMT(3,4,"saveAndClear")," "),e.R7$(2),e.Y8G("value",!0),e.R7$(1),e.SpI(" ",e.bMT(6,6,"saveAndContinue")," "))}function Cl(n,i){if(1&n){const t=e.RV6();e.j41(0,"div",60)(1,"button",61),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.goBack())}),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.DNE(4,vl,7,8,"ng-container",24),e.j41(5,"button",68),e.EFF(6),e.nI1(7,"transloco"),e.k0s()()}if(2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",e.bMT(3,3,"cancel")," "),e.R7$(2),e.Y8G("ngIf",t.edit),e.R7$(2),e.SpI(" ",e.bMT(7,5,"save")," ")}}function xl(n,i){if(1&n){const t=e.RV6();e.DNE(0,Vc,1,4,"df-service-health-panel",72),e.DNE(1,Bc,7,13,"ng-container",24),e.j41(2,"mat-form-field",38)(3,"mat-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"mat-select",73),e.bIt("selectionChange",function(a){e.eBV(t);const r=e.XpG();return e.Njj(r.onServiceTypeSelect(r.getServiceTypeLabel(a.value)))}),e.DNE(7,Lc,2,2,"mat-option",74),e.k0s(),e.nrm(8,"fa-icon",11),e.nI1(9,"transloco"),e.k0s(),e.DNE(10,Uc,7,7,"mat-form-field",18),e.DNE(11,qc,6,2,"ng-container",24),e.DNE(12,Hc,7,7,"mat-form-field",75),e.DNE(13,Kc,7,7,"mat-form-field",76),e.DNE(14,Qc,4,3,"mat-slide-toggle",77),e.j41(15,"div",15),e.DNE(16,es,4,2,"ng-container",24),e.k0s(),e.DNE(17,Es,5,3,"ng-container",24),e.DNE(18,$s,25,6,"ng-container",24),e.DNE(19,Js,8,4,"ng-container",24),e.DNE(20,bl,12,5,"ng-container",24),e.DNE(21,Cl,8,7,"div",26)}if(2&n){const t=e.XpG();e.Y8G("ngIf",t.edit&&(null==t.serviceData?null:t.serviceData.id)&&!t.isPlatformService),e.R7$(1),e.Y8G("ngIf",t.edit&&t.isDatabase&&t.serviceData),e.R7$(3),e.JRh(e.bMT(5,18,"services.controls.serviceType.label")),e.R7$(3),e.Y8G("ngForOf",t.serviceTypes)("ngForTrackBy",t.trackByName),e.R7$(1),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(9,20,"services.controls.serviceType.tooltip")),e.R7$(2),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf","excel"===t.serviceForm.getRawValue().type),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired),e.R7$(2),e.Y8G("ngIf",t.edit),e.R7$(1),e.Y8G("ngIf",t.viewSchema&&!t.subscriptionRequired),e.R7$(1),e.Y8G("ngIf",t.isMcp&&t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",t.isMcp&&!t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",t.isMcp&&!t.isSystemMcp&&t.edit),e.R7$(1),e.Y8G("ngIf",!t.subscriptionRequired)}}function yl(n,i){if(1&n&&e.nrm(0,"df-paywall",230),2&n){const t=e.XpG();e.Y8G("serviceName",t.selectedServiceTypeLable||"Unable to fetch service name")}}function kl(n,i){if(1&n){const t=e.RV6();e.j41(0,"h1",231),e.EFF(1,"Unsaved custom tool"),e.k0s(),e.j41(2,"div",232),e.EFF(3," You have unsaved changes in the custom tool editor. Saving the service now will discard those changes unless you add/update the tool first. "),e.k0s(),e.j41(4,"div",233)(5,"button",234),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.closeUnsavedToolDialog("cancel"))}),e.EFF(6," Keep editing "),e.k0s(),e.j41(7,"button",235),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.closeUnsavedToolDialog("discard"))}),e.EFF(8," Discard tool changes "),e.k0s(),e.j41(9,"button",236),e.bIt("click",function(){e.eBV(t);const a=e.XpG();return e.Njj(a.closeUnsavedToolDialog("save"))}),e.EFF(10," Add/Update tool, then save "),e.k0s()()}}let He=class ot{static{Je=this}constructor(i,t,o,a,r,c,s,l,p,f,x,u,M,w,S){this.activatedRoute=i,this.fb=t,this.servicesService=o,this.cacheService=a,this.router=r,this.systemConfigDataService=c,this.http=s,this.dialog=l,this.themeService=p,this.snackbarService=f,this.currentServiceService=x,this.snackBar=u,this.systemService=M,this.analyticsService=w,this.artifactResolver=S,this.edit=!1,this.isDatabase=!1,this.isPlatformService=!1,this.serviceGroup=null,this.isNetworkService=!1,this.isScriptService=!1,this.isFile=!1,this.isAuth=!1,this.isMcp=!1,this.isSystemMcp=!1,this.systemMcpTools=ni,this.faCircleInfo=g.mEO,this.faPenToSquare=g.LFz,this.faTrashCan=g.sjs,this.faPlus=g.QLR,this.faFileImport=g.$MS,this.search="",this.content="",this.showSecurityConfig=!1,this.currentServiceId=null,this.isFirstTimeUser=!1,this.artifactKeys=[],this.artifactSampleTable="your_table",this.availableFileServices=[],this.mcpServices=[],this.mcpServicesLoaded=!1,this.disabledTools=new Set,this.mcpGlobalTools=[{name:"list_apis",title:"List Available APIs",description:"List all available database APIs and their tool prefixes"},{name:"all_get_tables",title:"Get Tables from All Databases",description:"Retrieve tables from all connected database services in one call"},{name:"all_find_table",title:"Find Table Across Databases",description:"Search for a table by name across all connected databases"},{name:"all_get_stored_procedures",title:"Get Stored Procedures from All",description:"Retrieve stored procedures from all connected databases"},{name:"all_get_stored_functions",title:"Get Stored Functions from All",description:"Retrieve stored functions from all connected databases"},{name:"all_get_resources",title:"Get Resources from All",description:"Retrieve all available resources from all connected databases"},{name:"all_list_files",title:"List Files from All Storage",description:"List files from all connected file storage services"},{name:"search",title:"Search (stub)",description:"Stub search implementation for connectors that require it"},{name:"fetch",title:"Fetch (stub)",description:"Stub fetch implementation for connectors that require it"}],this.customTools=[],this.editingToolIndex=null,this.availableLookups=[],this.availableScmServices=[],this.unsavedToolDialogRef=null,this.liveHeadersValue=null,this.liveFunctionValue=null,this.isDarkMode=this.themeService.darkMode$,this.toolStyle="prefixed",this.schemaMemoSrc=null,this.schemaMemoIsDatabase=null,this.schemaMemoIsNetwork=null,this.memoViewSchema=[],this.memoHasStandardFields=!1,this.memoBasicFields=[],this.memoAdvancedFields=[],this.memoNetworkRequiredFields=[],this.memoNetworkAdvancedFields=[],this.trackByName=(O,D)=>D.name,this.trackById=(O,D)=>D.id,this.warnings=[],this.memoServiceTypesSrc=null,this.memoServiceTypesSearch=null,this.memoFilteredServiceTypes=[],this.serviceForm=this.fb.group({type:["",m.k0.required],name:["",m.k0.required],label:[""],description:[""],isActive:[!0],storageServiceId:[null],config:this.fb.group({}),service_doc_by_service_id:this.fb.group({format:[0],content:[""]})}),this.customToolForm=this.fb.group({toolType:["api"],name:["",[m.k0.required,m.k0.pattern(/^[a-zA-Z0-9_]+$/)]],description:["",m.k0.required],httpMethod:["GET"],url:["",m.k0.required],parameters:this.fb.array([]),headers:["{}"],function:[""],enabled:[!0],storageServiceId:[null],scmRepository:[""],scmReference:[""],storagePath:[""]}),this.customToolForm.get("toolType").valueChanges.subscribe(O=>{const D=this.customToolForm.get("url"),y=this.customToolForm.get("function");if("function"===O){D.clearValidators();const v=!!this.customToolForm.get("storageServiceId")?.value;y.setValidators(v?[]:[m.k0.required])}else D.setValidators(m.k0.required),y.clearValidators();D.updateValueAndValidity(),y.updateValueAndValidity()}),this.customToolForm.get("storageServiceId").valueChanges.subscribe(O=>{const D=this.customToolForm.get("function");"function"===this.customToolForm.get("toolType")?.value&&(D.setValidators(O?[]:[m.k0.required]),D.updateValueAndValidity())}),this.activatedRoute.snapshot.paramMap.get("id")&&(this.edit=!0)}ngOnInit(){this.edit||this.analyticsService.getDashboardStats().subscribe(i=>{this.isFirstTimeUser=0===i.services.total}),this.http.get("assets/img/databaseImages.json").subscribe(i=>{this.images=i}),this.http.get(`${N.C}/system/lookup`,{params:{fields:"name",limit:"100"}}).subscribe(i=>{this.availableLookups=i?.resource??[]}),this.systemConfigDataService.environment$.pipe((0,le.n)(i=>this.activatedRoute.data.pipe((0,z.T)(t=>({env:i,route:t}))))).subscribe(({env:i,route:t})=>{t.groups&&"Database"===t.groups[0]&&(this.isDatabase=!0),t.groups&&"Remote Service"===t.groups[0]&&(this.isNetworkService=!0),t.groups&&"Script"===t.groups[0]&&(this.isScriptService=!0),t.groups&&"File"===t.groups[0]&&(this.isFile=!0),t.groups&&"LDAP"===t.groups[0]&&(this.isAuth=!0),t.groups&&"MCP"===t.groups[0]&&(this.isMcp=!0),this.serviceGroup=t.groups?.[0]??null,this.isPlatformService=t.system||this.activatedRoute.snapshot.parent?.data?.system||!1;const{data:o,serviceTypes:a,groups:r}=t,c=i.platform?.license;if(this.serviceTypes=a.filter(s=>"python"!==s.name.toLowerCase()),this.notIncludedServices=[],this.snackbarService.setSnackbarLastEle(o&&(o.label||o.name)?o.label?o.label:o.name:"Unknown label",!1),this.edit&&o&&this.snackbarService.setPageLabel(this.router.url,o.label||o.name||String(o.id??"")),this.isDatabase?("SILVER"===c&&this.notIncludedServices.push(...pe.Ky.map(s=>(s.class="not-included",s)).filter(s=>r.includes(s.group))),"OPEN SOURCE"===c&&this.notIncludedServices.push(...pe.F8.map(s=>(s.class="not-included",s)).filter(s=>r.includes(s.group)),...pe.Ky.map(s=>(s.class="not-included",s)).filter(s=>r.includes(s.group)))):("SILVER"===c&&this.serviceTypes.push(...pe.Ky.filter(s=>r.includes(s.group))),"OPEN SOURCE"===c&&this.serviceTypes.push(...pe.F8.filter(s=>r.includes(s.group)),...pe.Ky.filter(s=>r.includes(s.group)))),o?.serviceDocByServiceId)if(this.isNetworkService)o.config.serviceDefinition=o?.serviceDocByServiceId.content,this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content);else if(this.isScriptService){o.config||(o.config={});const s=l=>{if(!l)return!1;const p=l.trim();return[/^\s*\{?\s*["']?openapi["']?\s*:/i,/^\s*\{?\s*["']?swagger["']?\s*:/i,/^\s*openapi\s*:/im,/^\s*swagger\s*:/im,/["']paths["']\s*:\s*\{/i,/^\s*paths\s*:/im].some(x=>x.test(p))};o.config.content&&""!==o.config.content.trim()?this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content||""):o.serviceDocByServiceId?.content&&(s(o.serviceDocByServiceId.content)?this.getServiceDocByServiceIdControl("content").setValue(o.serviceDocByServiceId.content):(o.config.content=o.serviceDocByServiceId.content,this.getServiceDocByServiceIdControl("content").setValue("")))}else this.getServiceDocByServiceIdControl("content").setValue(o?.serviceDocByServiceId.content);if(this.serviceData=o,this.content=o?this.isScriptService?o.config.content||"":o.config.serviceDefinition||"":"",this.edit){if(this.configSchema=this.getConfigSchema(o.type),this.initializeConfig(""),"excel"===o.type){console.log("Editing Excel service, data:",o),console.log("Config:",o.config),console.log("Storage service ID from config:",o.config?.storageServiceId);const s=o.config?.storageServiceId;this.loadAvailableFileServices(()=>{console.log("File services loaded, now setting form value"),s?(console.log("Setting storageServiceId to:",s),this.serviceForm.patchValue({...o,config:o.config,storageServiceId:s})):(console.log("No storageServiceId found in config"),this.serviceForm.patchValue({...o,config:o.config}))})}else this.serviceForm.patchValue({...o,config:o.config});o?.serviceDocByServiceId&&(this.serviceDefinitionType=""+o?.serviceDocByServiceId.format,this.isNetworkService&&(this.getConfigControl("content")?.setValue(o.serviceDocByServiceId.content),this.content=o.serviceDocByServiceId.content||"")),this.serviceForm.controls.type.disable()}else this.serviceForm.controls.type.valueChanges.subscribe(s=>{this.serviceForm.removeControl("config"),this.configSchema=this.getConfigSchema(s),this.updateServiceTypeFlags(s),this.initializeConfig(s),"excel"===s&&this.loadAvailableFileServices()});this.edit&&"excel"===o?.type&&this.loadAvailableFileServices(),this.edit&&this.isMcp&&(this.isSystemMcp=st(o?.type),this.disabledTools=new Set(o?.config?.disabledTools??[]),this.toolStyle="merged"===o?.config?.toolStyle?"merged":"prefixed",this.isSystemMcp?(this.customTools=[],this.mcpServicesLoaded=!0):(this.customTools=(o?.config?.customTools??[]).map(l=>({id:l.id,toolType:l.toolType||"api",name:l.name,description:l.description,httpMethod:l.httpMethod,url:l.url,parameters:l.parameters||[],headers:l.headers||{},function:l.function||"",enabled:!1!==l.enabled&&0!==l.enabled,storageServiceId:l.storageServiceId||null,scmRepository:l.scmRepository||"",scmReference:l.scmReference||"",storagePath:l.storagePath||""})),this.loadMcpServices(),this.getConfigControl("toolStyle")?.valueChanges.subscribe(l=>{this.toolStyle="merged"===l?"merged":"prefixed"}),this.loadAvailableScmServices())),this.edit&&this.isDatabase&&this.serviceData&&this.loadArtifactCardData()}),this.isDatabase&&this.serviceForm.controls.type.valueChanges.subscribe(i=>{this.serviceForm.patchValue({label:i})})}getStorageServiceDisplayName(){console.log("=== getStorageServiceDisplayName called ==="),console.log("this.edit:",this.edit),console.log("this.serviceData:",this.serviceData),console.log("this.availableFileServices:",this.availableFileServices);let i=this.serviceForm.get("storageServiceId")?.value;if(console.log("storageServiceId from form:",i),!i&&this.edit&&this.serviceData?.config?.storageServiceId&&(i=this.serviceData.config.storageServiceId,console.log("storageServiceId from serviceData.config.storageServiceId:",i)),console.log("this.serviceData.config:",this.serviceData?.config),console.log("this.serviceData.config?.storageServiceId:",this.serviceData?.config?.storageServiceId),!i)return console.log("No storageServiceId found, returning default message"),"No storage service selected";const t=this.availableFileServices.find(o=>o.id===i);if(console.log("selectedService found:",t),t){const o=t.label||t.name;return console.log("Returning display name:",o),o}return console.log("Service not found in availableFileServices, returning ID"),`Service ID: ${i}`}loadAvailableFileServices(i){console.log("=== loadAvailableFileServices called ==="),console.log("Current service form type:",this.serviceForm.getRawValue().type),console.log("Available file services before loading:",this.availableFileServices);let t="";const o=localStorage.getItem("df_token")||localStorage.getItem("X-DreamFactory-API-Key")||sessionStorage.getItem("df_token");if(o)t=`X-DreamFactory-API-Key: ${o}`;else{const l=document.cookie.split(";");let p="",f="";for(const x of l){const[u,M]=x.trim().split("=");("df_session_token"===u||"session_token"===u)&&(p=M),("df_api_key"===u||"api_key"===u)&&(f=M)}p?t=`X-DreamFactory-Session-Token: ${p}`:f?t=`X-DreamFactory-API-Key: ${f}`:window.dfAuthToken?t=`X-DreamFactory-API-Key: ${window.dfAuthToken}`:window.dreamFactoryToken&&(t=`X-DreamFactory-API-Key: ${window.dreamFactoryToken}`)}if(!t)return console.warn("No authentication method found, cannot load file services"),this.availableFileServices=[],void(i&&i());const a=`${window.location.origin}/api/v2/system/service`,[r,c]=t.split(": "),s={};r&&c&&(s[r]=c),this.http.get(a,{params:{filter:"type=local_file",fields:"id,name,label,type"},headers:s}).subscribe({next:l=>{l.resource&&Array.isArray(l.resource)?(this.availableFileServices=l.resource,console.log("File services loaded successfully:",this.availableFileServices)):(console.warn("No file services found in response or invalid format"),this.availableFileServices=[]),i&&i()},error:l=>{console.error("Failed to load file services:",l),this.http.get(a,{params:{fields:"id,name,label,type"},headers:s}).subscribe({next:p=>{p.resource&&Array.isArray(p.resource)?(this.availableFileServices=p.resource.filter(x=>x.type&&("local_file"===x.type||"file"===x.type||x.type.includes("file"))),console.log("File services loaded via fallback:",this.availableFileServices)):this.availableFileServices=[],i&&i()},error:p=>{console.error("Fallback also failed:",p),this.availableFileServices=[],i&&i()}})}})}loadMcpServices(){this.mcpServicesLoaded||this.http.get("/api/v2/system/service_type",{params:{fields:"name,group"}}).pipe((0,le.n)(i=>{const t=i?.resource??[],o=new Set(t.filter(r=>"Database"===r.group).map(r=>r.name)),a=new Set(t.filter(r=>"File"===r.group).map(r=>r.name));return this.http.get("/api/v2/system/service",{params:{fields:"name,label,type,is_active"}}).pipe((0,z.T)(r=>(r?.resource??[]).filter(s=>!1!==s.isActive&&(o.has(s.type)||a.has(s.type))).map(s=>{const l=o.has(s.type)?"Database":"File",p=this.sanitizeApiName(s.name);return{name:s.name,label:s.label||s.name,type:s.type,category:l,tools:this.buildToolList(p,l),expanded:!1}})))})).subscribe({next:i=>{this.mcpServices=i,this.mcpServicesLoaded=!0},error:i=>{console.error("Failed to load MCP services:",i),this.mcpServicesLoaded=!0}})}buildToolList(i,t){return"Database"===t?[{name:`${i}_get_tables`,title:"List Tables",description:"Get tables available in the database"},{name:`${i}_get_table_schema`,title:"Get Table Schema",description:"Retrieve the schema of a specific table"},{name:`${i}_get_table_data`,title:"Get Table Data",description:"Retrieve table data with filtering, pagination, and sorting"},{name:`${i}_create_records`,title:"Create Records",description:"Create one or more records in a table"},{name:`${i}_update_records`,title:"Update Records",description:"Update (patch) records in a table"},{name:`${i}_delete_records`,title:"Delete Records",description:"Delete records from a table"},{name:`${i}_get_table_fields`,title:"Get Table Fields",description:"Retrieve field definitions for a table"},{name:`${i}_get_table_relationships`,title:"Get Table Relationships",description:"Retrieve relationships definition for a table"},{name:`${i}_get_stored_procedures`,title:"List Stored Procedures",description:"Get stored procedures available in the database"},{name:`${i}_call_stored_procedure`,title:"Call Stored Procedure",description:"Call a stored procedure"},{name:`${i}_get_stored_functions`,title:"List Stored Functions",description:"Get stored functions available in the database"},{name:`${i}_call_stored_function`,title:"Call Stored Function",description:"Call a stored function"},{name:`${i}_get_database_resources`,title:"List Database Resources",description:"Get all resources available in the database service"},{name:`${i}_get_api_spec`,title:"Get API Spec",description:"Get the OpenAPI specification for this database service"},{name:`${i}_get_data_model`,title:"Get Data Model",description:"Get a condensed data model showing all tables and columns"},{name:`${i}_aggregate_data`,title:"Aggregate Data",description:"Compute server-side aggregations (SUM, COUNT, AVG, MIN, MAX)"}]:[{name:`${i}_list_files`,title:"List Files",description:"List files and folders in a path"},{name:`${i}_get_file`,title:"Get File Content",description:"Get the content of a file"},{name:`${i}_create_file`,title:"Create File",description:"Create a new file with the given content"},{name:`${i}_get_file_properties`,title:"Get File Properties",description:"Get properties/metadata of a file or folder"},{name:`${i}_create_folder`,title:"Create Folder",description:"Create a new folder"},{name:`${i}_delete_file`,title:"Delete File or Folder",description:"Delete a file or folder"}]}isToolEnabled(i){return!this.disabledTools.has(i)}toggleTool(i,t){t?this.disabledTools.delete(i):this.disabledTools.add(i)}isAllSystemToolsEnabled(){return this.systemMcpTools.some(i=>!this.disabledTools.has(i.name))}toggleAllSystemTools(i){for(const t of this.systemMcpTools)i?this.disabledTools.delete(t.name):this.disabledTools.add(t.name)}isAllGlobalToolsEnabled(){return this.mcpGlobalTools.some(i=>!this.disabledTools.has(i.name))}toggleAllGlobalTools(i){for(const t of this.mcpGlobalTools)i?this.disabledTools.delete(t.name):this.disabledTools.add(t.name)}get isMergedStyle(){return"merged"===this.toolStyle}get dbServices(){return this.mcpServices.filter(i=>"Database"===i.category)}get visibleServices(){return this.isMergedStyle?this.mcpServices.filter(i=>"Database"!==i.category):this.mcpServices}get mergedDbVerbs(){const i=this.dbServices[0];if(!i)return[];const t=this.sanitizeApiName(i.name)+"_";return i.tools.map(o=>({...o,name:o.name.startsWith(t)?o.name.slice(t.length):o.name}))}verbKey(i,t){return`${this.sanitizeApiName(t)}_${i}`}isVerbEnabledFor(i,t){return!this.disabledTools.has(this.verbKey(i,t))}toggleVerbFor(i,t,o){const a=this.verbKey(i,t);o?this.disabledTools.delete(a):this.disabledTools.add(a)}isVerbEnabledAnywhere(i){return this.dbServices.some(t=>this.isVerbEnabledFor(i,t.name))}toggleVerbEverywhere(i,t){for(const o of this.dbServices)this.toggleVerbFor(i,o.name,t)}isServiceEnabled(i){return i.tools.some(t=>!this.disabledTools.has(t.name))}toggleService(i,t){for(const o of i.tools)t?this.disabledTools.delete(o.name):this.disabledTools.add(o.name)}sanitizeApiName(i){return i.toLowerCase().replace(/[^a-z0-9]/g,"_").replace(/_+/g,"_").replace(/^_|_$/g,"")}get customToolParameters(){return this.customToolForm.get("parameters")}createParameterGroup(i){return this.fb.group({name:[i?.name??"",m.k0.required],type:[i?.type??"string"],in:[i?.in??"query"],required:[i?.required??!1],description:[i?.description??""]})}addCustomTool(){this.editingToolIndex=-1,this.customToolForm.reset({toolType:"api",name:"",description:"",httpMethod:"GET",url:"",headers:"{}",function:"",enabled:!0,storageServiceId:null,scmRepository:"",scmReference:"",storagePath:""}),this.customToolParameters.clear(),this.liveHeadersValue=null,this.liveFunctionValue=null}editCustomTool(i){const t=this.customTools[i];this.editingToolIndex=i;const o=JSON.stringify(t.headers||{},null,2);this.customToolForm.patchValue({toolType:t.toolType||"api",name:t.name,description:t.description,httpMethod:t.httpMethod||"GET",url:t.url||"",headers:o,function:t.function||"",enabled:t.enabled,storageServiceId:t.storageServiceId||null,scmRepository:t.scmRepository||"",scmReference:t.scmReference||"",storagePath:t.storagePath||""}),this.liveHeadersValue=o,this.liveFunctionValue=t.function||"",this.customToolParameters.clear(),(t.parameters||[]).forEach(a=>{this.customToolParameters.push(this.createParameterGroup(a))})}deleteCustomTool(i){this.customTools.splice(i,1)}onHeadersChange(i){this.liveHeadersValue=i}onFunctionChange(i){this.liveFunctionValue=i}insertLookup(i,t){if("function"===t)this.functionEditor?.insertAtCursor(`secrets.${i}`);else if("headers"===t)this.headersEditor?.insertAtCursor(`{${i}}`);else if("url"===t){const o=this.customToolForm.get("url");o&&o.setValue((o.value||"")+`{${i}}`)}}saveCustomTool(){if(this.customToolForm.invalid)return;const i=this.customToolForm.getRawValue(),t=this.liveHeadersValue??i.headers??"{}",o=this.liveFunctionValue??i.function??"";let a={};if("api"===i.toolType&&""!==t.trim())try{a=JSON.parse(t)}catch(c){return void this.snackbarService.openSnackBar(`Invalid JSON in Static Headers: ${c.message}`,"error")}const r={toolType:i.toolType||"api",name:i.name,description:i.description,httpMethod:i.httpMethod,url:i.url,parameters:i.parameters||[],headers:a,function:o,enabled:i.enabled??!0,storageServiceId:i.storageServiceId||null,scmRepository:i.scmRepository||"",scmReference:i.scmReference||"",storagePath:i.storagePath||""};-1===this.editingToolIndex?this.customTools.push(r):null!==this.editingToolIndex&&(r.id=this.customTools[this.editingToolIndex].id,this.customTools[this.editingToolIndex]=r),this.editingToolIndex=null}cancelCustomToolEdit(){this.editingToolIndex=null}hasUnsavedCustomTool(){return null!==this.editingToolIndex&&this.customToolForm.dirty}closeUnsavedToolDialog(i){this.unsavedToolDialogRef?.close(i)}toggleCustomTool(i,t){this.customTools[i].enabled=t}loadAvailableScmServices(){this.http.get("/api/v2",{params:{group:"source control",fields:"id,name,label,type"},context:(0,de.Ku)()}).subscribe({next:i=>{this.availableScmServices=(i?.resource??i?.services??[]).filter(t=>t.id&&t.name)},error:()=>{this.availableScmServices=[]}})}viewLatestScmContent(){const i=this.customToolForm.get("storageServiceId")?.value,t=this.customToolForm.get("scmRepository")?.value,o=this.customToolForm.get("scmReference")?.value||"master",a=this.customToolForm.get("storagePath")?.value;if(!i||!t||!a)return void this.snackbarService.openSnackBar("Service, repository, and path are required to fetch from SCM.","error");const r=this.availableScmServices.find(s=>s.id===i);r?this.http.get(`/api/v2/${r.name}/_repo/${t}`,{params:{branch:o,content:"1",path:a},responseType:"text",context:(0,de.PH)()}).subscribe({next:s=>{this.customToolForm.get("function")?.setValue(s),this.liveFunctionValue=s,this.snackbarService.openSnackBar("Function loaded from repository.","success")},error:s=>{this.snackbarService.openSnackBar(`Failed to fetch from SCM: ${(0,ke.cQ)(s).message}`,"error")}}):this.snackbarService.openSnackBar("Selected SCM service not found.","error")}addToolParameter(){this.customToolParameters.push(this.createParameterGroup())}removeToolParameter(i){this.customToolParameters.removeAt(i)}logFormValues(){console.log("Form values:",this.serviceForm.value)}updateServiceTypeFlags(i){this.isNetworkService=!1,this.isScriptService=!1,this.isFile=!1,this.isSystemMcp=st(i);const t=this.serviceTypes.find(o=>o.name===i);if(t&&t.group){const o=t.group;"Remote Service"===o?this.isNetworkService=!0:"Script"===o?this.isScriptService=!0:"File"===o&&(this.isFile=!0)}}initializeConfig(i){const t=this.fb.group({});if(this.configSchema&&this.configSchema.length>0){this.configSchema.forEach(a=>{const r=[];a.required&&r.push(m.k0.required),t?.addControl(a.name,new m.MJ(a.default,r))}),this.isFile&&"local_file"===i&&t?.addControl("excelContent",new m.MJ(""));const o=this.configSchema.filter(a=>"content"===a.name)?.[0];if(o){const a=[];o.required&&a.push(m.k0.required),t?.addControl("serviceDefinition",new m.MJ(o.default,a))}this.isNetworkService&&(this.serviceForm.addControl("type",new m.MJ("")),t.addControl("content",new m.MJ("")),this.serviceDefinitionType="0"),this.isScriptService&&(t.get("content")||t.addControl("content",new m.MJ("")),this.serviceDefinitionType="0")}this.serviceForm.setControl("config",t)}get subscriptionRequired(){const i=this.serviceForm.controls.type.value;return"local_email"!==i&&"api_builder"!==i&&"API Builder"!==this.serviceTypes.find(o=>o.name===i)?.group&&i&&0===this.configSchema?.length}get scriptMode(){const i=this.serviceForm.getRawValue().type;return"nodejs"===i?U.Q.NODEJS:"python"===i?U.Q.PYTHON:"python3"===i?U.Q.PYTHON3:"php"===i?U.Q.PHP:U.Q.TEXT}get serviceDefinitionMode(){return"0"===this.serviceDefinitionType?U.Q.JSON:U.Q.YAML}get excelMode(){return U.Q.JSON}get functionEditorMode(){return U.Q.JAVASCRIPT}get headersEditorMode(){return U.Q.JSON}excelUpload(i){const t=this.serviceForm.get("config"),o=i.target;o.files&&t&&t.get("excelContent")&&(0,gt.Sj)(o.files[0]).subscribe(a=>{const r=t.get("excelContent");r&&r.setValue(a)})}getConfigSchema(i){return this.serviceTypes.find(t=>t.name===i)?.configSchema.map(t=>{const o="array"===t.type&&Array.isArray(t.items)?t.items.map(a=>({...a,name:(0,je.hm)(a.name)})):t.items;return{...t,name:(0,je.hm)(t.name),items:o}})??[]}syncSchemaViews(){if(this.schemaMemoSrc===(this.configSchema??null)&&this.schemaMemoIsDatabase===this.isDatabase&&this.schemaMemoIsNetwork===this.isNetworkService)return;this.schemaMemoSrc=this.configSchema??null,this.schemaMemoIsDatabase=this.isDatabase,this.schemaMemoIsNetwork=this.isNetworkService;const i=this.configSchema?.filter(r=>!["storageServiceId","storagePath"].includes(r.name))||[];this.memoViewSchema=i;const t=["host","port","database","username","password"],o=i.map(r=>r.name.toLowerCase());this.memoHasStandardFields=this.isDatabase&&t.filter(r=>o.includes(r)).length>=3,this.isDatabase?this.memoHasStandardFields?(this.memoBasicFields=i.filter(r=>t.includes(r.name.toLowerCase())),this.memoAdvancedFields=i.filter(r=>!t.includes(r.name.toLowerCase()))):(this.memoBasicFields=i,this.memoAdvancedFields=[]):(this.memoBasicFields=[],this.memoAdvancedFields=[]);const a=["baseUrl"];this.isNetworkService?(this.memoNetworkRequiredFields=i.filter(r=>a.includes(r.name)),this.memoNetworkAdvancedFields=i.filter(r=>!a.includes(r.name)&&"content"!==r.name)):(this.memoNetworkRequiredFields=[],this.memoNetworkAdvancedFields=[])}get viewSchema(){return this.syncSchemaViews(),this.memoViewSchema}get hasStandardFields(){return this.syncSchemaViews(),this.memoHasStandardFields}get basicFields(){return this.syncSchemaViews(),this.memoBasicFields}get advancedFields(){return this.syncSchemaViews(),this.memoAdvancedFields}get showAdvancedOptions(){return this.isDatabase&&this.hasStandardFields&&this.advancedFields.length>0}get networkRequiredFields(){return this.syncSchemaViews(),this.memoNetworkRequiredFields}get networkAdvancedFields(){return this.syncSchemaViews(),this.memoNetworkAdvancedFields}get showNetworkAdvancedOptions(){return this.isNetworkService}get showCurlImport(){return this.isNetworkService&&this.viewSchema.some(i=>"baseUrl"===i.name)}openCurlImport(){this.dialog.open(Nr,{width:"46rem"}).afterClosed().subscribe(i=>{i&&this.applyCurlImport(i)})}static{this.VERB_MASK={GET:1,POST:2,PUT:4,PATCH:8,DELETE:16}}applyCurlImport(i){const t=this.serviceForm.get("config");if(!t)return;const o=(r,c)=>{const s=t.get(r);s&&(s.setValue(c),s.markAsDirty())},a=Je.VERB_MASK[i.method]??0;o("baseUrl",i.baseUrl),o("parameters",i.parameters.map(r=>({name:r.name,value:r.value,exclude:!1,outbound:!0,cacheKey:!1,action:a}))),o("headers",i.headers.map(r=>({name:r.name,value:r.value,passFromClient:!1,action:a}))),Object.keys(i.options).length&&o("options",{...t.get("options")?.value??{},...i.options}),this.serviceForm.markAsDirty()}getConfigControl(i){return this.serviceForm.get(`config.${i}`)}get aiRoleId(){const t=this.serviceForm.get("config.aiRoleId")?.value;return"number"==typeof t?t:null}get aiServiceId(){const t=this.serviceForm.get("config.aiServiceId")?.value;return"number"==typeof t?t:null}setAiServiceId(i){this.serviceForm.get("config.aiServiceId")?.setValue(i)}setAiRoleId(i){this.serviceForm.get("config.aiRoleId")?.setValue(i)}getServiceDocByServiceIdControl(i){return this.serviceForm.get(`service_doc_by_service_id.${i}`)}getServiceDefinitionControl(){return this.serviceForm.get("serviceDefinition")}getControl(i){return this.serviceForm.controls[i]}save(i,t){if(this.hasUnsavedCustomTool()){if(this.unsavedToolDialogRef)return;return this.unsavedToolDialogRef=this.dialog.open(this.unsavedToolDialogTpl,{width:"440px",disableClose:!0}),void this.unsavedToolDialogRef.afterClosed().subscribe(l=>{if(this.unsavedToolDialogRef=null,l&&"cancel"!==l){if("save"===l){if(this.customToolForm.invalid)return void this.snackbarService.openSnackBar("Custom tool has invalid fields. Fix them or discard the edit before saving the service.","error");this.saveCustomTool()}else this.cancelCustomToolEdit();this.customToolForm.markAsPristine(),this.save(i,t)}})}const o=this.serviceForm.getRawValue();if(""===o.type||""===o.name)return void this.serviceForm.markAllAsTouched();this.validateServiceName(o.name)||console.warn(this.warnings);const a=this.formatServiceName(o.name);this.serviceForm.patchValue({name:a});let s,r={snackbarSuccess:"services.createSuccessMsg"},c=null;if(this.isNetworkService)r={...r,fields:"*",related:"service_doc_by_service_id"},o.config?.content&&(c={content:o.config.content,format:this.serviceDefinitionType?Number(this.serviceDefinitionType):0},delete o.config.content);else if(this.isScriptService){r={...r,fields:"*",related:"service_doc_by_service_id"};const l=this.getServiceDocByServiceIdControl("content")?.value;l&&l.trim()&&(c={content:l,format:this.serviceDefinitionType?Number(this.serviceDefinitionType):0})}if(o.service_doc_by_service_id=c,o.type.toLowerCase().includes("saml")?(r={...r,fields:"*",related:"service_doc_by_service_id"},s={...o,is_active:o.isActive,id:this.edit?this.serviceData.id:null,config:{sp_nameIDFormat:o.config.spNameIDFormat,default_role:o.config.defaultRole,sp_x509cert:o.config.spX509cert,sp_privateKey:o.config.spPrivateKey,idp_entityId:o.config.idpEntityId,idp_singleSignOnService_url:o.config.idpSingleSignOnServiceUrl,idp_x509cert:o.config.idpX509cert,relay_state:o.config.relayState}},o.config.appRoleMap&&(s.config.app_role_map=o.config.appRoleMap.map(l=>Object.keys(l).reduce((p,f)=>({...p,[(0,je.F0)(f)]:l[f]}),{}))),o.config.iconClass&&(s.config.icon_class=o.config.iconClass),delete s.isActive):"excel"===o.type?(s={...o,id:this.edit?this.serviceData.id:null,config:{...o.config||{},storage_service_id:o.storageServiceId}},delete s.storageServiceId):s={...o,id:this.edit?this.serviceData.id:null},this.edit){let l;"excel"===o.type?(l={...this.serviceData,...o,config:{...this.serviceData.config||{},...o.config,storage_service_id:o.storageServiceId},service_doc_by_service_id:o.service_doc_by_service_id?{id:this.serviceData.serviceDocByServiceId?.id,...this.serviceData.serviceDocByServiceId||{},...o.service_doc_by_service_id}:null},delete l.storageServiceId):l={...this.serviceData,...o,config:{...this.serviceData.config||{},...o.config},service_doc_by_service_id:o.service_doc_by_service_id?{id:this.serviceData.serviceDocByServiceId?.id,...this.serviceData.serviceDocByServiceId||{},...o.service_doc_by_service_id}:null},this.isNetworkService&&delete l.config.serviceDefinition,this.isMcp&&(l.config.disabledTools=Array.from(this.disabledTools),l.config.customTools=this.customTools.map(p=>({id:p.id,toolType:p.toolType||"api",name:p.name,description:p.description,httpMethod:p.httpMethod,url:p.url,parameters:p.parameters,headers:p.headers,function:p.function||"",enabled:p.enabled,storageServiceId:p.storageServiceId||null,scmRepository:p.scmRepository||"",scmReference:p.scmReference||"",storagePath:p.storagePath||""})),this.isSystemMcp&&delete l.config.customTools),this.servicesService.update(this.serviceData.id,l,{snackbarSuccess:"services.updateSuccessMsg"}).subscribe(()=>{o.type.toLowerCase().includes("saml")?this.router.navigate(["../"],{relativeTo:this.activatedRoute}):i&&this.cacheService.delete(l.name,{snackbarSuccess:"cache.serviceCacheFlushed"}).subscribe({next:()=>{t||this.router.navigate(["../"],{relativeTo:this.activatedRoute})},error:p=>console.error("Error flushing cache",p)})})}else this.servicesService.create({resource:[s]},r).pipe((0,le.n)(l=>this.isDatabase?this.http.get(`${N.C}/${a}/_table`).pipe((0,z.T)(()=>l),(0,R.W)(p=>this.servicesService.delete(l.resource[0].id).pipe((0,wi.Z)(()=>(0,ae.$)(()=>new Error("Database connection failed. Please check your connection details.")))))):(0,Q.of)(l))).subscribe({next:l=>{if(o.type.toLowerCase().includes("saml"))this.router.navigate(["../"],{relativeTo:this.activatedRoute});else if(this.isDatabase){const p=l?.resource?.[0]?.id;null!=p?this.router.navigate(["../",p],{relativeTo:this.activatedRoute}):this.router.navigate([`/api-connections/api-docs/${a}`])}else this.router.navigate([`/api-connections/api-docs/${a}`])},error:l=>{this.snackbarService.openSnackBar((0,ke.cQ)(l).message,"error")}})}validateServiceName(i){return!!/^[a-zA-Z0-9_-]+$/.test(i)||(this.warnings.push("Service name can only contain letters, numbers, underscores, and hyphens."),!1)}formatServiceName(i){return i.toLowerCase().replace(/\s+/g,"").replace(/[^a-z0-9_-]/g,"")}gotoSchema(){const i=this.serviceForm.getRawValue();this.router.navigate([`/admin-settings/schema/${i.name}`])}gotoAPIDocs(){const i=this.serviceForm.getRawValue();this.currentServiceService.setCurrentServiceId(this.serviceData.id);const t=this.formatServiceName(i.name);this.router.navigate([`/api-connections/api-docs/${t}`])}goBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}get artifactBaseUrl(){return`${window.location.origin}${N.C}/${this.serviceData?.name??""}`}onCreateApiKey(){this.router.navigate(["/api-connections/api-keys/create"])}onScopeCellClick(i){this.dialog.open(gr,{width:"640px",maxWidth:"92vw",autoFocus:!1,data:{roleId:i.roleId,verb:i.verb,serviceLabel:this.serviceData?.label||this.serviceData?.name||""}})}loadArtifactCardData(){var i=this;return(0,ge.A)(function*(){const t=i.serviceData?.name,o=i.serviceData?.id;if(!t||"number"!=typeof o)return void(i.artifactKeys=[]);const a=yield i.artifactResolver.resolveWorkingKeyAndTable(o,t,i.artifactSampleTable);i.artifactSampleTable=a.sampleTable,i.artifactKeys=a.keys})()}getBackgroundImage(i){const t=this.images?.find(o=>o.label==i);return t&&t?t.src:""}get filteredServiceTypes(){if(this.memoServiceTypesSrc!==this.serviceTypes||this.memoServiceTypesSearch!==this.search){this.memoServiceTypesSrc=this.serviceTypes,this.memoServiceTypesSearch=this.search;const i=this.search.toLowerCase();this.memoFilteredServiceTypes=this.serviceTypes.filter(t=>t.label.toLowerCase().includes(i)||t.name.toLowerCase().includes(i))}return this.memoFilteredServiceTypes}nextStep(i){i.next()}openDialog(i){this.dialog.open(ha,{data:{serviceName:i}}).afterClosed().subscribe()}onServiceDefinitionTypeChange(i){this.serviceDefinitionType=i}navigateToRoles(i){i.preventDefault(),this.router.navigate(["/roles"],{queryParams:{tab:"access"}})}goToSecurityConfig(){var i=this;return(0,ge.A)(function*(){try{const t=i.serviceForm.getRawValue(),o=i.formatServiceName(t.name);i.serviceForm.patchValue({name:o});const a={...t,config:{...t.config||{}}};if(i.isNetworkService&&t.config?.content)a.service_doc_by_service_id={content:t.config.content,format:i.serviceDefinitionType?Number(i.serviceDefinitionType):0},delete a.config.content;else if(i.isScriptService){const s=i.getServiceDocByServiceIdControl("content")?.value;s&&s.trim()&&(a.service_doc_by_service_id={content:s,format:i.serviceDefinitionType?Number(i.serviceDefinitionType):0})}else a.service_doc_by_service_id=null;const r=yield i.servicesService.create({resource:[a]},{snackbarSuccess:"services.createSuccessMsg"}).toPromise();if(!r)throw new Error("No response received from service creation");i.currentServiceId=r.resource[0].id,i.snackbarService.openSnackBar("Service created","success"),i.showSecurityConfig=!0,setTimeout(()=>{i.stepper.selectedIndex=i.stepper.steps.length-1})}catch{i.snackbarService.openSnackBar("Error creating service","error")}})()}getServiceTypeLabel(i){const t=this.serviceTypes.find(o=>o.name===i);return t?t.label:i}onServiceTypeSelect(i){this.selectedServiceTypeLable=i||"Unknown. Unable to identify Service Type"}static{this.\u0275fac=function(t){return new(t||ot)(e.rXU(B.nX),e.rXU(m.ok),e.rXU(K.Z1),e.rXU(K.j8),e.rXU(B.Ix),e.rXU(wt.f),e.rXU(X.Qq),e.rXU(h.bZ),e.rXU(Me.n),e.rXU(_t.L),e.rXU(Ar.M),e.rXU(pt.UG),e.rXU(mt.D),e.rXU(Vr),e.rXU(zr))}}static{this.\u0275cmp=e.VBU({type:ot,selectors:[["df-service-details"]],viewQuery:function(t,o){if(1&t&&(e.GBs(Xr,5),e.GBs(Br,5),e.GBs(Lr,5),e.GBs(Ur,5)),2&t){let a;e.mGM(a=e.lsd())&&(o.stepper=a.first),e.mGM(a=e.lsd())&&(o.functionEditor=a.first),e.mGM(a=e.lsd())&&(o.headersEditor=a.first),e.mGM(a=e.lsd())&&(o.unsavedToolDialogTpl=a.first)}},standalone:!0,features:[e.aNF],decls:7,vars:4,consts:[[1,"details-section",3,"formGroup","ngSubmit"],[4,"ngIf","ngIfElse"],["notDatabaseEdit",""],[3,"serviceName",4,"ngIf"],["unsavedToolDialog",""],["linear",""],["stepper",""],["errorMessage","Service Type is required.",3,"editable"],["matStepLabel",""],[1,"details-section"],[1,"section-header"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],["mat-button","","matStepperNext","","type","button",1,"cancel-btn",3,"disabled"],["appearance","outline",1,"dynamic-width"],["matInput","","placeholder","SQL, AWS, MongoDB, etc.",3,"ngModel","ngModelOptions","ngModelChange"],[1,"full-width"],[1,"grid-wrapper","grid-col-auto"],["class","radio-card",4,"ngFor","ngForOf","ngForTrackBy"],["subscriptSizing","dynamic","class","dynamic-width","appearance","outline",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","dynamic-width",4,"ngIf"],["appearance","outline","subscriptSizing","dynamic","class","full-width",4,"ngIf"],[1,"action-container"],["color","primary","formControlName","isActive",4,"ngIf"],["mat-button","","matStepperPrevious","","type","button",1,"cancel-btn"],[4,"ngIf"],["class","first-time-guidance",4,"ngIf"],["class","full-width action-bar",4,"ngIf"],["class","details-section",4,"ngIf"],["matStepperIcon","edit"],["matStepperIcon","done"],[1,"radio-card"],["formControlName","type","type","radio",3,"value","input"],[1,"card-content-wrapper"],[1,"check-icon"],[1,"card-content"],[1,"card-icon",3,"src","alt"],[1,"text-center"],["mat-button","",1,"unlock-btn",3,"click"],["subscriptSizing","dynamic","appearance","outline",1,"dynamic-width"],["matInput","","formControlName","name"],["appearance","outline","subscriptSizing","dynamic",1,"dynamic-width"],["matInput","","formControlName","label"],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["rows","1","matInput","","formControlName","description"],["color","primary","formControlName","isActive"],["formGroupName","config"],[4,"ngFor","ngForOf","ngForTrackBy"],["dynamic",""],[1,"full-width",3,"type","storageServiceId","storagePath","content","cache"],[3,"schema","formControl","dynamic-width","full-width",4,"ngIf"],["class","full-width",3,"schema","formControl",4,"ngIf"],[3,"schema","formControl"],[1,"full-width",3,"schema","formControl"],[1,"details-section","basic-fields-section"],["class","advanced-section",4,"ngIf"],[1,"advanced-section"],[3,"expanded"],[1,"first-time-guidance"],[1,"guidance-icon",3,"icon"],[1,"guidance-text"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],[1,"button-group"],["mat-flat-button","","class","save-btn","color","primary","type","button",3,"disabled","click",4,"ngIf"],["mat-flat-button","","class","save-btn secondary-btn","type","button",3,"disabled","click",4,"ngIf"],["class","save-btn","mat-flat-button","","color","primary",4,"ngIf"],["mat-flat-button","","color","primary","type","button",1,"save-btn",3,"disabled","click"],["mat-flat-button","","type","button",1,"save-btn","secondary-btn",3,"disabled","click"],["mat-flat-button","","color","primary",1,"save-btn"],[3,"serviceName","serviceId","isDatabase","isFirstTimeUser","goBack"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","service-health-panel",3,"serviceId","serviceName","serviceGroup","deprecated",4,"ngIf"],["formControlName","type",3,"selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["subscriptSizing","dynamic","appearance","outline","class","full-width",4,"ngIf"],["subscriptSizing","dynamic","class","full-width","appearance","outline",4,"ngIf"],["formControlName","isActive","color","primary",4,"ngIf"],[1,"service-health-panel",3,"serviceId","serviceName","serviceGroup","deprecated"],[3,"eyebrow","title","description"],[1,"service-overview-card",3,"serviceName","baseUrl","sampleTable","keys","createKey"],["class","service-pipeline",4,"ngIf"],["class","service-access",4,"ngIf"],[1,"service-pipeline"],[1,"service-pipeline__hint"],[3,"serviceId","serviceName","serviceType"],[1,"service-access"],[1,"service-access__hint"],[3,"serviceId","cellClick"],[3,"value"],["appearance","outline",1,"full-width"],["formControlName","storageServiceId","required",""],["subscriptSizing","dynamic","appearance","outline",1,"full-width"],["formControlName","isActive","color","primary"],["notDatabase",""],["type","button","mat-flat-button","",1,"save-btn",3,"click"],["class","curl-import-action full-width",4,"ngIf"],[1,"curl-import-action","full-width"],["mat-stroked-button","","type","button","color","primary","data-testid","open-curl-import",3,"click"],[3,"icon"],[1,"curl-import-action__hint"],["color","primary",3,"schema","formControl","dynamic-width","full-width",4,"ngIf"],["color","primary",3,"schema","formControl"],["aria-label","Service Definition Type",3,"ngModel","ngModelOptions","ngModelChange","change"],["value","0"],["value","1"],[1,"full-width",3,"type","content","contentText"],[1,"full-width",3,"formControl","mode"],[1,"full-width",3,"isScript","type","storageServiceId","storagePath","content","cache","hideScmActions"],["class","full-width",3,"selectedConnectionId","selectedRoleId","selectConnection","selectRole",4,"ngIf"],["class","full-width",3,"form",4,"ngIf"],["class","full-width",3,"form","serviceId",4,"ngIf"],["class","full-width",3,"roleId",4,"ngIf"],[1,"full-width",3,"selectedConnectionId","selectedRoleId","selectConnection","selectRole"],[1,"full-width",3,"form"],[1,"full-width",3,"form","serviceId"],[1,"actions","full-width"],["type","file",2,"display","none",3,"accept","change"],["fileInput",""],[1,"full-width",3,"roleId"],[1,"mcp-tools-container"],["multi",""],[1,"mcp-service-header"],["color","primary",3,"checked","change","click"],[1,"mcp-services-table","full-width"],[1,"toggle-col"],[3,"disabled-row",4,"ngFor","ngForOf","ngForTrackBy"],["color","primary",3,"checked","change"],["class","mcp-tools-container",4,"ngIf"],[3,"disabled-row",4,"ngFor","ngForOf"],["data-testid","merged-db-tools",4,"ngIf"],[3,"expanded",4,"ngFor","ngForOf","ngForTrackBy"],["data-testid","merged-db-tools"],[1,"custom-tools-container"],[1,"custom-tools-description"],["class","custom-tools-actions",4,"ngIf"],["class","custom-tool-form",3,"formGroup",4,"ngIf"],["class","mcp-services-table full-width",4,"ngIf"],["class","no-tools-message",4,"ngIf"],[1,"custom-tools-actions"],["mat-flat-button","","color","primary",3,"click"],[1,"btn-icon",3,"icon"],[1,"custom-tool-form",3,"formGroup"],["formControlName","toolType",1,"tool-type-toggle"],["value","api"],["value","function"],[1,"form-row"],["appearance","outline",1,"form-field-half"],["matInput","","formControlName","name","placeholder","my_tool_name"],["appearance","outline","class","form-field-quarter",4,"ngIf"],["appearance","outline","class","full-width",4,"ngIf"],["matInput","","formControlName","description","rows","2","placeholder","Describe what this tool does..."],[1,"parameters-section"],["mat-stroked-button","","color","primary","type","button",3,"click"],["class","parameter-cards","formArrayName","parameters",4,"ngIf"],["class","no-parameters-hint",4,"ngIf"],["class","scm-link-section",3,"formGroup",4,"ngIf"],["class","editor-section",4,"ngIf"],[1,"form-actions"],["mat-button","","type","button",3,"click"],["mat-flat-button","","color","primary","type","button",3,"disabled","click"],["appearance","outline",1,"form-field-quarter"],["formControlName","httpMethod"],["value","GET"],["value","POST"],["value","PUT"],["value","PATCH"],["value","DELETE"],["matInput","","formControlName","url","placeholder","https://api.example.com/endpoint/{id}"],["mat-icon-button","","matSuffix","","type","button","matTooltip","Insert Lookup",3,"matMenuTriggerFor","disabled"],["urlLookupMenu","matMenu"],["mat-menu-item","",3,"click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-menu-item","",3,"click"],["formArrayName","parameters",1,"parameter-cards"],["class","parameter-card",3,"formGroupName",4,"ngFor","ngForOf"],[1,"parameter-card",3,"formGroupName"],[1,"parameter-card-header"],[1,"parameter-index"],["mat-icon-button","","color","warn","type","button","matTooltip","Remove parameter",1,"parameter-remove-btn",3,"click"],[1,"parameter-card-fields"],["appearance","outline",1,"param-field","param-field--name"],["matInput","","formControlName","name","placeholder","param_name"],["appearance","outline",1,"param-field","param-field--type"],["formControlName","type"],["value","string"],["value","number"],["value","integer"],["value","boolean"],["appearance","outline","class","param-field param-field--location",4,"ngIf"],[1,"param-field","param-field--required"],["formControlName","required"],["appearance","outline",1,"param-field","param-field--desc"],["matInput","","formControlName","description","placeholder","What this parameter does"],["appearance","outline",1,"param-field","param-field--location"],["formControlName","in"],["value","query"],["value","path"],["value","body"],["value","header"],[1,"no-parameters-hint"],[1,"scm-link-section",3,"formGroup"],["formControlName","storageServiceId"],["class","form-row",4,"ngIf"],["class","scm-actions",4,"ngIf"],["appearance","outline",1,"form-field-third"],["matInput","","formControlName","scmRepository","placeholder","my-repo"],["matInput","","formControlName","scmReference","placeholder","master"],["matInput","","formControlName","storagePath","placeholder","scripts/my-tool.js"],[1,"scm-actions"],["mat-flat-button","","color","primary","type","button",3,"click"],[1,"editor-section"],[1,"editor-label-row"],[1,"editor-label"],["mat-stroked-button","","type","button",3,"matMenuTriggerFor","disabled"],["fnLookupMenu","matMenu"],[1,"editor-wrapper"],["formControlName","function",3,"mode","valueChange"],["functionEditor",""],[1,"editor-hint"],["hdrLookupMenu","matMenu"],[1,"editor-wrapper","editor-wrapper--compact"],["formControlName","headers",3,"mode","valueChange"],["headersEditor",""],[1,"action-col"],[1,"url-cell"],[1,"action-buttons"],["mat-icon-button","","matTooltip","Edit tool",3,"disabled","click"],["mat-icon-button","","color","warn","matTooltip","Delete tool",3,"disabled","click"],[1,"no-tools-message"],["mat-flat-button","","color","primary",1,"save-btn",3,"value","click"],[3,"serviceName"],["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions","","align","end"],["mat-flat-button","","type","button",3,"click"],["mat-flat-button","","color","warn","type","button",3,"click"],["mat-flat-button","","color","primary","cdkFocusInitial","","type","button",3,"click"]],template:function(t,o){if(1&t&&(e.j41(0,"form",0),e.bIt("ngSubmit",function(){return o.save(!1,!1)}),e.DNE(1,Yc,53,27,"ng-container",1),e.DNE(2,xl,22,22,"ng-template",null,2,e.C5r),e.k0s(),e.DNE(4,yl,1,1,"df-paywall",3),e.DNE(5,kl,11,0,"ng-template",null,4,e.C5r)),2&t){const a=e.sdS(3);e.Y8G("formGroup",o.serviceForm),e.R7$(1),e.Y8G("ngIf",o.isDatabase&&!o.edit)("ngIfElse",a),e.R7$(3),e.Y8G("ngIf",o.subscriptionRequired)}},dependencies:[P.RG,P.rl,P.nJ,P.MV,P.yw,E.fS,E.fg,V.Ve,V.VO,L.wT,_.pM,ye.mV,ye.sG,ne.RI,te.MY,te.BS,te.GK,te.Z2,te.WN,te.Q6,I.Kj,m.X1,m.qT,m.me,m.Fm,m.BC,m.cb,m.YS,m.l_,m.j4,m.JD,m.$R,m.v8,m.YN,m.vS,_.bT,xe.g7,xe.So,Pe,ct.e,_o,Co,Ro,Jo,ei,li,$e,lt.s,k.dX,k.aY,$.uc,$.oV,b.Hl,b.$z,b.iY,Fi.S,Ne,Si.C,ma,Ft,De,Dt,da,pa,Ot,_.MD,_.ux,_.e1,A.m_,A.An,ce.Vg,ce.ec,ce.pc,_a.Wk,re.Hu,ga.w,Oi,Fe.Cn,Fe.kk,Fe.fb,Fe.Cp,h.hM,h.BI,h.Yi,h.E7,ba.K,$a,La,mr,Be],styles:[".grid-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:16px}.service-health-panel[_ngcontent-%COMP%]{display:block;margin-bottom:2.4rem}.service-pipeline[_ngcontent-%COMP%], .service-access[_ngcontent-%COMP%]{margin-top:3.2rem;padding-top:3.2rem;border-top:1px solid var(--df-border-2)}.service-pipeline__hint[_ngcontent-%COMP%], .service-access__hint[_ngcontent-%COMP%]{margin:0 0 1.6rem;max-width:68ch;color:var(--df-text-muted);font-size:1.3rem;line-height:1.5}.section-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .basic-fields-section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%], .component-selection[_ngcontent-%COMP%] h3[_ngcontent-%COMP%], .security-config-container[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 16px;font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}[_nghost-%COMP%] .mat-horizontal-stepper-header-container{border-bottom:1px solid var(--df-border-2);margin-bottom:8px}[_nghost-%COMP%] .mat-horizontal-stepper-header{height:48px}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-label{font-size:1.2rem;font-weight:600;letter-spacing:.02em;color:var(--df-text-muted)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-label-selected{color:var(--df-text)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon{height:22px;width:22px;font-size:1.1rem;background-color:var(--df-surface-2);color:var(--df-text-muted);border:1px solid var(--df-border)}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon .mat-icon{font-size:1.2rem;height:auto;width:auto;line-height:1}[_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon-selected, [_nghost-%COMP%] .mat-horizontal-stepper-header .mat-step-icon-state-edit{background-color:var(--df-accent)!important;color:var(--df-accent-contrast);border-color:transparent}[_nghost-%COMP%] .mat-stepper-horizontal-line{border-top-color:var(--df-border-2)}label.radio-card[_ngcontent-%COMP%]{cursor:pointer}label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%]{background:var(--df-surface);border-radius:var(--df-radius-sm);max-width:200px;min-height:200px;padding:12px;display:grid;box-shadow:none;border:1px solid var(--df-border);background-size:contain;background-repeat:no-repeat;transition:border-color .15s ease}label.radio-card[_ngcontent-%COMP%] .card-content-wrapper.not-included[_ngcontent-%COMP%]{opacity:.5;cursor:default!important;pointer-events:none!important}label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{width:20px;height:20px;display:inline-block;border:solid 2px var(--df-border);background-color:var(--df-surface-2);border-radius:50%;position:relative}label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]:before{content:\"\";position:absolute;inset:0;background-image:url(\"data:image/svg+xml,%3Csvg width='12' height='9' viewBox='0 0 12 9' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0.93552 4.58423C0.890286 4.53718 0.854262 4.48209 0.829309 4.42179C0.779553 4.28741 0.779553 4.13965 0.829309 4.00527C0.853759 3.94471 0.889842 3.88952 0.93552 3.84283L1.68941 3.12018C1.73378 3.06821 1.7893 3.02692 1.85185 2.99939C1.91206 2.97215 1.97736 2.95796 2.04345 2.95774C2.11507 2.95635 2.18613 2.97056 2.2517 2.99939C2.31652 3.02822 2.3752 3.06922 2.42456 3.12018L4.69872 5.39851L9.58026 0.516971C9.62828 0.466328 9.68554 0.42533 9.74895 0.396182C9.81468 0.367844 9.88563 0.353653 9.95721 0.354531C10.0244 0.354903 10.0907 0.369582 10.1517 0.397592C10.2128 0.425602 10.2672 0.466298 10.3112 0.516971L11.0651 1.25003C11.1108 1.29672 11.1469 1.35191 11.1713 1.41247C11.2211 1.54686 11.2211 1.69461 11.1713 1.82899C11.1464 1.88929 11.1104 1.94439 11.0651 1.99143L5.06525 7.96007C5.02054 8.0122 4.96514 8.0541 4.90281 8.08294C4.76944 8.13802 4.61967 8.13802 4.4863 8.08294C4.42397 8.0541 4.36857 8.0122 4.32386 7.96007L0.93552 4.58423Z' fill='white'/%3E%3C/svg%3E%0A\");background-repeat:no-repeat;background-size:12px;background-position:center center;transform:scale(1.6);opacity:0}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{appearance:none;-webkit-appearance:none;-moz-appearance:none}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%]{border-color:var(--df-accent);box-shadow:0 0 0 1px var(--df-accent);opacity:1}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{transform:scale(1.2);background-color:var(--df-accent);border-color:var(--df-accent)}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]:before{transform:scale(1);opacity:1}label.radio-card[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:focus + .card-content-wrapper[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{box-shadow:0 0 0 4px var(--df-accent-soft);border-color:var(--df-accent)}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%]{width:100%;text-align:center}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{margin-bottom:10px;width:100%;height:110px}label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--df-text)}.details-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%], .details-section[_ngcontent-%COMP%] .action-container[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}mat-icon[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.calendly-inline-widget[_ngcontent-%COMP%]{height:500px}.unlock-btn[_ngcontent-%COMP%]{position:relative;top:-95px;right:-55px;color:var(--df-danger)}.action-bar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.action-bar[_ngcontent-%COMP%] .button-group[_ngcontent-%COMP%]{display:flex;gap:8px}.action-bar[_ngcontent-%COMP%] .secondary-btn[_ngcontent-%COMP%]{background-color:transparent!important;border:1px solid var(--df-accent)!important;color:var(--df-accent)!important} .mat-expansion-panel-header>.mat-expansion-indicator:after{color:unset!important} .mat-mdc-select-arrow{color:unset!important}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content-wrapper[_ngcontent-%COMP%]{background:#000;border:1px solid #fff}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .check-icon[_ngcontent-%COMP%]{border:solid 2px #2d2d2d}.dark-theme[_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] label.radio-card[_ngcontent-%COMP%] .card-content[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:#fff}.dark-theme[_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button, .dark-theme [_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button{background:inherit!important}.dark-theme[_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button span, .dark-theme [_nghost-%COMP%] .details-section[_ngcontent-%COMP%] .mat-button-toggle-group button span{color:var(--df-text)!important}.security-config-container[_ngcontent-%COMP%]{padding:24px 0}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%]{margin-bottom:24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm)}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.security-config-container[_ngcontent-%COMP%] .top-hint[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.security-config-container[_ngcontent-%COMP%] .security-cards-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:32px}@media (max-width: 768px){.security-config-container[_ngcontent-%COMP%] .security-cards-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%]{position:relative;cursor:pointer;transition:border-color .15s ease-in-out;border-radius:var(--df-radius);background:var(--df-surface);border:1px solid var(--df-border-2);box-shadow:none;overflow:hidden;height:100%;min-height:160px;display:flex;flex-direction:column}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:24px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;height:100%;justify-content:center}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1.6rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .security-option-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;color:var(--df-text-muted);font-size:1.35rem;line-height:1.5}.security-config-container[_ngcontent-%COMP%] .security-option-card.selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background-color:var(--df-accent-soft)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%]{margin-top:32px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%]{width:100%;max-width:400px;margin-bottom:24px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .search-field[_ngcontent-%COMP%] .mat-mdc-form-field-wrapper[_ngcontent-%COMP%]{padding-bottom:0}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .components-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px;margin-bottom:24px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%]{border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);transition:border-color .15s ease-in-out;cursor:pointer;box-shadow:none;background:var(--df-surface)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding:16px;display:flex;align-items:center;gap:12px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%] .checkbox-wrapper[_ngcontent-%COMP%]{margin-right:8px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .component-card.selected[_ngcontent-%COMP%]{border-color:var(--df-accent);background-color:var(--df-accent-soft)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%]{margin-top:32px;padding:24px;background:var(--df-surface);border-radius:var(--df-radius);border:1px solid var(--df-border-2)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%]{margin:0 0 24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);display:flex;align-items:center;gap:12px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:20px;width:20px;height:20px}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;border:none;width:100%}@media (max-width: 768px){.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] mat-button-toggle-group[_ngcontent-%COMP%]{grid-template-columns:1fr}}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);height:auto;width:100%;transition:border-color .15s ease-in-out}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]:hover{border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%]{padding:16px;text-align:center}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%] .toggle-content[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:6px 0 0;font-size:1.3rem;color:var(--df-text-muted)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-checked[_ngcontent-%COMP%]{background:var(--df-accent-soft);border-color:var(--df-accent)}.security-config-container[_ngcontent-%COMP%] .component-selection[_ngcontent-%COMP%] .access-level-section[_ngcontent-%COMP%] .access-level-controls[_ngcontent-%COMP%] .mat-button-toggle.mat-button-toggle-checked[_ngcontent-%COMP%] .toggle-text[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{color:var(--df-accent)}.action-container[_ngcontent-%COMP%]{margin-top:24px;padding-top:16px;border-top:1px solid var(--df-border-2);display:flex;justify-content:space-between;align-items:center}.action-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%]{margin:0 0 24px;padding:12px 16px;background:var(--df-accent-soft);border-radius:var(--df-radius-sm)}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:1.35rem;color:var(--df-text)}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;font-weight:500;cursor:pointer}.component-selection[_ngcontent-%COMP%] .hint-widget[_ngcontent-%COMP%] .role-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.mcp-tools-container[_ngcontent-%COMP%]{padding:12px 0}.mcp-tools-container[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:1.2rem;padding:3px 8px;background:var(--df-accent-soft);color:var(--df-accent-strong);border-radius:4px;white-space:nowrap;font-weight:500}.mcp-service-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.toggle-col[_ngcontent-%COMP%]{width:60px}.disabled-row[_ngcontent-%COMP%]{opacity:.45;transition:opacity .2s ease}.disabled-row[_ngcontent-%COMP%]:hover{opacity:.65}.mcp-services-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}.mcp-services-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .mcp-services-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{text-align:left;padding:12px;border-bottom:1px solid var(--df-border-2)}.mcp-services-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:600;color:var(--df-text-muted);font-size:11px;text-transform:uppercase;letter-spacing:.06em}.mcp-services-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:1.35rem}.mcp-services-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:44px;transition:background-color .15s ease}.mcp-services-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:var(--df-hover)}.custom-tools-container[_ngcontent-%COMP%]{padding:12px 0}.custom-tools-container[_ngcontent-%COMP%] .custom-tools-description[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem;line-height:1.6;margin-bottom:16px}.custom-tools-container[_ngcontent-%COMP%] .custom-tools-actions[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tools-container[_ngcontent-%COMP%] .no-tools-message[_ngcontent-%COMP%]{color:var(--df-text-faint);font-style:italic;padding:24px 16px;text-align:center;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm);background:var(--df-surface-2)}.custom-tools-container[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{font-size:1.2rem;padding:3px 8px;background:var(--df-accent-soft);color:var(--df-accent-strong);border-radius:4px;white-space:nowrap;font-weight:500}.custom-tools-container[_ngcontent-%COMP%] .url-cell[_ngcontent-%COMP%]{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--df-text-muted);font-size:1.3rem}.tool-type-toggle[_ngcontent-%COMP%]{margin-bottom:16px}.tool-type-toggle[_ngcontent-%COMP%] .mat-button-toggle[_ngcontent-%COMP%]{min-width:110px}.custom-tool-form[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);padding:20px;margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin:0 0 16px;font-weight:600;font-size:1.5rem;letter-spacing:-.01em;color:var(--df-text)}.custom-tool-form[_ngcontent-%COMP%] .form-row[_ngcontent-%COMP%]{display:flex;gap:16px;align-items:flex-start}.custom-tool-form[_ngcontent-%COMP%] .form-field-half[_ngcontent-%COMP%]{flex:1}.custom-tool-form[_ngcontent-%COMP%] .form-field-quarter[_ngcontent-%COMP%]{width:160px;flex-shrink:0}.custom-tool-form[_ngcontent-%COMP%] .form-field-third[_ngcontent-%COMP%]{flex:1;min-width:0}.custom-tool-form[_ngcontent-%COMP%] .scm-link-section[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] .scm-actions[_ngcontent-%COMP%]{margin-top:8px;margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%]{margin:20px 0}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%] h5[_ngcontent-%COMP%]{margin:0;font-weight:600;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-cards[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]{background:var(--df-surface);border:1px solid var(--df-border-2);border-radius:var(--df-radius);padding:16px 20px 8px;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]:hover{border-color:var(--df-border)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card[_ngcontent-%COMP%]:focus-within{border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-index[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:600;color:var(--df-accent-strong);background:var(--df-accent-soft);padding:2px 8px;border-radius:var(--df-radius-sm);letter-spacing:.03em}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-remove-btn[_ngcontent-%COMP%]{opacity:.4;transition:opacity .15s ease;transform:scale(.85)}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-header[_ngcontent-%COMP%] .parameter-remove-btn[_ngcontent-%COMP%]:hover{opacity:1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 120px 120px auto;gap:12px;align-items:start}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field[_ngcontent-%COMP%]{min-width:0}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--name[_ngcontent-%COMP%]{grid-column:1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--type[_ngcontent-%COMP%]{grid-column:2}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--location[_ngcontent-%COMP%]{grid-column:3}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--required[_ngcontent-%COMP%]{grid-column:4;padding-top:12px;white-space:nowrap}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .parameter-card-fields[_ngcontent-%COMP%] .param-field--desc[_ngcontent-%COMP%]{grid-column:1/-1}.custom-tool-form[_ngcontent-%COMP%] .parameters-section[_ngcontent-%COMP%] .no-parameters-hint[_ngcontent-%COMP%]{color:var(--df-text-faint);font-size:1.3rem;text-align:center;padding:20px 16px;margin:0;border:1px dashed var(--df-border);border-radius:var(--df-radius-sm)}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]{width:100%;padding:6px 10px;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.3rem;background:var(--df-surface);color:var(--df-text);transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .inline-input[_ngcontent-%COMP%]::placeholder{color:var(--df-text-faint)}.custom-tool-form[_ngcontent-%COMP%] .inline-select[_ngcontent-%COMP%]{padding:6px 10px;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.3rem;background:var(--df-surface);color:var(--df-text);cursor:pointer;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .inline-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%]{margin-bottom:16px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%]{display:block;font-size:1.3rem;font-weight:500;color:var(--df-text-muted);margin-bottom:8px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-label-row[_ngcontent-%COMP%] .editor-label[_ngcontent-%COMP%]{margin-bottom:0}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%]{border:1px solid var(--df-border);border-radius:var(--df-radius-sm);overflow:hidden;transition:border-color .2s ease,box-shadow .2s ease}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%]:focus-within{border-color:var(--df-accent);box-shadow:0 0 0 2px var(--df-accent-soft)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%]{display:block;min-height:200px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%] .editor{min-height:200px;border-radius:var(--df-radius-sm)}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper--compact[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%]{min-height:100px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-wrapper--compact[_ngcontent-%COMP%] df-ace-editor[_ngcontent-%COMP%] .editor{min-height:100px}.custom-tool-form[_ngcontent-%COMP%] .editor-section[_ngcontent-%COMP%] .editor-hint[_ngcontent-%COMP%]{display:block;font-size:1.2rem;color:var(--df-text-faint);margin-top:6px;padding-left:2px}.custom-tool-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:12px;margin-top:24px;padding-top:16px;border-top:1px solid var(--df-border-2)}.btn-icon[_ngcontent-%COMP%]{margin-right:6px}.action-col[_ngcontent-%COMP%]{width:100px;white-space:nowrap;text-align:right;padding-right:4px!important}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:flex-end;gap:2px}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:.6;transition:opacity .15s ease}.action-col[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{opacity:1}.basic-fields-section[_ngcontent-%COMP%]{margin-bottom:24px}.advanced-section[_ngcontent-%COMP%]{margin-top:24px;margin-bottom:24px}.first-time-guidance[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 16px;margin:16px 0;background:var(--df-accent-soft);border-radius:var(--df-radius-sm);border-left:3px solid var(--df-accent)}.first-time-guidance[_ngcontent-%COMP%] .guidance-icon[_ngcontent-%COMP%]{color:var(--df-accent);font-size:18px;flex-shrink:0}.first-time-guidance[_ngcontent-%COMP%] .guidance-text[_ngcontent-%COMP%]{margin:0;color:var(--df-text-2);font-size:1.35rem;line-height:1.5;flex:1}.service-overview-card[_ngcontent-%COMP%]{display:block;margin-bottom:var(--df-space-5)}.curl-import-action[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;margin-bottom:1rem}.curl-import-action[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{margin-right:.5rem}.curl-import-action__hint[_ngcontent-%COMP%]{font-size:.85rem;opacity:.7}"]})}};He=Je=(0,Z.Cg)([(0,j.d)({checkProperties:!0})],He)}}]); \ No newline at end of file diff --git a/dist/2043.21d51c2fe167c098.js b/dist/2043.21d51c2fe167c098.js new file mode 100644 index 00000000..04a417cb --- /dev/null +++ b/dist/2043.21d51c2fe167c098.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2043],{52043:(le,w,_)=>{_.r(w),_.d(w,{DfTableDetailsComponent:()=>j});var G=_(31635),m=_(89417),g=_(88834),p=_(32102),b=_(99631),T=_(33609),f=_(60177),Y=_(62031),F=_(24784),h=_(23472),V=_(55590),$=_(49894),n=_(17705),d=_(95245),B=_(18617),R=_(75351),I=_(20060),r=_(9159),u=_(59115),k=_(96695),D=_(2042),v=_(67575),A=_(84665),U=_(56583),z=_(71359),x=_(82798),L=_(86600);function J(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){n.eBV(t);const i=n.XpG();return n.Njj(i.createRow())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"newEntry")),n.R7$(2),n.Y8G("icon",t.faPlus)}}function q(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",8),n.bIt("click",function(){n.eBV(t);const i=n.XpG();return n.Njj(i.refreshSchema())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"importList")),n.R7$(2),n.Y8G("icon",t.faRefresh)}}function H(e,o){if(1&e&&(n.j41(0,"mat-option",13),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=o.$implicit;n.Y8G("value",t.value),n.R7$(1),n.SpI(" ",n.bMT(2,2,t.label)," ")}}function Q(e,o){if(1&e&&(n.j41(0,"mat-form-field",10)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"mat-select",11),n.DNE(5,H,3,4,"mat-option",12),n.k0s()()),2&e){const t=n.XpG().ngIf;n.R7$(2),n.JRh(n.bMT(3,3,"accessUsage.filter.label")),n.R7$(2),n.Y8G("formControl",t.filter),n.R7$(1),n.Y8G("ngForOf",t.filterOptions)}}function K(e,o){if(1&e&&(n.qex(0),n.DNE(1,Q,6,5,"mat-form-field",9),n.bVm()),2&e){const t=o.ngIf;n.R7$(1),n.Y8G("ngIf",t.available)}}function Z(e,o){if(1&e&&(n.j41(0,"mat-form-field",14)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"input",15),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"search")),n.R7$(2),n.Y8G("formControl",t.currentFilter)}}function W(e,o){1&e&&n.nrm(0,"mat-progress-bar",26)}function nn(e,o){if(1&e){const t=n.RV6();n.j41(0,"div",27)(1,"div",28),n.nrm(2,"fa-icon",29),n.j41(3,"span"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.j41(6,"button",30),n.bIt("click",function(){n.eBV(t);const i=n.XpG(2);return n.Njj(i.retryLastFetch())}),n.EFF(7),n.nI1(8,"transloco"),n.k0s()(),n.nrm(9,"df-error-detail",31),n.k0s()}if(2&e){const t=n.XpG(2);n.R7$(2),n.Y8G("icon",t.faTriangleExclamation),n.R7$(2),n.JRh(n.bMT(5,4,t.tableError.message)),n.R7$(3),n.SpI(" ",n.bMT(8,6,"retry")," "),n.R7$(2),n.Y8G("error",t.tableError)}}function tn(e,o){if(1&e&&(n.j41(0,"th",37),n.nI1(1,"async"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.BMQ("sortActionDescription",n.bMT(1,4,a.sortDescription(t.header))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.header)," ")}}function en(e,o){if(1&e&&n.nrm(0,"fa-icon",29),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit,i=n.XpG(2);n.HbH(i.isCellActive(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",i.activeIcon(i.isCellActive(null==a?null:a.cell(t))))}}function an(e,o){if(1&e&&(n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,null!=a&&a.cell(t)?"confirmed":"pending")," ")}}function on(e,o){if(1&e&&(n.qex(0),n.EFF(1),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",null==a?null:a.cell(t)," ")}}function cn(e,o){if(1&e&&n.nrm(0,"df-access-usage-cell",41),2&e){const t=n.XpG().$implicit,a=n.XpG(4);let i,c;n.Y8G("usage",null==a.accessUsage?null:a.accessUsage.get(t.id))("staleDays",null!==(i=null==a.accessUsage?null:a.accessUsage.staleDays)&&void 0!==i?i:null)("trackingStartedAt",null!==(c=null==a.accessUsage?null:a.accessUsage.trackingStartedAt)&&void 0!==c?c:null)}}function ln(e,o){if(1&e&&n.nrm(0,"fa-icon",43),2&e){const t=n.XpG(6);n.Y8G("icon",t.faTriangleExclamation)}}function _n(e,o){1&e&&(n.j41(0,"span"),n.EFF(1),n.k0s()),2&e&&(n.R7$(1),n.JRh("-"))}function rn(e,o){if(1&e&&(n.qex(0),n.DNE(1,ln,1,1,"fa-icon",42),n.DNE(2,_n,2,1,"span",4),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.Y8G("ngIf",!(null==a||!a.cell(t))),n.R7$(1),n.Y8G("ngIf",!(null!=a&&a.cell(t)))}}function sn(e,o){if(1&e&&(n.j41(0,"td",38),n.DNE(1,en,1,3,"fa-icon",39),n.DNE(2,an,3,3,"ng-container",4),n.DNE(3,on,2,1,"ng-container",4),n.DNE(4,cn,1,3,"df-access-usage-cell",40),n.DNE(5,rn,3,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.R7$(1),n.Y8G("ngIf","active"===t.columnDef),n.R7$(1),n.Y8G("ngIf","registration"===t.columnDef),n.R7$(1),n.Y8G("ngIf","active"!==t.columnDef&&"registration"!==t.columnDef&&"log"!==t.columnDef&&"lastUsed"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","lastUsed"===t.columnDef),n.R7$(1),n.Y8G("ngIf","log"===t.columnDef)}}function mn(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,tn,4,8,"th",35),n.DNE(2,sn,6,7,"td",36),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function gn(e,o){if(1&e&&(n.j41(0,"th",46),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,t.header)," ")}}function pn(e,o){if(1&e&&(n.j41(0,"a",53),n.bIt("click",function(a){return a.stopPropagation()}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=o.$implicit;n.Y8G("routerLink",t.fix)("disabled",!t.fix),n.R7$(1),n.SpI(" ",n.bMT(2,3,"services.health.rules."+t.id)," ")}}function fn(e,o){if(1&e&&(n.qex(0),n.j41(1,"button",49),n.bIt("click",function(a){return a.stopPropagation()}),n.nI1(2,"transloco"),n.nrm(3,"df-badge",50),n.nI1(4,"transloco"),n.k0s(),n.j41(5,"mat-menu",null,51),n.DNE(7,pn,3,5,"a",52),n.k0s(),n.bVm()),2&e){const t=n.sdS(6),a=n.XpG().ngIf;n.R7$(1),n.Y8G("matMenuTriggerFor",t),n.BMQ("aria-label",n.bMT(2,5,"services.health.whyAria")),n.R7$(2),n.Y8G("variant",a.level)("label",n.bMT(4,7,"services.health.level."+a.level)),n.R7$(4),n.Y8G("ngForOf",a.rules)}}function dn(e,o){if(1&e&&(n.nrm(0,"df-badge",50),n.nI1(1,"transloco")),2&e){const t=n.XpG(2).$implicit;n.Y8G("variant","ok"===t.probe?"success":"neutral")("label",n.bMT(1,2,"ok"===t.probe?"services.health.level.success":"unsupported"===t.probe?"services.health.chip.notChecked":"services.health.chip.checking"))}}function un(e,o){if(1&e&&(n.qex(0),n.DNE(1,fn,8,9,"ng-container",47),n.DNE(2,dn,2,4,"ng-template",null,48,n.C5r),n.bVm()),2&e){const t=o.ngIf,a=n.sdS(3);n.R7$(1),n.Y8G("ngIf",t.rules.length)("ngIfElse",a)}}function bn(e,o){if(1&e&&(n.j41(0,"td",38),n.DNE(1,un,4,2,"ng-container",4),n.k0s()),2&e){const t=o.$implicit;n.R7$(1),n.Y8G("ngIf",t.health)}}function hn(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,gn,3,3,"th",44),n.DNE(2,bn,2,1,"td",45),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function Dn(e,o){1&e&&(n.j41(0,"th",46),n.EFF(1," Scripting "),n.k0s())}function Tn(e,o){if(1&e){const t=n.RV6();n.j41(0,"td",56)(1,"fa-icon",57),n.bIt("click",function(){const c=n.eBV(t).$implicit,s=n.XpG(3).$implicit,l=n.XpG(2);let C;return n.Njj(l.goEventScriptsPage((null==s||null==(C=s.cell(c))?null:C.toString())||""))})("click",function(i){return i.stopPropagation()}),n.k0s()()}if(2&e){const t=o.$implicit,a=n.XpG(3).$implicit,i=n.XpG(2);n.R7$(1),n.HbH("not"!==(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",i.activeIcon("not"!==(null==a?null:a.cell(t))))}}function Cn(e,o){1&e&&(n.qex(0),n.DNE(1,Dn,2,0,"th",44),n.DNE(2,Tn,2,3,"td",55),n.bVm())}function Rn(e,o){1&e&&n.nrm(0,"th",59)}function In(e,o){1&e&&n.nrm(0,"td",56)}function kn(e,o){1&e&&(n.DNE(0,Rn,1,0,"th",58),n.DNE(1,In,1,0,"td",55))}function vn(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,Cn,3,0,"ng-container",47),n.DNE(2,kn,2,0,"ng-template",null,54,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG().$implicit,i=n.XpG(2);n.Y8G("matColumnDef",a.columnDef),n.R7$(1),n.Y8G("ngIf",i.isDatabase)("ngIfElse",t)}}function xn(e,o){1&e&&n.nrm(0,"th",59)}_(36225);const M=function(e){return{param:e}};function Gn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",66),n.bIt("click",function(){n.eBV(t);const i=n.XpG(3).$implicit,c=n.XpG(4);return n.Njj(c.actions.additional[0].function(i))})("click",function(i){return i.stopPropagation()}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",67),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(5,M,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.Y8G("icon",t.actions.additional[0].icon)}}function Fn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",68),n.bIt("click",function(){n.eBV(t);const i=n.XpG(3).$implicit,c=n.XpG(4);return n.Njj(c.actions.additional[0].function(i))})("click",function(i){return i.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(7,M,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,5,t.actions.additional[0].label)," ")}}function $n(e,o){if(1&e&&(n.qex(0),n.DNE(1,Gn,3,7,"button",64),n.DNE(2,Fn,4,9,"ng-template",null,65,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(6);n.R7$(1),n.Y8G("ngIf",a.actions.additional[0].icon)("ngIfElse",t)}}function Mn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",72),n.bIt("click",function(){const c=n.eBV(t).$implicit,s=n.XpG(3).$implicit;return n.Njj(c.function(s))}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=o.$implicit,a=n.XpG(3).$implicit,i=n.XpG(4);n.Y8G("disabled",i.isActionDisabled(t,a)),n.BMQ("aria-label",n.i5U(1,3,t.ariaLabel.key,n.eq3(8,M,t.ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.label)," ")}}function yn(e,o){if(1&e&&(n.j41(0,"button",69),n.bIt("click",function(a){return a.stopPropagation()}),n.nrm(1,"fa-icon",67),n.k0s(),n.j41(2,"mat-menu",null,70),n.DNE(4,Mn,4,10,"button",71),n.k0s()),2&e){const t=n.sdS(3),a=n.XpG(6);n.Y8G("matMenuTriggerFor",t),n.R7$(1),n.Y8G("icon",a.faEllipsisV),n.R7$(3),n.Y8G("ngForOf",a.actions.additional)}}function En(e,o){if(1&e&&(n.qex(0),n.DNE(1,$n,4,2,"ng-container",47),n.DNE(2,yn,5,3,"ng-template",null,63,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(5);n.R7$(1),n.Y8G("ngIf",1===a.actions.additional.length)("ngIfElse",t)}}function Nn(e,o){if(1&e&&(n.j41(0,"td",62),n.DNE(1,En,4,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(4);n.R7$(1),n.Y8G("ngIf",t.actions.additional&&t.actions.additional.length>0)}}function Sn(e,o){if(1&e&&(n.qex(0,60),n.DNE(1,xn,1,0,"th",58),n.DNE(2,Nn,2,1,"td",61),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function jn(e,o){if(1&e&&(n.qex(0),n.DNE(1,mn,3,1,"ng-container",32),n.DNE(2,hn,3,1,"ng-container",32),n.DNE(3,vn,4,3,"ng-container",32),n.DNE(4,Sn,3,1,"ng-container",33),n.bVm()),2&e){const t=o.$implicit;n.R7$(1),n.Y8G("ngIf","actions"!==t.columnDef&&"scripting"!==t.columnDef&&"health"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","health"===t.columnDef),n.R7$(1),n.Y8G("ngIf","scripting"===t.columnDef),n.R7$(1),n.Y8G("ngIf","actions"===t.columnDef)}}function Xn(e,o){1&e&&n.nrm(0,"tr",73)}function On(e,o){if(1&e){const t=n.RV6();n.j41(0,"tr",74),n.bIt("click",function(){const c=n.eBV(t).$implicit,s=n.XpG(2);return n.Njj(s.callDefaultAction(c))})("keydown",function(i){const s=n.eBV(t).$implicit,l=n.XpG(2);return n.Njj(l.handleKeyDown(i,s))}),n.k0s()}if(2&e){const t=o.$implicit,a=n.XpG(2);n.AVh("clickable",a.isClickable(t)),n.BMQ("tabindex",a.isClickable(t)?0:-1)}}function Pn(e,o){if(1&e){const t=n.RV6();n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.j41(3,"button",78),n.bIt("click",function(){n.eBV(t);const i=n.XpG(4);return n.Njj(i.clearFilter())}),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.bVm()}2&e&&(n.R7$(1),n.SpI(" ",n.bMT(2,2,"noFilterResults")," "),n.R7$(3),n.SpI(" ",n.bMT(5,4,"clearFilter")," "))}function wn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",84),n.bIt("click",function(){n.eBV(t);const i=n.XpG(6);return n.Njj(i.createRow())}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()}if(2&e){const t=n.XpG(6);n.R7$(1),n.SpI(" ",n.bMT(2,1,t.emptyStateActionLabel||"create")," ")}}function Yn(e,o){if(1&e&&(n.j41(0,"div",81)(1,"p",82),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.DNE(4,wn,3,3,"button",83),n.k0s()),2&e){const t=n.XpG(5);n.R7$(2),n.SpI(" ",n.bMT(3,2,t.emptyStateMessage)," "),n.R7$(2),n.Y8G("ngIf",t.allowCreate)}}function Vn(e,o){if(1&e&&(n.EFF(0),n.nI1(1,"transloco")),2&e){const t=n.XpG(5);n.SpI(" ",n.bMT(1,1,t.allowCreate&&0===t.tableLength?"noEntriesCreate":"noEntries")," ")}}function Bn(e,o){if(1&e&&(n.DNE(0,Yn,5,4,"div",79),n.DNE(1,Vn,2,3,"ng-template",null,80,n.C5r)),2&e){const t=n.sdS(2),a=n.XpG(4);n.Y8G("ngIf",a.emptyStateMessage)("ngIfElse",t)}}function An(e,o){if(1&e&&(n.qex(0),n.DNE(1,Pn,6,6,"ng-container",47),n.DNE(2,Bn,3,2,"ng-template",null,77,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(3);n.R7$(1),n.Y8G("ngIf",a.currentFilter.value||(null==a.accessUsage?null:a.accessUsage.filterActive))("ngIfElse",t)}}function Un(e,o){if(1&e&&(n.j41(0,"tr",75)(1,"td",76),n.DNE(2,An,4,2,"ng-container",4),n.k0s()()),2&e){const t=n.XpG(2);n.R7$(1),n.BMQ("colspan",t.columns.length),n.R7$(1),n.Y8G("ngIf","loading"!==t.tableState&&"error"!==t.tableState)}}function zn(e,o){if(1&e){const t=n.RV6();n.qex(0),n.DNE(1,W,1,0,"mat-progress-bar",16),n.DNE(2,nn,10,8,"div",17),n.j41(3,"div",18)(4,"table",19),n.bIt("matSortChange",function(i){n.eBV(t);const c=n.XpG();return n.Njj(c.announceSortChange(i))}),n.DNE(5,jn,5,4,"ng-container",20),n.DNE(6,Xn,1,0,"tr",21),n.DNE(7,On,1,3,"tr",22),n.DNE(8,Un,3,2,"tr",23),n.k0s(),n.j41(9,"div",24)(10,"mat-paginator",25),n.bIt("page",function(i){n.eBV(t);const c=n.XpG();return n.Njj(c.changePage(i))}),n.k0s()()(),n.bVm()}if(2&e){const t=o.ngIf,a=n.XpG();n.R7$(1),n.Y8G("ngIf","loading"===a.tableState),n.R7$(1),n.Y8G("ngIf","error"===a.tableState&&a.tableError),n.R7$(1),n.AVh("table-stale","loading"===a.tableState),n.R7$(1),n.Y8G("dataSource",a.dataSource),n.R7$(1),n.Y8G("ngForOf",a.columns),n.R7$(1),n.Y8G("matHeaderRowDef",a.displayedColumns),n.R7$(1),n.Y8G("matRowDefColumns",a.displayedColumns),n.R7$(3),n.Y8G("pageSize",t.currentPageSize)("pageSizeOptions",a.pageSizes)("length",a.tableLength)}}const Ln=[[["","topActions",""]]],Jn=function(e){return{currentPageSize:e}},qn=["[topActions]"];let y=class X extends Y.Py{constructor(o,t,a,i,c,s){super(t,a,i,c,s),this.crudService=o,this.actions={default:{label:"view",function:l=>{this.router.navigate([h.b.FIELDS,l.name],{relativeTo:this._activatedRoute})},ariaLabel:{key:"view"}},additional:this.actions.additional},this.columns=[{columnDef:"name",header:"schema.name",cell:l=>l.name},{columnDef:"alias",header:"schema.alias",cell:l=>l.alias},{columnDef:"type",header:"schema.type",cell:l=>l.type},{columnDef:"virtual",header:"schema.virtual",cell:l=>l.isVirtual},{columnDef:"aggregate",header:"schema.aggregate",cell:l=>l.isAggregate},{columnDef:"required",header:"schema.required",cell:l=>l.required},{columnDef:"constraints",header:"schema.constraints",cell:l=>l.constraints},{columnDef:"actions"}],this.filterQuery=(0,V.J)(),this._activatedRoute.data.subscribe(l=>{this.tableName=l.data&&l.data.name?l.data.name:""}),this.dbName=this._activatedRoute.snapshot.params.name}mapDataToTable(o){return o.map(t=>({name:t.name,alias:t.alias,type:t.type,isVirtual:t.isVirtual,isAggregate:t.isAggregate,required:t.required,constraints:this.getFieldConstraints(t)}))}getFieldConstraints(o){return o.isPrimaryKey?"schema.primaryKey":o.isForeignKey?"schema.foreignKey":""}createRow(){this.router.navigate([h.b.FIELDS,h.b.CREATE],{relativeTo:this._activatedRoute})}deleteRow(o){this.crudService.delete(`${this.dbName}/_schema/${this.tableName}/_field/${o.name}`).subscribe(()=>{this.refreshTable()})}refreshTable(){this.crudService.get(`${this.dbName}/_schema/${this.tableName}/_field`).subscribe(o=>{this.dataSource.data=this.mapDataToTable(o.resource)})}static{this.\u0275fac=function(t){return new(t||X)(n.rXU(F.qJ),n.rXU(d.Ix),n.rXU(d.nX),n.rXU(B.Ai),n.rXU(T.JO),n.rXU(R.bZ))}}static{this.\u0275cmp=n.VBU({type:X,selectors:[["df-fields-table"]],standalone:!0,features:[n.Vt3,n.aNF],ngContentSelectors:qn,decls:9,vars:9,consts:[[1,"top-action-bar"],["mat-mini-fab","","class","save-btn","data-testid","manage-table-create","type","button",3,"click",4,"ngIf"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click",4,"ngIf"],[1,"spacer"],[4,"ngIf"],["class","search-input","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["mat-mini-fab","","data-testid","manage-table-create","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click"],["class","df-usage-filter","data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",1,"df-usage-filter"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["appearance","outline","subscriptSizing","dynamic",1,"search-input"],["matInput","",3,"formControl"],["class","table-loading-bar","mode","indeterminate",4,"ngIf"],["class","table-error-panel",4,"ngIf"],[1,"table-container"],["mat-table","","matSort","",3,"dataSource","matSortChange"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"clickable","click","keydown",4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[1,"bottom-action-bar"],["showFirstLastButtons","","aria-label","'selectPage' | transloco",3,"pageSize","pageSizeOptions","length","page"],["mode","indeterminate",1,"table-loading-bar"],[1,"table-error-panel"],[1,"table-error-headline"],["size","lg",3,"icon"],["mat-stroked-button","","type","button",3,"click"],[3,"error"],[3,"matColumnDef",4,"ngIf"],["stickyEnd","",3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","df-eyebrow",3,"df-numeric",4,"matHeaderCellDef"],["mat-cell","",3,"df-numeric",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"df-eyebrow"],["mat-cell",""],["size","lg",3,"icon","class",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt"],["size","lg","class","log-warning",3,"icon",4,"ngIf"],["size","lg",1,"log-warning",3,"icon"],["mat-header-cell","","class","df-eyebrow",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell","",1,"df-eyebrow"],[4,"ngIf","ngIfElse"],["healthyChip",""],["type","button",1,"df-health-chip",3,"matMenuTriggerFor","click"],[3,"variant","label"],["healthMenu","matMenu"],["mat-menu-item","",3,"routerLink","disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"routerLink","disabled","click"],["notDatabase",""],["class","actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions"],["size","lg",3,"icon","click"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-cell",""],["stickyEnd","",3,"matColumnDef"],["class","actions df-row-actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions","df-row-actions"],["multiple",""],["class","action-btn","mat-icon-button","","type","button",3,"click",4,"ngIf","ngIfElse"],["regular",""],["mat-icon-button","","type","button",1,"action-btn",3,"click"],["size","xs",3,"icon"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-icon-button","","aria-label","Actions","type","button",3,"matMenuTriggerFor","click"],["actionsMenu","matMenu"],["type","button","mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["type","button","mat-menu-item","",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click","keydown"],[1,"mat-row","no-data-row"],[1,"mat-cell"],["noFilterActive",""],["mat-button","","color","primary","type","button",3,"click"],["class","empty-state",4,"ngIf","ngIfElse"],["genericEmpty",""],[1,"empty-state"],[1,"empty-state-message"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click"]],template:function(t,a){1&t&&(n.NAR(Ln),n.j41(0,"div",0),n.DNE(1,J,3,4,"button",1),n.DNE(2,q,3,4,"button",2),n.SdG(3),n.nrm(4,"div",3),n.DNE(5,K,2,1,"ng-container",4),n.DNE(6,Z,5,4,"mat-form-field",5),n.k0s(),n.DNE(7,zn,11,11,"ng-container",4),n.nI1(8,"async")),2&t&&(n.R7$(1),n.Y8G("ngIf",a.allowCreate),n.R7$(1),n.Y8G("ngIf",a.schema),n.R7$(3),n.Y8G("ngIf",a.accessUsage),n.R7$(1),n.Y8G("ngIf",a.allowFilter),n.R7$(1),n.Y8G("ngIf",n.eq3(7,Jn,n.bMT(8,5,a.currentPageSize$))))},dependencies:[f.bT,g.Hl,g.$z,g.iY,g.$0,I.dX,I.aY,r.tP,r.Zl,r.tL,r.ji,r.cC,r.YV,r.iL,r.KS,r.$R,r.YZ,r.NB,r.ky,f.Sq,u.Cn,u.kk,u.fb,u.Cp,m.X1,m.me,m.BC,m.l_,T.Kj,f.Jj,R.hM,k.Ou,k.iy,p.RG,p.rl,p.nJ,b.fS,b.fg,D.NQ,D.B4,D.aE,v.PO,v.HM,A.R,U.v,z.Z,x.Ve,x.VO,L.wT,d.Wk],styles:[".df-health-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;margin:0;border:none;background:transparent;font:inherit;color:inherit;cursor:pointer}.active[_ngcontent-%COMP%]{color:var(--df-success)}.inactive[_ngcontent-%COMP%], .log-warning[_ngcontent-%COMP%]{color:var(--df-danger)}.top-action-bar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--df-space-3);padding-bottom:var(--df-space-3)}.top-action-bar[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{height:80%!important;max-width:300px!important}.top-action-bar[_ngcontent-%COMP%] .df-usage-filter[_ngcontent-%COMP%]{width:160px}.bottom-action-bar[_ngcontent-%COMP%]{margin-top:var(--df-space-4);display:flex;flex-direction:row;justify-content:center}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto}.table-container.table-stale[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.table-loading-bar[_ngcontent-%COMP%]{margin-bottom:2px}.table-error-panel[_ngcontent-%COMP%]{margin-bottom:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm);background-color:var(--df-danger-soft);color:var(--df-text)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);margin-bottom:var(--df-space-2)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:1.4rem}.no-data-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--df-space-4);padding:var(--df-space-4);text-align:center}.empty-state[_ngcontent-%COMP%] .empty-state-message[_ngcontent-%COMP%]{margin:0;max-width:46rem;color:var(--df-text-muted);font-size:1.4rem;line-height:1.5}.mat-mdc-row[_ngcontent-%COMP%]{height:var(--df-row-height)!important}.mat-mdc-cell[_ngcontent-%COMP%], .mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border-2)}.mat-mdc-cell.df-numeric[_ngcontent-%COMP%], .mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%]{text-align:right}.mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{justify-content:flex-end}.df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0;transition:opacity var(--df-duration-fast) var(--df-ease-standard)}.mat-mdc-row[_ngcontent-%COMP%]:hover .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .mat-mdc-row[_ngcontent-%COMP%]:focus-within .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{opacity:1}.clickable.mat-mdc-row[_ngcontent-%COMP%]{outline:0}.clickable.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{cursor:pointer}.clickable.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-hover)}.clickable.mat-mdc-row[_ngcontent-%COMP%]:focus .mat-mdc-cell[_ngcontent-%COMP%], .clickable.mat-mdc-row[_ngcontent-%COMP%]:focus-within .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)} [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{border-bottom:unset!important}"]})}};function Hn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){n.eBV(t);const i=n.XpG();return n.Njj(i.createRow())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"newEntry")),n.R7$(2),n.Y8G("icon",t.faPlus)}}function Qn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",8),n.bIt("click",function(){n.eBV(t);const i=n.XpG();return n.Njj(i.refreshSchema())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"importList")),n.R7$(2),n.Y8G("icon",t.faRefresh)}}function Kn(e,o){if(1&e&&(n.j41(0,"mat-option",13),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=o.$implicit;n.Y8G("value",t.value),n.R7$(1),n.SpI(" ",n.bMT(2,2,t.label)," ")}}function Zn(e,o){if(1&e&&(n.j41(0,"mat-form-field",10)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"mat-select",11),n.DNE(5,Kn,3,4,"mat-option",12),n.k0s()()),2&e){const t=n.XpG().ngIf;n.R7$(2),n.JRh(n.bMT(3,3,"accessUsage.filter.label")),n.R7$(2),n.Y8G("formControl",t.filter),n.R7$(1),n.Y8G("ngForOf",t.filterOptions)}}function Wn(e,o){if(1&e&&(n.qex(0),n.DNE(1,Zn,6,5,"mat-form-field",9),n.bVm()),2&e){const t=o.ngIf;n.R7$(1),n.Y8G("ngIf",t.available)}}function nt(e,o){if(1&e&&(n.j41(0,"mat-form-field",14)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"input",15),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"search")),n.R7$(2),n.Y8G("formControl",t.currentFilter)}}function tt(e,o){1&e&&n.nrm(0,"mat-progress-bar",26)}function et(e,o){if(1&e){const t=n.RV6();n.j41(0,"div",27)(1,"div",28),n.nrm(2,"fa-icon",29),n.j41(3,"span"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.j41(6,"button",30),n.bIt("click",function(){n.eBV(t);const i=n.XpG(2);return n.Njj(i.retryLastFetch())}),n.EFF(7),n.nI1(8,"transloco"),n.k0s()(),n.nrm(9,"df-error-detail",31),n.k0s()}if(2&e){const t=n.XpG(2);n.R7$(2),n.Y8G("icon",t.faTriangleExclamation),n.R7$(2),n.JRh(n.bMT(5,4,t.tableError.message)),n.R7$(3),n.SpI(" ",n.bMT(8,6,"retry")," "),n.R7$(2),n.Y8G("error",t.tableError)}}function at(e,o){if(1&e&&(n.j41(0,"th",37),n.nI1(1,"async"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.BMQ("sortActionDescription",n.bMT(1,4,a.sortDescription(t.header))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.header)," ")}}function ot(e,o){if(1&e&&n.nrm(0,"fa-icon",29),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit,i=n.XpG(2);n.HbH(i.isCellActive(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",i.activeIcon(i.isCellActive(null==a?null:a.cell(t))))}}function it(e,o){if(1&e&&(n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,null!=a&&a.cell(t)?"confirmed":"pending")," ")}}function ct(e,o){if(1&e&&(n.qex(0),n.EFF(1),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",null==a?null:a.cell(t)," ")}}function lt(e,o){if(1&e&&n.nrm(0,"df-access-usage-cell",41),2&e){const t=n.XpG().$implicit,a=n.XpG(4);let i,c;n.Y8G("usage",null==a.accessUsage?null:a.accessUsage.get(t.id))("staleDays",null!==(i=null==a.accessUsage?null:a.accessUsage.staleDays)&&void 0!==i?i:null)("trackingStartedAt",null!==(c=null==a.accessUsage?null:a.accessUsage.trackingStartedAt)&&void 0!==c?c:null)}}function _t(e,o){if(1&e&&n.nrm(0,"fa-icon",43),2&e){const t=n.XpG(6);n.Y8G("icon",t.faTriangleExclamation)}}function rt(e,o){1&e&&(n.j41(0,"span"),n.EFF(1),n.k0s()),2&e&&(n.R7$(1),n.JRh("-"))}function st(e,o){if(1&e&&(n.qex(0),n.DNE(1,_t,1,1,"fa-icon",42),n.DNE(2,rt,2,1,"span",4),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.Y8G("ngIf",!(null==a||!a.cell(t))),n.R7$(1),n.Y8G("ngIf",!(null!=a&&a.cell(t)))}}function mt(e,o){if(1&e&&(n.j41(0,"td",38),n.DNE(1,ot,1,3,"fa-icon",39),n.DNE(2,it,3,3,"ng-container",4),n.DNE(3,ct,2,1,"ng-container",4),n.DNE(4,lt,1,3,"df-access-usage-cell",40),n.DNE(5,st,3,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.R7$(1),n.Y8G("ngIf","active"===t.columnDef),n.R7$(1),n.Y8G("ngIf","registration"===t.columnDef),n.R7$(1),n.Y8G("ngIf","active"!==t.columnDef&&"registration"!==t.columnDef&&"log"!==t.columnDef&&"lastUsed"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","lastUsed"===t.columnDef),n.R7$(1),n.Y8G("ngIf","log"===t.columnDef)}}function gt(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,at,4,8,"th",35),n.DNE(2,mt,6,7,"td",36),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function pt(e,o){if(1&e&&(n.j41(0,"th",46),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,t.header)," ")}}function ft(e,o){if(1&e&&(n.j41(0,"a",53),n.bIt("click",function(a){return a.stopPropagation()}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=o.$implicit;n.Y8G("routerLink",t.fix)("disabled",!t.fix),n.R7$(1),n.SpI(" ",n.bMT(2,3,"services.health.rules."+t.id)," ")}}function dt(e,o){if(1&e&&(n.qex(0),n.j41(1,"button",49),n.bIt("click",function(a){return a.stopPropagation()}),n.nI1(2,"transloco"),n.nrm(3,"df-badge",50),n.nI1(4,"transloco"),n.k0s(),n.j41(5,"mat-menu",null,51),n.DNE(7,ft,3,5,"a",52),n.k0s(),n.bVm()),2&e){const t=n.sdS(6),a=n.XpG().ngIf;n.R7$(1),n.Y8G("matMenuTriggerFor",t),n.BMQ("aria-label",n.bMT(2,5,"services.health.whyAria")),n.R7$(2),n.Y8G("variant",a.level)("label",n.bMT(4,7,"services.health.level."+a.level)),n.R7$(4),n.Y8G("ngForOf",a.rules)}}function ut(e,o){if(1&e&&(n.nrm(0,"df-badge",50),n.nI1(1,"transloco")),2&e){const t=n.XpG(2).$implicit;n.Y8G("variant","ok"===t.probe?"success":"neutral")("label",n.bMT(1,2,"ok"===t.probe?"services.health.level.success":"unsupported"===t.probe?"services.health.chip.notChecked":"services.health.chip.checking"))}}function bt(e,o){if(1&e&&(n.qex(0),n.DNE(1,dt,8,9,"ng-container",47),n.DNE(2,ut,2,4,"ng-template",null,48,n.C5r),n.bVm()),2&e){const t=o.ngIf,a=n.sdS(3);n.R7$(1),n.Y8G("ngIf",t.rules.length)("ngIfElse",a)}}function ht(e,o){if(1&e&&(n.j41(0,"td",38),n.DNE(1,bt,4,2,"ng-container",4),n.k0s()),2&e){const t=o.$implicit;n.R7$(1),n.Y8G("ngIf",t.health)}}function Dt(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,pt,3,3,"th",44),n.DNE(2,ht,2,1,"td",45),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function Tt(e,o){1&e&&(n.j41(0,"th",46),n.EFF(1," Scripting "),n.k0s())}function Ct(e,o){if(1&e){const t=n.RV6();n.j41(0,"td",56)(1,"fa-icon",57),n.bIt("click",function(){const c=n.eBV(t).$implicit,s=n.XpG(3).$implicit,l=n.XpG(2);let C;return n.Njj(l.goEventScriptsPage((null==s||null==(C=s.cell(c))?null:C.toString())||""))})("click",function(i){return i.stopPropagation()}),n.k0s()()}if(2&e){const t=o.$implicit,a=n.XpG(3).$implicit,i=n.XpG(2);n.R7$(1),n.HbH("not"!==(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",i.activeIcon("not"!==(null==a?null:a.cell(t))))}}function Rt(e,o){1&e&&(n.qex(0),n.DNE(1,Tt,2,0,"th",44),n.DNE(2,Ct,2,3,"td",55),n.bVm())}function It(e,o){1&e&&n.nrm(0,"th",59)}function kt(e,o){1&e&&n.nrm(0,"td",56)}function vt(e,o){1&e&&(n.DNE(0,It,1,0,"th",58),n.DNE(1,kt,1,0,"td",55))}function xt(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,Rt,3,0,"ng-container",47),n.DNE(2,vt,2,0,"ng-template",null,54,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG().$implicit,i=n.XpG(2);n.Y8G("matColumnDef",a.columnDef),n.R7$(1),n.Y8G("ngIf",i.isDatabase)("ngIfElse",t)}}function Gt(e,o){1&e&&n.nrm(0,"th",59)}y=(0,G.Cg)([(0,$.d)({checkProperties:!0})],y);const E=function(e){return{param:e}};function Ft(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",66),n.bIt("click",function(){n.eBV(t);const i=n.XpG(3).$implicit,c=n.XpG(4);return n.Njj(c.actions.additional[0].function(i))})("click",function(i){return i.stopPropagation()}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",67),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(5,E,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.Y8G("icon",t.actions.additional[0].icon)}}function $t(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",68),n.bIt("click",function(){n.eBV(t);const i=n.XpG(3).$implicit,c=n.XpG(4);return n.Njj(c.actions.additional[0].function(i))})("click",function(i){return i.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(7,E,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,5,t.actions.additional[0].label)," ")}}function Mt(e,o){if(1&e&&(n.qex(0),n.DNE(1,Ft,3,7,"button",64),n.DNE(2,$t,4,9,"ng-template",null,65,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(6);n.R7$(1),n.Y8G("ngIf",a.actions.additional[0].icon)("ngIfElse",t)}}function yt(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",72),n.bIt("click",function(){const c=n.eBV(t).$implicit,s=n.XpG(3).$implicit;return n.Njj(c.function(s))}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=o.$implicit,a=n.XpG(3).$implicit,i=n.XpG(4);n.Y8G("disabled",i.isActionDisabled(t,a)),n.BMQ("aria-label",n.i5U(1,3,t.ariaLabel.key,n.eq3(8,E,t.ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.label)," ")}}function Et(e,o){if(1&e&&(n.j41(0,"button",69),n.bIt("click",function(a){return a.stopPropagation()}),n.nrm(1,"fa-icon",67),n.k0s(),n.j41(2,"mat-menu",null,70),n.DNE(4,yt,4,10,"button",71),n.k0s()),2&e){const t=n.sdS(3),a=n.XpG(6);n.Y8G("matMenuTriggerFor",t),n.R7$(1),n.Y8G("icon",a.faEllipsisV),n.R7$(3),n.Y8G("ngForOf",a.actions.additional)}}function Nt(e,o){if(1&e&&(n.qex(0),n.DNE(1,Mt,4,2,"ng-container",47),n.DNE(2,Et,5,3,"ng-template",null,63,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(5);n.R7$(1),n.Y8G("ngIf",1===a.actions.additional.length)("ngIfElse",t)}}function St(e,o){if(1&e&&(n.j41(0,"td",62),n.DNE(1,Nt,4,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(4);n.R7$(1),n.Y8G("ngIf",t.actions.additional&&t.actions.additional.length>0)}}function jt(e,o){if(1&e&&(n.qex(0,60),n.DNE(1,Gt,1,0,"th",58),n.DNE(2,St,2,1,"td",61),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function Xt(e,o){if(1&e&&(n.qex(0),n.DNE(1,gt,3,1,"ng-container",32),n.DNE(2,Dt,3,1,"ng-container",32),n.DNE(3,xt,4,3,"ng-container",32),n.DNE(4,jt,3,1,"ng-container",33),n.bVm()),2&e){const t=o.$implicit;n.R7$(1),n.Y8G("ngIf","actions"!==t.columnDef&&"scripting"!==t.columnDef&&"health"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","health"===t.columnDef),n.R7$(1),n.Y8G("ngIf","scripting"===t.columnDef),n.R7$(1),n.Y8G("ngIf","actions"===t.columnDef)}}function Ot(e,o){1&e&&n.nrm(0,"tr",73)}function Pt(e,o){if(1&e){const t=n.RV6();n.j41(0,"tr",74),n.bIt("click",function(){const c=n.eBV(t).$implicit,s=n.XpG(2);return n.Njj(s.callDefaultAction(c))})("keydown",function(i){const s=n.eBV(t).$implicit,l=n.XpG(2);return n.Njj(l.handleKeyDown(i,s))}),n.k0s()}if(2&e){const t=o.$implicit,a=n.XpG(2);n.AVh("clickable",a.isClickable(t)),n.BMQ("tabindex",a.isClickable(t)?0:-1)}}function wt(e,o){if(1&e){const t=n.RV6();n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.j41(3,"button",78),n.bIt("click",function(){n.eBV(t);const i=n.XpG(4);return n.Njj(i.clearFilter())}),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.bVm()}2&e&&(n.R7$(1),n.SpI(" ",n.bMT(2,2,"noFilterResults")," "),n.R7$(3),n.SpI(" ",n.bMT(5,4,"clearFilter")," "))}function Yt(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",84),n.bIt("click",function(){n.eBV(t);const i=n.XpG(6);return n.Njj(i.createRow())}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()}if(2&e){const t=n.XpG(6);n.R7$(1),n.SpI(" ",n.bMT(2,1,t.emptyStateActionLabel||"create")," ")}}function Vt(e,o){if(1&e&&(n.j41(0,"div",81)(1,"p",82),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.DNE(4,Yt,3,3,"button",83),n.k0s()),2&e){const t=n.XpG(5);n.R7$(2),n.SpI(" ",n.bMT(3,2,t.emptyStateMessage)," "),n.R7$(2),n.Y8G("ngIf",t.allowCreate)}}function Bt(e,o){if(1&e&&(n.EFF(0),n.nI1(1,"transloco")),2&e){const t=n.XpG(5);n.SpI(" ",n.bMT(1,1,t.allowCreate&&0===t.tableLength?"noEntriesCreate":"noEntries")," ")}}function At(e,o){if(1&e&&(n.DNE(0,Vt,5,4,"div",79),n.DNE(1,Bt,2,3,"ng-template",null,80,n.C5r)),2&e){const t=n.sdS(2),a=n.XpG(4);n.Y8G("ngIf",a.emptyStateMessage)("ngIfElse",t)}}function Ut(e,o){if(1&e&&(n.qex(0),n.DNE(1,wt,6,6,"ng-container",47),n.DNE(2,At,3,2,"ng-template",null,77,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(3);n.R7$(1),n.Y8G("ngIf",a.currentFilter.value||(null==a.accessUsage?null:a.accessUsage.filterActive))("ngIfElse",t)}}function zt(e,o){if(1&e&&(n.j41(0,"tr",75)(1,"td",76),n.DNE(2,Ut,4,2,"ng-container",4),n.k0s()()),2&e){const t=n.XpG(2);n.R7$(1),n.BMQ("colspan",t.columns.length),n.R7$(1),n.Y8G("ngIf","loading"!==t.tableState&&"error"!==t.tableState)}}function Lt(e,o){if(1&e){const t=n.RV6();n.qex(0),n.DNE(1,tt,1,0,"mat-progress-bar",16),n.DNE(2,et,10,8,"div",17),n.j41(3,"div",18)(4,"table",19),n.bIt("matSortChange",function(i){n.eBV(t);const c=n.XpG();return n.Njj(c.announceSortChange(i))}),n.DNE(5,Xt,5,4,"ng-container",20),n.DNE(6,Ot,1,0,"tr",21),n.DNE(7,Pt,1,3,"tr",22),n.DNE(8,zt,3,2,"tr",23),n.k0s(),n.j41(9,"div",24)(10,"mat-paginator",25),n.bIt("page",function(i){n.eBV(t);const c=n.XpG();return n.Njj(c.changePage(i))}),n.k0s()()(),n.bVm()}if(2&e){const t=o.ngIf,a=n.XpG();n.R7$(1),n.Y8G("ngIf","loading"===a.tableState),n.R7$(1),n.Y8G("ngIf","error"===a.tableState&&a.tableError),n.R7$(1),n.AVh("table-stale","loading"===a.tableState),n.R7$(1),n.Y8G("dataSource",a.dataSource),n.R7$(1),n.Y8G("ngForOf",a.columns),n.R7$(1),n.Y8G("matHeaderRowDef",a.displayedColumns),n.R7$(1),n.Y8G("matRowDefColumns",a.displayedColumns),n.R7$(3),n.Y8G("pageSize",t.currentPageSize)("pageSizeOptions",a.pageSizes)("length",a.tableLength)}}const Jt=[[["","topActions",""]]],qt=function(e){return{currentPageSize:e}},Ht=["[topActions]"];let N=class O extends Y.Py{constructor(o,t,a,i,c,s){super(t,a,i,c,s),this.crudService=o,this.actions={default:{label:"view",function:l=>{this.router.navigate([h.b.RELATIONSHIPS,l.name],{relativeTo:this._activatedRoute})},ariaLabel:{key:"view"}},additional:this.actions.additional},this.columns=[{columnDef:"name",header:"schema.name",cell:l=>l.name},{columnDef:"alias",header:"schema.alias",cell:l=>l.alias},{columnDef:"type",header:"schema.type",cell:l=>l.type},{columnDef:"virtual",header:"schema.virtual",cell:l=>l.isVirtual},{columnDef:"actions"}],this.filterQuery=(0,V.J)(),this._activatedRoute.data.subscribe(l=>{this.tableName=l.data&&l.data.name?l.data.name:""}),this.dbName=this._activatedRoute.snapshot.params.name}mapDataToTable(o){return o.map(t=>({name:t.name,alias:t.alias,type:t.type,isVirtual:t.isVirtual}))}createRow(){this.router.navigate([h.b.RELATIONSHIPS,h.b.CREATE],{relativeTo:this._activatedRoute})}deleteRow(o){this.crudService.delete(`${this.dbName}/_schema/${this.tableName}/_related/${o.name}`).subscribe(()=>{this.refreshTable()})}refreshTable(){this.crudService.get(`${this.dbName}/_schema/${this.tableName}/_related`).subscribe(o=>{this.dataSource.data=this.mapDataToTable(o.resource)})}static{this.\u0275fac=function(t){return new(t||O)(n.rXU(F.qJ),n.rXU(d.Ix),n.rXU(d.nX),n.rXU(B.Ai),n.rXU(T.JO),n.rXU(R.bZ))}}static{this.\u0275cmp=n.VBU({type:O,selectors:[["df-relationships-table"]],standalone:!0,features:[n.Vt3,n.aNF],ngContentSelectors:Ht,decls:9,vars:9,consts:[[1,"top-action-bar"],["mat-mini-fab","","class","save-btn","data-testid","manage-table-create","type","button",3,"click",4,"ngIf"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click",4,"ngIf"],[1,"spacer"],[4,"ngIf"],["class","search-input","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["mat-mini-fab","","data-testid","manage-table-create","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click"],["class","df-usage-filter","data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",1,"df-usage-filter"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["appearance","outline","subscriptSizing","dynamic",1,"search-input"],["matInput","",3,"formControl"],["class","table-loading-bar","mode","indeterminate",4,"ngIf"],["class","table-error-panel",4,"ngIf"],[1,"table-container"],["mat-table","","matSort","",3,"dataSource","matSortChange"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"clickable","click","keydown",4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[1,"bottom-action-bar"],["showFirstLastButtons","","aria-label","'selectPage' | transloco",3,"pageSize","pageSizeOptions","length","page"],["mode","indeterminate",1,"table-loading-bar"],[1,"table-error-panel"],[1,"table-error-headline"],["size","lg",3,"icon"],["mat-stroked-button","","type","button",3,"click"],[3,"error"],[3,"matColumnDef",4,"ngIf"],["stickyEnd","",3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","df-eyebrow",3,"df-numeric",4,"matHeaderCellDef"],["mat-cell","",3,"df-numeric",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"df-eyebrow"],["mat-cell",""],["size","lg",3,"icon","class",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt"],["size","lg","class","log-warning",3,"icon",4,"ngIf"],["size","lg",1,"log-warning",3,"icon"],["mat-header-cell","","class","df-eyebrow",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell","",1,"df-eyebrow"],[4,"ngIf","ngIfElse"],["healthyChip",""],["type","button",1,"df-health-chip",3,"matMenuTriggerFor","click"],[3,"variant","label"],["healthMenu","matMenu"],["mat-menu-item","",3,"routerLink","disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"routerLink","disabled","click"],["notDatabase",""],["class","actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions"],["size","lg",3,"icon","click"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-cell",""],["stickyEnd","",3,"matColumnDef"],["class","actions df-row-actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions","df-row-actions"],["multiple",""],["class","action-btn","mat-icon-button","","type","button",3,"click",4,"ngIf","ngIfElse"],["regular",""],["mat-icon-button","","type","button",1,"action-btn",3,"click"],["size","xs",3,"icon"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-icon-button","","aria-label","Actions","type","button",3,"matMenuTriggerFor","click"],["actionsMenu","matMenu"],["type","button","mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["type","button","mat-menu-item","",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click","keydown"],[1,"mat-row","no-data-row"],[1,"mat-cell"],["noFilterActive",""],["mat-button","","color","primary","type","button",3,"click"],["class","empty-state",4,"ngIf","ngIfElse"],["genericEmpty",""],[1,"empty-state"],[1,"empty-state-message"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click"]],template:function(t,a){1&t&&(n.NAR(Jt),n.j41(0,"div",0),n.DNE(1,Hn,3,4,"button",1),n.DNE(2,Qn,3,4,"button",2),n.SdG(3),n.nrm(4,"div",3),n.DNE(5,Wn,2,1,"ng-container",4),n.DNE(6,nt,5,4,"mat-form-field",5),n.k0s(),n.DNE(7,Lt,11,11,"ng-container",4),n.nI1(8,"async")),2&t&&(n.R7$(1),n.Y8G("ngIf",a.allowCreate),n.R7$(1),n.Y8G("ngIf",a.schema),n.R7$(3),n.Y8G("ngIf",a.accessUsage),n.R7$(1),n.Y8G("ngIf",a.allowFilter),n.R7$(1),n.Y8G("ngIf",n.eq3(7,qt,n.bMT(8,5,a.currentPageSize$))))},dependencies:[f.bT,g.Hl,g.$z,g.iY,g.$0,I.dX,I.aY,r.tP,r.Zl,r.tL,r.ji,r.cC,r.YV,r.iL,r.KS,r.$R,r.YZ,r.NB,r.ky,f.Sq,u.Cn,u.kk,u.fb,u.Cp,m.X1,m.me,m.BC,m.l_,T.Kj,f.Jj,R.hM,k.Ou,k.iy,p.RG,p.rl,p.nJ,b.fS,b.fg,D.NQ,D.B4,D.aE,v.PO,v.HM,A.R,U.v,z.Z,x.Ve,x.VO,L.wT,d.Wk],styles:[".df-health-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;margin:0;border:none;background:transparent;font:inherit;color:inherit;cursor:pointer}.active[_ngcontent-%COMP%]{color:var(--df-success)}.inactive[_ngcontent-%COMP%], .log-warning[_ngcontent-%COMP%]{color:var(--df-danger)}.top-action-bar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--df-space-3);padding-bottom:var(--df-space-3)}.top-action-bar[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{height:80%!important;max-width:300px!important}.top-action-bar[_ngcontent-%COMP%] .df-usage-filter[_ngcontent-%COMP%]{width:160px}.bottom-action-bar[_ngcontent-%COMP%]{margin-top:var(--df-space-4);display:flex;flex-direction:row;justify-content:center}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto}.table-container.table-stale[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.table-loading-bar[_ngcontent-%COMP%]{margin-bottom:2px}.table-error-panel[_ngcontent-%COMP%]{margin-bottom:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm);background-color:var(--df-danger-soft);color:var(--df-text)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);margin-bottom:var(--df-space-2)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:1.4rem}.no-data-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--df-space-4);padding:var(--df-space-4);text-align:center}.empty-state[_ngcontent-%COMP%] .empty-state-message[_ngcontent-%COMP%]{margin:0;max-width:46rem;color:var(--df-text-muted);font-size:1.4rem;line-height:1.5}.mat-mdc-row[_ngcontent-%COMP%]{height:var(--df-row-height)!important}.mat-mdc-cell[_ngcontent-%COMP%], .mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border-2)}.mat-mdc-cell.df-numeric[_ngcontent-%COMP%], .mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%]{text-align:right}.mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{justify-content:flex-end}.df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0;transition:opacity var(--df-duration-fast) var(--df-ease-standard)}.mat-mdc-row[_ngcontent-%COMP%]:hover .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .mat-mdc-row[_ngcontent-%COMP%]:focus-within .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{opacity:1}.clickable.mat-mdc-row[_ngcontent-%COMP%]{outline:0}.clickable.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{cursor:pointer}.clickable.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-hover)}.clickable.mat-mdc-row[_ngcontent-%COMP%]:focus .mat-mdc-cell[_ngcontent-%COMP%], .clickable.mat-mdc-row[_ngcontent-%COMP%]:focus-within .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)} [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{border-bottom:unset!important}"]})}};N=(0,G.Cg)([(0,$.d)({checkProperties:!0})],N);var S=_(96850),Qt=_(63281),Kt=_(19468),Zt=_(52608),Wt=_(52868);function ne(e,o){1&e&&(n.j41(0,"mat-error"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(1),n.SpI(" ",n.bMT(2,1,"schema.alerts.tableNameError")," "))}function te(e,o){if(1&e&&(n.j41(0,"div",19)(1,"h2"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"df-fields-table",20),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"schema.fields")),n.R7$(2),n.Y8G("tableData",t.tableFields)}}function ee(e,o){if(1&e&&(n.j41(0,"div",21)(1,"h2"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"df-relationships-table",20),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"schema.relationships.heading")),n.R7$(2),n.Y8G("tableData",t.tableRelated)}}function ae(e,o){1&e&&(n.j41(0,"span"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(1),n.JRh(n.bMT(2,1,"update")))}function oe(e,o){1&e&&(n.j41(0,"span"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(1),n.JRh(n.bMT(2,1,"save")))}function ie(e,o){1&e&&(n.j41(0,"span"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(1),n.JRh(n.bMT(2,1,"update")))}function ce(e,o){1&e&&(n.j41(0,"span"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(1),n.JRh(n.bMT(2,1,"save")))}let j=class P{constructor(o,t,a,i,c,s){this.crudService=o,this.fb=t,this.activatedRoute=a,this.breakpointService=i,this.router=c,this.themeService=s,this.jsonData=new m.MJ,this.AceEditorMode=Kt.Q,this.isDarkMode=this.themeService.darkMode$,this.tableDetailsForm=this.fb.group({name:["",m.k0.required],alias:[null],label:[null],plural:[null],description:[null]})}ngOnInit(){this.activatedRoute.data.subscribe(o=>{this.dbName=this.activatedRoute.snapshot.params.name,this.type=o.type,this.jsonData.setValue(JSON.stringify(o.data,null,2)),"edit"===this.type&&(this.tableDetailsForm.patchValue({name:o.data.name,alias:o.data.alias,label:o.data.label,plural:o.data.plural,description:o.data.description}),this.tableDetailsForm.get("name")?.disable(),this.tableFields=o.data.field,this.tableRelated=o.data.related,this.access=o.data.access,this.primaryKey=o.data.primaryKey,console.log(o.data))})}goBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}save(o){let t;if(o)try{t=JSON.parse(o)}catch{return}else{if(this.tableDetailsForm.invalid)return;t=this.tableDetailsForm.value,t.field=[{alias:null,name:"id",label:"Id",description:null,native:[],type:"id",dbType:null,length:null,precision:null,scale:null,default:null,required:!1,allowNull:!1,fixedLength:!1,supportsMultibyte:!1,autoIncrement:!0,isPrimaryKey:!1,isUnique:!1,isIndex:!1,isForeignKey:!1,refTable:null,refField:null,refOnUpdate:null,refOnDelete:null,picklist:null,validation:null,dbFunction:null,isVirtual:!1,isAggregate:!1}]}if("create"===this.type)this.crudService.create({resource:[t]},{snackbarSuccess:"schema.alerts.createSuccess",fields:"*"},`${this.dbName}/_schema`).subscribe(i=>{this.router.navigate(["../",i.resource[0].name],{relativeTo:this.activatedRoute})});else if("edit"===this.type){const a=this.tableDetailsForm.get("name")?.value,c={...this.tableDetailsForm.getRawValue(),access:this.access,primary_key:this.primaryKey};this.crudService.patch(`${this.dbName}/_schema/${a}`,c,{snackbarSuccess:"schema.alerts.updateSuccess"}).subscribe(()=>{this.goBack()})}}static{this.\u0275fac=function(t){return new(t||P)(n.rXU(F.qJ),n.rXU(m.ok),n.rXU(d.nX),n.rXU(Zt.R),n.rXU(d.Ix),n.rXU(Wt.n))}}static{this.\u0275cmp=n.VBU({type:P,selectors:[["df-table-details"]],standalone:!0,features:[n.aNF],decls:50,vars:38,consts:[["dynamicHeight","","mat-stretch-tabs","false","mat-align-tabs","start","animationDuration","0ms"],[3,"label"],[1,"details-section",3,"formGroup","ngSubmit"],["appearance","outline",1,"dynamic-width"],["matInput","","formControlName","name","required",""],[4,"ngIf"],["matInput","","formControlName","alias"],["matInput","","formControlName","label"],["matInput","","formControlName","plural"],["appearance","outline","subscriptSizing","dynamic"],["matInput","","formControlName","description"],["class","full-width",4,"ngIf"],["class","full-width margin-2-0",4,"ngIf"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],["mat-flat-button","",1,"save-btn"],["label","JSON"],[3,"mode","formControl"],["mat-flat-button","",1,"save-btn",3,"click"],[1,"full-width"],[3,"tableData"],[1,"full-width","margin-2-0"]],template:function(t,a){1&t&&(n.j41(0,"div")(1,"mat-tab-group",0)(2,"mat-tab",1),n.nI1(3,"transloco"),n.j41(4,"form",2),n.bIt("ngSubmit",function(){return a.save()}),n.nI1(5,"async"),n.j41(6,"mat-form-field",3)(7,"mat-label"),n.EFF(8),n.nI1(9,"transloco"),n.k0s(),n.nrm(10,"input",4),n.DNE(11,ne,3,3,"mat-error",5),n.k0s(),n.j41(12,"mat-form-field",3)(13,"mat-label"),n.EFF(14),n.nI1(15,"transloco"),n.k0s(),n.nrm(16,"input",6),n.k0s(),n.j41(17,"mat-form-field",3)(18,"mat-label"),n.EFF(19),n.nI1(20,"transloco"),n.k0s(),n.nrm(21,"input",7),n.k0s(),n.j41(22,"mat-form-field",3)(23,"mat-label"),n.EFF(24),n.nI1(25,"transloco"),n.k0s(),n.nrm(26,"input",8),n.k0s(),n.j41(27,"mat-form-field",9)(28,"mat-label"),n.EFF(29),n.nI1(30,"transloco"),n.k0s(),n.nrm(31,"input",10),n.k0s(),n.DNE(32,te,5,4,"div",11),n.DNE(33,ee,5,4,"div",12),n.j41(34,"div",13)(35,"button",14),n.bIt("click",function(){return a.goBack()}),n.EFF(36),n.nI1(37,"transloco"),n.k0s(),n.j41(38,"button",15),n.DNE(39,ae,3,3,"span",5),n.DNE(40,oe,3,3,"span",5),n.k0s()()()(),n.j41(41,"mat-tab",16),n.nrm(42,"df-ace-editor",17),n.j41(43,"div",13)(44,"button",14),n.bIt("click",function(){return a.goBack()}),n.EFF(45),n.nI1(46,"transloco"),n.k0s(),n.j41(47,"button",18),n.bIt("click",function(){return a.save(a.jsonData.getRawValue())}),n.DNE(48,ie,3,3,"span",5),n.DNE(49,ce,3,3,"span",5),n.k0s()()()()()),2&t&&(n.R7$(2),n.FS9("label",n.bMT(3,20,"schema.table")),n.R7$(2),n.AVh("x-small",n.bMT(5,22,a.breakpointService.isXSmallScreen)),n.Y8G("formGroup",a.tableDetailsForm),n.R7$(4),n.SpI(" ",n.bMT(9,24,"schema.tableName")," "),n.R7$(3),n.Y8G("ngIf",a.tableDetailsForm.controls.name.hasError("required")),n.R7$(3),n.SpI(" ",n.bMT(15,26,"schema.alias")," "),n.R7$(5),n.SpI(" ",n.bMT(20,28,"schema.label")," "),n.R7$(5),n.SpI(" ",n.bMT(25,30,"schema.plural")," "),n.R7$(5),n.SpI(" ",n.bMT(30,32,"schema.description")," "),n.R7$(3),n.Y8G("ngIf","edit"===a.type),n.R7$(1),n.Y8G("ngIf","edit"===a.type),n.R7$(3),n.SpI(" ",n.bMT(37,34,"cancel")," "),n.R7$(3),n.Y8G("ngIf","edit"===a.type),n.R7$(1),n.Y8G("ngIf","create"===a.type),n.R7$(2),n.Y8G("mode",a.AceEditorMode.JSON)("formControl",a.jsonData),n.R7$(3),n.SpI(" ",n.bMT(46,36,"cancel")," "),n.R7$(3),n.Y8G("ngIf","edit"===a.type),n.R7$(1),n.Y8G("ngIf","create"===a.type))},dependencies:[g.Hl,g.$z,m.X1,m.qT,m.me,m.BC,m.cb,m.YS,m.l_,m.j4,m.JD,p.RG,p.rl,p.nJ,p.TL,b.fS,b.fg,T.Kj,f.bT,y,N,f.Jj,S.RI,S.mq,S.T8,Qt.s],styles:[".json-area[_ngcontent-%COMP%]{min-height:400px}h2[_ngcontent-%COMP%]{margin:8px 0 12px;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}df-ace-editor[_ngcontent-%COMP%]{display:block;border:1px solid var(--df-border);border-radius:var(--df-radius-sm);overflow:hidden}.action-bar[_ngcontent-%COMP%]{justify-content:flex-end;gap:12px;margin-top:8px;border-top:1px solid var(--df-border-2)}"]})}};j=(0,G.Cg)([(0,$.d)({checkProperties:!0})],j)}}]); \ No newline at end of file diff --git a/dist/214.676648eec53f0ec7.js b/dist/214.676648eec53f0ec7.js deleted file mode 100644 index 289a6860..00000000 --- a/dist/214.676648eec53f0ec7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[214],{214:(u,o,t)=>{t.r(o),t.d(o,{DfAdminSettingsOverviewComponent:()=>d});var r=t(18331),c=t(95969),e=t(16994),a=t(1843);let d=(()=>{class s{constructor(){this.actions=[{label:"Create admin",route:`/${e.b.ADMIN_SETTINGS}/${e.b.ADMINS}/${e.b.CREATE}`,icon:"person_add",primary:!0},{label:"Create user",route:`/${e.b.ADMIN_SETTINGS}/${e.b.USERS}/${e.b.CREATE}`,icon:"group_add"}],this.groups=[{title:"People",cards:[{icon:"supervisor_account",title:"Admins",text:"Manage administrator accounts for this DreamFactory instance.",route:`/${e.b.ADMIN_SETTINGS}/${e.b.ADMINS}`,action:"Manage admins",category:"admin"},{icon:"groups",title:"Users",text:"Create, edit, and review users that authenticate into DreamFactory.",route:`/${e.b.ADMIN_SETTINGS}/${e.b.USERS}`,action:"Manage users",category:"admin"}]},{title:"Data management",cards:[{icon:"schema",title:"Schema",text:"Review database services, tables, fields, and relationships.",route:`/${e.b.ADMIN_SETTINGS}/${e.b.SCHEMA}`,action:"Manage schema",category:"data"},{icon:"folder",title:"Files",text:"Browse configured file service containers and stored objects.",route:`/${e.b.ADMIN_SETTINGS}/${e.b.FILES}`,action:"Browse files",category:"data"}]},{title:"Diagnostics",cards:[{icon:"article",title:"Logs",text:"Open the existing log file browser for troubleshooting.",route:`/${e.b.ADMIN_SETTINGS}/${e.b.LOGS}`,action:"View logs",category:"docs"}]}],this.notes=[{icon:"admin_panel_settings",title:"Admins are separate",text:"Administrator accounts are managed separately from ordinary users and app roles."},{icon:"table_chart",title:"Schema follows services",text:"Schema tools are available for database services configured in this instance."},{icon:"bug_report",title:"Logs stay here too",text:"Logs also appear under System so operators can find them without retraining current users."}]}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=a.VBU({type:s,selectors:[["df-admin-settings-overview"]],standalone:!0,features:[a.aNF],decls:1,vars:3,consts:[["eyebrow","Admin settings","title","Manage people, data, and diagnostics","description","Use this area for administrator accounts, users, schema work, files, and the existing diagnostic log viewer.",3,"actions","groups","notes"]],template:function(n,i){1&n&&a.nrm(0,"df-section-landing",0),2&n&&a.Y8G("actions",i.actions)("groups",i.groups)("notes",i.notes)},dependencies:[r.MD,c.G],encapsulation:2})}}return s})()}}]); \ No newline at end of file diff --git a/dist/2245.98d37c4d761c438a.js b/dist/2245.98d37c4d761c438a.js new file mode 100644 index 00000000..1fbefefe --- /dev/null +++ b/dist/2245.98d37c4d761c438a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2245],{12245:(j,I,r)=>{r.r(I),r.d(I,{DfAppDetailsComponent:()=>P});var i=r(10467),F=r(31635),l=r(89417),g=r(95245),m=r(24784),E=r(82798),v=r(5951),R=r(20060),C=r(88834),p=r(25596),b=r(30450),c=r(86600),_=r(60850),d=r(60177),$=r(99631),h=r(32102),A=r(45383),G=r(33609),L=r(14823),x=r(49894),U=r(16453),D=r(99437),k=r(7673),y=r(18810),T=r(95753),B=r(51425),Y=r(15735),M=r(49910),S=r(23472),t=r(17705),K=r(82298),N=r(52868),W=r(43615);r(36225);const w=["rolesInput"];function X(a,n){1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.createApp.applicationName.error")," "))}function J(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.name.getError("server"))," ")}}function V(a,n){if(1&a&&(t.j41(0,"mat-option",35),t.EFF(1),t.k0s()),2&a){const e=n.$implicit;t.Y8G("value",e),t.R7$(1),t.SpI(" ",e.name," ")}}function z(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.defaultRole.getError("server"))," ")}}function H(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.description.getError("server"))," ")}}const Q=function(){return{"word-break":"break-all"}};function Z(a,n){if(1&a){const e=t.RV6();t.j41(0,"mat-card",36)(1,"mat-card-header")(2,"mat-card-subtitle"),t.EFF(3),t.nI1(4,"transloco"),t.k0s()(),t.j41(5,"mat-card-content"),t.EFF(6),t.k0s(),t.j41(7,"mat-card-actions")(8,"button",37),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.copyApiKey())}),t.nrm(9,"fa-icon",38),t.EFF(10),t.nI1(11,"transloco"),t.k0s(),t.j41(12,"button",39),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.refreshApiKey())}),t.nrm(13,"fa-icon",38),t.EFF(14),t.nI1(15,"transloco"),t.k0s()()()}if(2&a){const e=t.XpG();t.Aen(t.lJ4(15,Q)),t.R7$(3),t.JRh(t.bMT(4,9,"apps.createApp.apiKey.label")),t.R7$(3),t.SpI(" ",e.editApp.apiKey," "),t.R7$(3),t.Y8G("icon",e.faCopy),t.R7$(1),t.SpI(" ",t.bMT(11,11,"apps.createApp.apiKey.copy")," "),t.R7$(2),t.Y8G("disabled",e.disableKeyRefresh),t.R7$(1),t.Y8G("icon",e.faRefresh),t.R7$(1),t.SpI(" ",t.bMT(15,13,"apps.createApp.apiKey.refresh")," ")}}function q(a,n){if(1&a&&(t.j41(0,"mat-form-field",43)(1,"mat-label"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.j41(4,"mat-select",44)(5,"mat-option",35),t.EFF(6),t.nI1(7,"transloco"),t.k0s(),t.j41(8,"mat-option",35),t.EFF(9),t.nI1(10,"transloco"),t.k0s()(),t.nrm(11,"fa-icon",4),t.nI1(12,"transloco"),t.k0s()),2&a){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,7,"apps.createApp.appLocation.options.fileStorage.storageService.label")),t.R7$(3),t.Y8G("value",3),t.R7$(1),t.SpI(" ",t.bMT(7,9,"apps.createApp.appLocation.options.fileStorage.storageService.options.file")," "),t.R7$(2),t.Y8G("value",4),t.R7$(1),t.SpI(" ",t.bMT(10,11,"apps.createApp.appLocation.options.fileStorage.storageService.options.log")," "),t.R7$(2),t.Y8G("icon",e.faCircleInfo)("matTooltip",t.bMT(12,13,"apps.createApp.appLocation.options.fileStorage.storageService.tooltip"))}}function tt(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG(3);t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.storageContainer.getError("server"))," ")}}function et(a,n){if(1&a&&(t.j41(0,"mat-form-field",43)(1,"mat-label"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.nrm(4,"input",45),t.nI1(5,"transloco"),t.DNE(6,tt,3,3,"mat-error",5),t.nrm(7,"fa-icon",4),t.nI1(8,"transloco"),t.k0s()),2&a){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,5,"apps.createApp.appLocation.options.fileStorage.storageFolder.label")),t.R7$(2),t.FS9("placeholder",t.bMT(5,7,"apps.createApp.appLocation.options.fileStorage.storageFolder.placeholder")),t.R7$(2),t.Y8G("ngIf",e.appForm.controls.storageContainer.hasError("server")),t.R7$(1),t.Y8G("icon",e.faCircleInfo)("matTooltip",t.bMT(8,9,"apps.createApp.appLocation.options.fileStorage.storageFolder.tooltip"))}}function at(a,n){1&a&&(t.j41(0,"mat-label"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.createApp.appLocation.options.fileStorage.launchPath.label")," "))}function nt(a,n){1&a&&(t.j41(0,"mat-label"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.createApp.appLocation.options.webServer.pathToApp.label")," "))}function ot(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG(3);t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.path.getError("server"))," ")}}function rt(a,n){if(1&a&&(t.j41(0,"mat-form-field",43),t.DNE(1,at,3,3,"mat-label",5),t.DNE(2,nt,3,3,"mat-label",5),t.nrm(3,"input",46),t.nI1(4,"transloco"),t.DNE(5,ot,3,3,"mat-error",5),t.nrm(6,"fa-icon",4),t.nI1(7,"transloco"),t.k0s()),2&a){const e=t.XpG(2);t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","3"===e.appForm.controls.appLocation.value),t.R7$(1),t.FS9("placeholder",t.bMT(4,6,"apps.createApp.appLocation.options.fileStorage.launchPath.placeholder")),t.R7$(2),t.Y8G("ngIf",e.appForm.controls.path.hasError("server")),t.R7$(1),t.Y8G("icon",e.faCircleInfo)("matTooltip",t.bMT(7,8,"apps.createApp.appLocation.options."+("1"===e.appForm.controls.appLocation.value?"fileStorage.launchPath":"webServer.pathToApp")+".tooltip"))}}function it(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG(3);t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.url.getError("server"))," ")}}function st(a,n){if(1&a&&(t.j41(0,"mat-form-field",43)(1,"mat-label"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.nrm(4,"input",47),t.nI1(5,"transloco"),t.DNE(6,it,3,3,"mat-error",5),t.nrm(7,"fa-icon",4),t.nI1(8,"transloco"),t.k0s()),2&a){const e=t.XpG(2);t.R7$(2),t.SpI(" ",t.bMT(3,5,"apps.createApp.appLocation.options.remoteUrl.label")," "),t.R7$(2),t.FS9("placeholder",t.bMT(5,7,"apps.createApp.appLocation.options.fileStorage.launchPath.placeholder")),t.R7$(2),t.Y8G("ngIf",e.appForm.controls.url.hasError("server")),t.R7$(1),t.Y8G("icon",e.faCircleInfo)("matTooltip",t.bMT(8,9,"apps.createApp.appLocation.options.remoteUrl.url.tooltip"))}}function pt(a,n){if(1&a){const e=t.RV6();t.j41(0,"mat-card",48)(1,"mat-card-header")(2,"mat-card-subtitle"),t.EFF(3),t.nI1(4,"transloco"),t.k0s()(),t.j41(5,"mat-card-content"),t.EFF(6),t.k0s(),t.j41(7,"mat-card-actions")(8,"button",49),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.copyAppUrl())}),t.nrm(9,"fa-icon",50),t.EFF(10),t.nI1(11,"transloco"),t.k0s()()()}if(2&a){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,4,"apps.createApp.appLocation.options.urlPath.label")),t.R7$(3),t.SpI(" ",e.getAppLocationUrl()," "),t.R7$(3),t.Y8G("icon",e.faCopy),t.R7$(1),t.SpI(" ",t.bMT(11,6,"apps.createApp.appLocation.options.urlPath.copy")," ")}}function lt(a,n){if(1&a&&(t.j41(0,"div",40),t.DNE(1,q,13,15,"mat-form-field",41),t.DNE(2,et,9,11,"mat-form-field",41),t.DNE(3,rt,8,10,"mat-form-field",41),t.DNE(4,st,9,11,"mat-form-field",41),t.DNE(5,pt,12,8,"mat-card",42),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value||"3"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","2"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value||"3"===e.appForm.controls.appLocation.value)}}const ct=function(a){return{role:a}};function mt(a,n){if(1&a&&(t.j41(0,"p",51),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.SpI(" ",t.i5U(2,1,"apps.metering.reachHintRole",t.eq3(4,ct,null==e.appForm.value.defaultRole?null:e.appForm.value.defaultRole.name))," ")}}function _t(a,n){1&a&&(t.j41(0,"p",51),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.metering.reachHintPending")," "))}const dt=function(a){return{period:a}};function ft(a,n){if(1&a&&(t.j41(0,"div",53)(1,"div",54)(2,"span",55),t.EFF(3),t.k0s(),t.j41(4,"span",56),t.EFF(5),t.nI1(6,"transloco"),t.k0s()(),t.j41(7,"div",57),t.nrm(8,"div",58),t.k0s()()),2&a){const e=n.$implicit;t.HbH("df-meter--"+e.variant),t.R7$(3),t.JRh(e.name),t.R7$(2),t.Lme("",e.label," ",t.i5U(6,7,"apps.metering.perPeriod",t.eq3(10,dt,e.period)),""),t.R7$(3),t.xc7("width",100*e.ratio,"%")}}function ut(a,n){if(1&a&&(t.qex(0),t.DNE(1,ft,9,12,"div",52),t.bVm()),2&a){const e=t.XpG();t.R7$(1),t.Y8G("ngForOf",e.roleLimits)}}function gt(a,n){1&a&&(t.j41(0,"p",51),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.metering.limitsEmpty")," "))}function ht(a,n){if(1&a&&(t.j41(0,"div",61)(1,"div",62)(2,"span",63),t.EFF(3),t.nI1(4,"number"),t.k0s(),t.j41(5,"span",64),t.EFF(6),t.nI1(7,"transloco"),t.k0s()(),t.j41(8,"div",62)(9,"span",63),t.EFF(10),t.nI1(11,"currency"),t.k0s(),t.j41(12,"span",64),t.EFF(13),t.nI1(14,"transloco"),t.k0s()(),t.j41(15,"div",62)(16,"span",63),t.EFF(17),t.nI1(18,"number"),t.k0s(),t.j41(19,"span",64),t.EFF(20),t.nI1(21,"transloco"),t.k0s()()()),2&a){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,6,e.keyUsage.tokens)),t.R7$(3),t.JRh(t.bMT(7,8,"apps.metering.tokensLabel")),t.R7$(4),t.JRh(t.ii3(11,10,e.keyUsage.spend,"USD","symbol","1.2-2")),t.R7$(3),t.JRh(t.bMT(14,15,"apps.metering.spendLabel")),t.R7$(4),t.JRh(t.bMT(18,17,e.keyUsage.requests)),t.R7$(3),t.JRh(t.bMT(21,19,"apps.metering.requestsLabel"))}}function vt(a,n){1&a&&(t.j41(0,"p",51),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.metering.usageEmpty")," "))}function Mt(a,n){if(1&a&&(t.j41(0,"div",24)(1,"h3"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.DNE(4,ht,22,21,"div",59),t.DNE(5,vt,3,3,"ng-template",null,60,t.C5r),t.k0s()),2&a){const e=t.sdS(6),o=t.XpG();t.R7$(2),t.JRh(t.bMT(3,3,"apps.metering.usageTitle")),t.R7$(2),t.Y8G("ngIf",o.keyUsage)("ngIfElse",e)}}function It(a,n){1&a&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.JRh(t.bMT(2,1,"save")))}function Et(a,n){1&a&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.JRh(t.bMT(2,1,"create")))}let P=class O{constructor(n,e,o,s,f,u,Rt,Ct,bt){this.fb=n,this.appsService=e,this.limitService=o,this.usageService=s,this.systemConfigDataService=f,this.activatedRoute=u,this.router=Rt,this.themeService=Ct,this.snackbarService=bt,this.roles=[],this.filteredRoles=[],this.trackById=(At,Dt)=>Dt.id,this.faCopy=A.jPR,this.faCircleInfo=A.mEO,this.faRefresh=A.Vpu,this.alertMsg="",this.showAlert=!1,this.alertType="error",this.selectedRoleId=null,this.roleLimits=[],this.keyUsage=null,this.limitsRoute=["/",S.b.API_SECURITY,S.b.RATE_LIMITING],this.allLimits=[],this.isDarkMode=this.themeService.darkMode$,this.urlOrigin=window.location.origin,this.appForm=this.fb.group({name:["",l.k0.required],description:[""],defaultRole:[null],active:[!1],appLocation:["0"],storageServiceId:[3],storageContainer:["applications"],path:[""],url:[""]})}ngOnInit(){this.activatedRoute.data.subscribe(({roles:n,appData:e})=>{this.roles=n.resource||[],this.filteredRoles=n.resource||[],this.editApp=e||null}),this.snackbarService.setSnackbarLastEle(this.editApp.name,!0),this.editApp&&this.appForm.patchValue({name:this.editApp.name,description:this.editApp.description,defaultRole:this.editApp.roleByRoleId,active:this.editApp.isActive,appLocation:`${this.editApp.type}`,storageServiceId:this.editApp.storageServiceId,storageContainer:this.editApp.storageContainer,path:this.editApp.path,url:this.editApp.url}),this.appForm.controls.appLocation.valueChanges.subscribe(n=>{const e=this.appForm.get("path"),o=this.appForm.get("url");"2"===n?(e?.clearValidators(),o?.setValidators([l.k0.required])):"3"===n&&(e?.setValidators([l.k0.required]),o?.clearValidators()),e?.updateValueAndValidity(),o?.updateValueAndValidity()}),this.appForm.controls.storageServiceId.updateValueAndValidity(),this.selectedRoleId=this.editApp?.roleId??null,this.appForm.controls.defaultRole.valueChanges.subscribe(n=>{this.selectedRoleId=n?.id??null,this.recomputeRoleLimits()}),this.loadMetering()}loadMetering(){if(this.limitService.getAll({limit:0,related:"limit_cache_by_limit_id"}).pipe((0,D.W)(()=>(0,k.of)({resource:[],meta:{count:0}}))).subscribe(n=>{this.allLimits=n.resource??[],this.recomputeRoleLimits()}),null!=this.editApp?.id){const n=this.editApp.id;this.usageService.loadAll("30d").pipe((0,D.W)(()=>(0,k.of)(null))).subscribe(e=>{const o=e?.raw.by_app?.find(s=>s.app_id===n);this.keyUsage=o?{tokens:(0,M.n)(o.input_tokens)+(0,M.n)(o.output_tokens),spend:(0,M.n)(o.cost_usd),requests:(0,M.n)(o.requests)}:null})}}recomputeRoleLimits(){const n=this.selectedRoleId;this.roleLimits=null!=n?this.allLimits.filter(e=>e.isActive&&e.roleId===n).map(e=>this.toMeter(e)).filter(e=>null!==e):[]}toMeter(n){const e=n.limitCacheByLimitId?.[0],o=e?.max??n.rate;if(!o||o<=0)return null;const s=e?.attempts??0,f=Math.max(0,Math.min(1,s/o));let u="ok";return f>=.9?u="danger":f>=.75&&(u="warning"),{name:n.name,consumed:s,cap:o,ratio:f,period:n.period,variant:u,label:`${s} / ${o}`}}filter(){const n=this.rolesInput.nativeElement.value.toLowerCase();this.filteredRoles=this.roles.filter(e=>e.name.toLowerCase().includes(n))}displayFn(n){return n&&n.name?n.name:""}getAppLocationUrl(){return`${this.urlOrigin}/\n ${"1"===this.appForm.value.appLocation&&3===this.appForm.value.storageServiceId?"file/":""}\n ${"1"===this.appForm.value.appLocation&&4===this.appForm.value.storageServiceId?"log/":""}\n ${"1"===this.appForm.value.appLocation?this.appForm.value.storageContainer+"/":""}\n ${this.appForm.value.path}`.replaceAll(/\s/g,"")}copyApiKey(){navigator.clipboard.writeText(this.editApp.apiKey).then().catch(n=>console.error(n))}copyAppUrl(){const n=this.getAppLocationUrl();navigator.clipboard.writeText(n).then().catch(e=>console.error(e))}triggerAlert(n,e){this.alertType=n,this.alertMsg=e,this.showAlert=!0}goBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}save(){if(this.appForm.invalid)return;const n={name:this.appForm.value.name,description:this.appForm.value.description,type:this.appForm.value.appLocation,role_id:this.appForm.value.defaultRole?this.appForm.value.defaultRole.id:null,is_active:this.appForm.value.active,url:"2"===this.appForm.value.appLocation?this.appForm.value.url:null,storage_service_id:"1"===this.appForm.value.appLocation?this.appForm.value.storageServiceId:null,storage_container:"1"===this.appForm.value.appLocation?this.appForm.value.storageContainer:null,path:"1"===this.appForm.value.appLocation||"3"===this.appForm.value.appLocation?this.appForm.value.path:null};this.editApp?this.appsService.update(this.editApp.id,n,{snackbarSuccess:"apps.updateSuccess"}).pipe((0,D.W)(e=>{const o=(0,T.cQ)(e);return this.triggerAlert("error",o.message),(0,y.$)(()=>o)})).subscribe(()=>{this.goBack()}):this.appsService.create({resource:[n]},{snackbarSuccess:"apps.createSuccess",fields:"*",related:"role_by_role_id"}).pipe((0,D.W)(e=>{const o=(0,T.cQ)(e),s=(0,T.aI)(this.appForm,o);return this.triggerAlert("error",s.length?s.join(" "):o.message),(0,y.$)(()=>o)})).subscribe(()=>{this.goBack()})}get disableKeyRefresh(){return null===this.editApp.createdById}refreshApiKey(){var n=this;return(0,i.A)(function*(){const e=yield(0,U.X)(n.systemConfigDataService.environment.server.host,n.appForm.getRawValue().name);n.appsService.update(n.editApp.id,{apiKey:e}).subscribe(()=>n.editApp.apiKey=e)})()}static{this.\u0275fac=function(e){return new(e||O)(t.rXU(l.ok),t.rXU(m.u7),t.rXU(m.gu),t.rXU(M.D_),t.rXU(K.f),t.rXU(g.nX),t.rXU(g.Ix),t.rXU(N.n),t.rXU(W.L))}}static{this.\u0275cmp=t.VBU({type:O,selectors:[["df-app-details"]],viewQuery:function(e,o){if(1&e&&t.GBs(w,5),2&e){let s;t.mGM(s=t.lsd())&&(o.rolesInput=s.first)}},standalone:!0,features:[t.aNF],decls:97,vars:95,consts:[[3,"showAlert","alertType","alertClosed"],[1,"details-section",3,"formGroup","ngSubmit"],["subscriptSizing","dynamic","appearance","outline",1,"dynamic-width"],["matInput","","formControlName","name","required","",3,"placeholder"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[4,"ngIf"],["type","text","placeholder","Pick one","matInput","","formControlName","defaultRole",3,"matAutocomplete","input","focus"],["rolesInput",""],["requireSelection","",3,"displayWith"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["subscriptSizing","dynamic","appearance","outline",1,"full-width"],["rows","1","matInput","","formControlName","description",3,"placeholder"],["formControlName","active","color","primary",1,"full-width"],["class","full-width api-card",3,"style",4,"ngIf"],[1,"flex-col","full-width"],["aria-label","Select an option","formControlName","appLocation",1,"flex-col"],["value","0"],["value","1"],["value","3"],["value","2"],["class","full-width",4,"ngIf"],[1,"metering","full-width"],[1,"metering-head"],[1,"metering-block"],["class","metering-hint",4,"ngIf","ngIfElse"],["noRoleHint",""],[3,"roleId"],[4,"ngIf","ngIfElse"],["noLimits",""],[1,"metering-link",3,"routerLink"],["class","metering-block",4,"ngIf"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],["mat-flat-button","","color","primary",1,"save-btn"],[3,"value"],[1,"full-width","api-card"],["mat-button","","type","button",1,"copy-btn",3,"click"],[3,"icon"],["mat-button","","type","button",1,"refresh-btn",3,"disabled","click"],[1,"full-width"],["appearance","outline",4,"ngIf"],["class","location-card",4,"ngIf"],["appearance","outline"],["formControlName","storageServiceId","name","defaultRole"],["matInput","","formControlName","storageContainer",3,"placeholder"],["matInput","","formControlName","path",3,"placeholder"],["matInput","","formControlName","url",3,"placeholder"],[1,"location-card"],["mat-button","","type","button",3,"click"],[1,"copy-icon",3,"icon"],[1,"metering-hint"],["class","metering-limit",3,"class",4,"ngFor","ngForOf"],[1,"metering-limit"],[1,"metering-limit-head"],[1,"metering-limit-name"],[1,"metering-limit-rate","df-numeric"],[1,"df-meter-track"],[1,"df-meter-fill"],["class","metering-stats",4,"ngIf","ngIfElse"],["noUsage",""],[1,"metering-stats"],[1,"metering-stat"],[1,"metering-stat-value","df-numeric"],[1,"metering-stat-label"]],template:function(e,o){if(1&e&&(t.j41(0,"div")(1,"df-alert",0),t.bIt("alertClosed",function(){return o.showAlert=!1}),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.j41(4,"form",1),t.bIt("ngSubmit",function(){return o.save()}),t.j41(5,"mat-form-field",2)(6,"mat-label"),t.EFF(7),t.nI1(8,"transloco"),t.k0s(),t.nrm(9,"input",3),t.nI1(10,"transloco"),t.nrm(11,"fa-icon",4),t.nI1(12,"transloco"),t.DNE(13,X,3,3,"mat-error",5),t.DNE(14,J,3,3,"mat-error",5),t.k0s(),t.j41(15,"mat-form-field",2)(16,"mat-label"),t.EFF(17),t.nI1(18,"transloco"),t.k0s(),t.j41(19,"input",6,7),t.bIt("input",function(){return o.filter()})("focus",function(){return o.filter()}),t.k0s(),t.nrm(21,"fa-icon",4),t.nI1(22,"transloco"),t.j41(23,"mat-autocomplete",8,9),t.DNE(25,V,2,2,"mat-option",10),t.k0s(),t.DNE(26,z,3,3,"mat-error",5),t.j41(27,"mat-hint"),t.EFF(28),t.nI1(29,"transloco"),t.k0s()(),t.j41(30,"mat-form-field",11)(31,"mat-label"),t.EFF(32),t.nI1(33,"transloco"),t.k0s(),t.nrm(34,"textarea",12),t.nI1(35,"transloco"),t.DNE(36,H,3,3,"mat-error",5),t.nrm(37,"fa-icon",4),t.nI1(38,"transloco"),t.k0s(),t.j41(39,"mat-slide-toggle",13),t.EFF(40),t.nI1(41,"transloco"),t.k0s(),t.DNE(42,Z,16,16,"mat-card",14),t.j41(43,"div",15)(44,"p"),t.EFF(45),t.nI1(46,"transloco"),t.nrm(47,"fa-icon",4),t.nI1(48,"transloco"),t.k0s(),t.j41(49,"mat-radio-group",16)(50,"mat-radio-button",17),t.EFF(51),t.nI1(52,"transloco"),t.k0s(),t.j41(53,"mat-radio-button",18),t.EFF(54),t.nI1(55,"transloco"),t.k0s(),t.j41(56,"mat-radio-button",19),t.EFF(57),t.nI1(58,"transloco"),t.k0s(),t.j41(59,"mat-radio-button",20),t.EFF(60),t.nI1(61,"transloco"),t.k0s()()(),t.DNE(62,lt,6,5,"div",21),t.j41(63,"section",22)(64,"header",23)(65,"h2"),t.EFF(66),t.nI1(67,"transloco"),t.k0s(),t.j41(68,"p"),t.EFF(69),t.nI1(70,"transloco"),t.k0s()(),t.j41(71,"div",24)(72,"h3"),t.EFF(73),t.nI1(74,"transloco"),t.k0s(),t.DNE(75,mt,3,6,"p",25),t.DNE(76,_t,3,3,"ng-template",null,26,t.C5r),t.nrm(78,"df-scope-map",27),t.k0s(),t.j41(79,"div",24)(80,"h3"),t.EFF(81),t.nI1(82,"transloco"),t.k0s(),t.DNE(83,ut,2,1,"ng-container",28),t.DNE(84,gt,3,3,"ng-template",null,29,t.C5r),t.j41(86,"a",30),t.EFF(87),t.nI1(88,"transloco"),t.k0s()(),t.DNE(89,Mt,7,5,"div",31),t.k0s(),t.j41(90,"div",32)(91,"button",33),t.bIt("click",function(){return o.goBack()}),t.EFF(92),t.nI1(93,"transloco"),t.k0s(),t.j41(94,"button",34),t.DNE(95,It,3,3,"span",5),t.DNE(96,Et,3,3,"span",5),t.k0s()()()()),2&e){const s=t.sdS(24),f=t.sdS(77),u=t.sdS(85);t.R7$(1),t.Y8G("showAlert",o.showAlert)("alertType",o.alertType),t.R7$(1),t.SpI(" ",t.bMT(3,49,o.alertMsg)," "),t.R7$(2),t.Y8G("formGroup",o.appForm),t.R7$(3),t.SpI(" ",t.bMT(8,51,"apps.createApp.applicationName.label")," "),t.R7$(2),t.FS9("placeholder",t.bMT(10,53,"apps.createApp.applicationName.label")),t.R7$(2),t.Y8G("icon",o.faCircleInfo)("matTooltip",t.bMT(12,55,"apps.createApp.applicationName.tooltip")),t.R7$(2),t.Y8G("ngIf",o.appForm.controls.name.hasError("required")),t.R7$(1),t.Y8G("ngIf",o.appForm.controls.name.hasError("server")),t.R7$(3),t.JRh(t.bMT(18,57,"apps.createApp.defaultRole.label")),t.R7$(2),t.Y8G("matAutocomplete",s),t.R7$(2),t.Y8G("icon",o.faCircleInfo)("matTooltip",t.bMT(22,59,"apps.createApp.defaultRole.tooltip")),t.R7$(2),t.Y8G("displayWith",o.displayFn),t.R7$(2),t.Y8G("ngForOf",o.filteredRoles)("ngForTrackBy",o.trackById),t.R7$(1),t.Y8G("ngIf",o.appForm.controls.defaultRole.hasError("server")),t.R7$(2),t.JRh(t.bMT(29,61,"apps.createApp.defaultRole.hint")),t.R7$(4),t.JRh(t.bMT(33,63,"apps.createApp.description.label")),t.R7$(2),t.FS9("placeholder",t.bMT(35,65,"apps.createApp.description.label")),t.R7$(2),t.Y8G("ngIf",o.appForm.controls.description.hasError("server")),t.R7$(1),t.Y8G("icon",o.faCircleInfo)("matTooltip",t.bMT(38,67,"apps.createApp.description.tooltip")),t.R7$(3),t.JRh(t.bMT(41,69,"apps.createApp.active")),t.R7$(2),t.Y8G("ngIf",o.editApp),t.R7$(3),t.SpI(" ",t.bMT(46,71,"apps.createApp.appLocation.label"),""),t.R7$(2),t.Y8G("icon",o.faCircleInfo)("matTooltip",t.bMT(48,73,"apps.createApp.appLocation.tooltip")),t.R7$(4),t.JRh(t.bMT(52,75,"apps.createApp.appLocation.options.noStorage")),t.R7$(3),t.JRh(t.bMT(55,77,"apps.createApp.appLocation.options.fileStorage.label")),t.R7$(3),t.JRh(t.bMT(58,79,"apps.createApp.appLocation.options.webServer.label")),t.R7$(3),t.JRh(t.bMT(61,81,"apps.createApp.appLocation.options.remoteUrl.label")),t.R7$(2),t.Y8G("ngIf","1"===o.appForm.controls.appLocation.value||"2"===o.appForm.controls.appLocation.value||"3"===o.appForm.controls.appLocation.value),t.R7$(4),t.JRh(t.bMT(67,83,"apps.metering.title")),t.R7$(3),t.JRh(t.bMT(70,85,"apps.metering.subtitle")),t.R7$(4),t.JRh(t.bMT(74,87,"apps.metering.reachTitle")),t.R7$(2),t.Y8G("ngIf",null!==o.selectedRoleId)("ngIfElse",f),t.R7$(3),t.Y8G("roleId",o.selectedRoleId),t.R7$(3),t.JRh(t.bMT(82,89,"apps.metering.limitsTitle")),t.R7$(2),t.Y8G("ngIf",o.roleLimits.length)("ngIfElse",u),t.R7$(3),t.Y8G("routerLink",o.limitsRoute),t.R7$(1),t.SpI(" ",t.bMT(88,91,"apps.metering.limitsManage")," "),t.R7$(2),t.Y8G("ngIf",o.editApp),t.R7$(3),t.SpI(" ",t.bMT(93,93,"cancel")," "),t.R7$(3),t.Y8G("ngIf",o.editApp),t.R7$(1),t.Y8G("ngIf",!o.editApp)}},dependencies:[l.X1,l.qT,l.me,l.BC,l.cb,l.YS,l.j4,l.JD,h.RG,h.rl,h.nJ,h.MV,h.TL,h.yw,$.fS,$.fg,d.bT,_.jL,_.$3,c.wT,_.pN,d.pM,c.Sy,b.mV,b.sG,p.Hu,p.RN,p.YY,p.m2,p.MM,p.Lc,C.Hl,C.$z,R.dX,R.aY,v.Wk,v.VT,v._g,E.Ve,E.VO,G.Kj,L.uc,L.oV,B.W,Y.A,d.QX,d.oe,g.Wk],styles:["mat-card[_ngcontent-%COMP%]{word-wrap:break-word}.api-card[_ngcontent-%COMP%], .location-card[_ngcontent-%COMP%]{background-color:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);box-shadow:none}.api-card[_ngcontent-%COMP%] mat-card-subtitle[_ngcontent-%COMP%], .location-card[_ngcontent-%COMP%] mat-card-subtitle[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.api-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%], .location-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.3rem;color:var(--df-text)}.api-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .location-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:var(--df-accent)}.action-bar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.metering[_ngcontent-%COMP%]{margin-top:var(--df-space-6);padding-top:var(--df-space-5);border-top:1px solid var(--df-border-2);display:flex;flex-direction:column;gap:var(--df-space-5)}.metering[_ngcontent-%COMP%] .metering-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.6rem;font-weight:600;color:var(--df-text)}.metering[_ngcontent-%COMP%] .metering-head[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:var(--df-space-1) 0 0;font-size:1.3rem;color:var(--df-text-muted)}.metering[_ngcontent-%COMP%] .metering-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2)}.metering[_ngcontent-%COMP%] .metering-block[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.metering[_ngcontent-%COMP%] .metering-hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-muted)}.metering[_ngcontent-%COMP%] .metering-link[_ngcontent-%COMP%]{align-self:flex-start;font-size:1.3rem;color:var(--df-accent);text-decoration:none}.metering[_ngcontent-%COMP%] .metering-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.metering-limit[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);padding:var(--df-space-2) 0}.metering-limit[_ngcontent-%COMP%] .metering-limit-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:var(--df-space-3);font-size:1.3rem}.metering-limit[_ngcontent-%COMP%] .metering-limit-name[_ngcontent-%COMP%]{color:var(--df-text);font-weight:500}.metering-limit[_ngcontent-%COMP%] .metering-limit-rate[_ngcontent-%COMP%]{color:var(--df-text-muted);white-space:nowrap}.df-meter-track[_ngcontent-%COMP%]{position:relative;height:.6rem;border-radius:var(--df-radius-sm);background:var(--df-surface-2);border:1px solid var(--df-border);overflow:hidden}.df-meter-fill[_ngcontent-%COMP%]{height:100%;border-radius:inherit;background:var(--df-accent);transition:width .24s ease}.df-meter--warning[_ngcontent-%COMP%] .df-meter-fill[_ngcontent-%COMP%]{background:var(--df-warning)}.df-meter--warning[_ngcontent-%COMP%] .metering-limit-rate[_ngcontent-%COMP%]{color:var(--df-warning)}.df-meter--danger[_ngcontent-%COMP%] .df-meter-fill[_ngcontent-%COMP%]{background:var(--df-danger)}.df-meter--danger[_ngcontent-%COMP%] .metering-limit-rate[_ngcontent-%COMP%]{color:var(--df-danger)}.metering-stats[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--df-space-6)}.metering-stat[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1)}.metering-stat[_ngcontent-%COMP%] .metering-stat-value[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;color:var(--df-text)}.metering-stat[_ngcontent-%COMP%] .metering-stat-label[_ngcontent-%COMP%]{font-size:1.1rem;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}"]})}};P=(0,F.Cg)([(0,x.d)({checkProperties:!0})],P)},51425:(j,I,r)=>{r.d(I,{W:()=>C});var i=r(17705),F=r(60177),l=r(88834),g=r(20060),m=r(45383);function E(p,b){if(1&p){const c=i.RV6();i.j41(0,"button",5),i.bIt("click",function(){i.eBV(c);const d=i.XpG(2);return i.Njj(d.dismissAlert())}),i.j41(1,"fa-icon",6),i.EFF(2),i.k0s()()}if(2&p){const c=i.XpG(2);i.R7$(1),i.Y8G("icon",c.faXmark),i.R7$(1),i.JRh("alerts.close")}}function v(p,b){if(1&p&&(i.j41(0,"div",1),i.nrm(1,"fa-icon",2),i.j41(2,"span",3),i.SdG(3),i.k0s(),i.DNE(4,E,3,2,"button",4),i.k0s()),2&p){const c=i.XpG();i.HbH(c.alertType),i.R7$(1),i.Y8G("icon",c.icon),i.R7$(3),i.Y8G("ngIf",c.dismissible)}}const R=["*"];let C=(()=>{class p{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new i.bkB,this.faXmark=m.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return m.SGM;case"error":return m.rfe;case"warning":return m.tUE;default:return m.iW_}}static{this.\u0275fac=function(_){return new(_||p)}}static{this.\u0275cmp=i.VBU({type:p,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[i.aNF],ngContentSelectors:R,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(_,d){1&_&&(i.NAR(),i.DNE(0,v,5,4,"div",0)),2&_&&i.Y8G("ngIf",d.showAlert)},dependencies:[F.bT,l.Hl,l.iY,g.dX,g.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return p})()}}]); \ No newline at end of file diff --git a/dist/2262.e1b1581ef5ffc005.js b/dist/2262.e1b1581ef5ffc005.js deleted file mode 100644 index bdb8e83d..00000000 --- a/dist/2262.e1b1581ef5ffc005.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2262],{82262:(F,g,r)=>{r.r(g),r.d(g,{DfForgotPasswordComponent:()=>w});var e=r(21406),i=r(78227),d=r(52483),f=r(80972),_=r(57588),h=r(56579),v=r(51407),D=r(11575),E=r(16994),m=r(11863),p=r(68660),c=r(453),u=r(54688),P=r(18331),b=r(7967),M=r(93138),R=r(31147),T=r(97828),t=r(1843),y=r(16396),A=r(86506),x=r(95373);function $(o,a){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&o&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"userManagement.controls.email.errors.invalid")," "))}function j(o,a){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&o&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"userManagement.controls.email.errors.required")," "))}function G(o,a){if(1&o&&(t.j41(0,"mat-form-field",10)(1,"mat-label"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.nrm(4,"input",11),t.DNE(5,$,3,3,"mat-error",12),t.DNE(6,j,3,3,"mat-error",12),t.k0s()),2&o){const n=t.XpG(2);let s,l;t.R7$(2),t.SpI(" ",t.bMT(3,3,"userManagement.controls.email.label"),""),t.R7$(3),t.Y8G("ngIf",(null==(s=n.forgetPasswordForm.get("email"))||null==s.errors?null:s.errors.email)&&!(null!=(s=n.forgetPasswordForm.get("email"))&&null!=s.errors&&s.errors.required)),t.R7$(1),t.Y8G("ngIf",!(null!=(l=n.forgetPasswordForm.get("email"))&&null!=l.errors&&l.errors.email)&&(null==(l=n.forgetPasswordForm.get("email"))||null==l.errors?null:l.errors.required))}}function S(o,a){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&o&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"userManagement.controls.username.errors.required")," "))}function U(o,a){if(1&o&&(t.j41(0,"mat-form-field",10)(1,"mat-label"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.nrm(4,"input",13),t.DNE(5,S,3,3,"mat-error",12),t.k0s()),2&o){const n=t.XpG(2);let s;t.R7$(2),t.JRh(t.bMT(3,2,"userManagement.controls.username.altLabel")),t.R7$(3),t.Y8G("ngIf",null==(s=n.forgetPasswordForm.get("username"))||null==s.errors?null:s.errors.required)}}function B(o,a){if(1&o){const n=t.RV6();t.j41(0,"form",7),t.bIt("ngSubmit",function(){t.eBV(n);const l=t.XpG();return t.Njj(l.requestReset())}),t.DNE(1,G,7,5,"mat-form-field",8),t.DNE(2,U,6,4,"mat-form-field",8),t.j41(3,"button",9),t.EFF(4),t.nI1(5,"transloco"),t.k0s()()}if(2&o){const n=t.XpG();t.Y8G("formGroup",n.forgetPasswordForm),t.R7$(1),t.Y8G("ngIf","email"===n.loginAttribute),t.R7$(1),t.Y8G("ngIf","username"===n.loginAttribute),t.R7$(2),t.SpI(" ",t.bMT(5,4,"userManagement.requestPasswordReset")," ")}}function W(o,a){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&o&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"userManagement.controls.securityAnswer.errors.required")," "))}function L(o,a){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&o&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"userManagement.controls.password.errors.required")," "))}function k(o,a){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&o&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"userManagement.controls.password.errors.length")," "))}function N(o,a){1&o&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&o&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"userManagement.controls.confirmPassword.errors.match")," "))}function K(o,a){if(1&o){const n=t.RV6();t.j41(0,"form",14),t.bIt("ngSubmit",function(){t.eBV(n);const l=t.XpG();return t.Njj(l.resetPassword())}),t.j41(1,"mat-form-field",10)(2,"mat-label"),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.nrm(5,"input",15),t.k0s(),t.j41(6,"mat-form-field",10)(7,"mat-label"),t.EFF(8),t.nI1(9,"transloco"),t.k0s(),t.nrm(10,"input",16),t.DNE(11,W,3,3,"mat-error",12),t.k0s(),t.j41(12,"mat-form-field",10)(13,"mat-label"),t.EFF(14),t.nI1(15,"transloco"),t.k0s(),t.nrm(16,"input",17),t.DNE(17,L,3,3,"mat-error",12),t.DNE(18,k,3,3,"mat-error",12),t.k0s(),t.j41(19,"mat-form-field",10)(20,"mat-label"),t.EFF(21),t.nI1(22,"transloco"),t.k0s(),t.nrm(23,"input",18),t.DNE(24,N,3,3,"mat-error",12),t.k0s(),t.j41(25,"button",9),t.EFF(26),t.nI1(27,"transloco"),t.k0s()()}if(2&o){const n=t.XpG();let s,l,C,O;t.Y8G("formGroup",n.securityQuestionForm),t.R7$(3),t.SpI(" ",t.bMT(4,11,"userManagement.controls.securityQuestion.label"),""),t.R7$(2),t.Y8G("readonly",!0),t.R7$(3),t.SpI(" ",t.bMT(9,13,"userManagement.controls.securityAnswer.label"),""),t.R7$(3),t.Y8G("ngIf",null==(s=n.securityQuestionForm.get("answer"))||null==s.errors?null:s.errors.required),t.R7$(3),t.JRh(t.bMT(15,15,"userManagement.controls.password.label")),t.R7$(3),t.Y8G("ngIf",null==(l=n.securityQuestionForm.get("newPassword"))||null==l.errors?null:l.errors.required),t.R7$(1),t.Y8G("ngIf",null==(C=n.securityQuestionForm.get("newPassword"))||null==C.errors?null:C.errors.minlength),t.R7$(3),t.JRh(t.bMT(22,17,"userManagement.controls.confirmPassword.label")),t.R7$(3),t.Y8G("ngIf",null==(O=n.securityQuestionForm.get("confirmPassword"))?null:O.hasError("doesNotMatch")),t.R7$(2),t.SpI(" ",t.bMT(27,19,"userManagement.resetPassword")," ")}}let w=class I{constructor(a,n,s,l,C,O){this.fb=a,this.systemConfigDataService=n,this.passwordService=s,this.translateService=l,this.router=C,this.authService=O,this.alertMsg="",this.showAlert=!1,this.alertType="error",this.loginAttribute="email",this.hasSecurityQuestion=!1,this.loginRoute=`/${E.b.AUTH}/${E.b.LOGIN}`,this.forgetPasswordForm=this.fb.group({username:[""],email:[""]}),this.securityQuestionForm=this.fb.group({securityQuestion:[""],securityAnswer:["",i.k0.required],newPassword:["",[i.k0.required,i.k0.minLength(16)]],confirmPassword:["",[i.k0.required,(0,D.e)("newPassword")]]})}ngOnInit(){this.systemConfigDataService.environment$.subscribe(a=>{this.loginAttribute=a.authentication.loginAttribute,"username"===this.loginAttribute?this.forgetPasswordForm.controls.username.setValidators([i.k0.required]):this.forgetPasswordForm.controls.email.setValidators([i.k0.required,i.k0.email])})}requestReset(){this.forgetPasswordForm.invalid||this.passwordService.requestPasswordReset("username"===this.loginAttribute?{username:this.forgetPasswordForm.controls.username.value}:{email:this.forgetPasswordForm.controls.email.value}).pipe((0,d.W)(a=>{const n=(0,h.cQ)(a);return this.alertMsg=n.message,this.showAlert=!0,(0,f.$)(()=>n)})).subscribe(a=>{this.showAlert=!1,"securityQuestion"in a?(this.hasSecurityQuestion=!0,this.securityQuestionForm.controls.securityQuestion.setValue(a.securityQuestion)):(this.alertMsg=this.translateService.translate("userManagement.alerts.resetEmailSent"),this.showAlert=!0,this.alertType="success")})}resetPassword(){this.securityQuestionForm.invalid||this.passwordService.requestPasswordReset({...this.forgetPasswordForm.value,...this.securityQuestionForm.value},!0).pipe((0,d.W)(a=>{const n=(0,h.cQ)(a);return this.alertMsg=n.message,this.showAlert=!0,(0,f.$)(()=>n)}),(0,_.n)(()=>{const a={password:this.securityQuestionForm.controls.newPassword.value};return"username"===this.loginAttribute?a.username=this.forgetPasswordForm.controls.username.value:a.email=this.forgetPasswordForm.controls.email.value,this.authService.login(a)})).subscribe(()=>{this.showAlert=!1,this.router.navigate(["/"])})}static{this.\u0275fac=function(n){return new(n||I)(t.rXU(i.ok),t.rXU(y.f),t.rXU(A.p),t.rXU(R.JO),t.rXU(m.Ix),t.rXU(x.g))}}static{this.\u0275cmp=t.VBU({type:I,selectors:[["df-forgot-password"]],standalone:!0,features:[t.aNF],decls:17,vars:14,consts:[[1,"user-management-card-container"],[1,"user-management-card"],[3,"showAlert","alertType","alertClosed"],["name","forget-password-form",3,"formGroup","ngSubmit",4,"ngIf"],["name","security-questions-form",3,"formGroup","ngSubmit",4,"ngIf"],[1,"action-links"],["mat-button","","target","_self",3,"routerLink"],["name","forget-password-form",3,"formGroup","ngSubmit"],["appearance","outline",4,"ngIf"],["mat-flat-button","","color","primary","type","submit"],["appearance","outline"],["matInput","","type","email","formControlName","email"],[4,"ngIf"],["matInput","","type","text","formControlName","username"],["name","security-questions-form",3,"formGroup","ngSubmit"],["matInput","","type","text","formControlName","securityQuestion",3,"readonly"],["matInput","","type","text","formControlName","securityAnswer"],["matInput","","type","password","formControlName","newPassword"],["matInput","","type","password","formControlName","confirmPassword"]],template:function(n,s){1&n&&(t.j41(0,"div",0)(1,"mat-card",1)(2,"df-alert",2),t.bIt("alertClosed",function(){return s.showAlert=!1}),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.j41(5,"mat-card-header")(6,"mat-card-title"),t.EFF(7),t.nI1(8,"transloco"),t.k0s()(),t.nrm(9,"mat-divider"),t.j41(10,"mat-card-content"),t.DNE(11,B,6,6,"form",3),t.DNE(12,K,28,21,"form",4),t.j41(13,"div",5)(14,"a",6),t.EFF(15),t.nI1(16,"transloco"),t.k0s()()()()()),2&n&&(t.R7$(2),t.Y8G("showAlert",s.showAlert)("alertType",s.alertType),t.R7$(1),t.JRh(t.bMT(4,8,s.alertMsg)),t.R7$(4),t.SpI(" ",t.bMT(8,10,"userManagement.passwordReset")," "),t.R7$(4),t.Y8G("ngIf",!s.hasSecurityQuestion),t.R7$(1),t.Y8G("ngIf",s.hasSecurityQuestion),t.R7$(2),t.Y8G("routerLink",s.loginRoute),t.R7$(1),t.JRh(t.bMT(16,12,"userManagement.login")))},dependencies:[M.Hu,M.RN,M.m2,M.MM,M.dh,v.W,b.w,b.q,P.bT,i.X1,i.qT,i.me,i.BC,i.cb,i.j4,i.JD,u.RG,u.rl,u.nJ,u.TL,c.fS,c.fg,p.Hl,p.It,p.$z,m.Wk,R.Kj],styles:[".user-management-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;min-height:100%;box-sizing:border-box}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%]{padding:16px;margin:0 auto;min-width:300px;max-width:445px;background:var(--df-surface)!important;color:var(--df-text)!important;border:1px solid var(--df-border)!important;border-radius:var(--df-radius);box-shadow:none!important;--mdc-elevated-card-container-shape: var(--df-radius);--mdc-outlined-card-container-shape: var(--df-radius);--mdc-outlined-card-outline-width: 1px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{padding-bottom:16px;background:transparent!important}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{color:var(--df-text);font-size:1.8rem;font-weight:600;letter-spacing:-.01em}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-divider[_ngcontent-%COMP%]{border-top-color:var(--df-border-2)}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding-top:16px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%]{padding-top:32px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:11px;font-weight:600;letter-spacing:.06em;margin:0 0 8px;text-transform:uppercase}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%] .services-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;padding-top:16px;gap:16px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] .action-links[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] .action-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}};w=(0,e.Cg)([(0,T.d)({checkProperties:!0})],w)},51407:(F,g,r)=>{r.d(g,{W:()=>E});var e=r(1843),i=r(18331),d=r(68660),f=r(54342),_=r(94093);function h(m,p){if(1&m){const c=e.RV6();e.j41(0,"button",5),e.bIt("click",function(){e.eBV(c);const P=e.XpG(2);return e.Njj(P.dismissAlert())}),e.j41(1,"fa-icon",6),e.EFF(2),e.k0s()()}if(2&m){const c=e.XpG(2);e.R7$(1),e.Y8G("icon",c.faXmark),e.R7$(1),e.JRh("alerts.close")}}function v(m,p){if(1&m&&(e.j41(0,"div",1),e.nrm(1,"fa-icon",2),e.j41(2,"span",3),e.SdG(3),e.k0s(),e.DNE(4,h,3,2,"button",4),e.k0s()),2&m){const c=e.XpG();e.HbH(c.alertType),e.R7$(1),e.Y8G("icon",c.icon),e.R7$(3),e.Y8G("ngIf",c.dismissible)}}const D=["*"];let E=(()=>{class m{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new e.bkB,this.faXmark=_.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return _.SGM;case"error":return _.rfe;case"warning":return _.tUE;default:return _.iW_}}static{this.\u0275fac=function(u){return new(u||m)}}static{this.\u0275cmp=e.VBU({type:m,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[e.aNF],ngContentSelectors:D,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(u,P){1&u&&(e.NAR(),e.DNE(0,v,5,4,"div",0)),2&u&&e.Y8G("ngIf",P.showAlert)},dependencies:[i.bT,d.Hl,d.iY,f.dX,f.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return m})()},11575:(F,g,r)=>{function e(i){return d=>{const f=d.parent;if(f){const _=f.get(i);if(_&&d.value!==_.value)return{doesNotMatch:!0}}return null}}r.d(g,{e:()=>e})}}]); \ No newline at end of file diff --git a/dist/2317.87abf625347bbc67.js b/dist/2317.87abf625347bbc67.js deleted file mode 100644 index 7404b0f8..00000000 --- a/dist/2317.87abf625347bbc67.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2317],{33329:(X,T,h)=>{h.d(T,{Jl:()=>w,Jo:()=>A,YN:()=>yi,Zv:()=>N});var n=h(8275),t=h(1843),g=h(18331),p=h(42250),I=h(83607),k=h(89115),M=h(85012),O=h(89371),v=h(73907),b=h(28930),F=h(57588),u=h(25150),G=h(10165);function U(a,l){1&a&&(t.j41(0,"span",7),t.SdG(1,1),t.k0s())}function d(a,l){1&a&&(t.j41(0,"span",8),t.SdG(1,2),t.k0s())}h(78227),h(54688);const _=["*",[["mat-chip-avatar"],["","matChipAvatar",""]],[["mat-chip-trailing-icon"],["","matChipRemove",""],["","matChipTrailingIcon",""]]],s=["*","mat-chip-avatar, [matChipAvatar]","mat-chip-trailing-icon,[matChipRemove],[matChipTrailingIcon]"],P=["*"],D=new t.nKC("mat-chips-default-options"),z=new t.nKC("MatChipAvatar"),L=new t.nKC("MatChipTrailingIcon"),V=new t.nKC("MatChipRemove"),S=new t.nKC("MatChip");class ni{}const ri=(0,p.BF)(ni,-1);let x=(()=>{class a extends ri{get disabled(){return this._disabled||this._parentChip.disabled}set disabled(i){this._disabled=(0,n.he)(i)}_getDisabledAttribute(){return this.disabled&&!this._allowFocusWhenDisabled?"":null}_getTabindex(){return this.disabled&&!this._allowFocusWhenDisabled||!this.isInteractive?null:this.tabIndex.toString()}constructor(i,c){super(),this._elementRef=i,this._parentChip=c,this.isInteractive=!0,this._isPrimary=!0,this._disabled=!1,this._allowFocusWhenDisabled=!1,"BUTTON"===i.nativeElement.nodeName&&i.nativeElement.setAttribute("type","button")}focus(){this._elementRef.nativeElement.focus()}_handleClick(i){!this.disabled&&this.isInteractive&&this._isPrimary&&(i.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}_handleKeydown(i){(i.keyCode===u.Fm||i.keyCode===u.t6)&&!this.disabled&&this.isInteractive&&this._isPrimary&&!this._parentChip._isEditing&&(i.preventDefault(),this._parentChip._handlePrimaryActionInteraction())}static{this.\u0275fac=function(c){return new(c||a)(t.rXU(t.aKT),t.rXU(S))}}static{this.\u0275dir=t.FsC({type:a,selectors:[["","matChipAction",""]],hostAttrs:[1,"mdc-evolution-chip__action","mat-mdc-chip-action"],hostVars:9,hostBindings:function(c,e){1&c&&t.bIt("click",function(r){return e._handleClick(r)})("keydown",function(r){return e._handleKeydown(r)}),2&c&&(t.BMQ("tabindex",e._getTabindex())("disabled",e._getDisabledAttribute())("aria-disabled",e.disabled),t.AVh("mdc-evolution-chip__action--primary",e._isPrimary)("mdc-evolution-chip__action--presentational",!e.isInteractive)("mdc-evolution-chip__action--trailing",!e._isPrimary))},inputs:{disabled:"disabled",tabIndex:"tabIndex",isInteractive:"isInteractive",_allowFocusWhenDisabled:"_allowFocusWhenDisabled"},features:[t.Vt3]})}}return a})(),N=(()=>{class a extends x{constructor(){super(...arguments),this._isPrimary=!1}_handleClick(i){this.disabled||(i.stopPropagation(),i.preventDefault(),this._parentChip.remove())}_handleKeydown(i){(i.keyCode===u.Fm||i.keyCode===u.t6)&&!this.disabled&&(i.stopPropagation(),i.preventDefault(),this._parentChip.remove())}static{this.\u0275fac=function(){let i;return function(e){return(i||(i=t.xGo(a)))(e||a)}}()}static{this.\u0275dir=t.FsC({type:a,selectors:[["","matChipRemove",""]],hostAttrs:["role","button",1,"mat-mdc-chip-remove","mat-mdc-chip-trailing-icon","mat-mdc-focus-indicator","mdc-evolution-chip__icon","mdc-evolution-chip__icon--trailing"],hostVars:1,hostBindings:function(c,e){2&c&&t.BMQ("aria-hidden",null)},features:[t.Jv_([{provide:V,useExisting:a}]),t.Vt3]})}}return a})(),di=0;const hi=(0,p.BF)((0,p.Zc)((0,p.GG)((0,p.Ob)(class{constructor(a){this._elementRef=a}})),"primary"),-1);let w=(()=>{class a extends hi{_hasFocus(){return this._hasFocusInternal}get value(){return void 0!==this._value?this._value:this._textElement.textContent.trim()}set value(i){this._value=i}get removable(){return this._removable}set removable(i){this._removable=(0,n.he)(i)}get highlighted(){return this._highlighted}set highlighted(i){this._highlighted=(0,n.he)(i)}get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(i){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,i)}constructor(i,c,e,o,r,C,E,R){super(c),this._changeDetectorRef=i,this._ngZone=e,this._focusMonitor=o,this._globalRippleOptions=E,this._onFocus=new k.B,this._onBlur=new k.B,this.role=null,this._hasFocusInternal=!1,this.id="mat-mdc-chip-"+di++,this.ariaLabel=null,this.ariaDescription=null,this._ariaDescriptionId=`${this.id}-aria-description`,this._removable=!0,this._highlighted=!1,this.removed=new t.bkB,this.destroyed=new t.bkB,this.basicChipAttrName="mat-basic-chip",this._rippleLoader=(0,t.WQX)(p.Ej),this._document=r,this._animationsDisabled="NoopAnimations"===C,null!=R&&(this.tabIndex=parseInt(R)??this.defaultTabIndex),this._monitorFocus(),this._rippleLoader?.configureRipple(this._elementRef.nativeElement,{className:"mat-mdc-chip-ripple",disabled:this._isRippleDisabled()})}ngOnInit(){const i=this._elementRef.nativeElement;this._isBasicChip=i.hasAttribute(this.basicChipAttrName)||i.tagName.toLowerCase()===this.basicChipAttrName}ngAfterViewInit(){this._textElement=this._elementRef.nativeElement.querySelector(".mat-mdc-chip-action-label"),this._pendingFocus&&(this._pendingFocus=!1,this.focus())}ngAfterContentInit(){this._actionChanges=(0,M.h)(this._allLeadingIcons.changes,this._allTrailingIcons.changes,this._allRemoveIcons.changes).subscribe(()=>this._changeDetectorRef.markForCheck())}ngDoCheck(){this._rippleLoader.setDisabled(this._elementRef.nativeElement,this._isRippleDisabled())}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement),this._actionChanges?.unsubscribe(),this.destroyed.emit({chip:this}),this.destroyed.complete()}remove(){this.removable&&this.removed.emit({chip:this})}_isRippleDisabled(){return this.disabled||this.disableRipple||this._animationsDisabled||this._isBasicChip||!!this._globalRippleOptions?.disabled}_hasTrailingIcon(){return!(!this.trailingIcon&&!this.removeIcon)}_handleKeydown(i){(i.keyCode===u.G_||i.keyCode===u.SJ)&&(i.preventDefault(),this.remove())}focus(){this.disabled||(this.primaryAction?this.primaryAction.focus():this._pendingFocus=!0)}_getSourceAction(i){return this._getActions().find(c=>{const e=c._elementRef.nativeElement;return e===i||e.contains(i)})}_getActions(){const i=[];return this.primaryAction&&i.push(this.primaryAction),this.removeIcon&&i.push(this.removeIcon),this.trailingIcon&&i.push(this.trailingIcon),i}_handlePrimaryActionInteraction(){}_monitorFocus(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(i=>{const c=null!==i;c!==this._hasFocusInternal&&(this._hasFocusInternal=c,c?this._onFocus.next({chip:this}):this._ngZone.onStable.pipe((0,O.s)(1)).subscribe(()=>this._ngZone.run(()=>this._onBlur.next({chip:this}))))})}static{this.\u0275fac=function(c){return new(c||a)(t.rXU(t.gRc),t.rXU(t.aKT),t.rXU(t.SKi),t.rXU(I.FN),t.rXU(g.qQ),t.rXU(t.bc$,8),t.rXU(p.$E,8),t.kS0("tabindex"))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["mat-basic-chip"],["","mat-basic-chip",""],["mat-chip"],["","mat-chip",""]],contentQueries:function(c,e,o){if(1&c&&(t.wni(o,z,5),t.wni(o,L,5),t.wni(o,V,5),t.wni(o,z,5),t.wni(o,L,5),t.wni(o,V,5)),2&c){let r;t.mGM(r=t.lsd())&&(e.leadingIcon=r.first),t.mGM(r=t.lsd())&&(e.trailingIcon=r.first),t.mGM(r=t.lsd())&&(e.removeIcon=r.first),t.mGM(r=t.lsd())&&(e._allLeadingIcons=r),t.mGM(r=t.lsd())&&(e._allTrailingIcons=r),t.mGM(r=t.lsd())&&(e._allRemoveIcons=r)}},viewQuery:function(c,e){if(1&c&&t.GBs(x,5),2&c){let o;t.mGM(o=t.lsd())&&(e.primaryAction=o.first)}},hostAttrs:[1,"mat-mdc-chip"],hostVars:30,hostBindings:function(c,e){1&c&&t.bIt("keydown",function(r){return e._handleKeydown(r)}),2&c&&(t.Mr5("id",e.id),t.BMQ("role",e.role)("tabindex",e.role?e.tabIndex:null)("aria-label",e.ariaLabel),t.AVh("mdc-evolution-chip",!e._isBasicChip)("mdc-evolution-chip--disabled",e.disabled)("mdc-evolution-chip--with-trailing-action",e._hasTrailingIcon())("mdc-evolution-chip--with-primary-graphic",e.leadingIcon)("mdc-evolution-chip--with-primary-icon",e.leadingIcon)("mdc-evolution-chip--with-avatar",e.leadingIcon)("mat-mdc-chip-with-avatar",e.leadingIcon)("mat-mdc-chip-highlighted",e.highlighted)("mat-mdc-chip-disabled",e.disabled)("mat-mdc-basic-chip",e._isBasicChip)("mat-mdc-standard-chip",!e._isBasicChip)("mat-mdc-chip-with-trailing-icon",e._hasTrailingIcon())("_mat-animation-noopable",e._animationsDisabled))},inputs:{color:"color",disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",role:"role",id:"id",ariaLabel:["aria-label","ariaLabel"],ariaDescription:["aria-description","ariaDescription"],value:"value",removable:"removable",highlighted:"highlighted"},outputs:{removed:"removed",destroyed:"destroyed"},exportAs:["matChip"],features:[t.Jv_([{provide:S,useExisting:a}]),t.Vt3],ngContentSelectors:s,decls:8,vars:3,consts:[[1,"mat-mdc-chip-focus-overlay"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--primary"],["matChipAction","",3,"isInteractive"],["class","mdc-evolution-chip__graphic mat-mdc-chip-graphic",4,"ngIf"],[1,"mdc-evolution-chip__text-label","mat-mdc-chip-action-label"],[1,"mat-mdc-chip-primary-focus-indicator","mat-mdc-focus-indicator"],["class","mdc-evolution-chip__cell mdc-evolution-chip__cell--trailing",4,"ngIf"],[1,"mdc-evolution-chip__graphic","mat-mdc-chip-graphic"],[1,"mdc-evolution-chip__cell","mdc-evolution-chip__cell--trailing"]],template:function(c,e){1&c&&(t.NAR(_),t.nrm(0,"span",0),t.j41(1,"span",1)(2,"span",2),t.DNE(3,U,2,0,"span",3),t.j41(4,"span",4),t.SdG(5),t.nrm(6,"span",5),t.k0s()()(),t.DNE(7,d,2,0,"span",6)),2&c&&(t.R7$(2),t.Y8G("isInteractive",!1),t.R7$(1),t.Y8G("ngIf",e.leadingIcon),t.R7$(4),t.Y8G("ngIf",e._hasTrailingIcon()))},dependencies:[g.bT,x],styles:['.mdc-evolution-chip,.mdc-evolution-chip__cell,.mdc-evolution-chip__action{display:inline-flex;align-items:center}.mdc-evolution-chip{position:relative;max-width:100%}.mdc-evolution-chip .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-evolution-chip__cell,.mdc-evolution-chip__action{height:100%}.mdc-evolution-chip__cell--primary{overflow-x:hidden}.mdc-evolution-chip__cell--trailing{flex:1 0 auto}.mdc-evolution-chip__action{align-items:center;background:none;border:none;box-sizing:content-box;cursor:pointer;display:inline-flex;justify-content:center;outline:none;padding:0;text-decoration:none;color:inherit}.mdc-evolution-chip__action--presentational{cursor:auto}.mdc-evolution-chip--disabled,.mdc-evolution-chip__action:disabled{pointer-events:none}.mdc-evolution-chip__action--primary{overflow-x:hidden}.mdc-evolution-chip__action--trailing{position:relative;overflow:visible}.mdc-evolution-chip__action--primary:before{box-sizing:border-box;content:"";height:100%;left:0;position:absolute;pointer-events:none;top:0;width:100%;z-index:1}.mdc-evolution-chip--touch{margin-top:8px;margin-bottom:8px}.mdc-evolution-chip__action-touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-evolution-chip__text-label{white-space:nowrap;user-select:none;text-overflow:ellipsis;overflow:hidden}.mdc-evolution-chip__graphic{align-items:center;display:inline-flex;justify-content:center;overflow:hidden;pointer-events:none;position:relative;flex:1 0 auto}.mdc-evolution-chip__checkmark{position:absolute;opacity:0;top:50%;left:50%}.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--selected):not(.mdc-evolution-chip--with-primary-icon) .mdc-evolution-chip__graphic{width:0}.mdc-evolution-chip__checkmark-background{opacity:0}.mdc-evolution-chip__checkmark-svg{display:block}.mdc-evolution-chip__checkmark-path{stroke-width:2px;stroke-dasharray:29.7833385;stroke-dashoffset:29.7833385;stroke:currentColor}.mdc-evolution-chip--selecting .mdc-evolution-chip__graphic{transition:width 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark{transition:transform 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--selecting .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__graphic{transition:width 100ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__checkmark{transition:opacity 50ms 0ms linear,transform 100ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-75%, -50%)}.mdc-evolution-chip--deselecting .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.mdc-evolution-chip--selecting-with-primary-icon .mdc-evolution-chip__icon--primary{transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--selecting-with-primary-icon .mdc-evolution-chip__checkmark-path{transition:stroke-dashoffset 150ms 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__icon--primary{transition:opacity 150ms 75ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__checkmark{transition:opacity 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);transform:translate(-50%, -50%)}.mdc-evolution-chip--deselecting-with-primary-icon .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}.mdc-evolution-chip--selected .mdc-evolution-chip__icon--primary{opacity:0}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark{transform:translate(-50%, -50%);opacity:1}.mdc-evolution-chip--selected .mdc-evolution-chip__checkmark-path{stroke-dashoffset:0}@keyframes mdc-evolution-chip-enter{from{transform:scale(0.8);opacity:.4}to{transform:scale(1);opacity:1}}.mdc-evolution-chip--enter{animation:mdc-evolution-chip-enter 100ms 0ms cubic-bezier(0, 0, 0.2, 1)}@keyframes mdc-evolution-chip-exit{from{opacity:1}to{opacity:0}}.mdc-evolution-chip--exit{animation:mdc-evolution-chip-exit 75ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-evolution-chip--hidden{opacity:0;pointer-events:none;transition:width 150ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mat-mdc-standard-chip{border-radius:var(--mdc-chip-container-shape-radius);height:var(--mdc-chip-container-height);--mdc-chip-container-shape-family:rounded;--mdc-chip-container-shape-radius:16px 16px 16px 16px;--mdc-chip-with-avatar-avatar-shape-family:rounded;--mdc-chip-with-avatar-avatar-shape-radius:14px 14px 14px 14px;--mdc-chip-with-avatar-avatar-size:28px;--mdc-chip-with-icon-icon-size:18px}.mat-mdc-standard-chip .mdc-evolution-chip__ripple{border-radius:var(--mdc-chip-container-shape-radius)}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary:before{border-radius:var(--mdc-chip-container-shape-radius)}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{border-radius:var(--mdc-chip-with-avatar-avatar-shape-radius)}.mat-mdc-standard-chip.mdc-evolution-chip--selectable:not(.mdc-evolution-chip--with-primary-icon){--mdc-chip-graphic-selected-width:var(--mdc-chip-with-avatar-avatar-size)}.mat-mdc-standard-chip .mdc-evolution-chip__graphic{height:var(--mdc-chip-with-avatar-avatar-size);width:var(--mdc-chip-with-avatar-avatar-size);font-size:var(--mdc-chip-with-avatar-avatar-size)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled){background-color:var(--mdc-chip-elevated-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled{background-color:var(--mdc-chip-elevated-disabled-container-color)}.mat-mdc-standard-chip .mdc-evolution-chip__text-label{font-family:var(--mdc-chip-label-text-font);line-height:var(--mdc-chip-label-text-line-height);font-size:var(--mdc-chip-label-text-size);font-weight:var(--mdc-chip-label-text-weight);letter-spacing:var(--mdc-chip-label-text-tracking)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__text-label{color:var(--mdc-chip-label-text-color)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color)}.mat-mdc-standard-chip.mdc-evolution-chip--selected.mdc-evolution-chip--disabled .mdc-evolution-chip__text-label{color:var(--mdc-chip-disabled-label-text-color)}.mat-mdc-standard-chip .mdc-evolution-chip__icon--primary{height:var(--mdc-chip-with-icon-icon-size);width:var(--mdc-chip-with-icon-icon-size);font-size:var(--mdc-chip-with-icon-icon-size)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-icon-color)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--primary{color:var(--mdc-chip-with-icon-disabled-icon-color)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-disabled-icon-color)}.mat-mdc-standard-chip:not(.mdc-evolution-chip--disabled) .mdc-evolution-chip__icon--trailing{color:var(--mdc-chip-with-trailing-icon-trailing-icon-color)}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__icon--trailing{color:var(--mdc-chip-with-trailing-icon-disabled-trailing-icon-color)}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary.mdc-ripple-upgraded--background-focused .mdc-evolution-chip__ripple::before,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary:not(.mdc-ripple-upgraded):focus .mdc-evolution-chip__ripple::before{transition-duration:75ms;opacity:var(--mdc-chip-focus-state-layer-opacity)}.mat-mdc-chip-focus-overlay{background:var(--mdc-chip-focus-state-layer-color);opacity:var(--mdc-chip-focus-state-layer-opacity)}.mat-mdc-standard-chip .mdc-evolution-chip__checkmark{height:20px;width:20px}.mat-mdc-standard-chip .mdc-evolution-chip__icon--trailing{height:18px;width:18px;font-size:18px}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic[dir=rtl]{padding-left:6px;padding-right:6px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:0}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:12px;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:12px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:6px;padding-right:6px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic[dir=rtl]{padding-left:6px;padding-right:6px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:0}.mat-mdc-standard-chip.mdc-evolution-chip--disabled .mdc-evolution-chip__checkmark{color:var(--mdc-chip-with-icon-selected-icon-color, currentColor)}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__graphic[dir=rtl]{padding-left:8px;padding-right:4px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary{padding-left:0;padding-right:12px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:12px;padding-right:0}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic{padding-left:4px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__graphic[dir=rtl]{padding-left:8px;padding-right:4px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing{padding-left:8px;padding-right:8px}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--trailing[dir=rtl]{padding-left:8px;padding-right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing{left:8px;right:initial}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__ripple--trailing[dir=rtl]{left:initial;right:8px}.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary{padding-left:0;padding-right:0}[dir=rtl] .mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary,.mdc-evolution-chip--with-avatar.mdc-evolution-chip--with-primary-graphic.mdc-evolution-chip--with-trailing-action .mdc-evolution-chip__action--primary[dir=rtl]{padding-left:0;padding-right:0}.mat-mdc-standard-chip{-webkit-tap-highlight-color:rgba(0,0,0,0)}.cdk-high-contrast-active .mat-mdc-standard-chip{outline:solid 1px}.cdk-high-contrast-active .mat-mdc-standard-chip .mdc-evolution-chip__checkmark-path{stroke:CanvasText !important}.mat-mdc-standard-chip.mdc-evolution-chip--disabled{opacity:.4}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,.mat-mdc-standard-chip .mdc-evolution-chip__action--primary,.mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:visible}.mat-mdc-standard-chip .mdc-evolution-chip__cell--primary{flex-basis:100%}.mat-mdc-standard-chip .mdc-evolution-chip__action--primary{font:inherit;letter-spacing:inherit;white-space:inherit}.mat-mdc-standard-chip .mat-mdc-chip-graphic,.mat-mdc-standard-chip .mat-mdc-chip-trailing-icon{box-sizing:content-box}.mat-mdc-standard-chip._mat-animation-noopable,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__graphic,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark,.mat-mdc-standard-chip._mat-animation-noopable .mdc-evolution-chip__checkmark-path{transition-duration:1ms;animation-duration:1ms}.mat-mdc-basic-chip .mdc-evolution-chip__action--primary{font:inherit}.mat-mdc-chip-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;opacity:0;border-radius:inherit;transition:opacity 150ms linear}._mat-animation-noopable .mat-mdc-chip-focus-overlay{transition:none}.mat-mdc-basic-chip .mat-mdc-chip-focus-overlay{display:none}.mat-mdc-chip:hover .mat-mdc-chip-focus-overlay{opacity:.04}.mat-mdc-chip.cdk-focused .mat-mdc-chip-focus-overlay{opacity:.12}.mat-mdc-chip .mat-ripple.mat-mdc-chip-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-chip-avatar{text-align:center;line-height:1;color:var(--mdc-chip-with-icon-icon-color, currentColor)}.mat-mdc-chip{position:relative;z-index:0}.mat-mdc-chip-action-label{text-align:left;z-index:1}[dir=rtl] .mat-mdc-chip-action-label{text-align:right}.mat-mdc-chip.mdc-evolution-chip--with-trailing-action .mat-mdc-chip-action-label{position:relative}.mat-mdc-chip-action-label .mat-mdc-chip-primary-focus-indicator{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none}.mat-mdc-chip-action-label .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-chip-remove{opacity:.54}.mat-mdc-chip-remove:focus{opacity:1}.mat-mdc-chip-remove::before{margin:calc(var(--mat-mdc-focus-indicator-border-width, 3px) * -1);left:8px;right:8px}.mat-mdc-chip-remove .mat-icon{width:inherit;height:inherit;font-size:inherit;box-sizing:content-box}.mat-chip-edit-input{cursor:text;display:inline-block;color:inherit;outline:0}.cdk-high-contrast-active .mat-mdc-chip-selected:not(.mat-mdc-chip-multiple){outline-width:3px}.mat-mdc-chip-action:focus .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}}return a})();class li{constructor(l){}}const pi=(0,p.BF)(li);let A=(()=>{class a extends pi{get chipFocusChanges(){return this._getChipStream(i=>i._onFocus)}get chipDestroyedChanges(){return this._getChipStream(i=>i.destroyed)}get disabled(){return this._disabled}set disabled(i){this._disabled=(0,n.he)(i),this._syncChipsState()}get empty(){return!this._chips||0===this._chips.length}get role(){return this._explicitRole?this._explicitRole:this.empty?null:this._defaultRole}set role(i){this._explicitRole=i}get focused(){return this._hasFocusedChip()}constructor(i,c,e){super(i),this._elementRef=i,this._changeDetectorRef=c,this._dir=e,this._lastDestroyedFocusedChipIndex=null,this._destroyed=new k.B,this._defaultRole="presentation",this._disabled=!1,this._explicitRole=null,this._chipActions=new t.rOR}ngAfterViewInit(){this._setUpFocusManagement(),this._trackChipSetChanges(),this._trackDestroyedFocusedChip()}ngOnDestroy(){this._keyManager?.destroy(),this._chipActions.destroy(),this._destroyed.next(),this._destroyed.complete()}_hasFocusedChip(){return this._chips&&this._chips.some(i=>i._hasFocus())}_syncChipsState(){this._chips&&this._chips.forEach(i=>{i.disabled=this._disabled,i._changeDetectorRef.markForCheck()})}focus(){}_handleKeydown(i){this._originatesFromChip(i)&&this._keyManager.onKeydown(i)}_isValidIndex(i){return i>=0&&ithis.tabIndex=i)}}_getChipStream(i){return this._chips.changes.pipe((0,b.Z)(null),(0,F.n)(()=>(0,M.h)(...this._chips.map(i))))}_originatesFromChip(i){let c=i.target;for(;c&&c!==this._elementRef.nativeElement;){if(c.classList.contains("mat-mdc-chip"))return!0;c=c.parentElement}return!1}_setUpFocusManagement(){this._chips.changes.pipe((0,b.Z)(this._chips)).subscribe(i=>{const c=[];i.forEach(e=>e._getActions().forEach(o=>c.push(o))),this._chipActions.reset(c),this._chipActions.notifyOnChanges()}),this._keyManager=new I.Bu(this._chipActions).withVerticalOrientation().withHorizontalOrientation(this._dir?this._dir.value:"ltr").withHomeAndEnd().skipPredicate(i=>this._skipPredicate(i)),this.chipFocusChanges.pipe((0,v.Q)(this._destroyed)).subscribe(({chip:i})=>{const c=i._getSourceAction(document.activeElement);c&&this._keyManager.updateActiveItem(c)}),this._dir?.change.pipe((0,v.Q)(this._destroyed)).subscribe(i=>this._keyManager.withHorizontalOrientation(i))}_skipPredicate(i){return!i.isInteractive||i.disabled}_trackChipSetChanges(){this._chips.changes.pipe((0,b.Z)(null),(0,v.Q)(this._destroyed)).subscribe(()=>{this.disabled&&Promise.resolve().then(()=>this._syncChipsState()),this._redirectDestroyedChipFocus()})}_trackDestroyedFocusedChip(){this.chipDestroyedChanges.pipe((0,v.Q)(this._destroyed)).subscribe(i=>{const e=this._chips.toArray().indexOf(i.chip);this._isValidIndex(e)&&i.chip._hasFocus()&&(this._lastDestroyedFocusedChipIndex=e)})}_redirectDestroyedChipFocus(){if(null!=this._lastDestroyedFocusedChipIndex){if(this._chips.length){const i=Math.min(this._lastDestroyedFocusedChipIndex,this._chips.length-1),c=this._chips.toArray()[i];c.disabled?1===this._chips.length?this.focus():this._keyManager.setPreviousItemActive():c.focus()}else this.focus();this._lastDestroyedFocusedChipIndex=null}}static{this.\u0275fac=function(c){return new(c||a)(t.rXU(t.aKT),t.rXU(t.gRc),t.rXU(G.dS,8))}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["mat-chip-set"]],contentQueries:function(c,e,o){if(1&c&&t.wni(o,w,5),2&c){let r;t.mGM(r=t.lsd())&&(e._chips=r)}},hostAttrs:[1,"mat-mdc-chip-set","mdc-evolution-chip-set"],hostVars:1,hostBindings:function(c,e){1&c&&t.bIt("keydown",function(r){return e._handleKeydown(r)}),2&c&&t.BMQ("role",e.role)},inputs:{disabled:"disabled",role:"role"},features:[t.Vt3],ngContentSelectors:P,decls:2,vars:0,consts:[["role","presentation",1,"mdc-evolution-chip-set__chips"]],template:function(c,e){1&c&&(t.NAR(),t.j41(0,"div",0),t.SdG(1),t.k0s())},styles:[".mdc-evolution-chip-set{display:flex}.mdc-evolution-chip-set:focus{outline:none}.mdc-evolution-chip-set__chips{display:flex;flex-flow:wrap;min-width:0}.mdc-evolution-chip-set--overflow .mdc-evolution-chip-set__chips{flex-flow:nowrap}.mdc-evolution-chip-set .mdc-evolution-chip-set__chips{margin-left:-8px;margin-right:0}[dir=rtl] .mdc-evolution-chip-set .mdc-evolution-chip-set__chips,.mdc-evolution-chip-set .mdc-evolution-chip-set__chips[dir=rtl]{margin-left:0;margin-right:-8px}.mdc-evolution-chip-set .mdc-evolution-chip{margin-left:8px;margin-right:0}[dir=rtl] .mdc-evolution-chip-set .mdc-evolution-chip,.mdc-evolution-chip-set .mdc-evolution-chip[dir=rtl]{margin-left:0;margin-right:8px}.mdc-evolution-chip-set .mdc-evolution-chip{margin-top:4px;margin-bottom:4px}.mat-mdc-chip-set .mdc-evolution-chip-set__chips{min-width:100%}.mat-mdc-chip-set-stacked{flex-direction:column;align-items:flex-start}.mat-mdc-chip-set-stacked .mat-mdc-chip{width:100%}.mat-mdc-chip-set-stacked .mdc-evolution-chip__graphic{flex-grow:0}.mat-mdc-chip-set-stacked .mdc-evolution-chip__action--primary{flex-basis:100%;justify-content:start}input.mat-mdc-chip-input{flex:1 0 150px;margin-left:8px}[dir=rtl] input.mat-mdc-chip-input{margin-left:0;margin-right:8px}"],encapsulation:2,changeDetection:0})}}return a})(),yi=(()=>{class a{static{this.\u0275fac=function(c){return new(c||a)}}static{this.\u0275mod=t.$C({type:a})}static{this.\u0275inj=t.G2t({providers:[p.es,{provide:D,useValue:{separatorKeyCodes:[u.Fm]}}],imports:[p.yE,g.MD,p.pZ,p.yE]})}}return a})()},69069:(X,T,h)=>{h.d(T,{D6:()=>y,LG:()=>u});var n=h(1843),t=h(42250),g=h(8275),p=h(18331);const I=["determinateSpinner"];function k(m,U){if(1&m&&(n.qSk(),n.j41(0,"svg",11),n.nrm(1,"circle",12),n.k0s()),2&m){const d=n.XpG();n.BMQ("viewBox",d._viewBox()),n.R7$(1),n.xc7("stroke-dasharray",d._strokeCircumference(),"px")("stroke-dashoffset",d._strokeCircumference()/2,"px")("stroke-width",d._circleStrokeWidth(),"%"),n.BMQ("r",d._circleRadius())}}const M=(0,t.Zc)(class{constructor(m){this._elementRef=m}},"primary"),O=new n.nKC("mat-progress-spinner-default-options",{providedIn:"root",factory:function v(){return{diameter:b}}}),b=100;let u=(()=>{class m extends M{constructor(d,_,s){super(d),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=b,this._noopAnimations="NoopAnimations"===_&&!!s&&!s._forceAnimations,s&&(s.color&&(this.color=this.defaultColor=s.color),s.diameter&&(this.diameter=s.diameter),s.strokeWidth&&(this.strokeWidth=s.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(d){this._value=Math.max(0,Math.min(100,(0,g.OE)(d)))}get diameter(){return this._diameter}set diameter(d){this._diameter=(0,g.OE)(d)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(d){this._strokeWidth=(0,g.OE)(d)}_circleRadius(){return(this.diameter-10)/2}_viewBox(){const d=2*this._circleRadius()+this.strokeWidth;return`0 0 ${d} ${d}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static{this.\u0275fac=function(_){return new(_||m)(n.rXU(n.aKT),n.rXU(n.bc$,8),n.rXU(O))}}static{this.\u0275cmp=n.VBU({type:m,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(_,s){if(1&_&&n.GBs(I,5),2&_){let f;n.mGM(f=n.lsd())&&(s._determinateCircle=f.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:16,hostBindings:function(_,s){2&_&&(n.BMQ("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===s.mode?s.value:null)("mode",s.mode),n.xc7("width",s.diameter,"px")("height",s.diameter,"px")("--mdc-circular-progress-size",s.diameter+"px")("--mdc-circular-progress-active-indicator-width",s.diameter+"px"),n.AVh("_mat-animation-noopable",s._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===s.mode))},inputs:{color:"color",mode:"mode",value:"value",diameter:"diameter",strokeWidth:"strokeWidth"},exportAs:["matProgressSpinner"],features:[n.Vt3],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(_,s){if(1&_&&(n.DNE(0,k,2,8,"ng-template",null,0,n.C5r),n.j41(2,"div",1,2),n.qSk(),n.j41(4,"svg",3),n.nrm(5,"circle",4),n.k0s()(),n.joV(),n.j41(6,"div",5)(7,"div",6)(8,"div",7),n.eu8(9,8),n.k0s(),n.j41(10,"div",9),n.eu8(11,8),n.k0s(),n.j41(12,"div",10),n.eu8(13,8),n.k0s()()()),2&_){const f=n.sdS(1);n.R7$(4),n.BMQ("viewBox",s._viewBox()),n.R7$(1),n.xc7("stroke-dasharray",s._strokeCircumference(),"px")("stroke-dashoffset",s._strokeDashOffset(),"px")("stroke-width",s._circleStrokeWidth(),"%"),n.BMQ("r",s._circleRadius()),n.R7$(4),n.Y8G("ngTemplateOutlet",f),n.R7$(2),n.Y8G("ngTemplateOutlet",f),n.R7$(2),n.Y8G("ngTemplateOutlet",f)}},dependencies:[p.T3],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner{--mdc-circular-progress-active-indicator-width:4px;--mdc-circular-progress-size:48px}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner .mdc-circular-progress{width:var(--mdc-circular-progress-size) !important;height:var(--mdc-circular-progress-size) !important}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0})}}return m})(),y=(()=>{class m{static{this.\u0275fac=function(_){return new(_||m)}}static{this.\u0275mod=n.$C({type:m})}static{this.\u0275inj=n.G2t({imports:[p.MD,t.yE]})}}return m})()}}]); \ No newline at end of file diff --git a/dist/2423.7c3a4e560ba29f26.js b/dist/2423.7c3a4e560ba29f26.js new file mode 100644 index 00000000..0874a765 --- /dev/null +++ b/dist/2423.7c3a4e560ba29f26.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2423],{12423:(O,m,i)=>{i.r(m),i.d(m,{DfSystemInfoComponent:()=>r});var f=i(31635),l=i(60177),c=i(33609),p=i(49894),n=i(17705),_=i(52608),v=i(82298),g=i(14543);function y(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" ",n.bMT(2,2,"systemInfo.instance.licenseKey"),": ",null==e.environment.platform?null:e.environment.platform.licenseKey," ")}}function I(o,s){if(1&o&&(n.qex(0),n.j41(1,"li"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"li"),n.EFF(5),n.nI1(6,"transloco"),n.k0s(),n.bVm()),2&o){const e=n.XpG();n.R7$(2),n.Lme(" ",n.bMT(3,4,"systemInfo.instance.subscriptionStatus"),": ",e.status.msg," "),n.R7$(3),n.Lme(" ",n.bMT(6,6,"systemInfo.instance.subscriptionExpirationDate"),": ",e.status.renewalDate," ")}}function d(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" ",n.bMT(2,2,"systemInfo.instance.systemDatabase"),": ",null==e.environment.platform?null:e.environment.platform.dbDriver," ")}}function u(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" ",n.bMT(2,2,"systemInfo.instance.installPath"),": ",null==e.environment.platform?null:e.environment.platform.installPath," ")}}function M(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" ",n.bMT(2,2,"systemInfo.instance.logPath"),": ",null==e.environment.platform?null:e.environment.platform.logPath," ")}}function C(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" ",n.bMT(2,2,"systemInfo.instance.logMode"),": ",null==e.environment.platform?null:e.environment.platform.logMode," ")}}function F(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" ",n.bMT(2,2,"systemInfo.instance.logLevel"),": ",null==e.environment.platform?null:e.environment.platform.logLevel," ")}}function E(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" ",n.bMT(2,2,"systemInfo.instance.cacheDriver"),": ",null==e.environment.platform?null:e.environment.platform.cacheDriver," ")}}function P(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" ",n.bMT(2,2,"systemInfo.instance.demo"),": ",null==e.environment.platform?null:e.environment.platform.isTrial," ")}}function h(o,s){if(1&o&&(n.j41(0,"li"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&o){const e=n.XpG();n.R7$(1),n.Lme(" DreamFactory ",n.bMT(2,2,"systemInfo.instance.instanceId"),": ",null==e.environment.platform?null:e.environment.platform.dfInstanceId," ")}}function R(o,s){if(1&o&&(n.j41(0,"li")(1,"span"),n.EFF(2),n.k0s(),n.j41(3,"span"),n.EFF(4),n.k0s()()),2&o){const e=s.$implicit;n.R7$(2),n.JRh(e.name),n.R7$(2),n.JRh(e.version)}}function b(o,s){if(1&o&&(n.j41(0,"div",7)(1,"h3"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"div",8)(5,"span"),n.EFF(6),n.nI1(7,"transloco"),n.k0s(),n.j41(8,"span"),n.EFF(9),n.nI1(10,"transloco"),n.k0s()(),n.j41(11,"div",9)(12,"ul"),n.DNE(13,R,5,2,"li",10),n.k0s()()()),2&o){const e=n.XpG();n.R7$(2),n.JRh(n.bMT(3,4,"systemInfo.packages")),n.R7$(4),n.JRh(n.bMT(7,6,"name")),n.R7$(3),n.JRh(n.bMT(10,8,"version")),n.R7$(4),n.Y8G("ngForOf",null==e.environment.platform?null:e.environment.platform.packages)}}function D(o,s){if(1&o&&(n.qex(0),n.j41(1,"li"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"li"),n.EFF(5),n.nI1(6,"transloco"),n.k0s(),n.bVm()),2&o){const e=n.XpG();n.R7$(2),n.Lme(" PHP ",n.bMT(3,4,"version"),": ",e.environment.php.core.phpVersion," "),n.R7$(3),n.Lme(" PHP ",n.bMT(6,6,"systemInfo.server.serverApi"),": ",e.environment.php.general.serverApi," ")}}let r=class a{constructor(s,e,t){this.breakpointService=s,this.systemConfigDataService=e,this.licenseCheckService=t,this.environment=this.systemConfigDataService.environment}ngOnInit(){this.licenseCheckService.licenseCheck$.subscribe(s=>{this.status=s||void 0})}static{this.\u0275fac=function(e){return new(e||a)(n.rXU(_.R),n.rXU(v.f),n.rXU(g.H))}}static{this.\u0275cmp=n.VBU({type:a,selectors:[["df-system-info"]],standalone:!0,features:[n.aNF],decls:63,vars:68,consts:[[1,"system-info-container"],[1,"system-info-instance"],[1,"system-info-platform"],[4,"ngIf"],["class","system-info-packages",4,"ngIf"],[1,"system-info-server"],[1,"system-info-client"],[1,"system-info-packages"],[1,"package-header"],[1,"overflow-scroll"],[4,"ngFor","ngForOf"]],template:function(e,t){1&e&&(n.j41(0,"div",0)(1,"p"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"h2"),n.EFF(5),n.nI1(6,"transloco"),n.k0s(),n.j41(7,"div",1),n.nI1(8,"async"),n.j41(9,"div",2)(10,"ul")(11,"li"),n.EFF(12),n.nI1(13,"transloco"),n.k0s(),n.DNE(14,y,3,4,"li",3),n.DNE(15,I,7,8,"ng-container",3),n.j41(16,"li"),n.EFF(17),n.nI1(18,"transloco"),n.k0s(),n.DNE(19,d,3,4,"li",3),n.DNE(20,u,3,4,"li",3),n.DNE(21,M,3,4,"li",3),n.DNE(22,C,3,4,"li",3),n.DNE(23,F,3,4,"li",3),n.DNE(24,E,3,4,"li",3),n.DNE(25,P,3,4,"li",3),n.DNE(26,h,3,4,"li",3),n.k0s()(),n.DNE(27,b,14,10,"div",4),n.k0s(),n.j41(28,"h2"),n.EFF(29),n.nI1(30,"transloco"),n.k0s(),n.j41(31,"div",5)(32,"ul")(33,"li"),n.EFF(34),n.nI1(35,"transloco"),n.k0s(),n.j41(36,"li"),n.EFF(37),n.nI1(38,"transloco"),n.k0s(),n.j41(39,"li"),n.EFF(40),n.nI1(41,"transloco"),n.k0s(),n.j41(42,"li"),n.EFF(43),n.nI1(44,"transloco"),n.k0s(),n.j41(45,"li"),n.EFF(46),n.nI1(47,"transloco"),n.k0s(),n.DNE(48,D,7,8,"ng-container",3),n.k0s()(),n.j41(49,"h2"),n.EFF(50),n.nI1(51,"transloco"),n.k0s(),n.j41(52,"div",6)(53,"ul")(54,"li"),n.EFF(55),n.nI1(56,"transloco"),n.k0s(),n.j41(57,"li"),n.EFF(58),n.nI1(59,"transloco"),n.k0s(),n.j41(60,"li"),n.EFF(61),n.nI1(62,"transloco"),n.k0s()()()()),2&e&&(n.R7$(2),n.SpI(" ",n.bMT(3,38,"systemInfo.subheading")," "),n.R7$(3),n.SpI("DreamFactory ",n.bMT(6,40,"systemInfo.instance.instance"),""),n.R7$(2),n.AVh("x-small",n.bMT(8,42,t.breakpointService.isXSmallScreen)),n.R7$(5),n.Lme(" ",n.bMT(13,44,"systemInfo.instance.licenseLevel"),": ",null==t.environment.platform?null:t.environment.platform.license," "),n.R7$(2),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.licenseKey),n.R7$(1),n.Y8G("ngIf",t.status),n.R7$(2),n.Lme(" DreamFactory ",n.bMT(18,46,"version"),": ",null==t.environment.platform?null:t.environment.platform.version," "),n.R7$(2),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.dbDriver),n.R7$(1),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.installPath),n.R7$(1),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.logPath),n.R7$(1),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.logMode),n.R7$(1),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.logLevel),n.R7$(1),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.cacheDriver),n.R7$(1),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.isTrial),n.R7$(1),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.dfInstanceId),n.R7$(1),n.Y8G("ngIf",null==t.environment.platform?null:t.environment.platform.packages),n.R7$(2),n.JRh(n.bMT(30,48,"systemInfo.server.heading")),n.R7$(5),n.Lme(" ",n.bMT(35,50,"systemInfo.server.os"),": ",t.environment.server.serverOs," "),n.R7$(3),n.Lme(" ",n.bMT(38,52,"systemInfo.server.release"),": ",t.environment.server.release," "),n.R7$(3),n.Lme("",n.bMT(41,54,"version"),": ",t.environment.server.version,""),n.R7$(3),n.Lme(" ",n.bMT(44,56,"systemInfo.server.host"),": ",t.environment.server.host," "),n.R7$(3),n.Lme(" ",n.bMT(47,58,"systemInfo.server.machine"),": ",t.environment.server.machine," "),n.R7$(2),n.Y8G("ngIf",t.environment.php),n.R7$(2),n.JRh(n.bMT(51,60,"systemInfo.client.heading")),n.R7$(5),n.Lme(" ",n.bMT(56,62,"systemInfo.client.userAgent"),": ",null==t.environment.client?null:t.environment.client.userAgent," "),n.R7$(3),n.Lme(" ",n.bMT(59,64,"systemInfo.client.ipAddress"),": ",null==t.environment.client?null:t.environment.client.ipAddress," "),n.R7$(3),n.Lme(" ",n.bMT(62,66,"systemInfo.client.Locale"),": ",null==t.environment.client?null:t.environment.client.locale," "))},dependencies:[l.Jj,l.pM,c.Kj,l.bT],styles:[".system-info-container[_ngcontent-%COMP%]{color:var(--df-text);padding-bottom:32px}.system-info-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{list-style-type:none;padding:0;margin:0}.system-info-container[_ngcontent-%COMP%] ul[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{line-height:3rem}.system-info-container[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border);padding-bottom:10px}.system-info-container[_ngcontent-%COMP%] .system-info-instance[_ngcontent-%COMP%]{display:flex;gap:20px;justify-content:space-between;margin-bottom:20px}.system-info-container[_ngcontent-%COMP%] .system-info-instance[_ngcontent-%COMP%] .system-info-packages[_ngcontent-%COMP%]{padding-left:20px;border-left:1px dashed var(--df-border);max-width:40%}.system-info-container[_ngcontent-%COMP%] .system-info-instance[_ngcontent-%COMP%] .system-info-packages[_ngcontent-%COMP%] .package-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-weight:700;border-bottom:2px solid var(--df-border);padding-bottom:5px;margin-bottom:5px}.system-info-container[_ngcontent-%COMP%] .system-info-instance[_ngcontent-%COMP%] .system-info-packages[_ngcontent-%COMP%] .overflow-scroll[_ngcontent-%COMP%]{height:300px;overflow:auto}.system-info-container[_ngcontent-%COMP%] .system-info-instance[_ngcontent-%COMP%] .system-info-packages[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:10px;padding-bottom:.2rem;border-bottom:1px dotted var(--df-border-2)}.system-info-container[_ngcontent-%COMP%] .system-info-instance.x-small[_ngcontent-%COMP%]{flex-direction:column;gap:10px}.system-info-container[_ngcontent-%COMP%] .system-info-instance.x-small[_ngcontent-%COMP%] .system-info-platform[_ngcontent-%COMP%]{max-width:100%}.system-info-container[_ngcontent-%COMP%] .system-info-instance.x-small[_ngcontent-%COMP%] .system-info-packages[_ngcontent-%COMP%]{max-width:100%;padding-left:0;border-left:none}.system-info-container[_ngcontent-%COMP%] .system-info-instance.x-small[_ngcontent-%COMP%] .system-info-packages[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding:10px 10px 0}.system-info-container[_ngcontent-%COMP%] .system-info-server[_ngcontent-%COMP%]{margin:20px 0}"]})}};r=(0,f.Cg)([(0,p.d)({checkProperties:!0})],r)}}]); \ No newline at end of file diff --git a/dist/2430.f7d33b75ef0f9d4a.js b/dist/2430.f7d33b75ef0f9d4a.js deleted file mode 100644 index e3935a47..00000000 --- a/dist/2430.f7d33b75ef0f9d4a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2430],{2430:(Yn,h,c)=>{c.r(h),c.d(h,{DfManageCorsTableComponent:()=>M});var k=c(21406),$=c(75066),g=c(63956),y=c(88236),N=c(97828),n=c(1843),u=c(11863),X=c(83607),E=c(31147),I=c(62633),d=c(18331),m=c(68660),x=c(54342),r=c(58497),f=c(87621),p=c(78227),G=c(1929),b=c(54688),R=c(453),C=c(82180),P=c(4965),O=c(91900),S=c(42250);function F(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){n.eBV(t);const _=n.XpG();return n.Njj(_.createRow())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"newEntry")),n.R7$(2),n.Y8G("icon",t.faPlus)}}function j(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",8),n.bIt("click",function(){n.eBV(t);const _=n.XpG();return n.Njj(_.refreshSchema())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"importList")),n.R7$(2),n.Y8G("icon",t.faRefresh)}}function Y(e,o){if(1&e&&(n.j41(0,"mat-option",13),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=o.$implicit;n.Y8G("value",t.value),n.R7$(1),n.SpI(" ",n.bMT(2,2,t.label)," ")}}function w(e,o){if(1&e&&(n.j41(0,"mat-form-field",10)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"mat-select",11),n.DNE(5,Y,3,4,"mat-option",12),n.k0s()()),2&e){const t=n.XpG().ngIf;n.R7$(2),n.JRh(n.bMT(3,3,"accessUsage.filter.label")),n.R7$(2),n.Y8G("formControl",t.filter),n.R7$(1),n.Y8G("ngForOf",t.filterOptions)}}function B(e,o){if(1&e&&(n.qex(0),n.DNE(1,w,6,5,"mat-form-field",9),n.bVm()),2&e){const t=o.ngIf;n.R7$(1),n.Y8G("ngIf",t.available)}}function V(e,o){if(1&e&&(n.j41(0,"mat-form-field",14)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"input",15),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"search")),n.R7$(2),n.Y8G("formControl",t.currentFilter)}}function A(e,o){1&e&&n.nrm(0,"mat-progress-bar",26)}function U(e,o){if(1&e){const t=n.RV6();n.j41(0,"div",27)(1,"div",28),n.nrm(2,"fa-icon",29),n.j41(3,"span"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.j41(6,"button",30),n.bIt("click",function(){n.eBV(t);const _=n.XpG(2);return n.Njj(_.retryLastFetch())}),n.EFF(7),n.nI1(8,"transloco"),n.k0s()(),n.nrm(9,"df-error-detail",31),n.k0s()}if(2&e){const t=n.XpG(2);n.R7$(2),n.Y8G("icon",t.faTriangleExclamation),n.R7$(2),n.JRh(n.bMT(5,4,t.tableError.message)),n.R7$(3),n.SpI(" ",n.bMT(8,6,"retry")," "),n.R7$(2),n.Y8G("error",t.tableError)}}function L(e,o){if(1&e&&(n.j41(0,"th",37),n.nI1(1,"async"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.BMQ("sortActionDescription",n.bMT(1,4,a.sortDescription(t.header))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.header)," ")}}function K(e,o){if(1&e&&n.nrm(0,"fa-icon",29),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit,_=n.XpG(2);n.HbH(_.isCellActive(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",_.activeIcon(_.isCellActive(null==a?null:a.cell(t))))}}function W(e,o){if(1&e&&(n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,null!=a&&a.cell(t)?"confirmed":"pending")," ")}}function z(e,o){if(1&e&&(n.qex(0),n.EFF(1),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",null==a?null:a.cell(t)," ")}}function H(e,o){if(1&e&&n.nrm(0,"df-access-usage-cell",41),2&e){const t=n.XpG().$implicit,a=n.XpG(4);let _,i;n.Y8G("usage",null==a.accessUsage?null:a.accessUsage.get(t.id))("staleDays",null!==(_=null==a.accessUsage?null:a.accessUsage.staleDays)&&void 0!==_?_:null)("trackingStartedAt",null!==(i=null==a.accessUsage?null:a.accessUsage.trackingStartedAt)&&void 0!==i?i:null)}}function Q(e,o){if(1&e&&n.nrm(0,"fa-icon",43),2&e){const t=n.XpG(6);n.Y8G("icon",t.faTriangleExclamation)}}function J(e,o){1&e&&(n.j41(0,"span"),n.EFF(1),n.k0s()),2&e&&(n.R7$(1),n.JRh("-"))}function Z(e,o){if(1&e&&(n.qex(0),n.DNE(1,Q,1,1,"fa-icon",42),n.DNE(2,J,2,1,"span",4),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.Y8G("ngIf",!(null==a||!a.cell(t))),n.R7$(1),n.Y8G("ngIf",!(null!=a&&a.cell(t)))}}function q(e,o){if(1&e&&(n.j41(0,"td",38),n.DNE(1,K,1,3,"fa-icon",39),n.DNE(2,W,3,3,"ng-container",4),n.DNE(3,z,2,1,"ng-container",4),n.DNE(4,H,1,3,"df-access-usage-cell",40),n.DNE(5,Z,3,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.R7$(1),n.Y8G("ngIf","active"===t.columnDef),n.R7$(1),n.Y8G("ngIf","registration"===t.columnDef),n.R7$(1),n.Y8G("ngIf","active"!==t.columnDef&&"registration"!==t.columnDef&&"log"!==t.columnDef&&"lastUsed"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","lastUsed"===t.columnDef),n.R7$(1),n.Y8G("ngIf","log"===t.columnDef)}}function nn(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,L,4,8,"th",35),n.DNE(2,q,6,7,"td",36),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function tn(e,o){if(1&e&&(n.j41(0,"th",46),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,t.header)," ")}}function en(e,o){if(1&e&&(n.j41(0,"a",53),n.bIt("click",function(a){return a.stopPropagation()}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=o.$implicit;n.Y8G("routerLink",t.fix)("disabled",!t.fix),n.R7$(1),n.SpI(" ",n.bMT(2,3,"services.health.rules."+t.id)," ")}}function an(e,o){if(1&e&&(n.qex(0),n.j41(1,"button",49),n.bIt("click",function(a){return a.stopPropagation()}),n.nI1(2,"transloco"),n.nrm(3,"df-badge",50),n.nI1(4,"transloco"),n.k0s(),n.j41(5,"mat-menu",null,51),n.DNE(7,en,3,5,"a",52),n.k0s(),n.bVm()),2&e){const t=n.sdS(6),a=n.XpG().ngIf;n.R7$(1),n.Y8G("matMenuTriggerFor",t),n.BMQ("aria-label",n.bMT(2,5,"services.health.whyAria")),n.R7$(2),n.Y8G("variant",a.level)("label",n.bMT(4,7,"services.health.level."+a.level)),n.R7$(4),n.Y8G("ngForOf",a.rules)}}function on(e,o){if(1&e&&(n.nrm(0,"df-badge",50),n.nI1(1,"transloco")),2&e){const t=n.XpG(2).$implicit;n.Y8G("variant","ok"===t.probe?"success":"neutral")("label",n.bMT(1,2,"ok"===t.probe?"services.health.level.success":"unsupported"===t.probe?"services.health.chip.notChecked":"services.health.chip.checking"))}}function _n(e,o){if(1&e&&(n.qex(0),n.DNE(1,an,8,9,"ng-container",47),n.DNE(2,on,2,4,"ng-template",null,48,n.C5r),n.bVm()),2&e){const t=o.ngIf,a=n.sdS(3);n.R7$(1),n.Y8G("ngIf",t.rules.length)("ngIfElse",a)}}function cn(e,o){if(1&e&&(n.j41(0,"td",38),n.DNE(1,_n,4,2,"ng-container",4),n.k0s()),2&e){const t=o.$implicit;n.R7$(1),n.Y8G("ngIf",t.health)}}function rn(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,tn,3,3,"th",44),n.DNE(2,cn,2,1,"td",45),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function ln(e,o){1&e&&(n.j41(0,"th",46),n.EFF(1," Scripting "),n.k0s())}function sn(e,o){if(1&e){const t=n.RV6();n.j41(0,"td",56)(1,"fa-icon",57),n.bIt("click",function(){const i=n.eBV(t).$implicit,s=n.XpG(3).$implicit,l=n.XpG(2);let v;return n.Njj(l.goEventScriptsPage((null==s||null==(v=s.cell(i))?null:v.toString())||""))})("click",function(_){return _.stopPropagation()}),n.k0s()()}if(2&e){const t=o.$implicit,a=n.XpG(3).$implicit,_=n.XpG(2);n.R7$(1),n.HbH("not"!==(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",_.activeIcon("not"!==(null==a?null:a.cell(t))))}}function gn(e,o){1&e&&(n.qex(0),n.DNE(1,ln,2,0,"th",44),n.DNE(2,sn,2,3,"td",55),n.bVm())}function mn(e,o){1&e&&n.nrm(0,"th",59)}function fn(e,o){1&e&&n.nrm(0,"td",56)}function pn(e,o){1&e&&(n.DNE(0,mn,1,0,"th",58),n.DNE(1,fn,1,0,"td",55))}function un(e,o){if(1&e&&(n.qex(0,34),n.DNE(1,gn,3,0,"ng-container",47),n.DNE(2,pn,2,0,"ng-template",null,54,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG().$implicit,_=n.XpG(2);n.Y8G("matColumnDef",a.columnDef),n.R7$(1),n.Y8G("ngIf",_.isDatabase)("ngIfElse",t)}}function dn(e,o){1&e&&n.nrm(0,"th",59)}c(69099);const D=function(e){return{param:e}};function bn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",66),n.bIt("click",function(){n.eBV(t);const _=n.XpG(3).$implicit,i=n.XpG(4);return n.Njj(i.actions.additional[0].function(_))})("click",function(_){return _.stopPropagation()}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",67),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(5,D,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.Y8G("icon",t.actions.additional[0].icon)}}function Cn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",68),n.bIt("click",function(){n.eBV(t);const _=n.XpG(3).$implicit,i=n.XpG(4);return n.Njj(i.actions.additional[0].function(_))})("click",function(_){return _.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(7,D,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,5,t.actions.additional[0].label)," ")}}function Dn(e,o){if(1&e&&(n.qex(0),n.DNE(1,bn,3,7,"button",64),n.DNE(2,Cn,4,9,"ng-template",null,65,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(6);n.R7$(1),n.Y8G("ngIf",a.actions.additional[0].icon)("ngIfElse",t)}}function Mn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",72),n.bIt("click",function(){const i=n.eBV(t).$implicit,s=n.XpG(3).$implicit;return n.Njj(i.function(s))}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=o.$implicit,a=n.XpG(3).$implicit,_=n.XpG(4);n.Y8G("disabled",_.isActionDisabled(t,a)),n.BMQ("aria-label",n.i5U(1,3,t.ariaLabel.key,n.eq3(8,D,t.ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.label)," ")}}function Tn(e,o){if(1&e&&(n.j41(0,"button",69),n.bIt("click",function(a){return a.stopPropagation()}),n.nrm(1,"fa-icon",67),n.k0s(),n.j41(2,"mat-menu",null,70),n.DNE(4,Mn,4,10,"button",71),n.k0s()),2&e){const t=n.sdS(3),a=n.XpG(6);n.Y8G("matMenuTriggerFor",t),n.R7$(1),n.Y8G("icon",a.faEllipsisV),n.R7$(3),n.Y8G("ngForOf",a.actions.additional)}}function hn(e,o){if(1&e&&(n.qex(0),n.DNE(1,Dn,4,2,"ng-container",47),n.DNE(2,Tn,5,3,"ng-template",null,63,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(5);n.R7$(1),n.Y8G("ngIf",1===a.actions.additional.length)("ngIfElse",t)}}function En(e,o){if(1&e&&(n.j41(0,"td",62),n.DNE(1,hn,4,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(4);n.R7$(1),n.Y8G("ngIf",t.actions.additional&&t.actions.additional.length>0)}}function In(e,o){if(1&e&&(n.qex(0,60),n.DNE(1,dn,1,0,"th",58),n.DNE(2,En,2,1,"td",61),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function xn(e,o){if(1&e&&(n.qex(0),n.DNE(1,nn,3,1,"ng-container",32),n.DNE(2,rn,3,1,"ng-container",32),n.DNE(3,un,4,3,"ng-container",32),n.DNE(4,In,3,1,"ng-container",33),n.bVm()),2&e){const t=o.$implicit;n.R7$(1),n.Y8G("ngIf","actions"!==t.columnDef&&"scripting"!==t.columnDef&&"health"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","health"===t.columnDef),n.R7$(1),n.Y8G("ngIf","scripting"===t.columnDef),n.R7$(1),n.Y8G("ngIf","actions"===t.columnDef)}}function Gn(e,o){1&e&&n.nrm(0,"tr",73)}function Rn(e,o){if(1&e){const t=n.RV6();n.j41(0,"tr",74),n.bIt("click",function(){const i=n.eBV(t).$implicit,s=n.XpG(2);return n.Njj(s.callDefaultAction(i))})("keydown",function(_){const s=n.eBV(t).$implicit,l=n.XpG(2);return n.Njj(l.handleKeyDown(_,s))}),n.k0s()}if(2&e){const t=o.$implicit,a=n.XpG(2);n.AVh("clickable",a.isClickable(t)),n.BMQ("tabindex",a.isClickable(t)?0:-1)}}function Pn(e,o){if(1&e){const t=n.RV6();n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.j41(3,"button",78),n.bIt("click",function(){n.eBV(t);const _=n.XpG(4);return n.Njj(_.clearFilter())}),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.bVm()}2&e&&(n.R7$(1),n.SpI(" ",n.bMT(2,2,"noFilterResults")," "),n.R7$(3),n.SpI(" ",n.bMT(5,4,"clearFilter")," "))}function On(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",84),n.bIt("click",function(){n.eBV(t);const _=n.XpG(6);return n.Njj(_.createRow())}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()}if(2&e){const t=n.XpG(6);n.R7$(1),n.SpI(" ",n.bMT(2,1,t.emptyStateActionLabel||"create")," ")}}function vn(e,o){if(1&e&&(n.j41(0,"div",81)(1,"p",82),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.DNE(4,On,3,3,"button",83),n.k0s()),2&e){const t=n.XpG(5);n.R7$(2),n.SpI(" ",n.bMT(3,2,t.emptyStateMessage)," "),n.R7$(2),n.Y8G("ngIf",t.allowCreate)}}function kn(e,o){if(1&e&&(n.EFF(0),n.nI1(1,"transloco")),2&e){const t=n.XpG(5);n.SpI(" ",n.bMT(1,1,t.allowCreate&&0===t.tableLength?"noEntriesCreate":"noEntries")," ")}}function $n(e,o){if(1&e&&(n.DNE(0,vn,5,4,"div",79),n.DNE(1,kn,2,3,"ng-template",null,80,n.C5r)),2&e){const t=n.sdS(2),a=n.XpG(4);n.Y8G("ngIf",a.emptyStateMessage)("ngIfElse",t)}}function yn(e,o){if(1&e&&(n.qex(0),n.DNE(1,Pn,6,6,"ng-container",47),n.DNE(2,$n,3,2,"ng-template",null,77,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(3);n.R7$(1),n.Y8G("ngIf",a.currentFilter.value||(null==a.accessUsage?null:a.accessUsage.filterActive))("ngIfElse",t)}}function Nn(e,o){if(1&e&&(n.j41(0,"tr",75)(1,"td",76),n.DNE(2,yn,4,2,"ng-container",4),n.k0s()()),2&e){const t=n.XpG(2);n.R7$(1),n.BMQ("colspan",t.columns.length),n.R7$(1),n.Y8G("ngIf","loading"!==t.tableState&&"error"!==t.tableState)}}function Xn(e,o){if(1&e){const t=n.RV6();n.qex(0),n.DNE(1,A,1,0,"mat-progress-bar",16),n.DNE(2,U,10,8,"div",17),n.j41(3,"div",18)(4,"table",19),n.bIt("matSortChange",function(_){n.eBV(t);const i=n.XpG();return n.Njj(i.announceSortChange(_))}),n.DNE(5,xn,5,4,"ng-container",20),n.DNE(6,Gn,1,0,"tr",21),n.DNE(7,Rn,1,3,"tr",22),n.DNE(8,Nn,3,2,"tr",23),n.k0s(),n.j41(9,"div",24)(10,"mat-paginator",25),n.bIt("page",function(_){n.eBV(t);const i=n.XpG();return n.Njj(i.changePage(_))}),n.k0s()()(),n.bVm()}if(2&e){const t=o.ngIf,a=n.XpG();n.R7$(1),n.Y8G("ngIf","loading"===a.tableState),n.R7$(1),n.Y8G("ngIf","error"===a.tableState&&a.tableError),n.R7$(1),n.AVh("table-stale","loading"===a.tableState),n.R7$(1),n.Y8G("dataSource",a.dataSource),n.R7$(1),n.Y8G("ngForOf",a.columns),n.R7$(1),n.Y8G("matHeaderRowDef",a.displayedColumns),n.R7$(1),n.Y8G("matRowDefColumns",a.displayedColumns),n.R7$(3),n.Y8G("pageSize",t.currentPageSize)("pageSizeOptions",a.pageSizes)("length",a.tableLength)}}const Sn=[[["","topActions",""]]],Fn=function(e){return{currentPageSize:e}},jn=["[topActions]"];let M=class T extends g.Py{constructor(o,t,a,_,i,s){super(o,t,a,_,i),this.corsService=s,this.emptyStateMessage="emptyState.cors.message",this.emptyStateActionLabel="emptyState.cors.action",this.columns=[{columnDef:"active",cell:l=>l.enabled,header:"active"},{columnDef:"path",cell:l=>l.path,header:"path"},{columnDef:"description",cell:l=>l.description,header:"description"},{columnDef:"maxAge",cell:l=>l.maxAge,header:"maxAge"},{columnDef:"actions"}],this.filterQuery=(0,y.J)(),this.allowFilter=!1}mapDataToTable(o){return o}deleteRow(o){this.corsService.delete(o.id,{fields:"*"}).subscribe(()=>this.refreshTable())}refreshTable(o,t,a){this.fetchTable(this.corsService,{limit:o,offset:t,filter:a})}static{this.\u0275fac=function(t){return new(t||T)(n.rXU(u.Ix),n.rXU(u.nX),n.rXU(X.Ai),n.rXU(E.JO),n.rXU(I.bZ),n.rXU($.Z$))}}static{this.\u0275cmp=n.VBU({type:T,selectors:[["df-manage-cors-table"]],standalone:!0,features:[n.Vt3,n.aNF],ngContentSelectors:jn,decls:9,vars:9,consts:[[1,"top-action-bar"],["mat-mini-fab","","class","save-btn","data-testid","manage-table-create","type","button",3,"click",4,"ngIf"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click",4,"ngIf"],[1,"spacer"],[4,"ngIf"],["class","search-input","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["mat-mini-fab","","data-testid","manage-table-create","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click"],["class","df-usage-filter","data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",1,"df-usage-filter"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["appearance","outline","subscriptSizing","dynamic",1,"search-input"],["matInput","",3,"formControl"],["class","table-loading-bar","mode","indeterminate",4,"ngIf"],["class","table-error-panel",4,"ngIf"],[1,"table-container"],["mat-table","","matSort","",3,"dataSource","matSortChange"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"clickable","click","keydown",4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[1,"bottom-action-bar"],["showFirstLastButtons","","aria-label","'selectPage' | transloco",3,"pageSize","pageSizeOptions","length","page"],["mode","indeterminate",1,"table-loading-bar"],[1,"table-error-panel"],[1,"table-error-headline"],["size","lg",3,"icon"],["mat-stroked-button","","type","button",3,"click"],[3,"error"],[3,"matColumnDef",4,"ngIf"],["stickyEnd","",3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","df-eyebrow",3,"df-numeric",4,"matHeaderCellDef"],["mat-cell","",3,"df-numeric",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"df-eyebrow"],["mat-cell",""],["size","lg",3,"icon","class",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt"],["size","lg","class","log-warning",3,"icon",4,"ngIf"],["size","lg",1,"log-warning",3,"icon"],["mat-header-cell","","class","df-eyebrow",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell","",1,"df-eyebrow"],[4,"ngIf","ngIfElse"],["healthyChip",""],["type","button",1,"df-health-chip",3,"matMenuTriggerFor","click"],[3,"variant","label"],["healthMenu","matMenu"],["mat-menu-item","",3,"routerLink","disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"routerLink","disabled","click"],["notDatabase",""],["class","actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions"],["size","lg",3,"icon","click"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-cell",""],["stickyEnd","",3,"matColumnDef"],["class","actions df-row-actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions","df-row-actions"],["multiple",""],["class","action-btn","mat-icon-button","","type","button",3,"click",4,"ngIf","ngIfElse"],["regular",""],["mat-icon-button","","type","button",1,"action-btn",3,"click"],["size","xs",3,"icon"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-icon-button","","aria-label","Actions","type","button",3,"matMenuTriggerFor","click"],["actionsMenu","matMenu"],["type","button","mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["type","button","mat-menu-item","",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click","keydown"],[1,"mat-row","no-data-row"],[1,"mat-cell"],["noFilterActive",""],["mat-button","","color","primary","type","button",3,"click"],["class","empty-state",4,"ngIf","ngIfElse"],["genericEmpty",""],[1,"empty-state"],[1,"empty-state-message"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click"]],template:function(t,a){1&t&&(n.NAR(Sn),n.j41(0,"div",0),n.DNE(1,F,3,4,"button",1),n.DNE(2,j,3,4,"button",2),n.SdG(3),n.nrm(4,"div",3),n.DNE(5,B,2,1,"ng-container",4),n.DNE(6,V,5,4,"mat-form-field",5),n.k0s(),n.DNE(7,Xn,11,11,"ng-container",4),n.nI1(8,"async")),2&t&&(n.R7$(1),n.Y8G("ngIf",a.allowCreate),n.R7$(1),n.Y8G("ngIf",a.schema),n.R7$(3),n.Y8G("ngIf",a.accessUsage),n.R7$(1),n.Y8G("ngIf",a.allowFilter),n.R7$(1),n.Y8G("ngIf",n.eq3(7,Fn,n.bMT(8,5,a.currentPageSize$))))},dependencies:[d.bT,m.Hl,m.$z,m.iY,m.$0,x.dX,x.aY,r.tP,r.Zl,r.tL,r.ji,r.cC,r.YV,r.iL,r.KS,r.$R,r.YZ,r.NB,r.ky,d.Sq,f.Cn,f.kk,f.fb,f.Cp,p.X1,p.me,p.BC,p.l_,E.Kj,d.Jj,I.hM,G.Ou,G.iy,b.RG,b.rl,b.nJ,R.fS,R.fg,C.NQ,C.B4,C.aE,P.PO,P.HM,g.R6,g.vR,g.Zn,O.Ve,O.VO,S.wT,u.Wk],styles:[".df-health-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;margin:0;border:none;background:transparent;font:inherit;color:inherit;cursor:pointer}.active[_ngcontent-%COMP%]{color:var(--df-success)}.inactive[_ngcontent-%COMP%], .log-warning[_ngcontent-%COMP%]{color:var(--df-danger)}.top-action-bar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--df-space-3);padding-bottom:var(--df-space-3)}.top-action-bar[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{height:80%!important;max-width:300px!important}.top-action-bar[_ngcontent-%COMP%] .df-usage-filter[_ngcontent-%COMP%]{width:160px}.bottom-action-bar[_ngcontent-%COMP%]{margin-top:var(--df-space-4);display:flex;flex-direction:row;justify-content:center}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto}.table-container.table-stale[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.table-loading-bar[_ngcontent-%COMP%]{margin-bottom:2px}.table-error-panel[_ngcontent-%COMP%]{margin-bottom:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm);background-color:var(--df-danger-soft);color:var(--df-text)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);margin-bottom:var(--df-space-2)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:1.4rem}.no-data-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--df-space-4);padding:var(--df-space-4);text-align:center}.empty-state[_ngcontent-%COMP%] .empty-state-message[_ngcontent-%COMP%]{margin:0;max-width:46rem;color:var(--df-text-muted);font-size:1.4rem;line-height:1.5}.mat-mdc-row[_ngcontent-%COMP%]{height:var(--df-row-height)!important}.mat-mdc-cell[_ngcontent-%COMP%], .mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border-2)}.mat-mdc-cell.df-numeric[_ngcontent-%COMP%], .mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%]{text-align:right}.mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{justify-content:flex-end}.df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0;transition:opacity var(--df-duration-fast) var(--df-ease-standard)}.mat-mdc-row[_ngcontent-%COMP%]:hover .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .mat-mdc-row[_ngcontent-%COMP%]:focus-within .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{opacity:1}.clickable.mat-mdc-row[_ngcontent-%COMP%]{outline:0}.clickable.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{cursor:pointer}.clickable.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-hover)}.clickable.mat-mdc-row[_ngcontent-%COMP%]:focus .mat-mdc-cell[_ngcontent-%COMP%], .clickable.mat-mdc-row[_ngcontent-%COMP%]:focus-within .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)} [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{border-bottom:unset!important}"]})}};M=(0,k.Cg)([(0,N.d)({checkProperties:!0})],M)}}]); \ No newline at end of file diff --git a/dist/2551.a0a26fc7e5fe4337.js b/dist/2551.a0a26fc7e5fe4337.js new file mode 100644 index 00000000..b9b2ffb8 --- /dev/null +++ b/dist/2551.a0a26fc7e5fe4337.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2551],{51425:(F,v,r)=>{r.d(v,{W:()=>C});var s=r(17705),p=r(60177),e=r(88834),l=r(20060),f=r(45383);function T(h,D){if(1&h){const M=s.RV6();s.j41(0,"button",5),s.bIt("click",function(){s.eBV(M);const b=s.XpG(2);return s.Njj(b.dismissAlert())}),s.j41(1,"fa-icon",6),s.EFF(2),s.k0s()()}if(2&h){const M=s.XpG(2);s.R7$(1),s.Y8G("icon",M.faXmark),s.R7$(1),s.JRh("alerts.close")}}function u(h,D){if(1&h&&(s.j41(0,"div",1),s.nrm(1,"fa-icon",2),s.j41(2,"span",3),s.SdG(3),s.k0s(),s.DNE(4,T,3,2,"button",4),s.k0s()),2&h){const M=s.XpG();s.HbH(M.alertType),s.R7$(1),s.Y8G("icon",M.icon),s.R7$(3),s.Y8G("ngIf",M.dismissible)}}const o=["*"];let C=(()=>{class h{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new s.bkB,this.faXmark=f.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return f.SGM;case"error":return f.rfe;case"warning":return f.tUE;default:return f.iW_}}static{this.\u0275fac=function(t){return new(t||h)}}static{this.\u0275cmp=s.VBU({type:h,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[s.aNF],ngContentSelectors:o,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(t,b){1&t&&(s.NAR(),s.DNE(0,u,5,4,"div",0)),2&t&&s.Y8G("ngIf",b.showAlert)},dependencies:[p.bT,e.Hl,e.iY,l.dX,l.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return h})()},58751:(F,v,r)=>{r.d(v,{S:()=>c});var s=r(31635),p=r(60177),e=r(17705),l=r(89417),f=r(32102),T=r(88834),u=r(9159),o=r(99631),C=r(30450),h=r(20060),D=r(9454),M=r(45383),t=r(33609),b=r(49894),k=r(47747),U=r(52868);function G(a,n){if(1&a&&(e.j41(0,"mat-accordion")(1,"mat-expansion-panel")(2,"mat-expansion-panel-header")(3,"mat-panel-title"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"mat-panel-description"),e.EFF(7),e.nI1(8,"transloco"),e.k0s()(),e.eu8(9,3),e.k0s()()),2&a){e.XpG();const m=e.sdS(3);e.R7$(4),e.SpI(" ",e.bMT(5,3,"lookupKeys.label"),""),e.R7$(3),e.JRh(e.bMT(8,5,"lookupKeys.desc")),e.R7$(2),e.Y8G("ngTemplateOutlet",m)}}function O(a,n){1&a&&(e.j41(0,"mat-header-cell"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"name")," "))}function d(a,n){1&a&&(e.j41(0,"mat-cell",16)(1,"mat-form-field",17)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"input",18),e.k0s()()),2&a&&(e.Y8G("formGroupName",n.index),e.R7$(3),e.JRh(e.bMT(4,2,"name")))}function i(a,n){1&a&&(e.j41(0,"mat-header-cell"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"value")," "))}function _(a,n){1&a&&(e.j41(0,"mat-cell",16)(1,"mat-form-field",17)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"input",19),e.k0s()()),2&a&&(e.Y8G("formGroupName",n.index),e.R7$(3),e.JRh(e.bMT(4,2,"value")))}function g(a,n){1&a&&(e.j41(0,"mat-header-cell"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"private")," "))}function A(a,n){1&a&&(e.j41(0,"mat-cell",16),e.nrm(1,"mat-slide-toggle",20),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.Y8G("formGroupName",n.index),e.R7$(1),e.BMQ("aria-label",e.bMT(2,2,"name")))}function E(a,n){if(1&a){const m=e.RV6();e.j41(0,"mat-header-cell")(1,"button",21),e.bIt("click",function(){e.eBV(m);const N=e.XpG(2);return e.Njj(N.add())}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",22),e.k0s()()}if(2&a){const m=e.XpG(2);e.R7$(1),e.BMQ("aria-label",e.bMT(2,2,"newEntry")),e.R7$(2),e.Y8G("icon",m.faPlus)}}function R(a,n){if(1&a){const m=e.RV6();e.j41(0,"mat-cell",16)(1,"button",23),e.bIt("click",function(){const L=e.eBV(m).index,W=e.XpG(2);return e.Njj(W.remove(L))}),e.nrm(2,"fa-icon",24),e.k0s()()}if(2&a){const m=n.index,P=e.XpG(2);e.Y8G("formGroupName",m),e.R7$(2),e.Y8G("icon",P.faTrashCan)}}function I(a,n){1&a&&e.nrm(0,"mat-header-row")}function B(a,n){1&a&&e.nrm(0,"mat-row")}function K(a,n){1&a&&(e.j41(0,"tr",25)(1,"td",26),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()),2&a&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"lookupKeys.noKeys")," "))}function y(a,n){if(1&a&&(e.qex(0,4)(1,5),e.j41(2,"mat-table",6),e.qex(3,7),e.DNE(4,O,3,3,"mat-header-cell",8),e.DNE(5,d,6,4,"mat-cell",9),e.bVm(),e.qex(6,10),e.DNE(7,i,3,3,"mat-header-cell",8),e.DNE(8,_,6,4,"mat-cell",9),e.bVm(),e.qex(9,11),e.DNE(10,g,3,3,"mat-header-cell",8),e.DNE(11,A,3,4,"mat-cell",9),e.bVm(),e.qex(12,12),e.DNE(13,E,4,4,"mat-header-cell",8),e.DNE(14,R,3,2,"mat-cell",9),e.bVm(),e.DNE(15,I,1,0,"mat-header-row",13),e.DNE(16,B,1,0,"mat-row",14),e.DNE(17,K,4,3,"tr",15),e.k0s(),e.bVm()()),2&a){const m=e.XpG();e.Y8G("formGroup",m.rootForm),e.R7$(2),e.Y8G("dataSource",m.dataSource),e.R7$(13),e.Y8G("matHeaderRowDef",m.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",m.displayedColumns)}}let c=class S{constructor(n,m){this.rootFormGroup=n,this.themeService=m,this.displayedColumns=["name","value","private","actions"],this.faTrashCan=M.sjs,this.faPlus=M.QLR,this.showAccordion=!0,this.lookupDeleted=new e.bkB,this.isDarkMode=this.themeService.darkMode$}ngOnInit(){this.rootForm=this.rootFormGroup.control,this.rootFormGroup.ngSubmit.subscribe(()=>{this.lookupKeys.markAllAsTouched()}),this.lookupKeys=this.rootForm.get("lookupKeys"),this.updateDataSource()}updateDataSource(){this.lookupKeys.controls.forEach(n=>{n.get("id")?.value&&n.get("name")?.disable()}),this.dataSource=new u.I6(this.lookupKeys.controls)}add(){this.lookupKeys.push(new l.gE({name:new l.MJ("",[l.k0.required,k.Z]),value:new l.MJ(""),private:new l.MJ(!1)})),this.updateDataSource()}remove(n){const m=this.lookupKeys.at(n).value;m.id&&this.lookupDeleted.emit(m),this.lookupKeys.removeAt(n),this.updateDataSource()}static{this.\u0275fac=function(m){return new(m||S)(e.rXU(l.j4),e.rXU(U.n))}}static{this.\u0275cmp=e.VBU({type:S,selectors:[["df-lookup-keys"]],inputs:{showAccordion:"showAccordion"},outputs:{lookupDeleted:"lookupDeleted"},standalone:!0,features:[e.aNF],decls:4,vars:2,consts:[[1,"lookup-keys-accordion"],[4,"ngIf","ngIfElse"],["lookupKeys",""],[3,"ngTemplateOutlet"],[3,"formGroup"],["formArrayName","lookupKeys"],[3,"dataSource"],["matColumnDef","name"],[4,"matHeaderCellDef"],[3,"formGroupName",4,"matCellDef"],["matColumnDef","value"],["matColumnDef","private"],["matColumnDef","actions","stickyEnd",""],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[3,"formGroupName"],["appearance","outline","subscriptSizing","dynamic"],["matInput","","formControlName","name"],["matInput","","formControlName","value"],["color","primary","formControlName","private"],["mat-mini-fab","","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-icon-button","","type","button",1,"remove-btn",3,"click"],["size","xs",3,"icon"],[1,"mat-row","no-data-row"],["colspan","4",1,"mat-cell"]],template:function(m,P){if(1&m&&(e.j41(0,"div",0),e.DNE(1,G,10,7,"mat-accordion",1),e.DNE(2,y,18,4,"ng-template",null,2,e.C5r),e.k0s()),2&m){const N=e.sdS(3);e.R7$(1),e.Y8G("ngIf",P.showAccordion)("ngIfElse",N)}},dependencies:[l.YN,l.me,l.BC,l.cb,l.X1,l.j4,l.JD,l.$R,l.v8,p.bT,p.T3,f.RG,f.rl,f.nJ,T.Hl,T.iY,T.$0,u.tP,u.Zl,u.tL,u.ji,u.cC,u.YV,u.iL,u.KS,u.$R,u.YZ,u.NB,u.ky,o.fS,o.fg,C.mV,C.sG,h.dX,h.aY,D.MY,D.BS,D.GK,D.Z2,D.WN,D.Q6,t.Kj],styles:[".lookup-keys-accordion[_ngcontent-%COMP%]{padding:16px 0}.mat-column-actions[_ngcontent-%COMP%], .mat-column-private[_ngcontent-%COMP%]{max-width:10%}.mat-mdc-cell[_ngcontent-%COMP%]{padding:8px}.mat-mdc-row[_ngcontent-%COMP%]{height:auto!important;min-height:44px;padding:4px 0}"]})}};c=(0,s.Cg)([(0,b.d)({checkProperties:!0})],c)},77493:(F,v,r)=>{r.d(v,{D:()=>O});var s=r(31635),p=r(60177),e=r(89417),l=r(32102),f=r(99631),T=r(33609),u=r(49894),o=r(17705),C=r(52868);function h(d,i){1&d&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"transloco"),o.k0s()),2&d&&(o.R7$(1),o.SpI(" ",o.bMT(2,1,"userManagement.controls.username.errors.required")," "))}function D(d,i){1&d&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"transloco"),o.k0s()),2&d&&(o.R7$(1),o.SpI(" ",o.bMT(2,1,"userManagement.controls.username.errors.minLength")," "))}function M(d,i){1&d&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"transloco"),o.k0s()),2&d&&(o.R7$(1),o.SpI(" ",o.bMT(2,1,"userManagement.controls.email.errors.invalid")," "))}function t(d,i){1&d&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"transloco"),o.k0s()),2&d&&(o.R7$(1),o.SpI(" ",o.bMT(2,1,"userManagement.controls.email.errors.required")," "))}function b(d,i){1&d&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"transloco"),o.k0s()),2&d&&(o.R7$(1),o.SpI(" ",o.bMT(2,1,"userManagement.controls.firstName.errors.required")," "))}function k(d,i){1&d&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"transloco"),o.k0s()),2&d&&(o.R7$(1),o.SpI(" ",o.bMT(2,1,"userManagement.controls.lastName.errors.required")," "))}function U(d,i){1&d&&(o.j41(0,"mat-error"),o.EFF(1),o.nI1(2,"transloco"),o.k0s()),2&d&&(o.R7$(1),o.SpI(" ",o.bMT(2,1,"userManagement.controls.displayName.errors.required")," "))}function G(d,i){1&d&&(o.j41(0,"mat-form-field",2)(1,"mat-label"),o.EFF(2),o.nI1(3,"transloco"),o.k0s(),o.nrm(4,"input",10),o.k0s()),2&d&&(o.R7$(2),o.JRh(o.bMT(3,1,"userManagement.controls.phone.label")))}let O=class x{constructor(i,_){this.rootFormGroup=i,this.themeService=_,this.isDarkMode=this.themeService.darkMode$}ngOnInit(){this.rootForm=this.rootFormGroup.control,this.rootFormGroup.ngSubmit.subscribe(()=>{this.rootForm.markAllAsTouched()})}controlExists(i){return null!==this.rootForm.get(i)}isRequired(i){return!!this.rootForm.get(i)?.hasValidator(e.k0.required)}static{this.\u0275fac=function(_){return new(_||x)(o.rXU(e.j4),o.rXU(C.n))}}static{this.\u0275cmp=o.VBU({type:x,selectors:[["df-profile-details"]],standalone:!0,features:[o.aNF],decls:36,vars:27,consts:[["name","user-details-section",3,"formGroup"],["formGroupName","profileDetailsGroup"],["appearance","outline"],["matInput","","type","text","formControlName","username"],[4,"ngIf"],["matInput","","type","email","formControlName","email"],["matInput","","type","text","formControlName","firstName"],["matInput","","formControlName","lastName"],["matInput","","formControlName","name"],["appearance","outline",4,"ngIf"],["matInput","","formControlName","phone"]],template:function(_,g){if(1&_&&(o.qex(0,0)(1,1),o.j41(2,"mat-form-field",2)(3,"mat-label"),o.EFF(4),o.nI1(5,"transloco"),o.nI1(6,"transloco"),o.k0s(),o.nrm(7,"input",3),o.DNE(8,h,3,3,"mat-error",4),o.DNE(9,D,3,3,"mat-error",4),o.k0s(),o.j41(10,"mat-form-field",2)(11,"mat-label"),o.EFF(12),o.nI1(13,"transloco"),o.k0s(),o.nrm(14,"input",5),o.DNE(15,M,3,3,"mat-error",4),o.DNE(16,t,3,3,"mat-error",4),o.k0s(),o.j41(17,"mat-form-field",2)(18,"mat-label"),o.EFF(19),o.nI1(20,"transloco"),o.k0s(),o.nrm(21,"input",6),o.DNE(22,b,3,3,"mat-error",4),o.k0s(),o.j41(23,"mat-form-field",2)(24,"mat-label"),o.EFF(25),o.nI1(26,"transloco"),o.k0s(),o.nrm(27,"input",7),o.DNE(28,k,3,3,"mat-error",4),o.k0s(),o.j41(29,"mat-form-field",2)(30,"mat-label"),o.EFF(31),o.nI1(32,"transloco"),o.k0s(),o.nrm(33,"input",8),o.DNE(34,U,3,3,"mat-error",4),o.k0s(),o.DNE(35,G,5,3,"mat-form-field",9),o.bVm()()),2&_){let A,E,R,I,B,K,y;o.Y8G("formGroup",g.rootForm),o.R7$(4),o.Lme("",o.bMT(5,15,"userManagement.controls.username.altLabel"),"",g.isRequired("profileDetailsGroup.username")?"":" "+o.bMT(6,17,"userManagement.controls.username.optional"),""),o.R7$(4),o.Y8G("ngIf",null==(A=g.rootForm.get("profileDetailsGroup.username"))||null==A.errors?null:A.errors.required),o.R7$(1),o.Y8G("ngIf",null==(E=g.rootForm.get("profileDetailsGroup.username"))||null==E.errors?null:E.errors.minlength),o.R7$(3),o.SpI(" ",o.bMT(13,19,"userManagement.controls.email.label"),""),o.R7$(3),o.Y8G("ngIf",(null==(R=g.rootForm.get("profileDetailsGroup.email"))||null==R.errors?null:R.errors.email)&&!(null!=(R=g.rootForm.get("profileDetailsGroup.email"))&&null!=R.errors&&R.errors.required)),o.R7$(1),o.Y8G("ngIf",!(null!=(I=g.rootForm.get("profileDetailsGroup.email"))&&null!=I.errors&&I.errors.email)&&(null==(I=g.rootForm.get("profileDetailsGroup.email"))||null==I.errors?null:I.errors.required)),o.R7$(3),o.SpI(" ",o.bMT(20,21,"userManagement.controls.firstName.label"),""),o.R7$(3),o.Y8G("ngIf",null==(B=g.rootForm.get("profileDetailsGroup.firstName"))||null==B.errors?null:B.errors.required),o.R7$(3),o.JRh(o.bMT(26,23,"userManagement.controls.lastName.label")),o.R7$(3),o.Y8G("ngIf",null==(K=g.rootForm.get("profileDetailsGroup.lastName"))||null==K.errors?null:K.errors.required),o.R7$(3),o.JRh(o.bMT(32,25,"userManagement.controls.displayName.label")),o.R7$(3),o.Y8G("ngIf",null==(y=g.rootForm.get("profileDetailsGroup.name"))||null==y.errors?null:y.errors.required),o.R7$(1),o.Y8G("ngIf",g.controlExists("profileDetailsGroup.phone"))}},dependencies:[l.RG,l.rl,l.nJ,l.TL,f.fS,f.fg,e.YN,e.me,e.BC,e.cb,e.X1,e.j4,e.JD,e.$R,T.Kj,p.bT],encapsulation:2})}};O=(0,s.Cg)([(0,u.d)({checkProperties:!0})],O)},30877:(F,v,r)=>{r.d(v,{N:()=>y});var s=r(31635),p=r(89417),e=r(88834),l=r(9159),f=r(99631),T=r(20060),u=r(9454),o=r(60850),C=r(45383),h=r(33609),D=r(60177),M=r(49894),t=r(17705),b=r(86600),k=r(32102);function U(c,a){1&c&&(t.j41(0,"mat-header-cell"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"roles.app")," "))}function G(c,a){if(1&c&&(t.j41(0,"mat-option",18),t.EFF(1),t.k0s()),2&c){const n=a.$implicit;t.Y8G("value",n.name),t.R7$(1),t.SpI(" ",n.name," ")}}function O(c,a){if(1&c&&(t.j41(0,"mat-cell",12)(1,"mat-form-field",13)(2,"mat-label"),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.nrm(5,"input",14),t.j41(6,"mat-autocomplete",15,16),t.DNE(8,G,2,2,"mat-option",17),t.k0s()()()),2&c){const n=a.index,m=t.sdS(7),P=t.XpG();t.Y8G("formGroupName",n),t.R7$(3),t.JRh(t.bMT(4,5,"roles.app")),t.R7$(2),t.Y8G("matAutocomplete",m),t.R7$(3),t.Y8G("ngForOf",P.availableApps)("ngForTrackBy",P.trackByAppId)}}function d(c,a){1&c&&(t.j41(0,"mat-header-cell"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&c&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"roles.role")," "))}function i(c,a){if(1&c&&(t.j41(0,"mat-option",18),t.EFF(1),t.k0s()),2&c){const n=a.$implicit;t.Y8G("value",n.name),t.R7$(1),t.SpI(" ",n.name," ")}}function _(c,a){if(1&c&&(t.j41(0,"mat-cell",12)(1,"mat-form-field",13)(2,"mat-label"),t.EFF(3),t.nI1(4,"transloco"),t.k0s(),t.nrm(5,"input",19),t.j41(6,"mat-autocomplete",15,16),t.DNE(8,i,2,2,"mat-option",17),t.k0s()()()),2&c){const n=a.index,m=t.sdS(7),P=t.XpG();t.Y8G("formGroupName",n),t.R7$(3),t.JRh(t.bMT(4,5,"roles.role")),t.R7$(2),t.Y8G("matAutocomplete",m),t.R7$(3),t.Y8G("ngForOf",P.roles)("ngForTrackBy",P.trackByRoleName)}}function g(c,a){if(1&c){const n=t.RV6();t.j41(0,"button",21),t.bIt("click",function(){t.eBV(n);const P=t.XpG(2);return t.Njj(P.add())}),t.nI1(1,"transloco"),t.nrm(2,"fa-icon",22),t.k0s()}if(2&c){const n=t.XpG(2);t.BMQ("aria-label",t.bMT(1,2,"newEntry")),t.R7$(2),t.Y8G("icon",n.faPlus)}}function A(c,a){if(1&c&&(t.j41(0,"mat-header-cell"),t.DNE(1,g,3,4,"button",20),t.k0s()),2&c){const n=t.XpG();t.R7$(1),t.Y8G("ngIf",n.showAddButton)}}function E(c,a){if(1&c){const n=t.RV6();t.j41(0,"mat-cell",12)(1,"button",23),t.bIt("click",function(){const N=t.eBV(n).index,L=t.XpG();return t.Njj(L.remove(N))}),t.nrm(2,"fa-icon",24),t.k0s()()}if(2&c){const n=a.index,m=t.XpG();t.Y8G("formGroupName",n),t.R7$(2),t.Y8G("icon",m.faTrashCan)}}function R(c,a){1&c&&t.nrm(0,"mat-header-row")}function I(c,a){1&c&&t.nrm(0,"mat-row")}function B(c,a){1&c&&(t.j41(0,"tr",25)(1,"td",26),t.EFF(2),t.nI1(3,"transloco"),t.k0s()()),2&c&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"roles.noRoles")," "))}const K=function(c,a){return{assigned:c,total:a}};let y=class ${constructor(a){this.rootFormGroup=a,this.apps=[],this.roles=[],this.displayedColumns=["app","role","actions"],this.faTrashCan=C.sjs,this.faPlus=C.QLR,this._availableApps=[],this._availableAppsStale=!0}ngOnInit(){this.rootForm=this.rootFormGroup.control,this.rootFormGroup.ngSubmit.subscribe(()=>{this.rootForm.markAllAsTouched()}),this.appRoles=this.rootForm.get("appRoles"),this.appRoles.valueChanges.subscribe(()=>this._availableAppsStale=!0),this.updateDataSource()}updateDataSource(){this.dataSource=new l.I6(this.appRoles.controls)}get availableApps(){return(this._availableAppsStale||this._availableAppsSource!==this.apps)&&(this._availableAppsSource=this.apps,this._availableApps=this.apps.filter(a=>!this.appRoles.value.find(n=>n.app===a.name)),this._availableAppsStale=!1),this._availableApps}trackByAppId(a,n){return n.id}trackByRoleName(a,n){return n.name}get showAddButton(){return this.appRoles.length{r.d(v,{s:()=>O});var s=r(31635),p=r(17705),e=r(89417),l=r(69465),f=r(23472),T=r(80345),u=r(47747),o=r(45383),C=r(49894),h=r(25558),D=r(7673),M=r(52868),t=r(43615),b=r(95245),k=r(82298),U=r(52608),G=r(95351);let O=class j{constructor(i,_,g,A,E){this.fb=i,this.activatedRoute=_,this.systemConfigDataService=g,this.breakpointService=A,this.paywallService=E,this.loginAttribute="email",this.faEnvelope=o.y_8,this.type="create",this.isSmallScreen=this.breakpointService.isSmallScreen,this.alertMsg="",this.showAlert=!1,this.alertType="error",this.accessByTabs=[{control:"apps"},{control:"users"},{control:"services"},{control:"apidocs",label:"api-docs"},{control:"schema/data",label:"schema"},{control:"files"},{control:"scripts"},{control:"config"},{control:"packages",label:"package-manager"},{control:"limits"},{control:"scheduler"}],this.themeService=(0,p.WQX)(M.n),this.snackbarService=(0,p.WQX)(t.L),this.isDarkMode=this.themeService.darkMode$,this.userForm=this.fb.group({profileDetailsGroup:this.fb.group({username:["",e.k0.minLength(6)],email:["",e.k0.email],firstName:[""],lastName:[""],name:["",e.k0.required],phone:[""]}),isActive:[!0],tabs:this.buildTabs(),lookupKeys:this.fb.array([],[T.D]),appRoles:this.fb.array([])})}get cancelRoute(){let i=`/${f.b.ADMIN_SETTINGS}/`;return"admins"===this.userType&&(i+=f.b.ADMINS),"users"===this.userType&&(i+=f.b.USERS),i}ngOnInit(){this.paywallService.activatePaywall("limit").pipe((0,h.n)(i=>i?this.paywallService.activatePaywall("service_report"):(0,D.of)(!1))).subscribe(i=>{i&&(this.accessByTabs=[])}),this.activatedRoute.data.subscribe(({type:i,data:_,apps:g,roles:A})=>{_&&this.snackbarService.setSnackbarLastEle(_.name,!0),this.type=i,"users"===this.userType&&(this.apps=g.resource,this.roles=A.resource),"edit"===i?(this.currentProfile=_,this.userForm.patchValue({profileDetailsGroup:{username:_.username,email:_.email,firstName:_.firstName,lastName:_.lastName,name:_.name,phone:_.phone},isActive:_.isActive}),this.userForm.addControl("setPassword",new e.MJ(!1)),this.userForm.controls.setPassword.valueChanges.subscribe(E=>{E?this.addPasswordControls():this.removePasswordControls()}),"admins"===this.userType&&(_.isRootAdmin&&this.userForm.removeControl("tabs"),_.userToAppToRoleByUserId.length>0&&(this.changeAllTabs(!1),_.role.accessibleTabs.forEach(E=>{const R=this.tabs.controls.find(I=>I.value.name===E);R&&R.patchValue({checked:!0})}))),"users"===this.userType&&_.userToAppToRoleByUserId.length>0&&_.userToAppToRoleByUserId.forEach(E=>{this.userForm.controls.appRoles.push(new e.gE({app:new e.MJ(this.apps.find(R=>R.id===E.appId)?.name,[e.k0.required]),role:new e.MJ(this.roles.find(R=>R.id===E.roleId)?.name,[e.k0.required])}))}),_.lookupByUserId.length>0&&_.lookupByUserId.forEach(E=>{this.userForm.controls.lookupKeys.push(new e.gE({name:new e.MJ(E.name,[e.k0.required,u.Z]),value:new e.MJ(E.value),private:new e.MJ(E.private),id:new e.MJ(E.id)}))})):(this.currentProfile={id:0},this.userForm.addControl("pass-invite",new e.MJ("",[e.k0.required])),this.userForm.controls["pass-invite"].valueChanges.subscribe(E=>{"password"===E?this.addPasswordControls():this.removePasswordControls()}))}),this.systemConfigDataService.environment$.subscribe(i=>{this.loginAttribute=i.authentication.loginAttribute,"username"===this.loginAttribute?this.userForm.get("profileDetailsGroup.username")?.addValidators([e.k0.required]):this.userForm.get("profileDetailsGroup.email")?.addValidators([e.k0.required])})}addPasswordControls(){this.userForm.addControl("password",new e.MJ("",[e.k0.required,e.k0.minLength(16)])),this.userForm.addControl("confirmPassword",new e.MJ("",[e.k0.required,(0,l.e)("password")]))}removePasswordControls(){this.userForm.removeControl("password"),this.userForm.removeControl("confirmPassword")}get tabs(){return this.userForm.controls.tabs}selectAllTabs(i){this.changeAllTabs(i.checked)}changeAllTabs(i){this.tabs.controls.forEach(_=>{_.patchValue({checked:i})})}get allTabsSelected(){return this.tabs.controls.every(i=>i.value.checked)}buildTabs(){const i=this.accessByTabs.map(_=>this.fb.group({name:_.control,title:_.label||_.control,checked:!0}));return this.fb.array(i)}triggerAlert(i,_){this.alertType=i,this.alertMsg=_,this.showAlert=!0}static{this.\u0275fac=function(_){return new(_||j)(p.rXU(e.ok),p.rXU(b.nX),p.rXU(k.f),p.rXU(U.R),p.rXU(G.o))}}static{this.\u0275cmp=p.VBU({type:j,selectors:[["df-user-details"]],decls:0,vars:0,template:function(_,g){},encapsulation:2})}};O=(0,s.Cg)([(0,C.d)({checkProperties:!0})],O)},69465:(F,v,r)=>{function s(p){return e=>{const l=e.parent;if(l){const f=l.get(p);if(f&&e.value!==f.value)return{doesNotMatch:!0}}return null}}r.d(v,{e:()=>s})},47747:(F,v,r)=>{r.d(v,{Z:()=>s});const s=p=>{const e=p.value;return null==e||""===e?null:/\s/.test(String(e))?{hasWhitespace:!0}:null}},80345:(F,v,r)=>{r.d(v,{D:()=>p});var s=r(89417);const p=e=>{const l=new Map,f=e;function T(o){f.at(o).get("name")?.setErrors({notUnique:!0})}return f.controls.forEach((o,C)=>{if(!(o instanceof s.gE))return;const h=o.get("name");if(!h)return;const D=h.value;D&&(l.has(D)?(T(l.get(D)??0),T(C)):(l.set(D,C),function u(o){const h=f.at(o).get("name"),D=h?.errors;D&&(delete D.notUnique,h.setErrors(Object.keys(D).length?D:null))}(C)))}),null}}}]); \ No newline at end of file diff --git a/dist/2066.01138641db2ae347.js b/dist/2617.328cdca5606b134b.js similarity index 97% rename from dist/2066.01138641db2ae347.js rename to dist/2617.328cdca5606b134b.js index d1d0328a..435e0420 100644 --- a/dist/2066.01138641db2ae347.js +++ b/dist/2617.328cdca5606b134b.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2066],{42066:(oe,C,s)=>{s.r(C),s.d(C,{DfFieldDetailsComponent:()=>ee});var f=s(18331),l=s(78227),u=s(68660),m=s(54688),F=s(453),k=s(58001),T=s(60368),p=s(91900),h=s(54342),R=s(31147),M=s(37530),E=s(75066),$=s(21406),d=s(28600),r=s(58497),b=s(94093),N=s(97828),g=s(98337),e=s(1843),_=s(42250);function j(o,i){if(1&o&&(e.j41(0,"mat-accordion")(1,"mat-expansion-panel")(2,"mat-expansion-panel-header")(3,"mat-panel-title"),e.EFF(4),e.nI1(5,"transloco"),e.nrm(6,"fa-icon",3),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"mat-panel-description"),e.EFF(9),e.nI1(10,"transloco"),e.k0s()(),e.eu8(11,4),e.k0s()()),2&o){const t=e.XpG(),n=e.sdS(3);e.R7$(4),e.SpI("",e.bMT(5,5,"schema.fieldDetailsForm.controls.dbFunctionTitle")," "),e.R7$(2),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(7,7,"schema.fieldDetailsForm.controls.dfFunctionTooltip")),e.R7$(3),e.SpI("",e.bMT(10,9,"schema.fieldDetailsForm.controls.dbFunctionUseDescription")," "),e.R7$(2),e.Y8G("ngTemplateOutlet",n)}}function G(o,i){1&o&&(e.j41(0,"mat-header-cell"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"use")," "))}function x(o,i){if(1&o&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&o){const t=i.$implicit;e.Y8G("value",t.value),e.R7$(1),e.SpI("",t.name," ")}}function w(o,i){if(1&o&&(e.j41(0,"mat-cell",17)(1,"mat-form-field",18)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"mat-select",19),e.DNE(6,x,2,2,"mat-option",20),e.k0s()()()),2&o){const t=i.index,n=e.XpG(2);e.Y8G("formGroupName",t),e.R7$(3),e.JRh(e.bMT(4,3,"use")),e.R7$(3),e.Y8G("ngForOf",n.functionUsesDropdownOptions)}}function S(o,i){1&o&&(e.j41(0,"mat-header-cell"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"function")," "))}function O(o,i){1&o&&(e.j41(0,"mat-cell",17)(1,"mat-form-field",18)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"input",22),e.k0s()()),2&o&&(e.Y8G("formGroupName",i.index),e.R7$(3),e.JRh(e.bMT(4,2,"function")))}function U(o,i){if(1&o){const t=e.RV6();e.j41(0,"mat-header-cell")(1,"button",23),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.add())}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",24),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(1),e.BMQ("aria-label",e.bMT(2,2,"newEntry")),e.R7$(2),e.Y8G("icon",t.faPlus)}}const Y=function(o){return{id:o}};function J(o,i){if(1&o){const t=e.RV6();e.j41(0,"mat-cell")(1,"button",25),e.bIt("click",function(){const c=e.eBV(t).index,y=e.XpG(2);return e.Njj(y.remove(c))}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",26),e.k0s()()}if(2&o){const t=i.index,n=e.XpG(2);e.R7$(1),e.BMQ("aria-label",e.i5U(2,2,"deleteRow",e.eq3(5,Y,t))),e.R7$(2),e.Y8G("icon",n.faTrashCan)}}function V(o,i){1&o&&e.nrm(0,"mat-header-row")}function P(o,i){1&o&&e.nrm(0,"mat-row")}function B(o,i){1&o&&(e.j41(0,"tr",27)(1,"td",28),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()),2&o&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"schema.fieldDetailsForm.controls.noDbFunctions")," "))}function A(o,i){if(1&o&&(e.qex(0,5)(1,6),e.j41(2,"mat-table",7),e.qex(3,8),e.DNE(4,G,3,3,"mat-header-cell",9),e.DNE(5,w,7,5,"mat-cell",10),e.bVm(),e.qex(6,11),e.DNE(7,S,3,3,"mat-header-cell",9),e.DNE(8,O,6,4,"mat-cell",10),e.bVm(),e.qex(9,12),e.DNE(10,U,4,4,"mat-header-cell",9),e.DNE(11,J,4,7,"mat-cell",13),e.bVm(),e.DNE(12,V,1,0,"mat-header-row",14),e.DNE(13,P,1,0,"mat-row",15),e.DNE(14,B,4,3,"tr",16),e.k0s(),e.bVm()()),2&o){const t=e.XpG();e.Y8G("formGroup",t.rootForm),e.R7$(2),e.Y8G("dataSource",t.dataSource),e.R7$(10),e.Y8G("matHeaderRowDef",t.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",t.displayedColumns)}}let D=class v{constructor(i){this.rootFormGroup=i,this.displayedColumns=["use","function","actions"],this.faTrashCan=b.sjs,this.faPlus=b.QLR,this.faCircleInfo=b.mEO,this.showAccordion=!0,this.functionUsesDropdownOptions=[{name:"SELECT (GET)",value:"SELECT"},{name:"FILTER (GET)",value:"FILTER"},{name:"INSERT (POST)",value:"INSERT"},{name:"UPDATE (PATCH)",value:"UPDATE"}]}ngOnInit(){this.rootForm=this.rootFormGroup.control,this.rootFormGroup.ngSubmit.subscribe(()=>{this.keys.markAllAsTouched()}),this.keys=this.rootForm.get("dbFunction"),this.updateDataSource()}updateDataSource(){this.dataSource=new r.I6(this.keys.controls)}add(){this.keys.push(new l.gE({use:new l.MJ([""],l.k0.required),function:new l.MJ("")})),this.updateDataSource()}remove(i){this.keys.removeAt(i),this.updateDataSource()}static{this.\u0275fac=function(t){return new(t||v)(e.rXU(l.j4))}}static{this.\u0275cmp=e.VBU({type:v,selectors:[["df-function-use"]],inputs:{showAccordion:"showAccordion"},standalone:!0,features:[e.aNF],decls:4,vars:2,consts:[[1,"keys-accordion"],[4,"ngIf","ngIfElse"],["dbFunctionUse",""],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[3,"ngTemplateOutlet"],[3,"formGroup"],["formArrayName","dbFunction"],[3,"dataSource"],["matColumnDef","use"],[4,"matHeaderCellDef"],[3,"formGroupName",4,"matCellDef"],["matColumnDef","function"],["matColumnDef","actions","stickyEnd",""],[4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[3,"formGroupName"],["subscriptSizing","dynamic"],["formControlName","use","multiple",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["matInput","","formControlName","function"],["mat-mini-fab","","color","primary","type","button",3,"click"],["size","xl",3,"icon"],["mat-icon-button","","type","button",3,"click"],["size","xs",3,"icon"],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(t,n){if(1&t&&(e.j41(0,"div",0),e.DNE(1,j,12,11,"mat-accordion",1),e.DNE(2,A,15,4,"ng-template",null,2,e.C5r),e.k0s()),2&t){const a=e.sdS(3);e.R7$(1),e.Y8G("ngIf",n.showAccordion)("ngIfElse",a)}},dependencies:[l.YN,l.me,l.BC,l.cb,l.X1,l.j4,l.JD,l.$R,l.v8,f.bT,f.pM,f.T3,m.RG,m.rl,m.nJ,m.yw,u.Hl,u.iY,u.$0,r.tP,r.Zl,r.tL,r.ji,r.cC,r.YV,r.iL,r.KS,r.$R,r.YZ,r.NB,r.ky,F.fS,F.fg,T.mV,p.Ve,p.VO,_.wT,h.dX,h.aY,d.MY,d.BS,d.GK,d.Z2,d.WN,d.Q6,R.Kj,g.uc,g.oV],styles:[".keys-accordion[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none!important;border:1px solid var(--df-border-2);border-radius:var(--df-radius)!important;background:var(--df-surface)}.keys-accordion[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.keys-accordion[_ngcontent-%COMP%] mat-panel-description[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}"]})}};function L(o){return o.value&&o.value.length>0&&!/^\w+(?:\s*,\s*\w+)*$/.test(o.value)?{csvInvalid:!0}:null}D=(0,$.Cg)([(0,N.d)({checkProperties:!0})],D);var I=s(11863),X=s(19206);function K(o,i){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.fieldDetailsForm.errors.name")," "))}function z(o,i){if(1&o&&(e.j41(0,"mat-option",34),e.EFF(1),e.k0s()),2&o){const t=i.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Q(o,i){if(1&o&&(e.j41(0,"mat-option",34),e.EFF(1),e.k0s()),2&o){const t=i.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.name," ")}}function H(o,i){if(1&o&&(e.j41(0,"mat-option",34),e.EFF(1),e.k0s()),2&o){const t=i.$implicit;e.Y8G("value",t.name),e.R7$(1),e.JRh(t.label)}}function Z(o,i){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.fieldDetailsForm.errors.json")," "))}function W(o,i){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.fieldDetailsForm.errors.csv")," "))}function q(o,i){if(1&o&&(e.qex(0),e.j41(1,"mat-form-field",2)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"input",35),e.k0s(),e.DNE(6,W,3,3,"mat-error",4),e.bVm()),2&o){const t=e.XpG();e.R7$(3),e.JRh(e.bMT(4,2,"schema.fieldDetailsForm.controls.picklist")),e.R7$(3),e.Y8G("ngIf",t.fieldDetailsForm.controls.picklist.hasError("csvInvalid"))}}s(69099);let ee=(()=>{class o{constructor(t,n,a,c,y){this.service=t,this.formBuilder=n,this.activatedRoute=a,this.router=c,this.themeService=y,this.faCircleInfo=b.mEO,this.typeDropdownMenuOptions=["I will manually enter a type","id","string","integer","text","boolean","binary","float","double","decimal","datetime","date","time","reference","user_id","user_id_on_create","user_id_on_update","timestamp","timestamp_on_create","timestamp_on_update"],this.referenceTableDropdownMenuOptions=[],this.referenceFieldDropdownMenuOptions=[],this.type="",this.trackByName=(le,te)=>te.name,this.isDarkMode=this.themeService.darkMode$,this.fieldDetailsForm=this.formBuilder.group({name:["",l.k0.required],alias:[""],label:[""],isVirtual:[!1],isAggregate:[{value:!1,disabled:!0}],type:["",l.k0.required],dbType:[{value:"",disabled:!0}],length:[],precision:[{value:"",disabled:!0}],scale:[{value:0,disabled:!0}],fixedLength:[{value:!1,disabled:!0}],supportsMultibyte:[{value:!1,disabled:!0}],allowNull:[!1],autoIncrement:[!1],default:[],isIndex:[!1],isUnique:[!1],isPrimaryKey:[{value:!1,disabled:!0}],isForeignKey:[!1],refTable:[{value:"",disabled:!0}],refField:[{value:"",disabled:!0}],validation:["",M.V],dbFunction:this.formBuilder.array([]),picklist:["",L]})}ngOnInit(){this.activatedRoute.data.subscribe(t=>{this.type=t.type}),this.dbName=this.activatedRoute.snapshot.params.name,this.tableName=this.activatedRoute.snapshot.params.id,"edit"===this.type&&(this.fieldName=this.activatedRoute.snapshot.params.fieldName),this.fieldName&&this.service.get(`${this.dbName}/_schema/${this.tableName}/_field/${this.fieldName}`).subscribe(t=>{this.databaseFieldToEdit=t,this.fieldDetailsForm.patchValue({name:t.name,alias:t.alias,label:t.label,isVirtual:t.isVirtual,isAggregate:t.isAggregate,type:t.type,dbType:t.dbType,length:t.length,precision:t.precision,scale:t.scale,fixedLength:t.fixedLength,supportsMultibyte:t.supportsMultibyte,allowNull:t.allowNull,autoIncrement:t.autoIncrement,default:t.default,isIndex:t.isIndex,isUnique:t.isUnique,isPrimaryKey:t.isPrimaryKey,isForeignKey:t.isForeignKey,refTable:t.refTable,refField:t.refField,validation:t.validation??"",picklist:t.picklist}),t.dbFunction.length>0&&(t.dbFunction.forEach(n=>{this.fieldDetailsForm.controls.dbFunction.push(new l.gE({use:new l.MJ(n.use,l.k0.required),function:new l.MJ(n.function)}))}),this.dbFunctions.updateDataSource())}),this.fieldDetailsForm.get("refTable")?.valueChanges.subscribe(t=>{t&&this.service.get(`${this.dbName}/_schema/${t}`).subscribe(n=>{this.referenceFieldDropdownMenuOptions=n.field,this.enableFormField("refField")})}),this.fieldDetailsForm.get("isForeignKey")?.valueChanges.subscribe(t=>{t?this.service.get(`${this.dbName}/_schema`).subscribe(n=>{this.enableFormField("refTable"),this.referenceTableDropdownMenuOptions=n.resource}):(this.disableFormField("refTable"),this.disableFormField("refField"))}),this.fieldDetailsForm.get("isVirtual")?.valueChanges.subscribe(t=>{t?(this.disableFormField("dbType"),this.enableFormField("isAggregate")):(this.fieldDetailsForm.get("type")?.value===this.typeDropdownMenuOptions[0]&&this.enableFormField("dbType"),this.disableFormField("isAggregate"))}),this.fieldDetailsForm.get("type")?.valueChanges.subscribe(t=>{switch(t){case this.typeDropdownMenuOptions[0]:!1===this.fieldDetailsForm.get("isVirtual")?.value?(this.enableFormField("dbType"),this.disableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale")):this.disableFormField("dbType"),this.removeFormField("picklist"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte");break;case"string":this.addFormField("picklist"),this.disableFormField("dbType"),this.enableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale"),this.enableFormField("fixedLength"),this.enableFormField("supportsMultibyte");break;case"integer":this.addFormField("picklist"),this.disableFormField("dbType"),this.enableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte");break;case"text":case"binary":this.disableFormField("dbType"),this.enableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale"),this.removeFormField("picklist"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte");break;case"float":case"double":case"decimal":this.disableFormField("dbType"),this.disableFormField("length"),this.enableFormField("precision"),this.enableFormField("scale",0),this.removeFormField("picklist"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte");break;default:this.disableFormField("dbType"),this.disableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale"),this.removeFormField("picklist"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte")}})}addFormField(t){this.fieldDetailsForm.addControl(t,this.formBuilder.control(""))}removeFormField(t){this.fieldDetailsForm.removeControl(t)}disableFormField(t){this.fieldDetailsForm.controls[t].setValue(null),this.fieldDetailsForm.controls[t].disable()}enableFormField(t,n){this.fieldDetailsForm.controls[t].disabled&&this.fieldDetailsForm.controls[t].enable(),n&&this.fieldDetailsForm.controls[t].setValue(n)}onSubmit(){this.fieldDetailsForm.valid&&(this.databaseFieldToEdit?this.service.update(`${this.dbName}/_schema/${this.tableName}/_field`,{resource:[this.fieldDetailsForm.value]},{snackbarSuccess:"schema.fieldDetailsForm.updateSuccess"}).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.activatedRoute})}):this.service.create({resource:[this.fieldDetailsForm.value]},{snackbarSuccess:"schema.fieldDetailsForm.createSuccess"},`${this.dbName}/_schema/${this.tableName}/_field`).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.activatedRoute})}))}onCancel(){this.router.navigate(["../../"],{relativeTo:this.activatedRoute})}static{this.\u0275fac=function(n){return new(n||o)(e.rXU(E.qJ),e.rXU(l.ok),e.rXU(I.nX),e.rXU(I.Ix),e.rXU(X.n))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["df-field-details"]],viewQuery:function(n,a){if(1&n&&e.GBs(D,5),2&n){let c;e.mGM(c=e.lsd())&&(a.dbFunctions=c.first)}},standalone:!0,features:[e.aNF],decls:115,vars:98,consts:[[1,"details-section",3,"formGroup","ngSubmit"],[1,"full-width"],["appearance","outline","subscriptSizing","dynamic",1,"dynamic-width"],["matInput","","formControlName","name"],[4,"ngIf"],["matInput","","formControlName","alias"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],["matInput","","formControlName","label"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["matInput","","formControlName","dbType"],["type","number","matInput","","formControlName","length"],["type","number","matInput","","formControlName","precision"],["type","number","matInput","","formControlName","scale"],["matInput","","formControlName","default"],["color","primary","formControlName","isVirtual",1,"dynamic-width"],["color","primary","formControlName","isAggregate",1,"dynamic-width"],["color","primary","formControlName","fixedLength",1,"dynamic-width"],["color","primary","formControlName","supportsMultibyte",1,"dynamic-width"],["color","primary","formControlName","allowNull",1,"dynamic-width"],["color","primary","formControlName","autoIncrement",1,"dynamic-width"],["color","primary","formControlName","isIndex",1,"dynamic-width"],["color","primary","formControlName","isUnique",1,"dynamic-width"],["color","primary","formControlName","isPrimaryKey",1,"dynamic-width"],["color","primary","formControlName","isForeignKey",1,"dynamic-width"],["formControlName","refTable"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["formControlName","refField"],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["matInput","","rows","4","cols","6","formControlName","validation"],["formArrayName","dbFunction",1,"full-width"],[1,"full-width","action-bar"],["type","button","mat-flat-button","",1,"cancel-btn",3,"click"],["mat-flat-button","",1,"save-btn"],[3,"value"],["matInput","","formControlName","picklist"]],template:function(n,a){1&n&&(e.j41(0,"form",0),e.bIt("ngSubmit",function(){return a.onSubmit()}),e.j41(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.nrm(6,"input",3),e.DNE(7,K,3,3,"mat-error",4),e.k0s()(),e.j41(8,"mat-form-field",2)(9,"mat-label"),e.EFF(10),e.nI1(11,"transloco"),e.k0s(),e.nrm(12,"input",5)(13,"fa-icon",6),e.nI1(14,"transloco"),e.k0s(),e.j41(15,"mat-form-field",2)(16,"mat-label"),e.EFF(17),e.nI1(18,"transloco"),e.k0s(),e.nrm(19,"input",7)(20,"fa-icon",6),e.nI1(21,"transloco"),e.k0s(),e.j41(22,"mat-form-field",2)(23,"mat-label"),e.EFF(24),e.nI1(25,"transloco"),e.k0s(),e.j41(26,"mat-select",8),e.DNE(27,z,2,2,"mat-option",9),e.k0s(),e.nrm(28,"fa-icon",6),e.nI1(29,"transloco"),e.k0s(),e.j41(30,"mat-form-field",2)(31,"mat-label"),e.EFF(32),e.nI1(33,"transloco"),e.k0s(),e.nrm(34,"input",10)(35,"fa-icon",6),e.nI1(36,"transloco"),e.k0s(),e.j41(37,"mat-form-field",2)(38,"mat-label"),e.EFF(39),e.nI1(40,"transloco"),e.k0s(),e.nrm(41,"input",11),e.k0s(),e.j41(42,"mat-form-field",2)(43,"mat-label"),e.EFF(44),e.nI1(45,"transloco"),e.k0s(),e.nrm(46,"input",12),e.k0s(),e.j41(47,"mat-form-field",2)(48,"mat-label"),e.EFF(49),e.nI1(50,"transloco"),e.k0s(),e.nrm(51,"input",13),e.k0s(),e.j41(52,"mat-form-field",2)(53,"mat-label"),e.EFF(54),e.nI1(55,"transloco"),e.k0s(),e.nrm(56,"input",14),e.k0s(),e.j41(57,"mat-slide-toggle",15),e.EFF(58),e.nI1(59,"transloco"),e.k0s(),e.j41(60,"mat-slide-toggle",16),e.EFF(61),e.nI1(62,"transloco"),e.k0s(),e.j41(63,"mat-slide-toggle",17),e.EFF(64),e.nI1(65,"transloco"),e.k0s(),e.j41(66,"mat-slide-toggle",18),e.EFF(67),e.nI1(68,"transloco"),e.k0s(),e.j41(69,"mat-slide-toggle",19),e.EFF(70),e.nI1(71,"transloco"),e.k0s(),e.j41(72,"mat-slide-toggle",20),e.EFF(73),e.nI1(74,"transloco"),e.k0s(),e.j41(75,"mat-slide-toggle",21),e.EFF(76),e.nI1(77,"transloco"),e.k0s(),e.j41(78,"mat-slide-toggle",22),e.EFF(79),e.nI1(80,"transloco"),e.k0s(),e.j41(81,"mat-slide-toggle",23),e.EFF(82),e.nI1(83,"transloco"),e.k0s(),e.j41(84,"mat-slide-toggle",24),e.EFF(85),e.nI1(86,"transloco"),e.k0s(),e.j41(87,"mat-form-field",2)(88,"mat-label"),e.EFF(89),e.nI1(90,"transloco"),e.k0s(),e.j41(91,"mat-select",25),e.DNE(92,Q,2,2,"mat-option",26),e.k0s()(),e.j41(93,"mat-form-field",2)(94,"mat-label"),e.EFF(95),e.nI1(96,"transloco"),e.k0s(),e.j41(97,"mat-select",27),e.DNE(98,H,2,2,"mat-option",26),e.k0s()(),e.j41(99,"mat-form-field",28)(100,"mat-label"),e.EFF(101),e.nI1(102,"transloco"),e.k0s(),e.nrm(103,"textarea",29)(104,"fa-icon",6),e.nI1(105,"transloco"),e.DNE(106,Z,3,3,"mat-error",4),e.k0s(),e.nrm(107,"df-function-use",30),e.DNE(108,q,7,4,"ng-container",4),e.j41(109,"div",31)(110,"button",32),e.bIt("click",function(){return a.onCancel()}),e.EFF(111," Cancel "),e.k0s(),e.j41(112,"button",33),e.EFF(113),e.nI1(114,"transloco"),e.k0s()()()),2&n&&(e.Y8G("formGroup",a.fieldDetailsForm),e.R7$(4),e.JRh(e.bMT(5,42,"schema.fieldDetailsForm.controls.name")),e.R7$(3),e.Y8G("ngIf",a.fieldDetailsForm.controls.name.hasError("required")),e.R7$(3),e.JRh(e.bMT(11,44,"schema.fieldDetailsForm.controls.alias.label")),e.R7$(3),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(14,46,"schema.fieldDetailsForm.controls.alias.tooltip")),e.R7$(4),e.JRh(e.bMT(18,48,"schema.fieldDetailsForm.controls.label.label")),e.R7$(3),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(21,50,"schema.fieldDetailsForm.controls.label.tooltip")),e.R7$(4),e.JRh(e.bMT(25,52,"schema.fieldDetailsForm.controls.type.label")),e.R7$(3),e.Y8G("ngForOf",a.typeDropdownMenuOptions),e.R7$(1),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(29,54,"schema.fieldDetailsForm.controls.type.tooltip")),e.R7$(4),e.JRh(e.bMT(33,56,"schema.fieldDetailsForm.controls.databaseType.label")),e.R7$(3),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(36,58,"schema.fieldDetailsForm.controls.databaseType.tooltip")),e.R7$(4),e.JRh(e.bMT(40,60,"schema.fieldDetailsForm.controls.length")),e.R7$(5),e.JRh(e.bMT(45,62,"schema.fieldDetailsForm.controls.precision")),e.R7$(5),e.JRh(e.bMT(50,64,"schema.fieldDetailsForm.controls.scale")),e.R7$(5),e.JRh(e.bMT(55,66,"schema.fieldDetailsForm.controls.defaultValue")),e.R7$(4),e.JRh(e.bMT(59,68,"schema.fieldDetailsForm.controls.isVirtual")),e.R7$(3),e.JRh(e.bMT(62,70,"schema.fieldDetailsForm.controls.isAggregate")),e.R7$(3),e.JRh(e.bMT(65,72,"schema.fieldDetailsForm.controls.fixedLength")),e.R7$(3),e.JRh(e.bMT(68,74,"schema.fieldDetailsForm.controls.supportsMultibyte")),e.R7$(3),e.JRh(e.bMT(71,76,"schema.fieldDetailsForm.controls.allowNull")),e.R7$(3),e.JRh(e.bMT(74,78,"schema.fieldDetailsForm.controls.autoIncrement")),e.R7$(3),e.JRh(e.bMT(77,80,"schema.fieldDetailsForm.controls.isIndex")),e.R7$(3),e.JRh(e.bMT(80,82,"schema.fieldDetailsForm.controls.isUnique")),e.R7$(3),e.JRh(e.bMT(83,84,"schema.fieldDetailsForm.controls.isPrimaryKey")),e.R7$(3),e.JRh(e.bMT(86,86,"schema.fieldDetailsForm.controls.isForeignKey")),e.R7$(4),e.JRh(e.bMT(90,88,"schema.fieldDetailsForm.controls.refTable")),e.R7$(3),e.Y8G("ngForOf",a.referenceTableDropdownMenuOptions)("ngForTrackBy",a.trackByName),e.R7$(3),e.JRh(e.bMT(96,90,"schema.fieldDetailsForm.controls.refField")),e.R7$(3),e.Y8G("ngForOf",a.referenceFieldDropdownMenuOptions)("ngForTrackBy",a.trackByName),e.R7$(3),e.JRh(e.bMT(102,92,"schema.fieldDetailsForm.controls.validation.label")),e.R7$(3),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(105,94,"schema.fieldDetailsForm.controls.validation.tooltip")),e.R7$(2),e.Y8G("ngIf",a.fieldDetailsForm.controls.validation.hasError("jsonInvalid")),e.R7$(2),e.Y8G("ngIf",a.fieldDetailsForm.controls.picklist),e.R7$(5),e.SpI(" ",e.bMT(114,96,a.databaseFieldToEdit?"save":"create")," "))},dependencies:[D,l.X1,l.qT,l.me,l.Q0,l.BC,l.cb,l.j4,l.JD,l.v8,T.mV,T.sG,f.bT,k.Wk,u.Hl,u.$z,h.dX,h.aY,m.RG,m.rl,m.nJ,m.TL,m.yw,F.fS,F.fg,p.Ve,p.VO,_.wT,f.pM,R.Kj,g.uc,g.oV],styles:["form[_ngcontent-%COMP%] .mat-mdc-form-field[_ngcontent-%COMP%]{padding-bottom:10px}form[_ngcontent-%COMP%] .slide-toggle-container[_ngcontent-%COMP%]{display:grid;margin-bottom:1rem}form[_ngcontent-%COMP%] .slide-toggle-container[_ngcontent-%COMP%] .mat-mdc-slide-toggle[_ngcontent-%COMP%]{padding-bottom:10px}form[_ngcontent-%COMP%] .action-bar[_ngcontent-%COMP%]{justify-content:flex-end;gap:12px;margin-top:8px;border-top:1px solid var(--df-border-2)}"]})}}return o})()}}]); \ No newline at end of file +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2617],{32617:(oe,C,s)=>{s.r(C),s.d(C,{DfFieldDetailsComponent:()=>ee});var f=s(60177),l=s(89417),u=s(88834),m=s(32102),F=s(99631),k=s(5951),T=s(30450),p=s(82798),h=s(20060),R=s(33609),M=s(90124),E=s(24784),$=s(31635),d=s(9454),r=s(9159),b=s(45383),N=s(49894),g=s(14823),e=s(17705),_=s(86600);function j(o,i){if(1&o&&(e.j41(0,"mat-accordion")(1,"mat-expansion-panel")(2,"mat-expansion-panel-header")(3,"mat-panel-title"),e.EFF(4),e.nI1(5,"transloco"),e.nrm(6,"fa-icon",3),e.nI1(7,"transloco"),e.k0s(),e.j41(8,"mat-panel-description"),e.EFF(9),e.nI1(10,"transloco"),e.k0s()(),e.eu8(11,4),e.k0s()()),2&o){const t=e.XpG(),n=e.sdS(3);e.R7$(4),e.SpI("",e.bMT(5,5,"schema.fieldDetailsForm.controls.dbFunctionTitle")," "),e.R7$(2),e.Y8G("icon",t.faCircleInfo)("matTooltip",e.bMT(7,7,"schema.fieldDetailsForm.controls.dfFunctionTooltip")),e.R7$(3),e.SpI("",e.bMT(10,9,"schema.fieldDetailsForm.controls.dbFunctionUseDescription")," "),e.R7$(2),e.Y8G("ngTemplateOutlet",n)}}function G(o,i){1&o&&(e.j41(0,"mat-header-cell"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"use")," "))}function x(o,i){if(1&o&&(e.j41(0,"mat-option",21),e.EFF(1),e.k0s()),2&o){const t=i.$implicit;e.Y8G("value",t.value),e.R7$(1),e.SpI("",t.name," ")}}function w(o,i){if(1&o&&(e.j41(0,"mat-cell",17)(1,"mat-form-field",18)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"mat-select",19),e.DNE(6,x,2,2,"mat-option",20),e.k0s()()()),2&o){const t=i.index,n=e.XpG(2);e.Y8G("formGroupName",t),e.R7$(3),e.JRh(e.bMT(4,3,"use")),e.R7$(3),e.Y8G("ngForOf",n.functionUsesDropdownOptions)}}function S(o,i){1&o&&(e.j41(0,"mat-header-cell"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"function")," "))}function O(o,i){1&o&&(e.j41(0,"mat-cell",17)(1,"mat-form-field",18)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"input",22),e.k0s()()),2&o&&(e.Y8G("formGroupName",i.index),e.R7$(3),e.JRh(e.bMT(4,2,"function")))}function U(o,i){if(1&o){const t=e.RV6();e.j41(0,"mat-header-cell")(1,"button",23),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.add())}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",24),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(1),e.BMQ("aria-label",e.bMT(2,2,"newEntry")),e.R7$(2),e.Y8G("icon",t.faPlus)}}const Y=function(o){return{id:o}};function J(o,i){if(1&o){const t=e.RV6();e.j41(0,"mat-cell")(1,"button",25),e.bIt("click",function(){const c=e.eBV(t).index,y=e.XpG(2);return e.Njj(y.remove(c))}),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",26),e.k0s()()}if(2&o){const t=i.index,n=e.XpG(2);e.R7$(1),e.BMQ("aria-label",e.i5U(2,2,"deleteRow",e.eq3(5,Y,t))),e.R7$(2),e.Y8G("icon",n.faTrashCan)}}function V(o,i){1&o&&e.nrm(0,"mat-header-row")}function P(o,i){1&o&&e.nrm(0,"mat-row")}function B(o,i){1&o&&(e.j41(0,"tr",27)(1,"td",28),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()),2&o&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"schema.fieldDetailsForm.controls.noDbFunctions")," "))}function A(o,i){if(1&o&&(e.qex(0,5)(1,6),e.j41(2,"mat-table",7),e.qex(3,8),e.DNE(4,G,3,3,"mat-header-cell",9),e.DNE(5,w,7,5,"mat-cell",10),e.bVm(),e.qex(6,11),e.DNE(7,S,3,3,"mat-header-cell",9),e.DNE(8,O,6,4,"mat-cell",10),e.bVm(),e.qex(9,12),e.DNE(10,U,4,4,"mat-header-cell",9),e.DNE(11,J,4,7,"mat-cell",13),e.bVm(),e.DNE(12,V,1,0,"mat-header-row",14),e.DNE(13,P,1,0,"mat-row",15),e.DNE(14,B,4,3,"tr",16),e.k0s(),e.bVm()()),2&o){const t=e.XpG();e.Y8G("formGroup",t.rootForm),e.R7$(2),e.Y8G("dataSource",t.dataSource),e.R7$(10),e.Y8G("matHeaderRowDef",t.displayedColumns),e.R7$(1),e.Y8G("matRowDefColumns",t.displayedColumns)}}let D=class v{constructor(i){this.rootFormGroup=i,this.displayedColumns=["use","function","actions"],this.faTrashCan=b.sjs,this.faPlus=b.QLR,this.faCircleInfo=b.mEO,this.showAccordion=!0,this.functionUsesDropdownOptions=[{name:"SELECT (GET)",value:"SELECT"},{name:"FILTER (GET)",value:"FILTER"},{name:"INSERT (POST)",value:"INSERT"},{name:"UPDATE (PATCH)",value:"UPDATE"}]}ngOnInit(){this.rootForm=this.rootFormGroup.control,this.rootFormGroup.ngSubmit.subscribe(()=>{this.keys.markAllAsTouched()}),this.keys=this.rootForm.get("dbFunction"),this.updateDataSource()}updateDataSource(){this.dataSource=new r.I6(this.keys.controls)}add(){this.keys.push(new l.gE({use:new l.MJ([""],l.k0.required),function:new l.MJ("")})),this.updateDataSource()}remove(i){this.keys.removeAt(i),this.updateDataSource()}static{this.\u0275fac=function(t){return new(t||v)(e.rXU(l.j4))}}static{this.\u0275cmp=e.VBU({type:v,selectors:[["df-function-use"]],inputs:{showAccordion:"showAccordion"},standalone:!0,features:[e.aNF],decls:4,vars:2,consts:[[1,"keys-accordion"],[4,"ngIf","ngIfElse"],["dbFunctionUse",""],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[3,"ngTemplateOutlet"],[3,"formGroup"],["formArrayName","dbFunction"],[3,"dataSource"],["matColumnDef","use"],[4,"matHeaderCellDef"],[3,"formGroupName",4,"matCellDef"],["matColumnDef","function"],["matColumnDef","actions","stickyEnd",""],[4,"matCellDef"],[4,"matHeaderRowDef"],[4,"matRowDef","matRowDefColumns"],["class","mat-row",4,"matNoDataRow"],[3,"formGroupName"],["subscriptSizing","dynamic"],["formControlName","use","multiple",""],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["matInput","","formControlName","function"],["mat-mini-fab","","color","primary","type","button",3,"click"],["size","xl",3,"icon"],["mat-icon-button","","type","button",3,"click"],["size","xs",3,"icon"],[1,"mat-row"],["colspan","4",1,"mat-cell"]],template:function(t,n){if(1&t&&(e.j41(0,"div",0),e.DNE(1,j,12,11,"mat-accordion",1),e.DNE(2,A,15,4,"ng-template",null,2,e.C5r),e.k0s()),2&t){const a=e.sdS(3);e.R7$(1),e.Y8G("ngIf",n.showAccordion)("ngIfElse",a)}},dependencies:[l.YN,l.me,l.BC,l.cb,l.X1,l.j4,l.JD,l.$R,l.v8,f.bT,f.pM,f.T3,m.RG,m.rl,m.nJ,m.yw,u.Hl,u.iY,u.$0,r.tP,r.Zl,r.tL,r.ji,r.cC,r.YV,r.iL,r.KS,r.$R,r.YZ,r.NB,r.ky,F.fS,F.fg,T.mV,p.Ve,p.VO,_.wT,h.dX,h.aY,d.MY,d.BS,d.GK,d.Z2,d.WN,d.Q6,R.Kj,g.uc,g.oV],styles:[".keys-accordion[_ngcontent-%COMP%] mat-expansion-panel[_ngcontent-%COMP%]{box-shadow:none!important;border:1px solid var(--df-border-2);border-radius:var(--df-radius)!important;background:var(--df-surface)}.keys-accordion[_ngcontent-%COMP%] mat-panel-title[_ngcontent-%COMP%]{font-size:1.4rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.keys-accordion[_ngcontent-%COMP%] mat-panel-description[_ngcontent-%COMP%]{font-size:1.3rem;color:var(--df-text-muted)}"]})}};function L(o){return o.value&&o.value.length>0&&!/^\w+(?:\s*,\s*\w+)*$/.test(o.value)?{csvInvalid:!0}:null}D=(0,$.Cg)([(0,N.d)({checkProperties:!0})],D);var I=s(95245),X=s(52868);function K(o,i){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.fieldDetailsForm.errors.name")," "))}function z(o,i){if(1&o&&(e.j41(0,"mat-option",34),e.EFF(1),e.k0s()),2&o){const t=i.$implicit;e.Y8G("value",t),e.R7$(1),e.SpI(" ",t," ")}}function Q(o,i){if(1&o&&(e.j41(0,"mat-option",34),e.EFF(1),e.k0s()),2&o){const t=i.$implicit;e.Y8G("value",t.name),e.R7$(1),e.SpI(" ",t.name," ")}}function H(o,i){if(1&o&&(e.j41(0,"mat-option",34),e.EFF(1),e.k0s()),2&o){const t=i.$implicit;e.Y8G("value",t.name),e.R7$(1),e.JRh(t.label)}}function Z(o,i){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.fieldDetailsForm.errors.json")," "))}function W(o,i){1&o&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"schema.fieldDetailsForm.errors.csv")," "))}function q(o,i){if(1&o&&(e.qex(0),e.j41(1,"mat-form-field",2)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"input",35),e.k0s(),e.DNE(6,W,3,3,"mat-error",4),e.bVm()),2&o){const t=e.XpG();e.R7$(3),e.JRh(e.bMT(4,2,"schema.fieldDetailsForm.controls.picklist")),e.R7$(3),e.Y8G("ngIf",t.fieldDetailsForm.controls.picklist.hasError("csvInvalid"))}}s(36225);let ee=(()=>{class o{constructor(t,n,a,c,y){this.service=t,this.formBuilder=n,this.activatedRoute=a,this.router=c,this.themeService=y,this.faCircleInfo=b.mEO,this.typeDropdownMenuOptions=["I will manually enter a type","id","string","integer","text","boolean","binary","float","double","decimal","datetime","date","time","reference","user_id","user_id_on_create","user_id_on_update","timestamp","timestamp_on_create","timestamp_on_update"],this.referenceTableDropdownMenuOptions=[],this.referenceFieldDropdownMenuOptions=[],this.type="",this.trackByName=(le,te)=>te.name,this.isDarkMode=this.themeService.darkMode$,this.fieldDetailsForm=this.formBuilder.group({name:["",l.k0.required],alias:[""],label:[""],isVirtual:[!1],isAggregate:[{value:!1,disabled:!0}],type:["",l.k0.required],dbType:[{value:"",disabled:!0}],length:[],precision:[{value:"",disabled:!0}],scale:[{value:0,disabled:!0}],fixedLength:[{value:!1,disabled:!0}],supportsMultibyte:[{value:!1,disabled:!0}],allowNull:[!1],autoIncrement:[!1],default:[],isIndex:[!1],isUnique:[!1],isPrimaryKey:[{value:!1,disabled:!0}],isForeignKey:[!1],refTable:[{value:"",disabled:!0}],refField:[{value:"",disabled:!0}],validation:["",M.V],dbFunction:this.formBuilder.array([]),picklist:["",L]})}ngOnInit(){this.activatedRoute.data.subscribe(t=>{this.type=t.type}),this.dbName=this.activatedRoute.snapshot.params.name,this.tableName=this.activatedRoute.snapshot.params.id,"edit"===this.type&&(this.fieldName=this.activatedRoute.snapshot.params.fieldName),this.fieldName&&this.service.get(`${this.dbName}/_schema/${this.tableName}/_field/${this.fieldName}`).subscribe(t=>{this.databaseFieldToEdit=t,this.fieldDetailsForm.patchValue({name:t.name,alias:t.alias,label:t.label,isVirtual:t.isVirtual,isAggregate:t.isAggregate,type:t.type,dbType:t.dbType,length:t.length,precision:t.precision,scale:t.scale,fixedLength:t.fixedLength,supportsMultibyte:t.supportsMultibyte,allowNull:t.allowNull,autoIncrement:t.autoIncrement,default:t.default,isIndex:t.isIndex,isUnique:t.isUnique,isPrimaryKey:t.isPrimaryKey,isForeignKey:t.isForeignKey,refTable:t.refTable,refField:t.refField,validation:t.validation??"",picklist:t.picklist}),t.dbFunction.length>0&&(t.dbFunction.forEach(n=>{this.fieldDetailsForm.controls.dbFunction.push(new l.gE({use:new l.MJ(n.use,l.k0.required),function:new l.MJ(n.function)}))}),this.dbFunctions.updateDataSource())}),this.fieldDetailsForm.get("refTable")?.valueChanges.subscribe(t=>{t&&this.service.get(`${this.dbName}/_schema/${t}`).subscribe(n=>{this.referenceFieldDropdownMenuOptions=n.field,this.enableFormField("refField")})}),this.fieldDetailsForm.get("isForeignKey")?.valueChanges.subscribe(t=>{t?this.service.get(`${this.dbName}/_schema`).subscribe(n=>{this.enableFormField("refTable"),this.referenceTableDropdownMenuOptions=n.resource}):(this.disableFormField("refTable"),this.disableFormField("refField"))}),this.fieldDetailsForm.get("isVirtual")?.valueChanges.subscribe(t=>{t?(this.disableFormField("dbType"),this.enableFormField("isAggregate")):(this.fieldDetailsForm.get("type")?.value===this.typeDropdownMenuOptions[0]&&this.enableFormField("dbType"),this.disableFormField("isAggregate"))}),this.fieldDetailsForm.get("type")?.valueChanges.subscribe(t=>{switch(t){case this.typeDropdownMenuOptions[0]:!1===this.fieldDetailsForm.get("isVirtual")?.value?(this.enableFormField("dbType"),this.disableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale")):this.disableFormField("dbType"),this.removeFormField("picklist"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte");break;case"string":this.addFormField("picklist"),this.disableFormField("dbType"),this.enableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale"),this.enableFormField("fixedLength"),this.enableFormField("supportsMultibyte");break;case"integer":this.addFormField("picklist"),this.disableFormField("dbType"),this.enableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte");break;case"text":case"binary":this.disableFormField("dbType"),this.enableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale"),this.removeFormField("picklist"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte");break;case"float":case"double":case"decimal":this.disableFormField("dbType"),this.disableFormField("length"),this.enableFormField("precision"),this.enableFormField("scale",0),this.removeFormField("picklist"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte");break;default:this.disableFormField("dbType"),this.disableFormField("length"),this.disableFormField("precision"),this.disableFormField("scale"),this.removeFormField("picklist"),this.disableFormField("fixedLength"),this.disableFormField("supportsMultibyte")}})}addFormField(t){this.fieldDetailsForm.addControl(t,this.formBuilder.control(""))}removeFormField(t){this.fieldDetailsForm.removeControl(t)}disableFormField(t){this.fieldDetailsForm.controls[t].setValue(null),this.fieldDetailsForm.controls[t].disable()}enableFormField(t,n){this.fieldDetailsForm.controls[t].disabled&&this.fieldDetailsForm.controls[t].enable(),n&&this.fieldDetailsForm.controls[t].setValue(n)}onSubmit(){this.fieldDetailsForm.valid&&(this.databaseFieldToEdit?this.service.update(`${this.dbName}/_schema/${this.tableName}/_field`,{resource:[this.fieldDetailsForm.value]},{snackbarSuccess:"schema.fieldDetailsForm.updateSuccess"}).subscribe(()=>{this.router.navigate(["../../"],{relativeTo:this.activatedRoute})}):this.service.create({resource:[this.fieldDetailsForm.value]},{snackbarSuccess:"schema.fieldDetailsForm.createSuccess"},`${this.dbName}/_schema/${this.tableName}/_field`).subscribe(()=>{this.router.navigate(["../"],{relativeTo:this.activatedRoute})}))}onCancel(){this.router.navigate(["../../"],{relativeTo:this.activatedRoute})}static{this.\u0275fac=function(n){return new(n||o)(e.rXU(E.qJ),e.rXU(l.ok),e.rXU(I.nX),e.rXU(I.Ix),e.rXU(X.n))}}static{this.\u0275cmp=e.VBU({type:o,selectors:[["df-field-details"]],viewQuery:function(n,a){if(1&n&&e.GBs(D,5),2&n){let c;e.mGM(c=e.lsd())&&(a.dbFunctions=c.first)}},standalone:!0,features:[e.aNF],decls:115,vars:98,consts:[[1,"details-section",3,"formGroup","ngSubmit"],[1,"full-width"],["appearance","outline","subscriptSizing","dynamic",1,"dynamic-width"],["matInput","","formControlName","name"],[4,"ngIf"],["matInput","","formControlName","alias"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],["matInput","","formControlName","label"],["formControlName","type"],[3,"value",4,"ngFor","ngForOf"],["matInput","","formControlName","dbType"],["type","number","matInput","","formControlName","length"],["type","number","matInput","","formControlName","precision"],["type","number","matInput","","formControlName","scale"],["matInput","","formControlName","default"],["color","primary","formControlName","isVirtual",1,"dynamic-width"],["color","primary","formControlName","isAggregate",1,"dynamic-width"],["color","primary","formControlName","fixedLength",1,"dynamic-width"],["color","primary","formControlName","supportsMultibyte",1,"dynamic-width"],["color","primary","formControlName","allowNull",1,"dynamic-width"],["color","primary","formControlName","autoIncrement",1,"dynamic-width"],["color","primary","formControlName","isIndex",1,"dynamic-width"],["color","primary","formControlName","isUnique",1,"dynamic-width"],["color","primary","formControlName","isPrimaryKey",1,"dynamic-width"],["color","primary","formControlName","isForeignKey",1,"dynamic-width"],["formControlName","refTable"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["formControlName","refField"],["appearance","outline","subscriptSizing","dynamic",1,"full-width"],["matInput","","rows","4","cols","6","formControlName","validation"],["formArrayName","dbFunction",1,"full-width"],[1,"full-width","action-bar"],["type","button","mat-flat-button","",1,"cancel-btn",3,"click"],["mat-flat-button","",1,"save-btn"],[3,"value"],["matInput","","formControlName","picklist"]],template:function(n,a){1&n&&(e.j41(0,"form",0),e.bIt("ngSubmit",function(){return a.onSubmit()}),e.j41(1,"div",1)(2,"mat-form-field",2)(3,"mat-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.nrm(6,"input",3),e.DNE(7,K,3,3,"mat-error",4),e.k0s()(),e.j41(8,"mat-form-field",2)(9,"mat-label"),e.EFF(10),e.nI1(11,"transloco"),e.k0s(),e.nrm(12,"input",5)(13,"fa-icon",6),e.nI1(14,"transloco"),e.k0s(),e.j41(15,"mat-form-field",2)(16,"mat-label"),e.EFF(17),e.nI1(18,"transloco"),e.k0s(),e.nrm(19,"input",7)(20,"fa-icon",6),e.nI1(21,"transloco"),e.k0s(),e.j41(22,"mat-form-field",2)(23,"mat-label"),e.EFF(24),e.nI1(25,"transloco"),e.k0s(),e.j41(26,"mat-select",8),e.DNE(27,z,2,2,"mat-option",9),e.k0s(),e.nrm(28,"fa-icon",6),e.nI1(29,"transloco"),e.k0s(),e.j41(30,"mat-form-field",2)(31,"mat-label"),e.EFF(32),e.nI1(33,"transloco"),e.k0s(),e.nrm(34,"input",10)(35,"fa-icon",6),e.nI1(36,"transloco"),e.k0s(),e.j41(37,"mat-form-field",2)(38,"mat-label"),e.EFF(39),e.nI1(40,"transloco"),e.k0s(),e.nrm(41,"input",11),e.k0s(),e.j41(42,"mat-form-field",2)(43,"mat-label"),e.EFF(44),e.nI1(45,"transloco"),e.k0s(),e.nrm(46,"input",12),e.k0s(),e.j41(47,"mat-form-field",2)(48,"mat-label"),e.EFF(49),e.nI1(50,"transloco"),e.k0s(),e.nrm(51,"input",13),e.k0s(),e.j41(52,"mat-form-field",2)(53,"mat-label"),e.EFF(54),e.nI1(55,"transloco"),e.k0s(),e.nrm(56,"input",14),e.k0s(),e.j41(57,"mat-slide-toggle",15),e.EFF(58),e.nI1(59,"transloco"),e.k0s(),e.j41(60,"mat-slide-toggle",16),e.EFF(61),e.nI1(62,"transloco"),e.k0s(),e.j41(63,"mat-slide-toggle",17),e.EFF(64),e.nI1(65,"transloco"),e.k0s(),e.j41(66,"mat-slide-toggle",18),e.EFF(67),e.nI1(68,"transloco"),e.k0s(),e.j41(69,"mat-slide-toggle",19),e.EFF(70),e.nI1(71,"transloco"),e.k0s(),e.j41(72,"mat-slide-toggle",20),e.EFF(73),e.nI1(74,"transloco"),e.k0s(),e.j41(75,"mat-slide-toggle",21),e.EFF(76),e.nI1(77,"transloco"),e.k0s(),e.j41(78,"mat-slide-toggle",22),e.EFF(79),e.nI1(80,"transloco"),e.k0s(),e.j41(81,"mat-slide-toggle",23),e.EFF(82),e.nI1(83,"transloco"),e.k0s(),e.j41(84,"mat-slide-toggle",24),e.EFF(85),e.nI1(86,"transloco"),e.k0s(),e.j41(87,"mat-form-field",2)(88,"mat-label"),e.EFF(89),e.nI1(90,"transloco"),e.k0s(),e.j41(91,"mat-select",25),e.DNE(92,Q,2,2,"mat-option",26),e.k0s()(),e.j41(93,"mat-form-field",2)(94,"mat-label"),e.EFF(95),e.nI1(96,"transloco"),e.k0s(),e.j41(97,"mat-select",27),e.DNE(98,H,2,2,"mat-option",26),e.k0s()(),e.j41(99,"mat-form-field",28)(100,"mat-label"),e.EFF(101),e.nI1(102,"transloco"),e.k0s(),e.nrm(103,"textarea",29)(104,"fa-icon",6),e.nI1(105,"transloco"),e.DNE(106,Z,3,3,"mat-error",4),e.k0s(),e.nrm(107,"df-function-use",30),e.DNE(108,q,7,4,"ng-container",4),e.j41(109,"div",31)(110,"button",32),e.bIt("click",function(){return a.onCancel()}),e.EFF(111," Cancel "),e.k0s(),e.j41(112,"button",33),e.EFF(113),e.nI1(114,"transloco"),e.k0s()()()),2&n&&(e.Y8G("formGroup",a.fieldDetailsForm),e.R7$(4),e.JRh(e.bMT(5,42,"schema.fieldDetailsForm.controls.name")),e.R7$(3),e.Y8G("ngIf",a.fieldDetailsForm.controls.name.hasError("required")),e.R7$(3),e.JRh(e.bMT(11,44,"schema.fieldDetailsForm.controls.alias.label")),e.R7$(3),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(14,46,"schema.fieldDetailsForm.controls.alias.tooltip")),e.R7$(4),e.JRh(e.bMT(18,48,"schema.fieldDetailsForm.controls.label.label")),e.R7$(3),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(21,50,"schema.fieldDetailsForm.controls.label.tooltip")),e.R7$(4),e.JRh(e.bMT(25,52,"schema.fieldDetailsForm.controls.type.label")),e.R7$(3),e.Y8G("ngForOf",a.typeDropdownMenuOptions),e.R7$(1),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(29,54,"schema.fieldDetailsForm.controls.type.tooltip")),e.R7$(4),e.JRh(e.bMT(33,56,"schema.fieldDetailsForm.controls.databaseType.label")),e.R7$(3),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(36,58,"schema.fieldDetailsForm.controls.databaseType.tooltip")),e.R7$(4),e.JRh(e.bMT(40,60,"schema.fieldDetailsForm.controls.length")),e.R7$(5),e.JRh(e.bMT(45,62,"schema.fieldDetailsForm.controls.precision")),e.R7$(5),e.JRh(e.bMT(50,64,"schema.fieldDetailsForm.controls.scale")),e.R7$(5),e.JRh(e.bMT(55,66,"schema.fieldDetailsForm.controls.defaultValue")),e.R7$(4),e.JRh(e.bMT(59,68,"schema.fieldDetailsForm.controls.isVirtual")),e.R7$(3),e.JRh(e.bMT(62,70,"schema.fieldDetailsForm.controls.isAggregate")),e.R7$(3),e.JRh(e.bMT(65,72,"schema.fieldDetailsForm.controls.fixedLength")),e.R7$(3),e.JRh(e.bMT(68,74,"schema.fieldDetailsForm.controls.supportsMultibyte")),e.R7$(3),e.JRh(e.bMT(71,76,"schema.fieldDetailsForm.controls.allowNull")),e.R7$(3),e.JRh(e.bMT(74,78,"schema.fieldDetailsForm.controls.autoIncrement")),e.R7$(3),e.JRh(e.bMT(77,80,"schema.fieldDetailsForm.controls.isIndex")),e.R7$(3),e.JRh(e.bMT(80,82,"schema.fieldDetailsForm.controls.isUnique")),e.R7$(3),e.JRh(e.bMT(83,84,"schema.fieldDetailsForm.controls.isPrimaryKey")),e.R7$(3),e.JRh(e.bMT(86,86,"schema.fieldDetailsForm.controls.isForeignKey")),e.R7$(4),e.JRh(e.bMT(90,88,"schema.fieldDetailsForm.controls.refTable")),e.R7$(3),e.Y8G("ngForOf",a.referenceTableDropdownMenuOptions)("ngForTrackBy",a.trackByName),e.R7$(3),e.JRh(e.bMT(96,90,"schema.fieldDetailsForm.controls.refField")),e.R7$(3),e.Y8G("ngForOf",a.referenceFieldDropdownMenuOptions)("ngForTrackBy",a.trackByName),e.R7$(3),e.JRh(e.bMT(102,92,"schema.fieldDetailsForm.controls.validation.label")),e.R7$(3),e.Y8G("icon",a.faCircleInfo)("matTooltip",e.bMT(105,94,"schema.fieldDetailsForm.controls.validation.tooltip")),e.R7$(2),e.Y8G("ngIf",a.fieldDetailsForm.controls.validation.hasError("jsonInvalid")),e.R7$(2),e.Y8G("ngIf",a.fieldDetailsForm.controls.picklist),e.R7$(5),e.SpI(" ",e.bMT(114,96,a.databaseFieldToEdit?"save":"create")," "))},dependencies:[D,l.X1,l.qT,l.me,l.Q0,l.BC,l.cb,l.j4,l.JD,l.v8,T.mV,T.sG,f.bT,k.Wk,u.Hl,u.$z,h.dX,h.aY,m.RG,m.rl,m.nJ,m.TL,m.yw,F.fS,F.fg,p.Ve,p.VO,_.wT,f.pM,R.Kj,g.uc,g.oV],styles:["form[_ngcontent-%COMP%] .mat-mdc-form-field[_ngcontent-%COMP%]{padding-bottom:10px}form[_ngcontent-%COMP%] .slide-toggle-container[_ngcontent-%COMP%]{display:grid;margin-bottom:1rem}form[_ngcontent-%COMP%] .slide-toggle-container[_ngcontent-%COMP%] .mat-mdc-slide-toggle[_ngcontent-%COMP%]{padding-bottom:10px}form[_ngcontent-%COMP%] .action-bar[_ngcontent-%COMP%]{justify-content:flex-end;gap:12px;margin-top:8px;border-top:1px solid var(--df-border-2)}"]})}}return o})()}}]); \ No newline at end of file diff --git a/dist/2623.660f94613cc4dd79.js b/dist/2623.660f94613cc4dd79.js new file mode 100644 index 00000000..bb905dfc --- /dev/null +++ b/dist/2623.660f94613cc4dd79.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2623],{72623:(_1,L,l)=>{l.r(L),l.d(L,{DfLoginComponent:()=>S});var i=l(31635),t=l(89417),V=l(99437),d=l(18810),z=l(51425),v=l(95245),h=l(23472);const V1={google:{prefix:"fab",iconName:"google",icon:[488,512,[],"f1a0","M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"]},github:{prefix:"fab",iconName:"github",icon:[496,512,[],"f09b","M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"]},microsoft:{prefix:"fab",iconName:"microsoft",icon:[448,512,[],"f3ca","M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"]},amazon:{prefix:"fab",iconName:"amazon",icon:[448,512,[],"f270","M257.2 162.7c-48.7 1.8-169.5 15.5-169.5 117.5 0 109.5 138.3 114 183.5 43.2 6.5 10.2 35.4 37.5 45.3 46.8l56.8-56S341 288.9 341 261.4V114.3C341 89 316.5 32 228.7 32 140.7 32 94 87 94 136.3l73.5 6.8c16.3-49.5 54.2-49.5 54.2-49.5 40.7-.1 35.5 29.8 35.5 69.1zm0 86.8c0 80-84.2 68-84.2 17.2 0-47.2 50.5-56.7 84.2-57.8v40.6zm136 163.5c-7.7 10-70 67-174.5 67S34.2 408.5 9.7 379c-6.8-7.7 1-11.3 5.5-8.3C88.5 415.2 203 488.5 387.7 401c7.5-3.7 13.3 2 5.5 12zm39.8 2.2c-6.5 15.8-16 26.8-21.2 31-5.5 4.5-9.5 2.7-6.5-3.8s19.3-46.5 12.7-55c-6.5-8.3-37-4.3-48-3.2-10.8 1-13 2-14-.3-2.3-5.7 21.7-15.5 37.5-17.5 15.7-1.8 41-.8 46 5.7 3.7 5.1 0 27.1-6.5 43.1z"]},apple:{prefix:"fab",iconName:"apple",icon:[384,512,[],"f179","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"]},linkedin:{prefix:"fab",iconName:"linkedin",icon:[448,512,[],"f08c","M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9V416z"]},bitbucket:{prefix:"fab",iconName:"bitbucket",icon:[512,512,[61810],"f171","M22.2 32A16 16 0 0 0 6 47.8a26.35 26.35 0 0 0 .2 2.8l67.9 412.1a21.77 21.77 0 0 0 21.3 18.2h325.7a16 16 0 0 0 16-13.4L505 50.7a16 16 0 0 0-13.2-18.3 24.58 24.58 0 0 0-2.8-.2L22.2 32zm285.9 297.8h-104l-28.1-147h157.3l-25.2 147z"]},facebook:{prefix:"fab",iconName:"facebook",icon:[512,512,[62e3],"f09a","M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z"]},salesforce:{prefix:"fab",iconName:"salesforce",icon:[640,512,[],"f83b","M248.89 245.64h-26.35c.69-5.16 3.32-14.12 13.64-14.12 6.75 0 11.97 3.82 12.71 14.12zm136.66-13.88c-.47 0-14.11-1.77-14.11 20s13.63 20 14.11 20c13 0 14.11-13.54 14.11-20 0-21.76-13.66-20-14.11-20zm-243.22 23.76a8.63 8.63 0 0 0-3.29 7.29c0 4.78 2.08 6.05 3.29 7.05 4.7 3.7 15.07 2.12 20.93.95v-16.94c-5.32-1.07-16.73-1.96-20.93 1.65zM640 232c0 87.58-80 154.39-165.36 136.43-18.37 33-70.73 70.75-132.2 41.63-41.16 96.05-177.89 92.18-213.81-5.17C8.91 428.78-50.19 266.52 53.36 205.61 18.61 126.18 76 32 167.67 32a124.24 124.24 0 0 1 98.56 48.7c20.7-21.4 49.4-34.81 81.15-34.81 42.34 0 79 23.52 98.8 58.57C539 63.78 640 132.69 640 232zm-519.55 31.8c0-11.76-11.69-15.17-17.87-17.17-5.27-2.11-13.41-3.51-13.41-8.94 0-9.46 17-6.66 25.17-2.12 0 0 1.17.71 1.64-.47.24-.7 2.36-6.58 2.59-7.29a1.13 1.13 0 0 0-.7-1.41c-12.33-7.63-40.7-8.51-40.7 12.7 0 12.46 11.49 15.44 17.88 17.17 4.72 1.58 13.17 3 13.17 8.7 0 4-3.53 7.06-9.17 7.06a31.76 31.76 0 0 1-19-6.35c-.47-.23-1.42-.71-1.65.71l-2.4 7.47c-.47.94.23 1.18.23 1.41 1.75 1.4 10.3 6.59 22.82 6.59 13.17 0 21.4-7.06 21.4-18.11zm32-42.58c-10.13 0-18.66 3.17-21.4 5.18a1 1 0 0 0-.24 1.41l2.59 7.06a1 1 0 0 0 1.18.7c.65 0 6.8-4 16.93-4 4 0 7.06.71 9.18 2.36 3.6 2.8 3.06 8.29 3.06 10.58-4.79-.3-19.11-3.44-29.41 3.76a16.92 16.92 0 0 0-7.34 14.54c0 5.9 1.51 10.4 6.59 14.35 12.24 8.16 36.28 2 38.1 1.41 1.58-.32 3.53-.66 3.53-1.88v-33.88c.04-4.61.32-21.64-22.78-21.64zM199 200.24a1.11 1.11 0 0 0-1.18-1.18H188a1.11 1.11 0 0 0-1.17 1.18v79a1.11 1.11 0 0 0 1.17 1.18h9.88a1.11 1.11 0 0 0 1.18-1.18zm55.75 28.93c-2.1-2.31-6.79-7.53-17.65-7.53-3.51 0-14.16.23-20.7 8.94-6.35 7.63-6.58 18.11-6.58 21.41 0 3.12.15 14.26 7.06 21.17 2.64 2.91 9.06 8.23 22.81 8.23 10.82 0 16.47-2.35 18.58-3.76.47-.24.71-.71.24-1.88l-2.35-6.83a1.26 1.26 0 0 0-1.41-.7c-2.59.94-6.35 2.82-15.29 2.82-17.42 0-16.85-14.74-16.94-16.7h37.17a1.23 1.23 0 0 0 1.17-.94c-.29 0 2.07-14.7-6.09-24.23zm36.69 52.69c13.17 0 21.41-7.06 21.41-18.11 0-11.76-11.7-15.17-17.88-17.17-4.14-1.66-13.41-3.38-13.41-8.94 0-3.76 3.29-6.35 8.47-6.35a38.11 38.11 0 0 1 16.7 4.23s1.18.71 1.65-.47c.23-.7 2.35-6.58 2.58-7.29a1.13 1.13 0 0 0-.7-1.41c-7.91-4.9-16.74-4.94-20.23-4.94-12 0-20.46 7.29-20.46 17.64 0 12.46 11.48 15.44 17.87 17.17 6.11 2 13.17 3.26 13.17 8.7 0 4-3.52 7.06-9.17 7.06a31.8 31.8 0 0 1-19-6.35 1 1 0 0 0-1.65.71l-2.35 7.52c-.47.94.23 1.18.23 1.41 1.72 1.4 10.33 6.59 22.79 6.59zM357.09 224c0-.71-.24-1.18-1.18-1.18h-11.76c0-.14.94-8.94 4.47-12.47 4.16-4.15 11.76-1.64 12-1.64 1.17.47 1.41 0 1.64-.47l2.83-7.77c.7-.94 0-1.17-.24-1.41-5.09-2-17.35-2.87-24.46 4.24-5.48 5.48-7 13.92-8 19.52h-8.47a1.28 1.28 0 0 0-1.17 1.18l-1.42 7.76c0 .7.24 1.17 1.18 1.17h8.23c-8.51 47.9-8.75 50.21-10.35 55.52-1.08 3.62-3.29 6.9-5.88 7.76-.09 0-3.88 1.68-9.64-.24 0 0-.94-.47-1.41.71-.24.71-2.59 6.82-2.83 7.53s0 1.41.47 1.41c5.11 2 13 1.77 17.88 0 6.28-2.28 9.72-7.89 11.53-12.94 2.75-7.71 2.81-9.79 11.76-59.74h12.23a1.29 1.29 0 0 0 1.18-1.18zm53.39 16c-.56-1.68-5.1-18.11-25.17-18.11-15.25 0-23 10-25.16 18.11-1 3-3.18 14 0 23.52.09.3 4.41 18.12 25.16 18.12 14.95 0 22.9-9.61 25.17-18.12 3.21-9.61 1.01-20.52 0-23.52zm45.4-16.7c-5-1.65-16.62-1.9-22.11 5.41v-4.47a1.11 1.11 0 0 0-1.18-1.17h-9.4a1.11 1.11 0 0 0-1.18 1.17v55.28a1.12 1.12 0 0 0 1.18 1.18h9.64a1.12 1.12 0 0 0 1.18-1.18v-27.77c0-2.91.05-11.37 4.46-15.05 4.9-4.9 12-3.36 13.41-3.06a1.57 1.57 0 0 0 1.41-.94 74 74 0 0 0 3.06-8 1.16 1.16 0 0 0-.47-1.41zm46.81 54.1l-2.12-7.29c-.47-1.18-1.41-.71-1.41-.71-4.23 1.82-10.15 1.89-11.29 1.89-4.64 0-17.17-1.13-17.17-19.76 0-6.23 1.85-19.76 16.47-19.76a34.85 34.85 0 0 1 11.52 1.65s.94.47 1.18-.71c.94-2.59 1.64-4.47 2.59-7.53.23-.94-.47-1.17-.71-1.17-11.59-3.87-22.34-2.53-27.76 0-1.59.74-16.23 6.49-16.23 27.52 0 2.9-.58 30.11 28.94 30.11a44.45 44.45 0 0 0 15.52-2.83 1.3 1.3 0 0 0 .47-1.42zm53.87-39.52c-.8-3-5.37-16.23-22.35-16.23-16 0-23.52 10.11-25.64 18.59a38.58 38.58 0 0 0-1.65 11.76c0 25.87 18.84 29.4 29.88 29.4 10.82 0 16.46-2.35 18.58-3.76.47-.24.71-.71.24-1.88l-2.36-6.83a1.26 1.26 0 0 0-1.41-.7c-2.59.94-6.35 2.82-15.29 2.82-17.42 0-16.85-14.74-16.93-16.7h37.16a1.25 1.25 0 0 0 1.18-.94c-.24-.01.94-7.07-1.41-15.54zm-23.29-6.35c-10.33 0-13 9-13.64 14.12H546c-.88-11.92-7.62-14.13-12.73-14.13z"]},twitch:{prefix:"fab",iconName:"twitch",icon:[512,512,[],"f1e8","M391.17,103.47H352.54v109.7h38.63ZM285,103H246.37V212.75H285ZM120.83,0,24.31,91.42V420.58H140.14V512l96.53-91.42h77.25L487.69,256V0ZM449.07,237.75l-77.22,73.12H294.61l-67.6,64v-64H140.14V36.58H449.07Z"]},openid:{prefix:"fab",iconName:"openid",icon:[448,512,[],"f19b","M271.5 432l-68 32C88.5 453.7 0 392.5 0 318.2c0-71.5 82.5-131 191.7-144.3v43c-71.5 12.5-124 53-124 101.3 0 51 58.5 93.3 135.7 103v-340l68-33.2v384zM448 291l-131.3-28.5 36.8-20.7c-19.5-11.5-43.5-20-70-24.8v-43c46.2 5.5 87.7 19.5 120.3 39.3l35-19.8L448 291z"]}};function J9(a){return Object.keys(V1).includes(a)}function K9(a){return V1[a]}var Q9=l(94884),d1=l(20060),b=l(88834),u1=l(99631),x1=l(86600),N1=l(82798),u=l(32102),M=l(60177),g1=l(71997),H=l(25596),S1=l(33609),c0=l(49894),a0=l(95753),c=l(17705),e0=l(82298),A1=l(34387),n0=l(52868),o0=l(43615),l0=l(76939),i0=l(75351);const y1=new c.nKC("POPUP_CONFIG");function s0(a,o){if(1&a){const n=c.RV6();c.j41(0,"button",7),c.bIt("click",function(){c.eBV(n);const s=c.XpG();return c.Njj(s.closePopup(!1))}),c.EFF(1),c.nI1(2,"transloco"),c.k0s()}2&a&&(c.R7$(1),c.SpI(" ",c.bMT(2,1,"Remind me later")," "))}let t0=(()=>{class a{constructor(n,e,s,r){this.router=n,this.popupOverlay=e,this.authService=s,this.config=r}get message(){return this.config?.message||"Your current password is shorter than recommended (less than 17 characters). For better security, we recommend updating your password to a longer one."}get showRemindMeLater(){return!1!==this.config?.showRemindMeLater}closePopup(n=!1){this.popupOverlay.close(),n&&this.authService.logout([h.b.AUTH,h.b.RESET_PASSWORD])}static{this.\u0275fac=function(e){return new(e||a)(c.rXU(v.Ix),c.rXU(k1),c.rXU(A1.g),c.rXU(y1,8))}}static{this.\u0275cmp=c.VBU({type:a,selectors:[["df-popup"]],standalone:!0,features:[c.aNF],decls:15,vars:10,consts:[[1,"popup-container"],[1,"popup"],[1,"popup-header"],[1,"popup-content"],[1,"popup-actions"],["mat-stroked-button","","type","button",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-stroked-button","","type","button",3,"click"]],template:function(e,s){1&e&&(c.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),c.EFF(4),c.nI1(5,"transloco"),c.k0s()(),c.j41(6,"div",3)(7,"p"),c.EFF(8),c.nI1(9,"transloco"),c.k0s()(),c.j41(10,"div",4),c.DNE(11,s0,3,3,"button",5),c.j41(12,"button",6),c.bIt("click",function(){return s.closePopup(!0)}),c.EFF(13),c.nI1(14,"transloco"),c.k0s()()()()),2&e&&(c.R7$(4),c.JRh(c.bMT(5,4,"Password Security Notice")),c.R7$(4),c.JRh(c.bMT(9,6,s.message)),c.R7$(3),c.Y8G("ngIf",s.showRemindMeLater),c.R7$(2),c.SpI(" ",c.bMT(14,8,"Update Password Now")," "))},dependencies:[M.MD,M.bT,b.Hl,b.$z,i0.hM,S1.Kj],styles:[".popup-container[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:10000}.popup[_ngcontent-%COMP%]{position:relative;width:90%;max-width:500px;background:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius);padding:24px;z-index:10001;animation:_ngcontent-%COMP%_popupFadeIn .3s ease-out}.popup[_ngcontent-%COMP%] .popup-header[_ngcontent-%COMP%]{margin-bottom:20px;text-align:center}.popup[_ngcontent-%COMP%] .popup-header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;color:var(--df-text);font-size:1.6rem;font-weight:600;letter-spacing:-.01em}.popup[_ngcontent-%COMP%] .popup-content[_ngcontent-%COMP%]{margin-bottom:24px;text-align:center}.popup[_ngcontent-%COMP%] .popup-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:8px 0;color:var(--df-text-2);font-size:1.4rem;line-height:1.5}.popup[_ngcontent-%COMP%] .popup-actions[_ngcontent-%COMP%]{display:flex;justify-content:center;gap:12px}.popup[_ngcontent-%COMP%] .popup-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{min-width:120px}@keyframes _ngcontent-%COMP%_popupFadeIn{0%{opacity:0;transform:translateY(-20px)}to{opacity:1;transform:translateY(0)}}"]})}}return a})();var f0=l(66969);let k1=(()=>{class a{constructor(n,e){this.overlay=n,this.injector=e,this.overlayRef=null}open(n){if(this.overlayRef)return;const e=c.zZn.create({providers:[{provide:y1,useValue:n}],parent:this.injector});this.overlayRef=this.overlay.create({hasBackdrop:!0,backdropClass:"popup-backdrop",positionStrategy:this.overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:this.overlay.scrollStrategies.block()});const s=new l0.A8(t0,null,e);this.overlayRef.attach(s),this.overlayRef.backdropClick().subscribe(()=>this.close())}close(){this.overlayRef?.dispose(),this.overlayRef=null}static{this.\u0275fac=function(e){return new(e||a)(c.KVO(f0.hJ),c.KVO(c.zZn))}}static{this.\u0275prov=c.jDH({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();function m0(a,o){if(1&a&&(c.j41(0,"mat-option",18),c.EFF(1),c.k0s()),2&a){const n=o.$implicit;c.Y8G("value",n.name),c.R7$(1),c.SpI(" ",n.label," ")}}function r0(a,o){if(1&a&&(c.j41(0,"mat-form-field",8)(1,"mat-label"),c.EFF(2),c.nI1(3,"transloco"),c.k0s(),c.j41(4,"mat-select",16),c.nrm(5,"mat-option"),c.DNE(6,m0,2,2,"mat-option",17),c.k0s()()),2&a){const n=c.XpG();c.R7$(2),c.SpI(" ",c.bMT(3,3,"userManagement.controls.services.label"),""),c.R7$(4),c.Y8G("ngForOf",n.ldapServices)("ngForTrackBy",n.trackByName)}}function z0(a,o){1&a&&(c.j41(0,"mat-error"),c.EFF(1),c.nI1(2,"transloco"),c.k0s()),2&a&&(c.R7$(1),c.SpI(" ",c.bMT(2,1,"userManagement.controls.email.errors.invalid")," "))}function h0(a,o){1&a&&(c.j41(0,"mat-error"),c.EFF(1),c.nI1(2,"transloco"),c.k0s()),2&a&&(c.R7$(1),c.SpI(" ",c.bMT(2,1,"userManagement.controls.email.errors.required")," "))}function C0(a,o){if(1&a&&(c.j41(0,"mat-form-field",8)(1,"mat-label"),c.EFF(2),c.nI1(3,"transloco"),c.k0s(),c.nrm(4,"input",19),c.DNE(5,z0,3,3,"mat-error",10),c.DNE(6,h0,3,3,"mat-error",10),c.k0s()),2&a){const n=c.XpG();let e,s;c.R7$(2),c.SpI(" ",c.bMT(3,3,"userManagement.controls.email.label"),""),c.R7$(3),c.Y8G("ngIf",(null==(e=n.loginForm.get("email"))||null==e.errors?null:e.errors.email)&&!(null!=(e=n.loginForm.get("email"))&&null!=e.errors&&e.errors.required)),c.R7$(1),c.Y8G("ngIf",!(null!=(s=n.loginForm.get("email"))&&null!=s.errors&&s.errors.email)&&(null==(s=n.loginForm.get("email"))||null==s.errors?null:s.errors.required))}}function v0(a,o){1&a&&(c.j41(0,"mat-error"),c.EFF(1),c.nI1(2,"transloco"),c.k0s()),2&a&&(c.R7$(1),c.SpI(" ",c.bMT(2,1,"userManagement.controls.username.errors.required")," "))}function M0(a,o){if(1&a&&(c.j41(0,"mat-form-field",8)(1,"mat-label"),c.EFF(2),c.nI1(3,"transloco"),c.k0s(),c.nrm(4,"input",20),c.DNE(5,v0,3,3,"mat-error",10),c.k0s()),2&a){const n=c.XpG();let e;c.R7$(2),c.JRh(c.bMT(3,2,"userManagement.controls.username.altLabel")),c.R7$(3),c.Y8G("ngIf",null==(e=n.loginForm.get("username"))||null==e.errors?null:e.errors.required)}}function p0(a,o){1&a&&(c.j41(0,"mat-error"),c.EFF(1),c.nI1(2,"transloco"),c.k0s()),2&a&&(c.R7$(1),c.SpI(" ",c.bMT(2,1,"userManagement.controls.password.errors.required")," "))}function b0(a,o){1&a&&c.eu8(0)}function H0(a,o){1&a&&c.eu8(0)}function L0(a,o){if(1&a&&(c.j41(0,"fa-icon",28),c.EFF(1),c.k0s()),2&a){const n=c.XpG(2).$implicit,e=c.XpG(3);c.Y8G("icon",e.getIcon(n.iconClass)),c.R7$(1),c.JRh(n.label)}}function V0(a,o){if(1&a&&(c.j41(0,"a",26),c.DNE(1,L0,2,2,"fa-icon",27),c.k0s()),2&a){const n=c.XpG().$implicit,e=c.XpG(3);c.Y8G("href",e.getOAuthUrl(n.path),c.B4B),c.BMQ("aria-label",n.label),c.R7$(1),c.Y8G("ngIf",e.iconExist(n.iconClass))}}function d0(a,o){if(1&a&&(c.j41(0,"a",26),c.EFF(1),c.k0s()),2&a){const n=c.XpG().$implicit,e=c.XpG(3);c.Y8G("href",e.getOAuthUrl(n.path),c.B4B),c.R7$(1),c.SpI(" ",n.label," ")}}function u0(a,o){if(1&a&&(c.qex(0),c.DNE(1,V0,2,3,"a",25),c.DNE(2,d0,2,2,"a",25),c.bVm()),2&a){const n=o.$implicit,e=c.XpG(3);c.R7$(1),c.Y8G("ngIf",e.iconExist(n.iconClass)),c.R7$(1),c.Y8G("ngIf",!e.iconExist(n.iconClass))}}function x0(a,o){if(1&a&&(c.j41(0,"div",22)(1,"h3"),c.EFF(2),c.k0s(),c.nrm(3,"mat-divider"),c.j41(4,"div",23),c.DNE(5,u0,3,2,"ng-container",24),c.k0s()()),2&a){const n=c.XpG(),e=n.title,s=n.services,r=c.XpG();c.R7$(2),c.JRh(e),c.R7$(3),c.Y8G("ngForOf",s)("ngForTrackBy",r.trackByName)}}function N0(a,o){1&a&&c.DNE(0,x0,6,3,"div",21),2&a&&c.Y8G("ngIf",o.services.length)}const Z1=function(a,o){return{services:a,title:o}};let S=class y{constructor(o,n,e,s,r,g0,S0,A0){this.fb=o,this.systemConfigDataService=n,this.authService=e,this.router=s,this.activatedRoute=r,this.themeService=g0,this.snackbarService=S0,this.popupOverlay=A0,this.MINIMUM_PASSWORD_LENGTH=16,this.alertMsg="",this.showAlert=!1,this.alertType="error",this.envloginAttribute="email",this.loginAttribute="email",this.ldapServices=[],this.oauthServices=[],this.samlServices=[],this.trackByName=(ic,y0)=>y0.name,this.fpRoute=`/${h.b.AUTH}/${h.b.FORGOT_PASSWORD}`,this.isDarkMode=this.themeService.darkMode$,this.navLoginError=null,this.iconExist=J9,this.getIcon=K9,this.loginForm=this.fb.group({services:[""],username:[""],email:[""],password:["",[t.k0.required]]});const A=this.router.getCurrentNavigation()?.extras?.state?.loginError??history.state?.loginError;"string"==typeof A&&A&&(this.navLoginError=A)}ngOnInit(){this.navLoginError&&(this.alertMsg=decodeURIComponent(this.navLoginError.replace(/\+/g," ")),this.showAlert=!0,this.alertType="error"),this.systemConfigDataService.environment$.subscribe(o=>{this.envloginAttribute=o.authentication.loginAttribute,this.setLoginAttribute(o.authentication.loginAttribute),this.ldapServices=o.authentication.adldap,this.oauthServices=o.authentication.oauth,this.samlServices=o.authentication.saml}),this.loginForm.controls.services.valueChanges.subscribe(o=>{this.setLoginAttribute(o?"username":this.envloginAttribute)}),this.snackbarService.setSnackbarLastEle("",!1)}setLoginAttribute(o){this.loginAttribute=o,"username"===o?(this.loginForm.controls.username.addValidators(t.k0.required),this.loginForm.controls.email.clearValidators()):(this.loginForm.controls.email.addValidators([t.k0.required,t.k0.email]),this.loginForm.controls.username.clearValidators()),this.loginForm.controls.username.updateValueAndValidity(),this.loginForm.controls.email.updateValueAndValidity()}getOAuthUrl(o){const n="/api/v2/"+o,e=sessionStorage.getItem(Q9.bS);if(!e)return n;const s=n.includes("?")?"&":"?";return n+s+"redirect="+encodeURIComponent(e)}login(){if(this.loginForm.invalid)return;const o=this.loginForm.value.password.length{const s=(0,a0.cQ)(e);return 401===s.status&&o?this.popupOverlay.open({message:`It looks like your password is too short. Our new system requires at least ${this.MINIMUM_PASSWORD_LENGTH} characters. Please reset your password to continue.`,showRemindMeLater:!1}):(this.alertMsg=s.message,this.showAlert=!0),(0,d.$)(()=>s)})).subscribe(()=>{this.showAlert=!1,o&&this.popupOverlay.open({message:`Your current password is shorter than recommended (less than ${this.MINIMUM_PASSWORD_LENGTH} characters). For better security, we recommend updating your password to a longer one.`,showRemindMeLater:!0});const e=this.activatedRoute.snapshot.queryParams.returnUrl;"string"==typeof e&&e.startsWith("/")&&!e.startsWith("//")?this.router.navigateByUrl(e):this.router.navigate([h.b.HOME])})}static{this.\u0275fac=function(n){return new(n||y)(c.rXU(t.ok),c.rXU(e0.f),c.rXU(A1.g),c.rXU(v.Ix),c.rXU(v.nX),c.rXU(n0.n),c.rXU(o0.L),c.rXU(k1))}}static{this.\u0275cmp=c.VBU({type:y,selectors:[["df-user-login"]],standalone:!0,features:[c.aNF],decls:36,vars:35,consts:[[1,"user-management-card-container"],[1,"left-panel"],["src","assets/img/logo.png","alt","DreamFactory Logo",1,"logo"],[1,"right-panel"],[1,"user-management-card"],[3,"showAlert","alertType","alertClosed"],["name","login-form",3,"formGroup","ngSubmit"],["appearance","outline",4,"ngIf"],["appearance","outline"],["matInput","","type","password","formControlName","password"],[4,"ngIf"],["mat-flat-button","","color","primary","type","submit"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"action-links"],["mat-button","","target","_self",3,"routerLink"],["authServices",""],["formControlName","services"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["matInput","","type","email","formControlName","email"],["matInput","","type","text","formControlName","username"],["class","services-section",4,"ngIf"],[1,"services-section"],[1,"services-container"],[4,"ngFor","ngForOf","ngForTrackBy"],["mat-flat-button","","color","primary",3,"href",4,"ngIf"],["mat-flat-button","","color","primary",3,"href"],["size","2x",3,"icon",4,"ngIf"],["size","2x",3,"icon"]],template:function(n,e){if(1&n&&(c.j41(0,"div",0)(1,"div",1),c.nrm(2,"img",2),c.k0s(),c.j41(3,"div",3)(4,"mat-card",4)(5,"df-alert",5),c.bIt("alertClosed",function(){return e.showAlert=!1}),c.EFF(6),c.k0s(),c.j41(7,"mat-card-header")(8,"mat-card-title"),c.EFF(9),c.nI1(10,"transloco"),c.k0s()(),c.nrm(11,"mat-divider"),c.j41(12,"mat-card-content")(13,"form",6),c.bIt("ngSubmit",function(){return e.login()}),c.DNE(14,r0,7,5,"mat-form-field",7),c.DNE(15,C0,7,5,"mat-form-field",7),c.DNE(16,M0,6,4,"mat-form-field",7),c.j41(17,"mat-form-field",8)(18,"mat-label"),c.EFF(19),c.nI1(20,"transloco"),c.k0s(),c.nrm(21,"input",9),c.DNE(22,p0,3,3,"mat-error",10),c.k0s(),c.j41(23,"button",11),c.EFF(24),c.nI1(25,"transloco"),c.k0s()(),c.DNE(26,b0,1,0,"ng-container",12),c.nI1(27,"transloco"),c.DNE(28,H0,1,0,"ng-container",12),c.nI1(29,"transloco"),c.j41(30,"div",13)(31,"a",14),c.EFF(32),c.nI1(33,"transloco"),c.k0s()()()()()(),c.DNE(34,N0,1,1,"ng-template",null,15,c.C5r)),2&n){const s=c.sdS(35);let r;c.R7$(5),c.Y8G("showAlert",e.showAlert)("alertType",e.alertType),c.R7$(1),c.JRh(e.alertMsg),c.R7$(3),c.SpI(" ",c.bMT(10,17,"userManagement.login")," "),c.R7$(4),c.Y8G("formGroup",e.loginForm),c.R7$(1),c.Y8G("ngIf",e.ldapServices.length),c.R7$(1),c.Y8G("ngIf","email"===e.loginAttribute),c.R7$(1),c.Y8G("ngIf","username"===e.loginAttribute),c.R7$(3),c.JRh(c.bMT(20,19,"userManagement.controls.password.label")),c.R7$(3),c.Y8G("ngIf",null==(r=e.loginForm.get("password"))||null==r.errors?null:r.errors.required),c.R7$(2),c.SpI(" ",c.bMT(25,21,"userManagement.login")," "),c.R7$(2),c.Y8G("ngTemplateOutlet",s)("ngTemplateOutletContext",c.l_i(29,Z1,e.oauthServices,c.bMT(27,23,"userManagement.oAuth"))),c.R7$(2),c.Y8G("ngTemplateOutlet",s)("ngTemplateOutletContext",c.l_i(32,Z1,e.samlServices,c.bMT(29,25,"userManagement.saml"))),c.R7$(3),c.Y8G("routerLink",e.fpRoute),c.R7$(1),c.JRh(c.bMT(33,27,"userManagement.forgotPassword"))}},dependencies:[H.Hu,H.RN,H.m2,H.MM,H.dh,z.W,g1.w,g1.q,t.X1,t.qT,t.me,t.BC,t.cb,t.j4,t.JD,M.bT,u.RG,u.rl,u.nJ,u.TL,N1.Ve,N1.VO,x1.wT,x1.Sy,M.pM,u1.fS,u1.fg,b.Hl,b.It,b.$z,M.T3,v.Wk,d1.dX,d1.aY,S1.Kj,M.MD],styles:[".user-management-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;min-height:100%;box-sizing:border-box}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%]{padding:16px;margin:0 auto;min-width:300px;max-width:445px;background:var(--df-surface)!important;color:var(--df-text)!important;border:1px solid var(--df-border)!important;border-radius:var(--df-radius);box-shadow:none!important;--mdc-elevated-card-container-shape: var(--df-radius);--mdc-outlined-card-container-shape: var(--df-radius);--mdc-outlined-card-outline-width: 1px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{padding-bottom:16px;background:transparent!important}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{color:var(--df-text);font-size:1.8rem;font-weight:600;letter-spacing:-.01em}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-divider[_ngcontent-%COMP%]{border-top-color:var(--df-border-2)}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding-top:16px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%]{padding-top:32px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:11px;font-weight:600;letter-spacing:.06em;margin:0 0 8px;text-transform:uppercase}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%] .services-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;padding-top:16px;gap:16px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] .action-links[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] .action-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--df-accent)}",".left-panel[_ngcontent-%COMP%]{display:block;width:100%;max-width:445px;margin:16px auto 0}.left-panel[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{display:block;width:100%;height:auto}"]})}};S=(0,i.Cg)([(0,c0.d)({checkProperties:!0})],S)},51425:(_1,L,l)=>{l.d(L,{W:()=>x});var i=l(17705),t=l(60177),V=l(88834),d=l(20060),z=l(45383);function v(f,N){if(1&f){const m=i.RV6();i.j41(0,"button",5),i.bIt("click",function(){i.eBV(m);const p=i.XpG(2);return i.Njj(p.dismissAlert())}),i.j41(1,"fa-icon",6),i.EFF(2),i.k0s()()}if(2&f){const m=i.XpG(2);i.R7$(1),i.Y8G("icon",m.faXmark),i.R7$(1),i.JRh("alerts.close")}}function h(f,N){if(1&f&&(i.j41(0,"div",1),i.nrm(1,"fa-icon",2),i.j41(2,"span",3),i.SdG(3),i.k0s(),i.DNE(4,v,3,2,"button",4),i.k0s()),2&f){const m=i.XpG();i.HbH(m.alertType),i.R7$(1),i.Y8G("icon",m.icon),i.R7$(3),i.Y8G("ngIf",m.dismissible)}}const k=["*"];let x=(()=>{class f{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new i.bkB,this.faXmark=z.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return z.SGM;case"error":return z.rfe;case"warning":return z.tUE;default:return z.iW_}}static{this.\u0275fac=function(C){return new(C||f)}}static{this.\u0275cmp=i.VBU({type:f,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[i.aNF],ngContentSelectors:k,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(C,p){1&C&&(i.NAR(),i.DNE(0,h,5,4,"div",0)),2&C&&i.Y8G("ngIf",p.showAlert)},dependencies:[t.bT,V.Hl,V.iY,d.dX,d.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return f})()}}]); \ No newline at end of file diff --git a/dist/2626.96e8530a3a49518e.js b/dist/2626.96e8530a3a49518e.js new file mode 100644 index 00000000..fc9284ae --- /dev/null +++ b/dist/2626.96e8530a3a49518e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2626],{92626:(I,p,r)=>{r.r(p),r.d(p,{DfPasswordResetComponent:()=>D});var t=r(31635),s=r(89417),u=r(60177),g=r(69465),d=r(25558),E=r(99437),h=r(18810),R=r(95753),v=r(51425),c=r(88834),C=r(99631),m=r(32102),f=r(71997),_=r(25596),T=r(33609),A=r(49894),e=r(17705),F=r(79676),y=r(82298),x=r(34387),b=r(95245);function U(a,o){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.email.errors.invalid")," "))}function $(a,o){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.email.errors.required")," "))}function B(a,o){if(1&a&&(e.j41(0,"mat-form-field",5)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",11),e.DNE(5,U,3,3,"mat-error",7),e.DNE(6,$,3,3,"mat-error",7),e.k0s()),2&a){const i=e.XpG();let n,l;e.R7$(2),e.SpI(" ",e.bMT(3,3,"userManagement.controls.email.label"),""),e.R7$(3),e.Y8G("ngIf",(null==(n=i.passwordResetForm.get("email"))||null==n.errors?null:n.errors.email)&&!(null!=(n=i.passwordResetForm.get("email"))&&null!=n.errors&&n.errors.required)),e.R7$(1),e.Y8G("ngIf",!(null!=(l=i.passwordResetForm.get("email"))&&null!=l.errors&&l.errors.email)&&(null==(l=i.passwordResetForm.get("email"))||null==l.errors?null:l.errors.required))}}function L(a,o){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.username.errors.required")," "))}function W(a,o){if(1&a&&(e.j41(0,"mat-form-field",5)(1,"mat-label"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.nrm(4,"input",12),e.DNE(5,L,3,3,"mat-error",7),e.k0s()),2&a){const i=e.XpG();let n;e.R7$(2),e.JRh(e.bMT(3,2,"userManagement.controls.username.altLabel")),e.R7$(3),e.Y8G("ngIf",null==(n=i.passwordResetForm.get("username"))||null==n.errors?null:n.errors.required)}}function j(a,o){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.confirmationCode.errors.required")," "))}function K(a,o){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.password.errors.required")," "))}function G(a,o){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.password.errors.length")," "))}function S(a,o){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.confirmPassword.errors.match")," "))}let D=class w{constructor(o,i,n,l,M,P,O){this.fb=o,this.location=i,this.passwordResetService=n,this.systemConfigDataService=l,this.authService=M,this.router=P,this.route=O,this.user={email:"",username:"",code:"",admin:""},this.alertMsg="",this.showAlert=!1,this.alertType="error",this.loginAttribute="email",this.type="reset",this.passwordResetForm=this.fb.group({username:["",[s.k0.required]],email:["",[s.k0.required,s.k0.email]],code:["",[s.k0.required]],newPassword:["",[s.k0.required,s.k0.minLength(16)]],confirmPassword:["",[s.k0.required,(0,g.e)("newPassword")]]})}ngOnInit(){this.route.queryParams&&this.route.queryParams.subscribe(o=>{this.user={code:o.code,email:o.email,username:o.username,admin:o.admin},this.passwordResetForm.patchValue({email:this.user.email,username:this.user.username,code:this.user.code})}),this.systemConfigDataService.environment$.subscribe(o=>{this.loginAttribute=o.authentication.loginAttribute}),this.route.data.subscribe(o=>{"type"in o&&(this.type=o.type)})}get isAdmin(){return"1"===this.user.admin}resetPassword(){if(this.passwordResetForm.invalid)return;const{confirmPassword:o,...i}=this.passwordResetForm.value;this.passwordResetService.resetPassword(i,this.isAdmin).pipe((0,d.n)(()=>{const n={password:i.newPassword};return"email"===this.loginAttribute?n.email=i.email:n.username=i.username,this.authService.login(n)}),(0,E.W)(n=>{const l=(0,R.cQ)(n);return this.alertMsg=l.message,this.showAlert=!0,(0,h.$)(()=>l)})).subscribe(()=>{this.showAlert=!1,this.router.navigate(["/"])})}static{this.\u0275fac=function(i){return new(i||w)(e.rXU(s.ok),e.rXU(u.aZ),e.rXU(F.p),e.rXU(y.f),e.rXU(x.g),e.rXU(b.Ix),e.rXU(b.nX))}}static{this.\u0275cmp=e.VBU({type:w,selectors:[["df-password-reset"]],standalone:!0,features:[e.aNF],decls:36,vars:27,consts:[[1,"user-management-card-container"],[1,"user-management-card"],[3,"showAlert","alertType","alertClosed"],["name","reset-password-form",3,"formGroup","ngSubmit"],["appearance","outline",4,"ngIf"],["appearance","outline"],["matInput","","type","text","formControlName","code"],[4,"ngIf"],["matInput","","type","password","formControlName","newPassword"],["matInput","","type","password","formControlName","confirmPassword"],["mat-flat-button","","color","primary","type","submit"],["matInput","","type","email","formControlName","email"],["matInput","","type","text","formControlName","username"]],template:function(i,n){if(1&i&&(e.j41(0,"div",0)(1,"mat-card",1)(2,"df-alert",2),e.bIt("alertClosed",function(){return n.showAlert=!1}),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"mat-card-header")(6,"mat-card-title"),e.EFF(7),e.nI1(8,"transloco"),e.k0s()(),e.nrm(9,"mat-divider"),e.j41(10,"mat-card-content")(11,"form",3),e.bIt("ngSubmit",function(){return n.resetPassword()}),e.DNE(12,B,7,5,"mat-form-field",4),e.DNE(13,W,6,4,"mat-form-field",4),e.j41(14,"mat-form-field",5)(15,"mat-label"),e.EFF(16),e.nI1(17,"transloco"),e.k0s(),e.nrm(18,"input",6),e.DNE(19,j,3,3,"mat-error",7),e.k0s(),e.j41(20,"mat-form-field",5)(21,"mat-label"),e.EFF(22),e.nI1(23,"transloco"),e.k0s(),e.nrm(24,"input",8),e.DNE(25,K,3,3,"mat-error",7),e.DNE(26,G,3,3,"mat-error",7),e.k0s(),e.j41(27,"mat-form-field",5)(28,"mat-label"),e.EFF(29),e.nI1(30,"transloco"),e.k0s(),e.nrm(31,"input",9),e.DNE(32,S,3,3,"mat-error",7),e.k0s(),e.j41(33,"button",10),e.EFF(34),e.nI1(35,"transloco"),e.k0s()()()()()),2&i){let l,M,P,O;e.R7$(2),e.Y8G("showAlert",n.showAlert)("alertType",n.alertType),e.R7$(1),e.JRh(e.bMT(4,15,n.alertMsg)),e.R7$(4),e.SpI(" ",e.bMT(8,17,"userManagement."+("reset"===n.type?"resetPassword":"register"===n.type?"registrationConfirmation":"invitatonConfirmation"))," "),e.R7$(4),e.Y8G("formGroup",n.passwordResetForm),e.R7$(1),e.Y8G("ngIf","email"===n.loginAttribute),e.R7$(1),e.Y8G("ngIf","username"===n.loginAttribute),e.R7$(3),e.SpI(" ",e.bMT(17,19,"userManagement.controls.confirmationCode.label"),""),e.R7$(3),e.Y8G("ngIf",null==(l=n.passwordResetForm.get("code"))||null==l.errors?null:l.errors.required),e.R7$(3),e.JRh(e.bMT(23,21,"userManagement.controls.password."+("reset"===n.type?"label":"altLabel"))),e.R7$(3),e.Y8G("ngIf",null==(M=n.passwordResetForm.get("newPassword"))||null==M.errors?null:M.errors.required),e.R7$(1),e.Y8G("ngIf",null==(P=n.passwordResetForm.get("newPassword"))||null==P.errors?null:P.errors.minlength),e.R7$(3),e.JRh(e.bMT(30,23,"userManagement.controls.confirmPassword."+("reset"===n.type?"label":"altLabel"))),e.R7$(3),e.Y8G("ngIf",null==(O=n.passwordResetForm.get("confirmPassword"))?null:O.hasError("doesNotMatch")),e.R7$(2),e.SpI(" ",e.bMT(35,25,"reset"===n.type?"userManagement.resetPassword":"userManagement.confirmUser")," ")}},dependencies:[_.Hu,_.RN,_.m2,_.MM,_.dh,v.W,f.w,f.q,s.X1,s.qT,s.me,s.BC,s.cb,s.j4,s.JD,u.bT,m.RG,m.rl,m.nJ,m.TL,C.fS,C.fg,c.Hl,c.$z,T.Kj],styles:[".user-management-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;min-height:100%;box-sizing:border-box}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%]{padding:16px;margin:0 auto;min-width:300px;max-width:445px;background:var(--df-surface)!important;color:var(--df-text)!important;border:1px solid var(--df-border)!important;border-radius:var(--df-radius);box-shadow:none!important;--mdc-elevated-card-container-shape: var(--df-radius);--mdc-outlined-card-container-shape: var(--df-radius);--mdc-outlined-card-outline-width: 1px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-header[_ngcontent-%COMP%]{padding-bottom:16px;background:transparent!important}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-title[_ngcontent-%COMP%]{color:var(--df-text);font-size:1.8rem;font-weight:600;letter-spacing:-.01em}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-divider[_ngcontent-%COMP%]{border-top-color:var(--df-border-2)}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{padding-top:16px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%]{padding-top:32px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:11px;font-weight:600;letter-spacing:.06em;margin:0 0 8px;text-transform:uppercase}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%] .services-section[_ngcontent-%COMP%] .services-container[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;padding-top:16px;gap:16px}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%], .user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] .action-links[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.user-management-card-container[_ngcontent-%COMP%] .user-management-card[_ngcontent-%COMP%] .action-links[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}};D=(0,t.Cg)([(0,A.d)({checkProperties:!0})],D)},51425:(I,p,r)=>{r.d(p,{W:()=>v});var t=r(17705),s=r(60177),u=r(88834),g=r(20060),d=r(45383);function E(c,C){if(1&c){const m=t.RV6();t.j41(0,"button",5),t.bIt("click",function(){t.eBV(m);const _=t.XpG(2);return t.Njj(_.dismissAlert())}),t.j41(1,"fa-icon",6),t.EFF(2),t.k0s()()}if(2&c){const m=t.XpG(2);t.R7$(1),t.Y8G("icon",m.faXmark),t.R7$(1),t.JRh("alerts.close")}}function h(c,C){if(1&c&&(t.j41(0,"div",1),t.nrm(1,"fa-icon",2),t.j41(2,"span",3),t.SdG(3),t.k0s(),t.DNE(4,E,3,2,"button",4),t.k0s()),2&c){const m=t.XpG();t.HbH(m.alertType),t.R7$(1),t.Y8G("icon",m.icon),t.R7$(3),t.Y8G("ngIf",m.dismissible)}}const R=["*"];let v=(()=>{class c{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new t.bkB,this.faXmark=d.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return d.SGM;case"error":return d.rfe;case"warning":return d.tUE;default:return d.iW_}}static{this.\u0275fac=function(f){return new(f||c)}}static{this.\u0275cmp=t.VBU({type:c,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[t.aNF],ngContentSelectors:R,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(f,_){1&f&&(t.NAR(),t.DNE(0,h,5,4,"div",0)),2&f&&t.Y8G("ngIf",_.showAlert)},dependencies:[s.bT,u.Hl,u.iY,g.dX,g.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return c})()},69465:(I,p,r)=>{function t(s){return u=>{const g=u.parent;if(g){const d=g.get(s);if(d&&u.value!==d.value)return{doesNotMatch:!0}}return null}}r.d(p,{e:()=>t})}}]); \ No newline at end of file diff --git a/dist/2661.4723cda3623aa906.js b/dist/2661.4723cda3623aa906.js deleted file mode 100644 index b8ab72bd..00000000 --- a/dist/2661.4723cda3623aa906.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2661],{42661:(M,h,l)=>{l.r(h),l.d(h,{DfAgentsComponent:()=>ct});var g=l(18331),_=l(62572),t=l(1843),i=l(78227),v=l(48444),p=l(68660),R=l(93138),m=l(62633),d=l(54688),f=l(7263),F=l(453),k=l(91900),x=l(60368),C=l(98337),b=l(31147),j=l(43815),$=l(81137),I=l(17189),A=l(61417),D=l(15629),u=l(66460),w=l(54762),T=l(42250);function y(o,a){if(1&o&&(t.j41(0,"span",33),t.nrm(1,"span",34),t.EFF(2),t.k0s()),2&o){const e=t.XpG().$implicit;t.FS9("matTooltip",e("liveTip")),t.R7$(2),t.SpI(" ",e("live")," ")}}function O(o,a){if(1&o&&t.nrm(0,"df-empty-state",35),2&o){const e=t.XpG().$implicit;t.Y8G("title",e("log.empty.title"))("description",e("log.empty.message"))}}function P(o,a){if(1&o&&t.nrm(0,"df-empty-state",36),2&o){const e=t.XpG().$implicit;t.Y8G("title",e("log.noMatch.title"))("description",e("log.noMatch.message"))}}function G(o,a){if(1&o){const e=t.RV6();t.j41(0,"tr",43),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(4);return t.Njj(c.openCall(r))})("keydown.enter",function(){const r=t.eBV(e).$implicit,c=t.XpG(4);return t.Njj(c.openCall(r))}),t.j41(1,"td",44),t.EFF(2),t.nI1(3,"date"),t.k0s(),t.j41(4,"td"),t.EFF(5),t.k0s(),t.j41(6,"td",45),t.EFF(7),t.k0s(),t.j41(8,"td"),t.nrm(9,"df-badge",46),t.k0s(),t.j41(10,"td",47),t.EFF(11),t.nI1(12,"number"),t.j41(13,"span",48),t.EFF(14,"\u2192"),t.k0s(),t.EFF(15),t.nI1(16,"number"),t.k0s(),t.j41(17,"td",47),t.EFF(18),t.k0s(),t.j41(19,"td",47),t.EFF(20),t.nI1(21,"number"),t.k0s(),t.j41(22,"td",41),t.nrm(23,"df-badge",49),t.k0s()()}if(2&o){const e=a.$implicit,n=t.XpG(3).$implicit,s=t.XpG();t.AVh("active",(null==s.selected?null:s.selected.id)===e.id),t.R7$(2),t.SpI(" ",t.i5U(3,14,e.createdAt,"MMM d, HH:mm")," "),t.R7$(3),t.JRh(e.provider),t.R7$(2),t.JRh(e.model),t.R7$(2),t.Y8G("variant",e.ok?"success":"danger")("label",n(e.ok?"log.completed":"log.failed")),t.R7$(2),t.SpI(" ",t.bMT(12,17,e.inputTokens)," "),t.R7$(4),t.SpI(" ",t.bMT(16,19,e.outputTokens)," "),t.R7$(3),t.JRh(s.usd(e.costUsd)),t.R7$(2),t.SpI("",t.bMT(21,21,e.latencyMs)," ms"),t.R7$(3),t.Y8G("variant",null!=e.roleId?"success":"warning")("dot",!1)("label",n(null!=e.roleId?"log.scoped":"log.unscoped"))}}function B(o,a){if(1&o&&(t.j41(0,"table",39)(1,"thead")(2,"tr")(3,"th"),t.EFF(4),t.k0s(),t.j41(5,"th"),t.EFF(6),t.k0s(),t.j41(7,"th"),t.EFF(8),t.k0s(),t.j41(9,"th"),t.EFF(10),t.k0s(),t.j41(11,"th",40),t.EFF(12),t.k0s(),t.j41(13,"th",40),t.EFF(14),t.k0s(),t.j41(15,"th",40),t.EFF(16),t.k0s(),t.j41(17,"th",41),t.EFF(18),t.k0s()()(),t.j41(19,"tbody"),t.DNE(20,G,24,23,"tr",42),t.k0s()()),2&o){const e=t.XpG(2).$implicit,n=t.XpG();t.R7$(4),t.JRh(e("col.time")),t.R7$(2),t.JRh(e("col.provider")),t.R7$(2),t.JRh(e("col.model")),t.R7$(2),t.JRh(e("col.status")),t.R7$(2),t.JRh(e("col.tokens")),t.R7$(2),t.JRh(e("col.cost")),t.R7$(2),t.JRh(e("col.latency")),t.R7$(2),t.JRh(e("col.scope")),t.R7$(2),t.Y8G("ngForOf",n.filteredCalls)("ngForTrackBy",n.trackById)}}function J(o,a){if(1&o&&(t.j41(0,"div",37),t.DNE(1,B,21,10,"table",38),t.k0s()),2&o){const e=t.XpG(2);t.R7$(1),t.Y8G("ngIf",e.filteredCalls.length)}}function N(o,a){if(1&o&&(t.j41(0,"mat-option",60),t.EFF(1),t.k0s()),2&o){const e=a.$implicit;t.Y8G("value",e.id),t.R7$(1),t.JRh(e.name)}}function X(o,a){if(1&o&&(t.j41(0,"mat-option",60),t.EFF(1),t.k0s()),2&o){const e=a.$implicit;t.Y8G("value",e.id),t.R7$(1),t.JRh(e.name)}}function Y(o,a){if(1&o){const e=t.RV6();t.j41(0,"mat-form-field",51)(1,"mat-label"),t.EFF(2,"Owner"),t.k0s(),t.j41(3,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(3);return t.Njj(r.newAgent.ownerId=s)}),t.DNE(4,X,2,2,"mat-option",55),t.k0s()()}if(2&o){const e=t.XpG(3);t.R7$(3),t.Y8G("ngModel",e.newAgent.ownerId),t.R7$(1),t.Y8G("ngForOf",e.users)("ngForTrackBy",e.trackById)}}function L(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",50)(1,"mat-form-field",51)(2,"mat-label"),t.EFF(3,"Name"),t.k0s(),t.j41(4,"input",52),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.newAgent.name=s)}),t.k0s()(),t.j41(5,"mat-form-field",53)(6,"mat-label"),t.EFF(7,"Description"),t.k0s(),t.j41(8,"input",54),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.newAgent.description=s)}),t.k0s()(),t.j41(9,"mat-form-field",51)(10,"mat-label"),t.EFF(11,"Role"),t.k0s(),t.j41(12,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.newAgent.roleId=s)}),t.DNE(13,N,2,2,"mat-option",55),t.k0s()(),t.DNE(14,Y,5,3,"mat-form-field",56),t.j41(15,"mat-form-field",57)(16,"mat-label"),t.EFF(17,"Key TTL (h)"),t.k0s(),t.j41(18,"input",58),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.newAgent.keyTtlHours=s)}),t.k0s()(),t.j41(19,"button",59),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.createAgent())}),t.EFF(20," Create "),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(4),t.Y8G("ngModel",e.newAgent.name),t.R7$(4),t.Y8G("ngModel",e.newAgent.description),t.R7$(4),t.Y8G("ngModel",e.newAgent.roleId),t.R7$(1),t.Y8G("ngForOf",e.roles)("ngForTrackBy",e.trackById),t.R7$(1),t.Y8G("ngIf",e.users.length),t.R7$(4),t.Y8G("ngModel",e.newAgent.keyTtlHours),t.R7$(1),t.Y8G("disabled",e.saving||!e.newAgent.name||!e.newAgent.roleId)}}function V(o,a){if(1&o){const e=t.RV6();t.j41(0,"df-empty-state",61),t.bIt("action",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.showNew=!0)}),t.k0s()}if(2&o){const e=t.XpG().$implicit;t.Y8G("title",e("empty.title"))("description",e("empty.message"))("actionLabel",e("newAgent"))}}function U(o,a){if(1&o&&(t.j41(0,"span",75),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit,n=t.XpG().$implicit,s=t.XpG();t.FS9("matTooltip",n("ownerTip")),t.R7$(1),t.JRh(s.ownerName(e.ownerId))}}function K(o,a){if(1&o&&(t.j41(0,"span",76),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit;t.R7$(1),t.JRh(e.description)}}function W(o,a){if(1&o&&(t.j41(0,"div",77)(1,"div",78)(2,"span",79),t.EFF(3),t.k0s(),t.j41(4,"span",76),t.EFF(5),t.k0s()(),t.nrm(6,"df-scope-map",80),t.k0s()),2&o){const e=t.XpG().$implicit,n=t.XpG().$implicit;t.R7$(3),t.JRh(n("reach")),t.R7$(2),t.JRh(n("reachHint")),t.R7$(1),t.Y8G("roleId",e.roleId)}}function S(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",62)(1,"div",63)(2,"button",64),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.toggleExpand(r.id))}),t.j41(3,"mat-icon"),t.EFF(4),t.k0s()(),t.nrm(5,"df-badge",46),t.j41(6,"strong"),t.EFF(7),t.k0s(),t.j41(8,"span",65),t.EFF(9),t.k0s(),t.DNE(10,U,2,2,"span",66),t.DNE(11,K,2,1,"span",26),t.nrm(12,"span",67),t.j41(13,"span",68),t.EFF(14),t.k0s(),t.j41(15,"code",69),t.EFF(16),t.k0s(),t.j41(17,"span",70),t.EFF(18),t.k0s(),t.j41(19,"mat-slide-toggle",71),t.bIt("change",function(s){const c=t.eBV(e).$implicit,dt=t.XpG(2);return t.Njj(dt.toggleActive(c,s))}),t.k0s(),t.j41(20,"button",72),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.startEdit(r))}),t.j41(21,"mat-icon"),t.EFF(22,"edit"),t.k0s()(),t.j41(23,"button",73),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.remove(r))}),t.j41(24,"mat-icon"),t.EFF(25,"delete"),t.k0s()()(),t.DNE(26,W,7,3,"div",74),t.k0s()}if(2&o){const e=a.$implicit,n=t.XpG().$implicit,s=t.XpG();t.R7$(2),t.FS9("matTooltip",n("viewScope")),t.BMQ("aria-label",n("viewScope")),t.R7$(2),t.JRh(s.expandedId===e.id?"expand_less":"expand_more"),t.R7$(1),t.Y8G("variant",e.isActive?s.expired(e)?"warning":"success":"danger")("label",e.isActive?s.expired(e)?n("state.expired"):n("state.active"):n("state.revoked")),t.R7$(2),t.JRh(e.name),t.R7$(2),t.JRh(s.roleName(e.roleId)),t.R7$(1),t.Y8G("ngIf",null!=e.ownerId),t.R7$(1),t.Y8G("ngIf",e.description),t.R7$(2),t.FS9("matTooltip",n("lastActiveTip")),t.R7$(1),t.JRh(e.lastActiveAt?s.lastActive(e):n("neverActive")),t.R7$(2),t.JRh(s.maskKey(e.apiKey)),t.R7$(2),t.SpI("TTL ",e.keyTtlHours,"h"),t.R7$(1),t.Y8G("checked",e.isActive),t.R7$(7),t.Y8G("ngIf",s.expandedId===e.id)}}function z(o,a){if(1&o&&(t.j41(0,"mat-option",60),t.EFF(1),t.k0s()),2&o){const e=a.$implicit;t.Y8G("value",e.id),t.R7$(1),t.JRh(e.name)}}function H(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",81)(1,"mat-form-field",51)(2,"mat-label"),t.EFF(3,"Name"),t.k0s(),t.j41(4,"input",54),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.editAgent.name=s)}),t.k0s()(),t.j41(5,"mat-form-field",53)(6,"mat-label"),t.EFF(7,"Description"),t.k0s(),t.j41(8,"input",54),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.editAgent.description=s)}),t.k0s()(),t.j41(9,"mat-form-field",51)(10,"mat-label"),t.EFF(11,"Role"),t.k0s(),t.j41(12,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.editAgent.roleId=s)}),t.DNE(13,z,2,2,"mat-option",55),t.k0s()(),t.j41(14,"mat-form-field",57)(15,"mat-label"),t.EFF(16,"Key TTL (h)"),t.k0s(),t.j41(17,"input",82),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG(2);return t.Njj(r.editAgent.keyTtlHours=s)}),t.k0s()(),t.j41(18,"button",59),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.saveEdit())}),t.EFF(19," Save "),t.k0s(),t.j41(20,"button",83),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.editId=null)}),t.EFF(21,"Cancel"),t.k0s()()}if(2&o){const e=t.XpG(2);t.R7$(4),t.Y8G("ngModel",e.editAgent.name),t.R7$(4),t.Y8G("ngModel",e.editAgent.description),t.R7$(4),t.Y8G("ngModel",e.editAgent.roleId),t.R7$(1),t.Y8G("ngForOf",e.roles)("ngForTrackBy",e.trackById),t.R7$(4),t.Y8G("ngModel",e.editAgent.keyTtlHours),t.R7$(1),t.Y8G("disabled",e.saving)}}function q(o,a){if(1&o&&(t.j41(0,"span",76),t.EFF(1),t.k0s()),2&o){const e=t.XpG(2);t.R7$(1),t.SpI("(",e.pendingRequests.length,")")}}function Q(o,a){if(1&o&&t.nrm(0,"df-empty-state",84),2&o){const e=t.XpG().$implicit;t.Y8G("title",e("pending.empty.title"))("description",e("pending.empty.message"))}}function Z(o,a){if(1&o&&(t.j41(0,"span",89),t.EFF(1),t.k0s()),2&o){const e=t.XpG().$implicit;t.R7$(1),t.SpI('"',e.note,'"')}}const E=function(){return[]};function tt(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",63)(1,"mat-icon",85),t.EFF(2,"pan_tool"),t.k0s(),t.j41(3,"strong"),t.EFF(4),t.k0s(),t.j41(5,"span",76),t.EFF(6,"requests"),t.k0s(),t.nrm(7,"df-badge",86),t.j41(8,"span",76),t.EFF(9,"on"),t.k0s(),t.j41(10,"span",65),t.EFF(11),t.k0s(),t.DNE(12,Z,2,1,"span",87),t.nrm(13,"span",67),t.j41(14,"button",59),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.resolve(r,"approved"))}),t.j41(15,"mat-icon"),t.EFF(16,"check"),t.k0s(),t.EFF(17," Approve "),t.k0s(),t.j41(18,"button",88),t.bIt("click",function(){const r=t.eBV(e).$implicit,c=t.XpG(2);return t.Njj(c.resolve(r,"denied"))}),t.j41(19,"mat-icon"),t.EFF(20,"close"),t.k0s(),t.EFF(21," Deny "),t.k0s()()}if(2&o){const e=a.$implicit,n=t.XpG(2);t.R7$(4),t.JRh(n.agentName(e.agentId)),t.R7$(3),t.Y8G("dot",!1)("label",(e.requestedOperations||t.lJ4(7,E)).join(", ")||"any"),t.R7$(4),t.JRh((e.requestedServices||t.lJ4(8,E)).join(", ")||"unspecified"),t.R7$(1),t.Y8G("ngIf",e.note),t.R7$(2),t.Y8G("disabled",n.saving),t.R7$(4),t.Y8G("disabled",n.saving)}}function et(o,a){if(1&o&&(t.j41(0,"tr")(1,"td")(2,"strong"),t.EFF(3),t.k0s()(),t.j41(4,"td",76),t.EFF(5),t.k0s(),t.j41(6,"td"),t.nrm(7,"df-badge",49),t.k0s(),t.j41(8,"td",76),t.EFF(9),t.nI1(10,"date"),t.k0s(),t.j41(11,"td",47),t.EFF(12),t.k0s()()),2&o){const e=a.$implicit,n=t.XpG(2).$implicit,s=t.XpG();t.R7$(3),t.JRh(e.name),t.R7$(2),t.JRh(s.roleName(e.roleId)),t.R7$(2),t.Y8G("variant",e.isActive?s.expired(e)?"warning":"success":"danger")("dot",!1)("label",e.isActive?s.expired(e)?n("state.expired"):n("state.active"):n("state.revoked")),t.R7$(2),t.SpI(" ",e.lastActiveAt?t.i5U(10,7,e.lastActiveAt,"short"):"never"," "),t.R7$(3),t.JRh(s.requestCount(e.id))}}function nt(o,a){if(1&o&&(t.j41(0,"div",37)(1,"table")(2,"thead")(3,"tr")(4,"th"),t.EFF(5,"Agent"),t.k0s(),t.j41(6,"th"),t.EFF(7,"Role"),t.k0s(),t.j41(8,"th"),t.EFF(9,"Key"),t.k0s(),t.j41(10,"th"),t.EFF(11,"Last active"),t.k0s(),t.j41(12,"th",40),t.EFF(13,"Requests"),t.k0s()()(),t.j41(14,"tbody"),t.DNE(15,et,13,10,"tr",90),t.k0s()()()),2&o){const e=t.XpG(2);t.R7$(15),t.Y8G("ngForOf",e.agents)("ngForTrackBy",e.trackById)}}function ot(o,a){if(1&o&&t.nrm(0,"df-empty-state",91),2&o){const e=t.XpG().$implicit;t.Y8G("title",e("activity.emptyAlerts.title"))("description",e("activity.emptyAlerts.message"))}}function st(o,a){if(1&o&&(t.j41(0,"tr")(1,"td",76),t.EFF(2),t.nI1(3,"date"),t.k0s(),t.j41(4,"td"),t.EFF(5),t.k0s(),t.j41(6,"td"),t.nrm(7,"df-badge",46),t.k0s()()),2&o){const e=a.$implicit,n=t.XpG(3);t.R7$(2),t.JRh(t.i5U(3,4,e.created_at,"short")),t.R7$(3),t.JRh(e.event_name),t.R7$(2),t.Y8G("variant",n.alertVariant(e.status))("label",e.status)}}function it(o,a){if(1&o&&(t.j41(0,"div",37)(1,"table")(2,"thead")(3,"tr")(4,"th"),t.EFF(5,"When"),t.k0s(),t.j41(6,"th"),t.EFF(7,"Event"),t.k0s(),t.j41(8,"th"),t.EFF(9,"Status"),t.k0s()()(),t.j41(10,"tbody"),t.DNE(11,st,8,7,"tr",90),t.k0s()()()),2&o){const e=t.XpG(2);t.R7$(11),t.Y8G("ngForOf",e.agentLog)("ngForTrackBy",e.trackById)}}function at(o,a){if(1&o){const e=t.RV6();t.j41(0,"div",92),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.closeCall())}),t.k0s()}}function rt(o,a){if(1&o){const e=t.RV6();t.j41(0,"aside",93)(1,"div",94)(2,"div")(3,"span",79),t.EFF(4),t.k0s(),t.j41(5,"h3",45),t.EFF(6),t.k0s()(),t.j41(7,"button",95),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.closeCall())}),t.j41(8,"mat-icon"),t.EFF(9,"close"),t.k0s()()(),t.j41(10,"div",96)(11,"span",79),t.EFF(12),t.k0s(),t.j41(13,"div",97),t.nrm(14,"df-badge",46)(15,"df-badge",46),t.k0s(),t.j41(16,"p",98),t.EFF(17),t.k0s()(),t.j41(18,"div",96)(19,"span",79),t.EFF(20),t.k0s(),t.j41(21,"dl",99)(22,"dt"),t.EFF(23),t.k0s(),t.j41(24,"dd"),t.EFF(25),t.k0s(),t.j41(26,"dt"),t.EFF(27),t.k0s(),t.j41(28,"dd"),t.EFF(29),t.k0s(),t.j41(30,"dt"),t.EFF(31),t.k0s(),t.j41(32,"dd"),t.EFF(33),t.k0s(),t.j41(34,"dt"),t.EFF(35),t.k0s(),t.j41(36,"dd"),t.EFF(37),t.k0s(),t.j41(38,"dt"),t.EFF(39),t.k0s(),t.j41(40,"dd"),t.EFF(41),t.k0s(),t.j41(42,"dt"),t.EFF(43),t.k0s(),t.j41(44,"dd"),t.EFF(45),t.k0s(),t.j41(46,"dt"),t.EFF(47),t.k0s(),t.j41(48,"dd"),t.EFF(49),t.nI1(50,"date"),t.k0s()()(),t.j41(51,"div",96)(52,"span",79),t.EFF(53),t.k0s(),t.j41(54,"dl",99)(55,"dt"),t.EFF(56),t.k0s(),t.j41(57,"dd",100),t.EFF(58),t.nI1(59,"number"),t.k0s(),t.j41(60,"dt"),t.EFF(61),t.k0s(),t.j41(62,"dd",100),t.EFF(63),t.nI1(64,"number"),t.k0s(),t.j41(65,"dt"),t.EFF(66),t.k0s(),t.j41(67,"dd",100),t.EFF(68),t.k0s(),t.j41(69,"dt"),t.EFF(70),t.k0s(),t.j41(71,"dd",100),t.EFF(72),t.nI1(73,"number"),t.k0s()()(),t.j41(74,"div",96)(75,"span",79),t.EFF(76),t.k0s(),t.j41(77,"p",98),t.EFF(78),t.k0s()()()}if(2&o){const e=t.XpG().$implicit,n=t.XpG();t.R7$(4),t.JRh(e("drawer.title")),t.R7$(2),t.JRh(n.selected.model),t.R7$(1),t.BMQ("aria-label",e("drawer.close")),t.R7$(5),t.JRh(e("drawer.guardrails")),t.R7$(2),t.Y8G("variant",n.selected.ok?"success":"danger")("label",e(n.selected.ok?"drawer.completed":"drawer.failed")),t.R7$(1),t.Y8G("variant",null!=n.selected.roleId?"success":"warning")("label",e(null!=n.selected.roleId?"drawer.scopeEnforced":"drawer.unscoped")),t.R7$(2),t.JRh(e("drawer.guardrailHint")),t.R7$(3),t.JRh(e("drawer.attribution")),t.R7$(3),t.JRh(e("drawer.service")),t.R7$(2),t.JRh(n.selected.serviceLabel),t.R7$(2),t.JRh(e("drawer.resource")),t.R7$(2),t.JRh(n.selected.resource),t.R7$(2),t.JRh(e("drawer.provider")),t.R7$(2),t.JRh(n.selected.provider),t.R7$(2),t.JRh(e("drawer.role")),t.R7$(2),t.JRh(n.selected.roleLabel||e("drawer.none")),t.R7$(2),t.JRh(e("drawer.user")),t.R7$(2),t.JRh(n.selected.userLabel),t.R7$(2),t.JRh(e("drawer.app")),t.R7$(2),t.JRh(n.selected.appLabel||e("drawer.none")),t.R7$(2),t.JRh(e("drawer.when")),t.R7$(2),t.JRh(t.i5U(50,35,n.selected.createdAt,"medium")),t.R7$(4),t.JRh(e("drawer.metrics")),t.R7$(3),t.JRh(e("drawer.tokensIn")),t.R7$(2),t.JRh(t.bMT(59,38,n.selected.inputTokens)),t.R7$(3),t.JRh(e("drawer.tokensOut")),t.R7$(2),t.JRh(t.bMT(64,40,n.selected.outputTokens)),t.R7$(3),t.JRh(e("drawer.cost")),t.R7$(2),t.JRh(n.usd(n.selected.costUsd)),t.R7$(2),t.JRh(e("drawer.latency")),t.R7$(2),t.SpI("",t.bMT(73,42,n.selected.latencyMs)," ms"),t.R7$(4),t.JRh(e("drawer.body")),t.R7$(2),t.JRh(e("drawer.bodyNote"))}}function lt(o,a){if(1&o){const e=t.RV6();t.qex(0),t.j41(1,"div",1)(2,"df-page-header",2)(3,"div",3),t.DNE(4,y,3,2,"span",4),t.j41(5,"button",5),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.refreshAll())}),t.j41(6,"mat-icon"),t.EFF(7,"refresh"),t.k0s()(),t.j41(8,"button",6),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.showNew=!s.showNew)}),t.j41(9,"mat-icon"),t.EFF(10,"add"),t.k0s(),t.EFF(11),t.k0s()()(),t.j41(12,"mat-card",7)(13,"div",8)(14,"div")(15,"h2"),t.EFF(16),t.k0s(),t.j41(17,"p",9),t.EFF(18),t.k0s()(),t.j41(19,"div",10)(20,"mat-form-field",11)(21,"mat-label"),t.EFF(22),t.k0s(),t.j41(23,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG();return t.Njj(r.statusFilter=s)})("ngModelChange",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.applyCallFilter())}),t.j41(24,"mat-option",13),t.EFF(25),t.k0s(),t.j41(26,"mat-option",14),t.EFF(27),t.k0s(),t.j41(28,"mat-option",15),t.EFF(29),t.k0s()()(),t.j41(30,"mat-form-field",11)(31,"mat-label"),t.EFF(32),t.k0s(),t.j41(33,"mat-select",12),t.bIt("ngModelChange",function(s){t.eBV(e);const r=t.XpG();return t.Njj(r.range=s)})("ngModelChange",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.reloadUsage())}),t.j41(34,"mat-option",16),t.EFF(35),t.k0s(),t.j41(36,"mat-option",17),t.EFF(37),t.k0s(),t.j41(38,"mat-option",18),t.EFF(39),t.k0s(),t.j41(40,"mat-option",13),t.EFF(41),t.k0s()()()()(),t.DNE(42,O,1,2,"df-empty-state",19),t.DNE(43,P,1,2,"df-empty-state",20),t.DNE(44,J,2,1,"div",21),t.k0s(),t.j41(45,"mat-card",7)(46,"div",8)(47,"h2"),t.EFF(48),t.k0s()(),t.DNE(49,L,21,8,"div",22),t.DNE(50,V,1,3,"df-empty-state",23),t.DNE(51,S,27,15,"div",24),t.DNE(52,H,22,7,"div",25),t.k0s(),t.j41(53,"mat-card",7)(54,"div",8)(55,"h2"),t.EFF(56),t.DNE(57,q,2,1,"span",26),t.k0s()(),t.DNE(58,Q,1,2,"df-empty-state",27),t.DNE(59,tt,22,9,"div",28),t.k0s(),t.j41(60,"mat-card",7)(61,"div",8)(62,"h2"),t.EFF(63),t.k0s()(),t.DNE(64,nt,16,2,"div",21),t.j41(65,"h3",29),t.EFF(66),t.k0s(),t.DNE(67,ot,1,2,"df-empty-state",30),t.DNE(68,it,12,2,"div",21),t.k0s()(),t.DNE(69,at,1,0,"div",31),t.DNE(70,rt,79,44,"aside",32),t.bVm()}if(2&o){const e=a.$implicit,n=t.XpG();t.R7$(2),t.Y8G("description",e("subtitle")),t.R7$(2),t.Y8G("ngIf",n.polling),t.R7$(1),t.FS9("matTooltip",e("refresh")),t.BMQ("aria-label",e("refresh")),t.R7$(6),t.SpI(" ",e("newAgent")," "),t.R7$(5),t.JRh(e("log.title")),t.R7$(2),t.JRh(e("log.subtitle")),t.R7$(4),t.JRh(e("log.status")),t.R7$(1),t.Y8G("ngModel",n.statusFilter),t.R7$(2),t.JRh(e("log.allStatuses")),t.R7$(2),t.JRh(e("log.ok")),t.R7$(2),t.JRh(e("log.error")),t.R7$(3),t.JRh(e("log.range")),t.R7$(1),t.Y8G("ngModel",n.range),t.R7$(2),t.JRh(e("log.range24h")),t.R7$(2),t.JRh(e("log.range7d")),t.R7$(2),t.JRh(e("log.range30d")),t.R7$(2),t.JRh(e("log.rangeAll")),t.R7$(1),t.Y8G("ngIf",!n.callsLoading&&!n.calls.length),t.R7$(1),t.Y8G("ngIf",!n.callsLoading&&n.calls.length&&!n.filteredCalls.length),t.R7$(1),t.Y8G("ngIf",n.callsLoading||n.filteredCalls.length),t.R7$(4),t.JRh(e("agentsTitle")),t.R7$(1),t.Y8G("ngIf",n.showNew),t.R7$(1),t.Y8G("ngIf",!n.agents.length),t.R7$(1),t.Y8G("ngForOf",n.agents)("ngForTrackBy",n.trackById),t.R7$(1),t.Y8G("ngIf",null!==n.editId),t.R7$(4),t.SpI(" ",e("pending.title")," "),t.R7$(1),t.Y8G("ngIf",n.pendingRequests.length),t.R7$(1),t.Y8G("ngIf",!n.pendingRequests.length),t.R7$(1),t.Y8G("ngForOf",n.pendingRequests)("ngForTrackBy",n.trackById),t.R7$(4),t.JRh(e("activity.title")),t.R7$(1),t.Y8G("ngIf",n.agents.length),t.R7$(2),t.JRh(e("activity.alerts")),t.R7$(1),t.Y8G("ngIf",!n.agentLog.length),t.R7$(1),t.Y8G("ngIf",n.agentLog.length),t.R7$(1),t.Y8G("ngIf",n.selected),t.R7$(1),t.Y8G("ngIf",n.selected)}}let ct=(()=>{class o{constructor(){this.http=(0,t.WQX)(_.Qq),this.usage=(0,t.WQX)(u.D_),this.dialog=(0,t.WQX)(m.bZ),this.agents=[],this.requests=[],this.roles=[],this.users=[],this.agentLog=[],this.saving=!1,this.calls=[],this.filteredCalls=[],this.callsLoading=!0,this.statusFilter="all",this.range="30d",this.selected=null,this.polling=!0,this.pollHandle=null,this.pollMs=2e4,this.expandedId=null,this.showNew=!1,this.newAgent={name:"",description:"",roleId:null,ownerId:null,keyTtlHours:4},this.editId=null,this.editAgent={name:"",description:"",roleId:null,keyTtlHours:4},this.memoRequests=null,this.memoPendingRequests=[],this.memoRequestCounts=new Map,this.trackById=(e,n)=>n.id,this.memoAgents=null,this.memoExpiresAt=new Map,this.memoLastActive=new Map}syncRequestViews(){if(this.memoRequests===this.requests)return;this.memoRequests=this.requests,this.memoPendingRequests=this.requests.filter(n=>"pending"===n.status);const e=new Map;for(const n of this.requests)e.set(n.agentId,(e.get(n.agentId)??0)+1);this.memoRequestCounts=e}get pendingRequests(){return this.syncRequestViews(),this.memoPendingRequests}ngOnInit(){this.http.get("/api/v2/system/role?fields=id,name").subscribe(e=>this.roles=e.resource??[]),this.http.get("/api/v2/system/user?fields=id,name").subscribe(e=>this.users=e.resource??[]),this.refresh(),this.reloadUsage(),this.pollHandle=setInterval(()=>{this.refresh(),this.reloadUsage()},this.pollMs)}ngOnDestroy(){this.pollHandle&&clearInterval(this.pollHandle)}refreshAll(){this.refresh(),this.reloadUsage()}refresh(){this.http.get("/api/v2/agents/agents?fields=*").subscribe(e=>this.agents=e.resource??[]),this.http.get("/api/v2/agents/requests?fields=*").subscribe(e=>this.requests=e.resource??[]),this.http.get("/_internal/alerts/log",{context:(0,v.Ku)()}).subscribe({next:e=>this.agentLog=(e.resource??[]).filter(n=>(n.event_name??"").startsWith("system.agent")),error:()=>this.agentLog=[]})}reloadUsage(){this.callsLoading=!0,this.usage.loadAll(this.range).subscribe(e=>{this.calls=(e.raw.most_expensive_calls??[]).map(s=>this.toCallRow(s,e)),this.callsLoading=!1,this.applyCallFilter()})}toCallRow(e,n){const s=null!=e.service_id?n.services.get(e.service_id):void 0;return{id:e.id,provider:e.provider||"-",model:e.model||"-",resource:e.resource||"-",serviceLabel:s?.label||s?.name||(null!=e.service_id?`service #${e.service_id}`:"-"),userLabel:null!=e.user_id?n.users.get(e.user_id)??`user #${e.user_id}`:"-",roleId:e.role_id??null,roleLabel:null!=e.role_id?n.roles.get(e.role_id)??`role #${e.role_id}`:null,appLabel:null!=e.app_id?n.apps.get(e.app_id)??`app #${e.app_id}`:null,inputTokens:(0,u.n)(e.input_tokens),outputTokens:(0,u.n)(e.output_tokens),costUsd:(0,u.n)(e.cost_usd),latencyMs:(0,u.n)(e.latency_ms),status:e.status||"ok",createdAt:e.created_at,ok:"ok"===(e.status||"ok").toLowerCase()}}applyCallFilter(){this.filteredCalls="all"===this.statusFilter?this.calls:this.calls.filter(e=>"ok"===this.statusFilter?e.ok:!e.ok)}openCall(e){this.selected=e}closeCall(){this.selected=null}usd(e){return(0,w.az)(e)}alertVariant(e){return"sent"===e?"success":"failed"===e?"danger":"throttled"===e||"skipped"===e?"warning":"neutral"}toggleExpand(e){this.expandedId=this.expandedId===e?null:e}roleName(e){return this.roles.find(n=>n.id===e)?.name??(e?"role "+e:"-")}ownerName(e){return this.users.find(n=>n.id===e)?.name??(e?"user "+e:"-")}agentName(e){return this.agents.find(n=>n.id===e)?.name??"agent "+e}requestCount(e){return this.syncRequestViews(),this.memoRequestCounts.get(e)??0}maskKey(e){return e?e.slice(0,6)+"\u2026"+e.slice(-4):"-"}syncAgentMemos(){this.memoAgents!==this.agents&&(this.memoAgents=this.agents,this.memoExpiresAt.clear(),this.memoLastActive.clear())}expired(e){if(!e.keyIssuedAt)return!1;this.syncAgentMemos();let n=this.memoExpiresAt.get(e.id);return void 0===n&&(n=new Date(e.keyIssuedAt).getTime()+36e5*e.keyTtlHours,this.memoExpiresAt.set(e.id,n)),Date.now()>n}lastActive(e){if(!e.lastActiveAt)return"";this.syncAgentMemos();let n=this.memoLastActive.get(e.id);if(void 0===n){const s=Math.floor((Date.now()-new Date(e.lastActiveAt).getTime())/6e4);n=s<1?"just now":s<60?`${s}m ago`:s<2880?`${Math.floor(s/60)}h ago`:`${Math.floor(s/1440)}d ago`,this.memoLastActive.set(e.id,n)}return n}createAgent(){this.saving=!0,this.http.post("/api/v2/agents/agents",{resource:[this.newAgent]}).subscribe({next:()=>{this.saving=!1,this.showNew=!1,this.newAgent={name:"",description:"",roleId:null,ownerId:null,keyTtlHours:4},this.refresh()},error:()=>this.saving=!1})}startEdit(e){this.editId=e.id,this.editAgent={name:e.name,description:e.description??"",roleId:e.roleId,keyTtlHours:e.keyTtlHours}}saveEdit(){null!==this.editId&&(this.saving=!0,this.http.patch(`/api/v2/agents/agents/${this.editId}`,this.editAgent).subscribe({next:()=>{this.saving=!1,this.editId=null,this.refresh()},error:()=>this.saving=!1}))}toggleActive(e,n){n.checked?this.patchActive(e,!0):this.dialog.open(j.m,{data:{title:"agents.kill.title",message:"agents.kill.message"}}).afterClosed().subscribe(s=>{s?this.patchActive(e,!1):n.source.checked=!0})}patchActive(e,n){this.http.patch(`/api/v2/agents/agents/${e.id}`,{isActive:n}).subscribe({next:()=>e.isActive=n,error:()=>this.refresh()})}remove(e){confirm(`Delete agent "${e.name}" and revoke its key?`)&&this.http.delete(`/api/v2/agents/agents/${e.id}`).subscribe(()=>this.refresh())}resolve(e,n){this.saving=!0,this.http.patch(`/api/v2/agents/requests/${e.id}`,{status:n}).subscribe({next:()=>{this.saving=!1,this.refresh()},error:()=>this.saving=!1})}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=t.VBU({type:o,selectors:[["df-agents"]],standalone:!0,features:[t.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],[1,"agents-page"],["eyebrow","AI Gateway","title","Agents",3,"description"],["pageHeaderActions","",1,"head-actions"],["class","live","aria-hidden","true",3,"matTooltip",4,"ngIf"],["mat-icon-button","",1,"refresh-icon",3,"matTooltip","click"],["mat-flat-button","","color","primary",3,"click"],[1,"card"],[1,"card-head"],[1,"sub","tight"],[1,"log-controls"],["appearance","outline",1,"ctl"],[3,"ngModel","ngModelChange"],["value","all"],["value","ok"],["value","error"],["value","24h"],["value","7d"],["value","30d"],["icon","query_stats",3,"title","description",4,"ngIf"],["icon","filter_alt_off",3,"title","description",4,"ngIf"],["class","log-scroll",4,"ngIf"],["class","new-form",4,"ngIf"],["icon","smart_toy","actionIcon","add",3,"title","description","actionLabel","action",4,"ngIf"],["class","agent-block",4,"ngFor","ngForOf","ngForTrackBy"],["class","new-form edit",4,"ngIf"],["class","muted",4,"ngIf"],["icon","inbox",3,"title","description",4,"ngIf"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"sub2"],["icon","notifications_off",3,"title","description",4,"ngIf"],["class","drawer-scrim",3,"click",4,"ngIf"],["class","drawer","role","dialog","aria-modal","true",4,"ngIf"],["aria-hidden","true",1,"live",3,"matTooltip"],[1,"live-dot"],["icon","query_stats",3,"title","description"],["icon","filter_alt_off",3,"title","description"],[1,"log-scroll"],["class","log",4,"ngIf"],[1,"log"],[1,"num"],[1,"scope-col"],["class","log-row","tabindex","0",3,"active","click","keydown.enter",4,"ngFor","ngForOf","ngForTrackBy"],["tabindex","0",1,"log-row",3,"click","keydown.enter"],[1,"muted","nowrap"],[1,"mono"],[3,"variant","label"],[1,"num","df-numeric"],[1,"arrow"],[3,"variant","dot","label"],[1,"new-form"],["appearance","outline"],["matInput","","placeholder","sales-report-bot",3,"ngModel","ngModelChange"],["appearance","outline",1,"grow"],["matInput","",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["appearance","outline",4,"ngIf"],["appearance","outline",1,"narrow"],["matInput","","type","number","min","1","max","24","matTooltip","1-24 hours",3,"ngModel","ngModelChange"],["mat-flat-button","","color","primary",3,"disabled","click"],[3,"value"],["icon","smart_toy","actionIcon","add",3,"title","description","actionLabel","action"],[1,"agent-block"],[1,"row"],["mat-icon-button","",1,"chevron",3,"matTooltip","click"],[1,"tag"],["class","muted nowrap",3,"matTooltip",4,"ngIf"],[1,"spacer"],[1,"muted","ttl","nowrap",3,"matTooltip"],["matTooltip","Agent API key",1,"key"],[1,"muted","ttl"],["matTooltip","Revoke / restore key",3,"checked","change"],["mat-icon-button","","matTooltip","Edit",3,"click"],["mat-icon-button","","matTooltip","Delete",3,"click"],["class","expand",4,"ngIf"],[1,"muted","nowrap",3,"matTooltip"],[1,"muted"],[1,"expand"],[1,"expand-meta"],[1,"df-eyebrow"],[3,"roleId"],[1,"new-form","edit"],["matInput","","type","number","min","1","max","24",3,"ngModel","ngModelChange"],["mat-button","",3,"click"],["icon","inbox",3,"title","description"],[1,"hand"],["variant","warning",3,"dot","label"],["class","muted note",4,"ngIf"],["mat-stroked-button","",3,"disabled","click"],[1,"muted","note"],[4,"ngFor","ngForOf","ngForTrackBy"],["icon","notifications_off",3,"title","description"],[1,"drawer-scrim",3,"click"],["role","dialog","aria-modal","true",1,"drawer"],[1,"drawer-head"],["mat-icon-button","",3,"click"],[1,"drawer-section"],[1,"chips"],[1,"hint"],[1,"kv"],[1,"df-numeric"]],template:function(n,s){1&n&&t.DNE(0,lt,71,39,"ng-container",0),2&n&&t.Y8G("translocoRead","agents")},dependencies:[g.MD,g.Sq,g.bT,g.QX,g.vh,i.YN,i.me,i.Q0,i.BC,i.VZ,i.zX,i.vS,b.Q8,b.bA,R.Hu,R.RN,p.Hl,p.$z,p.iY,f.m_,f.An,d.RG,d.rl,d.nJ,F.fS,F.fg,k.Ve,k.VO,T.wT,x.mV,x.sG,C.uc,C.oV,$.K,I.v,A.M,D.A],styles:['.agents-page[_ngcontent-%COMP%]{--page-warning: #9a5b00;color:var(--df-text)}.dark-theme[_nghost-%COMP%] .agents-page[_ngcontent-%COMP%], .dark-theme [_nghost-%COMP%] .agents-page[_ngcontent-%COMP%]{--page-warning: #ffb74d}.head-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2, 8px)}.live[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:6px;font-size:var(--df-font-size-xs, 12px);color:var(--df-success);text-transform:uppercase;letter-spacing:var(--df-tracking-eyebrow, .04em)}.live-dot[_ngcontent-%COMP%]{width:7px;height:7px;border-radius:50%;background:var(--df-success);box-shadow:0 0 0 0 var(--df-success);animation:_ngcontent-%COMP%_live-pulse 2s ease-out infinite}@keyframes _ngcontent-%COMP%_live-pulse{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--df-success) 60%,transparent)}70%{box-shadow:0 0 0 5px transparent}to{box-shadow:0 0 0 0 transparent}}@media (prefers-reduced-motion: reduce){.live-dot[_ngcontent-%COMP%]{animation:none}}.refresh-icon[_ngcontent-%COMP%]{color:var(--df-text-muted)}.sub[_ngcontent-%COMP%]{color:var(--df-text-2);margin:4px 0 16px;max-width:720px}.sub.tight[_ngcontent-%COMP%]{margin:2px 0 0;font-size:var(--df-font-size-sm, 13px)}.sub2[_ngcontent-%COMP%]{margin:18px 0 6px;font-size:1.5rem;font-weight:600;letter-spacing:-.01em}.card[_ngcontent-%COMP%]{margin:0 auto 16px;max-width:var(--df-content-max, 1120px);padding:16px}.card-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:12px;gap:16px}h2[_ngcontent-%COMP%]{margin:0;font-size:1.6rem;font-weight:600;letter-spacing:-.01em}.log-controls[_ngcontent-%COMP%]{display:flex;gap:var(--df-space-2, 8px);flex-shrink:0}.ctl[_ngcontent-%COMP%]{width:140px}.new-form[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:12px 0 4px;border-bottom:1px solid var(--df-border-2);margin-bottom:8px}.new-form.edit[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);padding:12px;border-bottom-width:1px}.new-form[_ngcontent-%COMP%] mat-form-field[_ngcontent-%COMP%]{min-width:150px}.new-form[_ngcontent-%COMP%] .grow[_ngcontent-%COMP%]{flex:1;min-width:200px}.new-form[_ngcontent-%COMP%] .narrow[_ngcontent-%COMP%]{min-width:110px;max-width:130px}.agent-block[_ngcontent-%COMP%]{border-top:1px solid var(--df-border-2)}.agent-block[_ngcontent-%COMP%]:first-of-type{border-top:0}.row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-height:44px;padding:4px 10px}.row[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.chevron[_ngcontent-%COMP%]{color:var(--df-text-muted)}.expand[_ngcontent-%COMP%]{padding:4px 12px 16px 48px;background:var(--df-surface-2);border-top:1px solid var(--df-border-2)}.expand-meta[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:10px;margin:10px 0 6px}.spacer[_ngcontent-%COMP%]{flex:1}.muted[_ngcontent-%COMP%]{color:var(--df-text-muted)}.nowrap[_ngcontent-%COMP%]{white-space:nowrap}.note[_ngcontent-%COMP%]{font-style:italic}.df-eyebrow[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs, 12px);font-weight:var(--df-font-weight-medium, 500);text-transform:uppercase;letter-spacing:var(--df-tracking-eyebrow, .04em);color:var(--df-text-muted)}.ttl[_ngcontent-%COMP%], .key[_ngcontent-%COMP%]{font-size:1.2rem}.mono[_ngcontent-%COMP%]{font-family:var(--df-font-mono, "SFMono-Regular", Menlo, monospace)}.key[_ngcontent-%COMP%]{background:var(--df-surface-2);border:1px solid var(--df-border-2);padding:2px 8px;border-radius:var(--df-radius-sm);font-family:var(--df-font-mono, "SFMono-Regular", Menlo, monospace)}.hand[_ngcontent-%COMP%]{color:var(--df-warning, var(--page-warning))}.tag[_ngcontent-%COMP%]{background:var(--df-tint-ai-bg);color:var(--df-tint-ai-fg);padding:2px 10px;border-radius:var(--df-radius-sm);font-size:1.2rem}.log-scroll[_ngcontent-%COMP%]{overflow-x:auto}table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{text-align:left;padding:10px 8px;border-top:1px solid var(--df-border-2)}th[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted);border-top:0;border-bottom:1px solid var(--df-border);position:sticky;top:0;background:var(--df-surface);z-index:1}th.num[_ngcontent-%COMP%], td.num[_ngcontent-%COMP%]{text-align:right}.df-numeric[_ngcontent-%COMP%]{font-variant-numeric:tabular-nums;font-feature-settings:"zero" 1}.arrow[_ngcontent-%COMP%]{color:var(--df-text-muted)}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:44px}tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background:var(--df-hover)}.log-row[_ngcontent-%COMP%]{cursor:pointer}.log-row.active[_ngcontent-%COMP%]{background:var(--df-hover)}.log-row[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:-2px}table.log[_ngcontent-%COMP%] td.mono[_ngcontent-%COMP%]{font-family:var(--df-font-mono, "SFMono-Regular", Menlo, monospace);font-size:1.25rem}.drawer-scrim[_ngcontent-%COMP%]{position:fixed;inset:0;background:rgba(0,0,0,.32);z-index:40}.drawer[_ngcontent-%COMP%]{position:fixed;top:0;right:0;bottom:0;width:min(420px,92vw);background:var(--df-surface);border-left:1px solid var(--df-border);box-shadow:var(--df-shadow-overlay, 0 8px 24px rgba(0, 0, 0, .18));z-index:41;overflow-y:auto;padding:16px 20px 32px;animation:_ngcontent-%COMP%_drawer-in var(--df-duration-fast, .12s) var(--df-ease-standard, ease) both}@keyframes _ngcontent-%COMP%_drawer-in{0%{transform:translate(8px);opacity:.6}to{transform:translate(0);opacity:1}}@media (prefers-reduced-motion: reduce){.drawer[_ngcontent-%COMP%]{animation:none}}.drawer-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px}.drawer-head[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:4px 0 0;font-size:1.5rem;font-weight:600}.drawer-section[_ngcontent-%COMP%]{padding:14px 0;border-top:1px solid var(--df-border-2)}.chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 6px}.hint[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:var(--df-font-size-xs, 12px);margin:6px 0 0}dl.kv[_ngcontent-%COMP%]{display:grid;grid-template-columns:40% 60%;gap:6px 12px;margin:10px 0 0}dl.kv[_ngcontent-%COMP%] dt[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:var(--df-font-size-xs, 12px)}dl.kv[_ngcontent-%COMP%] dd[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm, 13px);word-break:break-word}']})}}return o})()},43815:(M,h,l)=>{l.d(h,{m:()=>v});var g=l(68660),_=l(62633),t=l(31147),i=l(1843);let v=(()=>{class p{constructor(m,d){this.dialogRef=m,this.data=d}get isDestructive(){const m=(this.data?.message??"").toLowerCase(),d=(this.data?.title??"").toLowerCase();return m.includes("delete")||d.includes("delete")}onClose(){this.dialogRef.close(!0)}static{this.\u0275fac=function(d){return new(d||p)(i.rXU(_.CP),i.rXU(_.Vh))}}static{this.\u0275cmp=i.VBU({type:p,selectors:[["df-confirm-dialog"]],standalone:!0,features:[i.aNF],decls:13,vars:14,consts:[["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],["mat-flat-button","","mat-dialog-close","","data-testid","confirm-dialog-cancel","type","button",1,"cancel-btn"],["mat-flat-button","","cdkFocusInitial","","data-testid","confirm-dialog-confirm","type","button","color","primary",1,"save-btn",3,"click"]],template:function(d,f){1&d&&(i.j41(0,"h1",0),i.EFF(1),i.nI1(2,"transloco"),i.k0s(),i.j41(3,"div",1),i.EFF(4),i.nI1(5,"transloco"),i.k0s(),i.j41(6,"div",2)(7,"button",3),i.EFF(8),i.nI1(9,"transloco"),i.k0s(),i.j41(10,"button",4),i.bIt("click",function(){return f.onClose()}),i.EFF(11),i.nI1(12,"transloco"),i.k0s()()),2&d&&(i.R7$(1),i.JRh(i.bMT(2,6,f.data.title)),i.R7$(3),i.JRh(i.bMT(5,8,f.data.message)),i.R7$(4),i.SpI(" ",i.bMT(9,10,"no")," "),i.R7$(2),i.AVh("destructive",f.isDestructive),i.R7$(1),i.SpI(" ",i.bMT(12,12,"yes")," "))},dependencies:[_.hM,_.tx,_.BI,_.Yi,_.E7,g.Hl,g.$z,t.Kj],styles:["[_nghost-%COMP%]{display:block;background:var(--df-surface);color:var(--df-text);--mdc-dialog-subhead-color: var(--df-text);--mdc-dialog-supporting-text-color: var(--df-text-2)}mat-dialog-actions[_ngcontent-%COMP%], [mat-dialog-actions][_ngcontent-%COMP%]{border-top:1px solid var(--df-border-2)}.save-btn.destructive[_ngcontent-%COMP%]{--mdc-filled-button-container-color: var(--df-danger-soft);--mdc-filled-button-label-text-color: var(--df-danger);border:1px solid var(--df-danger-border)}"]})}}return p})()}}]); \ No newline at end of file diff --git a/dist/269.83f26d716676725e.js b/dist/269.83f26d716676725e.js new file mode 100644 index 00000000..70c6c966 --- /dev/null +++ b/dist/269.83f26d716676725e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[269],{70269:(q,D,r)=>{r.r(D),r.d(D,{DfAdminDetailsComponent:()=>u});var b=r(31635),i=r(89417),c=r(95245),M=r(99437),h=r(18810),m=r(95753),A=r(76765),O=r(24784),F=r(58751),y=r(30877),v=r(99631),_=r(32102),I=r(82765),T=r(20060),R=r(88834),d=r(5951),p=r(60177),P=r(30450),$=r(77493),G=r(51425),C=r(33609),U=r(49894),e=r(17705),x=r(82298),B=r(52608),S=r(95351);function k(s,o){if(1&s&&(e.qex(0),e.j41(1,"df-alert",14),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"mat-radio-group",15),e.nI1(5,"transloco"),e.j41(6,"mat-radio-button",16),e.EFF(7),e.nI1(8,"transloco"),e.k0s(),e.j41(9,"mat-radio-button",17),e.EFF(10),e.nI1(11,"transloco"),e.k0s()(),e.bVm()),2&s){const t=e.XpG();let n;e.R7$(1),e.Y8G("alertType",null!=(n=t.userForm.get("pass-invite"))&&n.touched&&null!=(n=t.userForm.get("pass-invite"))&&n.invalid?"error":"info")("showAlert",!0)("dismissible",!1),e.R7$(1),e.SpI(" ",e.bMT(3,7,t.userType+".alerts.new")," "),e.R7$(2),e.BMQ("aria-label",e.bMT(5,9,"selectAnOption")),e.R7$(3),e.JRh(e.bMT(8,11,"userManagement.controls.sendInvite.label")),e.R7$(3),e.JRh(e.bMT(11,13,"userManagement.controls.setPassword.label"))}}function j(s,o){if(1&s){const t=e.RV6();e.j41(0,"button",19),e.bIt("click",function(){e.eBV(t);const a=e.XpG(2);return e.Njj(a.sendInvite())}),e.EFF(1),e.nI1(2,"transloco"),e.nrm(3,"fa-icon",20),e.k0s()}if(2&s){const t=e.XpG(2);e.R7$(1),e.SpI(" ",e.bMT(2,2,"sendInvite")," "),e.R7$(2),e.Y8G("icon",t.faEnvelope)}}function N(s,o){1&s&&(e.qex(0),e.j41(1,"mat-checkbox",21),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.bVm()),2&s&&(e.R7$(2),e.SpI("",e.bMT(3,1,"userManagement.controls.setPassword.label")," "))}function W(s,o){if(1&s&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.DNE(3,j,4,4,"button",18),e.DNE(4,N,4,3,"ng-container",8)),2&s){const t=e.XpG();e.R7$(1),e.Lme("",e.bMT(2,4,"confirmed"),": ",t.currentProfile.confirmed?"Yes":"No",""),e.R7$(2),e.Y8G("ngIf",!t.currentProfile.confirmed),e.R7$(1),e.Y8G("ngIf",t.userForm.contains("setPassword"))}}function L(s,o){1&s&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&s&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.password.errors.required")," "))}function K(s,o){1&s&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&s&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.password.errors.length")," "))}function w(s,o){1&s&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&s&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"userManagement.controls.confirmPassword.errors.match")," "))}function Y(s,o){if(1&s&&(e.qex(0),e.j41(1,"mat-form-field",22)(2,"mat-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"input",23),e.DNE(6,L,3,3,"mat-error",8),e.DNE(7,K,3,3,"mat-error",8),e.k0s(),e.j41(8,"mat-form-field",22)(9,"mat-label"),e.EFF(10),e.nI1(11,"transloco"),e.k0s(),e.nrm(12,"input",24),e.DNE(13,w,3,3,"mat-error",8),e.k0s(),e.bVm()),2&s){const t=e.XpG();let n,a,l;e.R7$(3),e.JRh(e.bMT(4,5,"userManagement.controls.password.label")),e.R7$(3),e.Y8G("ngIf",null==(n=t.userForm.get("password"))||null==n.errors?null:n.errors.required),e.R7$(1),e.Y8G("ngIf",null==(a=t.userForm.get("password"))||null==a.errors?null:a.errors.minlength),e.R7$(3),e.JRh(e.bMT(11,7,"userManagement.controls.confirmPassword.label")),e.R7$(3),e.Y8G("ngIf",null==(l=t.userForm.get("confirmPassword"))?null:l.hasError("doesNotMatch"))}}function X(s,o){if(1&s&&(e.qex(0),e.EFF(1),e.nI1(2,"transloco"),e.bVm()),2&s){const t=e.XpG(2);e.R7$(1),e.JRh(e.bMT(2,1,t.userType+".alerts.autoRole"))}}r(36225);const V=function(s){return{roleId:s}};function J(s,o){if(1&s&&(e.EFF(0),e.nI1(1,"transloco")),2&s){const t=e.XpG(2);e.JRh(e.i5U(1,1,t.userType+".alerts.roleId",e.eq3(4,V,t.currentProfile.userToAppToRoleByUserId[0].roleId)))}}function z(s,o){if(1&s&&(e.qex(0,30),e.j41(1,"mat-checkbox",31),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.bVm()),2&s){const t=o.$implicit;e.Y8G("formGroupName",o.index),e.R7$(2),e.SpI(" ",e.bMT(3,2,"admins.tabs."+t.value.title),"")}}function Q(s,o){if(1&s){const t=e.RV6();e.qex(0),e.j41(1,"div")(2,"h3"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"df-alert",25),e.EFF(6),e.nI1(7,"transloco"),e.DNE(8,X,3,3,"ng-container",6),e.DNE(9,J,2,6,"ng-template",null,26,e.C5r),e.k0s(),e.j41(11,"mat-checkbox",27),e.bIt("change",function(a){e.eBV(t);const l=e.XpG();return e.Njj(l.selectAllTabs(a))}),e.EFF(12),e.nI1(13,"transloco"),e.k0s(),e.j41(14,"div",28),e.DNE(15,z,4,4,"ng-container",29),e.k0s()(),e.bVm()}if(2&s){const t=e.sdS(10),n=e.XpG();e.R7$(3),e.JRh(e.bMT(4,9,n.userType+".accessByTabs")),e.R7$(2),e.Y8G("showAlert",!n.allTabsSelected)("dismissible",!1),e.R7$(1),e.SpI(" ",e.bMT(7,11,n.userType+".alerts.restrictedAdmin")," "),e.R7$(2),e.Y8G("ngIf","create"===n.type||0===n.currentProfile.userToAppToRoleByUserId.length)("ngIfElse",t),e.R7$(3),e.Y8G("checked",n.allTabsSelected),e.R7$(1),e.SpI(" ",e.bMT(13,13,"selectAll"),""),e.R7$(3),e.Y8G("ngForOf",n.tabs.controls)}}function H(s,o){if(1&s&&e.nrm(0,"df-user-app-roles",32),2&s){const t=e.XpG();e.Y8G("apps",t.apps)("roles",t.roles)}}let u=class E extends A.s{constructor(o,t,n,a,l,f,g,Z){super(o,t,n,a,Z),this.translateService=l,this.adminService=f,this.router=g,this.userType="admins"}sendInvite(){this.adminService.patch(this.currentProfile.id,null,{snackbarSuccess:"inviteSent"}).subscribe()}save(){if(this.userForm.invalid||this.userForm.pristine)return void(this.userForm.invalid&&this.userForm.markAllAsTouched());const o={...this.userForm.value.profileDetailsGroup,isActive:this.userForm.value.isActive,accessByTabs:this.tabs?this.tabs.controls.filter(t=>t.value.checked).map(t=>t.value.name):[],isRestrictedAdmin:!!this.tabs&&this.tabs.controls.some(t=>!t.value.checked),lookupByUserId:this.userForm.getRawValue().lookupKeys};if("create"===this.type){const t="invite"===this.userForm.value["pass-invite"];t||(o.password=this.userForm.value.password),this.adminService.create({resource:[o]},{snackbarSuccess:"admins.alerts.createdSuccess",additionalParams:[{key:"send_invite",value:t}]}).pipe((0,M.W)(n=>{const a=(0,m.cQ)(n),l=(0,m.aI)(this.userForm,a);return this.triggerAlert("error",(l.length?l:[a.message]).map(g=>this.translateService.translate(g)).join(" ")),(0,h.$)(()=>a)})).subscribe(n=>{this.router.navigate(["../",n.resource[0].id],{relativeTo:this.activatedRoute})})}else this.userForm.value.setPassword&&(o.password=this.userForm.value.password),this.adminService.update(this.currentProfile.id,{...o,password:this.userForm.value.password},{snackbarSuccess:"admins.alerts.updateSuccess"}).pipe((0,M.W)(t=>{const n=(0,m.cQ)(t);return this.triggerAlert("error",this.translateService.translate(n.message)),(0,h.$)(()=>n)})).subscribe(t=>{this.router.navigate(["../",t.id],{relativeTo:this.activatedRoute})})}static{this.\u0275fac=function(t){return new(t||E)(e.rXU(i.ok),e.rXU(c.nX),e.rXU(x.f),e.rXU(B.R),e.rXU(C.JO),e.rXU(O.ir),e.rXU(c.Ix),e.rXU(S.o))}}static{this.\u0275cmp=e.VBU({type:E,selectors:[["df-admin-details"]],standalone:!0,features:[e.Vt3,e.aNF],decls:24,vars:23,consts:[[3,"showAlert","alertType","alertClosed"],["name","admin-form",3,"formGroup","ngSubmit"],[1,"user-details"],["formGroupName","profileDetailsGroup"],[1,"additional-info"],["color","primary","formControlName","isActive"],[4,"ngIf","ngIfElse"],["editMode",""],[4,"ngIf"],["formArrayName","appRoles",3,"apps","roles",4,"ngIf"],["formArrayName","lookupKeys"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"routerLink"],["mat-flat-button","","color","primary","type","submit",1,"save-btn"],[3,"alertType","showAlert","dismissible"],["formControlName","pass-invite",1,"pass-invite"],["value","invite",1,"userform-invite-radio-btn"],["value","password",1,"userform-password-radio-btn"],["mat-flat-button","","color","primary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary",3,"click"],[3,"icon"],["formControlName","setPassword"],["appearance","outline"],["matInput","","type","password","formControlName","password",1,"user-details-set-password"],["matInput","","type","password","formControlName","confirmPassword",1,"user-details-confirm-password"],["alertType","warning",3,"showAlert","dismissible"],["hasRole",""],[3,"checked","change"],["formArrayName","tabs",1,"access-tabs"],[3,"formGroupName",4,"ngFor","ngForOf"],[3,"formGroupName"],["formControlName","checked"],["formArrayName","appRoles",3,"apps","roles"]],template:function(t,n){if(1&t&&(e.j41(0,"df-alert",0),e.bIt("alertClosed",function(){return n.showAlert=!1}),e.EFF(1),e.k0s(),e.j41(2,"form",1),e.bIt("ngSubmit",function(){return n.save()}),e.j41(3,"div",2),e.nI1(4,"async"),e.nrm(5,"df-profile-details",3),e.j41(6,"div",4)(7,"mat-slide-toggle",5),e.EFF(8),e.nI1(9,"transloco"),e.k0s(),e.DNE(10,k,12,15,"ng-container",6),e.DNE(11,W,5,6,"ng-template",null,7,e.C5r),e.DNE(13,Y,14,9,"ng-container",8),e.DNE(14,Q,16,15,"ng-container",8),e.k0s()(),e.DNE(15,H,1,2,"df-user-app-roles",9),e.nrm(16,"df-lookup-keys",10),e.j41(17,"div",11)(18,"button",12),e.EFF(19),e.nI1(20,"transloco"),e.k0s(),e.j41(21,"button",13),e.EFF(22),e.nI1(23,"transloco"),e.k0s()()()),2&t){const a=e.sdS(12);let l;e.Y8G("showAlert",n.showAlert)("alertType",n.alertType),e.R7$(1),e.SpI(" ",n.alertMsg,"\n"),e.R7$(1),e.Y8G("formGroup",n.userForm),e.R7$(1),e.AVh("small",e.bMT(4,15,n.isSmallScreen)),e.R7$(5),e.JRh(e.bMT(9,17,"active")),e.R7$(2),e.Y8G("ngIf","create"===n.type)("ngIfElse",a),e.R7$(3),e.Y8G("ngIf","password"===(null==(l=n.userForm.get("pass-invite"))?null:l.value)||(null==(l=n.userForm.get("setPassword"))?null:l.value)),e.R7$(1),e.Y8G("ngIf",n.accessByTabs.length>0&&"admins"===n.userType&&("create"===n.type||"edit"===n.type&&!n.currentProfile.isRootAdmin)),e.R7$(1),e.Y8G("ngIf","users"===n.userType),e.R7$(3),e.Y8G("routerLink",n.cancelRoute),e.R7$(1),e.SpI(" ",e.bMT(20,19,"cancel")," "),e.R7$(3),e.SpI(" ",e.bMT(23,21,"create"===n.type?"create":"update")," ")}},dependencies:[G.W,i.X1,i.qT,i.me,i.BC,i.cb,i.j4,i.JD,i.$R,i.v8,$.D,P.mV,P.sG,p.bT,d.Wk,d.VT,d._g,R.Hl,R.$z,T.dX,T.aY,I.g7,I.So,_.RG,_.rl,_.nJ,_.TL,v.fS,v.fg,p.pM,y.N,F.S,c.Wk,p.Jj,C.Kj],styles:[".user-details[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:32px}.user-details.small[_ngcontent-%COMP%]{flex-direction:column;gap:16px}.user-details[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1}.user-details[_ngcontent-%COMP%] .additional-info[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.user-details[_ngcontent-%COMP%] .additional-info[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:-moz-fit-content;width:fit-content}.user-details[_ngcontent-%COMP%] .access-tabs[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-wrap:wrap;max-height:240px}.user-details[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0 0 12px;font-size:1.5rem;font-weight:600;letter-spacing:-.01em;color:var(--df-text)}.user-details[_ngcontent-%COMP%] .pass-invite[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}"]})}};u=(0,b.Cg)([(0,U.d)({checkProperties:!0})],u)}}]); \ No newline at end of file diff --git a/dist/2765.91de37a203517a85.js b/dist/2765.91de37a203517a85.js new file mode 100644 index 00000000..e319fc59 --- /dev/null +++ b/dist/2765.91de37a203517a85.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2765],{82765:(I,x,i)=>{i.d(x,{So:()=>b,g7:()=>A});var e=i(17705),h=i(89417),d=i(86600),m=i(14085);const u=["input"],p=["label"],g=["*"],f=new e.nKC("mat-checkbox-default-options",{providedIn:"root",factory:k});function k(){return{color:"accent",clickAction:"check-indeterminate"}}const v={provide:h.kq,useExisting:(0,e.Rfq)(()=>b),multi:!0};class y{}let C=0;const l=k(),F=(0,d.BF)((0,d.Zc)((0,d.GG)((0,d.Ob)(class{constructor(a){this._elementRef=a}}))));let T=(()=>{class a extends F{get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(c){this._required=(0,m.he)(c)}constructor(c,o,t,n,r,s,z){super(o),this._changeDetectorRef=t,this._ngZone=n,this._animationMode=s,this._options=z,this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new e.bkB,this.indeterminateChange=new e.bkB,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||l,this.color=this.defaultColor=this._options.color||l.color,this.tabIndex=parseInt(r)||0,this.id=this._uniqueId=`${c}${++C}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(c){const o=(0,m.he)(c);o!=this.checked&&(this._checked=o,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(c){const o=(0,m.he)(c);o!==this.disabled&&(this._disabled=o,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(c){const o=c!=this._indeterminate;this._indeterminate=(0,m.he)(c),o&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(c){this.checked=!!c}registerOnChange(c){this._controlValueAccessorChangeFn=c}registerOnTouched(c){this._onTouched=c}setDisabledState(c){this.disabled=c}_transitionCheckState(c){let o=this._currentCheckState,t=this._getAnimationTargetElement();if(o!==c&&t&&(this._currentAnimationClass&&t.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(o,c),this._currentCheckState=c,this._currentAnimationClass.length>0)){t.classList.add(this._currentAnimationClass);const n=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{t.classList.remove(n)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){const c=this._options?.clickAction;this.disabled||"noop"===c?!this.disabled&&"noop"===c&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==c&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}_onInteractionEvent(c){c.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(c,o){if("NoopAnimations"===this._animationMode)return"";switch(c){case 0:if(1===o)return this._animationClasses.uncheckedToChecked;if(3==o)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return 1===o?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return 2===o?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return 1===o?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(c){const o=this._inputElement;o&&(o.nativeElement.indeterminate=c)}static{this.\u0275fac=function(o){e.QTQ()}}static{this.\u0275dir=e.FsC({type:a,viewQuery:function(o,t){if(1&o&&(e.GBs(u,5),e.GBs(p,5),e.GBs(d.r6,5)),2&o){let n;e.mGM(n=e.lsd())&&(t._inputElement=n.first),e.mGM(n=e.lsd())&&(t._labelElement=n.first),e.mGM(n=e.lsd())&&(t.ripple=n.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:"required",labelPosition:"labelPosition",name:"name",value:"value",checked:"checked",disabled:"disabled",indeterminate:"indeterminate"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},features:[e.Vt3]})}}return a})(),b=(()=>{class a extends T{constructor(c,o,t,n,r,s){super("mat-mdc-checkbox-",c,o,t,n,r,s),this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"}}focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(c){const o=new y;return o.source=this,o.checked=c,o}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_onInputClick(){super._handleInputClick()}_onTouchTargetClick(){super._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(c){c.target&&this._labelElement.nativeElement.contains(c.target)&&c.stopPropagation()}static{this.\u0275fac=function(o){return new(o||a)(e.rXU(e.aKT),e.rXU(e.gRc),e.rXU(e.SKi),e.kS0("tabindex"),e.rXU(e.bc$,8),e.rXU(f,8))}}static{this.\u0275cmp=e.VBU({type:a,selectors:[["mat-checkbox"]],hostAttrs:[1,"mat-mdc-checkbox"],hostVars:12,hostBindings:function(o,t){2&o&&(e.Mr5("id",t.id),e.BMQ("tabindex",null)("aria-label",null)("aria-labelledby",null),e.AVh("_mat-animation-noopable","NoopAnimations"===t._animationMode)("mdc-checkbox--disabled",t.disabled)("mat-mdc-checkbox-disabled",t.disabled)("mat-mdc-checkbox-checked",t.checked))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matCheckbox"],features:[e.Jv_([v]),e.Vt3],ngContentSelectors:g,decls:15,vars:20,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"],["label",""]],template:function(o,t){if(1&o&&(e.NAR(),e.j41(0,"div",0),e.bIt("click",function(r){return t._preventBubblingFromLabel(r)}),e.j41(1,"div",1,2)(3,"div",3),e.bIt("click",function(){return t._onTouchTargetClick()}),e.k0s(),e.j41(4,"input",4,5),e.bIt("blur",function(){return t._onBlur()})("click",function(){return t._onInputClick()})("change",function(r){return t._onInteractionEvent(r)}),e.k0s(),e.nrm(6,"div",6),e.j41(7,"div",7),e.qSk(),e.j41(8,"svg",8),e.nrm(9,"path",9),e.k0s(),e.joV(),e.nrm(10,"div",10),e.k0s(),e.nrm(11,"div",11),e.k0s(),e.j41(12,"label",12,13),e.SdG(14),e.k0s()()),2&o){const n=e.sdS(2);e.AVh("mdc-form-field--align-end","before"==t.labelPosition),e.R7$(4),e.AVh("mdc-checkbox--selected",t.checked),e.Y8G("checked",t.checked)("indeterminate",t.indeterminate)("disabled",t.disabled)("id",t.inputId)("required",t.required)("tabIndex",t.tabIndex),e.BMQ("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby)("aria-describedby",t.ariaDescribedby)("aria-checked",t.indeterminate?"mixed":null)("name",t.name)("value",t.value),e.R7$(7),e.Y8G("matRippleTrigger",n)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",!0),e.R7$(1),e.Y8G("for",t.inputId)}},dependencies:[d.r6],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2)}.mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}.mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-icon-color);background-color:transparent}}.mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}@keyframes mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}}@keyframes mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:transparent}}.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF212121FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}@keyframes mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}}@keyframes mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color);background-color:var(--mdc-checkbox-selected-pressed-icon-color)}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color);background-color:transparent}}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FFF4433600000000FFF44336}.mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - 18px) / 2)}.mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);right:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);left:calc((var(--mdc-checkbox-state-layer-size) - var(--mdc-checkbox-state-layer-size)) / 2);width:var(--mdc-checkbox-state-layer-size);height:var(--mdc-checkbox-state-layer-size)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:focus:not(:checked):not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:checked~.mdc-checkbox__background,.mdc-checkbox .mdc-checkbox__native-control:enabled:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}html{--mdc-checkbox-disabled-selected-checkmark-color:#fff;--mdc-checkbox-selected-focus-state-layer-opacity:0.16;--mdc-checkbox-selected-hover-state-layer-opacity:0.04;--mdc-checkbox-selected-pressed-state-layer-opacity:0.16;--mdc-checkbox-unselected-focus-state-layer-opacity:0.16;--mdc-checkbox-unselected-hover-state-layer-opacity:0.04;--mdc-checkbox-unselected-pressed-state-layer-opacity:0.16}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}}return a})(),_=(()=>{class a{static{this.\u0275fac=function(o){return new(o||a)}}static{this.\u0275mod=e.$C({type:a})}static{this.\u0275inj=e.G2t({})}}return a})(),A=(()=>{class a{static{this.\u0275fac=function(o){return new(o||a)}}static{this.\u0275mod=e.$C({type:a})}static{this.\u0275inj=e.G2t({imports:[d.yE,d.pZ,_,d.yE,_]})}}return a})()}}]); \ No newline at end of file diff --git a/dist/2798.98700d1feb8241db.js b/dist/2798.98700d1feb8241db.js new file mode 100644 index 00000000..44df3601 --- /dev/null +++ b/dist/2798.98700d1feb8241db.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2798],{82798:(de,R,l)=>{l.d(R,{VO:()=>ie,Ve:()=>ae});var g=l(66969),f=l(60177),t=l(17705),o=l(86600),M=l(32102),D=l(6914),y=l(18617),B=l(28203),v=l(14085),L=l(45024),c=l(67336),b=l(89417),C=l(21413),F=l(59030),O=l(57786),k=l(99172),w=l(25558),I=l(96697),T=l(5964),A=l(96354),W=l(23294),u=l(56977),d=l(49969);const K=["trigger"],G=["panel"];function U(n,_){if(1&n&&(t.j41(0,"span",10),t.EFF(1),t.k0s()),2&n){const e=t.XpG();t.R7$(1),t.JRh(e.placeholder)}}function V(n,_){if(1&n&&(t.j41(0,"span",14),t.EFF(1),t.k0s()),2&n){const e=t.XpG(2);t.R7$(1),t.JRh(e.triggerValue)}}function j(n,_){1&n&&t.SdG(0,0,["*ngSwitchCase","true"])}function X(n,_){if(1&n&&(t.j41(0,"span",11),t.DNE(1,V,2,1,"span",12),t.DNE(2,j,1,0,"ng-content",13),t.k0s()),2&n){const e=t.XpG();t.Y8G("ngSwitch",!!e.customTrigger),t.R7$(2),t.Y8G("ngSwitchCase",!0)}}function Y(n,_){if(1&n){const e=t.RV6();t.qSk(),t.joV(),t.j41(0,"div",15,16),t.bIt("@transformPanel.done",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s._panelDoneAnimatingStream.next(a.toState))})("keydown",function(a){t.eBV(e);const s=t.XpG();return t.Njj(s._handleKeydown(a))}),t.SdG(2,1),t.k0s()}if(2&n){const e=t.XpG();t.ZvI("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),t.Y8G("ngClass",e.panelClass)("@transformPanel","showing"),t.BMQ("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}const Q=[[["mat-select-trigger"]],"*"],z=["mat-select-trigger","*"],H={transformPanelWrap:(0,d.hZ)("transformPanelWrap",[(0,d.kY)("* => void",(0,d.P)("@transformPanel",[(0,d.MA)()],{optional:!0}))]),transformPanel:(0,d.hZ)("transformPanel",[(0,d.wk)("void",(0,d.iF)({opacity:0,transform:"scale(1, 0.8)"})),(0,d.kY)("void => showing",(0,d.i0)("120ms cubic-bezier(0, 0, 0.2, 1)",(0,d.iF)({opacity:1,transform:"scale(1, 1)"}))),(0,d.kY)("* => void",(0,d.i0)("100ms linear",(0,d.iF)({opacity:0})))])};let x=0;const P=new t.nKC("mat-select-scroll-strategy"),N=new t.nKC("MAT_SELECT_CONFIG"),Z={provide:P,deps:[g.hJ],useFactory:function $(n){return()=>n.scrollStrategies.reposition()}},J=new t.nKC("MatSelectTrigger");class q{constructor(_,e){this.source=_,this.value=e}}const ee=(0,o.GG)((0,o.BF)((0,o.Ob)((0,o.J8)(class{constructor(n,_,e,i,a){this._elementRef=n,this._defaultErrorStateMatcher=_,this._parentForm=e,this._parentFormGroup=i,this.ngControl=a,this.stateChanges=new C.B}}))));let te=(()=>{class n extends ee{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(b.k0.required)??!1}set required(e){this._required=(0,v.he)(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=(0,v.he)(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=(0,v.he)(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=(0,v.OE)(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,i,a,s,r,m,h,ne,se,le,re,oe,ce,S){super(r,s,h,ne,le),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=a,this._dir=m,this._parentFormField=se,this._liveAnnouncer=ce,this._defaultOptions=S,this._panelOpen=!1,this._compareWith=(p,E)=>p===E,this._uid="mat-select-"+x++,this._triggerAriaLabelledBy=null,this._destroy=new C.B,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+x++,this._panelDoneAnimatingStream=new C.B,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=(0,F.v)(()=>{const p=this.options;return p?p.changes.pipe((0,k.Z)(p),(0,w.n)(()=>(0,O.h)(...p.map(E=>E.onSelectionChange)))):this._ngZone.onStable.pipe((0,I.s)(1),(0,w.n)(()=>this.optionSelectionChanges))}),this.openedChange=new t.bkB,this._openedStream=this.openedChange.pipe((0,T.p)(p=>p),(0,A.T)(()=>{})),this._closedStream=this.openedChange.pipe((0,T.p)(p=>!p),(0,A.T)(()=>{})),this.selectionChange=new t.bkB,this.valueChange=new t.bkB,this._trackedModal=null,this.ngControl&&(this.ngControl.valueAccessor=this),null!=S?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=S.typeaheadDebounceInterval),this._scrollStrategyFactory=oe,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(re)||0,this.id=this.id}ngOnInit(){this._selectionModel=new L.CB(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe((0,W.F)(),(0,u.Q)(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe((0,u.Q)(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe((0,k.Z)(null),(0,u.Q)(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){const e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){const a=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?a.setAttribute("aria-labelledby",e):a.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}_applyModalPanelOwnership(){const e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;const i=`${this.id}-panel`;this._trackedModal&&(0,y.Ae)(this._trackedModal,"aria-owns",i),(0,y.px)(e,"aria-owns",i),this._trackedModal=e}_clearFromModal(){this._trackedModal&&((0,y.Ae)(this._trackedModal,"aria-owns",`${this.id}-panel`),this._trackedModal=null)}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){const e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){const i=e.keyCode,a=i===c.n6||i===c.i7||i===c.UQ||i===c.LE,s=i===c.Fm||i===c.t6,r=this._keyManager;if(!r.isTyping()&&s&&!(0,c.rp)(e)||(this.multiple||e.altKey)&&a)e.preventDefault(),this.open();else if(!this.multiple){const m=this.selected;r.onKeydown(e);const h=this.selected;h&&m!==h&&this._liveAnnouncer.announce(h.viewValue,1e4)}}_handleOpenKeydown(e){const i=this._keyManager,a=e.keyCode,s=a===c.n6||a===c.i7,r=i.isTyping();if(s&&e.altKey)e.preventDefault(),this.close();else if(r||a!==c.Fm&&a!==c.t6||!i.activeItem||(0,c.rp)(e))if(!r&&this._multiple&&a===c.A&&e.ctrlKey){e.preventDefault();const m=this.options.some(h=>!h.disabled&&!h.selected);this.options.forEach(h=>{h.disabled||(m?h.select():h.deselect())})}else{const m=i.activeItemIndex;i.onKeydown(e),this._multiple&&s&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==m&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe((0,I.s)(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{const i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){const i=this.options.find(a=>{if(this._selectionModel.isSelected(a))return!1;try{return null!=a.value&&this._compareWith(a.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_skipPredicate(e){return e.disabled}_initKeyManager(){this._keyManager=new y.Au(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){const e=(0,O.h)(this.options.changes,this._destroy);this.optionSelectionChanges.pipe((0,u.Q)(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),(0,O.h)(...this.options.map(i=>i._stateChanges)).pipe((0,u.Q)(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){const a=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(a!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),a!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){const e=this.options.toArray();this._selectionModel.sort((i,a)=>this.sortComparator?this.sortComparator(i,a,e):e.indexOf(i)-e.indexOf(a)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(a=>a.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let i=0;i0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;const e=this._parentFormField?.getLabelId();let i=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}static{this.\u0275fac=function(i){return new(i||n)(t.rXU(D.Xj),t.rXU(t.gRc),t.rXU(t.SKi),t.rXU(o.es),t.rXU(t.aKT),t.rXU(B.dS,8),t.rXU(b.cV,8),t.rXU(b.j4,8),t.rXU(M.xb,8),t.rXU(b.vO,10),t.kS0("tabindex"),t.rXU(P),t.rXU(y.Ai),t.rXU(N,8))}}static{this.\u0275dir=t.FsC({type:n,viewQuery:function(i,a){if(1&i&&(t.GBs(K,5),t.GBs(G,5),t.GBs(g.WB,5)),2&i){let s;t.mGM(s=t.lsd())&&(a.trigger=s.first),t.mGM(s=t.lsd())&&(a.panel=s.first),t.mGM(s=t.lsd())&&(a._overlayDir=s.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[t.Vt3,t.OA$]})}}return n})(),ie=(()=>{class n extends te{constructor(){super(...arguments),this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._skipPredicate=e=>!this.panelOpen&&e.disabled}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe((0,u.Q)(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}open(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(e){const i=this.options.toArray()[e];if(i){const a=this.panel.nativeElement,s=(0,o.jb)(e,this.options,this.optionGroups),r=i._getHostElement();a.scrollTop=0===e&&1===s?0:(0,o.TL)(r.offsetTop,r.offsetHeight,a.scrollTop,a.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new q(this,e)}_getOverlayWidth(e){return"auto"===this.panelWidth?(e instanceof g.$Q?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:null===this.panelWidth?"":this.panelWidth}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=(0,v.he)(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(const e of this.options)e._changeDetectorRef.markForCheck()}static{this.\u0275fac=function(){let e;return function(a){return(e||(e=t.xGo(n)))(a||n)}}()}static{this.\u0275cmp=t.VBU({type:n,selectors:[["mat-select"]],contentQueries:function(i,a,s){if(1&i&&(t.wni(s,J,5),t.wni(s,o.wT,5),t.wni(s,o.QC,5)),2&i){let r;t.mGM(r=t.lsd())&&(a.customTrigger=r.first),t.mGM(r=t.lsd())&&(a.options=r),t.mGM(r=t.lsd())&&(a.optionGroups=r)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox","ngSkipHydration","",1,"mat-mdc-select"],hostVars:19,hostBindings:function(i,a){1&i&&t.bIt("keydown",function(r){return a._handleKeydown(r)})("focus",function(){return a._onFocus()})("blur",function(){return a._onBlur()}),2&i&&(t.BMQ("id",a.id)("tabindex",a.tabIndex)("aria-controls",a.panelOpen?a.id+"-panel":null)("aria-expanded",a.panelOpen)("aria-label",a.ariaLabel||null)("aria-required",a.required.toString())("aria-disabled",a.disabled.toString())("aria-invalid",a.errorState)("aria-activedescendant",a._getAriaActiveDescendant()),t.AVh("mat-mdc-select-disabled",a.disabled)("mat-mdc-select-invalid",a.errorState)("mat-mdc-select-required",a.required)("mat-mdc-select-empty",a.empty)("mat-mdc-select-multiple",a.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",panelWidth:"panelWidth",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[t.Jv_([{provide:M.qT,useExisting:n},{provide:o.is,useExisting:n}]),t.Vt3],ngContentSelectors:z,decls:11,vars:10,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(i,a){if(1&i&&(t.NAR(Q),t.j41(0,"div",0,1),t.bIt("click",function(){return a.toggle()}),t.j41(3,"div",2),t.DNE(4,U,2,1,"span",3),t.DNE(5,X,3,2,"span",4),t.k0s(),t.j41(6,"div",5)(7,"div",6),t.qSk(),t.j41(8,"svg",7),t.nrm(9,"path",8),t.k0s()()()(),t.DNE(10,Y,3,9,"ng-template",9),t.bIt("backdropClick",function(){return a.close()})("attach",function(){return a._onAttached()})("detach",function(){return a.close()})),2&i){const s=t.sdS(1);t.R7$(3),t.Y8G("ngSwitch",a.empty),t.BMQ("id",a._valueId),t.R7$(1),t.Y8G("ngSwitchCase",!0),t.R7$(1),t.Y8G("ngSwitchCase",!1),t.R7$(5),t.Y8G("cdkConnectedOverlayPanelClass",a._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",a._scrollStrategy)("cdkConnectedOverlayOrigin",a._preferredOverlayOrigin||s)("cdkConnectedOverlayOpen",a.panelOpen)("cdkConnectedOverlayPositions",a._positions)("cdkConnectedOverlayWidth",a._overlayWidth)}},dependencies:[f.YU,f.ux,f.e1,f.fG,g.WB,g.$Q],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12);width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[H.transformPanel]},changeDetection:0})}}return n})(),ae=(()=>{class n{static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275mod=t.$C({type:n})}static{this.\u0275inj=t.G2t({providers:[Z],imports:[f.MD,g.z_,o.Sy,o.yE,D.Gj,M.RG,o.Sy,o.yE]})}}return n})()}}]); \ No newline at end of file diff --git a/dist/2816.2f21c88e4cda31f4.js b/dist/2816.2f21c88e4cda31f4.js new file mode 100644 index 00000000..73cf4883 --- /dev/null +++ b/dist/2816.2f21c88e4cda31f4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2816],{82816:(Kn,E,c)=>{c.r(E),c.d(E,{DfFilesComponent:()=>$});var F=c(31635),w=c(62031),S=c(24784),V=c(55590),X=c(23472),u=c(45383),P=c(63035),v=c(49894),n=c(17705),b=c(95245),B=c(18617),h=c(33609),f=c(75351),I=c(60177),g=c(88834),C=c(20060),m=c(9159),d=c(59115),s=c(89417),j=c(96695),p=c(32102),D=c(99631),k=c(2042),N=c(67575),U=c(84665),z=c(56583),A=c(71359),O=c(82798),L=c(86600);function J(e,a){if(1&e){const t=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){n.eBV(t);const i=n.XpG();return n.Njj(i.createRow())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"newEntry")),n.R7$(2),n.Y8G("icon",t.faPlus)}}function Q(e,a){if(1&e){const t=n.RV6();n.j41(0,"button",8),n.bIt("click",function(){n.eBV(t);const i=n.XpG();return n.Njj(i.refreshSchema())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"importList")),n.R7$(2),n.Y8G("icon",t.faRefresh)}}function H(e,a){if(1&e&&(n.j41(0,"mat-option",13),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=a.$implicit;n.Y8G("value",t.value),n.R7$(1),n.SpI(" ",n.bMT(2,2,t.label)," ")}}function K(e,a){if(1&e&&(n.j41(0,"mat-form-field",10)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"mat-select",11),n.DNE(5,H,3,4,"mat-option",12),n.k0s()()),2&e){const t=n.XpG().ngIf;n.R7$(2),n.JRh(n.bMT(3,3,"accessUsage.filter.label")),n.R7$(2),n.Y8G("formControl",t.filter),n.R7$(1),n.Y8G("ngForOf",t.filterOptions)}}function Z(e,a){if(1&e&&(n.qex(0),n.DNE(1,K,6,5,"mat-form-field",9),n.bVm()),2&e){const t=a.ngIf;n.R7$(1),n.Y8G("ngIf",t.available)}}function W(e,a){if(1&e&&(n.j41(0,"mat-form-field",14)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"input",15),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"search")),n.R7$(2),n.Y8G("formControl",t.currentFilter)}}function q(e,a){1&e&&n.nrm(0,"mat-progress-bar",26)}function nn(e,a){if(1&e){const t=n.RV6();n.j41(0,"div",27)(1,"div",28),n.nrm(2,"fa-icon",29),n.j41(3,"span"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.j41(6,"button",30),n.bIt("click",function(){n.eBV(t);const i=n.XpG(2);return n.Njj(i.retryLastFetch())}),n.EFF(7),n.nI1(8,"transloco"),n.k0s()(),n.nrm(9,"df-error-detail",31),n.k0s()}if(2&e){const t=n.XpG(2);n.R7$(2),n.Y8G("icon",t.faTriangleExclamation),n.R7$(2),n.JRh(n.bMT(5,4,t.tableError.message)),n.R7$(3),n.SpI(" ",n.bMT(8,6,"retry")," "),n.R7$(2),n.Y8G("error",t.tableError)}}function tn(e,a){if(1&e&&(n.j41(0,"th",37),n.nI1(1,"async"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit,o=n.XpG(2);n.AVh("df-numeric",o.isNumericColumn(t.columnDef)),n.BMQ("sortActionDescription",n.bMT(1,4,o.sortDescription(t.header))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.header)," ")}}function en(e,a){if(1&e&&n.nrm(0,"fa-icon",29),2&e){const t=n.XpG().$implicit,o=n.XpG(2).$implicit,i=n.XpG(2);n.HbH(i.isCellActive(null==o?null:o.cell(t))?"active":"inactive"),n.Y8G("icon",i.activeIcon(i.isCellActive(null==o?null:o.cell(t))))}}function on(e,a){if(1&e&&(n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.bVm()),2&e){const t=n.XpG().$implicit,o=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,null!=o&&o.cell(t)?"confirmed":"pending")," ")}}function an(e,a){if(1&e&&(n.qex(0),n.EFF(1),n.bVm()),2&e){const t=n.XpG().$implicit,o=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",null==o?null:o.cell(t)," ")}}function cn(e,a){if(1&e&&n.nrm(0,"df-access-usage-cell",41),2&e){const t=n.XpG().$implicit,o=n.XpG(4);let i,l;n.Y8G("usage",null==o.accessUsage?null:o.accessUsage.get(t.id))("staleDays",null!==(i=null==o.accessUsage?null:o.accessUsage.staleDays)&&void 0!==i?i:null)("trackingStartedAt",null!==(l=null==o.accessUsage?null:o.accessUsage.trackingStartedAt)&&void 0!==l?l:null)}}function ln(e,a){if(1&e&&n.nrm(0,"fa-icon",43),2&e){const t=n.XpG(6);n.Y8G("icon",t.faTriangleExclamation)}}function rn(e,a){1&e&&(n.j41(0,"span"),n.EFF(1),n.k0s()),2&e&&(n.R7$(1),n.JRh("-"))}function _n(e,a){if(1&e&&(n.qex(0),n.DNE(1,ln,1,1,"fa-icon",42),n.DNE(2,rn,2,1,"span",4),n.bVm()),2&e){const t=n.XpG().$implicit,o=n.XpG(2).$implicit;n.R7$(1),n.Y8G("ngIf",!(null==o||!o.cell(t))),n.R7$(1),n.Y8G("ngIf",!(null!=o&&o.cell(t)))}}function sn(e,a){if(1&e&&(n.j41(0,"td",38),n.DNE(1,en,1,3,"fa-icon",39),n.DNE(2,on,3,3,"ng-container",4),n.DNE(3,an,2,1,"ng-container",4),n.DNE(4,cn,1,3,"df-access-usage-cell",40),n.DNE(5,_n,3,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(2).$implicit,o=n.XpG(2);n.AVh("df-numeric",o.isNumericColumn(t.columnDef)),n.R7$(1),n.Y8G("ngIf","active"===t.columnDef),n.R7$(1),n.Y8G("ngIf","registration"===t.columnDef),n.R7$(1),n.Y8G("ngIf","active"!==t.columnDef&&"registration"!==t.columnDef&&"log"!==t.columnDef&&"lastUsed"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","lastUsed"===t.columnDef),n.R7$(1),n.Y8G("ngIf","log"===t.columnDef)}}function mn(e,a){if(1&e&&(n.qex(0,34),n.DNE(1,tn,4,8,"th",35),n.DNE(2,sn,6,7,"td",36),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function fn(e,a){if(1&e&&(n.j41(0,"th",46),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,t.header)," ")}}function gn(e,a){if(1&e&&(n.j41(0,"a",53),n.bIt("click",function(o){return o.stopPropagation()}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=a.$implicit;n.Y8G("routerLink",t.fix)("disabled",!t.fix),n.R7$(1),n.SpI(" ",n.bMT(2,3,"services.health.rules."+t.id)," ")}}function pn(e,a){if(1&e&&(n.qex(0),n.j41(1,"button",49),n.bIt("click",function(o){return o.stopPropagation()}),n.nI1(2,"transloco"),n.nrm(3,"df-badge",50),n.nI1(4,"transloco"),n.k0s(),n.j41(5,"mat-menu",null,51),n.DNE(7,gn,3,5,"a",52),n.k0s(),n.bVm()),2&e){const t=n.sdS(6),o=n.XpG().ngIf;n.R7$(1),n.Y8G("matMenuTriggerFor",t),n.BMQ("aria-label",n.bMT(2,5,"services.health.whyAria")),n.R7$(2),n.Y8G("variant",o.level)("label",n.bMT(4,7,"services.health.level."+o.level)),n.R7$(4),n.Y8G("ngForOf",o.rules)}}function dn(e,a){if(1&e&&(n.nrm(0,"df-badge",50),n.nI1(1,"transloco")),2&e){const t=n.XpG(2).$implicit;n.Y8G("variant","ok"===t.probe?"success":"neutral")("label",n.bMT(1,2,"ok"===t.probe?"services.health.level.success":"unsupported"===t.probe?"services.health.chip.notChecked":"services.health.chip.checking"))}}function un(e,a){if(1&e&&(n.qex(0),n.DNE(1,pn,8,9,"ng-container",47),n.DNE(2,dn,2,4,"ng-template",null,48,n.C5r),n.bVm()),2&e){const t=a.ngIf,o=n.sdS(3);n.R7$(1),n.Y8G("ngIf",t.rules.length)("ngIfElse",o)}}function bn(e,a){if(1&e&&(n.j41(0,"td",38),n.DNE(1,un,4,2,"ng-container",4),n.k0s()),2&e){const t=a.$implicit;n.R7$(1),n.Y8G("ngIf",t.health)}}function hn(e,a){if(1&e&&(n.qex(0,34),n.DNE(1,fn,3,3,"th",44),n.DNE(2,bn,2,1,"td",45),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function Cn(e,a){1&e&&(n.j41(0,"th",46),n.EFF(1," Scripting "),n.k0s())}function Dn(e,a){if(1&e){const t=n.RV6();n.j41(0,"td",56)(1,"fa-icon",57),n.bIt("click",function(){const l=n.eBV(t).$implicit,_=n.XpG(3).$implicit,r=n.XpG(2);let Y;return n.Njj(r.goEventScriptsPage((null==_||null==(Y=_.cell(l))?null:Y.toString())||""))})("click",function(i){return i.stopPropagation()}),n.k0s()()}if(2&e){const t=a.$implicit,o=n.XpG(3).$implicit,i=n.XpG(2);n.R7$(1),n.HbH("not"!==(null==o?null:o.cell(t))?"active":"inactive"),n.Y8G("icon",i.activeIcon("not"!==(null==o?null:o.cell(t))))}}function Tn(e,a){1&e&&(n.qex(0),n.DNE(1,Cn,2,0,"th",44),n.DNE(2,Dn,2,3,"td",55),n.bVm())}function Fn(e,a){1&e&&n.nrm(0,"th",59)}function vn(e,a){1&e&&n.nrm(0,"td",56)}function In(e,a){1&e&&(n.DNE(0,Fn,1,0,"th",58),n.DNE(1,vn,1,0,"td",55))}function kn(e,a){if(1&e&&(n.qex(0,34),n.DNE(1,Tn,3,0,"ng-container",47),n.DNE(2,In,2,0,"ng-template",null,54,n.C5r),n.bVm()),2&e){const t=n.sdS(3),o=n.XpG().$implicit,i=n.XpG(2);n.Y8G("matColumnDef",o.columnDef),n.R7$(1),n.Y8G("ngIf",i.isDatabase)("ngIfElse",t)}}function Gn(e,a){1&e&&n.nrm(0,"th",59)}c(36225);const G=function(e){return{param:e}};function xn(e,a){if(1&e){const t=n.RV6();n.j41(0,"button",66),n.bIt("click",function(){n.eBV(t);const i=n.XpG(3).$implicit,l=n.XpG(4);return n.Njj(l.actions.additional[0].function(i))})("click",function(i){return i.stopPropagation()}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",67),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(5,G,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.Y8G("icon",t.actions.additional[0].icon)}}function $n(e,a){if(1&e){const t=n.RV6();n.j41(0,"button",68),n.bIt("click",function(){n.eBV(t);const i=n.XpG(3).$implicit,l=n.XpG(4);return n.Njj(l.actions.additional[0].function(i))})("click",function(i){return i.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(7,G,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,5,t.actions.additional[0].label)," ")}}function Rn(e,a){if(1&e&&(n.qex(0),n.DNE(1,xn,3,7,"button",64),n.DNE(2,$n,4,9,"ng-template",null,65,n.C5r),n.bVm()),2&e){const t=n.sdS(3),o=n.XpG(6);n.R7$(1),n.Y8G("ngIf",o.actions.additional[0].icon)("ngIfElse",t)}}function yn(e,a){if(1&e){const t=n.RV6();n.j41(0,"button",72),n.bIt("click",function(){const l=n.eBV(t).$implicit,_=n.XpG(3).$implicit;return n.Njj(l.function(_))}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=a.$implicit,o=n.XpG(3).$implicit,i=n.XpG(4);n.Y8G("disabled",i.isActionDisabled(t,o)),n.BMQ("aria-label",n.i5U(1,3,t.ariaLabel.key,n.eq3(8,G,t.ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.label)," ")}}function Mn(e,a){if(1&e&&(n.j41(0,"button",69),n.bIt("click",function(o){return o.stopPropagation()}),n.nrm(1,"fa-icon",67),n.k0s(),n.j41(2,"mat-menu",null,70),n.DNE(4,yn,4,10,"button",71),n.k0s()),2&e){const t=n.sdS(3),o=n.XpG(6);n.Y8G("matMenuTriggerFor",t),n.R7$(1),n.Y8G("icon",o.faEllipsisV),n.R7$(3),n.Y8G("ngForOf",o.actions.additional)}}function En(e,a){if(1&e&&(n.qex(0),n.DNE(1,Rn,4,2,"ng-container",47),n.DNE(2,Mn,5,3,"ng-template",null,63,n.C5r),n.bVm()),2&e){const t=n.sdS(3),o=n.XpG(5);n.R7$(1),n.Y8G("ngIf",1===o.actions.additional.length)("ngIfElse",t)}}function Sn(e,a){if(1&e&&(n.j41(0,"td",62),n.DNE(1,En,4,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(4);n.R7$(1),n.Y8G("ngIf",t.actions.additional&&t.actions.additional.length>0)}}function Xn(e,a){if(1&e&&(n.qex(0,60),n.DNE(1,Gn,1,0,"th",58),n.DNE(2,Sn,2,1,"td",61),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function Pn(e,a){if(1&e&&(n.qex(0),n.DNE(1,mn,3,1,"ng-container",32),n.DNE(2,hn,3,1,"ng-container",32),n.DNE(3,kn,4,3,"ng-container",32),n.DNE(4,Xn,3,1,"ng-container",33),n.bVm()),2&e){const t=a.$implicit;n.R7$(1),n.Y8G("ngIf","actions"!==t.columnDef&&"scripting"!==t.columnDef&&"health"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","health"===t.columnDef),n.R7$(1),n.Y8G("ngIf","scripting"===t.columnDef),n.R7$(1),n.Y8G("ngIf","actions"===t.columnDef)}}function jn(e,a){1&e&&n.nrm(0,"tr",73)}function Nn(e,a){if(1&e){const t=n.RV6();n.j41(0,"tr",74),n.bIt("click",function(){const l=n.eBV(t).$implicit,_=n.XpG(2);return n.Njj(_.callDefaultAction(l))})("keydown",function(i){const _=n.eBV(t).$implicit,r=n.XpG(2);return n.Njj(r.handleKeyDown(i,_))}),n.k0s()}if(2&e){const t=a.$implicit,o=n.XpG(2);n.AVh("clickable",o.isClickable(t)),n.BMQ("tabindex",o.isClickable(t)?0:-1)}}function On(e,a){if(1&e){const t=n.RV6();n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.j41(3,"button",78),n.bIt("click",function(){n.eBV(t);const i=n.XpG(4);return n.Njj(i.clearFilter())}),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.bVm()}2&e&&(n.R7$(1),n.SpI(" ",n.bMT(2,2,"noFilterResults")," "),n.R7$(3),n.SpI(" ",n.bMT(5,4,"clearFilter")," "))}function Yn(e,a){if(1&e){const t=n.RV6();n.j41(0,"button",84),n.bIt("click",function(){n.eBV(t);const i=n.XpG(6);return n.Njj(i.createRow())}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()}if(2&e){const t=n.XpG(6);n.R7$(1),n.SpI(" ",n.bMT(2,1,t.emptyStateActionLabel||"create")," ")}}function wn(e,a){if(1&e&&(n.j41(0,"div",81)(1,"p",82),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.DNE(4,Yn,3,3,"button",83),n.k0s()),2&e){const t=n.XpG(5);n.R7$(2),n.SpI(" ",n.bMT(3,2,t.emptyStateMessage)," "),n.R7$(2),n.Y8G("ngIf",t.allowCreate)}}function Vn(e,a){if(1&e&&(n.EFF(0),n.nI1(1,"transloco")),2&e){const t=n.XpG(5);n.SpI(" ",n.bMT(1,1,t.allowCreate&&0===t.tableLength?"noEntriesCreate":"noEntries")," ")}}function Bn(e,a){if(1&e&&(n.DNE(0,wn,5,4,"div",79),n.DNE(1,Vn,2,3,"ng-template",null,80,n.C5r)),2&e){const t=n.sdS(2),o=n.XpG(4);n.Y8G("ngIf",o.emptyStateMessage)("ngIfElse",t)}}function Un(e,a){if(1&e&&(n.qex(0),n.DNE(1,On,6,6,"ng-container",47),n.DNE(2,Bn,3,2,"ng-template",null,77,n.C5r),n.bVm()),2&e){const t=n.sdS(3),o=n.XpG(3);n.R7$(1),n.Y8G("ngIf",o.currentFilter.value||(null==o.accessUsage?null:o.accessUsage.filterActive))("ngIfElse",t)}}function zn(e,a){if(1&e&&(n.j41(0,"tr",75)(1,"td",76),n.DNE(2,Un,4,2,"ng-container",4),n.k0s()()),2&e){const t=n.XpG(2);n.R7$(1),n.BMQ("colspan",t.columns.length),n.R7$(1),n.Y8G("ngIf","loading"!==t.tableState&&"error"!==t.tableState)}}function An(e,a){if(1&e){const t=n.RV6();n.qex(0),n.DNE(1,q,1,0,"mat-progress-bar",16),n.DNE(2,nn,10,8,"div",17),n.j41(3,"div",18)(4,"table",19),n.bIt("matSortChange",function(i){n.eBV(t);const l=n.XpG();return n.Njj(l.announceSortChange(i))}),n.DNE(5,Pn,5,4,"ng-container",20),n.DNE(6,jn,1,0,"tr",21),n.DNE(7,Nn,1,3,"tr",22),n.DNE(8,zn,3,2,"tr",23),n.k0s(),n.j41(9,"div",24)(10,"mat-paginator",25),n.bIt("page",function(i){n.eBV(t);const l=n.XpG();return n.Njj(l.changePage(i))}),n.k0s()()(),n.bVm()}if(2&e){const t=a.ngIf,o=n.XpG();n.R7$(1),n.Y8G("ngIf","loading"===o.tableState),n.R7$(1),n.Y8G("ngIf","error"===o.tableState&&o.tableError),n.R7$(1),n.AVh("table-stale","loading"===o.tableState),n.R7$(1),n.Y8G("dataSource",o.dataSource),n.R7$(1),n.Y8G("ngForOf",o.columns),n.R7$(1),n.Y8G("matHeaderRowDef",o.displayedColumns),n.R7$(1),n.Y8G("matRowDefColumns",o.displayedColumns),n.R7$(3),n.Y8G("pageSize",t.currentPageSize)("pageSizeOptions",o.pageSizes)("length",o.tableLength)}}const Ln=[[["","topActions",""]]],Jn=function(e){return{currentPageSize:e}},Qn=["[topActions]"];let T=class R extends w.Py{constructor(a,t,o,i,l,_){super(t,o,i,l,_),this.crudService=a,this.faDownload=u.cbP,this.allowFilter=!1,this.allowCreate=!1,this.columns=[{columnDef:"name",header:"name",cell:r=>r.name},{columnDef:"type",header:"type",cell:r=>"folder"===r.type?"Folder":r.contentType},{columnDef:"actions"}],this.actions={default:{label:"view",function:r=>"file"===r.type?this.router.navigate([X.b.VIEW,r.name],{relativeTo:this._activatedRoute}):this.router.navigate([X.b.ADMIN_SETTINGS,this.type,r.path]),ariaLabel:{key:"view"},disabled:r=>"file"===r.type&&"logs"!==this.type},additional:[{label:"delete",function:r=>this.confirmDelete(r),ariaLabel:{key:"deleteRow",param:"id"},icon:this.faTrashCan},{label:"files.download",icon:u.cbP,function:r=>this.download(r),ariaLabel:{key:"files.download",param:"label"}}]},this.filterQuery=(0,V.J)(),this._activatedRoute.data.subscribe(r=>{this.type=r.type}),this._activatedRoute.paramMap.subscribe(r=>this.path=r.get("entity")||"")}download(a){const t=[],o="folder"===a.type;o&&t.push({key:"zip",value:"true"});const i=`${this.type}/${a.path}`;"application/json"===a.contentType?this.crudService.downloadJson(i).subscribe(l=>{(0,P.ik)(l,a.name,"json")}):this.crudService.downloadFile(i,{additionalParams:t}).subscribe(l=>{l&&(0,P.o6)(l,`${a.name}${o?".zip":""}`)})}mapDataToTable(a){return a.map(t=>({name:t.name,path:t.path,type:t.type,contentType:t.contentType}))}deleteRow(a){this.crudService.legacyDelete(`${this.type}/${a.path}`,{additionalParams:[{key:"force",value:"true"}]}).subscribe(()=>{this.refreshTable(0)})}uploadFile(a){this.crudService.uploadFile(`files/${this.path}`,a,{snackbarSuccess:"files.alerts.uploadSuccess"}).subscribe(()=>{this.refreshTable(0)})}refreshTable(a){const t=decodeURIComponent(this._activatedRoute.snapshot.url.toString());this.crudService.get(`${this.type}/${t}`,{limit:a}).subscribe(o=>{this.dataSource.data=this.mapDataToTable(o.resource)})}static{this.\u0275fac=function(t){return new(t||R)(n.rXU(S.qJ),n.rXU(b.Ix),n.rXU(b.nX),n.rXU(B.Ai),n.rXU(h.JO),n.rXU(f.bZ))}}static{this.\u0275cmp=n.VBU({type:R,selectors:[["df-files-table"]],standalone:!0,features:[n.Vt3,n.aNF],ngContentSelectors:Qn,decls:9,vars:9,consts:[[1,"top-action-bar"],["mat-mini-fab","","class","save-btn","data-testid","manage-table-create","type","button",3,"click",4,"ngIf"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click",4,"ngIf"],[1,"spacer"],[4,"ngIf"],["class","search-input","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["mat-mini-fab","","data-testid","manage-table-create","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click"],["class","df-usage-filter","data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",1,"df-usage-filter"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["appearance","outline","subscriptSizing","dynamic",1,"search-input"],["matInput","",3,"formControl"],["class","table-loading-bar","mode","indeterminate",4,"ngIf"],["class","table-error-panel",4,"ngIf"],[1,"table-container"],["mat-table","","matSort","",3,"dataSource","matSortChange"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"clickable","click","keydown",4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[1,"bottom-action-bar"],["showFirstLastButtons","","aria-label","'selectPage' | transloco",3,"pageSize","pageSizeOptions","length","page"],["mode","indeterminate",1,"table-loading-bar"],[1,"table-error-panel"],[1,"table-error-headline"],["size","lg",3,"icon"],["mat-stroked-button","","type","button",3,"click"],[3,"error"],[3,"matColumnDef",4,"ngIf"],["stickyEnd","",3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","df-eyebrow",3,"df-numeric",4,"matHeaderCellDef"],["mat-cell","",3,"df-numeric",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"df-eyebrow"],["mat-cell",""],["size","lg",3,"icon","class",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt"],["size","lg","class","log-warning",3,"icon",4,"ngIf"],["size","lg",1,"log-warning",3,"icon"],["mat-header-cell","","class","df-eyebrow",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell","",1,"df-eyebrow"],[4,"ngIf","ngIfElse"],["healthyChip",""],["type","button",1,"df-health-chip",3,"matMenuTriggerFor","click"],[3,"variant","label"],["healthMenu","matMenu"],["mat-menu-item","",3,"routerLink","disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"routerLink","disabled","click"],["notDatabase",""],["class","actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions"],["size","lg",3,"icon","click"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-cell",""],["stickyEnd","",3,"matColumnDef"],["class","actions df-row-actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions","df-row-actions"],["multiple",""],["class","action-btn","mat-icon-button","","type","button",3,"click",4,"ngIf","ngIfElse"],["regular",""],["mat-icon-button","","type","button",1,"action-btn",3,"click"],["size","xs",3,"icon"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-icon-button","","aria-label","Actions","type","button",3,"matMenuTriggerFor","click"],["actionsMenu","matMenu"],["type","button","mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["type","button","mat-menu-item","",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click","keydown"],[1,"mat-row","no-data-row"],[1,"mat-cell"],["noFilterActive",""],["mat-button","","color","primary","type","button",3,"click"],["class","empty-state",4,"ngIf","ngIfElse"],["genericEmpty",""],[1,"empty-state"],[1,"empty-state-message"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click"]],template:function(t,o){1&t&&(n.NAR(Ln),n.j41(0,"div",0),n.DNE(1,J,3,4,"button",1),n.DNE(2,Q,3,4,"button",2),n.SdG(3),n.nrm(4,"div",3),n.DNE(5,Z,2,1,"ng-container",4),n.DNE(6,W,5,4,"mat-form-field",5),n.k0s(),n.DNE(7,An,11,11,"ng-container",4),n.nI1(8,"async")),2&t&&(n.R7$(1),n.Y8G("ngIf",o.allowCreate),n.R7$(1),n.Y8G("ngIf",o.schema),n.R7$(3),n.Y8G("ngIf",o.accessUsage),n.R7$(1),n.Y8G("ngIf",o.allowFilter),n.R7$(1),n.Y8G("ngIf",n.eq3(7,Jn,n.bMT(8,5,o.currentPageSize$))))},dependencies:[I.bT,g.Hl,g.$z,g.iY,g.$0,C.dX,C.aY,m.tP,m.Zl,m.tL,m.ji,m.cC,m.YV,m.iL,m.KS,m.$R,m.YZ,m.NB,m.ky,I.Sq,d.Cn,d.kk,d.fb,d.Cp,s.X1,s.me,s.BC,s.l_,h.Kj,I.Jj,f.hM,j.Ou,j.iy,p.RG,p.rl,p.nJ,D.fS,D.fg,k.NQ,k.B4,k.aE,N.PO,N.HM,U.R,z.v,A.Z,O.Ve,O.VO,L.wT,b.Wk],styles:[".df-health-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;margin:0;border:none;background:transparent;font:inherit;color:inherit;cursor:pointer}.active[_ngcontent-%COMP%]{color:var(--df-success)}.inactive[_ngcontent-%COMP%], .log-warning[_ngcontent-%COMP%]{color:var(--df-danger)}.top-action-bar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--df-space-3);padding-bottom:var(--df-space-3)}.top-action-bar[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{height:80%!important;max-width:300px!important}.top-action-bar[_ngcontent-%COMP%] .df-usage-filter[_ngcontent-%COMP%]{width:160px}.bottom-action-bar[_ngcontent-%COMP%]{margin-top:var(--df-space-4);display:flex;flex-direction:row;justify-content:center}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto}.table-container.table-stale[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.table-loading-bar[_ngcontent-%COMP%]{margin-bottom:2px}.table-error-panel[_ngcontent-%COMP%]{margin-bottom:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm);background-color:var(--df-danger-soft);color:var(--df-text)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);margin-bottom:var(--df-space-2)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:1.4rem}.no-data-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--df-space-4);padding:var(--df-space-4);text-align:center}.empty-state[_ngcontent-%COMP%] .empty-state-message[_ngcontent-%COMP%]{margin:0;max-width:46rem;color:var(--df-text-muted);font-size:1.4rem;line-height:1.5}.mat-mdc-row[_ngcontent-%COMP%]{height:var(--df-row-height)!important}.mat-mdc-cell[_ngcontent-%COMP%], .mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border-2)}.mat-mdc-cell.df-numeric[_ngcontent-%COMP%], .mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%]{text-align:right}.mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{justify-content:flex-end}.df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0;transition:opacity var(--df-duration-fast) var(--df-ease-standard)}.mat-mdc-row[_ngcontent-%COMP%]:hover .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .mat-mdc-row[_ngcontent-%COMP%]:focus-within .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{opacity:1}.clickable.mat-mdc-row[_ngcontent-%COMP%]{outline:0}.clickable.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{cursor:pointer}.clickable.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-hover)}.clickable.mat-mdc-row[_ngcontent-%COMP%]:focus .mat-mdc-cell[_ngcontent-%COMP%], .clickable.mat-mdc-row[_ngcontent-%COMP%]:focus-within .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)} [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{border-bottom:unset!important}"]})}};T=(0,F.Cg)([(0,v.d)({checkProperties:!0})],T);let x=class y{constructor(a,t,o,i){this.crudService=a,this.data=t,this.fb=o,this.dialogRef=i,this.dialogForm=this.fb.group({name:["",s.k0.required]})}save(){this.dialogForm.valid&&this.crudService.create({resource:[]},{additionalHeaders:[{key:"X-Folder-Name",value:this.dialogForm.value.name}],snackbarSuccess:"files.alerts.createFolderSuccess"},this.data.route).subscribe(()=>{this.dialogRef.close({refreshData:!0})})}static{this.\u0275fac=function(t){return new(t||y)(n.rXU(S.LR),n.rXU(f.Vh),n.rXU(s.ok),n.rXU(f.CP))}}static{this.\u0275cmp=n.VBU({type:y,selectors:[["df-folder-dialog-component"]],standalone:!0,features:[n.aNF],decls:17,vars:13,consts:[["mat-dialog-title",""],["mat-dialog-content",""],[1,"files-dialog-form","details-section",3,"formGroup","ngSubmit"],["subscriptSizing","dynamic"],["matInput","","formControlName","name"],["mat-dialog-actions",""],["mat-flat-button","","type","button","mat-dialog-close","",1,"cancel-btn"],["mat-flat-button","",1,"save-btn",3,"click"]],template:function(t,o){1&t&&(n.j41(0,"h1",0),n.EFF(1),n.nI1(2,"transloco"),n.k0s(),n.j41(3,"div",1)(4,"form",2),n.bIt("ngSubmit",function(){return o.save()}),n.j41(5,"mat-form-field",3)(6,"mat-label"),n.EFF(7),n.nI1(8,"transloco"),n.k0s(),n.nrm(9,"input",4),n.k0s()()(),n.j41(10,"div",5)(11,"button",6),n.EFF(12),n.nI1(13,"transloco"),n.k0s(),n.j41(14,"button",7),n.bIt("click",function(){return o.save()}),n.EFF(15),n.nI1(16,"transloco"),n.k0s()()),2&t&&(n.R7$(1),n.JRh(n.bMT(2,5,"files.createFolder")),n.R7$(3),n.Y8G("formGroup",o.dialogForm),n.R7$(3),n.JRh(n.bMT(8,7,"files.folderName")),n.R7$(5),n.SpI(" ",n.bMT(13,9,"cancel")," "),n.R7$(3),n.SpI(" ",n.bMT(16,11,"save")," "))},dependencies:[f.hM,f.tx,f.BI,f.Yi,f.E7,g.Hl,g.$z,p.RG,p.rl,p.nJ,D.fS,D.fg,h.Kj,s.X1,s.qT,s.me,s.BC,s.cb,s.j4,s.JD],encapsulation:2})}};x=(0,F.Cg)([(0,v.d)({checkProperties:!0})],x);var Hn=c(52868);let $=class M{constructor(a,t,o){this.activatedRoute=a,this.dialog=t,this.themeService=o,this.faUpload=u.JmV,this.faFolderPlus=u.E5r,this.currentRoute="",this.isDarkMode=this.themeService.darkMode$}uploadFile(a){const t=a.target;t.files&&(this.filesTable.uploadFile(t.files),this.filesTable.refreshTable())}createFolder(){this.dialog.open(x,{data:{route:decodeURIComponent(this.activatedRoute.snapshot.url.toString())}}).afterClosed().subscribe(t=>{t&&t.refreshData&&this.filesTable.refreshTable()})}static{this.\u0275fac=function(t){return new(t||M)(n.rXU(b.nX),n.rXU(f.bZ),n.rXU(Hn.n))}}static{this.\u0275cmp=n.VBU({type:M,selectors:[["df-files"]],viewQuery:function(t,o){if(1&t&&n.GBs(T,5),2&t){let i;n.mGM(i=n.lsd())&&(o.filesTable=i.first)}},standalone:!0,features:[n.aNF],decls:10,vars:8,consts:[["topActions",""],["mat-mini-fab","","color","primary",1,"save-btn",3,"click"],["size","xl",3,"icon"],["type","file","multiple","",2,"display","none",3,"change"],["fileInput",""]],template:function(t,o){if(1&t){const i=n.RV6();n.j41(0,"df-files-table"),n.qex(1,0),n.j41(2,"button",1),n.bIt("click",function(){return o.createFolder()}),n.nI1(3,"transloco"),n.nrm(4,"fa-icon",2),n.k0s(),n.j41(5,"button",1),n.bIt("click",function(){n.eBV(i);const _=n.sdS(9);return n.Njj(_.click())}),n.nI1(6,"transloco"),n.nrm(7,"fa-icon",2),n.k0s(),n.j41(8,"input",3,4),n.bIt("change",function(_){return o.uploadFile(_)}),n.k0s(),n.bVm(),n.k0s()}2&t&&(n.R7$(2),n.BMQ("aria-label",n.bMT(3,4,"files.createFolder")),n.R7$(2),n.Y8G("icon",o.faFolderPlus),n.R7$(1),n.BMQ("aria-label",n.bMT(6,6,"importList")),n.R7$(2),n.Y8G("icon",o.faUpload))},dependencies:[T,h.Kj,C.dX,C.aY,g.Hl,g.$0,d.Cn,f.hM]})}};$=(0,F.Cg)([(0,v.d)({checkProperties:!0})],$)}}]); \ No newline at end of file diff --git a/dist/2830.698a04802c74bfc5.js b/dist/2830.698a04802c74bfc5.js new file mode 100644 index 00000000..5bf9760f --- /dev/null +++ b/dist/2830.698a04802c74bfc5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2830],{72830:(Vn,C,c)=>{c.r(C),c.d(C,{DfManageTablesTableComponent:()=>D});var v=c(31635),k=c(62031),$=c(24784),y=c(55590),N=c(49894),n=c(17705),p=c(95245),X=c(18617),E=c(33609),h=c(75351),b=c(60177),g=c(88834),I=c(20060),l=c(9159),m=c(59115),f=c(89417),x=c(96695),d=c(32102),P=c(99631),u=c(2042),G=c(67575),F=c(84665),j=c(56583),S=c(71359),R=c(82798),Y=c(86600);function w(e,_){if(1&e){const t=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){n.eBV(t);const o=n.XpG();return n.Njj(o.createRow())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"newEntry")),n.R7$(2),n.Y8G("icon",t.faPlus)}}function B(e,_){if(1&e){const t=n.RV6();n.j41(0,"button",8),n.bIt("click",function(){n.eBV(t);const o=n.XpG();return n.Njj(o.refreshSchema())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"importList")),n.R7$(2),n.Y8G("icon",t.faRefresh)}}function V(e,_){if(1&e&&(n.j41(0,"mat-option",13),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=_.$implicit;n.Y8G("value",t.value),n.R7$(1),n.SpI(" ",n.bMT(2,2,t.label)," ")}}function A(e,_){if(1&e&&(n.j41(0,"mat-form-field",10)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"mat-select",11),n.DNE(5,V,3,4,"mat-option",12),n.k0s()()),2&e){const t=n.XpG().ngIf;n.R7$(2),n.JRh(n.bMT(3,3,"accessUsage.filter.label")),n.R7$(2),n.Y8G("formControl",t.filter),n.R7$(1),n.Y8G("ngForOf",t.filterOptions)}}function U(e,_){if(1&e&&(n.qex(0),n.DNE(1,A,6,5,"mat-form-field",9),n.bVm()),2&e){const t=_.ngIf;n.R7$(1),n.Y8G("ngIf",t.available)}}function L(e,_){if(1&e&&(n.j41(0,"mat-form-field",14)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"input",15),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"search")),n.R7$(2),n.Y8G("formControl",t.currentFilter)}}function K(e,_){1&e&&n.nrm(0,"mat-progress-bar",26)}function W(e,_){if(1&e){const t=n.RV6();n.j41(0,"div",27)(1,"div",28),n.nrm(2,"fa-icon",29),n.j41(3,"span"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.j41(6,"button",30),n.bIt("click",function(){n.eBV(t);const o=n.XpG(2);return n.Njj(o.retryLastFetch())}),n.EFF(7),n.nI1(8,"transloco"),n.k0s()(),n.nrm(9,"df-error-detail",31),n.k0s()}if(2&e){const t=n.XpG(2);n.R7$(2),n.Y8G("icon",t.faTriangleExclamation),n.R7$(2),n.JRh(n.bMT(5,4,t.tableError.message)),n.R7$(3),n.SpI(" ",n.bMT(8,6,"retry")," "),n.R7$(2),n.Y8G("error",t.tableError)}}function z(e,_){if(1&e&&(n.j41(0,"th",37),n.nI1(1,"async"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.BMQ("sortActionDescription",n.bMT(1,4,a.sortDescription(t.header))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.header)," ")}}function H(e,_){if(1&e&&n.nrm(0,"fa-icon",29),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit,o=n.XpG(2);n.HbH(o.isCellActive(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",o.activeIcon(o.isCellActive(null==a?null:a.cell(t))))}}function Q(e,_){if(1&e&&(n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,null!=a&&a.cell(t)?"confirmed":"pending")," ")}}function J(e,_){if(1&e&&(n.qex(0),n.EFF(1),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",null==a?null:a.cell(t)," ")}}function Z(e,_){if(1&e&&n.nrm(0,"df-access-usage-cell",41),2&e){const t=n.XpG().$implicit,a=n.XpG(4);let o,i;n.Y8G("usage",null==a.accessUsage?null:a.accessUsage.get(t.id))("staleDays",null!==(o=null==a.accessUsage?null:a.accessUsage.staleDays)&&void 0!==o?o:null)("trackingStartedAt",null!==(i=null==a.accessUsage?null:a.accessUsage.trackingStartedAt)&&void 0!==i?i:null)}}function q(e,_){if(1&e&&n.nrm(0,"fa-icon",43),2&e){const t=n.XpG(6);n.Y8G("icon",t.faTriangleExclamation)}}function nn(e,_){1&e&&(n.j41(0,"span"),n.EFF(1),n.k0s()),2&e&&(n.R7$(1),n.JRh("-"))}function tn(e,_){if(1&e&&(n.qex(0),n.DNE(1,q,1,1,"fa-icon",42),n.DNE(2,nn,2,1,"span",4),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.Y8G("ngIf",!(null==a||!a.cell(t))),n.R7$(1),n.Y8G("ngIf",!(null!=a&&a.cell(t)))}}function en(e,_){if(1&e&&(n.j41(0,"td",38),n.DNE(1,H,1,3,"fa-icon",39),n.DNE(2,Q,3,3,"ng-container",4),n.DNE(3,J,2,1,"ng-container",4),n.DNE(4,Z,1,3,"df-access-usage-cell",40),n.DNE(5,tn,3,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.R7$(1),n.Y8G("ngIf","active"===t.columnDef),n.R7$(1),n.Y8G("ngIf","registration"===t.columnDef),n.R7$(1),n.Y8G("ngIf","active"!==t.columnDef&&"registration"!==t.columnDef&&"log"!==t.columnDef&&"lastUsed"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","lastUsed"===t.columnDef),n.R7$(1),n.Y8G("ngIf","log"===t.columnDef)}}function an(e,_){if(1&e&&(n.qex(0,34),n.DNE(1,z,4,8,"th",35),n.DNE(2,en,6,7,"td",36),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function _n(e,_){if(1&e&&(n.j41(0,"th",46),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,t.header)," ")}}function on(e,_){if(1&e&&(n.j41(0,"a",53),n.bIt("click",function(a){return a.stopPropagation()}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=_.$implicit;n.Y8G("routerLink",t.fix)("disabled",!t.fix),n.R7$(1),n.SpI(" ",n.bMT(2,3,"services.health.rules."+t.id)," ")}}function cn(e,_){if(1&e&&(n.qex(0),n.j41(1,"button",49),n.bIt("click",function(a){return a.stopPropagation()}),n.nI1(2,"transloco"),n.nrm(3,"df-badge",50),n.nI1(4,"transloco"),n.k0s(),n.j41(5,"mat-menu",null,51),n.DNE(7,on,3,5,"a",52),n.k0s(),n.bVm()),2&e){const t=n.sdS(6),a=n.XpG().ngIf;n.R7$(1),n.Y8G("matMenuTriggerFor",t),n.BMQ("aria-label",n.bMT(2,5,"services.health.whyAria")),n.R7$(2),n.Y8G("variant",a.level)("label",n.bMT(4,7,"services.health.level."+a.level)),n.R7$(4),n.Y8G("ngForOf",a.rules)}}function ln(e,_){if(1&e&&(n.nrm(0,"df-badge",50),n.nI1(1,"transloco")),2&e){const t=n.XpG(2).$implicit;n.Y8G("variant","ok"===t.probe?"success":"neutral")("label",n.bMT(1,2,"ok"===t.probe?"services.health.level.success":"unsupported"===t.probe?"services.health.chip.notChecked":"services.health.chip.checking"))}}function rn(e,_){if(1&e&&(n.qex(0),n.DNE(1,cn,8,9,"ng-container",47),n.DNE(2,ln,2,4,"ng-template",null,48,n.C5r),n.bVm()),2&e){const t=_.ngIf,a=n.sdS(3);n.R7$(1),n.Y8G("ngIf",t.rules.length)("ngIfElse",a)}}function sn(e,_){if(1&e&&(n.j41(0,"td",38),n.DNE(1,rn,4,2,"ng-container",4),n.k0s()),2&e){const t=_.$implicit;n.R7$(1),n.Y8G("ngIf",t.health)}}function gn(e,_){if(1&e&&(n.qex(0,34),n.DNE(1,_n,3,3,"th",44),n.DNE(2,sn,2,1,"td",45),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function mn(e,_){1&e&&(n.j41(0,"th",46),n.EFF(1," Scripting "),n.k0s())}function fn(e,_){if(1&e){const t=n.RV6();n.j41(0,"td",56)(1,"fa-icon",57),n.bIt("click",function(){const i=n.eBV(t).$implicit,r=n.XpG(3).$implicit,s=n.XpG(2);let O;return n.Njj(s.goEventScriptsPage((null==r||null==(O=r.cell(i))?null:O.toString())||""))})("click",function(o){return o.stopPropagation()}),n.k0s()()}if(2&e){const t=_.$implicit,a=n.XpG(3).$implicit,o=n.XpG(2);n.R7$(1),n.HbH("not"!==(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",o.activeIcon("not"!==(null==a?null:a.cell(t))))}}function pn(e,_){1&e&&(n.qex(0),n.DNE(1,mn,2,0,"th",44),n.DNE(2,fn,2,3,"td",55),n.bVm())}function bn(e,_){1&e&&n.nrm(0,"th",59)}function dn(e,_){1&e&&n.nrm(0,"td",56)}function un(e,_){1&e&&(n.DNE(0,bn,1,0,"th",58),n.DNE(1,dn,1,0,"td",55))}function Tn(e,_){if(1&e&&(n.qex(0,34),n.DNE(1,pn,3,0,"ng-container",47),n.DNE(2,un,2,0,"ng-template",null,54,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG().$implicit,o=n.XpG(2);n.Y8G("matColumnDef",a.columnDef),n.R7$(1),n.Y8G("ngIf",o.isDatabase)("ngIfElse",t)}}function Dn(e,_){1&e&&n.nrm(0,"th",59)}c(36225);const T=function(e){return{param:e}};function Mn(e,_){if(1&e){const t=n.RV6();n.j41(0,"button",66),n.bIt("click",function(){n.eBV(t);const o=n.XpG(3).$implicit,i=n.XpG(4);return n.Njj(i.actions.additional[0].function(o))})("click",function(o){return o.stopPropagation()}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",67),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(5,T,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.Y8G("icon",t.actions.additional[0].icon)}}function Cn(e,_){if(1&e){const t=n.RV6();n.j41(0,"button",68),n.bIt("click",function(){n.eBV(t);const o=n.XpG(3).$implicit,i=n.XpG(4);return n.Njj(i.actions.additional[0].function(o))})("click",function(o){return o.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(7,T,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,5,t.actions.additional[0].label)," ")}}function En(e,_){if(1&e&&(n.qex(0),n.DNE(1,Mn,3,7,"button",64),n.DNE(2,Cn,4,9,"ng-template",null,65,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(6);n.R7$(1),n.Y8G("ngIf",a.actions.additional[0].icon)("ngIfElse",t)}}function hn(e,_){if(1&e){const t=n.RV6();n.j41(0,"button",72),n.bIt("click",function(){const i=n.eBV(t).$implicit,r=n.XpG(3).$implicit;return n.Njj(i.function(r))}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=_.$implicit,a=n.XpG(3).$implicit,o=n.XpG(4);n.Y8G("disabled",o.isActionDisabled(t,a)),n.BMQ("aria-label",n.i5U(1,3,t.ariaLabel.key,n.eq3(8,T,t.ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.label)," ")}}function In(e,_){if(1&e&&(n.j41(0,"button",69),n.bIt("click",function(a){return a.stopPropagation()}),n.nrm(1,"fa-icon",67),n.k0s(),n.j41(2,"mat-menu",null,70),n.DNE(4,hn,4,10,"button",71),n.k0s()),2&e){const t=n.sdS(3),a=n.XpG(6);n.Y8G("matMenuTriggerFor",t),n.R7$(1),n.Y8G("icon",a.faEllipsisV),n.R7$(3),n.Y8G("ngForOf",a.actions.additional)}}function xn(e,_){if(1&e&&(n.qex(0),n.DNE(1,En,4,2,"ng-container",47),n.DNE(2,In,5,3,"ng-template",null,63,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(5);n.R7$(1),n.Y8G("ngIf",1===a.actions.additional.length)("ngIfElse",t)}}function Pn(e,_){if(1&e&&(n.j41(0,"td",62),n.DNE(1,xn,4,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(4);n.R7$(1),n.Y8G("ngIf",t.actions.additional&&t.actions.additional.length>0)}}function Gn(e,_){if(1&e&&(n.qex(0,60),n.DNE(1,Dn,1,0,"th",58),n.DNE(2,Pn,2,1,"td",61),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function Rn(e,_){if(1&e&&(n.qex(0),n.DNE(1,an,3,1,"ng-container",32),n.DNE(2,gn,3,1,"ng-container",32),n.DNE(3,Tn,4,3,"ng-container",32),n.DNE(4,Gn,3,1,"ng-container",33),n.bVm()),2&e){const t=_.$implicit;n.R7$(1),n.Y8G("ngIf","actions"!==t.columnDef&&"scripting"!==t.columnDef&&"health"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","health"===t.columnDef),n.R7$(1),n.Y8G("ngIf","scripting"===t.columnDef),n.R7$(1),n.Y8G("ngIf","actions"===t.columnDef)}}function On(e,_){1&e&&n.nrm(0,"tr",73)}function vn(e,_){if(1&e){const t=n.RV6();n.j41(0,"tr",74),n.bIt("click",function(){const i=n.eBV(t).$implicit,r=n.XpG(2);return n.Njj(r.callDefaultAction(i))})("keydown",function(o){const r=n.eBV(t).$implicit,s=n.XpG(2);return n.Njj(s.handleKeyDown(o,r))}),n.k0s()}if(2&e){const t=_.$implicit,a=n.XpG(2);n.AVh("clickable",a.isClickable(t)),n.BMQ("tabindex",a.isClickable(t)?0:-1)}}function kn(e,_){if(1&e){const t=n.RV6();n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.j41(3,"button",78),n.bIt("click",function(){n.eBV(t);const o=n.XpG(4);return n.Njj(o.clearFilter())}),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.bVm()}2&e&&(n.R7$(1),n.SpI(" ",n.bMT(2,2,"noFilterResults")," "),n.R7$(3),n.SpI(" ",n.bMT(5,4,"clearFilter")," "))}function $n(e,_){if(1&e){const t=n.RV6();n.j41(0,"button",84),n.bIt("click",function(){n.eBV(t);const o=n.XpG(6);return n.Njj(o.createRow())}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()}if(2&e){const t=n.XpG(6);n.R7$(1),n.SpI(" ",n.bMT(2,1,t.emptyStateActionLabel||"create")," ")}}function yn(e,_){if(1&e&&(n.j41(0,"div",81)(1,"p",82),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.DNE(4,$n,3,3,"button",83),n.k0s()),2&e){const t=n.XpG(5);n.R7$(2),n.SpI(" ",n.bMT(3,2,t.emptyStateMessage)," "),n.R7$(2),n.Y8G("ngIf",t.allowCreate)}}function Nn(e,_){if(1&e&&(n.EFF(0),n.nI1(1,"transloco")),2&e){const t=n.XpG(5);n.SpI(" ",n.bMT(1,1,t.allowCreate&&0===t.tableLength?"noEntriesCreate":"noEntries")," ")}}function Xn(e,_){if(1&e&&(n.DNE(0,yn,5,4,"div",79),n.DNE(1,Nn,2,3,"ng-template",null,80,n.C5r)),2&e){const t=n.sdS(2),a=n.XpG(4);n.Y8G("ngIf",a.emptyStateMessage)("ngIfElse",t)}}function Fn(e,_){if(1&e&&(n.qex(0),n.DNE(1,kn,6,6,"ng-container",47),n.DNE(2,Xn,3,2,"ng-template",null,77,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(3);n.R7$(1),n.Y8G("ngIf",a.currentFilter.value||(null==a.accessUsage?null:a.accessUsage.filterActive))("ngIfElse",t)}}function jn(e,_){if(1&e&&(n.j41(0,"tr",75)(1,"td",76),n.DNE(2,Fn,4,2,"ng-container",4),n.k0s()()),2&e){const t=n.XpG(2);n.R7$(1),n.BMQ("colspan",t.columns.length),n.R7$(1),n.Y8G("ngIf","loading"!==t.tableState&&"error"!==t.tableState)}}function Sn(e,_){if(1&e){const t=n.RV6();n.qex(0),n.DNE(1,K,1,0,"mat-progress-bar",16),n.DNE(2,W,10,8,"div",17),n.j41(3,"div",18)(4,"table",19),n.bIt("matSortChange",function(o){n.eBV(t);const i=n.XpG();return n.Njj(i.announceSortChange(o))}),n.DNE(5,Rn,5,4,"ng-container",20),n.DNE(6,On,1,0,"tr",21),n.DNE(7,vn,1,3,"tr",22),n.DNE(8,jn,3,2,"tr",23),n.k0s(),n.j41(9,"div",24)(10,"mat-paginator",25),n.bIt("page",function(o){n.eBV(t);const i=n.XpG();return n.Njj(i.changePage(o))}),n.k0s()()(),n.bVm()}if(2&e){const t=_.ngIf,a=n.XpG();n.R7$(1),n.Y8G("ngIf","loading"===a.tableState),n.R7$(1),n.Y8G("ngIf","error"===a.tableState&&a.tableError),n.R7$(1),n.AVh("table-stale","loading"===a.tableState),n.R7$(1),n.Y8G("dataSource",a.dataSource),n.R7$(1),n.Y8G("ngForOf",a.columns),n.R7$(1),n.Y8G("matHeaderRowDef",a.displayedColumns),n.R7$(1),n.Y8G("matRowDefColumns",a.displayedColumns),n.R7$(3),n.Y8G("pageSize",t.currentPageSize)("pageSizeOptions",a.pageSizes)("length",a.tableLength)}}const Yn=[[["","topActions",""]]],wn=function(e){return{currentPageSize:e}},Bn=["[topActions]"];let D=class M extends k.Py{constructor(_,t,a,o,i,r){super(t,a,o,i,r),this.service=_,this.allowFilter=!1,this.columns=[{columnDef:"tableName",cell:s=>s.label,header:"schema.tableName"},{columnDef:"actions"}],this.filterQuery=(0,y.J)()}deleteRow(_){const t=this._activatedRoute.snapshot.paramMap.get("name");this.service.delete(`${t}/_schema/${_.id}`).subscribe(()=>{this.refreshTable()})}mapDataToTable(_){return _.map(t=>({label:t.label,name:t.name,id:t.name}))}refreshTable(_,t,a,o){const i=this._activatedRoute.snapshot.paramMap.get("name");this.service.get(`${i}/_schema`,{fields:["name","label"].join(","),refresh:o,limit:_,offset:t,filter:a}).subscribe(r=>{this.dataSource.data=this.mapDataToTable(r.resource)})}static{this.\u0275fac=function(t){return new(t||M)(n.rXU($.qJ),n.rXU(p.Ix),n.rXU(p.nX),n.rXU(X.Ai),n.rXU(E.JO),n.rXU(h.bZ))}}static{this.\u0275cmp=n.VBU({type:M,selectors:[["df-manage-tables-table"]],standalone:!0,features:[n.Vt3,n.aNF],ngContentSelectors:Bn,decls:9,vars:9,consts:[[1,"top-action-bar"],["mat-mini-fab","","class","save-btn","data-testid","manage-table-create","type","button",3,"click",4,"ngIf"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click",4,"ngIf"],[1,"spacer"],[4,"ngIf"],["class","search-input","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["mat-mini-fab","","data-testid","manage-table-create","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click"],["class","df-usage-filter","data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",1,"df-usage-filter"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["appearance","outline","subscriptSizing","dynamic",1,"search-input"],["matInput","",3,"formControl"],["class","table-loading-bar","mode","indeterminate",4,"ngIf"],["class","table-error-panel",4,"ngIf"],[1,"table-container"],["mat-table","","matSort","",3,"dataSource","matSortChange"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"clickable","click","keydown",4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[1,"bottom-action-bar"],["showFirstLastButtons","","aria-label","'selectPage' | transloco",3,"pageSize","pageSizeOptions","length","page"],["mode","indeterminate",1,"table-loading-bar"],[1,"table-error-panel"],[1,"table-error-headline"],["size","lg",3,"icon"],["mat-stroked-button","","type","button",3,"click"],[3,"error"],[3,"matColumnDef",4,"ngIf"],["stickyEnd","",3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","df-eyebrow",3,"df-numeric",4,"matHeaderCellDef"],["mat-cell","",3,"df-numeric",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"df-eyebrow"],["mat-cell",""],["size","lg",3,"icon","class",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt"],["size","lg","class","log-warning",3,"icon",4,"ngIf"],["size","lg",1,"log-warning",3,"icon"],["mat-header-cell","","class","df-eyebrow",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell","",1,"df-eyebrow"],[4,"ngIf","ngIfElse"],["healthyChip",""],["type","button",1,"df-health-chip",3,"matMenuTriggerFor","click"],[3,"variant","label"],["healthMenu","matMenu"],["mat-menu-item","",3,"routerLink","disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"routerLink","disabled","click"],["notDatabase",""],["class","actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions"],["size","lg",3,"icon","click"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-cell",""],["stickyEnd","",3,"matColumnDef"],["class","actions df-row-actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions","df-row-actions"],["multiple",""],["class","action-btn","mat-icon-button","","type","button",3,"click",4,"ngIf","ngIfElse"],["regular",""],["mat-icon-button","","type","button",1,"action-btn",3,"click"],["size","xs",3,"icon"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-icon-button","","aria-label","Actions","type","button",3,"matMenuTriggerFor","click"],["actionsMenu","matMenu"],["type","button","mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["type","button","mat-menu-item","",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click","keydown"],[1,"mat-row","no-data-row"],[1,"mat-cell"],["noFilterActive",""],["mat-button","","color","primary","type","button",3,"click"],["class","empty-state",4,"ngIf","ngIfElse"],["genericEmpty",""],[1,"empty-state"],[1,"empty-state-message"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click"]],template:function(t,a){1&t&&(n.NAR(Yn),n.j41(0,"div",0),n.DNE(1,w,3,4,"button",1),n.DNE(2,B,3,4,"button",2),n.SdG(3),n.nrm(4,"div",3),n.DNE(5,U,2,1,"ng-container",4),n.DNE(6,L,5,4,"mat-form-field",5),n.k0s(),n.DNE(7,Sn,11,11,"ng-container",4),n.nI1(8,"async")),2&t&&(n.R7$(1),n.Y8G("ngIf",a.allowCreate),n.R7$(1),n.Y8G("ngIf",a.schema),n.R7$(3),n.Y8G("ngIf",a.accessUsage),n.R7$(1),n.Y8G("ngIf",a.allowFilter),n.R7$(1),n.Y8G("ngIf",n.eq3(7,wn,n.bMT(8,5,a.currentPageSize$))))},dependencies:[b.bT,g.Hl,g.$z,g.iY,g.$0,I.dX,I.aY,l.tP,l.Zl,l.tL,l.ji,l.cC,l.YV,l.iL,l.KS,l.$R,l.YZ,l.NB,l.ky,b.Sq,m.Cn,m.kk,m.fb,m.Cp,f.X1,f.me,f.BC,f.l_,E.Kj,b.Jj,h.hM,x.Ou,x.iy,d.RG,d.rl,d.nJ,P.fS,P.fg,u.NQ,u.B4,u.aE,G.PO,G.HM,F.R,j.v,S.Z,R.Ve,R.VO,Y.wT,p.Wk],styles:[".df-health-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;margin:0;border:none;background:transparent;font:inherit;color:inherit;cursor:pointer}.active[_ngcontent-%COMP%]{color:var(--df-success)}.inactive[_ngcontent-%COMP%], .log-warning[_ngcontent-%COMP%]{color:var(--df-danger)}.top-action-bar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--df-space-3);padding-bottom:var(--df-space-3)}.top-action-bar[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{height:80%!important;max-width:300px!important}.top-action-bar[_ngcontent-%COMP%] .df-usage-filter[_ngcontent-%COMP%]{width:160px}.bottom-action-bar[_ngcontent-%COMP%]{margin-top:var(--df-space-4);display:flex;flex-direction:row;justify-content:center}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto}.table-container.table-stale[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.table-loading-bar[_ngcontent-%COMP%]{margin-bottom:2px}.table-error-panel[_ngcontent-%COMP%]{margin-bottom:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm);background-color:var(--df-danger-soft);color:var(--df-text)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);margin-bottom:var(--df-space-2)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:1.4rem}.no-data-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--df-space-4);padding:var(--df-space-4);text-align:center}.empty-state[_ngcontent-%COMP%] .empty-state-message[_ngcontent-%COMP%]{margin:0;max-width:46rem;color:var(--df-text-muted);font-size:1.4rem;line-height:1.5}.mat-mdc-row[_ngcontent-%COMP%]{height:var(--df-row-height)!important}.mat-mdc-cell[_ngcontent-%COMP%], .mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border-2)}.mat-mdc-cell.df-numeric[_ngcontent-%COMP%], .mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%]{text-align:right}.mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{justify-content:flex-end}.df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0;transition:opacity var(--df-duration-fast) var(--df-ease-standard)}.mat-mdc-row[_ngcontent-%COMP%]:hover .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .mat-mdc-row[_ngcontent-%COMP%]:focus-within .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{opacity:1}.clickable.mat-mdc-row[_ngcontent-%COMP%]{outline:0}.clickable.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{cursor:pointer}.clickable.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-hover)}.clickable.mat-mdc-row[_ngcontent-%COMP%]:focus .mat-mdc-cell[_ngcontent-%COMP%], .clickable.mat-mdc-row[_ngcontent-%COMP%]:focus-within .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)} [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{border-bottom:unset!important}"]})}};D=(0,v.Cg)([(0,N.d)({checkProperties:!0})],D)}}]); \ No newline at end of file diff --git a/dist/2841.5fba958ef939fbc2.js b/dist/2841.5fba958ef939fbc2.js new file mode 100644 index 00000000..cfaf1e79 --- /dev/null +++ b/dist/2841.5fba958ef939fbc2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2841],{32841:(zn,k,c)=>{c.r(k),c.d(k,{DfManageLimitsComponent:()=>G});var L=c(31635),p=c(62031),$=c(24784),w=c(55590),R=c(49894),n=c(17705),d=c(95245),O=c(18617),T=c(33609),E=c(75351),u=c(60177),m=c(88834),b=c(20060),l=c(9159),g=c(59115),C=c(89417),N=c(96695),h=c(32102),X=c(99631),M=c(2042),P=c(67575),S=c(82798),j=c(86600);function Y(e,i){if(1&e){const t=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){n.eBV(t);const o=n.XpG();return n.Njj(o.createRow())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"newEntry")),n.R7$(2),n.Y8G("icon",t.faPlus)}}function F(e,i){if(1&e){const t=n.RV6();n.j41(0,"button",8),n.bIt("click",function(){n.eBV(t);const o=n.XpG();return n.Njj(o.refreshSchema())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"importList")),n.R7$(2),n.Y8G("icon",t.faRefresh)}}function V(e,i){if(1&e&&(n.j41(0,"mat-option",13),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=i.$implicit;n.Y8G("value",t.value),n.R7$(1),n.SpI(" ",n.bMT(2,2,t.label)," ")}}function B(e,i){if(1&e&&(n.j41(0,"mat-form-field",10)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"mat-select",11),n.DNE(5,V,3,4,"mat-option",12),n.k0s()()),2&e){const t=n.XpG().ngIf;n.R7$(2),n.JRh(n.bMT(3,3,"accessUsage.filter.label")),n.R7$(2),n.Y8G("formControl",t.filter),n.R7$(1),n.Y8G("ngForOf",t.filterOptions)}}function A(e,i){if(1&e&&(n.qex(0),n.DNE(1,B,6,5,"mat-form-field",9),n.bVm()),2&e){const t=i.ngIf;n.R7$(1),n.Y8G("ngIf",t.available)}}function U(e,i){if(1&e&&(n.j41(0,"mat-form-field",14)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"input",15),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"search")),n.R7$(2),n.Y8G("formControl",t.currentFilter)}}function z(e,i){1&e&&n.nrm(0,"mat-progress-bar",26)}function Q(e,i){if(1&e){const t=n.RV6();n.j41(0,"div",27)(1,"div",28),n.nrm(2,"fa-icon",29),n.j41(3,"span"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.j41(6,"button",30),n.bIt("click",function(){n.eBV(t);const o=n.XpG(2);return n.Njj(o.retryLastFetch())}),n.EFF(7),n.nI1(8,"transloco"),n.k0s()(),n.nrm(9,"df-error-detail",31),n.k0s()}if(2&e){const t=n.XpG(2);n.R7$(2),n.Y8G("icon",t.faTriangleExclamation),n.R7$(2),n.JRh(n.bMT(5,4,t.tableError.message)),n.R7$(3),n.SpI(" ",n.bMT(8,6,"retry")," "),n.R7$(2),n.Y8G("error",t.tableError)}}function H(e,i){if(1&e&&(n.j41(0,"th",37),n.nI1(1,"async"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.BMQ("sortActionDescription",n.bMT(1,4,a.sortDescription(t.header))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.header)," ")}}function J(e,i){if(1&e&&n.nrm(0,"fa-icon",29),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit,o=n.XpG(2);n.HbH(o.isCellActive(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",o.activeIcon(o.isCellActive(null==a?null:a.cell(t))))}}function Z(e,i){if(1&e&&(n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,null!=a&&a.cell(t)?"confirmed":"pending")," ")}}function K(e,i){if(1&e&&(n.qex(0),n.EFF(1),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",null==a?null:a.cell(t)," ")}}function W(e,i){if(1&e&&n.nrm(0,"df-access-usage-cell",41),2&e){const t=n.XpG().$implicit,a=n.XpG(4);let o,_;n.Y8G("usage",null==a.accessUsage?null:a.accessUsage.get(t.id))("staleDays",null!==(o=null==a.accessUsage?null:a.accessUsage.staleDays)&&void 0!==o?o:null)("trackingStartedAt",null!==(_=null==a.accessUsage?null:a.accessUsage.trackingStartedAt)&&void 0!==_?_:null)}}function q(e,i){if(1&e&&n.nrm(0,"fa-icon",43),2&e){const t=n.XpG(6);n.Y8G("icon",t.faTriangleExclamation)}}function nn(e,i){1&e&&(n.j41(0,"span"),n.EFF(1),n.k0s()),2&e&&(n.R7$(1),n.JRh("-"))}function tn(e,i){if(1&e&&(n.qex(0),n.DNE(1,q,1,1,"fa-icon",42),n.DNE(2,nn,2,1,"span",4),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.Y8G("ngIf",!(null==a||!a.cell(t))),n.R7$(1),n.Y8G("ngIf",!(null!=a&&a.cell(t)))}}function en(e,i){if(1&e&&(n.j41(0,"td",38),n.DNE(1,J,1,3,"fa-icon",39),n.DNE(2,Z,3,3,"ng-container",4),n.DNE(3,K,2,1,"ng-container",4),n.DNE(4,W,1,3,"df-access-usage-cell",40),n.DNE(5,tn,3,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)),n.R7$(1),n.Y8G("ngIf","active"===t.columnDef),n.R7$(1),n.Y8G("ngIf","registration"===t.columnDef),n.R7$(1),n.Y8G("ngIf","active"!==t.columnDef&&"registration"!==t.columnDef&&"log"!==t.columnDef&&"lastUsed"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","lastUsed"===t.columnDef),n.R7$(1),n.Y8G("ngIf","log"===t.columnDef)}}function an(e,i){if(1&e&&(n.qex(0,34),n.DNE(1,H,4,8,"th",35),n.DNE(2,en,6,7,"td",36),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function on(e,i){if(1&e&&(n.j41(0,"th",46),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,t.header)," ")}}function cn(e,i){if(1&e&&(n.j41(0,"a",53),n.bIt("click",function(a){return a.stopPropagation()}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=i.$implicit;n.Y8G("routerLink",t.fix)("disabled",!t.fix),n.R7$(1),n.SpI(" ",n.bMT(2,3,"services.health.rules."+t.id)," ")}}function _n(e,i){if(1&e&&(n.qex(0),n.j41(1,"button",49),n.bIt("click",function(a){return a.stopPropagation()}),n.nI1(2,"transloco"),n.nrm(3,"df-badge",50),n.nI1(4,"transloco"),n.k0s(),n.j41(5,"mat-menu",null,51),n.DNE(7,cn,3,5,"a",52),n.k0s(),n.bVm()),2&e){const t=n.sdS(6),a=n.XpG().ngIf;n.R7$(1),n.Y8G("matMenuTriggerFor",t),n.BMQ("aria-label",n.bMT(2,5,"services.health.whyAria")),n.R7$(2),n.Y8G("variant",a.level)("label",n.bMT(4,7,"services.health.level."+a.level)),n.R7$(4),n.Y8G("ngForOf",a.rules)}}function rn(e,i){if(1&e&&(n.nrm(0,"df-badge",50),n.nI1(1,"transloco")),2&e){const t=n.XpG(2).$implicit;n.Y8G("variant","ok"===t.probe?"success":"neutral")("label",n.bMT(1,2,"ok"===t.probe?"services.health.level.success":"unsupported"===t.probe?"services.health.chip.notChecked":"services.health.chip.checking"))}}function ln(e,i){if(1&e&&(n.qex(0),n.DNE(1,_n,8,9,"ng-container",47),n.DNE(2,rn,2,4,"ng-template",null,48,n.C5r),n.bVm()),2&e){const t=i.ngIf,a=n.sdS(3);n.R7$(1),n.Y8G("ngIf",t.rules.length)("ngIfElse",a)}}function sn(e,i){if(1&e&&(n.j41(0,"td",38),n.DNE(1,ln,4,2,"ng-container",4),n.k0s()),2&e){const t=i.$implicit;n.R7$(1),n.Y8G("ngIf",t.health)}}function mn(e,i){if(1&e&&(n.qex(0,34),n.DNE(1,on,3,3,"th",44),n.DNE(2,sn,2,1,"td",45),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function gn(e,i){1&e&&(n.j41(0,"th",46),n.EFF(1," Scripting "),n.k0s())}function fn(e,i){if(1&e){const t=n.RV6();n.j41(0,"td",56)(1,"fa-icon",57),n.bIt("click",function(){const _=n.eBV(t).$implicit,s=n.XpG(3).$implicit,f=n.XpG(2);let r;return n.Njj(f.goEventScriptsPage((null==s||null==(r=s.cell(_))?null:r.toString())||""))})("click",function(o){return o.stopPropagation()}),n.k0s()()}if(2&e){const t=i.$implicit,a=n.XpG(3).$implicit,o=n.XpG(2);n.R7$(1),n.HbH("not"!==(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",o.activeIcon("not"!==(null==a?null:a.cell(t))))}}function pn(e,i){1&e&&(n.qex(0),n.DNE(1,gn,2,0,"th",44),n.DNE(2,fn,2,3,"td",55),n.bVm())}function dn(e,i){1&e&&n.nrm(0,"th",59)}function un(e,i){1&e&&n.nrm(0,"td",56)}function bn(e,i){1&e&&(n.DNE(0,dn,1,0,"th",58),n.DNE(1,un,1,0,"td",55))}function Cn(e,i){if(1&e&&(n.qex(0,34),n.DNE(1,pn,3,0,"ng-container",47),n.DNE(2,bn,2,0,"ng-template",null,54,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG().$implicit,o=n.XpG(2);n.Y8G("matColumnDef",a.columnDef),n.R7$(1),n.Y8G("ngIf",o.isDatabase)("ngIfElse",t)}}function Dn(e,i){1&e&&n.nrm(0,"th",59)}c(36225);const x=function(e){return{param:e}};function Tn(e,i){if(1&e){const t=n.RV6();n.j41(0,"button",66),n.bIt("click",function(){n.eBV(t);const o=n.XpG(3).$implicit,_=n.XpG(4);return n.Njj(_.actions.additional[0].function(o))})("click",function(o){return o.stopPropagation()}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",67),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(5,x,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.Y8G("icon",t.actions.additional[0].icon)}}function hn(e,i){if(1&e){const t=n.RV6();n.j41(0,"button",68),n.bIt("click",function(){n.eBV(t);const o=n.XpG(3).$implicit,_=n.XpG(4);return n.Njj(_.actions.additional[0].function(o))})("click",function(o){return o.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(7,x,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,5,t.actions.additional[0].label)," ")}}function Mn(e,i){if(1&e&&(n.qex(0),n.DNE(1,Tn,3,7,"button",64),n.DNE(2,hn,4,9,"ng-template",null,65,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(6);n.R7$(1),n.Y8G("ngIf",a.actions.additional[0].icon)("ngIfElse",t)}}function xn(e,i){if(1&e){const t=n.RV6();n.j41(0,"button",72),n.bIt("click",function(){const _=n.eBV(t).$implicit,s=n.XpG(3).$implicit;return n.Njj(_.function(s))}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=i.$implicit,a=n.XpG(3).$implicit,o=n.XpG(4);n.Y8G("disabled",o.isActionDisabled(t,a)),n.BMQ("aria-label",n.i5U(1,3,t.ariaLabel.key,n.eq3(8,x,t.ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.label)," ")}}function vn(e,i){if(1&e&&(n.j41(0,"button",69),n.bIt("click",function(a){return a.stopPropagation()}),n.nrm(1,"fa-icon",67),n.k0s(),n.j41(2,"mat-menu",null,70),n.DNE(4,xn,4,10,"button",71),n.k0s()),2&e){const t=n.sdS(3),a=n.XpG(6);n.Y8G("matMenuTriggerFor",t),n.R7$(1),n.Y8G("icon",a.faEllipsisV),n.R7$(3),n.Y8G("ngForOf",a.actions.additional)}}function Gn(e,i){if(1&e&&(n.qex(0),n.DNE(1,Mn,4,2,"ng-container",47),n.DNE(2,vn,5,3,"ng-template",null,63,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(5);n.R7$(1),n.Y8G("ngIf",1===a.actions.additional.length)("ngIfElse",t)}}function In(e,i){if(1&e&&(n.j41(0,"td",62),n.DNE(1,Gn,4,2,"ng-container",4),n.k0s()),2&e){const t=n.XpG(4);n.R7$(1),n.Y8G("ngIf",t.actions.additional&&t.actions.additional.length>0)}}function yn(e,i){if(1&e&&(n.qex(0,60),n.DNE(1,Dn,1,0,"th",58),n.DNE(2,In,2,1,"td",61),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function kn(e,i){if(1&e&&(n.qex(0),n.DNE(1,an,3,1,"ng-container",32),n.DNE(2,mn,3,1,"ng-container",32),n.DNE(3,Cn,4,3,"ng-container",32),n.DNE(4,yn,3,1,"ng-container",33),n.bVm()),2&e){const t=i.$implicit;n.R7$(1),n.Y8G("ngIf","actions"!==t.columnDef&&"scripting"!==t.columnDef&&"health"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","health"===t.columnDef),n.R7$(1),n.Y8G("ngIf","scripting"===t.columnDef),n.R7$(1),n.Y8G("ngIf","actions"===t.columnDef)}}function Ln(e,i){1&e&&n.nrm(0,"tr",73)}function $n(e,i){if(1&e){const t=n.RV6();n.j41(0,"tr",74),n.bIt("click",function(){const _=n.eBV(t).$implicit,s=n.XpG(2);return n.Njj(s.callDefaultAction(_))})("keydown",function(o){const s=n.eBV(t).$implicit,f=n.XpG(2);return n.Njj(f.handleKeyDown(o,s))}),n.k0s()}if(2&e){const t=i.$implicit,a=n.XpG(2);n.AVh("clickable",a.isClickable(t)),n.BMQ("tabindex",a.isClickable(t)?0:-1)}}function Rn(e,i){if(1&e){const t=n.RV6();n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.j41(3,"button",78),n.bIt("click",function(){n.eBV(t);const o=n.XpG(4);return n.Njj(o.clearFilter())}),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.bVm()}2&e&&(n.R7$(1),n.SpI(" ",n.bMT(2,2,"noFilterResults")," "),n.R7$(3),n.SpI(" ",n.bMT(5,4,"clearFilter")," "))}function En(e,i){if(1&e){const t=n.RV6();n.j41(0,"button",84),n.bIt("click",function(){n.eBV(t);const o=n.XpG(6);return n.Njj(o.createRow())}),n.EFF(1),n.nI1(2,"transloco"),n.k0s()}if(2&e){const t=n.XpG(6);n.R7$(1),n.SpI(" ",n.bMT(2,1,t.emptyStateActionLabel||"create")," ")}}function Nn(e,i){if(1&e&&(n.j41(0,"div",81)(1,"p",82),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.DNE(4,En,3,3,"button",83),n.k0s()),2&e){const t=n.XpG(5);n.R7$(2),n.SpI(" ",n.bMT(3,2,t.emptyStateMessage)," "),n.R7$(2),n.Y8G("ngIf",t.allowCreate)}}function Xn(e,i){if(1&e&&(n.EFF(0),n.nI1(1,"transloco")),2&e){const t=n.XpG(5);n.SpI(" ",n.bMT(1,1,t.allowCreate&&0===t.tableLength?"noEntriesCreate":"noEntries")," ")}}function Pn(e,i){if(1&e&&(n.DNE(0,Nn,5,4,"div",79),n.DNE(1,Xn,2,3,"ng-template",null,80,n.C5r)),2&e){const t=n.sdS(2),a=n.XpG(4);n.Y8G("ngIf",a.emptyStateMessage)("ngIfElse",t)}}function Sn(e,i){if(1&e&&(n.qex(0),n.DNE(1,Rn,6,6,"ng-container",47),n.DNE(2,Pn,3,2,"ng-template",null,77,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(3);n.R7$(1),n.Y8G("ngIf",a.currentFilter.value||(null==a.accessUsage?null:a.accessUsage.filterActive))("ngIfElse",t)}}function wn(e,i){if(1&e&&(n.j41(0,"tr",75)(1,"td",76),n.DNE(2,Sn,4,2,"ng-container",4),n.k0s()()),2&e){const t=n.XpG(2);n.R7$(1),n.BMQ("colspan",t.columns.length),n.R7$(1),n.Y8G("ngIf","loading"!==t.tableState&&"error"!==t.tableState)}}function On(e,i){if(1&e){const t=n.RV6();n.qex(0),n.DNE(1,z,1,0,"mat-progress-bar",16),n.DNE(2,Q,10,8,"div",17),n.j41(3,"div",18)(4,"table",19),n.bIt("matSortChange",function(o){n.eBV(t);const _=n.XpG();return n.Njj(_.announceSortChange(o))}),n.DNE(5,kn,5,4,"ng-container",20),n.DNE(6,Ln,1,0,"tr",21),n.DNE(7,$n,1,3,"tr",22),n.DNE(8,wn,3,2,"tr",23),n.k0s(),n.j41(9,"div",24)(10,"mat-paginator",25),n.bIt("page",function(o){n.eBV(t);const _=n.XpG();return n.Njj(_.changePage(o))}),n.k0s()()(),n.bVm()}if(2&e){const t=i.ngIf,a=n.XpG();n.R7$(1),n.Y8G("ngIf","loading"===a.tableState),n.R7$(1),n.Y8G("ngIf","error"===a.tableState&&a.tableError),n.R7$(1),n.AVh("table-stale","loading"===a.tableState),n.R7$(1),n.Y8G("dataSource",a.dataSource),n.R7$(1),n.Y8G("ngForOf",a.columns),n.R7$(1),n.Y8G("matHeaderRowDef",a.displayedColumns),n.R7$(1),n.Y8G("matRowDefColumns",a.displayedColumns),n.R7$(3),n.Y8G("pageSize",t.currentPageSize)("pageSizeOptions",a.pageSizes)("length",a.tableLength)}}const jn=[[["","topActions",""]]],Yn=function(e){return{currentPageSize:e}},Fn=["[topActions]"];let D=class I extends p.Py{constructor(i,t,a,o,_,s,f){super(a,o,_,s,f),this.limitService=i,this.limitCacheService=t,this.emptyStateMessage="emptyState.limits.message",this.emptyStateActionLabel="emptyState.limits.action",this.actions={default:this.actions.default,additional:[{label:"limits.refresh",function:r=>{this.refreshRow(r)},ariaLabel:{key:"limits.refresh"}},...this.actions.additional?this.actions.additional:[]]},this.columns=[{columnDef:"active",cell:r=>r.active,header:"active"},{columnDef:"name",cell:r=>r.name,header:"name"},{columnDef:"type",cell:r=>r.limitType,header:"type"},{columnDef:"rate",cell:r=>r.limitRate,header:"rate"},{columnDef:"counter",cell:r=>r.limitCounter,header:"counter"},{columnDef:"user",cell:r=>r.user,header:"user"},{columnDef:"service",cell:r=>r.service,header:"service"},{columnDef:"role",cell:r=>r.role,header:"role"},{columnDef:"actions"}],this.filterQuery=(0,w.J)("limits")}mapDataToTable(i){return i.map(t=>({id:t.id,name:t.name,limitType:t.type,limitRate:`${t.rate} / ${t.period}`,limitCounter:`${t.limitCacheByLimitId[0].attempts} / ${t.limitCacheByLimitId[0].max}`,user:t.userByUserId?.name??t.userByUserId?.email??"-",service:t.serviceByServiceId?.name??"-",role:t.roleByRoleId?.name??"-",active:t.isActive}))}refreshRow(i){this.limitCacheService.delete(i.id).subscribe(()=>this.refreshTable())}deleteRow(i){this.limitService.delete(i.id).subscribe(()=>this.refreshTable())}refreshTable(i,t,a){this.fetchTable(this.limitService,{limit:i,offset:t,filter:a,related:"service_by_service_id,role_by_role_id,user_by_user_id,limit_cache_by_limit_id"})}static{this.\u0275fac=function(t){return new(t||I)(n.rXU($.gu),n.rXU($.Lm),n.rXU(d.Ix),n.rXU(d.nX),n.rXU(O.Ai),n.rXU(T.JO),n.rXU(E.bZ))}}static{this.\u0275cmp=n.VBU({type:I,selectors:[["df-manage-limits-table"]],standalone:!0,features:[n.Vt3,n.aNF],ngContentSelectors:Fn,decls:9,vars:9,consts:[[1,"top-action-bar"],["mat-mini-fab","","class","save-btn","data-testid","manage-table-create","type","button",3,"click",4,"ngIf"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click",4,"ngIf"],[1,"spacer"],[4,"ngIf"],["class","search-input","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["mat-mini-fab","","data-testid","manage-table-create","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["mat-mini-fab","","color","alternate","data-testid","manage-table-refresh-schema","type","button",3,"click"],["class","df-usage-filter","data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",1,"df-usage-filter"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["appearance","outline","subscriptSizing","dynamic",1,"search-input"],["matInput","",3,"formControl"],["class","table-loading-bar","mode","indeterminate",4,"ngIf"],["class","table-error-panel",4,"ngIf"],[1,"table-container"],["mat-table","","matSort","",3,"dataSource","matSortChange"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"clickable","click","keydown",4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[1,"bottom-action-bar"],["showFirstLastButtons","","aria-label","'selectPage' | transloco",3,"pageSize","pageSizeOptions","length","page"],["mode","indeterminate",1,"table-loading-bar"],[1,"table-error-panel"],[1,"table-error-headline"],["size","lg",3,"icon"],["mat-stroked-button","","type","button",3,"click"],[3,"error"],[3,"matColumnDef",4,"ngIf"],["stickyEnd","",3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","df-eyebrow",3,"df-numeric",4,"matHeaderCellDef"],["mat-cell","",3,"df-numeric",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"df-eyebrow"],["mat-cell",""],["size","lg",3,"icon","class",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt"],["size","lg","class","log-warning",3,"icon",4,"ngIf"],["size","lg",1,"log-warning",3,"icon"],["mat-header-cell","","class","df-eyebrow",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["mat-header-cell","",1,"df-eyebrow"],[4,"ngIf","ngIfElse"],["healthyChip",""],["type","button",1,"df-health-chip",3,"matMenuTriggerFor","click"],[3,"variant","label"],["healthMenu","matMenu"],["mat-menu-item","",3,"routerLink","disabled","click",4,"ngFor","ngForOf"],["mat-menu-item","",3,"routerLink","disabled","click"],["notDatabase",""],["class","actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions"],["size","lg",3,"icon","click"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-header-cell",""],["stickyEnd","",3,"matColumnDef"],["class","actions df-row-actions","mat-cell","",4,"matCellDef"],["mat-cell","",1,"actions","df-row-actions"],["multiple",""],["class","action-btn","mat-icon-button","","type","button",3,"click",4,"ngIf","ngIfElse"],["regular",""],["mat-icon-button","","type","button",1,"action-btn",3,"click"],["size","xs",3,"icon"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-icon-button","","aria-label","Actions","type","button",3,"matMenuTriggerFor","click"],["actionsMenu","matMenu"],["type","button","mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["type","button","mat-menu-item","",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click","keydown"],[1,"mat-row","no-data-row"],[1,"mat-cell"],["noFilterActive",""],["mat-button","","color","primary","type","button",3,"click"],["class","empty-state",4,"ngIf","ngIfElse"],["genericEmpty",""],[1,"empty-state"],[1,"empty-state-message"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-create",3,"click"]],template:function(t,a){1&t&&(n.NAR(jn),n.j41(0,"div",0),n.DNE(1,Y,3,4,"button",1),n.DNE(2,F,3,4,"button",2),n.SdG(3),n.nrm(4,"div",3),n.DNE(5,A,2,1,"ng-container",4),n.DNE(6,U,5,4,"mat-form-field",5),n.k0s(),n.DNE(7,On,11,11,"ng-container",4),n.nI1(8,"async")),2&t&&(n.R7$(1),n.Y8G("ngIf",a.allowCreate),n.R7$(1),n.Y8G("ngIf",a.schema),n.R7$(3),n.Y8G("ngIf",a.accessUsage),n.R7$(1),n.Y8G("ngIf",a.allowFilter),n.R7$(1),n.Y8G("ngIf",n.eq3(7,Yn,n.bMT(8,5,a.currentPageSize$))))},dependencies:[u.bT,m.Hl,m.$z,m.iY,m.$0,b.dX,b.aY,l.tP,l.Zl,l.tL,l.ji,l.cC,l.YV,l.iL,l.KS,l.$R,l.YZ,l.NB,l.ky,u.Sq,g.Cn,g.kk,g.fb,g.Cp,C.X1,C.me,C.BC,C.l_,T.Kj,u.Jj,E.hM,N.Ou,N.iy,h.RG,h.rl,h.nJ,X.fS,X.fg,M.NQ,M.B4,M.aE,P.PO,P.HM,p.R6,p.vR,p.Zn,S.Ve,S.VO,j.wT,d.Wk],styles:[".df-health-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;margin:0;border:none;background:transparent;font:inherit;color:inherit;cursor:pointer}.active[_ngcontent-%COMP%]{color:var(--df-success)}.inactive[_ngcontent-%COMP%], .log-warning[_ngcontent-%COMP%]{color:var(--df-danger)}.top-action-bar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--df-space-3);padding-bottom:var(--df-space-3)}.top-action-bar[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{height:80%!important;max-width:300px!important}.top-action-bar[_ngcontent-%COMP%] .df-usage-filter[_ngcontent-%COMP%]{width:160px}.bottom-action-bar[_ngcontent-%COMP%]{margin-top:var(--df-space-4);display:flex;flex-direction:row;justify-content:center}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto}.table-container.table-stale[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.table-loading-bar[_ngcontent-%COMP%]{margin-bottom:2px}.table-error-panel[_ngcontent-%COMP%]{margin-bottom:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm);background-color:var(--df-danger-soft);color:var(--df-text)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);margin-bottom:var(--df-space-2)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:1.4rem}.no-data-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--df-space-4);padding:var(--df-space-4);text-align:center}.empty-state[_ngcontent-%COMP%] .empty-state-message[_ngcontent-%COMP%]{margin:0;max-width:46rem;color:var(--df-text-muted);font-size:1.4rem;line-height:1.5}.mat-mdc-row[_ngcontent-%COMP%]{height:var(--df-row-height)!important}.mat-mdc-cell[_ngcontent-%COMP%], .mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border-2)}.mat-mdc-cell.df-numeric[_ngcontent-%COMP%], .mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%]{text-align:right}.mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{justify-content:flex-end}.df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0;transition:opacity var(--df-duration-fast) var(--df-ease-standard)}.mat-mdc-row[_ngcontent-%COMP%]:hover .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .mat-mdc-row[_ngcontent-%COMP%]:focus-within .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{opacity:1}.clickable.mat-mdc-row[_ngcontent-%COMP%]{outline:0}.clickable.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{cursor:pointer}.clickable.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-hover)}.clickable.mat-mdc-row[_ngcontent-%COMP%]:focus .mat-mdc-cell[_ngcontent-%COMP%], .clickable.mat-mdc-row[_ngcontent-%COMP%]:focus-within .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)} [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{border-bottom:unset!important}"]})}};D=(0,L.Cg)([(0,R.d)({checkProperties:!0})],D);var Vn=c(45383),Bn=c(10233);function An(e,i){1&e&&n.nrm(0,"df-paywall",2),2&e&&n.Y8G("serviceName","Limits")}function Un(e,i){if(1&e){const t=n.RV6();n.j41(0,"df-manage-limits-table"),n.qex(1,3),n.j41(2,"button",4),n.bIt("click",function(){n.eBV(t);const o=n.XpG();return n.Njj(o.refreshTable())}),n.nI1(3,"transloco"),n.nrm(4,"fa-icon",5),n.k0s(),n.bVm(),n.k0s()}if(2&e){const t=n.XpG();n.R7$(2),n.BMQ("aria-label",n.bMT(3,2,"clearLimitCounters")),n.R7$(2),n.Y8G("icon",t.faArrowsRotate)}}let G=class y{constructor(i){this.activatedRoute=i,this.faArrowsRotate=Vn.$3Z,this.paywall=!1,this.activatedRoute.data.subscribe(({data:t})=>{"paywall"===t&&(this.paywall=!0)})}refreshTable(){this.manageLimitsTableComponent.refreshTable()}static{this.\u0275fac=function(t){return new(t||y)(n.rXU(d.nX))}}static{this.\u0275cmp=n.VBU({type:y,selectors:[["df-manage-limits"]],viewQuery:function(t,a){if(1&t&&n.GBs(D,5),2&t){let o;n.mGM(o=n.lsd())&&(a.manageLimitsTableComponent=o.first)}},standalone:!0,features:[n.aNF],decls:3,vars:2,consts:[[3,"serviceName",4,"ngIf","ngIfElse"],["allowed",""],[3,"serviceName"],["topActions",""],["mat-mini-fab","","color","primary",1,"save-btn",3,"click"],["size","xl",3,"icon"]],template:function(t,a){if(1&t&&(n.DNE(0,An,1,1,"df-paywall",0),n.DNE(1,Un,5,4,"ng-template",null,1,n.C5r)),2&t){const o=n.sdS(2);n.Y8G("ngIf",a.paywall)("ngIfElse",o)}},dependencies:[D,T.Kj,b.dX,b.aY,u.bT,m.Hl,m.$0,g.Cn,Bn.C]})}};G=(0,L.Cg)([(0,R.d)({checkProperties:!0})],G)}}]); \ No newline at end of file diff --git a/dist/2967.e5f225277a409e25.js b/dist/2967.e5f225277a409e25.js deleted file mode 100644 index 53cc1533..00000000 --- a/dist/2967.e5f225277a409e25.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2967],{17189:(B,R,o)=>{o.d(R,{v:()=>v});var t=o(18331),d=o(1843);function _(p,D){1&p&&d.nrm(0,"span",3)}let v=(()=>{class p{constructor(){this.variant="neutral",this.label="",this.dot=!0}get variantClass(){return`df-badge--${this.variant}`}static{this.\u0275fac=function(b){return new(b||p)}}static{this.\u0275cmp=d.VBU({type:p,selectors:[["df-badge"]],inputs:{variant:"variant",label:"label",dot:"dot"},standalone:!0,features:[d.aNF],decls:4,vars:4,consts:[[1,"df-badge"],["class","df-badge__dot","aria-hidden","true",4,"ngIf"],[1,"df-badge__label"],["aria-hidden","true",1,"df-badge__dot"]],template:function(b,I){1&b&&(d.j41(0,"span",0),d.DNE(1,_,1,0,"span",1),d.j41(2,"span",2),d.EFF(3),d.k0s()()),2&b&&(d.HbH(I.variantClass),d.R7$(1),d.Y8G("ngIf",I.dot),d.R7$(2),d.JRh(I.label))},dependencies:[t.bT],styles:[".df-badge[_ngcontent-%COMP%]{--_badge-bg: var(--df-hover);--_badge-fg: var(--df-text-muted);display:inline-flex;align-items:center;gap:var(--df-space-1);padding:var(--df-space-1) var(--df-space-2);border-radius:var(--df-radius-sm);background-color:var(--_badge-bg);color:var(--_badge-fg);font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-medium);line-height:var(--df-lh-tight);white-space:nowrap;vertical-align:middle}.df-badge__dot[_ngcontent-%COMP%]{flex:0 0 auto;width:var(--df-space-2);height:var(--df-space-2);border-radius:50%;background-color:var(--_badge-fg)}.df-badge--neutral[_ngcontent-%COMP%]{--_badge-bg: var(--df-hover);--_badge-fg: var(--df-text-muted)}.df-badge--success[_ngcontent-%COMP%]{--_badge-bg: var(--df-success-soft);--_badge-fg: var(--df-success)}.df-badge--warning[_ngcontent-%COMP%]{--_badge-bg: var(--df-warning-soft);--_badge-fg: var(--df-warning)}.df-badge--danger[_ngcontent-%COMP%]{--_badge-bg: var(--df-danger-soft);--_badge-fg: var(--df-danger)}.df-badge--accent[_ngcontent-%COMP%]{--_badge-bg: var(--df-accent-soft);--_badge-fg: var(--df-accent-strong)}.df-badge--build[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-build-bg);--_badge-fg: var(--df-tint-build-fg)}.df-badge--data[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-data-bg);--_badge-fg: var(--df-tint-data-fg)}.df-badge--security[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-security-bg);--_badge-fg: var(--df-tint-security-fg)}.df-badge--system[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-system-bg);--_badge-fg: var(--df-tint-system-fg)}.df-badge--admin[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-admin-bg);--_badge-fg: var(--df-tint-admin-fg)}.df-badge--ai[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-ai-bg);--_badge-fg: var(--df-tint-ai-fg)}.df-badge--docs[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-docs-bg);--_badge-fg: var(--df-tint-docs-fg)}"]})}}return p})()},61417:(B,R,o)=>{o.d(R,{M:()=>x});var t=o(1843),d=o(18331),_=o(68660),v=o(7263);function p(s,m){if(1&s&&(t.j41(0,"div",5)(1,"mat-icon"),t.EFF(2),t.k0s()()),2&s){const r=t.XpG();t.R7$(2),t.JRh(r.icon)}}function D(s,m){if(1&s&&(t.j41(0,"p",6),t.EFF(1),t.k0s()),2&s){const r=t.XpG();t.R7$(1),t.JRh(r.description)}}function O(s,m){if(1&s&&(t.j41(0,"mat-icon"),t.EFF(1),t.k0s()),2&s){const r=t.XpG(3);t.R7$(1),t.JRh(r.actionIcon)}}function b(s,m){if(1&s){const r=t.RV6();t.j41(0,"button",10),t.bIt("click",function(){t.eBV(r);const g=t.XpG(2);return t.Njj(g.action.emit())}),t.DNE(1,O,2,1,"mat-icon",11),t.EFF(2),t.k0s()}if(2&s){const r=t.XpG(2);t.R7$(1),t.Y8G("ngIf",r.actionIcon),t.R7$(1),t.SpI(" ",r.actionLabel," ")}}function I(s,m){if(1&s){const r=t.RV6();t.j41(0,"button",12),t.bIt("click",function(){t.eBV(r);const g=t.XpG(2);return t.Njj(g.secondaryAction.emit())}),t.EFF(1),t.k0s()}if(2&s){const r=t.XpG(2);t.R7$(1),t.SpI(" ",r.secondaryLabel," ")}}function h(s,m){if(1&s&&(t.j41(0,"div",7),t.DNE(1,b,3,2,"button",8),t.DNE(2,I,2,1,"button",9),t.k0s()),2&s){const r=t.XpG();t.R7$(1),t.Y8G("ngIf",r.actionLabel),t.R7$(1),t.Y8G("ngIf",r.secondaryLabel)}}const A=[[["","emptyStateIcon",""]],[["","emptyStateSnippet",""]]],M=["[emptyStateIcon]","[emptyStateSnippet]"];let x=(()=>{class s{constructor(){this.title="",this.action=new t.bkB,this.secondaryAction=new t.bkB}static{this.\u0275fac=function(E){return new(E||s)}}static{this.\u0275cmp=t.VBU({type:s,selectors:[["df-empty-state"]],inputs:{icon:"icon",title:"title",description:"description",actionLabel:"actionLabel",actionIcon:"actionIcon",secondaryLabel:"secondaryLabel"},outputs:{action:"action",secondaryAction:"secondaryAction"},standalone:!0,features:[t.aNF],ngContentSelectors:M,decls:8,vars:4,consts:[["role","status",1,"empty-state"],["class","empty-state__icon","aria-hidden","true",4,"ngIf"],[1,"empty-state__title"],["class","empty-state__description",4,"ngIf"],["class","empty-state__actions",4,"ngIf"],["aria-hidden","true",1,"empty-state__icon"],[1,"empty-state__description"],[1,"empty-state__actions"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-action",3,"click",4,"ngIf"],["mat-stroked-button","","type","button","data-testid","empty-state-secondary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-action",3,"click"],[4,"ngIf"],["mat-stroked-button","","type","button","data-testid","empty-state-secondary",3,"click"]],template:function(E,g){1&E&&(t.NAR(A),t.j41(0,"div",0),t.DNE(1,p,3,1,"div",1),t.SdG(2),t.j41(3,"h3",2),t.EFF(4),t.k0s(),t.DNE(5,D,2,1,"p",3),t.DNE(6,h,3,2,"div",4),t.SdG(7,1),t.k0s()),2&E&&(t.R7$(1),t.Y8G("ngIf",g.icon),t.R7$(3),t.JRh(g.title),t.R7$(1),t.Y8G("ngIf",g.description),t.R7$(1),t.Y8G("ngIf",g.actionLabel||g.secondaryLabel))},dependencies:[d.bT,_.Hl,_.$z,v.m_,v.An],styles:[".empty-state[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:var(--df-space-3);margin:0 auto;max-width:44ch;padding:var(--df-space-8) var(--df-space-5);text-align:center}.empty-state__icon[_ngcontent-%COMP%]{align-items:center;background:var(--df-accent-soft);border-radius:var(--df-radius);color:var(--df-accent);display:inline-flex;height:var(--df-space-8);justify-content:center;width:var(--df-space-8)}.empty-state__icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:var(--df-font-size-2xl);height:var(--df-font-size-2xl);line-height:1;width:var(--df-font-size-2xl)}.empty-state__title[_ngcontent-%COMP%]{color:var(--df-text);font-size:var(--df-font-size-lg);font-weight:var(--df-font-weight-heading);letter-spacing:var(--df-tracking-tight);line-height:var(--df-lh-tight);margin:0}.empty-state__description[_ngcontent-%COMP%]{color:var(--df-text-2);font-size:var(--df-font-size-sm);line-height:var(--df-lh-base);margin:0}.empty-state__actions[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:var(--df-space-2);justify-content:center;margin-top:var(--df-space-1)}"],changeDetection:0})}}return s})()},28067:(B,R,o)=>{o.d(R,{e:()=>m,q:()=>L});var t=o(73151),d=o(86606),_=o(12324),v=o(52483),p=o(29810),D=o(57588),O=o(75066),b=o(68686),I=o(54749),h=o(16994),A=o(48444),M=o(1843),x=o(62572);o(69099);const m=["GET","POST","PUT","PATCH","DELETE"],r={GET:1,POST:2,PUT:4,PATCH:8,DELETE:16},E=r.POST|r.PUT|r.PATCH|r.DELETE,g=[h.b.DATABASE,h.b.SCRIPTING,h.b.NETWORK,h.b.FILE,h.b.UTILITY];let L=(()=>{class T{constructor(e,n,a,i){this.roleService=e,this.servicesService=n,this.appService=a,this.http=i}refresh(){this.roles$=void 0,this.services$=void 0,this.apps$=void 0,this.typeGroups$=void 0}getRoles(){return this.roles$||(this.roles$=this.roleService.getAll({limit:0,related:"role_service_access_by_role_id",sort:"name"}).pipe((0,_.T)(e=>e.resource??[]),(0,v.W)(()=>(0,t.of)([])),(0,p.t)(1))),this.roles$}getServices(){return this.services$||(this.services$=this.servicesService.getAll({limit:0,sort:"name"}).pipe((0,_.T)(e=>e.resource??[]),(0,v.W)(()=>(0,t.of)([])),(0,p.t)(1))),this.services$}getApps(){return this.apps$||(this.apps$=this.appService.getAll({limit:0}).pipe((0,_.T)(e=>e.resource??[]),(0,v.W)(()=>(0,t.of)([])),(0,p.t)(1))),this.apps$}matrixForService(e){return this.getRoles().pipe((0,_.T)(n=>({serviceId:e,roles:n.map(a=>this.matrixRowForRole(a,e)).sort((a,i)=>a.roleName.localeCompare(i.roleName))})))}matrixRowForRole(e,n){const a=(e.roleServiceAccessByRoleId??[]).filter(c=>this.isWildcardService(c.serviceId)||c.serviceId===n),i={};for(const c of m)i[c]=this.resolveVerbState(a,c);return{roleId:e.id,roleName:e.name,verbs:i}}resolveVerbState(e,n){let a="none";for(const i of e)if((i.verbMask&r[n])===r[n]){if("full"===this.rowScope(i))return"full";a="filtered"}return a}reachForRole(e){return(0,d.p)({roles:this.getRoles(),services:this.getServices()}).pipe((0,_.T)(({roles:n,services:a})=>this.buildReach(e,n,a)))}reachForKey(e){return this.roleIdForApp(e).pipe((0,D.n)(n=>null==n?(0,t.of)([]):this.reachForRole(n)))}reachForAgent(e){return this.reachForKey(e)}roleIdForApp(e){return this.getApps().pipe((0,_.T)(n=>n.find(a=>a.id===e)?.roleId??null))}buildReach(e,n,a){const i=n.find(f=>f.id===e);if(!i)return[];const c=i.roleServiceAccessByRoleId??[],S=new Map;a.forEach(f=>S.set(f.id,f));const y=[],P=new Set,l=[];for(const f of c){if(this.isWildcardService(f.serviceId)){l.push(f);continue}const u=S.get(f.serviceId);u&&(P.add(u.id),y.push(this.reachEntry(f,u,"explicit")))}const C=[];for(const f of l)for(const u of a)P.has(u.id)||C.push(this.reachEntry(f,u,"inherited"));return[...y,...C].sort((f,u)=>f.serviceName.localeCompare(u.serviceName)||f.target.localeCompare(u.target))}reachEntry(e,n,a){const i=this.decodeVerbs(e.verbMask);return{serviceId:n.id,serviceName:n.name,serviceLabel:n.label||n.name,component:e.component||"*",target:this.humanizeComponent(e.component),verbs:i,scope:this.rowScope(e),allow:i.length>0,source:a}}governancePosture(){return(0,d.p)({roles:this.getRoles(),services:this.getServices(),typeGroups:this.getTypeGroups()}).pipe((0,_.T)(({roles:e,services:n,typeGroups:a})=>this.buildGovernance(e,n,a)))}buildGovernance(e,n,a){const i=e.filter(l=>!1!==l.isActive),c=n.map(l=>this.postureForService(l,i,a)),S=c.filter(l=>"locked"===l.posture).length,y=c.filter(l=>"scoped"===l.posture).length,P=c.filter(l=>"open"===l.posture).length;return{services:c,lockedCount:S,scopedCount:y,openCount:P,reachableCount:y+P}}postureForService(e,n,a){let i=!1;const c=[];for(const y of n){let P=!1,l=!1;for(const C of y.roleServiceAccessByRoleId??[])!this.isWildcardService(C.serviceId)&&C.serviceId!==e.id||C.verbMask<=0||(l=!0,"full"===this.rowScope(C)&&0!=(C.verbMask&E)&&(P=!0));l&&(i=!0),P&&c.push(y.name)}return{serviceId:e.id,serviceName:e.name,serviceLabel:e.label||e.name,posture:i?c.length>0?"open":"scoped":"locked",openRoles:c,detailRoute:this.detailRouteForService(e,a)}}detailRouteForService(e,n){const a=n.get(e.type);if(!a)return null;const i=g.find(c=>I.H[c]?.includes(a));return i?["/",h.b.API_CONNECTIONS,h.b.API_TYPES,i,String(e.id)]:null}getTypeGroups(){return this.typeGroups$||(this.typeGroups$=this.http.get(`${b.t.SERVICE_TYPE}?fields=name,group`,{context:(0,A.Ku)()}).pipe((0,_.T)(e=>{const n=new Map;for(const a of e?.resource??[])a?.name&&a?.group&&n.set(a.name,a.group);return n}),(0,v.W)(()=>(0,t.of)(new Map)),(0,p.t)(1))),this.typeGroups$}isWildcardService(e){return null==e||0===e}rowScope(e){if(e.filters&&e.filters.length>0)return"filtered";const n=(e.component||"").trim();return""===n||"*"===n||"_table/*"===n?"full":"filtered"}decodeVerbs(e){return m.filter(n=>(e&r[n])===r[n])}humanizeComponent(e){const n=(e||"*").trim();return""===n||"*"===n?"All tables & endpoints":"_table/*"===n?"All tables":n.replace(/^_table\//,"").replace(/\/\*$/,"")||n}static{this.\u0275fac=function(n){return new(n||T)(M.KVO(O.h1),M.KVO(O.Z1),M.KVO(O.u7),M.KVO(x.Qq))}}static{this.\u0275prov=M.jDH({token:T,factory:T.\u0275fac,providedIn:"root"})}}return T})()}}]); \ No newline at end of file diff --git a/dist/2991.d4a5e9084c0b93e1.js b/dist/2991.d4a5e9084c0b93e1.js new file mode 100644 index 00000000..f92f6065 --- /dev/null +++ b/dist/2991.d4a5e9084c0b93e1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[2991],{42991:(R,f,r)=>{r.r(f),r.d(f,{DfEmailTemplateDetailsComponent:()=>v});var t=r(31635),s=r(89417),E=r(86600),h=r(82798),c=r(99631),d=r(32102),u=r(88834),b=r(60177),D=r(33609),m=r(24784),M=r(49894),i=r(51425),p=r(99437),T=r(18810),I=r(95753),e=r(17705),F=r(95245),C=r(52608),O=r(52868),P=r(43615);function A(a,n){1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.SpI(" ",e.bMT(2,1,"emailTemplates.templateName.error")," "))}function y(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.name.getError("server"))," ")}}function $(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.description.getError("server"))," ")}}function N(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.subject.getError("server"))," ")}}function j(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.attachment.getError("server"))," ")}}function k(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.body.getError("server"))," ")}}function S(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.senderName.getError("server"))," ")}}function U(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.senderEmail.getError("server"))," ")}}function B(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.replyToName.getError("server"))," ")}}function G(a,n){if(1&a&&(e.j41(0,"mat-error"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a){const l=e.XpG();e.R7$(1),e.SpI(" ",e.bMT(2,1,l.emailTemplateForm.controls.replyToEmail.getError("server"))," ")}}function W(a,n){1&a&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.JRh(e.bMT(2,1,"update")))}function L(a,n){1&a&&(e.j41(0,"span"),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&a&&(e.R7$(1),e.JRh(e.bMT(2,1,"save")))}r(36225);let v=class g{constructor(n,l,o,_,K,X,x){this.crudService=n,this.fb=l,this.router=o,this.breakpointService=_,this.activatedRoute=K,this.themeService=X,this.snackbarService=x,this.alertMsg="",this.showAlert=!1,this.alertType="error",this.isDarkMode=this.themeService.darkMode$,this.emailTemplateForm=this.fb.group({name:["",s.k0.required],description:[""],to:[""],cc:[""],bcc:[""],subject:[""],attachment:[""],body:[""],senderName:[""],senderEmail:[""],replyToName:[""],replyToEmail:[""],id:[null]})}ngOnInit(){this.activatedRoute.data.subscribe(({data:n})=>{this.editApp=n}),this.snackbarService.setSnackbarLastEle(this.editApp.name,!0),this.editApp&&this.emailTemplateForm.patchValue({name:this.editApp.name,description:this.editApp.description,to:this.editApp.to,cc:this.editApp.cc,bcc:this.editApp.bcc,subject:this.editApp.subject,attachment:this.editApp.attachment,body:this.editApp.bodyHtml,senderName:this.editApp.fromName,senderEmail:this.editApp.fromEmail,replyToName:this.editApp.replyToName,replyToEmail:this.editApp.replyToEmail,id:this.editApp.id})}triggerAlert(n,l){this.alertType=n,this.alertMsg=l,this.showAlert=!0}goBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}onSubmit(){if(this.emailTemplateForm.invalid)return;const n={name:this.emailTemplateForm.value.name,description:this.emailTemplateForm.value.description,to:this.emailTemplateForm.value.to,cc:this.emailTemplateForm.value.cc,bcc:this.emailTemplateForm.value.bcc,subject:this.emailTemplateForm.value.subject,attachment:this.emailTemplateForm.value.attachment,bodyHtml:this.emailTemplateForm.value.body,fromName:this.emailTemplateForm.value.senderName,fromEmail:this.emailTemplateForm.value.senderEmail,replyToName:this.emailTemplateForm.value.replyToName,replyToEmail:this.emailTemplateForm.value.replyToEmail};this.emailTemplateForm.value.id?this.crudService.update(this.emailTemplateForm.value.id,n,{snackbarSuccess:"emailTemplates.alerts.updateSuccess"}).pipe((0,p.W)(l=>{const o=(0,I.cQ)(l);return this.triggerAlert("error",o.message),(0,T.$)(()=>o)})).subscribe(()=>{this.goBack()}):this.crudService.create({resource:[n]},{snackbarSuccess:"emailTemplates.alerts.createSuccess"}).pipe((0,p.W)(l=>{const o=(0,I.cQ)(l),_=(0,I.aI)(this.emailTemplateForm,o);return this.triggerAlert("error",_.length?_.join(" "):o.message),(0,T.$)(()=>o)})).subscribe(()=>{this.goBack()})}static{this.\u0275fac=function(l){return new(l||g)(e.rXU(m.F8),e.rXU(s.ok),e.rXU(F.Ix),e.rXU(C.R),e.rXU(F.nX),e.rXU(O.n),e.rXU(P.L))}}static{this.\u0275cmp=e.VBU({type:g,selectors:[["df-email-template-details"]],standalone:!0,features:[e.aNF],decls:91,vars:85,consts:[[3,"showAlert","alertType","alertClosed"],[1,"email-template-details-container"],[1,"details-section",3,"formGroup","ngSubmit"],["appearance","outline",1,"dynamic-width"],["matInput","","formControlName","name","required","",3,"placeholder"],[4,"ngIf"],["matInput","","formControlName","description",3,"placeholder"],["appearance","outline",1,"third-width"],["matInput","","formControlName","to"],["matInput","","formControlName","cc"],["matInput","","formControlName","bcc"],["appearance","outline","subscriptSizing","dynamic"],["matInput","","formControlName","subject",3,"placeholder"],["matInput","","formControlName","attachment",3,"placeholder"],["rows","1","matInput","","formControlName","body",1,"email-template-body"],["matInput","","formControlName","senderName",3,"placeholder"],["matInput","","formControlName","senderEmail",3,"placeholder"],["matInput","","formControlName","replyToName",3,"placeholder"],["matInput","","formControlName","replyToEmail",3,"placeholder"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],["mat-flat-button","","color","primary",1,"save-btn"]],template:function(l,o){1&l&&(e.j41(0,"df-alert",0),e.bIt("alertClosed",function(){return o.showAlert=!1}),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"div",1),e.nI1(4,"async"),e.j41(5,"form",2),e.bIt("ngSubmit",function(){return o.onSubmit()}),e.j41(6,"mat-form-field",3)(7,"mat-label"),e.EFF(8),e.nI1(9,"transloco"),e.k0s(),e.nrm(10,"input",4),e.nI1(11,"transloco"),e.DNE(12,A,3,3,"mat-error",5),e.DNE(13,y,3,3,"mat-error",5),e.k0s(),e.j41(14,"mat-form-field",3)(15,"mat-label"),e.EFF(16),e.nI1(17,"transloco"),e.k0s(),e.nrm(18,"input",6),e.nI1(19,"transloco"),e.DNE(20,$,3,3,"mat-error",5),e.k0s(),e.j41(21,"mat-form-field",7)(22,"mat-label"),e.EFF(23),e.nI1(24,"transloco"),e.k0s(),e.nrm(25,"input",8),e.k0s(),e.j41(26,"mat-form-field",7)(27,"mat-label"),e.EFF(28),e.nI1(29,"transloco"),e.k0s(),e.nrm(30,"input",9),e.k0s(),e.j41(31,"mat-form-field",7)(32,"mat-label"),e.EFF(33),e.nI1(34,"transloco"),e.k0s(),e.nrm(35,"input",10),e.k0s(),e.j41(36,"mat-form-field",11)(37,"mat-label"),e.EFF(38),e.nI1(39,"transloco"),e.k0s(),e.nrm(40,"input",12),e.nI1(41,"transloco"),e.DNE(42,N,3,3,"mat-error",5),e.k0s(),e.j41(43,"mat-form-field",11)(44,"mat-label"),e.EFF(45),e.nI1(46,"transloco"),e.k0s(),e.nrm(47,"input",13),e.nI1(48,"transloco"),e.DNE(49,j,3,3,"mat-error",5),e.k0s(),e.j41(50,"mat-form-field",11)(51,"mat-label"),e.EFF(52),e.nI1(53,"transloco"),e.k0s(),e.nrm(54,"textarea",14),e.DNE(55,k,3,3,"mat-error",5),e.k0s(),e.j41(56,"mat-form-field",3)(57,"mat-label"),e.EFF(58),e.nI1(59,"transloco"),e.k0s(),e.nrm(60,"input",15),e.nI1(61,"transloco"),e.DNE(62,S,3,3,"mat-error",5),e.k0s(),e.j41(63,"mat-form-field",3)(64,"mat-label"),e.EFF(65),e.nI1(66,"transloco"),e.k0s(),e.nrm(67,"input",16),e.nI1(68,"transloco"),e.DNE(69,U,3,3,"mat-error",5),e.k0s(),e.j41(70,"mat-form-field",3)(71,"mat-label"),e.EFF(72),e.nI1(73,"transloco"),e.k0s(),e.nrm(74,"input",17),e.nI1(75,"transloco"),e.DNE(76,B,3,3,"mat-error",5),e.k0s(),e.j41(77,"mat-form-field",3)(78,"mat-label"),e.EFF(79),e.nI1(80,"transloco"),e.k0s(),e.nrm(81,"input",18),e.nI1(82,"transloco"),e.DNE(83,G,3,3,"mat-error",5),e.k0s(),e.j41(84,"div",19)(85,"button",20),e.bIt("click",function(){return o.goBack()}),e.EFF(86),e.nI1(87,"transloco"),e.k0s(),e.j41(88,"button",21),e.DNE(89,W,3,3,"span",5),e.DNE(90,L,3,3,"span",5),e.k0s()()()()),2&l&&(e.Y8G("showAlert",o.showAlert)("alertType",o.alertType),e.R7$(1),e.SpI(" ",e.bMT(2,39,o.alertMsg),"\n"),e.R7$(2),e.AVh("x-small",e.bMT(4,41,o.breakpointService.isXSmallScreen)),e.R7$(2),e.Y8G("formGroup",o.emailTemplateForm),e.R7$(3),e.JRh(e.bMT(9,43,"emailTemplates.templateName.label")),e.R7$(2),e.FS9("placeholder",e.bMT(11,45,"emailTemplates.templateName.placeholder")),e.R7$(2),e.Y8G("ngIf",o.emailTemplateForm.controls.name.hasError("required")),e.R7$(1),e.Y8G("ngIf",o.emailTemplateForm.controls.name.hasError("server")),e.R7$(3),e.JRh(e.bMT(17,47,"emailTemplates.templateDescription.label")),e.R7$(2),e.FS9("placeholder",e.bMT(19,49,"emailTemplates.templateDescription.placeholder")),e.R7$(2),e.Y8G("ngIf",o.emailTemplateForm.controls.description.hasError("server")),e.R7$(3),e.JRh(e.bMT(24,51,"emailTemplates.recipient.label")),e.R7$(5),e.JRh(e.bMT(29,53,"emailTemplates.cc.label")),e.R7$(5),e.JRh(e.bMT(34,55,"emailTemplates.bcc.label")),e.R7$(5),e.JRh(e.bMT(39,57,"emailTemplates.subject.label")),e.R7$(2),e.FS9("placeholder",e.bMT(41,59,"emailTemplates.subject.placeholder")),e.R7$(2),e.Y8G("ngIf",o.emailTemplateForm.controls.subject.hasError("server")),e.R7$(3),e.JRh(e.bMT(46,61,"emailTemplates.attachment.label")),e.R7$(2),e.FS9("placeholder",e.bMT(48,63,"emailTemplates.attachment.placeholder")),e.R7$(2),e.Y8G("ngIf",o.emailTemplateForm.controls.attachment.hasError("server")),e.R7$(3),e.JRh(e.bMT(53,65,"emailTemplates.body")),e.R7$(3),e.Y8G("ngIf",o.emailTemplateForm.controls.body.hasError("server")),e.R7$(3),e.JRh(e.bMT(59,67,"emailTemplates.senderName.label")),e.R7$(2),e.FS9("placeholder",e.bMT(61,69,"emailTemplates.senderName.placeholder")),e.R7$(2),e.Y8G("ngIf",o.emailTemplateForm.controls.senderName.hasError("server")),e.R7$(3),e.JRh(e.bMT(66,71,"emailTemplates.senderEmail.label")),e.R7$(2),e.FS9("placeholder",e.bMT(68,73,"emailTemplates.senderEmail.placeholder")),e.R7$(2),e.Y8G("ngIf",o.emailTemplateForm.controls.senderEmail.hasError("server")),e.R7$(3),e.JRh(e.bMT(73,75,"emailTemplates.replyToName.label")),e.R7$(2),e.FS9("placeholder",e.bMT(75,77,"emailTemplates.replyToName.placeholder")),e.R7$(2),e.Y8G("ngIf",o.emailTemplateForm.controls.replyToName.hasError("server")),e.R7$(3),e.JRh(e.bMT(80,79,"emailTemplates.replyToEmail.label")),e.R7$(2),e.FS9("placeholder",e.bMT(82,81,"emailTemplates.replyToEmail.placeholder")),e.R7$(2),e.Y8G("ngIf",o.emailTemplateForm.controls.replyToEmail.hasError("server")),e.R7$(3),e.SpI(" ",e.bMT(87,83,"cancel")," "),e.R7$(3),e.Y8G("ngIf",o.editApp),e.R7$(1),e.Y8G("ngIf",!o.editApp))},dependencies:[u.Hl,u.$z,s.X1,s.qT,s.me,s.BC,s.cb,s.YS,s.j4,s.JD,d.RG,d.rl,d.nJ,d.TL,c.fS,c.fg,b.bT,h.Ve,E.Sy,D.Kj,b.Jj,i.W],styles:[".email-template-details-container[_ngcontent-%COMP%] .email-template-body[_ngcontent-%COMP%]{min-height:300px}.email-template-details-container.x-small[_ngcontent-%COMP%] .email-template-body[_ngcontent-%COMP%]{min-height:200px}"]})}};v=(0,t.Cg)([(0,M.d)({checkProperties:!0})],v)},51425:(R,f,r)=>{r.d(f,{W:()=>D});var t=r(17705),s=r(60177),E=r(88834),h=r(20060),c=r(45383);function d(m,M){if(1&m){const i=t.RV6();t.j41(0,"button",5),t.bIt("click",function(){t.eBV(i);const T=t.XpG(2);return t.Njj(T.dismissAlert())}),t.j41(1,"fa-icon",6),t.EFF(2),t.k0s()()}if(2&m){const i=t.XpG(2);t.R7$(1),t.Y8G("icon",i.faXmark),t.R7$(1),t.JRh("alerts.close")}}function u(m,M){if(1&m&&(t.j41(0,"div",1),t.nrm(1,"fa-icon",2),t.j41(2,"span",3),t.SdG(3),t.k0s(),t.DNE(4,d,3,2,"button",4),t.k0s()),2&m){const i=t.XpG();t.HbH(i.alertType),t.R7$(1),t.Y8G("icon",i.icon),t.R7$(3),t.Y8G("ngIf",i.dismissible)}}const b=["*"];let D=(()=>{class m{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new t.bkB,this.faXmark=c.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return c.SGM;case"error":return c.rfe;case"warning":return c.tUE;default:return c.iW_}}static{this.\u0275fac=function(p){return new(p||m)}}static{this.\u0275cmp=t.VBU({type:m,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[t.aNF],ngContentSelectors:b,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(p,T){1&p&&(t.NAR(),t.DNE(0,u,5,4,"div",0)),2&p&&t.Y8G("ngIf",T.showAlert)},dependencies:[s.bT,E.Hl,E.iY,h.dX,h.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return m})()}}]); \ No newline at end of file diff --git a/dist/3138.04acce1458a7ef9a.js b/dist/3138.04acce1458a7ef9a.js deleted file mode 100644 index 6f4e64f7..00000000 --- a/dist/3138.04acce1458a7ef9a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[3138],{93138:(T,h,c)=>{c.d(h,{Hu:()=>S,Lc:()=>s,MM:()=>u,QG:()=>g,RN:()=>n,YY:()=>l,dh:()=>o,m2:()=>m});var e=c(1843),f=c(18331),i=c(42250);const p=["*"],v=[[["","mat-card-avatar",""],["","matCardAvatar",""]],[["mat-card-title"],["mat-card-subtitle"],["","mat-card-title",""],["","mat-card-subtitle",""],["","matCardTitle",""],["","matCardSubtitle",""]],"*"],x=["[mat-card-avatar], [matCardAvatar]","mat-card-title, mat-card-subtitle,\n [mat-card-title], [mat-card-subtitle],\n [matCardTitle], [matCardSubtitle]","*"],C=new e.nKC("MAT_CARD_CONFIG");let n=(()=>{class t{constructor(d){this.appearance=d?.appearance||"raised"}static{this.\u0275fac=function(a){return new(a||t)(e.rXU(C,8))}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["mat-card"]],hostAttrs:[1,"mat-mdc-card","mdc-card"],hostVars:4,hostBindings:function(a,r){2&a&&e.AVh("mat-mdc-card-outlined","outlined"===r.appearance)("mdc-card--outlined","outlined"===r.appearance)},inputs:{appearance:"appearance"},exportAs:["matCard"],ngContentSelectors:p,decls:1,vars:0,template:function(a,r){1&a&&(e.NAR(),e.SdG(0))},styles:['.mdc-card{display:flex;flex-direction:column;box-sizing:border-box}.mdc-card::after{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none;pointer-events:none}@media screen and (forced-colors: active){.mdc-card::after{border-color:CanvasText}}.mdc-card--outlined::after{border:none}.mdc-card__content{border-radius:inherit;height:100%}.mdc-card__media{position:relative;box-sizing:border-box;background-repeat:no-repeat;background-position:center;background-size:cover}.mdc-card__media::before{display:block;content:""}.mdc-card__media:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__media:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__media--square::before{margin-top:100%}.mdc-card__media--16-9::before{margin-top:56.25%}.mdc-card__media-content{position:absolute;top:0;right:0;bottom:0;left:0;box-sizing:border-box}.mdc-card__primary-action{display:flex;flex-direction:column;box-sizing:border-box;position:relative;outline:none;color:inherit;text-decoration:none;cursor:pointer;overflow:hidden}.mdc-card__primary-action:first-child{border-top-left-radius:inherit;border-top-right-radius:inherit}.mdc-card__primary-action:last-child{border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.mdc-card__actions{display:flex;flex-direction:row;align-items:center;box-sizing:border-box;min-height:52px;padding:8px}.mdc-card__actions--full-bleed{padding:0}.mdc-card__action-buttons,.mdc-card__action-icons{display:flex;flex-direction:row;align-items:center;box-sizing:border-box}.mdc-card__action-icons{color:rgba(0, 0, 0, 0.6);flex-grow:1;justify-content:flex-end}.mdc-card__action-buttons+.mdc-card__action-icons{margin-left:16px;margin-right:0}[dir=rtl] .mdc-card__action-buttons+.mdc-card__action-icons,.mdc-card__action-buttons+.mdc-card__action-icons[dir=rtl]{margin-left:0;margin-right:16px}.mdc-card__action{display:inline-flex;flex-direction:row;align-items:center;box-sizing:border-box;justify-content:center;cursor:pointer;user-select:none}.mdc-card__action:focus{outline:none}.mdc-card__action--button{margin-left:0;margin-right:8px;padding:0 8px}[dir=rtl] .mdc-card__action--button,.mdc-card__action--button[dir=rtl]{margin-left:8px;margin-right:0}.mdc-card__action--button:last-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-card__action--button:last-child,.mdc-card__action--button:last-child[dir=rtl]{margin-left:0;margin-right:0}.mdc-card__actions--full-bleed .mdc-card__action--button{justify-content:space-between;width:100%;height:auto;max-height:none;margin:0;padding:8px 16px;text-align:left}[dir=rtl] .mdc-card__actions--full-bleed .mdc-card__action--button,.mdc-card__actions--full-bleed .mdc-card__action--button[dir=rtl]{text-align:right}.mdc-card__action--icon{margin:-6px 0;padding:12px}.mdc-card__action--icon:not(:disabled){color:rgba(0, 0, 0, 0.6)}.mat-mdc-card{border-radius:var(--mdc-elevated-card-container-shape);background-color:var(--mdc-elevated-card-container-color);border-width:0;border-style:solid;border-color:var(--mdc-elevated-card-container-color);box-shadow:var(--mdc-elevated-card-container-elevation);--mdc-elevated-card-container-shape:4px;--mdc-outlined-card-container-shape:4px;--mdc-outlined-card-outline-width:1px}.mat-mdc-card .mdc-card::after{border-radius:var(--mdc-elevated-card-container-shape)}.mat-mdc-card-outlined{border-width:var(--mdc-outlined-card-outline-width);border-style:solid;border-color:var(--mdc-outlined-card-outline-color);border-radius:var(--mdc-outlined-card-container-shape);background-color:var(--mdc-outlined-card-container-color);box-shadow:var(--mdc-outlined-card-container-elevation)}.mat-mdc-card-outlined .mdc-card::after{border-radius:var(--mdc-outlined-card-container-shape)}.mat-mdc-card-title{font-family:var(--mat-card-title-text-font);line-height:var(--mat-card-title-text-line-height);font-size:var(--mat-card-title-text-size);letter-spacing:var(--mat-card-title-text-tracking);font-weight:var(--mat-card-title-text-weight)}.mat-mdc-card-subtitle{color:var(--mat-card-subtitle-text-color);font-family:var(--mat-card-subtitle-text-font);line-height:var(--mat-card-subtitle-text-line-height);font-size:var(--mat-card-subtitle-text-size);letter-spacing:var(--mat-card-subtitle-text-tracking);font-weight:var(--mat-card-subtitle-text-weight)}.mat-mdc-card{position:relative}.mat-mdc-card-title,.mat-mdc-card-subtitle{display:block;margin:0}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle{padding:16px 16px 0}.mat-mdc-card-header{display:flex;padding:16px 16px 0}.mat-mdc-card-content{display:block;padding:0 16px}.mat-mdc-card-content:first-child{padding-top:16px}.mat-mdc-card-content:last-child{padding-bottom:16px}.mat-mdc-card-title-group{display:flex;justify-content:space-between;width:100%}.mat-mdc-card-avatar{height:40px;width:40px;border-radius:50%;flex-shrink:0;margin-bottom:16px;object-fit:cover}.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-avatar~.mat-mdc-card-header-text .mat-mdc-card-title{line-height:normal}.mat-mdc-card-sm-image{width:80px;height:80px}.mat-mdc-card-md-image{width:112px;height:112px}.mat-mdc-card-lg-image{width:152px;height:152px}.mat-mdc-card-xl-image{width:240px;height:240px}.mat-mdc-card-subtitle~.mat-mdc-card-title,.mat-mdc-card-title~.mat-mdc-card-subtitle,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-title,.mat-mdc-card-header .mat-mdc-card-header-text .mat-mdc-card-subtitle,.mat-mdc-card-title-group .mat-mdc-card-title,.mat-mdc-card-title-group .mat-mdc-card-subtitle{padding-top:0}.mat-mdc-card-content>:last-child:not(.mat-mdc-card-footer){margin-bottom:0}.mat-mdc-card-actions-align-end{justify-content:flex-end}'],encapsulation:2,changeDetection:0})}}return t})(),o=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275dir=e.FsC({type:t,selectors:[["mat-card-title"],["","mat-card-title",""],["","matCardTitle",""]],hostAttrs:[1,"mat-mdc-card-title"]})}}return t})(),m=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275dir=e.FsC({type:t,selectors:[["mat-card-content"]],hostAttrs:[1,"mat-mdc-card-content"]})}}return t})(),s=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275dir=e.FsC({type:t,selectors:[["mat-card-subtitle"],["","mat-card-subtitle",""],["","matCardSubtitle",""]],hostAttrs:[1,"mat-mdc-card-subtitle"]})}}return t})(),l=(()=>{class t{constructor(){this.align="start"}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275dir=e.FsC({type:t,selectors:[["mat-card-actions"]],hostAttrs:[1,"mat-mdc-card-actions","mdc-card__actions"],hostVars:2,hostBindings:function(a,r){2&a&&e.AVh("mat-mdc-card-actions-align-end","end"===r.align)},inputs:{align:"align"},exportAs:["matCardActions"]})}}return t})(),u=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=e.VBU({type:t,selectors:[["mat-card-header"]],hostAttrs:[1,"mat-mdc-card-header"],ngContentSelectors:x,decls:4,vars:0,consts:[[1,"mat-mdc-card-header-text"]],template:function(a,r){1&a&&(e.NAR(v),e.SdG(0),e.j41(1,"div",0),e.SdG(2,1),e.k0s(),e.SdG(3,2))},encapsulation:2,changeDetection:0})}}return t})(),g=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275dir=e.FsC({type:t,selectors:[["","mat-card-avatar",""],["","matCardAvatar",""]],hostAttrs:[1,"mat-mdc-card-avatar"]})}}return t})(),S=(()=>{class t{static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275mod=e.$C({type:t})}static{this.\u0275inj=e.G2t({imports:[i.yE,f.MD,i.yE]})}}return t})()}}]); \ No newline at end of file diff --git a/dist/3280.639c0e6febaf179a.js b/dist/3280.639c0e6febaf179a.js new file mode 100644 index 00000000..a0550b6a --- /dev/null +++ b/dist/3280.639c0e6febaf179a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[3280],{43280:(q,v,c)=>{c.r(v),c.d(v,{DfManageAppsTableComponent:()=>L});var i=c(10467),R=c(31635),M=c(62031),h=c(24784),x=c(55590),A=c(49894),k=c(16453),G=c(52493),$=c(74243),u=c(60177),S=c(45383),B=c(27468),D=c(99437),s=c(7673),f=c(18810),p=c(49910),n=c(17705),g=c(82298),U=c(95245),nn=c(18617),K=c(33609),Y=c(75351),tn=c(43615),T=c(88834),V=c(20060),d=c(9159),y=c(59115),I=c(89417),W=c(96695),w=c(32102),z=c(99631),j=c(2042),J=c(67575),H=c(82798),en=c(86600);function an(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",6),n.bIt("click",function(){n.eBV(t);const _=n.XpG();return n.Njj(_.createRow())}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",7),n.k0s()}if(2&e){const t=n.XpG();n.BMQ("aria-label",n.bMT(1,2,"newEntry")),n.R7$(2),n.Y8G("icon",t.faPlus)}}function on(e,o){if(1&e&&(n.j41(0,"mat-option",12),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=o.$implicit;n.Y8G("value",t.value),n.R7$(1),n.SpI(" ",n.bMT(2,2,t.label)," ")}}function cn(e,o){if(1&e&&(n.j41(0,"mat-form-field",9)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.j41(4,"mat-select",10),n.DNE(5,on,3,4,"mat-option",11),n.k0s()()),2&e){const t=n.XpG().ngIf;n.R7$(2),n.JRh(n.bMT(3,3,"accessUsage.filter.label")),n.R7$(2),n.Y8G("formControl",t.filter),n.R7$(1),n.Y8G("ngForOf",t.filterOptions)}}function _n(e,o){if(1&e&&(n.qex(0),n.DNE(1,cn,6,5,"mat-form-field",8),n.bVm()),2&e){const t=o.ngIf;n.R7$(1),n.Y8G("ngIf",t.available)}}function rn(e,o){if(1&e&&(n.j41(0,"mat-form-field",13)(1,"mat-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s(),n.nrm(4,"input",14),n.k0s()),2&e){const t=n.XpG();n.R7$(2),n.JRh(n.bMT(3,2,"search")),n.R7$(2),n.Y8G("formControl",t.currentFilter)}}function ln(e,o){1&e&&n.nrm(0,"mat-progress-bar",25)}function sn(e,o){if(1&e){const t=n.RV6();n.j41(0,"div",26)(1,"div",27),n.nrm(2,"fa-icon",28),n.j41(3,"span"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.j41(6,"button",29),n.bIt("click",function(){n.eBV(t);const _=n.XpG(2);return n.Njj(_.retryLastFetch())}),n.EFF(7),n.nI1(8,"transloco"),n.k0s()(),n.nrm(9,"df-error-detail",30),n.k0s()}if(2&e){const t=n.XpG(2);n.R7$(2),n.Y8G("icon",t.faTriangleExclamation),n.R7$(2),n.JRh(n.bMT(5,4,t.tableError.message)),n.R7$(3),n.SpI(" ",n.bMT(8,6,"retry")," "),n.R7$(2),n.Y8G("error",t.tableError)}}function pn(e,o){if(1&e&&(n.j41(0,"th",36),n.nI1(1,"async"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)||"tokens"===t.columnDef||"spend"===t.columnDef),n.BMQ("sortActionDescription",n.bMT(1,4,a.sortDescription(t.header))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.header)," ")}}function mn(e,o){if(1&e&&n.nrm(0,"fa-icon",28),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit,_=n.XpG(2);n.HbH(_.isCellActive(null==a?null:a.cell(t))?"active":"inactive"),n.Y8G("icon",_.activeIcon(_.isCellActive(null==a?null:a.cell(t))))}}function dn(e,o){if(1&e&&(n.j41(0,"span"),n.EFF(1),n.nI1(2,"number"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.JRh(n.bMT(2,1,t.tokens))}}function gn(e,o){if(1&e&&(n.qex(0),n.DNE(1,dn,3,3,"span",40),n.bVm()),2&e){const t=n.XpG().$implicit;n.XpG(4);const a=n.sdS(9);n.R7$(1),n.Y8G("ngIf",null!==t.tokens)("ngIfElse",a)}}function fn(e,o){if(1&e&&(n.j41(0,"span"),n.EFF(1),n.nI1(2,"currency"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.JRh(n.ii3(2,1,t.spendUsd,"USD","symbol","1.2-2"))}}function un(e,o){if(1&e&&(n.qex(0),n.DNE(1,fn,3,6,"span",40),n.bVm()),2&e){const t=n.XpG().$implicit;n.XpG(4);const a=n.sdS(9);n.R7$(1),n.Y8G("ngIf",null!==t.spendUsd)("ngIfElse",a)}}c(36225);const bn=function(e){return["/api-connections/role-based-access",e]},Mn=function(e){return{role:e}};function Dn(e,o){if(1&e&&(n.j41(0,"a",43),n.bIt("click",function(a){return a.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.Y8G("routerLink",n.eq3(6,bn,t.roleId)),n.BMQ("aria-label",n.i5U(1,3,"apps.virtualKey.roleLink",n.eq3(8,Mn,t.role))),n.R7$(2),n.SpI(" ",t.role," ")}}function Cn(e,o){if(1&e&&n.EFF(0),2&e){const t=n.XpG(2).$implicit;n.JRh(t.role)}}function hn(e,o){if(1&e&&(n.qex(0),n.DNE(1,Dn,3,10,"a",41),n.DNE(2,Cn,1,1,"ng-template",null,42,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG().$implicit;n.R7$(1),n.Y8G("ngIf",null!==a.roleId&&a.role)("ngIfElse",t)}}function En(e,o){if(1&e&&(n.qex(0),n.EFF(1),n.bVm()),2&e){const t=n.XpG().$implicit,a=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",null==a?null:a.cell(t)," ")}}function vn(e,o){if(1&e&&n.nrm(0,"df-access-usage-cell",44),2&e){const t=n.XpG().$implicit,a=n.XpG(4);let _,l;n.Y8G("usage",null==a.accessUsage?null:a.accessUsage.get(t.id))("staleDays",null!==(_=null==a.accessUsage?null:a.accessUsage.staleDays)&&void 0!==_?_:null)("trackingStartedAt",null!==(l=null==a.accessUsage?null:a.accessUsage.trackingStartedAt)&&void 0!==l?l:null)}}function Tn(e,o){if(1&e&&(n.j41(0,"td",37),n.DNE(1,mn,1,3,"fa-icon",38),n.DNE(2,gn,2,2,"ng-container",3),n.DNE(3,un,2,2,"ng-container",3),n.DNE(4,hn,4,2,"ng-container",3),n.DNE(5,En,2,1,"ng-container",3),n.DNE(6,vn,1,3,"df-access-usage-cell",39),n.k0s()),2&e){const t=n.XpG(2).$implicit,a=n.XpG(2);n.AVh("df-numeric",a.isNumericColumn(t.columnDef)||"tokens"===t.columnDef||"spend"===t.columnDef),n.R7$(1),n.Y8G("ngIf","active"===t.columnDef),n.R7$(1),n.Y8G("ngIf","tokens"===t.columnDef),n.R7$(1),n.Y8G("ngIf","spend"===t.columnDef),n.R7$(1),n.Y8G("ngIf","role"===t.columnDef),n.R7$(1),n.Y8G("ngIf","active"!==t.columnDef&&"tokens"!==t.columnDef&&"spend"!==t.columnDef&&"role"!==t.columnDef&&"lastUsed"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","lastUsed"===t.columnDef)}}function yn(e,o){if(1&e&&(n.qex(0,33),n.DNE(1,pn,4,8,"th",34),n.DNE(2,Tn,7,8,"td",35),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function In(e,o){if(1&e&&(n.j41(0,"th",47),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e){const t=n.XpG(2).$implicit;n.R7$(1),n.SpI(" ",n.bMT(2,1,t.header)," ")}}const Pn=function(e,o,t){return{consumed:e,cap:o,period:t}};function On(e,o){if(1&e&&(n.qex(0),n.j41(1,"div",50),n.nI1(2,"transloco"),n.j41(3,"div",51),n.nrm(4,"div",52),n.k0s(),n.j41(5,"span",53),n.EFF(6),n.k0s()(),n.bVm()),2&e){const t=n.XpG().$implicit;n.R7$(1),n.HbH("df-meter--"+t.meter.variant),n.BMQ("aria-valuenow",t.meter.consumed)("aria-valuemax",t.meter.cap)("aria-label",n.i5U(2,8,"apps.virtualKey.meterAria",n.sMw(11,Pn,t.meter.consumed,t.meter.cap,t.meter.period))),n.R7$(3),n.xc7("width",100*t.meter.ratio,"%"),n.R7$(2),n.JRh(t.meter.label)}}function Rn(e,o){1&e&&(n.j41(0,"span",54),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(1),n.JRh(n.bMT(2,1,"apps.virtualKey.noCap")))}function xn(e,o){if(1&e&&(n.j41(0,"td",48),n.DNE(1,On,7,15,"ng-container",40),n.DNE(2,Rn,3,3,"ng-template",null,49,n.C5r),n.k0s()),2&e){const t=o.$implicit,a=n.sdS(3);n.R7$(1),n.Y8G("ngIf",t.meter)("ngIfElse",a)}}function An(e,o){if(1&e&&(n.qex(0,33),n.DNE(1,In,3,3,"th",45),n.DNE(2,xn,4,2,"td",46),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function kn(e,o){1&e&&n.nrm(0,"th",58)}const F=function(e){return{param:e}};function Gn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",63),n.bIt("click",function(){n.eBV(t);const _=n.XpG(3).$implicit,l=n.XpG(4);return n.Njj(l.actions.additional[0].function(_))})("click",function(_){return _.stopPropagation()}),n.nI1(1,"transloco"),n.nrm(2,"fa-icon",64),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(5,F,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.Y8G("icon",t.actions.additional[0].icon)}}function $n(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",65),n.bIt("click",function(){n.eBV(t);const _=n.XpG(3).$implicit,l=n.XpG(4);return n.Njj(l.actions.additional[0].function(_))})("click",function(_){return _.stopPropagation()}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=n.XpG(7);n.BMQ("aria-label",n.i5U(1,2,t.actions.additional[0].ariaLabel.key,n.eq3(7,F,t.actions.additional[0].ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,5,t.actions.additional[0].label)," ")}}function Sn(e,o){if(1&e&&(n.qex(0),n.DNE(1,Gn,3,7,"button",61),n.DNE(2,$n,4,9,"ng-template",null,62,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(6);n.R7$(1),n.Y8G("ngIf",a.actions.additional[0].icon)("ngIfElse",t)}}function Bn(e,o){if(1&e){const t=n.RV6();n.j41(0,"button",69),n.bIt("click",function(){const l=n.eBV(t).$implicit,m=n.XpG(3).$implicit;return n.Njj(l.function(m))}),n.nI1(1,"transloco"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=o.$implicit,a=n.XpG(3).$implicit,_=n.XpG(4);n.Y8G("disabled",_.isActionDisabled(t,a)),n.BMQ("aria-label",n.i5U(1,3,t.ariaLabel.key,n.eq3(8,F,t.ariaLabel.param))),n.R7$(2),n.SpI(" ",n.bMT(3,6,t.label)," ")}}function Un(e,o){if(1&e&&(n.j41(0,"button",66),n.bIt("click",function(a){return a.stopPropagation()}),n.nrm(1,"fa-icon",64),n.k0s(),n.j41(2,"mat-menu",null,67),n.DNE(4,Bn,4,10,"button",68),n.k0s()),2&e){const t=n.sdS(3),a=n.XpG(6);n.Y8G("matMenuTriggerFor",t),n.R7$(1),n.Y8G("icon",a.faEllipsisV),n.R7$(3),n.Y8G("ngForOf",a.actions.additional)}}function wn(e,o){if(1&e&&(n.qex(0),n.DNE(1,Sn,4,2,"ng-container",40),n.DNE(2,Un,5,3,"ng-template",null,60,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(5);n.R7$(1),n.Y8G("ngIf",1===a.actions.additional.length)("ngIfElse",t)}}function jn(e,o){if(1&e&&(n.j41(0,"td",59),n.DNE(1,wn,4,2,"ng-container",3),n.k0s()),2&e){const t=n.XpG(4);n.R7$(1),n.Y8G("ngIf",t.actions.additional&&t.actions.additional.length>0)}}function Fn(e,o){if(1&e&&(n.qex(0,55),n.DNE(1,kn,1,0,"th",56),n.DNE(2,jn,2,1,"td",57),n.bVm()),2&e){const t=n.XpG().$implicit;n.Y8G("matColumnDef",t.columnDef)}}function Ln(e,o){if(1&e&&(n.qex(0),n.DNE(1,yn,3,1,"ng-container",31),n.DNE(2,An,3,1,"ng-container",31),n.DNE(3,Fn,3,1,"ng-container",32),n.bVm()),2&e){const t=o.$implicit;n.R7$(1),n.Y8G("ngIf","actions"!==t.columnDef&&"meter"!==t.columnDef),n.R7$(1),n.Y8G("ngIf","meter"===t.columnDef),n.R7$(1),n.Y8G("ngIf","actions"===t.columnDef)}}function Xn(e,o){1&e&&n.nrm(0,"tr",70)}function Nn(e,o){if(1&e){const t=n.RV6();n.j41(0,"tr",71),n.bIt("click",function(){const l=n.eBV(t).$implicit,m=n.XpG(2);return n.Njj(m.callDefaultAction(l))})("keydown",function(_){const m=n.eBV(t).$implicit,b=n.XpG(2);return n.Njj(b.handleKeyDown(_,m))}),n.k0s()}if(2&e){const t=o.$implicit,a=n.XpG(2);n.AVh("clickable",a.isClickable(t)),n.BMQ("tabindex",a.isClickable(t)?0:-1)}}function Kn(e,o){if(1&e){const t=n.RV6();n.qex(0),n.EFF(1),n.nI1(2,"transloco"),n.j41(3,"button",75),n.bIt("click",function(){n.eBV(t);const _=n.XpG(4);return n.Njj(_.clearFilter())}),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.bVm()}2&e&&(n.R7$(1),n.SpI(" ",n.bMT(2,2,"noFilterResults")," "),n.R7$(3),n.SpI(" ",n.bMT(5,4,"clearFilter")," "))}function Yn(e,o){if(1&e){const t=n.RV6();n.j41(0,"df-empty-state",76),n.bIt("action",function(){n.eBV(t);const _=n.XpG(4);return n.Njj(_.createRow())}),n.nI1(1,"transloco"),n.nI1(2,"transloco"),n.nI1(3,"transloco"),n.k0s()}if(2&e){const t=n.XpG(4);n.Y8G("title",n.bMT(1,3,"apps.virtualKey.empty.title"))("description",n.bMT(2,5,"apps.virtualKey.empty.description"))("actionLabel",t.allowCreate?n.bMT(3,7,"apps.virtualKey.empty.action"):void 0)}}function Vn(e,o){if(1&e&&(n.qex(0),n.DNE(1,Kn,6,6,"ng-container",40),n.DNE(2,Yn,4,9,"ng-template",null,74,n.C5r),n.bVm()),2&e){const t=n.sdS(3),a=n.XpG(3);n.R7$(1),n.Y8G("ngIf",a.currentFilter.value||(null==a.accessUsage?null:a.accessUsage.filterActive))("ngIfElse",t)}}function Wn(e,o){if(1&e&&(n.j41(0,"tr",72)(1,"td",73),n.DNE(2,Vn,4,2,"ng-container",3),n.k0s()()),2&e){const t=n.XpG(2);n.R7$(1),n.BMQ("colspan",t.columns.length),n.R7$(1),n.Y8G("ngIf","loading"!==t.tableState&&"error"!==t.tableState)}}function zn(e,o){if(1&e){const t=n.RV6();n.qex(0),n.DNE(1,ln,1,0,"mat-progress-bar",15),n.DNE(2,sn,10,8,"div",16),n.j41(3,"div",17)(4,"table",18),n.bIt("matSortChange",function(_){n.eBV(t);const l=n.XpG();return n.Njj(l.announceSortChange(_))}),n.DNE(5,Ln,4,3,"ng-container",19),n.DNE(6,Xn,1,0,"tr",20),n.DNE(7,Nn,1,3,"tr",21),n.DNE(8,Wn,3,2,"tr",22),n.k0s(),n.j41(9,"div",23)(10,"mat-paginator",24),n.bIt("page",function(_){n.eBV(t);const l=n.XpG();return n.Njj(l.changePage(_))}),n.k0s()()(),n.bVm()}if(2&e){const t=o.ngIf,a=n.XpG();n.R7$(1),n.Y8G("ngIf","loading"===a.tableState),n.R7$(1),n.Y8G("ngIf","error"===a.tableState&&a.tableError),n.R7$(1),n.AVh("table-stale","loading"===a.tableState),n.R7$(1),n.Y8G("dataSource",a.dataSource),n.R7$(1),n.Y8G("ngForOf",a.columns),n.R7$(1),n.Y8G("matHeaderRowDef",a.displayedColumns),n.R7$(1),n.Y8G("matRowDefColumns",a.displayedColumns),n.R7$(3),n.Y8G("pageSize",t.currentPageSize)("pageSizeOptions",a.pageSizes)("length",a.tableLength)}}function Jn(e,o){1&e&&(n.j41(0,"span",54),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(1),n.JRh(n.bMT(2,1,"apps.virtualKey.noUsage")))}const Hn=[[["","topActions",""]]],Qn=function(e){return{currentPageSize:e}},Zn=["[topActions]"];let L=class N extends M.Py{constructor(o,t,a,_,l,m,b,C,P,qn){var O;super(l,m,b,C,P),O=this,this.appsService=o,this.limitService=t,this.usageService=a,this.systemConfigDataService=_,this.snackbarService=qn,this.emptyStateMessage="emptyState.apps.message",this.emptyStateActionLabel="emptyState.apps.action",this.usageByApp=new Map,this.meterByRole=new Map,this.columns=[{columnDef:"active",cell:r=>r.active,header:"active"},{columnDef:"name",cell:r=>r.name,header:"name"},{columnDef:"role",cell:r=>r.role,header:"role"},{columnDef:"apiKey",cell:r=>r.apiKey,header:"apiKey"},{columnDef:"tokens",cell:r=>r.tokens,header:"apps.virtualKey.tokens"},{columnDef:"spend",cell:r=>r.spendUsd,header:"apps.virtualKey.spend"},{columnDef:"meter",cell:r=>r.meter,header:"apps.virtualKey.rateLimit"},{columnDef:"actions"}],this.filterQuery=(0,x.J)("apps"),this.snackbarService.setSnackbarLastEle("",!1);const Q=[{label:"apps.launchApp",function:r=>{window.open(r.launchUrl,"_blank")},ariaLabel:{key:"apps.launchApp"},disabled:r=>!r.launchUrl},{label:"apps.createApp.apiKey.copy",function:r=>{navigator.clipboard.writeText(r.apiKey)},ariaLabel:{key:"apps.createApp.apiKey.copy"}},{label:"apps.createApp.apiKey.refresh",function:(r=(0,i.A)(function*(E){const Z=yield(0,k.X)(O.systemConfigDataService.environment.server.host,E.name);O.appsService.update(E.id,{api_key:Z}).subscribe(()=>O.refreshTable())}),function(Z){return r.apply(this,arguments)}),ariaLabel:{key:"apps.createApp.apiKey.refresh"},disabled:r=>null===r.createdById}],X={label:"duplicate",function:r=>this.duplicateApp(r),ariaLabel:{key:"duplicateApp",param:"name"},icon:S.jPR};var r;if(this.actions.additional){const r=this.actions.additional.findIndex(E=>"delete"===E.label);-1!==r?this.actions.additional.splice(r,0,X):this.actions.additional.unshift(X),this.actions.additional.push(...Q)}else this.actions.additional=[X,...Q];this.loadMetrics(),this.enableAccessUsage("app",{header:"accessUsage.lastUsed",before:"tokens"})}mapDataToTable(o){return o.map(t=>this.enrich(this.baseRow(t)))}baseRow(o){return{id:o.id,name:o.name,role:o.roleByRoleId?.description||"",roleId:o.roleId??null,apiKey:o.apiKey,description:o.description,active:o.isActive,launchUrl:o.launchUrl,createdById:o.createdById,tokens:null,spendUsd:null,meter:null}}enrich(o){const t=this.usageByApp.get(o.id),a=null!=o.roleId?this.meterByRole.get(o.roleId):null;return{...o,tokens:t?t.tokens:null,spendUsd:t?t.spend:null,meter:a??null}}loadMetrics(){(0,B.p)({usage:this.usageService.loadAll("30d").pipe((0,D.W)(()=>(0,s.of)(null))),limits:this.limitService.getAll({limit:0,related:"limit_cache_by_limit_id"}).pipe((0,D.W)(()=>(0,s.of)(null)))}).subscribe(({usage:o,limits:t})=>{if(o){this.usageByApp.clear();for(const a of o.raw.by_app??[])null!=a.app_id&&this.usageByApp.set(a.app_id,{tokens:(0,p.n)(a.input_tokens)+(0,p.n)(a.output_tokens),spend:(0,p.n)(a.cost_usd)})}t&&(this.meterByRole=this.buildMeters(t.resource??[])),this.enrichExistingRows()})}buildMeters(o){const t=new Map;for(const a of o){if(!a.isActive||null==a.roleId)continue;const _=a.limitCacheByLimitId?.[0],l=_?.max??a.rate;if(!l||l<=0)continue;const b=this.toMeter(_?.attempts??0,l,a.period),C=t.get(a.roleId);(!C||b.ratio>C.ratio)&&t.set(a.roleId,b)}return t}toMeter(o,t,a){const _=Math.max(0,Math.min(1,t>0?o/t:0));let l="ok";return _>=.9?l="danger":_>=.75&&(l="warning"),{consumed:o,cap:t,ratio:_,period:a,variant:l,label:`${o} / ${t}`}}enrichExistingRows(){this.dataSource.data.length&&(this.dataSource.data=this.dataSource.data.map(o=>this.enrich(o)))}deleteRow(o){this.appsService.delete(o.id).subscribe(()=>{this.refreshTable()})}refreshTable(o,t,a){this.fetchTable(this.appsService,{limit:o,offset:t,filter:a})}duplicateApp(o){this.appsService.get(o.id).pipe((0,D.W)(t=>(console.error("Failed to fetch app details:",t),(0,f.$)(()=>t)))).subscribe(t=>{this.appsService.getAll({limit:1e3}).subscribe(a=>{const _=a.resource.map(m=>m.name);this.dialog.open(G.B,{width:"400px",data:{title:"apps.duplicate.title",message:"apps.duplicate.message",label:"apps.duplicate.nameLabel",originalName:t.name,existingNames:_}}).afterClosed().subscribe(m=>{m&&this.appsService.create({resource:[{name:m,description:`${t.description||""} (copy)`,is_active:t.isActive,type:t.type,role_id:t.roleId||null,url:t.url||null,storage_service_id:t.storageServiceId||null,storage_container:t.storageContainer||null,path:t.path||null,requires_fullscreen:t.requiresFullscreen,allow_fullscreen_toggle:t.allowFullscreenToggle,toggle_location:t.toggleLocation}]},{snackbarSuccess:"apps.alerts.duplicateSuccess",fields:"*",related:"role_by_role_id"}).pipe((0,D.W)(P=>(console.error("Failed to duplicate app:",P),(0,f.$)(()=>P)))).subscribe(()=>{this.refreshTable()})})})})}static{this.\u0275fac=function(t){return new(t||N)(n.rXU(h.u7),n.rXU(h.gu),n.rXU(p.D_),n.rXU(g.f),n.rXU(U.Ix),n.rXU(U.nX),n.rXU(nn.Ai),n.rXU(K.JO),n.rXU(Y.bZ),n.rXU(tn.L))}}static{this.\u0275cmp=n.VBU({type:N,selectors:[["df-manage-apps-table"]],standalone:!0,features:[n.Vt3,n.aNF],ngContentSelectors:Zn,decls:10,vars:8,consts:[[1,"top-action-bar"],["mat-mini-fab","","class","save-btn","data-testid","manage-table-create","type","button",3,"click",4,"ngIf"],[1,"spacer"],[4,"ngIf"],["class","search-input","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["noMetric",""],["mat-mini-fab","","data-testid","manage-table-create","type","button",1,"save-btn",3,"click"],["size","xl",3,"icon"],["class","df-usage-filter","data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",4,"ngIf"],["data-testid","access-usage-filter","appearance","outline","subscriptSizing","dynamic",1,"df-usage-filter"],[3,"formControl"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["appearance","outline","subscriptSizing","dynamic",1,"search-input"],["matInput","",3,"formControl"],["class","table-loading-bar","mode","indeterminate",4,"ngIf"],["class","table-error-panel",4,"ngIf"],[1,"table-container"],["mat-table","","matSort","",3,"dataSource","matSortChange"],[4,"ngFor","ngForOf"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",3,"clickable","click","keydown",4,"matRowDef","matRowDefColumns"],["class","mat-row no-data-row",4,"matNoDataRow"],[1,"bottom-action-bar"],["showFirstLastButtons","","aria-label","'selectPage' | transloco",3,"pageSize","pageSizeOptions","length","page"],["mode","indeterminate",1,"table-loading-bar"],[1,"table-error-panel"],[1,"table-error-headline"],["size","lg",3,"icon"],["mat-stroked-button","","type","button",3,"click"],[3,"error"],[3,"matColumnDef",4,"ngIf"],["stickyEnd","",3,"matColumnDef",4,"ngIf"],[3,"matColumnDef"],["mat-header-cell","","mat-sort-header","","class","df-eyebrow",3,"df-numeric",4,"matHeaderCellDef"],["mat-cell","",3,"df-numeric",4,"matCellDef"],["mat-header-cell","","mat-sort-header","",1,"df-eyebrow"],["mat-cell",""],["size","lg",3,"icon","class",4,"ngIf"],[3,"usage","staleDays","trackingStartedAt",4,"ngIf"],[4,"ngIf","ngIfElse"],["class","df-role-link",3,"routerLink","click",4,"ngIf","ngIfElse"],["plainRole",""],[1,"df-role-link",3,"routerLink","click"],[3,"usage","staleDays","trackingStartedAt"],["mat-header-cell","","class","df-eyebrow",4,"matHeaderCellDef"],["mat-cell","","class","df-meter-cell",4,"matCellDef"],["mat-header-cell","",1,"df-eyebrow"],["mat-cell","",1,"df-meter-cell"],["noCap",""],["role","meter",1,"df-meter"],[1,"df-meter-track"],[1,"df-meter-fill"],[1,"df-meter-label","df-numeric"],[1,"df-metric-empty"],["stickyEnd","",3,"matColumnDef"],["mat-header-cell","",4,"matHeaderCellDef"],["class","actions df-row-actions","mat-cell","",4,"matCellDef"],["mat-header-cell",""],["mat-cell","",1,"actions","df-row-actions"],["multiple",""],["class","action-btn","mat-icon-button","","type","button",3,"click",4,"ngIf","ngIfElse"],["regular",""],["mat-icon-button","","type","button",1,"action-btn",3,"click"],["size","xs",3,"icon"],["mat-flat-button","","color","primary","type","button",3,"click"],["mat-icon-button","","aria-label","Actions","type","button",3,"matMenuTriggerFor","click"],["actionsMenu","matMenu"],["type","button","mat-menu-item","",3,"disabled","click",4,"ngFor","ngForOf"],["type","button","mat-menu-item","",3,"disabled","click"],["mat-header-row",""],["mat-row","",3,"click","keydown"],[1,"mat-row","no-data-row"],[1,"mat-cell"],["noFilterActive",""],["mat-button","","color","primary","type","button",3,"click"],[3,"title","description","actionLabel","action"]],template:function(t,a){1&t&&(n.NAR(Hn),n.j41(0,"div",0),n.DNE(1,an,3,4,"button",1),n.SdG(2),n.nrm(3,"div",2),n.DNE(4,_n,2,1,"ng-container",3),n.DNE(5,rn,5,4,"mat-form-field",4),n.k0s(),n.DNE(6,zn,11,11,"ng-container",3),n.nI1(7,"async"),n.DNE(8,Jn,3,3,"ng-template",null,5,n.C5r)),2&t&&(n.R7$(1),n.Y8G("ngIf",a.allowCreate),n.R7$(3),n.Y8G("ngIf",a.accessUsage),n.R7$(1),n.Y8G("ngIf",a.allowFilter),n.R7$(1),n.Y8G("ngIf",n.eq3(6,Qn,n.bMT(7,4,a.currentPageSize$))))},dependencies:[u.bT,T.Hl,T.$z,T.iY,T.$0,V.dX,V.aY,d.tP,d.Zl,d.tL,d.ji,d.cC,d.YV,d.iL,d.KS,d.$R,d.YZ,d.NB,d.ky,u.Sq,y.Cn,y.kk,y.fb,y.Cp,I.X1,I.me,I.BC,I.l_,K.Kj,u.Jj,Y.hM,W.Ou,W.iy,w.RG,w.rl,w.nJ,z.fS,z.fg,j.NQ,j.B4,j.aE,J.PO,J.HM,M.R6,M.Zn,H.Ve,H.VO,en.wT,U.Wk,$.M,u.QX,u.oe],styles:[".df-health-chip[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:0;margin:0;border:none;background:transparent;font:inherit;color:inherit;cursor:pointer}.active[_ngcontent-%COMP%]{color:var(--df-success)}.inactive[_ngcontent-%COMP%], .log-warning[_ngcontent-%COMP%]{color:var(--df-danger)}.top-action-bar[_ngcontent-%COMP%]{width:100%;display:flex;flex-direction:row;align-items:center;gap:var(--df-space-3);padding-bottom:var(--df-space-3)}.top-action-bar[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{height:80%!important;max-width:300px!important}.top-action-bar[_ngcontent-%COMP%] .df-usage-filter[_ngcontent-%COMP%]{width:160px}.bottom-action-bar[_ngcontent-%COMP%]{margin-top:var(--df-space-4);display:flex;flex-direction:row;justify-content:center}.table-container[_ngcontent-%COMP%]{width:100%;overflow-y:auto}.table-container.table-stale[_ngcontent-%COMP%]{opacity:.6;pointer-events:none}.table-loading-bar[_ngcontent-%COMP%]{margin-bottom:2px}.table-error-panel[_ngcontent-%COMP%]{margin-bottom:var(--df-space-3);padding:var(--df-space-3) var(--df-space-4);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm);background-color:var(--df-danger-soft);color:var(--df-text)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);margin-bottom:var(--df-space-2)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.table-error-panel[_ngcontent-%COMP%] .table-error-headline[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;font-size:1.4rem}.no-data-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:1.35rem}.empty-state[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:var(--df-space-4);padding:var(--df-space-4);text-align:center}.empty-state[_ngcontent-%COMP%] .empty-state-message[_ngcontent-%COMP%]{margin:0;max-width:46rem;color:var(--df-text-muted);font-size:1.4rem;line-height:1.5}.mat-mdc-row[_ngcontent-%COMP%]{height:var(--df-row-height)!important}.mat-mdc-cell[_ngcontent-%COMP%], .mat-mdc-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid var(--df-border-2)}.mat-mdc-cell.df-numeric[_ngcontent-%COMP%], .mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%]{text-align:right}.mat-mdc-header-cell.df-numeric[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{justify-content:flex-end}.df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{opacity:0;transition:opacity var(--df-duration-fast) var(--df-ease-standard)}.mat-mdc-row[_ngcontent-%COMP%]:hover .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .mat-mdc-row[_ngcontent-%COMP%]:focus-within .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .df-row-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus-visible{opacity:1}.clickable.mat-mdc-row[_ngcontent-%COMP%]{outline:0}.clickable.mat-mdc-row[_ngcontent-%COMP%] .mat-mdc-cell[_ngcontent-%COMP%]{cursor:pointer}.clickable.mat-mdc-row[_ngcontent-%COMP%]:hover .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-hover)}.clickable.mat-mdc-row[_ngcontent-%COMP%]:focus .mat-mdc-cell[_ngcontent-%COMP%], .clickable.mat-mdc-row[_ngcontent-%COMP%]:focus-within .mat-mdc-cell[_ngcontent-%COMP%]{background-color:var(--df-accent-soft)} [mat-sort-header].cdk-keyboard-focused .mat-sort-header-container, [mat-sort-header].cdk-program-focused[_ngcontent-%COMP%] .mat-sort-header-container[_ngcontent-%COMP%]{border-bottom:unset!important}",".mat-column-apiKey[_ngcontent-%COMP%]{max-width:300px;text-overflow:ellipsis}.mat-column-tokens[_ngcontent-%COMP%], .mat-column-spend[_ngcontent-%COMP%]{white-space:nowrap}.df-role-link[_ngcontent-%COMP%]{color:var(--df-accent);text-decoration:none;cursor:pointer}.df-role-link[_ngcontent-%COMP%]:hover, .df-role-link[_ngcontent-%COMP%]:focus-visible{text-decoration:underline}.df-role-link[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--df-accent);outline-offset:2px;border-radius:var(--df-radius-sm)}.df-metric-empty[_ngcontent-%COMP%]{color:var(--df-text-faint);font-size:1.2rem}.df-meter-cell[_ngcontent-%COMP%]{min-width:14rem}.df-meter[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2)}.df-meter-track[_ngcontent-%COMP%]{position:relative;flex:1;height:.6rem;min-width:6rem;border-radius:var(--df-radius-sm);background:var(--df-surface-2);border:1px solid var(--df-border);overflow:hidden}.df-meter-fill[_ngcontent-%COMP%]{height:100%;border-radius:inherit;background:var(--df-accent);transition:width .24s ease}.df-meter--warning[_ngcontent-%COMP%] .df-meter-fill[_ngcontent-%COMP%]{background:var(--df-warning)}.df-meter--danger[_ngcontent-%COMP%] .df-meter-fill[_ngcontent-%COMP%]{background:var(--df-danger)}.df-meter-label[_ngcontent-%COMP%]{flex:none;font-size:1.2rem;color:var(--df-text-muted)}.df-meter--warning[_ngcontent-%COMP%] .df-meter-label[_ngcontent-%COMP%]{color:var(--df-warning)}.df-meter--danger[_ngcontent-%COMP%] .df-meter-label[_ngcontent-%COMP%]{color:var(--df-danger)}"]})}};L=(0,R.Cg)([(0,A.d)({checkProperties:!0})],L)},74243:(q,v,c)=>{c.d(v,{M:()=>D});var i=c(17705),R=c(60177),M=c(88834),h=c(99213);function x(s,f){if(1&s&&(i.j41(0,"div",5)(1,"mat-icon"),i.EFF(2),i.k0s()()),2&s){const p=i.XpG();i.R7$(2),i.JRh(p.icon)}}function A(s,f){if(1&s&&(i.j41(0,"p",6),i.EFF(1),i.k0s()),2&s){const p=i.XpG();i.R7$(1),i.JRh(p.description)}}function k(s,f){if(1&s&&(i.j41(0,"mat-icon"),i.EFF(1),i.k0s()),2&s){const p=i.XpG(3);i.R7$(1),i.JRh(p.actionIcon)}}function G(s,f){if(1&s){const p=i.RV6();i.j41(0,"button",10),i.bIt("click",function(){i.eBV(p);const g=i.XpG(2);return i.Njj(g.action.emit())}),i.DNE(1,k,2,1,"mat-icon",11),i.EFF(2),i.k0s()}if(2&s){const p=i.XpG(2);i.R7$(1),i.Y8G("ngIf",p.actionIcon),i.R7$(1),i.SpI(" ",p.actionLabel," ")}}function $(s,f){if(1&s){const p=i.RV6();i.j41(0,"button",12),i.bIt("click",function(){i.eBV(p);const g=i.XpG(2);return i.Njj(g.secondaryAction.emit())}),i.EFF(1),i.k0s()}if(2&s){const p=i.XpG(2);i.R7$(1),i.SpI(" ",p.secondaryLabel," ")}}function u(s,f){if(1&s&&(i.j41(0,"div",7),i.DNE(1,G,3,2,"button",8),i.DNE(2,$,2,1,"button",9),i.k0s()),2&s){const p=i.XpG();i.R7$(1),i.Y8G("ngIf",p.actionLabel),i.R7$(1),i.Y8G("ngIf",p.secondaryLabel)}}const S=[[["","emptyStateIcon",""]],[["","emptyStateSnippet",""]]],B=["[emptyStateIcon]","[emptyStateSnippet]"];let D=(()=>{class s{constructor(){this.title="",this.action=new i.bkB,this.secondaryAction=new i.bkB}static{this.\u0275fac=function(n){return new(n||s)}}static{this.\u0275cmp=i.VBU({type:s,selectors:[["df-empty-state"]],inputs:{icon:"icon",title:"title",description:"description",actionLabel:"actionLabel",actionIcon:"actionIcon",secondaryLabel:"secondaryLabel"},outputs:{action:"action",secondaryAction:"secondaryAction"},standalone:!0,features:[i.aNF],ngContentSelectors:B,decls:8,vars:4,consts:[["role","status",1,"empty-state"],["class","empty-state__icon","aria-hidden","true",4,"ngIf"],[1,"empty-state__title"],["class","empty-state__description",4,"ngIf"],["class","empty-state__actions",4,"ngIf"],["aria-hidden","true",1,"empty-state__icon"],[1,"empty-state__description"],[1,"empty-state__actions"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-action",3,"click",4,"ngIf"],["mat-stroked-button","","type","button","data-testid","empty-state-secondary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-action",3,"click"],[4,"ngIf"],["mat-stroked-button","","type","button","data-testid","empty-state-secondary",3,"click"]],template:function(n,g){1&n&&(i.NAR(S),i.j41(0,"div",0),i.DNE(1,x,3,1,"div",1),i.SdG(2),i.j41(3,"h3",2),i.EFF(4),i.k0s(),i.DNE(5,A,2,1,"p",3),i.DNE(6,u,3,2,"div",4),i.SdG(7,1),i.k0s()),2&n&&(i.R7$(1),i.Y8G("ngIf",g.icon),i.R7$(3),i.JRh(g.title),i.R7$(1),i.Y8G("ngIf",g.description),i.R7$(1),i.Y8G("ngIf",g.actionLabel||g.secondaryLabel))},dependencies:[R.bT,M.Hl,M.$z,h.m_,h.An],styles:[".empty-state[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:var(--df-space-3);margin:0 auto;max-width:44ch;padding:var(--df-space-8) var(--df-space-5);text-align:center}.empty-state__icon[_ngcontent-%COMP%]{align-items:center;background:var(--df-accent-soft);border-radius:var(--df-radius);color:var(--df-accent);display:inline-flex;height:var(--df-space-8);justify-content:center;width:var(--df-space-8)}.empty-state__icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:var(--df-font-size-2xl);height:var(--df-font-size-2xl);line-height:1;width:var(--df-font-size-2xl)}.empty-state__title[_ngcontent-%COMP%]{color:var(--df-text);font-size:var(--df-font-size-lg);font-weight:var(--df-font-weight-heading);letter-spacing:var(--df-tracking-tight);line-height:var(--df-lh-tight);margin:0}.empty-state__description[_ngcontent-%COMP%]{color:var(--df-text-2);font-size:var(--df-font-size-sm);line-height:var(--df-lh-base);margin:0}.empty-state__actions[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:var(--df-space-2);justify-content:center;margin-top:var(--df-space-1)}"],changeDetection:0})}}return s})()}}]); \ No newline at end of file diff --git a/dist/3281.5fedd5cbe8525104.js b/dist/3281.5fedd5cbe8525104.js new file mode 100644 index 00000000..b0542d9d --- /dev/null +++ b/dist/3281.5fedd5cbe8525104.js @@ -0,0 +1 @@ +(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[3281],{63281:(ne,re,q)=>{"use strict";q.d(re,{s:()=>l});var R=q(6507),B=q(17705),T=q(89417),L=q(19468),M=q(52868);const a=["editor"];let l=(()=>{class r{constructor(){this.mode=L.Q.TEXT,this.readonly=!1,this.valueChange=new B.bkB,this.suppressChange=!1,this.themeService=(0,B.WQX)(M.n),this.isDarkMode=this.themeService.darkMode$}ngAfterViewInit(){this.init(this.elementRef,this.mode)}writeValue(i){this.value=i,this.editor&&(this.suppressChange=!0,this.editor.setValue(i,-1),this.suppressChange=!1)}init(i,t=L.Q.TEXT){const e=document.querySelector("base")?.getAttribute("href")||"/";R.config.set("basePath",`${e}assets/ace-builds`),this.suppressChange=!0,this.editor=R.edit(i.nativeElement,{mode:`ace/mode/${this.getMode(t)}`,value:this.value,fontSize:12,showPrintMargin:!1,showGutter:!0,highlightActiveLine:!0,tabSize:2,readOnly:this.readonly,maxLines:50}),this.suppressChange=!1,this.editor.renderer.attachToShadowRoot(),this.editor.addEventListener("change",()=>{this.suppressChange||(this.valueChange.emit(this.editor.getValue()),this.onChange&&this.onChange(this.editor.getValue()),this.onTouched&&this.onTouched())})}registerOnChange(i){this.onChange=i}registerOnTouched(i){this.onTouched=i}ngOnChanges(i){this.editor&&(i.mode&&this.editor.session.setMode(`ace/mode/${this.getMode(i.mode.currentValue)}`),i.value&&this.setValue(i.value.currentValue))}setValue(i){this.suppressChange=!0,this.editor.setValue(i,-1),this.suppressChange=!1}scrollToBottom(){if(!this.editor)return;const i=this.editor.session.getLength();this.editor.scrollToLine(i,!1,!1,()=>{})}insertAtCursor(i){this.editor&&(this.editor.insert(i),this.editor.focus())}ngOnDestroy(){this.editor&&this.editor.destroy()}getMode(i){return"nodejs"===i?L.Q.JAVASCRIPT:i}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275cmp=B.VBU({type:r,selectors:[["df-ace-editor"]],viewQuery:function(t,e){if(1&t&&B.GBs(a,5),2&t){let n;B.mGM(n=B.lsd())&&(e.elementRef=n.first)}},inputs:{mode:"mode",readonly:"readonly",value:"value"},outputs:{valueChange:"valueChange"},standalone:!0,features:[B.Jv_([{provide:T.kq,useExisting:(0,B.Rfq)(()=>r),multi:!0}]),B.OA$,B.aNF],decls:2,vars:0,consts:[[1,"editor"],["editor",""]],template:function(t,e){1&t&&B.nrm(0,"div",0,1)},styles:[".editor[_ngcontent-%COMP%]{height:100%;min-height:400px;width:100%;background-color:#f0f0f0}"]})}}return r})()},19468:(ne,re,q)=>{"use strict";q.d(re,{Q:()=>R});var R=function(x){return x.JSON="json",x.YAML="yaml",x.TEXT="text",x.NODEJS="nodejs",x.PHP="php",x.PYTHON="python",x.PYTHON3="python3",x.JAVASCRIPT="javascript",x}(R||{})},6507:(ne,re,q)=>{ne=q.nmd(ne),function(){var x=function(){return this}();!x&&typeof window<"u"&&(x=window);var B=function(r,o,i){"string"==typeof r?(2==arguments.length&&(i=o),B.modules[r]||(B.payloads[r]=i,B.modules[r]=null)):B.original?B.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};B.modules={},B.payloads={};var T=function(r,o,i){if("string"==typeof o){var t=a(r,o);if(null!=t)return i&&i(),t}else if("[object Array]"===Object.prototype.toString.call(o)){for(var e=[],n=0,s=o.length;na.length)&&(M=a.length);var l=a.indexOf(L,M-=L.length);return-1!==l&&l===M}),String.prototype.repeat||T(String.prototype,"repeat",function(L){for(var M="",a=this;L>0;)1&L&&(M+=a),(L>>=1)&&(a+=a);return M}),String.prototype.includes||T(String.prototype,"includes",function(L,M){return-1!=this.indexOf(L,M)}),Object.assign||(Object.assign=function(L){if(null==L)throw new TypeError("Cannot convert undefined or null to object");for(var M=Object(L),a=1;a>>0,r=arguments[1]>>0,o=r<0?Math.max(a+r,0):Math.min(r,a),i=arguments[2],t=void 0===i?a:i>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);o0;)1&a&&(l+=M),(a>>=1)&&(M+=M);return l};var T=/^\s\s*/,L=/\s\s*$/;x.stringTrimLeft=function(M){return M.replace(T,"")},x.stringTrimRight=function(M){return M.replace(L,"")},x.copyObject=function(M){var a={};for(var l in M)a[l]=M[l];return a},x.copyArray=function(M){for(var a=[],l=0,r=M.length;l65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(R,x,B){"use strict";x.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},x.getOS=function(){return x.isMac?x.OS.MAC:x.isLinux?x.OS.LINUX:x.OS.WINDOWS};var T="object"==typeof navigator?navigator:{},L=(/mac|win|linux/i.exec(T.platform)||["other"])[0].toLowerCase(),M=T.userAgent||"",a=T.appName||"";x.isWin="win"==L,x.isMac="mac"==L,x.isLinux="linux"==L,x.isIE="Microsoft Internet Explorer"==a||a.indexOf("MSAppHost")>=0?parseFloat((M.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((M.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),x.isOldIE=x.isIE&&x.isIE<9,x.isGecko=x.isMozilla=M.match(/ Gecko\/\d+/),x.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),x.isWebKit=parseFloat(M.split("WebKit/")[1])||void 0,x.isChrome=parseFloat(M.split(" Chrome/")[1])||void 0,x.isSafari=parseFloat(M.split(" Safari/")[1])&&!x.isChrome||void 0,x.isEdge=parseFloat(M.split(" Edge/")[1])||void 0,x.isAIR=M.indexOf("AdobeAIR")>=0,x.isAndroid=M.indexOf("Android")>=0,x.isChromeOS=M.indexOf(" CrOS ")>=0,x.isIOS=/iPad|iPhone|iPod/.test(M)&&!window.MSStream,x.isIOS&&(x.isMac=!0),x.isMobile=x.isIOS||x.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(R,x,B){"use strict";var T=R("./useragent");x.buildDom=function i(t,e,n){if("string"==typeof t&&t){var s=document.createTextNode(t);return e&&e.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var h=[],d=0;d"u")){if(a)if(e)l();else if(!1===e)return a.push([i,t]);if(!M){var n=e;e&&e.getRootNode?(!(n=e.getRootNode())||n==e)&&(n=document):n=document;var s=n.ownerDocument||n;if(t&&x.hasCssString(t,n))return null;t&&(i+="\n/*# sourceURL=ace/css/"+t+" */");var h=x.createElement("style");h.appendChild(s.createTextNode(i)),t&&(h.id=t),n==s&&(n=x.getDocumentHead(s)),n.insertBefore(h,n.firstChild)}}}if(x.useStrictCSP=function(i){M=i,0==i?l():a||(a=[])},x.importCssString=r,x.importCssStylsheet=function(i,t){x.buildDom(["link",{rel:"stylesheet",href:i}],x.getDocumentHead(t))},x.$fixPositionBug=function(i){var t=i.getBoundingClientRect();if(i.style.left){var e=parseFloat(i.style.left),n=+t.left;Math.abs(e-n)>1&&(i.style.left=2*e-n+"px")}i.style.right&&(e=parseFloat(i.style.right),n=window.innerWidth-t.right,Math.abs(e-n)>1&&(i.style.right=2*e-n+"px")),i.style.top&&(e=parseFloat(i.style.top),n=+t.top,Math.abs(e-n)>1&&(i.style.top=2*e-n+"px")),i.style.bottom&&(e=parseFloat(i.style.bottom),n=window.innerHeight-t.bottom,Math.abs(e-n)>1&&(i.style.bottom=2*e-n+"px"))},x.scrollbarWidth=function(i){var t=x.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=x.createElement("ace_outer"),n=e.style;n.position="absolute",n.left="-10000px",n.overflow="hidden",n.width="200px",n.minWidth="0px",n.height="150px",n.display="block",e.appendChild(t);var s=i&&i.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var h=t.offsetWidth;n.overflow="scroll";var d=t.offsetWidth;return h===d&&(d=e.clientWidth),s.removeChild(e),h-d},x.computedStyle=function(i,t){return window.getComputedStyle(i,"")||{}},x.setStyle=function(i,t,e){i[t]!==e&&(i[t]=e)},x.HAS_CSS_ANIMATION=!1,x.HAS_CSS_TRANSFORMS=!1,x.HI_DPI=!T.isWin||typeof window<"u"&&window.devicePixelRatio>=1.5,T.isChromeOS&&(x.HI_DPI=!1),typeof document<"u"){var o=document.createElement("div");x.HI_DPI&&void 0!==o.style.transform&&(x.HAS_CSS_TRANSFORMS=!0),!T.isEdge&&typeof o.style.animationName<"u"&&(x.HAS_CSS_ANIMATION=!0),o=null}x.translate=x.HAS_CSS_TRANSFORMS?function(i,t,e){i.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:function(i,t,e){i.style.top=Math.round(e)+"px",i.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(R,x,B){"use strict";var T=R("./dom");x.get=function(L,M){var a=new XMLHttpRequest;a.open("GET",L,!0),a.onreadystatechange=function(){4===a.readyState&&M(a.responseText)},a.send(null)},x.loadScript=function(L,M){var a=T.getDocumentHead(),l=document.createElement("script");l.src=L,a.appendChild(l),l.onload=l.onreadystatechange=function(r,o){(o||!l.readyState||"loaded"==l.readyState||"complete"==l.readyState)&&(l=l.onload=l.onreadystatechange=null,o||M())}},x.qualifyURL=function(L){var M=document.createElement("a");return M.href=L,M.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(R,x,B){"use strict";x.inherits=function(T,L){T.super_=L,T.prototype=Object.create(L.prototype,{constructor:{value:T,enumerable:!1,writable:!0,configurable:!0}})},x.mixin=function(T,L){for(var M in L)T[M]=L[M];return T},x.implement=function(T,L){x.mixin(T,L)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(R,x,B){"use strict";var T={},L=function(){this.propagationStopped=!0},M=function(){this.defaultPrevented=!0};T._emit=T._dispatchEvent=function(a,l){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[a]||[],o=this._defaultHandlers[a];if(r.length||o){("object"!=typeof l||!l)&&(l={}),l.type||(l.type=a),l.stopPropagation||(l.stopPropagation=L),l.preventDefault||(l.preventDefault=M),r=r.slice();for(var i=0;i1&&(h=n[n.length-2]);var g=l[e+"Path"];return null==g?g=l.basePath:"/"==s&&(e=s=""),g&&"/"!=g.slice(-1)&&(g+="/"),g+e+s+h+this.get("suffix")},x.setModuleUrl=function(t,e){return l.$moduleUrls[t]=e},x.setLoader=function(t){o=t},x.dynamicModules=Object.create(null),x.$loading={},x.$loaded={},x.loadModule=function(t,e){var n;if(Array.isArray(t))var s=t[0],h=t[1];else"string"==typeof t&&(h=t);var d=function(g){if(g&&!x.$loading[h])return e&&e(g);if(x.$loading[h]||(x.$loading[h]=[]),x.$loading[h].push(e),!(x.$loading[h].length>1)){var p=function(){!function(t,e){"ace/theme/textmate"===t||"./theme/textmate"===t?e(0,R("./theme/textmate")):o?o(t,e):console.error("loader is not configured")}(h,function(b,y){y&&(x.$loaded[h]=y),x._emit("load.module",{name:h,module:y});var f=x.$loading[h];x.$loading[h]=null,f.forEach(function(C){C&&C(y)})})};if(!x.get("packaged"))return p();L.loadScript(x.moduleUrl(h,s),p),i()}};if(x.dynamicModules[h])x.dynamicModules[h]().then(function(g){d(g.default?g.default:g)});else{try{n=this.$require(h)}catch{}d(n||x.$loaded[h])}},x.$require=function(t){if("function"==typeof B.require)return B.require(t)},x.setModuleLoader=function(t,e){x.dynamicModules[t]=e};var i=function(){!l.basePath&&!l.workerPath&&!l.modePath&&!l.themePath&&!Object.keys(l.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),i=function(){})};x.version="1.43.5"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(R,x,B){"use strict";R("./lib/fixoldbrowsers");var T=R("./config");T.setLoader(function(l,r){R([l],function(o){r(null,o)})});var L=function(){return this||typeof window<"u"&&window}();function M(l){if(L&&L.document){T.set("packaged",l||R.packaged||B.packaged||L.define&&q.amdD.packaged);var r={},o="",i=document.currentScript||document._currentScript,t=i&&i.ownerDocument||document;i&&i.src&&(o=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),n=0;n ["+this.end.row+"/"+this.end.column+"]"},L.prototype.contains=function(M,a){return 0==this.compare(M,a)},L.prototype.compareRange=function(M){var a,l=M.end,r=M.start;return 1==(a=this.compare(l.row,l.column))?1==(a=this.compare(r.row,r.column))?2:0==a?1:0:-1==a?-2:-1==(a=this.compare(r.row,r.column))?-1:1==a?42:0},L.prototype.comparePoint=function(M){return this.compare(M.row,M.column)},L.prototype.containsRange=function(M){return 0==this.comparePoint(M.start)&&0==this.comparePoint(M.end)},L.prototype.intersects=function(M){var a=this.compareRange(M);return-1==a||0==a||1==a},L.prototype.isEnd=function(M,a){return this.end.row==M&&this.end.column==a},L.prototype.isStart=function(M,a){return this.start.row==M&&this.start.column==a},L.prototype.setStart=function(M,a){"object"==typeof M?(this.start.column=M.column,this.start.row=M.row):(this.start.row=M,this.start.column=a)},L.prototype.setEnd=function(M,a){"object"==typeof M?(this.end.column=M.column,this.end.row=M.row):(this.end.row=M,this.end.column=a)},L.prototype.inside=function(M,a){return 0==this.compare(M,a)&&!(this.isEnd(M,a)||this.isStart(M,a))},L.prototype.insideStart=function(M,a){return 0==this.compare(M,a)&&!this.isEnd(M,a)},L.prototype.insideEnd=function(M,a){return 0==this.compare(M,a)&&!this.isStart(M,a)},L.prototype.compare=function(M,a){return this.isMultiLine()||M!==this.start.row?Mthis.end.row?1:this.start.row===M?a>=this.start.column?0:-1:this.end.row===M?a<=this.end.column?0:1:0:athis.end.column?1:0},L.prototype.compareStart=function(M,a){return this.start.row==M&&this.start.column==a?-1:this.compare(M,a)},L.prototype.compareEnd=function(M,a){return this.end.row==M&&this.end.column==a?1:this.compare(M,a)},L.prototype.compareInside=function(M,a){return this.end.row==M&&this.end.column==a?1:this.start.row==M&&this.start.column==a?-1:this.compare(M,a)},L.prototype.clipRows=function(M,a){if(this.end.row>a)var l={row:a+1,column:0};else this.end.rowa)var r={row:a+1,column:0};else this.start.row1?++C>4&&(C=1):C=1,L.isIE){var c=Math.abs(u.clientX-$)>5||Math.abs(u.clientY-S)>5;(!E||c)&&(C=1),E&&clearTimeout(E),E=setTimeout(function(){E=null},p[C-1]||600),1==C&&($=u.clientX,S=u.clientY)}if(u._clicks=C,b[y]("mousedown",u),C>4)C=0;else if(C>1)return b[y](v[C],u)}Array.isArray(g)||(g=[g]),g.forEach(function(u){t(u,"mousedown",m,f)})},x.getModifierString=function(g){return T.KEY_MODS[n(g)]},x.addCommandKeyListener=function(g,p,b){var y=null;t(g,"keydown",function(f){M[f.keyCode]=(M[f.keyCode]||0)+1;var C=function s(g,p,b){var y=n(p);if(!b&&p.code&&(b=T.$codeToKeyCode[p.code]||b),!L.isMac&&M){if(p.getModifierState&&(p.getModifierState("OS")||p.getModifierState("Win"))&&(y|=8),M.altGr){if(3==(3&y))return;M.altGr=0}if(18===b||17===b){var f=p.location;17===b&&1===f?1==M[b]&&(a=p.timeStamp):18===b&&3===y&&2===f&&p.timeStamp-a<50&&(M.altGr=!0)}}if(b in T.MODIFIER_KEYS&&(b=-1),y||13!==b||3!==p.location||(g(p,y,-b),!p.defaultPrevented)){if(L.isChromeOS&&8&y){if(g(p,y,b),p.defaultPrevented)return;y&=-9}return!!(y||b in T.FUNCTION_KEYS||b in T.PRINTABLE_KEYS)&&g(p,y,b)}}(p,f,f.keyCode);return y=f.defaultPrevented,C},b),t(g,"keypress",function(f){y&&(f.ctrlKey||f.altKey||f.shiftKey||f.metaKey)&&(x.stopEvent(f),y=null)},b),t(g,"keyup",function(f){M[f.keyCode]=null},b),M||(h(),t(window,"focus",h))},"object"==typeof window&&window.postMessage&&!L.isOldIE){var d=1;x.nextTick=function(g,p){p=p||window;var b="zero-timeout-message-"+d++,y=function(f){f.data==b&&(x.stopPropagation(f),e(p,"message",y),g())};t(p,"message",y),p.postMessage(b,"*")}}x.$idleBlocked=!1,x.onIdle=function(g,p){return setTimeout(function b(){x.$idleBlocked?setTimeout(b,100):g()},p)},x.$idleBlockId=null,x.blockIdle=function(g){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},g||100)},x.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame=x.nextFrame?x.nextFrame.bind(window):function(g){setTimeout(g,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(R,x,B){"use strict";var T;B.exports={lineMode:!1,pasteCancelled:function(){return!!(T&&T>Date.now()-50)||(T=!1)},cancel:function(){T=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(R,x,B){"use strict";var T=R("../lib/event"),L=R("../config").nls,M=R("../lib/useragent"),a=R("../lib/dom"),l=R("../lib/lang"),r=R("../clipboard"),o=M.isChrome<18,i=M.isIE,t=M.isChrome>63,e=400,n=R("../lib/keys"),s=n.KEY_MODS,h=M.isIOS,d=h?/\s/:/\n/,g=M.isMobile,p=function(){function b(y,f){var C=this;this.host=f,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",y.insertBefore(this.text,y.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",g||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),T.addListener(this.text,"blur",function($){C.ignoreFocusEvents||(f.onBlur($),C.$isFocused=!1)},f),T.addListener(this.text,"focus",function($){if(!C.ignoreFocusEvents){if(C.$isFocused=!0,M.isEdge)try{if(!document.hasFocus())return}catch{}f.onFocus($),M.isEdge?setTimeout(C.resetSelection.bind(C)):C.resetSelection()}},f),this.$focusScroll=!1,f.on("beforeEndOperation",function(){var $=f.curOp,S=$&&$.command&&$.command.name;"insertstring"!=S&&(C.inComposition&&S&&($.docChanged||$.selectionChanged)&&(C.lastValue=C.text.value="",C.onCompositionEnd()),C.resetSelection())}),f.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=h?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&f.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,T.addCommandKeyListener(this.text,function($,S,E){if(!C.inComposition)return f.onCommandKey($,S,E)},f),T.addListener(this.text,"select",this.onSelect.bind(this),f),T.addListener(this.text,"input",this.onInput.bind(this),f),T.addListener(this.text,"cut",this.onCut.bind(this),f),T.addListener(this.text,"copy",this.onCopy.bind(this),f),T.addListener(this.text,"paste",this.onPaste.bind(this),f),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&T.addListener(y,"keydown",function($){if((!M.isMac||$.metaKey)&&$.ctrlKey)switch($.keyCode){case 67:C.onCopy($);break;case 86:C.onPaste($);break;case 88:C.onCut($)}},f),this.syncComposition=l.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),T.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),f),T.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),f),T.addListener(this.text,"keyup",this.onKeyup.bind(this),f),T.addListener(this.text,"keydown",this.syncComposition.bind(this),f),T.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),f),T.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),f),T.addListener(this.text,"mousedown",function($){$.preventDefault(),C.onContextMenuClose()},f),T.addListener(f.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),f),T.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),f),h&&this.addIosSelectionHandler(y,f,this.text)}return b.prototype.addIosSelectionHandler=function(y,f,C){var $=this,S=null,E=!1;C.addEventListener("keydown",function(m){S&&clearTimeout(S),E=!0},!0),C.addEventListener("keyup",function(m){S=setTimeout(function(){E=!1},100)},!0);var v=function(m){if(document.activeElement===C&&!(E||$.inComposition||f.$mouseHandler.isMousePressed)&&!$.copied){var u=C.selectionStart,c=C.selectionEnd,w=null,A=0;if(0==u?w=n.up:1==u?w=n.home:c>$.lastSelectionEnd&&"\n"==$.lastValue[c]?w=n.end:u<$.lastSelectionStart&&" "==$.lastValue[u-1]?(w=n.left,A=s.option):u<$.lastSelectionStart||u==$.lastSelectionStart&&$.lastSelectionEnd!=$.lastSelectionStart&&u==c?w=n.left:c>$.lastSelectionEnd&&$.lastValue.slice(0,c).split("\n").length>2?w=n.down:c>$.lastSelectionEnd&&" "==$.lastValue[c-1]?(w=n.right,A=s.option):(c>$.lastSelectionEnd||c==$.lastSelectionEnd&&$.lastSelectionEnd!=$.lastSelectionStart&&u==c)&&(w=n.right),u!==c&&(A|=s.shift),w){if(!f.onCommandKey({},A,w)&&f.commands){w=n.keyCodeToString(w);var _=f.commands.findKeyCommand(A,w);_&&f.execCommand(_)}$.lastSelectionStart=u,$.lastSelectionEnd=c,$.resetSelection("")}}};document.addEventListener("selectionchange",v),f.on("destroy",function(){document.removeEventListener("selectionchange",v)})},b.prototype.onContextMenuClose=function(){var y=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){y.tempStyle&&(y.text.style.cssText=y.tempStyle,y.tempStyle=""),y.host.renderer.$isMousePressed=!1,y.host.renderer.$keepTextAreaAtCursor&&y.host.renderer.$moveTextAreaToCursor()},0)},b.prototype.$onContextMenu=function(y){this.host.textInput.onContextMenu(y),this.onContextMenuClose()},b.prototype.onKeyup=function(y){27==y.keyCode&&this.text.value.length500||d.test(C)||g&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},b.prototype.sendText=function(y,f){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),y&&this.host.onPaste(y),this.pasted=!1,"";for(var C=this.text.selectionStart,$=this.text.selectionEnd,S=this.lastSelectionStart,E=this.lastValue.length-this.lastSelectionEnd,v=y,m=y.length-C,u=y.length-$,c=0;S>0&&this.lastValue[c]==y[c];)c++,S--;for(v=v.slice(c),c=1;E>0&&this.lastValue.length-c>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-c]==y[y.length-c];)c++,E--;m-=c-1,u-=c-1;var w=v.length-c+1;if(w<0&&(S=-w,w=0),v=v.slice(0,w),!(f||v||m||S||E||u))return"";this.sendingText=!0;var A=!1;return M.isAndroid&&". "==v&&(v=" ",A=!0),v&&!S&&!E&&!m&&!u||this.commandMode?this.host.onTextInput(v):this.host.onTextInput(v,{extendLeft:S,extendRight:E,restoreStart:m,restoreEnd:u}),this.sendingText=!1,this.lastValue=y,this.lastSelectionStart=C,this.lastSelectionEnd=$,this.lastRestoreEnd=u,A?"\n":v},b.prototype.onSelect=function(y){var $,f=this;this.inComposition||(this.copied?this.copied=!1:0===($=this.text).selectionStart&&$.selectionEnd>=f.lastValue.length&&$.value===f.lastValue&&f.lastValue&&$.selectionEnd!==f.lastSelectionEnd?(this.host.selectAll(),this.resetSelection()):g&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection())},b.prototype.$resetSelectionIOS=function(y){if(this.$isFocused&&(!this.copied||y)&&!this.sendingText){y||(y="");var f="\n ab"+y+"cde fg\n";f!=this.text.value&&(this.text.value=this.lastValue=f);var $=4+(y.length||(this.host.selection.isEmpty()?0:1));(4!=this.lastSelectionStart||this.lastSelectionEnd!=$)&&this.text.setSelectionRange(4,$),this.lastSelectionStart=4,this.lastSelectionEnd=$}},b.prototype.$resetSelection=function(){var y=this;if(!this.inComposition&&!this.sendingText&&(this.$isFocused||this.afterContextMenu)){this.inComposition=!0;var f=0,C=0,$="",S=function(_,I){for(var D=I,N=1;N<=_-y.rowStart&&N<2*y.numberOfExtraLines+1;N++)D+=y.host.session.getLine(_-N).length+1;return D};if(this.host.session){var E=this.host.selection,v=E.getRange(),m=E.cursor.row;m===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):m===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(mthis.rowEnd+1)&&(this.rowStart=m>this.numberOfExtraLines?m-this.numberOfExtraLines:0,this.rowEnd=m>this.numberOfExtraLines?m+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var u=[],c=this.rowStart;c<=this.rowEnd;c++)u.push(this.host.session.getLine(c));if($=u.join("\n"),f=S(v.start.row,v.start.column),C=S(v.end.row,v.end.column),v.start.rowthis.rowEnd){var A=this.host.session.getLine(this.rowEnd+1);C=v.end.row>this.rowEnd+1?A.length:v.end.column,C+=$.length+1,$=$+"\n"+A}else g&&m>0&&($="\n"+$,C+=1,f+=1);$.length>e&&(f1),i.preventDefault()):(this.setState("focusWait"),void this.captureMouse(i)))},o.prototype.startSelect=function(i,t){i=i||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(i):t||e.selection.moveToPosition(i),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var i,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(e);if(-1==n)i=this.$clickSelection.end;else if(1==n)i=this.$clickSelection.start;else{var s=r(this.$clickSelection,e,t.session);e=s.cursor,i=s.anchor}t.selection.setSelectionAnchor(i.row,i.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(i){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[i](n.row,n.column);if(this.$clickSelection){var h=this.$clickSelection.comparePoint(s.start),d=this.$clickSelection.comparePoint(s.end);if(-1==h&&d<=0)t=this.$clickSelection.end,(s.end.row!=n.row||s.end.column!=n.column)&&(n=s.start);else if(1==d&&h>=0)t=this.$clickSelection.start,(s.start.row!=n.row||s.start.column!=n.column)&&(n=s.end);else if(-1==h&&1==d)n=s.end,t=s.start;else{var g=r(this.$clickSelection,n,e.session);n=g.cursor,t=g.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},o.prototype.focusWait=function(){var i=function l(o,i,t,e){return Math.sqrt(Math.pow(t-o,2)+Math.pow(e-i,2))}(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(i>0||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(i){var t=i.getDocumentPosition(),e=this.editor,s=e.session.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},o.prototype.onTripleClick=function(i){var t=i.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var n=e.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(n.start.row),this.$clickSelection.end=e.selection.getLineRange(n.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},o.prototype.onQuadClick=function(i){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(i){if(!i.getAccelKey()){i.getShiftKey()&&i.wheelY&&!i.wheelX&&(i.wheelX=i.wheelY,i.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,n=i.domEvent.timeStamp,s=n-e.t,h=s?i.wheelX/s:e.vx,d=s?i.wheelY/s:e.vy;s<550&&(h=(h+e.vx)/2,d=(d+e.vy)/2);var g=Math.abs(h/d),p=!1;if(g>=1&&t.renderer.isScrollableBy(i.wheelX*i.speed,0)&&(p=!0),g<=1&&t.renderer.isScrollableBy(0,i.wheelY*i.speed)&&(p=!0),p?e.allowed=n:n-e.allowed<550&&(Math.abs(h)<=1.5*Math.abs(e.vx)&&Math.abs(d)<=1.5*Math.abs(e.vy)?(p=!0,e.allowed=n):e.allowed=0),e.t=n,e.vx=h,e.vy=d,p)return t.renderer.scrollBy(i.wheelX*i.speed,i.wheelY*i.speed),i.stop()}},o}();function r(o,i,t){if(o.start.row==o.end.row)var e=2*i.column-o.start.column-o.end.column;else if(o.start.row!=o.end.row-1||o.start.column||o.end.column)e=2*i.row-o.start.row-o.end.row;else e=3*i.column-2*t.getLine(o.start.row).length;return e<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,x.DefaultHandlers=a}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(R,x,B){"use strict";var T=R("../lib/event"),L=R("../lib/useragent"),M=function(){function a(l,r){this.domEvent=l,this.editor=r,this.x=this.clientX=l.clientX,this.y=this.clientY=l.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){T.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){T.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},a.prototype.getGutterRow=function(){var l=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(l,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},a.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var r=this.editor.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=r.contains(o.row,o.column)}return this.$inSelection},a.prototype.getButton=function(){return T.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return L.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();x.MouseEvent=M}),ace.define("ace/lib/scroll",["require","exports","module"],function(R,x,B){x.preventParentScroll=function(L){L.stopPropagation();var M=L.currentTarget;M.scrollHeight>M.clientHeight||L.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(R,x,B){"use strict";var s,T=this&&this.__extends||(s=function(h,d){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,p){g.__proto__=p}||function(g,p){for(var b in p)Object.prototype.hasOwnProperty.call(p,b)&&(g[b]=p[b])})(h,d)},function(h,d){if("function"!=typeof d&&null!==d)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");function g(){this.constructor=h}s(h,d),h.prototype=null===d?Object.create(d):(g.prototype=d.prototype,new g)}),L=this&&this.__values||function(s){var h="function"==typeof Symbol&&Symbol.iterator,d=h&&s[h],g=0;if(d)return d.call(s);if(s&&"number"==typeof s.length)return{next:function(){return s&&g>=s.length&&(s=void 0),{value:s&&s[g++],done:!s}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},M=R("./lib/dom"),l=(R("./lib/event"),R("./range").Range),r=R("./lib/scroll").preventParentScroll,o="ace_tooltip",i=function(){function s(h){this.isOpen=!1,this.$element=null,this.$parentNode=h}return s.prototype.$init=function(){return this.$element=M.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},s.prototype.getElement=function(){return this.$element||this.$init()},s.prototype.setText=function(h){this.getElement().textContent=h},s.prototype.setHtml=function(h){this.getElement().innerHTML=h},s.prototype.setPosition=function(h,d){this.getElement().style.left=h+"px",this.getElement().style.top=d+"px"},s.prototype.setClassName=function(h){M.addCssClass(this.getElement(),h)},s.prototype.setTheme=function(h){this.theme&&(this.theme.isDark&&M.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&M.removeCssClass(this.getElement(),this.theme.cssClass)),h.isDark&&M.addCssClass(this.getElement(),"ace_dark"),h.cssClass&&M.addCssClass(this.getElement(),h.cssClass),this.theme={isDark:h.isDark,cssClass:h.cssClass}},s.prototype.show=function(h,d,g){null!=h&&this.setText(h),null!=d&&null!=g&&this.setPosition(d,g),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},s.prototype.hide=function(h){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},s.prototype.getHeight=function(){return this.getElement().offsetHeight},s.prototype.getWidth=function(){return this.getElement().offsetWidth},s.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},s}(),t=function(){function s(){this.popups=[]}return s.prototype.addPopup=function(h){this.popups.push(h),this.updatePopups()},s.prototype.removePopup=function(h){var d=this.popups.indexOf(h);-1!==d&&(this.popups.splice(d,1),this.updatePopups())},s.prototype.updatePopups=function(){var h,d,g,p;this.popups.sort(function(m,u){return u.priority-m.priority});var b=[];try{for(var y=L(this.popups),f=y.next();!f.done;f=y.next()){var C=f.value,$=!0;try{for(var S=(g=void 0,L(b)),E=S.next();!E.done;E=S.next())if(this.doPopupsOverlap(E.value,C)){$=!1;break}}catch(m){g={error:m}}finally{try{E&&!E.done&&(p=S.return)&&p.call(S)}finally{if(g)throw g.error}}$?b.push(C):C.hide()}}catch(m){h={error:m}}finally{try{f&&!f.done&&(d=y.return)&&d.call(y)}finally{if(h)throw h.error}}},s.prototype.doPopupsOverlap=function(h,d){var g=h.getElement().getBoundingClientRect(),p=d.getElement().getBoundingClientRect();return g.leftp.left&&g.topp.top},s}(),e=new t;x.popupManager=e,x.Tooltip=i;var n=function(s){function h(d){void 0===d&&(d=document.body);var g=s.call(this,d)||this;g.timeout=void 0,g.lastT=0,g.idleTime=350,g.lastEvent=void 0,g.onMouseOut=g.onMouseOut.bind(g),g.onMouseMove=g.onMouseMove.bind(g),g.waitForHover=g.waitForHover.bind(g),g.hide=g.hide.bind(g);var p=g.getElement();return p.style.whiteSpace="pre-wrap",p.style.pointerEvents="auto",p.addEventListener("mouseout",g.onMouseOut),p.tabIndex=-1,p.addEventListener("blur",function(){p.contains(document.activeElement)||this.hide()}.bind(g)),p.addEventListener("wheel",r),g}return T(h,s),h.prototype.addToEditor=function(d){d.on("mousemove",this.onMouseMove),d.on("mousedown",this.hide);var g=d.renderer.getMouseEventTarget();g&&"function"==typeof g.removeEventListener&&g.addEventListener("mouseout",this.onMouseOut,!0)},h.prototype.removeFromEditor=function(d){d.off("mousemove",this.onMouseMove),d.off("mousedown",this.hide);var g=d.renderer.getMouseEventTarget();g&&"function"==typeof g.removeEventListener&&g.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},h.prototype.onMouseMove=function(d,g){this.lastEvent=d,this.lastT=Date.now();var p=g.$mouseHandler.isMousePressed;if(this.isOpen){var b=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(b.row,b.column)||p||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||p||(this.lastEvent=d,this.timeout=setTimeout(this.waitForHover,this.idleTime))},h.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var d=Date.now()-this.lastT;this.idleTime-d>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-d):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},h.prototype.isOutsideOfText=function(d){var g=d.editor,p=d.getDocumentPosition(),b=g.session.getLine(p.row);if(p.column==b.length){var y=g.renderer.pixelToScreenCoordinates(d.clientX,d.clientY),f=g.session.documentToScreenPosition(p.row,p.column);if(f.column!=y.column||f.row!=y.row)return!0}return!1},h.prototype.setDataProvider=function(d){this.$gatherData=d},h.prototype.showForRange=function(d,g,p,b){if(!(b&&b!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var y=d.renderer;this.isOpen||(e.addPopup(this),this.$registerCloseEvents(),this.setTheme(y.theme)),this.isOpen=!0,this.range=l.fromPoints(g.start,g.end);var f=y.textToScreenCoordinates(g.start.row,g.start.column),C=y.scroller.getBoundingClientRect();f.pageX=e.length&&(e=void 0),{value:e&&e[h++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},M=R("../lib/dom"),a=R("./mouse_event").MouseEvent,l=R("../tooltip").HoverTooltip,r=R("../config").nls,o=R("../range").Range;x.GutterHandler=function i(e){var n=e.editor,s=n.renderer.$gutterLayer;e.$tooltip=new t(n),e.$tooltip.addToEditor(n),e.$tooltip.setDataProvider(function(h,d){var g=h.getDocumentPosition().row;e.$tooltip.showTooltip(g)}),e.editor.setDefaultHandler("guttermousedown",function(h){if(n.isFocused()&&0==h.getButton()&&"foldWidgets"!=s.getRegion(h)){var g=h.getDocumentPosition().row,p=n.session.selection;if(h.getShiftKey())p.selectTo(g,0);else{if(2==h.domEvent.detail)return n.selectAll(),h.preventDefault();e.$clickSelection=n.selection.getLineRange(g)}return e.setState("selectByLines"),e.captureMouse(h),h.preventDefault()}})};var t=function(e){function n(s){var h=e.call(this,s.container)||this;h.id="gt"+ ++n.$uid,h.editor=s;var d=h.getElement();return d.setAttribute("role","tooltip"),d.setAttribute("id",h.id),d.style.pointerEvents="auto",h.idleTime=50,h.onDomMouseMove=h.onDomMouseMove.bind(h),h.onDomMouseOut=h.onDomMouseOut.bind(h),h.setClassName("ace_gutter-tooltip"),h}return T(n,e),n.prototype.onDomMouseMove=function(s){var h=new a(s,this.editor);this.onMouseMove(h,this.editor)},n.prototype.onDomMouseOut=function(s){var h=new a(s,this.editor);this.onMouseOut(h)},n.prototype.addToEditor=function(s){var h=s.renderer.$gutter;h.addEventListener("mousemove",this.onDomMouseMove),h.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,s)},n.prototype.removeFromEditor=function(s){var h=s.renderer.$gutter;h.removeEventListener("mousemove",this.onDomMouseMove),h.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,s)},n.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(n,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),n.prototype.showTooltip=function(s){var h,p,d=this.editor.renderer.$gutterLayer,g=d.$annotations[s];p=g?{displayText:Array.from(g.displayText),type:Array.from(g.type)}:{displayText:[],type:[]};var b=d.session.getFoldLine(s);if(b&&d.$showFoldedAnnotations){for(var C,y={error:[],security:[],warning:[],info:[],hint:[]},f={error:1,security:2,warning:3,info:4,hint:5},$=s+1;$<=b.end.row;$++)if(d.$annotations[$])for(var S=0;S2)return d.childNodes[2]}},n.prototype.$findCellByRow=function(s){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(h){return h.row===s})},n.prototype.hide=function(s){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),null!=this.visibleTooltipRow){var h=this.$findLinkedAnnotationNode(this.visibleTooltipRow);h&&h.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,s)}},n.annotationsToSummaryString=function(s){var h,d,g=[];try{for(var b=L(["error","security","warning","info","hint"]),y=b.next();!y.done;y=b.next()){var f=y.value;if(s[f].length){var C=1===s[f].length?n.annotationLabels[f].singular:n.annotationLabels[f].plural;g.push("".concat(s[f].length," ").concat(C))}}}catch($){h={error:$}}finally{try{y&&!y.done&&(d=b.return)&&d.call(b)}finally{if(h)throw h.error}}return g.join(", ")},n.prototype.isOutsideOfText=function(s){var d=s.editor.renderer.$gutter.getBoundingClientRect();return!(s.clientX>=d.left&&s.clientX<=d.right&&s.clientY>=d.top&&s.clientY<=d.bottom)},n}(l);t.$uid=0,x.GutterTooltip=t}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(R,x,B){"use strict";var T=R("../lib/dom"),L=R("../lib/event"),M=R("../lib/useragent");function o(t){var e=t.editor,n=T.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent="\xa0",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(O){t[O]=this[O]},this),e.on("mousedown",this.onMouseDown.bind(t));var d,g,p,b,y,f,$,S,E,v,m,h=e.container,C=0;function w(){var O=f;(function u(O,W){var F=Date.now();v&&W&&O.row==W.row&&W&&O.column==W.column?i(m.x,m.y,g,p)>5?v=null:F-v>=200&&(e.renderer.scrollCursorIntoView(),v=null):(e.moveCursorToPosition(O),v=F,m={x:g,y:p})})(f=e.renderer.screenToTextCoordinates(g,p),O),function c(O,W){var F=Date.now(),H=e.renderer.layerConfig.lineHeight,z=e.renderer.layerConfig.characterWidth,V=e.renderer.scroller.getBoundingClientRect(),U={x:{left:g-V.left,right:V.right-g},y:{top:p-V.top,bottom:V.bottom-p}},P=Math.min(U.x.left,U.x.right),G=Math.min(U.y.top,U.y.bottom),j={row:O.row,column:O.column};P/z<=2&&(j.column+=U.x.left=200&&e.renderer.scrollCursorIntoView(j):E=F:E=null}(f,O)}function A(){y=e.selection.toOrientedRange(),d=e.session.addMarker(y,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(b),w(),b=setInterval(w,20),C=0,L.addListener(document,"mousemove",I)}function k(){clearInterval(b),e.session.removeMarker(d),d=null,e.selection.fromOrientedRange(y),e.isFocused()&&!S&&e.$resetCursorStyle(),y=null,f=null,C=0,E=null,v=null,L.removeListener(document,"mousemove",I)}this.onDragStart=function(O){if(this.cancelDrag||!h.draggable){var W=this;return setTimeout(function(){W.startSelect(),W.captureMouse(O)},0),O.preventDefault()}y=e.getSelectionRange();var F=O.dataTransfer;F.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(n),F.setDragImage&&F.setDragImage(n,0,0),setTimeout(function(){e.container.removeChild(n)}),F.clearData(),F.setData("Text",e.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(O){h.draggable=!1,S=!1,this.setState(null),e.getReadOnly()||(!$&&"move"==O.dataTransfer.dropEffect&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(O){if(!e.getReadOnly()&&D(O.dataTransfer))return g=O.clientX,p=O.clientY,d||A(),C++,O.dataTransfer.dropEffect=$=N(O),L.preventDefault(O)},this.onDragOver=function(O){if(!e.getReadOnly()&&D(O.dataTransfer))return g=O.clientX,p=O.clientY,d||(A(),C++),null!==_&&(_=null),O.dataTransfer.dropEffect=$=N(O),L.preventDefault(O)},this.onDragLeave=function(O){if(--C<=0&&d)return k(),$=null,L.preventDefault(O)},this.onDrop=function(O){if(f){var W=O.dataTransfer;if(S)switch($){case"move":y=y.contains(f.row,f.column)?{start:f,end:f}:e.moveText(y,f);break;case"copy":y=e.moveText(y,f,!0)}else{var F=W.getData("Text");y={start:f,end:e.session.insert(f,F)},e.focus(),$=null}return k(),L.preventDefault(O)}},L.addListener(h,"dragstart",this.onDragStart.bind(t),e),L.addListener(h,"dragend",this.onDragEnd.bind(t),e),L.addListener(h,"dragenter",this.onDragEnter.bind(t),e),L.addListener(h,"dragover",this.onDragOver.bind(t),e),L.addListener(h,"dragleave",this.onDragLeave.bind(t),e),L.addListener(h,"drop",this.onDrop.bind(t),e);var _=null;function I(){null==_&&(_=setTimeout(function(){null!=_&&d&&k()},20))}function D(O){var W=O.types;return!W||Array.prototype.some.call(W,function(F){return"text/plain"==F||"Text"==F})}function N(O){var W=["copy","copymove","all","uninitialized"],H=M.isMac?O.altKey:O.ctrlKey,z="uninitialized";try{z=O.dataTransfer.effectAllowed.toLowerCase()}catch{}var V="none";return H&&W.indexOf(z)>=0?V="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(z)>=0?V="move":W.indexOf(z)>=0&&(V="copy"),V}}function i(t,e,n,s){return Math.sqrt(Math.pow(n-t,2)+Math.pow(s-e,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor;t.container.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging"),t.renderer.setCursorStyle(M.isWin?"default":"move"),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;M.isIE&&"dragReady"==this.state&&i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&e.dragDrop(),"dragWait"===this.state&&i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),s=t.getButton();if(1===(t.domEvent.detail||1)&&0===s&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var d=t.domEvent.target||t.domEvent.srcElement;"unselectable"in d&&(d.unselectable="on"),e.getDragDelay()?(M.isWebKit&&(this.cancelDrag=!0,e.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(o.prototype),x.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(R,x,B){"use strict";var T=R("./mouse_event").MouseEvent,L=R("../lib/event"),M=R("../lib/dom");x.addTouchListeners=function(a,l){var o,i,t,e,n,s,d,y,f,r="scroll",h=0,g=0,p=0,b=0;function $(){if(l.getOption("enableMobileMenu")){f||function C(){var u=window.navigator&&window.navigator.clipboard,c=!1,A=function(_){return l.commands.canExecute(_,l)},k=function(_){var I=_.target.getAttribute("action");if("more"==I||!c)return c=!c,function(){var _=l.getCopyText(),I=l.session.getUndoManager().hasUndo();f.replaceChild(M.buildDom(c?["span",!_&&A("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],_&&A("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],_&&A("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],u&&A("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&A("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],A("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],A("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),f.firstChild)}();"paste"==I?u.readText().then(function(D){l.execCommand(I,D)}):I&&(("cut"==I||"copy"==I)&&(u?u.writeText(l.getCopyText()):document.execCommand("copy")),l.execCommand(I)),f.firstChild.style.display="none",c=!1,"openCommandPalette"!=I&&l.focus()};f=M.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(_){r="menu",_.stopPropagation(),_.preventDefault(),l.textInput.focus()},ontouchend:function(_){_.stopPropagation(),_.preventDefault(),k(_)},onclick:k},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],l.container)}();var u=l.selection.cursor,c=l.renderer.textToScreenCoordinates(u.row,u.column),w=l.renderer.textToScreenCoordinates(0,0).pageX,A=l.renderer.scrollLeft,k=l.container.getBoundingClientRect();f.style.top=c.pageY-k.top-3+"px",c.pageX-k.left1)return clearTimeout(n),n=null,t=-1,void(r="zoom");y=l.$mouseHandler.isMousePressed=!0;var w=l.renderer.layerConfig.lineHeight,A=l.renderer.layerConfig.lineHeight,k=u.timeStamp;e=k;var _=c[0],I=_.clientX,D=_.clientY;Math.abs(o-I)+Math.abs(i-D)>w&&(t=-1),o=u.clientX=I,i=u.clientY=D,p=b=0;var N=new T(u,l);if(d=N.getDocumentPosition(),k-t<500&&1==c.length&&!h)g++,u.preventDefault(),u.button=0,function v(){n=null,clearTimeout(n),l.selection.moveToPosition(d);var u=g>=2?l.selection.getLineRange(d.row):l.session.getBracketRange(d);u&&!u.isEmpty()?l.selection.setRange(u):l.selection.selectWord(),r="wait"}();else{g=0;var O=l.selection.cursor,W=l.selection.isEmpty()?O:l.selection.anchor,F=l.renderer.$cursorLayer.getPixelPosition(O,!0),H=l.renderer.$cursorLayer.getPixelPosition(W,!0),z=l.renderer.scroller.getBoundingClientRect(),V=l.renderer.layerConfig.offset,U=l.renderer.scrollLeft,P=function(Y,Q){return(Y/=A)*Y+(Q=Q/w-.75)*Q};if(u.clientXj?"cursor":"anchor"),r=j<3.5?"anchor":G<3.5?"cursor":"scroll",n=setTimeout(E,450)}t=k},l),L.addListener(a,"touchend",function(u){y=l.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),"zoom"==r?(r="",h=0):n?(l.selection.moveToPosition(d),h=0,$()):"scroll"==r?(function m(){h+=60,s=setInterval(function(){h--<=0&&(clearInterval(s),s=null),Math.abs(p)<.01&&(p=0),Math.abs(b)<.01&&(b=0),h<20&&(p*=.9),h<20&&(b*=.9);var u=l.session.getScrollTop();l.renderer.scrollBy(10*p,10*b),u==l.session.getScrollTop()&&(h=0)},10)}(),S()):$(),clearTimeout(n),n=null},l),L.addListener(a,"touchmove",function(u){n&&(clearTimeout(n),n=null);var c=u.touches;if(!(c.length>1||"zoom"==r)){var w=c[0],A=o-w.clientX,k=i-w.clientY;if("wait"==r){if(!(A*A+k*k>4))return u.preventDefault();r="cursor"}o=w.clientX,i=w.clientY,u.clientX=w.clientX,u.clientY=w.clientY;var _=u.timeStamp,I=_-e;if(e=_,"scroll"==r){var D=new T(u,l);D.speed=1,D.wheelX=A,D.wheelY=k,10*Math.abs(A)=U){for(Q=Y+1;Q=U;)Q++;for(Z=Y,K=Q-1;Z=P.length||2!=(Q=G[j-1])&&3!=Q||2!=(Z=P[j+1])&&3!=Z?4:(l&&(Z=3),Z==Q?Z:4);case 10:return 2==(Q=j>0?G[j-1]:5)&&j+10&&2==G[j-1])return 2;if(l)return 4;for(X=j+1,K=P.length;X=1425&&ie<=2303||64286==ie)&&(1==Q||7==Q))return 1}return j<1||5==(Q=P[j-1])?4:G[j-1];case 5:return l=!1,o=!0,M;case 6:return i=!0,4;case 13:case 14:case 16:case 17:case 15:l=!1;case D:return 4}}function z(U){var P=U.charCodeAt(0),G=P>>8;return 0==G?P>191?0:N[P]:5==G?/[\u0591-\u05f4]/.test(U)?1:0:6==G?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(U)?12:/[\u0660-\u0669\u066b-\u066c]/.test(U)?3:1642==P?u:/[\u06f0-\u06f9]/.test(U)?2:7:32==G&&P<=8287?O[255&P]:254==G&&P>=65136?7:4}x.L=0,x.R=1,x.EN=2,x.ON_R=3,x.AN=4,x.R_H=5,x.B=6,x.RLE=7,x.DOT="\xb7",x.doBidiReorder=function(U,P,G){if(U.length<2)return{};var j=U.split(""),Y=new Array(j.length),Q=new Array(j.length),Z=[];M=G?1:0,function W(U,P,G,j){var Y=M?s:n,Q=null,Z=null,K=null,X=0,ie=null,te=-1,J=null,ee=null,ae=[];if(!j)for(J=0,j=[];J0)if(16==ie){for(J=te;J-1){for(J=te;J=0&&8==j[se];se--)P[se]=M}}(j,Z,j.length,P);for(var K=0;K7&&P[K]<13||4===P[K]||P[K]===D)?Z[K]=x.ON_R:K>0&&"\u0644"===j[K-1]&&/\u0622|\u0623|\u0625|\u0627/.test(j[K])&&(Z[K-1]=Z[K]=x.R_H,K++);for(j[j.length-1]===x.DOT&&(Z[j.length-1]=x.B),"\u202b"===j[0]&&(Z[0]=x.RLE),K=0;K=0&&(r=this.session.$docRowCache[i])}return r},l.prototype.getSplitIndex=function(){var r=0,o=this.session.$screenRowCache;if(o.length)for(var i,t=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-r>0&&(i=this.session.$getRowCacheIndex(o,this.currentRow-r-1))===t;)t=i,r++;else r=this.currentRow;return r},l.prototype.updateRowLine=function(r,o){void 0===r&&(r=this.getDocumentRow());var t=r===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[r];e&&(void 0===o&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[T.L],this.line=oo?this.session.getOverwrite()?r:r-1:o,t=T.getVisualFromLogicalIdx(i,this.bidiMap),e=this.bidiMap.bidiLevels,n=0;!this.session.getOverwrite()&&r<=o&&e[t]%2!=0&&t++;for(var s=0;so&&e[t]%2==0&&(n+=this.charWidths[e[t]]),this.wrapIndent&&(n+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(n+=this.rtlLineOffset),n},l.prototype.getSelections=function(r,o){var e,i=this.bidiMap,t=i.bidiLevels,n=[],s=0,h=Math.min(r,o)-this.wrapIndent,d=Math.max(r,o)-this.wrapIndent,g=!1,p=!1,b=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var y,f=0;f=h&&yt+s/2;){if(t+=s,e===n.length-1){s=0;break}s=this.charWidths[n[++e]]}return e>0&&n[e-1]%2!=0&&n[e]%2==0?(i0&&n[e-1]%2==0&&n[e]%2!=0?o=1+(i>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===n.length-1&&0===s&&n[e-1]%2==0||!this.isRtlDir&&0===e&&n[e]%2!=0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&n[e-1]%2!=0&&0!==s&&e--,o=this.bidiMap.logicalFromVisual[e]),0===o&&this.isRtlDir&&o++,o+this.wrapIndent},l}();x.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(R,x,B){"use strict";var T=R("./lib/oop"),L=R("./lib/lang"),M=R("./lib/event_emitter").EventEmitter,a=R("./range").Range,l=function(){function r(o){this.session=o,this.doc=o.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var i=this;this.cursor.on("change",function(t){i.$cursorChanged=!0,i.$silent||i._emit("changeCursor"),!i.$isEmpty&&!i.$silent&&i._emit("changeSelection"),!i.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(i.$desiredColumn=null)}),this.anchor.on("change",function(){i.$anchorChanged=!0,!i.$isEmpty&&!i.$silent&&i._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(o,i){this.$isEmpty=!1,this.anchor.setPosition(o,i)},r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var o=this.anchor,i=this.lead;return o.row>i.row||o.row==i.row&&o.column>i.column},r.prototype.getRange=function(){var o=this.anchor,i=this.lead;return this.$isEmpty?a.fromPoints(i,i):this.isBackwards()?a.fromPoints(i,o):a.fromPoints(o,i)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(o,i){var t=i?o.end:o.start,e=i?o.start:o.end;this.$setSelection(t.row,t.column,e.row,e.column)},r.prototype.$setSelection=function(o,i,t,e){if(!this.$silent){var n=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,i),this.cursor.setPosition(t,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||n!=this.$isEmpty||s)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(o){var i=this.lead;this.$isEmpty&&this.setSelectionAnchor(i.row,i.column),o.call(this)},r.prototype.selectTo=function(o,i){this.$moveSelection(function(){this.moveCursorTo(o,i)})},r.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},r.prototype.moveTo=function(o,i){this.clearSelection(),this.moveCursorTo(o,i)},r.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(o,i){if(typeof i>"u"){var t=o||this.lead;o=t.row,i=t.column}return this.session.getWordRange(o,i)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var o=this.getCursor(),i=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(i)},r.prototype.getLineRange=function(o,i){var e,t="number"==typeof o?o:this.lead.row,n=this.session.getFoldLine(t);return n?(t=n.start.row,e=n.end.row):e=t,!0===i?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(o,i,t){var e=o.column,n=o.column+i;return t<0&&(e=o.column-i,n=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,n).split(" ").length-1==i},r.prototype.moveCursorLeft=function(){var i,o=this.lead.getPosition();if(i=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(i.start.row,i.start.column);else if(0===o.column)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var i,o=this.lead.getPosition();if(i=this.session.getFoldAt(o.row,o.column,1))this.moveCursorTo(i.end.row,i.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(i.column=e)}}this.moveCursorTo(i.row,i.column)},r.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,i=this.doc.getLine(o).length;this.moveCursorTo(o,i)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,i=this.lead.column,t=this.doc.getLine(o),e=t.substring(i);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var n=this.session.getFoldAt(o,i,1);if(!n)return this.session.nonTokenRe.exec(e)&&(i+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(i)),i>=t.length?(this.moveCursorTo(o,t.length),this.moveCursorRight(),void(o0&&this.moveCursorWordLeft());this.session.tokenRe.exec(n)&&(i-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,i)}},r.prototype.$shortWordEndIndex=function(o){var t,i=0,e=/\s/,n=this.session.tokenRe;if(n.lastIndex=0,this.session.tokenRe.exec(o))i=this.session.tokenRe.lastIndex;else{for(;(t=o[i])&&e.test(t);)i++;if(i<1)for(n.lastIndex=0;(t=o[i])&&!n.test(t);)if(n.lastIndex=0,i++,e.test(t)){if(i>2){i--;break}for(;(t=o[i])&&e.test(t);)i++;if(i>2)break}}return n.lastIndex=0,i},r.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,i=this.lead.column,t=this.doc.getLine(o),e=t.substring(i),n=this.session.getFoldAt(o,i,1);if(n)return this.moveCursorTo(n.end.row,n.end.column);if(i==t.length){var s=this.doc.getLength();do{o++,e=this.doc.getLine(o)}while(o0&&/^\s*$/.test(e));i=e.length,/\s+$/.test(e)||(e="")}var n=L.stringReverse(e),s=this.$shortWordEndIndex(n);return this.moveCursorTo(o,i-s)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(o,i){var e,t=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===i&&(0!==o&&(this.session.$bidiHandler.isBidiRow(t.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(t.column),t.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=t.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),0!=o&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var n=this.session.lineWidgets[this.lead.row];o<0?o-=n.rowsAbove||0:o>0&&(o+=n.rowCount-(n.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+o,t.column,e);this.moveCursorTo(s.row,s.column+i,0===i)},r.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},r.prototype.moveCursorTo=function(o,i,t){var e=this.session.getFoldAt(o,i,1);e&&(o=e.start.row,i=e.start.column),this.$keepDesiredColumnOnChange=!0;var n=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(n.charAt(i))&&n.charAt(i-1)&&(this.lead.row==o&&this.lead.column==i+1?i-=1:i+=1),this.lead.setPosition(o,i),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(o,i,t){var e=this.session.screenToDocumentPosition(o,i);this.moveCursorTo(e.row,e.column,t)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(o){var i=this.getRange();return o?(o.start.column=i.start.column,o.start.row=i.start.row,o.end.column=i.end.column,o.end.row=i.end.row):o=i,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},r.prototype.getRangeOfMovements=function(o){var i=this.getCursor();try{o(this);var t=this.getCursor();return a.fromPoints(i,t)}catch{return a.fromPoints(i,i)}finally{this.moveCursorToPosition(i)}},r.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(i){var t=i.clone();return t.isBackwards=i.cursor==i.start,t});else(o=this.getRange()).isBackwards=this.isBackwards();return o},r.prototype.fromJSON=function(o){if(null==o.start){if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var i=o.length;i--;){var t=a.fromPoints(o[i].start,o[i].end);o[i].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}o=o[0]}this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},r.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var i=this.ranges.length;i--;)if(!this.ranges[i].isEqual(o[i]))return!1;return!0},r}();l.prototype.setSelectionAnchor=l.prototype.setAnchor,l.prototype.getSelectionAnchor=l.prototype.getAnchor,l.prototype.setSelectionRange=l.prototype.setRange,T.implement(l.prototype,M),x.Selection=l}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(R,x,B){"use strict";var T=R("./lib/report_error").reportError,L=2e3,M=function(){function a(l){for(var r in this.states=l,this.regExps={},this.matchMappings={},this.states){for(var o=this.states[r],i=[],t=0,e=this.matchMappings[r]={defaultToken:"text"},n="g",s=[],h=0;h1?this.$applyToken:d.token),p>1&&(/\\\d/.test(d.regex)?g=d.regex.replace(/\\([0-9]+)/g,function(b,y){return"\\"+(parseInt(y,10)+t+1)}):(p=1,g=this.removeCapturingGroups(d.regex)),!d.splitRegex&&"string"!=typeof d.token&&s.push(d)),e[t]=h,t+=p,i.push(g),d.onMatch||(d.onMatch=null)}}i.length||(e[0]=0,i.push("$")),s.forEach(function(b){b.splitRegex=this.createSplitterRegexp(b.regex,n)},this),this.regExps[r]=new RegExp("("+i.join(")|(")+")|($)",n)}}return a.prototype.$setMaxTokenCount=function(l){L=0|l},a.prototype.$applyToken=function(l){var r=this.splitRegex.exec(l).slice(1),o=this.token.apply(this,r);if("string"==typeof o)return[{type:o,value:l}];for(var i=[],t=0,e=o.length;td){var $=l.substring(d,C-f.length);p.type==b?p.value+=$:(p.type&&h.push(p),p={type:b,value:$})}for(var S=0;SL){for(g>2*l.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:l});d1&&o[0]!==i&&o.unshift("#tmp",i),{tokens:h,state:o.length?o:i}},a}();M.prototype.reportError=T,x.Tokenizer=M}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(R,x,B){"use strict";var L,T=R("../lib/deep_copy").deepCopy;(function(){this.addRules=function(l,r){if(r)for(var o in l){for(var i=l[o],t=0;t=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},M.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},M.prototype.getCurrentTokenRow=function(){return this.$row},M.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,l=this.$tokenIndex,r=a[l].start;if(void 0!==r)return r;for(r=0;l>0;)r+=a[l-=1].value.length;return r},M.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},M.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],l=this.getCurrentTokenColumn();return new T(this.$row,l,this.$row,l+a.value.length)},M}();x.TokenIterator=L}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(R,x,B){"use strict";var o,s,T=R("../../lib/oop"),L=R("../behaviour").Behaviour,M=R("../../token_iterator").TokenIterator,a=R("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i={},t={'"':'"',"'":"'"},e=function(h){var d=-1;if(h.multiSelect&&(d=h.selection.index,i.rangeCount!=h.multiSelect.rangeCount&&(i={rangeCount:h.multiSelect.rangeCount})),i[d])return o=i[d];o=i[d]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},n=function(h,d,g,p){var b=h.end.row-h.start.row;return{text:g+d+p,selection:[0,h.start.column+1,b,h.end.column+(b?0:1)]}};(s=function(h){h=h||{},this.add("braces","insertion",function(d,g,p,b,y){var f=p.getCursorPosition(),C=b.doc.getLine(f.row);if("{"==y){e(p);var $=p.getSelectionRange(),S=b.doc.getTextRange($),E=b.getTokenAt(f.row,f.column);if(""!==S&&"{"!==S&&p.getWrapBehavioursEnabled())return n($,S,"{","}");if(E&&/(?:string)\.quasi|\.xml/.test(E.type))return[/tag\-(?:open|name)/,/attribute\-name/].some(function(_){return _.test(E.type)})||/(string)\.quasi/.test(E.type)&&"$"!==E.value[f.column-E.start-1]?void 0:(s.recordAutoInsert(p,b,"}"),{text:"{}",selection:[1,1]});if(s.isSaneInsertion(p,b))return/[\]\}\)]/.test(C[f.column])||p.inMultiSelectMode||h.braces?(s.recordAutoInsert(p,b,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(p,b,"{"),{text:"{",selection:[1,1]})}else if("}"==y){if(e(p),"}"==C.substring(f.column,f.column+1)&&null!==b.$findOpeningBracket("}",{column:f.column+1,row:f.row})&&s.isAutoInsertedClosing(f,C,y))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==y||"\r\n"==y){e(p);var c="";if(s.isMaybeInsertedClosing(f,C)&&(c=a.stringRepeat("}",o.maybeInsertedBrackets),s.clearMaybeInsertedClosing()),"}"===C.substring(f.column,f.column+1)){var w=b.findMatchingBracket({row:f.row,column:f.column+1},"}");if(!w)return null;var A=this.$getIndent(b.getLine(w.row))}else{if(!c)return void s.clearMaybeInsertedClosing();A=this.$getIndent(C)}var k=A+b.getTabString();return{text:"\n"+k+"\n"+A+c,selection:[1,k.length,1,k.length]}}s.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(d,g,p,b,y){var f=b.doc.getTextRange(y);if(!y.isMultiLine()&&"{"==f){if(e(p),"}"==b.doc.getLine(y.start.row).substring(y.end.column,y.end.column+1))return y.end.column++,y;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(d,g,p,b,y){if("("==y){e(p);var f=p.getSelectionRange(),C=b.doc.getTextRange(f);if(""!==C&&p.getWrapBehavioursEnabled())return n(f,C,"(",")");if(s.isSaneInsertion(p,b))return s.recordAutoInsert(p,b,")"),{text:"()",selection:[1,1]}}else if(")"==y){e(p);var $=p.getCursorPosition(),S=b.doc.getLine($.row);if(")"==S.substring($.column,$.column+1)&&null!==b.$findOpeningBracket(")",{column:$.column+1,row:$.row})&&s.isAutoInsertedClosing($,S,y))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(d,g,p,b,y){var f=b.doc.getTextRange(y);if(!y.isMultiLine()&&"("==f&&(e(p),")"==b.doc.getLine(y.start.row).substring(y.start.column+1,y.start.column+2)))return y.end.column++,y}),this.add("brackets","insertion",function(d,g,p,b,y){if("["==y){e(p);var f=p.getSelectionRange(),C=b.doc.getTextRange(f);if(""!==C&&p.getWrapBehavioursEnabled())return n(f,C,"[","]");if(s.isSaneInsertion(p,b))return s.recordAutoInsert(p,b,"]"),{text:"[]",selection:[1,1]}}else if("]"==y){e(p);var $=p.getCursorPosition(),S=b.doc.getLine($.row);if("]"==S.substring($.column,$.column+1)&&null!==b.$findOpeningBracket("]",{column:$.column+1,row:$.row})&&s.isAutoInsertedClosing($,S,y))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(d,g,p,b,y){var f=b.doc.getTextRange(y);if(!y.isMultiLine()&&"["==f&&(e(p),"]"==b.doc.getLine(y.start.row).substring(y.start.column+1,y.start.column+2)))return y.end.column++,y}),this.add("string_dquotes","insertion",function(d,g,p,b,y){var f=b.$mode.$quotes||t;if(1==y.length&&f[y]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(y))return;e(p);var C=y,$=p.getSelectionRange(),S=b.doc.getTextRange($);if(""!==S&&(1!=S.length||!f[S])&&p.getWrapBehavioursEnabled())return n($,S,C,C);if(!S){var E=p.getCursorPosition(),v=b.doc.getLine(E.row),m=v.substring(E.column-1,E.column),u=v.substring(E.column,E.column+1),c=b.getTokenAt(E.row,E.column),w=b.getTokenAt(E.row,E.column+1);if("\\"==m&&c&&/escape/.test(c.type))return null;var _,A=c&&/string|escape/.test(c.type),k=!w||/string|escape/.test(w.type);if(u==C)(_=A!==k)&&/string\.end/.test(w.type)&&(_=!1);else{if(A&&!k||A&&k)return null;var I=b.$mode.tokenRe;I.lastIndex=0;var D=I.test(m);I.lastIndex=0;var N=I.test(u),O=b.$mode.$pairQuotesAfter;if(!(O&&O[C]&&O[C].test(m))&&D||N||u&&!/[\s;,.})\]\\]/.test(u))return null;var F=v[E.column-2];if(m==C&&(F==C||I.test(F)))return null;_=!0}return{text:_?C+C:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(d,g,p,b,y){var f=b.$mode.$quotes||t,C=b.doc.getTextRange(y);if(!y.isMultiLine()&&f.hasOwnProperty(C)&&(e(p),b.doc.getLine(y.start.row).substring(y.start.column+1,y.start.column+2)==C))return y.end.column++,y}),!1!==h.closeDocComment&&this.add("doc comment end","insertion",function(d,g,p,b,y){if("doc-start"===d&&("\n"===y||"\r\n"===y)&&p.selection.isEmpty()){var f=p.getCursorPosition();if(0===f.column)return;for(var C=b.doc.getLine(f.row),$=b.doc.getLine(f.row+1),S=b.getTokens(f.row),E=0,v=0;v=f.column){if(E===f.column){if(!/\.doc/.test(m.type))return;if(/\*\//.test(m.value)){var u=S[v+1];if(!u||!/\.doc/.test(u.type))return}}var c=f.column-(E-m.value.length),w=m.value.indexOf("*/"),A=m.value.indexOf("/**",w>-1?w+2:0);if(-1!==A&&c>A&&c=w&&c<=A||!/\.doc/.test(m.type))return;break}}var k=this.$getIndent(C);if(/\s*\*/.test($))return/^\s*\*/.test(C)?{text:y+k+"* ",selection:[1,2+k.length,1,2+k.length]}:{text:y+k+" * ",selection:[1,3+k.length,1,3+k.length]};if(/\/\*\*/.test(C.substring(0,f.column)))return{text:y+k+" * "+y+" "+k+"*/",selection:[1,4+k.length,1,4+k.length]}}})}).isSaneInsertion=function(h,d){var g=h.getCursorPosition(),p=new M(d,g.row,g.column);if(!this.$matchTokenType(p.getCurrentToken()||"text",l)){if(/[)}\]]/.test(h.session.getLine(g.row)[g.column]))return!0;var b=new M(d,g.row,g.column+1);if(!this.$matchTokenType(b.getCurrentToken()||"text",l))return!1}return p.stepForward(),p.getCurrentTokenRow()!==g.row||this.$matchTokenType(p.getCurrentToken()||"text",r)},s.$matchTokenType=function(h,d){return d.indexOf(h.type||h)>-1},s.recordAutoInsert=function(h,d,g){var p=h.getCursorPosition(),b=d.doc.getLine(p.row);this.isAutoInsertedClosing(p,b,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=p.row,o.autoInsertedLineEnd=g+b.substr(p.column),o.autoInsertedBrackets++},s.recordMaybeInsert=function(h,d,g){var p=h.getCursorPosition(),b=d.doc.getLine(p.row);this.isMaybeInsertedClosing(p,b)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=p.row,o.maybeInsertedLineStart=b.substr(0,p.column)+g,o.maybeInsertedLineEnd=b.substr(p.column),o.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(h,d,g){return o.autoInsertedBrackets>0&&h.row===o.autoInsertedRow&&g===o.autoInsertedLineEnd[0]&&d.substr(h.column)===o.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(h,d){return o.maybeInsertedBrackets>0&&h.row===o.maybeInsertedRow&&d.substr(h.column)===o.maybeInsertedLineEnd&&d.substr(0,h.column)==o.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},T.inherits(s,L),x.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(R,x,B){"use strict";for(var T=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],L=0,M=[],a=0;a2?F%y!=y-1:F%y==0}}else{if(!this.blockComment)return!1;C=this.blockComment.start;var $=this.blockComment.end,E=(S=new RegExp("^(\\s*)(?:"+r.escapeRegExp(C)+")"),new RegExp("(?:"+r.escapeRegExp($)+")\\s*$"));v=function(_,I){u(_,I)||(!g||/\S/.test(_))&&(d.insertInLine({row:I,column:_.length},$),d.insertInLine({row:I,column:b},C))},m=function(_,I){var D;(D=_.match(E))&&d.removeInLine(I,_.length-D[0].length,_.length),(D=_.match(S))&&d.removeInLine(I,D[1].length,D[0].length)},u=function(_,I){if(S.test(_))return!0;for(var D=n.getTokens(I),N=0;N_.length&&(k=_.length)}),b==1/0&&(b=k,g=!1,p=!1),f&&b%y!=0&&(b=Math.floor(b/y)*y),A(p?m:v)},this.toggleBlockComment=function(e,n,s,h){var d=this.blockComment;if(d){!d.start&&d[0]&&(d=d[0]);var f,C,p=(g=new o(n,h.row,h.column)).getCurrentToken(),y=n.selection.toOrientedRange();if(p&&/comment/.test(p.type)){for(var $,S;p&&/comment/.test(p.type);){if(-1!=(E=p.value.indexOf(d.start))){var v=g.getCurrentTokenRow(),m=g.getCurrentTokenColumn()+E;$=new i(v,m,v,m+d.start.length);break}p=g.stepBackward()}var g;for(p=(g=new o(n,h.row,h.column)).getCurrentToken();p&&/comment/.test(p.type);){var E;if(-1!=(E=p.value.indexOf(d.end))){v=g.getCurrentTokenRow(),m=g.getCurrentTokenColumn()+E,S=new i(v,m,v,m+d.end.length);break}p=g.stepForward()}S&&n.remove(S),$&&(n.remove($),f=$.start.row,C=-d.start.length)}else C=d.start.length,f=s.start.row,n.insert(s.end,d.end),n.insert(s.start,d.start);y.start.row==f&&(y.start.column+=C),y.end.row==f&&(y.end.column+=C),n.selection.fromOrientedRange(y)}},this.getNextLineIndent=function(e,n,s){return this.$getIndent(n)},this.checkOutdent=function(e,n,s){return!1},this.autoOutdent=function(e,n,s){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var n in this.$embeds=[],this.$modes={},e)if(e[n]){var s=e[n],h=s.prototype.$id,d=T.$modes[h];d||(T.$modes[h]=d=new s),T.$modes[n]||(T.$modes[n]=d),this.$embeds.push(n),this.$modes[n]=d}var g=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],p=function(y){var f,C,$;$=(f=b)[C=g[y]],f[g[y]]=function(){return this.$delegator(C,arguments,$)}},b=this;for(n=0;nl[r].column&&r++,t.unshift(r,0),l.splice.apply(l,t),this.$updateRows()}}},M.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var l=!0;a.forEach(function(r,o){if(r)for(l=!1,r.row=o;r.$oldWidget;)r.$oldWidget.row=o,r=r.$oldWidget}),l&&(this.session.lineWidgets=null)}},M.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var l=this.session.lineWidgets[a.row];return l&&(a.$oldWidget=l,l.el&&l.el.parentNode&&(l.el.parentNode.removeChild(l.el),l._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},M.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var l=this.editor.renderer;a.html&&!a.el&&(a.el=T.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=T.createElement("div"),a.el.textContent=a.text),a.el&&(T.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&T.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",l.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),null==a.pixelHeight&&(a.pixelHeight=a.el.offsetHeight)),null==a.rowCount&&(a.rowCount=a.pixelHeight/l.layerConfig.lineHeight);var r=this.session.getFoldAt(a.row,0);if(a.$fold=r,r){var o=this.session.lineWidgets;a.row!=r.end.row||o[r.start.row]?a.hidden=!0:o[r.start.row]=a}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,l),this.onWidgetChanged(a),a},M.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch{}if(this.session.lineWidgets){var l=this.session.lineWidgets[a.row];if(l==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;l;){if(l.$oldWidget==a){l.$oldWidget=a.$oldWidget;break}l=l.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},M.prototype.getWidgetsAtRow=function(a){for(var l=this.session.lineWidgets,r=l&&l[a],o=[];r;)o.push(r),r=r.$oldWidget;return o},M.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},M.prototype.measureWidgets=function(a,l){var r=this.session._changedWidgets,o=l.layerConfig;if(r&&r.length){for(var i=1/0,t=0;t0&&!o[i];)i--;this.firstRow=r.firstRow,this.lastRow=r.lastRow,l.$cursorLayer.config=r;for(var e=i;e<=t;e++){var n=o[e];if(n&&n.el){if(n.hidden){n.el.style.top=-100-(n.pixelHeight||0)+"px";continue}n._inDocument||(n._inDocument=!0,l.container.appendChild(n.el));var s=l.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;n.coverLine||(s+=r.lineHeight*this.session.getRowLineCount(n.row)),n.el.style.top=s-r.offset+"px";var h=n.coverGutter?0:l.gutterWidth;n.fixedWidth||(h-=l.scrollLeft),n.el.style.left=h+"px",n.fullWidth&&n.screenWidth&&(n.el.style.minWidth=r.width+2*r.padding+"px"),n.el.style.right=n.fixedWidth?l.scrollBar.getWidth()+"px":""}}}},M}();x.LineWidgets=L}),ace.define("ace/apply_delta",["require","exports","module"],function(R,x,B){"use strict";x.applyDelta=function(a,l,r){var o=l.start.row,i=l.start.column,t=a[o]||"";switch(l.action){case"insert":if(1===l.lines.length)a[o]=t.substring(0,i)+l.lines[0]+t.substring(i);else{var n=[o,1].concat(l.lines);a.splice.apply(a,n),a[o]=t.substring(0,i)+a[o],a[o+l.lines.length-1]+=t.substring(i)}break;case"remove":var s=l.end.column,h=l.end.row;o===h?a[o]=t.substring(0,i)+t.substring(s):a.splice(o,h-o+1,t.substring(0,i)+a[h].substring(s))}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(R,x,B){"use strict";var T=R("./lib/oop"),L=R("./lib/event_emitter").EventEmitter,M=function(){function r(o,i,t){this.$onChange=this.onChange.bind(this),this.attach(o),"number"!=typeof i?this.setPosition(i.row,i.column):this.setPosition(i,t)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row||o.start.row>this.row)){var i=function l(r,o,i){var t="insert"==r.action,e=(t?1:-1)*(r.end.row-r.start.row),n=(t?1:-1)*(r.end.column-r.start.column),s=r.start,h=t?s:r.end;return a(o,s,i)?{row:o.row,column:o.column}:a(h,o,!i)?{row:o.row+e,column:o.column+(o.row==h.row?n:0)}:{row:s.row,column:s.column}}(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(i.row,i.column,!0)}},r.prototype.setPosition=function(o,i,t){var e;if(e=t?{row:o,column:i}:this.$clipPositionToDocument(o,i),this.row!=e.row||this.column!=e.column){var n={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:n,value:e})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(o,i){var t={};return o>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):o<0?(t.row=0,t.column=0):(t.row=o,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,i))),i<0&&(t.column=0),t},r}();function a(r,o,i){return r.row=e&&(i=e-1,t=void 0);var n=this.getLine(i);return null==t&&(t=n.length),{row:i,column:t=Math.min(Math.max(t,0),n.length)}},o.prototype.clonePos=function(i){return{row:i.row,column:i.column}},o.prototype.pos=function(i,t){return{row:i,column:t}},o.prototype.$clipPosition=function(i){var t=this.getLength();return i.row>=t?(i.row=Math.max(0,t-1),i.column=this.getLine(t-1).length):(i.row=Math.max(0,i.row),i.column=Math.min(Math.max(i.column,0),this.getLine(i.row).length)),i},o.prototype.insertFullLines=function(i,t){var e=0;(i=Math.min(Math.max(i,0),this.getLength()))0,n=t=0&&this.applyDelta({start:this.pos(i,this.getLine(i).length),end:this.pos(i+1,0),action:"remove",lines:["",""]})},o.prototype.replace=function(i,t){return i instanceof a||(i=a.fromPoints(i.start,i.end)),0===t.length&&i.isEmpty()?i.start:t==this.getTextRange(i)?i.end:(this.remove(i),t?this.insert(i.start,t):i.start)},o.prototype.applyDeltas=function(i){for(var t=0;t=0;t--)this.revertDelta(i[t])},o.prototype.applyDelta=function(i,t){var e="insert"==i.action;(e?i.lines.length<=1&&!i.lines[0]:!a.comparePoints(i.start,i.end))||(e&&i.lines.length>2e4?this.$splitAndapplyLargeDelta(i,2e4):(L(this.$lines,i,t),this._signal("change",i)))},o.prototype.$safeApplyDelta=function(i){var t=this.$lines.length;("remove"==i.action&&i.start.row20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=t,-1==e&&(e=t),s<=e&&o.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(l){this.tokenizer=l,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(l){this.doc=l,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(l,r){this._signal("update",{data:{first:l,last:r}})},a.prototype.start=function(l){this.currentLine=Math.min(l||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(l){var r=l.start.row,o=l.end.row-r;if(0===o)this.lines[r]=null;else if("remove"==l.action)this.lines.splice(r,o+1,null),this.states.splice(r,o+1,null);else{var i=Array(o+1);i.unshift(r,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(l){return this.lines[l]||this.$tokenizeRow(l)},a.prototype.getState=function(l){return this.currentLine==l&&this.$tokenizeRow(l),this.states[l]||"start"},a.prototype.$tokenizeRow=function(l){var r=this.doc.getLine(l),i=this.tokenizer.getLineTokens(r,this.states[l-1],l);return this.states[l]+""!=i.state+""?(this.states[l]=i.state,this.lines[l+1]=null,this.currentLine>l+1&&(this.currentLine=l+1)):this.currentLine==l&&(this.currentLine=l+1),this.lines[l]=i.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();T.implement(M.prototype,L),x.BackgroundTokenizer=M}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(R,x,B){"use strict";var T=R("./lib/lang"),L=R("./range").Range,M=function(){function a(l,r,o){void 0===o&&(o="text"),this.setRegexp(l),this.clazz=r,this.type=o,this.docLen=0}return a.prototype.setRegexp=function(l){this.regExp+""!=l+""&&(this.regExp=l,this.cache=[])},a.prototype.update=function(l,r,o,i){if(this.regExp){for(var t=i.firstRow,e=i.lastRow,n={},s=o.$editor&&o.$editor.$search,h=s&&s.$isMultilineSearch(o.$editor.getLastSearchOptions()),d=t;d<=e;d++){var g=this.cache[d];if(null==g||o.getValue().length!=this.docLen){if(h){g=[];var p=s.$multiLineForward(o,this.regExp,d,e);if(p){var b=p.endRow<=e?p.endRow-1:e;b>d&&(d=b),g.push(new L(p.startRow,p.startCol,p.endRow,p.endCol))}g.length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES))}else(g=T.getMatchOffsets(o.getLine(d),this.regExp)).length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES)),g=g.map(function($){return new L(d,$.offset,d,$.offset+$.length)});this.cache[d]=g.length?g:""}if(0!==g.length)for(var y=g.length;y--;){var f=g[y].toScreenRange(o),C=f.toString();n[C]||(n[C]=!0,r.drawSingleLineMarker(l,f,this.clazz,i))}}this.docLen=o.getValue().length}},a}();M.prototype.MAX_RANGES=500,x.SearchHighlight=M}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(R,x,B){"use strict";var T=function(){function f(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return f.prototype.addSession=function(C){this.$session=C},f.prototype.add=function(C,$,S){if(!this.$fromUndo&&C!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===$||!this.lastDeltas){this.lastDeltas=[];var E=this.$undoStack.length;E>this.$undoDepth-1&&this.$undoStack.splice(0,E-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),C.id=this.$rev=++this.$maxRev}("remove"==C.action||"insert"==C.action)&&(this.$lastDelta=C),this.lastDeltas.push(C)}},f.prototype.addSelection=function(C,$){this.selections.push({value:C,rev:$||this.$rev})},f.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},f.prototype.markIgnored=function(C,$){null==$&&($=this.$rev+1);for(var S=this.$undoStack,E=S.length;E--;){var v=S[E][0];if(v.id<=C)break;v.id<$&&(v.ignore=!0)}this.lastDeltas=null},f.prototype.getSelection=function(C,$){for(var S=this.selections,E=S.length;E--;){var v=S[E];if(v.rev0},f.prototype.canRedo=function(){return this.$redoStack.length>0},f.prototype.bookmark=function(C){null==C&&(C=this.$rev),this.mark=C},f.prototype.isAtBookmark=function(){return this.$rev===this.mark},f.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},f.prototype.fromJSON=function(C){this.reset(),this.$undoStack=C.$undoStack,this.$redoStack=C.$redoStack},f.prototype.$prettyPrint=function(C){return C?t(C):t(this.$undoStack)+"\n---\n"+t(this.$redoStack)},f}();T.prototype.hasUndo=T.prototype.canUndo,T.prototype.hasRedo=T.prototype.canRedo,T.prototype.isClean=T.prototype.isAtBookmark,T.prototype.markClean=T.prototype.bookmark;var M=R("./range").Range,a=M.comparePoints;function o(f){return{row:f.row,column:f.column}}function t(f){if(f=f||this,Array.isArray(f))return f.map(t).join("\n");var C="";return f.action?(C="insert"==f.action?"+":"-",C+="["+f.lines+"]"):f.value&&(C=Array.isArray(f.value)?f.value.map(e).join("\n"):e(f.value)),f.start&&(C+=e(f)),(f.id||f.rev)&&(C+="\t("+(f.id||f.rev)+")"),C}function e(f){return f.start.row+":"+f.start.column+"=>"+f.end.row+":"+f.end.column}function n(f,C){var $="insert"==f.action,S="insert"==C.action;if($&&S)if(a(C.start,f.end)>=0)d(C,f,-1);else{if(!(a(C.start,f.start)<=0))return null;d(f,C,1)}else if($&&!S)if(a(C.start,f.end)>=0)d(C,f,-1);else{if(!(a(C.end,f.start)<=0))return null;d(f,C,-1)}else if(!$&&S)if(a(C.start,f.start)>=0)d(C,f,1);else{if(!(a(C.start,f.start)<=0))return null;d(f,C,1)}else if(!$&&!S)if(a(C.start,f.start)>=0)d(C,f,1);else{if(!(a(C.end,f.start)<=0))return null;d(f,C,-1)}return[C,f]}function s(f,C){for(var $=f.length;$--;)for(var S=0;S=0?d(f,C,-1):(a(f.start,C.start)<=0||d(f,M.fromPoints(C.start,f.start),-1),d(C,f,1));else if(!$&&S)a(C.start,f.end)>=0?d(C,f,-1):(a(C.start,f.start)<=0||d(C,M.fromPoints(f.start,C.start),-1),d(f,C,1));else if(!$&&!S)if(a(C.start,f.end)>=0)d(C,f,-1);else{var E,v;if(!(a(C.end,f.start)<=0))return a(f.start,C.start)<0&&(E=f,f=p(f,C.start)),a(f.end,C.end)>0&&(v=p(f,C.end)),g(C.end,f.start,f.end,-1),v&&!E&&(f.lines=v.lines,f.start=v.start,f.end=v.end,v=f),[C,E,v].filter(Boolean);d(f,C,-1)}return[C,f]}function d(f,C,$){g(f.start,C.start,C.end,$),g(f.end,C.start,C.end,$)}function g(f,C,$,S){f.row==(1==S?C:$).row&&(f.column+=S*($.column-C.column)),f.row+=S*($.row-C.row)}function p(f,C){var $=f.lines,S=f.end;f.end=o(C);var E=f.end.row-f.start.row,v=$.splice(E,$.length),m=E?C.column:C.column-f.start.column;return $.push(v[0].substring(0,m)),v[0]=v[0].substr(m),{start:o(C),end:S,lines:v,action:f.action}}function b(f,C){C=function i(f){return{start:o(f.start),end:o(f.end),action:f.action,lines:f.lines.slice()}}(C);for(var $=f.length;$--;){for(var S=f[$],E=0;Ethis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(l,r){return-l.range.compareEnd(r.start.row,r.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else{if(a.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column}a.foldLine=this},M.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},M.prototype.walk=function(a,l,r){var t,e,o=0,i=this.folds,s=!0;null==l&&(l=this.end.row,r=this.end.column);for(var h=0;h0)){var s=L(l,e.start);return 0===n?r&&0!==s?-t-2:t:s>0||0===s&&!r?t:-t-1}}return-t-1},a.prototype.add=function(l){var r=!l.isEmpty(),o=this.pointIndex(l.start,r);o<0&&(o=-o-1);var i=this.pointIndex(l.end,r,o);return i<0?i=-i-1:i++,this.ranges.splice(o,i-o,l)},a.prototype.addList=function(l){for(var r=[],o=l.length;o--;)r.push.apply(r,this.add(l[o]));return r},a.prototype.substractPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges.splice(r,1)},a.prototype.merge=function(){for(var i,l=[],r=this.ranges,o=(r=r.sort(function(n,s){return L(n.start,s.start)}))[0],t=1;t=0},a.prototype.containsPoint=function(l){return this.pointIndex(l)>=0},a.prototype.rangeAtPoint=function(l){var r=this.pointIndex(l);if(r>=0)return this.ranges[r]},a.prototype.clipRows=function(l,r){var o=this.ranges;if(o[0].start.row>r||o[o.length-1].start.row=i);n++);if("insert"==l.action){for(var d=t-i,g=-r.column+o.column;ni);n++)if(h.start.row==i&&h.start.column>=r.column&&(h.start.column==r.column&&this.$bias<=0||(h.start.column+=g,h.start.row+=d)),h.end.row==i&&h.end.column>=r.column){if(h.end.column==r.column&&this.$bias<0)continue;h.end.column==r.column&&g>0&&nh.start.column&&h.end.column==e[n+1].start.column&&(h.end.column-=g),h.end.column+=g,h.end.row+=d}}else for(d=i-t,g=r.column-o.column;nt);n++)h.end.rowr.column)&&(h.end.column=r.column,h.end.row=r.row):(h.end.column+=g,h.end.row+=d):h.end.row>t&&(h.end.row+=d),h.start.rowr.column)&&(h.start.column=r.column,h.start.row=r.row):(h.start.column+=g,h.start.row+=d):h.start.row>t&&(h.start.row+=d);if(0!=d&&n=o)return n;if(n.end.row>o)return null}return null},this.getNextFoldLine=function(o,i){var t=this.$foldData,e=0;for(i&&(e=t.indexOf(i)),-1==e&&(e=0);e=o)return n}return null},this.getFoldedRowCount=function(o,i){for(var t=this.$foldData,e=i-o+1,n=0;n=i){d=o?e-=i-d:e=0);break}h>=o&&(e-=d>=o?h-d:h-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(i,t){return i.start.row-t.start.row}),o},this.addFold=function(o,i){var n,t=this.$foldData,e=!1;o instanceof M?n=o:(n=new M(i,o)).collapseChildren=i.collapseChildren,this.$clipRangeToDocument(n.range);var s=n.start.row,h=n.start.column,d=n.end.row,g=n.end.column,p=this.getFoldAt(s,h,1),b=this.getFoldAt(d,g,-1);if(p&&b==p)return p.addSubFold(n);p&&!p.range.isStart(s,h)&&this.removeFold(p),b&&!b.range.isEnd(d,g)&&this.removeFold(b);var y=this.getFoldsInRange(n.range);y.length>0&&(this.removeFolds(y),n.collapseChildren||y.forEach(function(S){n.addSubFold(S)}));for(var f=0;f0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(i){this.expandFold(i)},this)},this.unfold=function(o,i){var t,e;if(null==o)t=new T(0,0,this.getLength(),0),null==i&&(i=!0);else if("number"==typeof o)t=new T(o,0,o,this.getLine(o).length);else if("row"in o)t=T.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=o}for(var n=e=this.getFoldsInRangeList(t);1==e.length&&T.comparePoints(e[0].start,t.start)<0&&T.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(0!=i?this.removeFolds(e):this.expandFolds(e),n.length)return n},this.isRowFolded=function(o,i){return!!this.getFoldLine(o,i)},this.getRowFoldEnd=function(o,i){var t=this.getFoldLine(o,i);return t?t.end.row:o},this.getRowFoldStart=function(o,i){var t=this.getFoldLine(o,i);return t?t.start.row:o},this.getFoldDisplayLine=function(o,i,t,e,n){null==e&&(e=o.start.row),null==n&&(n=0),null==i&&(i=o.end.row),null==t&&(t=this.getLine(i).length);var s=this.doc,h="";return o.walk(function(d,g,p,b){if(!(gp)break}while(n&&h.test(n.type));n=e.stepBackward()}else n=e.getCurrentToken();return d.end.row=e.getCurrentTokenRow(),d.end.column=e.getCurrentTokenColumn(),d.start.row==d.end.row&&d.start.column>d.end.column?void 0:d}},this.foldAll=function(o,i,t,e){null==t&&(t=1e5);var n=this.foldWidgets;if(n){i=i||this.getLength();for(var s=o=o||0;s=o&&(s=h.end.row,h.collapseChildren=t,this.addFold("...",h))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(i){for(var t=o.getTokens(i),e=0;e=0;){var s=t[e];if(null==s&&(s=t[e]=this.getFoldWidget(e)),"start"==s){var h=this.getFoldWidgetRange(e);if(n||(n=h),h&&h.end.row>=o)break}e--}return{range:-1!==e&&h,firstRange:n}},this.onFoldWidgetClick=function(o,i){if(i instanceof l&&(i=i.domEvent),!this.$toggleFoldWidget(o,{children:i.shiftKey,all:i.ctrlKey||i.metaKey,siblings:i.altKey})){var n=i.target||i.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,i){if(this.getFoldWidget){var t=this.getFoldWidget(o),e=this.getLine(o),n="end"===t?-1:1,s=this.getFoldAt(o,-1===n?0:e.length,n);if(s)return i.children||i.all?this.removeFold(s):this.expandFold(s),s;var h=this.getFoldWidgetRange(o,!0);if(h&&!h.isMultiLine()&&(s=this.getFoldAt(h.start.row,h.start.column,1))&&h.isEqual(s.range))return this.removeFold(s),s;if(i.siblings){var d=this.getParentFoldRangeData(o);if(d.range)var g=d.range.start.row+1,p=d.range.end.row;this.foldAll(g,p,i.all?1e4:0)}else i.children?(p=h?h.end.row:this.getLength(),this.foldAll(o+1,p,i.all?1e4:0)):h&&(i.all&&(h.collapseChildren=1e4),this.addFold("...",h));return h}},this.toggleFoldWidget=function(o){var i=this.selection.getCursor().row;i=this.getRowFoldStart(i);var t=this.$toggleFoldWidget(i,{});if(!t){var e=this.getParentFoldRangeData(i,!0);if(t=e.range||e.firstRange){var n=this.getFoldAt(i=t.start.row,this.getLine(i).length,1);n?this.removeFold(n):this.addFold("...",t)}}},this.updateFoldWidgets=function(o){var i=o.start.row,t=o.end.row-i;if(0===t)this.foldWidgets[i]=null;else if("remove"==o.action)this.foldWidgets.splice(i,t+1,null);else{var e=Array(t+1);e.unshift(i,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(o){var i=o.data;i.first!=i.last&&this.foldWidgets.length>i.first&&this.foldWidgets.splice(i.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(R,x,B){"use strict";var T=R("../token_iterator").TokenIterator,L=R("../range").Range;x.BracketMatch=function M(){this.findMatchingBracket=function(a,l){if(0==a.column)return null;var r=l||this.getLine(a.row).charAt(a.column-1);if(""==r)return null;var o=r.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],a):this.$findOpeningBracket(o[2],a):null},this.getBracketRange=function(a){var o,l=this.getLine(a.row),r=!0,i=l.charAt(a.column-1),t=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(t||(i=l.charAt(a.column),a={row:a.row,column:a.column+1},t=i&&i.match(/([\(\[\{])|([\)\]\}])/),r=!1),!t)return null;if(t[1]){if(!(e=this.$findClosingBracket(t[1],a)))return null;o=L.fromPoints(a,e),r||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e;if(!(e=this.$findOpeningBracket(t[2],a)))return null;o=L.fromPoints(e,a),r||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(a,l){var r=this.getLine(a.row),o=/([\(\[\{])|([\)\]\}])/,i=!l&&r.charAt(a.column-1),t=i&&i.match(o);if(t||(i=(void 0===l||l)&&r.charAt(a.column),a={row:a.row,column:a.column+1},t=i&&i.match(o)),!t)return null;var e=new L(a.row,a.column-1,a.row,a.column),n=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);return n?[e,new L(n.row,n.column,n.row,n.column+1)]:[e]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,l,r){var o=this.$brackets[a],i=1,t=new T(this,l.row,l.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var n=l.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;n>=0;){var h=s.charAt(n);if(h==o){if(0==(i-=1))return{row:t.getCurrentTokenRow(),column:n+t.getCurrentTokenColumn()}}else h==a&&(i+=1);n-=1}do{e=t.stepBackward()}while(e&&!r.test(e.type));if(null==e)break;n=(s=e.value).length-1}return null}},this.$findClosingBracket=function(a,l,r){var o=this.$brackets[a],i=1,t=new T(this,l.row,l.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var n=l.column-t.getCurrentTokenColumn();;){for(var s=e.value,h=s.length;n"===l.value?o=!0:-1!==l.type.indexOf("tag-name")&&(r=!0))}while(l&&!r);return l},this.$findClosingTag=function(a,l){var r,o=l.value,i=l.value,t=0,e=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);l=a.stepForward();var n=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length),s=!1;do{if(-1!==(r=l).type.indexOf("tag-close")&&!s){var h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(l=a.stepForward())if(">"!==l.value||s||(h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1),s=!0),-1!==l.type.indexOf("tag-name")){if(i===(o=l.value))if("<"===r.value)t++;else if(""!==l.value)return;var p=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else i===o&&"/>"===l.value&&--t<0&&(p=g=d=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),h=new L(n.end.row,n.end.column,n.end.row,n.end.column+1))}while(l&&t>=0);if(e&&h&&d&&p&&n&&g)return{openTag:new L(e.start.row,e.start.column,h.end.row,h.end.column),closeTag:new L(d.start.row,d.start.column,p.end.row,p.end.column),openTagName:n,closeTagName:g}},this.$findOpeningTag=function(a,l){var r=a.getCurrentToken(),o=l.value,i=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),n=e+2,s=new L(t,e,t,n);a.stepForward();var h=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+l.value.length);if(-1===l.type.indexOf("tag-close")&&(l=a.stepForward()),l&&">"===l.value){var d=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do{if(l=r,t=a.getCurrentTokenRow(),n=(e=a.getCurrentTokenColumn())+l.value.length,r=a.stepBackward(),l)if(-1!==l.type.indexOf("tag-name")){if(o===l.value)if("<"===r.value){if(++i>0){var g=new L(t,e,t,n),p=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do{l=a.stepForward()}while(l&&">"!==l.value);var b=new L(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else""===l.value){for(var y=0,f=r;f;){if(-1!==f.type.indexOf("tag-name")&&f.value===o){i--;break}if("<"===f.value)break;f=a.stepBackward(),y++}for(var C=0;Cc&&(this.$docRowCache.splice(c,u),this.$screenRowCache.splice(c,u))},v.prototype.$getRowCacheIndex=function(m,u){for(var c=0,w=m.length-1;c<=w;){var A=c+w>>1,k=m[A];if(u>k)c=A+1;else{if(!(u=u);k++);return(w=c[k])?(w.index=k,w.start=A-w.value.length,w):null},v.prototype.setUndoManager=function(m){if(this.$undoManager=m,this.$informUndoManager&&this.$informUndoManager.cancel(),m){var u=this;m.addSession(this),this.$syncInformUndoManager=function(){u.$informUndoManager.cancel(),u.mergeUndoDeltas=!1},this.$informUndoManager=L.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},v.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},v.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},v.prototype.getTabString=function(){return this.getUseSoftTabs()?L.stringRepeat(" ",this.getTabSize()):"\t"},v.prototype.setUseSoftTabs=function(m){this.setOption("useSoftTabs",m)},v.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},v.prototype.setTabSize=function(m){this.setOption("tabSize",m)},v.prototype.getTabSize=function(){return this.$tabSize},v.prototype.isTabStop=function(m){return this.$useSoftTabs&&m.column%this.$tabSize==0},v.prototype.setNavigateWithinSoftTabs=function(m){this.setOption("navigateWithinSoftTabs",m)},v.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},v.prototype.setOverwrite=function(m){this.setOption("overwrite",m)},v.prototype.getOverwrite=function(){return this.$overwrite},v.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},v.prototype.addGutterDecoration=function(m,u){this.$decorations[m]||(this.$decorations[m]=""),this.$decorations[m]+=" "+u,this._signal("changeBreakpoint",{})},v.prototype.removeGutterCustomWidget=function(m){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(m)},v.prototype.addGutterCustomWidget=function(m,u){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(m,u)},v.prototype.removeGutterDecoration=function(m,u){this.$decorations[m]=(this.$decorations[m]||"").replace(" "+u,""),this._signal("changeBreakpoint",{})},v.prototype.getBreakpoints=function(){return this.$breakpoints},v.prototype.setBreakpoints=function(m){this.$breakpoints=[];for(var u=0;u0&&(w=!!c.charAt(u-1).match(this.tokenRe)),w||(w=!!c.charAt(u).match(this.tokenRe)),w)var A=this.tokenRe;else A=/^\s+$/.test(c.slice(u-1,u+1))?/\s/:this.nonTokenRe;var k=u;if(k>0){do{k--}while(k>=0&&c.charAt(k).match(A));k++}for(var _=u;_m&&(m=u.screenWidth)}),this.lineWidgetWidth=m},v.prototype.$computeWidth=function(m){if(this.$modified||m){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var u=this.doc.getAllLines(),c=this.$rowLengthCache,w=0,A=0,k=this.$foldData[A],_=k?k.start.row:1/0,I=u.length,D=0;D_){if((D=k.end.row+1)>=I)break;_=(k=this.$foldData[A++])?k.start.row:1/0}null==c[D]&&(c[D]=this.$getStringScreenWidth(u[D])[0]),c[D]>w&&(w=c[D])}this.screenWidth=w}},v.prototype.getLine=function(m){return this.doc.getLine(m)},v.prototype.getLines=function(m,u){return this.doc.getLines(m,u)},v.prototype.getLength=function(){return this.doc.getLength()},v.prototype.getTextRange=function(m){return this.doc.getTextRange(m||this.selection.getRange())},v.prototype.insert=function(m,u){return this.doc.insert(m,u)},v.prototype.remove=function(m){return this.doc.remove(m)},v.prototype.removeFullLines=function(m,u){return this.doc.removeFullLines(m,u)},v.prototype.undoChanges=function(m,u){if(m.length){this.$fromUndo=!0;for(var c=m.length-1;-1!=c;c--){var w=m[c];"insert"==w.action||"remove"==w.action?this.doc.revertDelta(w):w.folds&&this.addFolds(w.folds)}!u&&this.$undoSelect&&(m.selectionBefore?this.selection.fromJSON(m.selectionBefore):this.selection.setRange(this.$getUndoSelection(m,!0))),this.$fromUndo=!1}},v.prototype.redoChanges=function(m,u){if(m.length){this.$fromUndo=!0;for(var c=0;cm.end.column&&(k.start.column+=I),k.end.row==m.end.row&&k.end.column>m.end.column&&(k.end.column+=I)),_&&k.start.row>=m.end.row&&(k.start.row+=_,k.end.row+=_)),k.end=this.insert(k.start,w),A.length){var D=m.start,N=k.start,_=N.row-D.row,I=N.column-D.column;this.addFolds(A.map(function(F){return(F=F.clone()).start.row==D.row&&(F.start.column+=I),F.end.row==D.row&&(F.end.column+=I),F.start.row+=_,F.end.row+=_,F}))}return k},v.prototype.indentRows=function(m,u,c){c=c.replace(/\t/g,this.getTabString());for(var w=m;w<=u;w++)this.doc.insertInLine({row:w,column:0},c)},v.prototype.outdentRows=function(m){for(var u=m.collapseRows(),c=new i(0,0,0,0),w=this.getTabSize(),A=u.start.row;A<=u.end.row;++A){var k=this.getLine(A);c.start.row=A,c.end.row=A;for(var _=0;_0){var w;if((w=this.getRowFoldEnd(u+c))>this.doc.getLength()-1)return 0;A=w-u}else m=this.$clipRowToDocument(m),A=(u=this.$clipRowToDocument(u))-m+1;var k=new i(m,0,u,Number.MAX_VALUE),_=this.getFoldsInRange(k).map(function(D){return(D=D.clone()).start.row+=A,D.end.row+=A,D}),I=0==c?this.doc.getLines(m,u):this.doc.removeFullLines(m,u);return this.doc.insertFullLines(m+A,I),_.length&&this.addFolds(_),A},v.prototype.moveLinesUp=function(m,u){return this.$moveLines(m,u,-1)},v.prototype.moveLinesDown=function(m,u){return this.$moveLines(m,u,1)},v.prototype.duplicateLines=function(m,u){return this.$moveLines(m,u,0)},v.prototype.$clipRowToDocument=function(m){return Math.max(0,Math.min(m,this.doc.getLength()-1))},v.prototype.$clipColumnToRow=function(m,u){return u<0?0:Math.min(this.doc.getLine(m).length,u)},v.prototype.$clipPositionToDocument=function(m,u){if(u=Math.max(0,u),m<0)m=0,u=0;else{var c=this.doc.getLength();m>=c?(m=c-1,u=this.doc.getLine(c-1).length):u=Math.min(this.doc.getLine(m).length,u)}return{row:m,column:u}},v.prototype.$clipRangeToDocument=function(m){m.start.row<0?(m.start.row=0,m.start.column=0):m.start.column=this.$clipColumnToRow(m.start.row,m.start.column);var u=this.doc.getLength()-1;return m.end.row>u?(m.end.row=u,m.end.column=this.doc.getLine(u).length):m.end.column=this.$clipColumnToRow(m.end.row,m.end.column),m},v.prototype.setUseWrapMode=function(m){if(m!=this.$useWrapMode){if(this.$useWrapMode=m,this.$modified=!0,this.$resetRowCache(0),m){var u=this.getLength();this.$wrapData=Array(u),this.$updateWrapData(0,u-1)}this._signal("changeWrapMode")}},v.prototype.getUseWrapMode=function(){return this.$useWrapMode},v.prototype.setWrapLimitRange=function(m,u){(this.$wrapLimitRange.min!==m||this.$wrapLimitRange.max!==u)&&(this.$wrapLimitRange={min:m,max:u},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},v.prototype.adjustWrapLimit=function(m,u){var c=this.$wrapLimitRange;c.max<0&&(c={min:u,max:u});var w=this.$constrainWrapLimit(m,c.min,c.max);return w!=this.$wrapLimit&&w>1&&(this.$wrapLimit=w,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},v.prototype.$constrainWrapLimit=function(m,u,c){return u&&(m=Math.max(u,m)),c&&(m=Math.min(c,m)),m},v.prototype.getWrapLimit=function(){return this.$wrapLimit},v.prototype.setWrapLimit=function(m){this.setWrapLimitRange(m,m)},v.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},v.prototype.$updateInternalDataOnChange=function(m){var u=this.$useWrapMode,c=m.action,w=m.start,A=m.end,k=w.row,_=A.row,I=_-k,D=null;if(this.$updating=!0,0!=I)if("remove"===c){this[u?"$wrapData":"$rowLengthCache"].splice(k,I);var N=this.$foldData;D=this.getFoldsInRange(m),this.removeFolds(D);var W=0;if(O=this.getFoldLine(A.row)){O.addRemoveChars(A.row,A.column,w.column-A.column),O.shiftRow(-I);var F=this.getFoldLine(k);F&&F!==O&&(F.merge(O),O=F),W=N.indexOf(O)+1}for(;W=A.row&&O.shiftRow(-I);_=k}else{var H=Array(I);H.unshift(k,0);var z=u?this.$wrapData:this.$rowLengthCache;if(z.splice.apply(z,H),N=this.$foldData,W=0,O=this.getFoldLine(k)){var V=O.range.compareInside(w.row,w.column);0==V?(O=O.split(w.row,w.column))&&(O.shiftRow(I),O.addRemoveChars(_,0,A.column-w.column)):-1==V&&(O.addRemoveChars(k,0,A.column-w.column),O.shiftRow(I)),W=N.indexOf(O)+1}for(;W=k&&O.shiftRow(I)}}else I=Math.abs(m.start.column-m.end.column),"remove"===c&&(D=this.getFoldsInRange(m),this.removeFolds(D),I=-I),(O=this.getFoldLine(k))&&O.addRemoveChars(k,w.column,I);return u&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,u?this.$updateWrapData(k,_):this.$updateRowLengthCache(k,_),D},v.prototype.$updateRowLengthCache=function(m,u){this.$rowLengthCache[m]=null,this.$rowLengthCache[u]=null},v.prototype.$updateWrapData=function(m,u){var _,I,c=this.doc.getAllLines(),w=this.getTabSize(),A=this.$wrapData,k=this.$wrapLimit,D=m;for(u=Math.min(u,c.length-1);D<=u;)(I=this.getFoldLine(D,I))?(_=[],I.walk(function(N,O,W,F){var H;if(null!=N){(H=this.$getDisplayTokens(N,_.length))[0]=b;for(var z=1;zu-F;){var H=k+u-F;if(m[H-1]>=C&&m[H]>=C)W(H);else if(m[H]!=b&&m[H]!=y){for(var z=Math.max(H-(u-(u>>2)),k-1);H>z&&m[H]z&&m[H]z&&m[H]==f;)H--}else for(;H>z&&m[H]z?W(++H):(m[H=k+u]==p&&H--,W(H-F))}else{for(;H!=k-1&&m[H]!=b;H--);if(H>k){W(H);continue}for(H=k+u;H39&&k<48||k>57&&k<64?c.push(f):k>=4352&&E(k)?c.push(g,p):c.push(g)}return c},v.prototype.$getStringScreenWidth=function(m,u,c){if(0==u)return[0,0];var w,A;for(null==u&&(u=1/0),c=c||0,A=0;A=4352&&E(w)?c+=2:c+=1,!(c>u));A++);return[c,A]},v.prototype.getRowLength=function(m){var u=1;return this.lineWidgets&&(u+=this.lineWidgets[m]&&this.lineWidgets[m].rowCount||0),this.$useWrapMode&&this.$wrapData[m]?this.$wrapData[m].length+u:u},v.prototype.getRowLineCount=function(m){return this.$useWrapMode&&this.$wrapData[m]?this.$wrapData[m].length+1:1},v.prototype.getRowWrapIndent=function(m){if(this.$useWrapMode){var u=this.screenToDocumentPosition(m,Number.MAX_VALUE),c=this.$wrapData[u.row];return c.length&&c[0]=0){I=N[O],A=this.$docRowCache[O];var F=m>N[W-1]}else F=!W;for(var H=this.getLength()-1,z=this.getNextFoldLine(A),V=z?z.start.row:1/0;I<=m&&!(I+(D=this.getRowLength(A))>m||A>=H);)I+=D,++A>V&&(V=(z=this.getNextFoldLine(A=z.end.row+1,z))?z.start.row:1/0),F&&(this.$docRowCache.push(A),this.$screenRowCache.push(I));if(z&&z.start.row<=A)w=this.getFoldDisplayLine(z),A=z.start.row;else{if(I+D<=m||A>H)return{row:H,column:this.getLine(H).length};w=this.getLine(A),z=null}var U=0,P=Math.floor(m-I);if(this.$useWrapMode){var G=this.$wrapData[A];G&&(_=G[P],P>0&&G.length&&(U=G.indent,w=w.substring(k=G[P-1]||G[G.length-1])))}return void 0!==c&&this.$bidiHandler.isBidiRow(I+P,A,P)&&(u=this.$bidiHandler.offsetToCol(c)),k+=this.$getStringScreenWidth(w,u-U)[1],this.$useWrapMode&&k>=_&&(k=_-1),z?z.idxToPosition(k):{row:A,column:k}},v.prototype.documentToScreenPosition=function(m,u){if(typeof u>"u")var c=this.$clipPositionToDocument(m.row,m.column);else c=this.$clipPositionToDocument(m,u);var k,w=0,A=null;(k=this.getFoldAt(m=c.row,u=c.column,1))&&(m=k.start.row,u=k.start.column);var _,I=0,D=this.$docRowCache,N=this.$getRowCacheIndex(D,m),O=D.length;if(O&&N>=0){I=D[N],w=this.$screenRowCache[N];var W=m>D[O-1]}else W=!O;for(var F=this.getNextFoldLine(I),H=F?F.start.row:1/0;I=H){if((_=F.end.row+1)>m)break;H=(F=this.getNextFoldLine(_,F))?F.start.row:1/0}else _=I+1;w+=this.getRowLength(I),I=_,W&&(this.$docRowCache.push(I),this.$screenRowCache.push(w))}var z="";F&&I>=H?(z=this.getFoldDisplayLine(F,m,u),A=F.start.row):(z=this.getLine(m).substring(0,u),A=m);var V=0;if(this.$useWrapMode){var U=this.$wrapData[A];if(U){for(var P=0;z.length>=U[P];)w++,P++;z=z.substring(U[P-1]||0,z.length),V=P>0?U.indent:0}}return this.lineWidgets&&this.lineWidgets[I]&&this.lineWidgets[I].rowsAbove&&(w+=this.lineWidgets[I].rowsAbove),{row:w,column:V+this.$getStringScreenWidth(z)[0]}},v.prototype.documentToScreenColumn=function(m,u){return this.documentToScreenPosition(m,u).column},v.prototype.documentToScreenRow=function(m,u){return this.documentToScreenPosition(m,u).row},v.prototype.getScreenLength=function(){var m=0,u=null;if(this.$useWrapMode)for(var A=this.$wrapData.length,k=0,w=0,_=(u=this.$foldData[w++])?u.start.row:1/0;k_&&(k=u.end.row+1,_=(u=this.$foldData[w++])?u.start.row:1/0)}else{m=this.getLength();var c=this.$foldData;for(w=0;wc);k++);return[w,k]})},v.prototype.getPrecedingCharacter=function(){var m=this.selection.getCursor();return 0===m.column?0===m.row?"":this.doc.getNewLineCharacter():this.getLine(m.row)[m.column-1]},v.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},v}();d.$uid=0,d.prototype.$modes=a.$modes,d.prototype.getValue=d.prototype.toString,d.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},d.prototype.$overwrite=!1,d.prototype.$mode=null,d.prototype.$modeId=null,d.prototype.$scrollTop=0,d.prototype.$scrollLeft=0,d.prototype.$wrapLimit=80,d.prototype.$useWrapMode=!1,d.prototype.$wrapLimitRange={min:null,max:null},d.prototype.lineWidgets=null,d.prototype.isFullWidth=E,T.implement(d.prototype,l);var g=1,p=2,b=3,y=4,f=9,C=10,$=11,S=12;function E(v){return!(v<4352)&&(v>=4352&&v<=4447||v>=4515&&v<=4519||v>=4602&&v<=4607||v>=9001&&v<=9002||v>=11904&&v<=11929||v>=11931&&v<=12019||v>=12032&&v<=12245||v>=12272&&v<=12283||v>=12288&&v<=12350||v>=12353&&v<=12438||v>=12441&&v<=12543||v>=12549&&v<=12589||v>=12593&&v<=12686||v>=12688&&v<=12730||v>=12736&&v<=12771||v>=12784&&v<=12830||v>=12832&&v<=12871||v>=12880&&v<=13054||v>=13056&&v<=19903||v>=19968&&v<=42124||v>=42128&&v<=42182||v>=43360&&v<=43388||v>=44032&&v<=55203||v>=55216&&v<=55238||v>=55243&&v<=55291||v>=63744&&v<=64255||v>=65040&&v<=65049||v>=65072&&v<=65106||v>=65108&&v<=65126||v>=65128&&v<=65131||v>=65281&&v<=65376||v>=65504&&v<=65510)}R("./edit_session/folding").Folding.call(d.prototype),R("./edit_session/bracket_match").BracketMatch.call(d.prototype),a.defineOptions(d.prototype,"session",{wrap:{set:function(v){if(v&&"off"!=v?"free"==v?v=!0:"printMargin"==v?v=-1:"string"==typeof v&&(v=parseInt(v,10)||!1):v=!1,this.$wrap!=v)if(this.$wrap=v,v){var m="number"==typeof v?v:null;this.setWrapLimitRange(m,m),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(v){(v="auto"==v?"text"!=this.$mode.type:"text"!=v)!=this.$wrapAsCode&&(this.$wrapAsCode=v,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(v){this.$useWorker=v,this.$stopWorker(),v&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(v){(v=parseInt(v))>0&&this.$tabSize!==v&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=v,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(v){this.setFoldStyle(v)},handlesSet:!0},overwrite:{set:function(v){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(v){this.doc.setNewLineMode(v)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(v){this.setMode(v)},get:function(){return this.$modeId},handlesSet:!0}}),x.EditSession=d}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(R,x,B){"use strict";var T=R("./lib/lang"),L=R("./lib/oop"),M=R("./range").Range,a=function(){function i(){this.$options={}}return i.prototype.set=function(t){return L.mixin(this.$options,t),this},i.prototype.getOptions=function(){return T.copyObject(this.$options)},i.prototype.setOptions=function(t){this.$options=t},i.prototype.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var s=null;return n.forEach(function(h,d,g,p){return s=new M(h,d,g,p),!(d==p&&e.start&&e.start.start&&0!=e.skipCurrent&&s.isEqual(e.start)&&(s=null,1))}),s},i.prototype.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,s=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),h=[],d=e.re;if(e.$isMultiLine){var b,g=d.length,p=s.length-g;e:for(var y=d.offset||0;y<=p;y++){for(var f=0;fS||(h.push(b=new M(y,S,y+g-1,E)),g>2&&(y=y+g-2))}}else for(var v,m=0;mm&&(m=c),h.push(new M(v.startRow,v.startCol,v.endRow,v.endCol))}}else for(v=T.getMatchOffsets(s[m],d),f=0;fk&&h[f].end.row==_;)f--;for(h=h.slice(m,f+1),m=0,f=h.length;m=h){n+="$";break}var p=t.charCodeAt(s);if(p===e.DollarSign){n+="$$";continue}if(p===e.Digit0||p===e.Ampersand){n+="$&";continue}if(e.Digit1<=p&&p<=e.Digit9){n+="$"+t[s];continue}}n+=t[s]}else{if(++s>=h){n+="\\";break}switch(t.charCodeAt(s)){case e.Backslash:n+="\\";break;case e.n:n+="\n";break;case e.t:n+="\t"}}}return n||t},i.prototype.replace=function(t,e){var n=this.$options,s=this.$assembleRegExp(n);if(n.$isMultiLine)return e;if(s){var h=this.$isMultilineSearch(n);h&&(t=t.replace(/\r\n|\r|\n/g,"\n"));var d=s.exec(t);if(!d||!h&&d[0].length!=t.length)return null;if(e=n.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=t.replace(s,e),n.preserveCase){e=e.split("");for(var g=Math.min(t.length,t.length);g--;){var p=t[g];e[g]=p&&p.toLowerCase()!=p?e[g].toUpperCase():e[g].toLowerCase()}e=e.join("")}return e}},i.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=T.escapeRegExp(n));var s=t.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),t.$supportsUnicodeFlag=!0,s+="u"}catch{t.$supportsUnicodeFlag=!1}if(t.wholeWord&&(n=function l(i,t){var e=T.supportsLookbehind();function n(g,p){return void 0===p&&(p=!0),(e&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(g)||t.regExp?e&&t.$supportsUnicodeFlag?p?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(i),d=s[s.length-1];return n(s[0])+i+n(d,!1)}(n,t)),t.$isMultiLine=!e&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,s);try{var h=new RegExp(n,s)}catch{h=!1}return t.re=h},i.prototype.$assembleMultilineRegExp=function(t,e){for(var n=t.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),s=[],h=0;hs);p++){var b=t.getLine(g++);h=null==h?b:h+"\n"+b}var y=e.exec(h);if(e.lastIndex=0,y){var f=h.slice(0,y.index).split("\n"),C=y[0].split("\n"),$=n+f.length-1,S=f[f.length-1].length;return{startRow:$,startCol:S,endRow:$+C.length-1,endCol:1==C.length?S+C[0].length:C[C.length-1].length}}}return null},i.prototype.$multiLineBackward=function(t,e,n,s,h){for(var d,g=o(t,s),p=t.getLine(s).length-n,b=s;b>=h;){for(var y=0;y=h;y++){var f=t.getLine(b--);d=null==d?f:f+"\n"+d}var C=r(d,e,p);if(C){var $=d.slice(0,C.index).split("\n"),S=C[0].split("\n"),E=b+$.length,v=$[$.length-1].length;return{startRow:E,startCol:v,endRow:E+S.length-1,endCol:1==S.length?v+S[0].length:S[S.length-1].length}}}return null},i.prototype.$matchIterator=function(t,e){var n=this.$assembleRegExp(e);if(!n)return!1;var s=this.$isMultilineSearch(e),h=this.$multiLineForward,d=this.$multiLineBackward,g=1==e.backwards,p=0!=e.skipCurrent,b=n.unicode,y=e.range,f=e.start;f||(f=y?y[g?"end":"start"]:t.selection.getRange()),f.start&&(f=f[p!=g?"end":"start"]);var C=y?y.start.row:0,$=y?y.end.row:t.getLength()-1;if(g)var S=function(m){var u=f.row;if(!v(u,f.column,m)){for(u--;u>=C;u--)if(v(u,Number.MAX_VALUE,m))return;if(0!=e.wrap)for(u=$,C=f.row;u>=C;u--)if(v(u,Number.MAX_VALUE,m))return}};else S=function(u){var c=f.row;if(!v(c,f.column,u)){for(c+=1;c<=$;c++)if(v(c,0,u))return;if(0!=e.wrap)for(c=C,$=f.row;c<=$;c++)if(v(c,0,u))return}};if(e.$isMultiLine)var E=n.length,v=function(m,u,c){var w=g?m-E+1:m;if(!(w<0||w+E>t.getLength())){var A=t.getLine(w),k=A.search(n[0]);if(!(!g&&ku)&&c(w,k,w+E-1,I))return!0}}};else v=g?function(u,c,w){if(s){var A=d(t,n,c,u,C);if(!A)return!1;if(w(A.startRow,A.startCol,A.endRow,A.endCol))return!0}else{var I,k=t.getLine(u),_=[],D=0;for(n.lastIndex=0;I=n.exec(k);){if(D=I.index,!(N=I[0].length)){if(D>=k.length)break;n.lastIndex=D+=T.skipEmptyMatch(k,D,b)}if(I.index+N>c)break;_.push(I.index,N)}for(var O=_.length-1;O>=0;O-=2){var N,W=_[O-1];if(w(u,W,u,W+(N=_[O])))return!0}}}:function(u,c,w){if(n.lastIndex=c,s){var A=h(t,n,u,$);if(A){var k=A.endRow<=$?A.endRow-1:$;k>u&&(u=k)}if(!A)return!1;if(w(A.startRow,A.startCol,A.endRow,A.endCol))return!0}else for(var I,D,_=t.getLine(u);D=n.exec(_);){var N=D[0].length;if(w(u,I=D.index,u,I+N))return!0;if(!N&&(n.lastIndex=I+=T.skipEmptyMatch(_,I,b),I>=_.length))return!1}};return{forEach:S}},i}();function r(i,t,e){for(var n=null,s=0;s<=i.length;){t.lastIndex=s;var h=t.exec(i);if(!h)break;var d=h.index+h[0].length;if(d>i.length-e)break;(!n||d>n.index+n[0].length)&&(n=h),s=h.index+1}return n}function o(i,t){var s=i.doc.positionToIndex({row:t,column:0});return i.doc.indexToPosition(s+5e3).row+1}x.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(R,x,B){"use strict";var i,T=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,s){n.__proto__=s}||function(n,s){for(var h in s)Object.prototype.hasOwnProperty.call(s,h)&&(n[h]=s[h])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),L=R("../lib/keys"),M=R("../lib/useragent"),a=L.KEY_MODS,l=function(){function i(t,e){this.$init(t,e,!1)}return i.prototype.$init=function(t,e,n){this.platform=e||(M.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=n},i.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},i.prototype.removeCommand=function(t,e){var n=t&&("string"==typeof t?t:t.name);t=this.commands[n],e||delete this.commands[n];var s=this.commandKeyBinding;for(var h in s){var d=s[h];if(d==t)delete s[h];else if(Array.isArray(d)){var g=d.indexOf(t);-1!=g&&(d.splice(g,1),1==d.length&&(s[h]=d[0]))}}},i.prototype.bindKey=function(t,e,n){if("object"==typeof t&&t&&(null==n&&(n=t.position),t=t[this.platform]),t){if("function"==typeof e)return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(s){var h="";if(-1!=s.indexOf(" ")){var d=s.split(/\s+/);s=d.pop(),d.forEach(function(b){var y=this.parseKeys(b);this._addCommandToBinding(h+=(h?" ":"")+(a[y.hashId]+y.key),"chainKeys")},this),h+=" "}var g=this.parseKeys(s);this._addCommandToBinding(h+(a[g.hashId]+g.key),e,n)},this)}},i.prototype._addCommandToBinding=function(t,e,n){var h,s=this.commandKeyBinding;if(e)if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?-1!=(h=s[t].indexOf(e))&&s[t].splice(h,1):s[t]=[s[t]],"number"!=typeof n&&(n=r(e));var d=s[t];for(h=0;hn);h++);d.splice(h,0,e)}else delete s[t]},i.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if("string"==typeof n)return this.bindKey(n,e);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=e),this.addCommand(n))}},this)},i.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},i.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},i.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},i.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(p){return p}),n=e.pop(),s=L[n];if(L.FUNCTION_KEYS[s])n=L.FUNCTION_KEYS[s].toLowerCase();else{if(!e.length)return{key:n,hashId:-1};if(1==e.length&&"shift"==e[0])return{key:n.toUpperCase(),hashId:-1}}for(var h=0,d=e.length;d--;){var g=L.KEY_MODS[e[d]];if(null==g)return typeof console<"u"&&console.error("invalid modifier "+e[d]+" in "+t),!1;h|=g}return{key:n,hashId:h}},i.prototype.findKeyCommand=function(t,e){return this.commandKeyBinding[a[t]+e]},i.prototype.handleKeyboard=function(t,e,n,s){if(!(s<0)){var h=a[e]+n,d=this.commandKeyBinding[h];return t.$keyChain&&(t.$keyChain+=" "+h,d=this.commandKeyBinding[t.$keyChain]||d),!d||"chainKeys"!=d&&"chainKeys"!=d[d.length-1]?(t.$keyChain&&(e&&4!=e||1!=n.length?(-1==e||s>0)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-h.length-1)),{command:d}):(t.$keyChain=t.$keyChain||h,{command:"null"})}},i.prototype.getStatusText=function(t,e){return e.$keyChain||""},i}();function r(i){return"object"==typeof i&&i.bindKey&&i.bindKey.position||(i.isDefault?-100:0)}var o=function(i){function t(e,n){var s=i.call(this,e,n)||this;return s.$singleCommand=!0,s}return T(t,i),t}(l);o.call=function(i,t,e){l.prototype.$init.call(i,t,e,!0)},l.call=function(i,t,e){l.prototype.$init.call(i,t,e,!1)},x.HashHandler=o,x.MultiHashHandler=l}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(R,x,B){"use strict";var r,T=this&&this.__extends||(r=function(o,i){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(o,i)},function(o,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function t(){this.constructor=o}r(o,i),o.prototype=null===i?Object.create(i):(t.prototype=i.prototype,new t)}),L=R("../lib/oop"),M=R("../keyboard/hash_handler").MultiHashHandler,a=R("../lib/event_emitter").EventEmitter,l=function(r){function o(i,t){var e=r.call(this,t,i)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(n){return n.args?n.command.exec(n.editor,n.args,n.event,!1):n.command.exec(n.editor,{},n.event,!0)}),e}return T(o,r),o.prototype.exec=function(i,t,e){if(Array.isArray(i)){for(var n=i.length;n--;)if(this.exec(i[n],t,e))return!0;return!1}"string"==typeof i&&(i=this.commands[i]);var s={editor:t,command:i,args:e};return this.canExecute(i,t)?(s.returnValue=this._emit("exec",s),this._signal("afterExec",s),!1!==s.returnValue):(this._signal("commandUnavailable",s),!1)},o.prototype.canExecute=function(i,t){return"string"==typeof i&&(i=this.commands[i]),!(!i||t&&t.$readOnly&&!i.readOnly||0!=this.$checkCommandState&&i.isAvailable&&!i.isAvailable(t))},o.prototype.toggleRecording=function(i){if(!this.$inReplay)return i&&i._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(t){this.macro.push([t.command,t.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(i){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(i);try{this.$inReplay=!0,this.macro.forEach(function(t){"string"==typeof t?this.exec(t,i):this.exec(t[0],i,t[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(i){return i.map(function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},o}(M);L.implement(l.prototype,a),x.CommandManager=l}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(R,x,B){"use strict";var T=R("../lib/lang"),L=R("../config"),M=R("../range").Range;function a(r,o){return{win:r,mac:o}}x.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(r){L.loadModule("ace/ext/settings_menu",function(o){o.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(r){L.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(r){L.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(r,o){"number"==typeof o&&!isNaN(o)&&r.gotoLine(o),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(r){L.loadModule("ace/ext/searchbox",function(o){o.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(r){r.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(r,o){r.navigateUp(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(r){r.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(r){r.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(r,o){r.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(r){r.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(r,o){r.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(r){r.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(r,o){r.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var i=r.$copyWithEmptySelection&&r.selection.isEmpty()?r.selection.getLineRange():r.selection.getRange();r._emit("cut",i),i.isEmpty()||r.session.remove(i),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,o){r.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(r){L.loadModule("ace/ext/searchbox",function(o){o.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(r){if(!r.selection.isEmpty())return!1;r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(r){var o=r.selection.getRange();o.start.column=0,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(r){var o=r.selection.getRange();o.end.column=Number.MAX_VALUE,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,o){r.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,o){r.insert(T.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var o=r.selection.getRange();o.start.column=o.end.column=0,o.end.row++,r.selection.setRange(o,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(r){for(var o=r.selection.isBackwards(),i=o?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),t=o?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(i.row).length,s=r.session.doc.getTextRange(r.selection.getRange()).replace(/\n\s*/," ").length,h=r.session.doc.getLine(i.row),d=i.row+1;d<=t.row+1;d++){var g=T.stringTrimLeft(T.stringTrimRight(r.session.doc.getLine(d)));0!==g.length&&(g=" "+g),h+=g}t.row+10?(r.selection.moveCursorTo(i.row,i.column),r.selection.selectTo(i.row,i.column+s)):(e=r.session.doc.getLine(i.row).length>e?e+1:e,r.selection.moveCursorTo(i.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(r){var o=r.session.doc.getLength()-1,i=r.session.doc.getLine(o).length,t=r.selection.rangeList.ranges,e=[];t.length<1&&(t=[r.selection.getRange()]);for(var n=0;n0||l+r=0&&this.$isCustomWidgetVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(l+r))return l+r;if(l-r>=0&&this.$isFoldWidgetVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(l+r))return l+r}return null},a.prototype.$findNearestAnnotation=function(l){if(this.$isAnnotationVisible(l))return l;for(var r=0;l-r>0||l+r=0&&this.$isAnnotationVisible(l-r))return l-r;if(l+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(l+r))return l+r}return null},a.prototype.$focusFoldWidget=function(l){if(null!=l){var r=this.$getFoldWidget(l);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},a.prototype.$focusCustomWidget=function(l){if(null!=l){var r=this.$getCustomWidget(l);r&&(r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus())}},a.prototype.$focusAnnotation=function(l){if(null!=l){var r=this.$getAnnotation(l);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},a.prototype.$blurFoldWidget=function(l){var r=this.$getFoldWidget(l);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},a.prototype.$blurCustomWidget=function(l){var r=this.$getCustomWidget(l);r&&(r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur())},a.prototype.$blurAnnotation=function(l){var r=this.$getAnnotation(l);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var l=this.activeRowIndex;l>0;)if(l--,this.$isFoldWidgetVisible(l)||this.$isCustomWidgetVisible(l))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=l,void(this.$isFoldWidgetVisible(l)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},a.prototype.$moveFoldWidgetDown=function(){for(var l=this.activeRowIndex;l0;)if(l--,this.$isAnnotationVisible(l))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=l,void this.$focusAnnotation(this.activeRowIndex)},a.prototype.$moveAnnotationDown=function(){for(var l=this.activeRowIndex;l=u.length&&(u=void 0),{value:u&&u[A++],done:!u}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},L=R("./lib/oop"),M=R("./lib/dom"),a=R("./lib/lang"),l=R("./lib/useragent"),r=R("./keyboard/textinput").TextInput,o=R("./mouse/mouse_handler").MouseHandler,i=R("./mouse/fold_handler").FoldHandler,t=R("./keyboard/keybinding").KeyBinding,e=R("./edit_session").EditSession,n=R("./search").Search,s=R("./range").Range,h=R("./lib/event_emitter").EventEmitter,d=R("./commands/command_manager").CommandManager,g=R("./commands/default_commands").commands,p=R("./config"),b=R("./token_iterator").TokenIterator,y=R("./keyboard/gutter_handler").GutterKeyboardHandler,f=R("./config").nls,C=R("./clipboard"),$=R("./lib/keys"),S=R("./lib/event"),E=R("./tooltip").HoverTooltip,v=function(){function u(c,w,A){this.id="editor"+ ++u.$uid,this.$toDestroy=[];var k=c.getContainerElement();this.container=k,this.renderer=c,this.commands=new d(l.isMac?"mac":"win",g),"object"==typeof document&&(this.textInput=new r(c.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new i(this)),this.keyBinding=new t(this),this.$search=(new n).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(_,I){I._$emitInputEvent.schedule(31)}),this.setSession(w||A&&A.session||new e("")),p.resetOptions(this),A&&this.setOptions(A),p._signal("editor",this)}return u.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},u.prototype.startOperation=function(c){this.session.startOperation(c)},u.prototype.endOperation=function(c){this.session.endOperation(c)},u.prototype.onStartOperation=function(c){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,c||(this.previousCommand=null)},u.prototype.onEndOperation=function(c){if(this.curOp&&this.session){if(c&&!1===c.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var w=this.curOp.command,A=w&&w.scrollIntoView;if(A){switch(A){case"center-animate":A="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var k=this.selection.getRange(),_=this.renderer.layerConfig;(k.start.row>=_.lastRow||k.end.row<=_.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==A&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},u.prototype.$historyTracker=function(c){if(this.$mergeUndoDeltas){var w=this.prevOp,A=this.$mergeableCommands,k=w.command&&c.command.name==w.command.name;if("insertstring"==c.command.name){var _=c.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),k=k&&this.mergeNextCommand&&(!/\s/.test(_)||/\s/.test(w.args)),this.mergeNextCommand=!0}else k=k&&-1!==A.indexOf(c.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(k=!1),k?this.session.mergeUndoDeltas=!0:-1!==A.indexOf(c.command.name)&&(this.sequenceStartTime=Date.now())}},u.prototype.setKeyboardHandler=function(c,w){if(c&&"string"==typeof c&&"ace"!=c){this.$keybindingId=c;var A=this;p.loadModule(["keybinding",c],function(k){A.$keybindingId==c&&A.keyBinding.setKeyboardHandler(k&&k.handler),w&&w()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(c),w&&w()},u.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},u.prototype.setSession=function(c){if(this.session!=c){this.curOp&&this.endOperation(),this.curOp={};var w=this.session;if(w){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var A=this.session.getSelection();A.off("changeCursor",this.$onCursorChange),A.off("changeSelection",this.$onSelectionChange)}this.session=c,c?(this.$onDocumentChange=this.onDocumentChange.bind(this),c.on("change",this.$onDocumentChange),this.renderer.setSession(c),this.$onChangeMode=this.onChangeMode.bind(this),c.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),c.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),c.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),c.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),c.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),c.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=c.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(c)),this._signal("changeSession",{session:c,oldSession:w}),this.curOp=null,w&&w._signal("changeEditor",{oldEditor:this}),w&&(w.$editor=null),c&&c._signal("changeEditor",{editor:this}),c&&(c.$editor=this),c&&!c.destroyed&&c.bgTokenizer.scheduleStart()}},u.prototype.getSession=function(){return this.session},u.prototype.setValue=function(c,w){return this.session.doc.setValue(c),w?1==w?this.navigateFileEnd():-1==w&&this.navigateFileStart():this.selectAll(),c},u.prototype.getValue=function(){return this.session.getValue()},u.prototype.getSelection=function(){return this.selection},u.prototype.resize=function(c){this.renderer.onResize(c)},u.prototype.setTheme=function(c,w){this.renderer.setTheme(c,w)},u.prototype.getTheme=function(){return this.renderer.getTheme()},u.prototype.setStyle=function(c,w){this.renderer.setStyle(c,w)},u.prototype.unsetStyle=function(c){this.renderer.unsetStyle(c)},u.prototype.getFontSize=function(){return this.getOption("fontSize")||M.computedStyle(this.container).fontSize},u.prototype.setFontSize=function(c){this.setOption("fontSize",c)},u.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var c=this;this.$highlightPending=!0,setTimeout(function(){c.$highlightPending=!1;var w=c.session;if(w&&!w.destroyed){w.$bracketHighlight&&(w.$bracketHighlight.markerIds.forEach(function(F){w.removeMarker(F)}),w.$bracketHighlight=null);var A=c.getCursorPosition(),k=c.getKeyboardHandler(),_=k&&k.$getDirectionForHighlight&&k.$getDirectionForHighlight(c),I=w.getMatchingBracketRanges(A,_);if(!I){var N=new b(w,A.row,A.column).getCurrentToken();if(N&&/\b(?:tag-open|tag-name)/.test(N.type)){var O=w.getMatchingTags(A);O&&(I=[O.openTagName.isEmpty()?O.openTag:O.openTagName,O.closeTagName.isEmpty()?O.closeTag:O.closeTagName])}}if(!I&&w.$mode.getMatching&&(I=w.$mode.getMatching(c.session)),!I)return void(c.getHighlightIndentGuides()&&c.renderer.$textLayer.$highlightIndentGuide());var W="ace_bracket";Array.isArray(I)?1==I.length&&(W="ace_error_bracket"):I=[I],2==I.length&&(0==s.comparePoints(I[0].end,I[1].start)?I=[s.fromPoints(I[0].start,I[1].end)]:0==s.comparePoints(I[0].start,I[1].end)&&(I=[s.fromPoints(I[1].start,I[0].end)])),w.$bracketHighlight={ranges:I,markerIds:I.map(function(F){return w.addMarker(F,W,"text")})},c.getHighlightIndentGuides()&&c.renderer.$textLayer.$highlightIndentGuide()}},50)}},u.prototype.focus=function(){this.textInput.focus()},u.prototype.isFocused=function(){return this.textInput.isFocused()},u.prototype.blur=function(){this.textInput.blur()},u.prototype.onFocus=function(c){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",c))},u.prototype.onBlur=function(c){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",c))},u.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},u.prototype.onDocumentChange=function(c){this.renderer.updateLines(c.start.row,c.start.row==c.end.row?c.end.row:1/0,this.session.$useWrapMode),this._signal("change",c),this.$cursorChange()},u.prototype.onTokenizerUpdate=function(c){var w=c.data;this.renderer.updateLines(w.first,w.last)},u.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},u.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},u.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},u.prototype.$updateHighlightActiveLine=function(){var w,c=this.getSession();if(this.$highlightActiveLine&&(("line"!=this.$selectionStyle||!this.selection.isMultiLine())&&(w=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(w=!1),this.renderer.$maxLines&&1===this.session.getLength()&&!(this.renderer.$minLines>1)&&(w=!1)),c.$highlightLineMarker&&!w)c.removeMarker(c.$highlightLineMarker.id),c.$highlightLineMarker=null;else if(!c.$highlightLineMarker&&w){var A=new s(w.row,w.column,w.row,1/0);A.id=c.addMarker(A,"ace_active-line","screenLine"),c.$highlightLineMarker=A}else w&&(c.$highlightLineMarker.start.row=w.row,c.$highlightLineMarker.end.row=w.row,c.$highlightLineMarker.start.column=w.column,c._signal("changeBackMarker"))},u.prototype.onSelectionChange=function(c){var w=this.session;if(w.$selectionMarker&&w.removeMarker(w.$selectionMarker),w.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var A=this.selection.getRange(),k=this.getSelectionStyle();w.$selectionMarker=w.addMarker(A,"ace_selection",k)}var _=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(_),this._signal("changeSelection")},u.prototype.$getSelectionHighLightRegexp=function(){var c=this.session,w=this.getSelectionRange();if(!w.isEmpty()&&!w.isMultiLine()){var A=w.start.column,k=w.end.column,_=c.getLine(w.start.row),I=_.substring(A,k);if(!(I.length>5e3)&&/[\w\d]/.test(I)){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:I}),N=_.substring(A-1,k+1);if(D.test(N))return D}}},u.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},u.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},u.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},u.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},u.prototype.onChangeMode=function(c){this.renderer.updateText(),this._emit("changeMode",c)},u.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},u.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},u.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},u.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},u.prototype.getCopyText=function(){var c=this.getSelectedText(),w=this.session.doc.getNewLineCharacter(),A=!1;if(!c&&this.$copyWithEmptySelection){A=!0;for(var k=this.selection.getAllRanges(),_=0;_F.search(/\S|$/)){var N=F.substr(_.column).search(/\S|$/);A.doc.removeInLine(_.row,_.column,_.column+N)}}this.clearSelection();var O=_.column,W=A.getState(_.row),H=(F=A.getLine(_.row),k.checkOutdent(W,F,c));if(A.insert(_,c),I&&I.selection&&this.selection.setSelectionRange(2==I.selection.length?new s(_.row,O+I.selection[0],_.row,O+I.selection[1]):new s(_.row+I.selection[0],I.selection[1],_.row+I.selection[2],I.selection[3])),this.$enableAutoIndent){if(A.getDocument().isNewLine(c)){var z=k.getNextLineIndent(W,F.slice(0,_.column),A.getTabString());A.insert({row:_.row+1,column:0},z)}H&&k.autoOutdent(W,A,_.row)}},u.prototype.autoIndent=function(){for(var c=this.session,w=c.getMode(),A=this.selection.isEmpty()?[new s(0,0,c.doc.getLength()-1,0)]:this.selection.getAllRanges(),k="",_="",I="",D=c.getTabString(),N=0;N0&&(k=c.getState(F-1),_=c.getLine(F-1),I=w.getNextLineIndent(k,_,D));var H=c.getLine(F),z=w.$getIndent(H);if(I!==z){if(z.length>0){var V=new s(F,0,F,z.length);c.remove(V)}I.length>0&&c.insert({row:F,column:0},I)}w.autoOutdent(k,c,F)}},u.prototype.onTextInput=function(c,w){if(!w)return this.keyBinding.onTextInput(c);this.startOperation({command:{name:"insertstring"}});var A=this.applyComposition.bind(this,c,w);this.selection.rangeCount?this.forEachSelection(A):A(),this.endOperation()},u.prototype.applyComposition=function(c,w){var A;(w.extendLeft||w.extendRight)&&((A=this.selection.getRange()).start.column-=w.extendLeft,A.end.column+=w.extendRight,A.start.column<0&&(A.start.row--,A.start.column+=this.session.getLine(A.start.row).length+1),this.selection.setRange(A),!c&&!A.isEmpty()&&this.remove()),(c||!this.selection.isEmpty())&&this.insert(c,!0),(w.restoreStart||w.restoreEnd)&&((A=this.selection.getRange()).start.column-=w.restoreStart,A.end.column-=w.restoreEnd,this.selection.setRange(A))},u.prototype.onCommandKey=function(c,w,A){return this.keyBinding.onCommandKey(c,w,A)},u.prototype.setOverwrite=function(c){this.session.setOverwrite(c)},u.prototype.getOverwrite=function(){return this.session.getOverwrite()},u.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},u.prototype.setScrollSpeed=function(c){this.setOption("scrollSpeed",c)},u.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},u.prototype.setDragDelay=function(c){this.setOption("dragDelay",c)},u.prototype.getDragDelay=function(){return this.getOption("dragDelay")},u.prototype.setSelectionStyle=function(c){this.setOption("selectionStyle",c)},u.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},u.prototype.setHighlightActiveLine=function(c){this.setOption("highlightActiveLine",c)},u.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},u.prototype.setHighlightGutterLine=function(c){this.setOption("highlightGutterLine",c)},u.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},u.prototype.setHighlightSelectedWord=function(c){this.setOption("highlightSelectedWord",c)},u.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},u.prototype.setAnimatedScroll=function(c){this.renderer.setAnimatedScroll(c)},u.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},u.prototype.setShowInvisibles=function(c){this.renderer.setShowInvisibles(c)},u.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},u.prototype.setDisplayIndentGuides=function(c){this.renderer.setDisplayIndentGuides(c)},u.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},u.prototype.setHighlightIndentGuides=function(c){this.renderer.setHighlightIndentGuides(c)},u.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},u.prototype.setShowPrintMargin=function(c){this.renderer.setShowPrintMargin(c)},u.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},u.prototype.setPrintMarginColumn=function(c){this.renderer.setPrintMarginColumn(c)},u.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},u.prototype.setReadOnly=function(c){this.setOption("readOnly",c)},u.prototype.getReadOnly=function(){return this.getOption("readOnly")},u.prototype.setBehavioursEnabled=function(c){this.setOption("behavioursEnabled",c)},u.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},u.prototype.setWrapBehavioursEnabled=function(c){this.setOption("wrapBehavioursEnabled",c)},u.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},u.prototype.setShowFoldWidgets=function(c){this.setOption("showFoldWidgets",c)},u.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},u.prototype.setFadeFoldWidgets=function(c){this.setOption("fadeFoldWidgets",c)},u.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},u.prototype.remove=function(c){this.selection.isEmpty()&&("left"==c?this.selection.selectLeft():this.selection.selectRight());var w=this.getSelectionRange();if(this.getBehavioursEnabled()){var A=this.session,k=A.getState(w.start.row),_=A.getMode().transformAction(k,"deletion",this,A,w);if(0===w.end.column){var I=A.getTextRange(w);if("\n"==I[I.length-1]){var D=A.getLine(w.end.row);/^\s+$/.test(D)&&(w.end.column=D.length)}}_&&(w=_)}this.session.remove(w),this.clearSelection()},u.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},u.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},u.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},u.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var c=this.getSelectionRange();c.start.column==c.end.column&&c.start.row==c.end.row&&(c.end.column=0,c.end.row++),this.session.remove(c),this.clearSelection()},u.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var c=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(c)},u.prototype.setGhostText=function(c,w){this.renderer.setGhostText(c,w)},u.prototype.removeGhostText=function(){this.renderer.removeGhostText()},u.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var c=this.getCursorPosition(),w=c.column;if(0!==w){var k,_,A=this.session.getLine(c.row);wN.toLowerCase()?1:0});var _=new s(0,0,0,0);for(k=c.first;k<=c.last;k++){var I=w.getLine(k);_.start.row=k,_.end.row=k,_.end.column=I.length,w.replace(_,A[k-c.first])}},u.prototype.toggleCommentLines=function(){var c=this.session.getState(this.getCursorPosition().row),w=this.$getSelectedRows();this.session.getMode().toggleCommentLines(c,this.session,w.first,w.last)},u.prototype.toggleBlockComment=function(){var c=this.getCursorPosition(),w=this.session.getState(c.row),A=this.getSelectionRange();this.session.getMode().toggleBlockComment(w,this.session,A,c)},u.prototype.getNumberAt=function(c,w){var A=/[\-]?[0-9]+(?:\.[0-9]+)?/g;A.lastIndex=0;for(var k=this.session.getLine(c);A.lastIndex=w)return{value:_[0],start:_.index,end:_.index+_[0].length}}return null},u.prototype.modifyNumber=function(c){var w=this.selection.getCursor().row,A=this.selection.getCursor().column,k=new s(w,A-1,w,A),_=this.session.getTextRange(k);if(!isNaN(parseFloat(_))&&isFinite(_)){var I=this.getNumberAt(w,A);if(I){var D=I.value.indexOf(".")>=0?I.start+I.value.indexOf(".")+1:I.end,N=I.start+I.value.length-D,O=parseFloat(I.value);O*=Math.pow(10,N),O+=c*=D!==I.end&&A=D&&I<=N&&(A=j,O.selection.clearSelection(),O.moveCursorTo(c,D+k),O.selection.selectTo(c,N+k)),D=N});for(var F,W=this.$toggleWordPairs,H=0;H=N&&D<=O&&z.match(/((?:https?|ftp):\/\/[\S]+)/)){W=z.replace(/[\s:.,'";}\]]+$/,"");break}N=O}}catch(V){A={error:V}}finally{try{H&&!H.done&&(k=F.return)&&k.call(F)}finally{if(A)throw A.error}}return W},u.prototype.openLink=function(){var c=this.selection.getCursor(),w=this.findLinkAt(c.row,c.column);return w&&window.open(w,"_blank"),null!=w},u.prototype.removeLines=function(){var c=this.$getSelectedRows();this.session.removeFullLines(c.first,c.last),this.clearSelection()},u.prototype.duplicateSelection=function(){var c=this.selection,w=this.session,A=c.getRange(),k=c.isBackwards();if(A.isEmpty()){var _=A.start.row;w.duplicateLines(_,_)}else{var I=k?A.start:A.end,D=w.insert(I,w.getTextRange(A));A.start=I,A.end=D,c.setSelectionRange(A,k)}},u.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},u.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},u.prototype.moveText=function(c,w,A){return this.session.moveText(c,w,A)},u.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},u.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},u.prototype.$moveLines=function(c,w){var A,k,_=this.selection;if(!_.inMultiSelectMode||this.inVirtualSelectionMode){var I=_.toOrientedRange();A=this.$getSelectedRows(I),k=this.session.$moveLines(A.first,A.last,w?0:c),w&&-1==c&&(k=0),I.moveBy(k,0),_.fromOrientedRange(I)}else{var D=_.rangeList.ranges;_.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var N=0,O=0,W=D.length,F=0;FV+1)break;V=U.last}for(F--,N=this.session.$moveLines(z,V,w?0:c),w&&-1==c&&(H=F+1);H<=F;)D[H].moveBy(N,0),H++;w||(N=0),O+=N}_.fromOrientedRange(_.ranges[0]),_.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},u.prototype.$getSelectedRows=function(c){return c=(c||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(c.start.row),last:this.session.getRowFoldEnd(c.end.row)}},u.prototype.onCompositionStart=function(c){this.renderer.showComposition(c)},u.prototype.onCompositionUpdate=function(c){this.renderer.setCompositionText(c)},u.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},u.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},u.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},u.prototype.isRowVisible=function(c){return c>=this.getFirstVisibleRow()&&c<=this.getLastVisibleRow()},u.prototype.isRowFullyVisible=function(c){return c>=this.renderer.getFirstFullyVisibleRow()&&c<=this.renderer.getLastFullyVisibleRow()},u.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},u.prototype.$moveByPage=function(c,w){var A=this.renderer,k=this.renderer.layerConfig,_=c*Math.floor(k.height/k.lineHeight);!0===w?this.selection.$moveSelection(function(){this.moveCursorBy(_,0)}):!1===w&&(this.selection.moveCursorBy(_,0),this.selection.clearSelection());var I=A.scrollTop;A.scrollBy(0,_*k.lineHeight),null!=w&&A.scrollCursorIntoView(null,.5),A.animateScrolling(I)},u.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},u.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},u.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},u.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},u.prototype.scrollPageDown=function(){this.$moveByPage(1)},u.prototype.scrollPageUp=function(){this.$moveByPage(-1)},u.prototype.scrollToRow=function(c){this.renderer.scrollToRow(c)},u.prototype.scrollToLine=function(c,w,A,k){this.renderer.scrollToLine(c,w,A,k)},u.prototype.centerSelection=function(){var c=this.getSelectionRange(),w={row:Math.floor(c.start.row+(c.end.row-c.start.row)/2),column:Math.floor(c.start.column+(c.end.column-c.start.column)/2)};this.renderer.alignCursor(w,.5)},u.prototype.getCursorPosition=function(){return this.selection.getCursor()},u.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},u.prototype.getSelectionRange=function(){return this.selection.getRange()},u.prototype.selectAll=function(){this.selection.selectAll()},u.prototype.clearSelection=function(){this.selection.clearSelection()},u.prototype.moveCursorTo=function(c,w){this.selection.moveCursorTo(c,w)},u.prototype.moveCursorToPosition=function(c){this.selection.moveCursorToPosition(c)},u.prototype.jumpToMatching=function(c,w){var A=this.getCursorPosition(),k=new b(this.session,A.row,A.column),_=k.getCurrentToken(),I=0;_&&-1!==_.type.indexOf("tag-name")&&(_=k.stepBackward());var D=_||k.stepForward();if(D){var N,H,O=!1,W={},F=A.column-D.start,z={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;F1?W[D.value]++:"=0;--I)this.$tryReplace(A[I],c)&&k++;return this.selection.setSelectionRange(_),k},u.prototype.$tryReplace=function(c,w){var A=this.session.getTextRange(c);return null!==(w=this.$search.replace(A,w))?(c.end=this.session.replace(c,w),c):null},u.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},u.prototype.find=function(c,w,A){w||(w={}),"string"==typeof c||c instanceof RegExp?w.needle=c:"object"==typeof c&&L.mixin(w,c);var k=this.selection.getRange();null==w.needle&&((c=this.session.getTextRange(k)||this.$search.$options.needle)||(k=this.session.getWordRange(k.start.row,k.start.column),c=this.session.getTextRange(k)),this.$search.set({needle:c})),this.$search.set(w),w.start||this.$search.set({start:k});var _=this.$search.find(this.session);return w.preventScroll?_:_?(this.revealRange(_,A),_):(w.backwards?k.start=k.end:k.end=k.start,void this.selection.setRange(k))},u.prototype.findNext=function(c,w){this.find({skipCurrent:!0,backwards:!1},c,w)},u.prototype.findPrevious=function(c,w){this.find(c,{skipCurrent:!0,backwards:!0},w)},u.prototype.revealRange=function(c,w){this.session.unfold(c),this.selection.setSelectionRange(c);var A=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(c.start,c.end,.5),!1!==w&&this.renderer.animateScrolling(A)},u.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},u.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},u.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(c){c.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},u.prototype.setAutoScrollEditorIntoView=function(c){if(c){var w,A=this,k=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var _=this.$scrollAnchor;_.style.cssText="position:absolute",this.container.insertBefore(_,this.container.firstChild);var I=this.on("changeSelection",function(){k=!0}),D=this.renderer.on("beforeRender",function(){k&&(w=A.renderer.container.getBoundingClientRect())}),N=this.renderer.on("afterRender",function(){if(k&&w&&(A.isFocused()||A.searchBox&&A.searchBox.isFocused())){var O=A.renderer,W=O.$cursorLayer.$pixelPos,F=O.layerConfig,H=W.top-F.offset;null!=(k=W.top>=0&&H+w.top<0||!(W.topwindow.innerHeight)&&null)&&(_.style.top=H+"px",_.style.left=W.left+"px",_.style.height=F.lineHeight+"px",_.scrollIntoView(k)),k=w=null}});this.setAutoScrollEditorIntoView=function(O){O||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",I),this.renderer.off("afterRender",N),this.renderer.off("beforeRender",D))}}},u.prototype.$resetCursorStyle=function(){var c=this.$cursorStyle||"ace",w=this.renderer.$cursorLayer;w&&(w.setSmoothBlinking(/smooth/.test(c)),w.isBlinking=!this.$readOnly&&"wide"!=c,M.setCssClass(w.element,"ace_slim-cursors",/slim/.test(c)))},u.prototype.prompt=function(c,w,A){var k=this;p.loadModule("ace/ext/prompt",function(_){_.prompt(k,c,w,A)})},u}();v.$uid=0,v.prototype.curOp=null,v.prototype.prevOp={},v.prototype.$mergeableCommands=["backspace","del","insertstring"],v.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],L.implement(v.prototype,h),p.defineOptions(v.prototype,"editor",{selectionStyle:{set:function(u){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:u})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(u){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(u){var c=this;if(this.textInput.setReadOnly(u),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(A){var k=!1;if(A&&"keydown"==A.type){if(A&&A.key&&!A.ctrlKey&&!A.metaKey&&(" "==A.key&&A.preventDefault(),k=1==A.key.length),!k)return}else A&&"exec"!==A.type&&(k=!0);if(k){c.hoverTooltip||(c.hoverTooltip=new E);var _=M.createElement("div");_.textContent=f("editor.tooltip.disable-editing","Editing is disabled"),c.hoverTooltip.isOpen||c.hoverTooltip.showForRange(c,c.getSelectionRange(),_)}else c.hoverTooltip&&c.hoverTooltip.isOpen&&c.hoverTooltip.hide()});var w=this.textInput.getElement();u?(S.addListener(w,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(S.removeListener(w,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))}},initialValue:!1},copyWithEmptySelection:{set:function(u){this.textInput.setCopyWithEmptySelection(u)},initialValue:!1},cursorStyle:{set:function(u){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(u){this.setAutoScrollEditorIntoView(u)}},keyboardHandler:{set:function(u){this.setKeyboardHandler(u)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(u){this.session.setValue(u)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(u){this.setSession(u)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(u){this.renderer.$gutterLayer.setShowLineNumbers(u),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),u&&this.$relativeLineNumbers?m.attach(this):m.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(u){this.$showLineNumbers&&u?m.attach(this):m.detach(this)}},placeholder:{set:function(u){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var c=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(c&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),M.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(c||this.renderer.placeholderNode)!c&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),M.addCssClass(this.container,"ace_hasPlaceholder");var w=M.createElement("div");w.className="ace_placeholder",w.textContent=this.$placeholder||"",this.renderer.placeholderNode=w,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(u){var A,c={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(k){k.blur(),k.renderer.scroller.focus()},readOnly:!0},w=function(k){if(k.target==this.renderer.scroller&&k.keyCode===$.enter){k.preventDefault();var _=this.getCursorPosition().row;this.isRowVisible(_)||this.scrollToLine(_,!0,!0),this.focus()}};u?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(l.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",f("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",f("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",w.bind(this)),this.commands.addCommand(c),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",f("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",f("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),A||(A=new y(this)),A.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",w.bind(this)),this.commands.removeCommand(c),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),A&&A.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(u){this.$textInputAriaLabel=u},initialValue:""},enableMobileMenu:{set:function(u){this.$enableMobileMenu=u},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var m={getText:function(u,c){return(Math.abs(u.selection.lead.row-c)||c+1+(c<9?"\xb7":""))+""},getWidth:function(u,c,w){return Math.max(c.toString().length,(w.lastRow+1).toString().length,2)*w.characterWidth},update:function(u,c){c.renderer.$loop.schedule(c.renderer.CHANGE_GUTTER)},attach:function(u){u.renderer.$gutterLayer.$renderer=this,u.on("changeSelection",this.update),this.update(null,u)},detach:function(u){u.renderer.$gutterLayer.$renderer==this&&(u.renderer.$gutterLayer.$renderer=null),u.off("changeSelection",this.update),this.update(null,u)}};x.Editor=v}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(R,x,B){"use strict";var T=R("../lib/dom"),L=function(){function M(a,l){this.element=a,this.canvasHeight=l||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return M.prototype.moveContainer=function(a){T.translate(this.element,0,-a.firstRowScreen*a.lineHeight%this.canvasHeight-a.offset*this.$offsetCoefficient)},M.prototype.pageChanged=function(a,l){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)},M.prototype.computeLineTop=function(a,l,r){var i=Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight);return r.documentToScreenRow(a,0)*l.lineHeight-i*this.canvasHeight},M.prototype.computeLineHeight=function(a,l,r){return l.lineHeight*r.getRowLineCount(a)},M.prototype.getLength=function(){return this.cells.length},M.prototype.get=function(a){return this.cells[a]},M.prototype.shift=function(){this.$cacheCell(this.cells.shift())},M.prototype.pop=function(){this.$cacheCell(this.cells.pop())},M.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var l=T.createFragment(this.element),r=0;rg&&(g=(d=n.getNextFoldLine(y=d.end.row+1,d))?d.start.row:1/0),y>h){for(;this.$lines.getLength()>b+1;)this.$lines.pop();break}(p=this.$lines.get(++b))?p.row=y:(p=this.$lines.createCell(y,e,this.session,i),this.$lines.push(p)),this.$renderCell(p,e,d,y),y++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},t.prototype.$updateGutterWidth=function(e){var n=this.session,s=n.gutterRenderer||this.$renderer,h=n.$firstLineNumber,d=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||n.$useWrapMode)&&(d=n.getLength()+h-1);var g=s?s.getWidth(n,d,e):d.toString().length*e.characterWidth,p=this.$padding||this.$computePadding();(g+=p.left+p.right)!==this.gutterWidth&&!isNaN(g)&&(this.gutterWidth=g,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",g))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var n=this.$lines.cells;this.$cursorCell=null;for(var s=0;s=this.$cursorRow){if(h.row>this.$cursorRow){var d=this.session.getFoldLine(this.$cursorRow);if(!(s>0&&d&&d.start.row==n[s-1].row))break;h=n[s-1]}h.element.className="ace_gutter-active-line "+h.element.className,this.$cursorCell=h;break}}}}},t.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=T.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var n=e.selection.cursor,s=this.config,h=this.$lines,g=Math.floor(s.firstRowScreen*s.lineHeight/h.canvasHeight),b=e.documentToScreenRow(n)*s.lineHeight-g*h.canvasHeight;T.setStyle(this.$highlightElement.style,"height",s.lineHeight+"px"),T.setStyle(this.$highlightElement.style,"top",b+"px")}},t.prototype.scrollLines=function(e){var n=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(n,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),h=this.oldLastRow;if(this.oldLastRow=s,!n||h0;d--)this.$lines.shift();if(h>s)for(d=this.session.getFoldedRowCount(s+1,h);d>0;d--)this.$lines.pop();e.firstRowh&&this.$lines.push(this.$renderLines(e,h+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,n,s){for(var h=[],d=n,g=this.session.getNextFoldLine(d),p=g?g.start.row:1/0;d>p&&(p=(g=this.session.getNextFoldLine(d=g.end.row+1,g))?g.start.row:1/0),!(d>s);){var b=this.$lines.createCell(d,e,this.session,i);this.$renderCell(b,e,g,d),h.push(b),d++}return h},t.prototype.$renderCell=function(e,n,s,h){var d=e.element,g=this.session,p=d.childNodes[0],b=d.childNodes[1],y=d.childNodes[2],f=d.childNodes[3],C=y.firstChild,$=g.$firstLineNumber,S=g.$breakpoints,E=g.$decorations,v=g.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&g.foldWidgets,u=s?s.start.row:Number.MAX_VALUE,c=n.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",A=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=(v?v.getText(g,h):h+$).toString();if(this.$highlightGutterLine&&(h==this.$cursorRow||s&&h=u&&this.$cursorRow<=s.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),S[h]&&(w+=S[h]),E[h]&&(w+=E[h]),this.$annotations[h]&&h!==u&&(w+=this.$annotations[h].className),m){var _=m[h];null==_&&(_=m[h]=g.getFoldWidget(h))}if(_){var I="ace_fold-widget ace_"+_,D="start"==_&&h==u&&hn[h].row)){for(;s<=h;){var d=Math.floor((s+h)/2),g=n[d];if(g.row>e)h=d-1;else{if(!(g.rows.right-n.right?"foldWidgets":void 0},t}();function i(t){var e=document.createTextNode("");t.appendChild(e);var n=T.createElement("span");t.appendChild(n);var s=T.createElement("span");t.appendChild(s);var h=T.createElement("span");return s.appendChild(h),t}o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,L.implement(o.prototype,a),x.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(R,x,B){"use strict";var T=R("../range").Range,L=R("../lib/dom"),M=function(){function l(r){this.element=L.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return l.prototype.setPadding=function(r){this.$padding=r},l.prototype.setSession=function(r){this.session=r},l.prototype.setMarkers=function(r){this.markers=r},l.prototype.elt=function(r,o){var i=-1!=this.i&&this.element.childNodes[this.i];i?this.i++:(i=document.createElement("div"),this.element.appendChild(i),this.i=-1),i.style.cssText=o,i.className=r},l.prototype.update=function(r){if(r){var o;for(var i in this.config=r,this.i=0,this.markers){var t=this.markers[i];if(t.range){var e=t.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var n=this.$getTop(e.start.row,r);t.renderer(o,e,this.$padding+e.start.column*r.characterWidth,n,r)}else"fullLine"==t.type?this.drawFullLineMarker(o,e,t.clazz,r):"screenLine"==t.type?this.drawScreenLineMarker(o,e,t.clazz,r):e.isMultiLine()?"text"==t.type?this.drawTextMarker(o,e,t.clazz,r):this.drawMultiLineMarker(o,e,t.clazz,r):this.drawSingleLineMarker(o,e,t.clazz+" ace_start ace_br15",r)}else t.update(o,this,this.session,r)}if(-1!=this.i)for(;this.ib,d==h),t,d==h?0:1,e)},l.prototype.drawMultiLineMarker=function(r,o,i,t,e){var g,n=this.$padding,s=t.lineHeight,h=this.$getTop(o.start.row,t),d=n+o.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)?((g=o.clone()).end.row=g.start.row,g.end.column=this.session.getLine(g.start.row).length,this.drawBidiSingleLineMarker(r,g,i+" ace_br1 ace_start",t,null,e)):this.elt(i+" ace_br1 ace_start","height:"+s+"px;right:"+n+"px;top:"+h+"px;left:"+d+"px;"+(e||"")),this.session.$bidiHandler.isBidiRow(o.end.row)?((g=o.clone()).start.row=g.end.row,g.start.column=0,this.drawBidiSingleLineMarker(r,g,i+" ace_br12",t,null,e)):(h=this.$getTop(o.end.row,t),this.elt(i+" ace_br12","height:"+s+"px;width:"+o.end.column*t.characterWidth+"px;top:"+h+"px;left:"+n+"px;"+(e||""))),!((s=(o.end.row-o.start.row-1)*t.lineHeight)<=0)){h=this.$getTop(o.start.row+1,t);var b=(o.start.column?1:0)|(o.end.column?0:8);this.elt(i+(b?" ace_br"+b:""),"height:"+s+"px;right:"+n+"px;top:"+h+"px;left:"+n+"px;"+(e||""))}},l.prototype.drawSingleLineMarker=function(r,o,i,t,e,n){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(r,o,i,t,e,n);var s=t.lineHeight,h=(o.end.column+(e||0)-o.start.column)*t.characterWidth,d=this.$getTop(o.start.row,t);this.elt(i,"height:"+s+"px;width:"+h+"px;top:"+d+"px;left:"+(this.$padding+o.start.column*t.characterWidth)+"px;"+(n||""))},l.prototype.drawBidiSingleLineMarker=function(r,o,i,t,e,n){var s=t.lineHeight,h=this.$getTop(o.start.row,t),d=this.$padding;this.session.$bidiHandler.getSelections(o.start.column,o.end.column).forEach(function(p){this.elt(i,"height:"+s+"px;width:"+(p.width+(e||0))+"px;top:"+h+"px;left:"+(d+p.left)+"px;"+(n||""))},this)},l.prototype.drawFullLineMarker=function(r,o,i,t,e){var n=this.$getTop(o.start.row,t),s=t.lineHeight;o.start.row!=o.end.row&&(s+=this.$getTop(o.end.row,t)-n),this.elt(i,"height:"+s+"px;top:"+n+"px;left:0;right:0;"+(e||""))},l.prototype.drawScreenLineMarker=function(r,o,i,t,e){var n=this.$getTop(o.start.row,t);this.elt(i,"height:"+t.lineHeight+"px;top:"+n+"px;left:0;right:0;"+(e||""))},l}();function a(l,r,o,i){return(l?1:0)|(r?2:0)|(o?4:0)|(i?8:0)}M.prototype.$padding=0,x.Marker=M}),ace.define("ace/layer/text_util",["require","exports","module"],function(R,x,B){var T=new Set(["text","rparen","lparen"]);x.isTextToken=function(L){return T.has(L)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(R,x,B){"use strict";var T=R("../lib/oop"),L=R("../lib/dom"),M=R("../lib/lang"),a=R("./lines").Lines,l=R("../lib/event_emitter").EventEmitter,r=R("../config").nls,o=R("./text_util").isTextToken,i=function(){function t(e){this.dom=L,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,s="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(n){this._signal("changeCharacterSize",n)}.bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var n=this.$tabStrings=[0],s=1;sC&&(C=(f=this.session.getNextFoldLine(y=f.end.row+1,f))?f.start.row:1/0),!(y>d);){var $=g[p++];if($){this.dom.removeChildren($),this.$renderLine($,y,y==C&&f),b&&($.style.top=this.$lines.computeLineTop(y,e,this.session)+"px");var S=e.lineHeight*this.session.getRowLength(y)+"px";$.style.height!=S&&(b=!0,$.style.height=S)}y++}if(b)for(;p0;d--)this.$lines.shift();if(n.lastRow>e.lastRow)for(d=this.session.getFoldedRowCount(e.lastRow+1,n.lastRow);d>0;d--)this.$lines.pop();e.firstRown.lastRow&&this.$lines.push(this.$renderLinesFragment(e,n.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,n,s){for(var h=[],d=n,g=this.session.getNextFoldLine(d),p=g?g.start.row:1/0;d>p&&(p=(g=this.session.getNextFoldLine(d=g.end.row+1,g))?g.start.row:1/0),!(d>s);){var b=this.$lines.createCell(d,e,this.session),y=b.element;this.dom.removeChildren(y),L.setStyle(y.style,"height",this.$lines.computeLineHeight(d,e,this.session)+"px"),L.setStyle(y.style,"top",this.$lines.computeLineTop(d,e,this.session)+"px"),this.$renderLine(y,d,d==p&&g),y.className=this.$useLineGroups()?"ace_line_group":"ace_line",h.push(b),d++}return h},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var n=e.firstRow,s=e.lastRow,h=this.$lines;h.getLength();)h.pop();h.push(this.$renderLinesFragment(e,n,s))},t.prototype.$renderToken=function(e,n,s,h){for(var b,d=this,g=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,p=this.dom.createFragment(this.element),y=0;b=g.exec(h);){var f=b[1],C=b[2],$=b[3],S=b[4],E=b[5];if(d.showSpaces||!C){var v=y!=b.index?h.slice(y,b.index):"";if(y=b.index+b[0].length,v&&p.appendChild(this.dom.createTextNode(v,this.element)),f){var m=d.session.getScreenTabSize(n+b.index),u=d.$tabStrings[m].cloneNode(!0);u.charCount=1,p.appendChild(u),n+=m-1}else C?d.showSpaces?((c=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",c.textContent=M.stringRepeat(d.SPACE_CHAR,C.length),p.appendChild(c)):p.appendChild(this.dom.createTextNode(C,this.element)):$?((c=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",c.textContent=M.stringRepeat(d.SPACE_CHAR,$.length),p.appendChild(c)):S?(n+=1,(c=this.dom.createElement("span")).style.width=2*d.config.characterWidth+"px",c.className=d.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",c.textContent=d.showSpaces?d.SPACE_CHAR:S,p.appendChild(c)):E&&(n+=1,(c=this.dom.createElement("span")).style.width=2*d.config.characterWidth+"px",c.className="ace_cjk",c.textContent=E,p.appendChild(c))}}if(p.appendChild(this.dom.createTextNode(y?h.slice(y):h,this.element)),o(s.type))e.appendChild(p);else{var w="ace_"+s.type.replace(/\./g," ace_"),c=this.dom.createElement("span");"fold"==s.type&&(c.style.width=s.value.length*this.config.characterWidth+"px",c.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),c.className=w,c.appendChild(p),e.appendChild(c)}return n+h.length},t.prototype.renderIndentGuide=function(e,n,s){var h=n.search(this.$indentGuideRe);if(h<=0||h>=s)return n;if(" "==n[0]){for(var d=(h-=h%this.tabSize)/this.tabSize,g=0;gg[p].start.row?-1:1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[n.row]&&n.column===e[n.row].length)for(this.$highlightIndentGuideMarker.dir=1,p=n.row+1;p0))return;h=e.element.childNodes[0]}var d=h.childNodes;if(d){var g=d[n-1];g&&g.classList&&g.classList.contains("ace_indent-guide")&&g.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var n=this.$highlightIndentGuideMarker.indentLevel;if(0!==n)if(1===this.$highlightIndentGuideMarker.dir)for(var s=0;s=this.$highlightIndentGuideMarker.start+1){if(h.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(h,n)}}else for(s=e.length-1;s>=0;s--)if(h=e[s],this.$highlightIndentGuideMarker.end&&h.row=g;){p=this.$renderToken(b,p,f,C.substring(0,g-h)),C=C.substring(g-h),h=g,b=this.$createLineElement(),e.appendChild(b);var $=this.dom.createTextNode(M.stringRepeat("\xa0",s.indent),this.element);$.charCount=0,b.appendChild($),p=0,g=s[++d]||Number.MAX_VALUE}0!=C.length&&(h+=C.length,p=this.$renderToken(b,p,f,C))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(b,p,null,"",!0)},t.prototype.$renderSimpleLine=function(e,n){for(var s=0,h=0;hthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,d,g);s=this.$renderToken(e,s,d,g)}}},t.prototype.$renderOverflowMessage=function(e,n,s,h,d){s&&this.$renderToken(e,n,s,h.slice(0,this.MAX_LINE_LENGTH-n));var g=this.dom.createElement("span");g.className="ace_inline_button ace_keyword ace_toggle_wrap",g.textContent=d?"":"",e.appendChild(g)},t.prototype.$renderLine=function(e,n,s){if(!s&&0!=s&&(s=this.session.getFoldLine(n)),s)var h=this.$getFoldLineTokens(n,s);else h=this.session.getTokens(n);var d=e;if(h.length){var g=this.session.getRowSplitData(n);g&&g.length?(this.$renderWrappedLine(e,h,g),d=e.lastChild):(d=e,this.$useLineGroups()&&(d=this.$createLineElement(),e.appendChild(d)),this.$renderSimpleLine(d,h))}else this.$useLineGroups()&&(d=this.$createLineElement(),e.appendChild(d));if(this.showEOL&&d){s&&(n=s.end.row);var p=this.dom.createElement("span");p.className="ace_invisible ace_invisible_eol",p.textContent=n==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,d.appendChild(p)}},t.prototype.$getFoldLineTokens=function(e,n){var s=this.session,h=[],g=s.getTokens(e);return n.walk(function(p,b,y,f,C){null!=p?h.push({type:"fold",value:p}):(C&&(g=s.getTokens(b)),g.length&&function d(p,b,y){for(var f=0,C=0;C+p[f].value.lengthy-b&&($=$.substring(0,y-b)),h.push({type:p[f].type,value:$}),C=b+$.length,f+=1);Cy?{type:p[f].type,value:$.substring(0,y-C)}:p[f]),C+=$.length,f+=1}}(g,f,y))},n.end.row,this.session.getLine(n.end.row).length),h},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t}();i.prototype.EOF_CHAR="\xb6",i.prototype.EOL_CHAR_LF="\xac",i.prototype.EOL_CHAR_CRLF="\xa4",i.prototype.EOL_CHAR=i.prototype.EOL_CHAR_LF,i.prototype.TAB_CHAR="\u2014",i.prototype.SPACE_CHAR="\xb7",i.prototype.$padding=0,i.prototype.MAX_LINE_LENGTH=1e4,i.prototype.showInvisibles=!1,i.prototype.showSpaces=!1,i.prototype.showTabs=!1,i.prototype.showEOL=!1,i.prototype.displayIndentGuides=!0,i.prototype.$highlightIndentGuides=!0,i.prototype.$tabStrings=[],i.prototype.destroy={},i.prototype.onChangeTabSize=i.prototype.$computeTabString,T.implement(i.prototype,l),x.Text=i}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(R,x,B){"use strict";var T=R("../lib/dom"),L=function(){function M(a){this.element=T.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),T.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return M.prototype.$updateOpacity=function(a){for(var l=this.cursors,r=l.length;r--;)T.setStyle(l[r].style,"opacity",a?"":"0")},M.prototype.$startCssAnimation=function(){for(var a=this.cursors,l=a.length;l--;)a[l].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&T.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},M.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,T.removeCssClass(this.element,"ace_animate-blinking")},M.prototype.setPadding=function(a){this.$padding=a},M.prototype.setSession=function(a){this.session=a},M.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},M.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},M.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,T.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},M.prototype.addCursor=function(){var a=T.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},M.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},M.prototype.hideCursor=function(){this.isVisible=!1,T.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},M.prototype.showCursor=function(){this.isVisible=!0,T.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},M.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,T.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&T.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),T.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var l=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),l()},this.blinkInterval),l()}else this.$stopCssAnimation()},M.prototype.getPixelPosition=function(a,l){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,a.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),top:(r.row-(l?this.config.firstRowScreen:0))*this.config.lineHeight}},M.prototype.isCursorInView=function(a,l){return a.top>=0&&a.topa.height+a.offset||t.top<0)&&r>1)){var e=this.cursors[o++]||this.addCursor(),n=e.style;this.drawCursor?this.drawCursor(e,t,a,l[r],this.session):this.isCursorInView(t,a)?(T.setStyle(n,"display","block"),T.translate(e,t.left,t.top),T.setStyle(n,"width",Math.round(a.characterWidth)+"px"),T.setStyle(n,"height",a.lineHeight+"px")):T.setStyle(n,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},M.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?T.addCssClass(this.element,"ace_overwrite-cursors"):T.removeCssClass(this.element,"ace_overwrite-cursors"))},M.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},M}();L.prototype.$padding=0,L.prototype.drawCursor=null,x.Cursor=L}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(R,x,B){"use strict";var e,T=this&&this.__extends||(e=function(n,s){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,d){h.__proto__=d}||function(h,d){for(var g in d)Object.prototype.hasOwnProperty.call(d,g)&&(h[g]=d[g])})(n,s)},function(n,s){if("function"!=typeof s&&null!==s)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");function h(){this.constructor=n}e(n,s),n.prototype=null===s?Object.create(s):(h.prototype=s.prototype,new h)}),L=R("./lib/oop"),M=R("./lib/dom"),a=R("./lib/event"),l=R("./lib/event_emitter").EventEmitter,r=32768,o=function(){function e(n,s){this.element=M.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=M.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},e}();L.implement(o.prototype,l);var i=function(e){function n(s,h){var d=e.call(this,s,"-v")||this;return d.scrollTop=0,d.scrollHeight=0,h.$scrollbarWidth=d.width=M.scrollbarWidth(s.ownerDocument),d.inner.style.width=d.element.style.width=(d.width||15)+5+"px",d.$minWidth=0,d}return T(n,e),n.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var s=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-s)/(this.coeff-s)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(s){this.element.style.height=s+"px"},n.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>r?(this.coeff=r/s,s=r):1!=this.coeff&&(this.coeff=1),this.inner.style.height=s+"px"},n.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},n}(o);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var t=function(e){function n(s,h){var d=e.call(this,s,"-h")||this;return d.scrollLeft=0,d.height=h.$scrollbarWidth,d.inner.style.height=d.element.style.height=(d.height||15)+5+"px",d}return T(n,e),n.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.setWidth=function(s){this.element.style.width=s+"px"},n.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},n.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},n.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},n}(o);x.ScrollBar=i,x.ScrollBarV=i,x.ScrollBarH=t,x.VScrollBar=i,x.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(R,x,B){"use strict";var t,T=this&&this.__extends||(t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,h){s.__proto__=h}||function(s,h){for(var d in h)Object.prototype.hasOwnProperty.call(h,d)&&(s[d]=h[d])})(e,n)},function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function s(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(s.prototype=n.prototype,new s)}),L=R("./lib/oop"),M=R("./lib/dom"),a=R("./lib/event"),l=R("./lib/event_emitter").EventEmitter;M.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var r=function(){function t(e,n){this.element=M.createElement("div"),this.element.className="ace_sb"+n,this.inner=M.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t}();L.implement(r.prototype,l);var o=function(t){function e(n,s){var h=t.call(this,n,"-v")||this;return h.scrollTop=0,h.scrollHeight=0,h.parent=n,h.width=h.VScrollWidth,h.renderer=s,h.inner.style.width=h.element.style.width=(h.width||15)+"px",h.$minWidth=0,h}return T(e,t),e.prototype.onMouseDown=function(n,s){if("mousedown"===n&&0===a.getButton(s)&&2!==s.detail){if(s.target===this.inner){var h=this,d=s.clientY,b=s.clientY,y=this.thumbTop;a.capture(this.inner,function(S){d=S.clientY},function(){clearInterval(C)});var C=setInterval(function(){if(void 0!==d){var S=h.scrollTopFromThumbTop(y+d-b);S!==h.scrollTop&&h._emit("scroll",{data:S})}},20);return a.preventDefault(s)}var $=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(n){var s=n*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(s>>=0)<0?s=0:s>this.pageHeight-this.viewHeight&&(s=this.pageHeight-this.viewHeight),s},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(n){this.height=Math.max(0,n),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(n,s){this.pageHeight===n&&!s||(this.pageHeight=n,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(n){this.scrollTop=n,n<0&&(n=0),this.thumbTop=n*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(r);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var i=function(t){function e(n,s){var h=t.call(this,n,"-h")||this;return h.scrollLeft=0,h.scrollWidth=0,h.height=h.HScrollHeight,h.inner.style.height=h.element.style.height=(h.height||12)+"px",h.renderer=s,h}return T(e,t),e.prototype.onMouseDown=function(n,s){if("mousedown"===n&&0===a.getButton(s)&&2!==s.detail){if(s.target===this.inner){var h=this,d=s.clientX,b=s.clientX,y=this.thumbLeft;a.capture(this.inner,function(S){d=S.clientX},function(){clearInterval(C)});var C=setInterval(function(){if(void 0!==d){var S=h.scrollLeftFromThumbLeft(y+d-b);S!==h.scrollLeft&&h._emit("scroll",{data:S})}},20);return a.preventDefault(s)}var $=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(n){var s=n*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(s>>=0)<0?s=0:s>this.pageWidth-this.viewWidth&&(s=this.pageWidth-this.viewWidth),s},e.prototype.setWidth=function(n){this.width=Math.max(0,n),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(n,s){this.pageWidth===n&&!s||(this.pageWidth=n,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(n){this.scrollLeft=n,n<0&&(n=0),this.thumbLeft=n*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(r);i.prototype.setInnerWidth=i.prototype.setScrollWidth,x.ScrollBar=o,x.ScrollBarV=o,x.ScrollBarH=i,x.VScrollBar=o,x.HScrollBar=i}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(R,x,B){"use strict";var T=R("./lib/event"),L=function(){function M(a,l){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=l||window;var r=this;this._flush=function(o){r.pending=!1;var i=r.changes;if(i&&(T.blockIdle(100),r.changes=0,r.onRender(i)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return M.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(T.nextFrame(this._flush),this.pending=!0)},M.prototype.clear=function(a){var l=this.changes;return this.changes=0,l},M}();x.RenderLoop=L}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(R,x,B){var T=R("../lib/oop"),L=R("../lib/dom"),M=R("../lib/lang"),a=R("../lib/event"),l=R("../lib/useragent"),r=R("../lib/event_emitter").EventEmitter,o=512,i="function"==typeof ResizeObserver,t=200,e=function(){function n(s){this.el=L.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=L.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=L.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=M.stringRepeat("X",o),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()}return n.prototype.$setMeasureNodeStyles=function(s,h){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",l.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=h?"hidden":"visible"},n.prototype.checkForSizeChanges=function(s){if(void 0===s&&(s=this.$measureSizes()),s&&(this.$characterSize.width!==s.width||this.$characterSize.height!==s.height)){this.$measureNode.style.fontWeight="bold";var h=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=h&&h.width===s.width&&h.height===s.height,this._emit("changeCharacterSize",{data:s})}},n.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(h){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},n.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=a.onIdle(function h(){s.checkForSizeChanges(),a.onIdle(h,500)},500)},n.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},n.prototype.$measureSizes=function(s){var h={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/o};return 0===h.width||0===h.height?null:h},n.prototype.$measureCharWidth=function(s){return this.$main.textContent=M.stringRepeat(s,o),this.$main.getBoundingClientRect().width/o},n.prototype.getCharacterWidth=function(s){var h=this.charSizes[s];return void 0===h&&(h=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),h},n.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},n.prototype.$getZoom=function(s){return s&&s.parentElement?(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement):1},n.prototype.$initTransformMeasureNodes=function(){var s=function(h,d){return["div",{style:"position: absolute;top:"+h+"px;left:"+d+"px;"}]};this.els=L.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},n.prototype.transformCoordinates=function(s,h){function g(I,D,N){var O=I[1]*D[0]-I[0]*D[1];return[(-D[1]*N[0]+D[0]*N[1])/O,(+I[1]*N[0]-I[0]*N[1])/O]}function p(I,D){return[I[0]-D[0],I[1]-D[1]]}function b(I,D){return[I[0]+D[0],I[1]+D[1]]}function y(I,D){return[I*D[0],I*D[1]]}function f(I){var D=I.getBoundingClientRect();return[D.left,D.top]}s&&(s=y(1/this.$getZoom(this.el),s)),this.els||this.$initTransformMeasureNodes();var C=f(this.els[0]),$=f(this.els[1]),S=f(this.els[2]),E=f(this.els[3]),v=g(p(E,$),p(E,S),p(b($,S),b(E,C))),m=y(1+v[0],p($,C)),u=y(1+v[1],p(S,C));if(h){var c=h,w=v[0]*c[0]/t+v[1]*c[1]/t+1,A=b(y(c[0],m),y(c[1],u));return b(y(1/w/t,A),C)}var k=p(s,C),_=g(p(m,y(v[0],k)),p(u,y(v[1],k)),k);return y(t,_)},n}();e.prototype.$characterSize={width:0,height:0},T.implement(e.prototype,r),x.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(R,x,B){B.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(33em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget, .ace_custom-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_custom-widget {\n background: none;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "\u21a9";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(R,x,B){"use strict";var T=R("../lib/dom"),L=R("../lib/oop"),M=R("../lib/event_emitter").EventEmitter,a=function(){function l(r,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(r)}return l.prototype.$createCanvas=function(){this.canvas=T.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},l.prototype.setScrollBarV=function(r){this.$createCanvas(),this.scrollbarV=r,r.element.appendChild(this.canvas),this.setDimensions()},l.prototype.$updateDecorators=function(r){if("function"==typeof this.canvas.getContext){var o=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;this.setDimensions(r);var i=this.canvas.getContext("2d"),e=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),e){var n={info:1,warning:2,error:3};e.forEach(function(m){m.priority=n[m.type]||null}),e=e.sort(function t(m,u){return m.priorityu.priority?1:0});for(var s=0;sthis.canvasHeight&&(y=this.canvasHeight-f);var C=y-f,S=y+f-C;i.fillStyle=o[e[s].type]||null,i.fillRect(0,C,Math.round(this.oneZoneWidth-1),S)}}var E=this.renderer.session.selection.getCursor();if(E){var v=Math.round(this.getVerticalOffsetForRow(E.row)*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,v,this.canvasWidth,2)}}},l.prototype.getVerticalOffsetForRow=function(r){return this.renderer.session.documentToScreenRow(r|=0,0)*this.lineHeight},l.prototype.setDimensions=function(r){this.maxHeight=(r=r||this.renderer.layerConfig).maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.heightRatio=this.maxHeightS&&(this.$changedLines.firstRow=S),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},$.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},$.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},$.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},$.prototype.updateFull=function(S){S?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},$.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},$.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},$.prototype.onResize=function(S,E,v,m){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=S?1:0;var u=this.container;m||(m=u.clientHeight||u.scrollHeight),!m&&this.$maxLines&&this.lineHeight>1&&(!u.style.height||"0px"==u.style.height)&&(u.style.height="1px",m=u.clientHeight||u.scrollHeight),v||(v=u.clientWidth||u.scrollWidth);var c=this.$updateCachedSize(S,E,v,m);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!v&&!m)return this.resizing=0;S&&(this.$gutterLayer.$padding=null),S?this.$renderChanges(c|this.$changes,!0):this.$loop.schedule(c|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},$.prototype.$updateCachedSize=function(S,E,v,m){var u=0,c=this.$size,w={width:c.width,height:c.height,scrollerHeight:c.scrollerHeight,scrollerWidth:c.scrollerWidth};if((m-=this.$extraHeight||0)&&(S||c.height!=m)&&(c.height=m,u|=this.CHANGE_SIZE,c.scrollerHeight=c.height,this.$horizScroll&&(c.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(c.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",u|=this.CHANGE_SCROLL),v&&(S||c.width!=v)){u|=this.CHANGE_SIZE,c.width=v,null==E&&(E=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=E,L.setStyle(this.scrollBarH.element.style,"left",E+"px"),L.setStyle(this.scroller.style,"left",E+this.margin.left+"px"),c.scrollerWidth=Math.max(0,v-E-this.scrollBarV.getWidth()-this.margin.h),L.setStyle(this.$gutter.style,"left",this.margin.left+"px");var A=this.scrollBarV.getWidth()+"px";L.setStyle(this.scrollBarH.element.style,"right",A),L.setStyle(this.scroller.style,"right",A),L.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(c.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||S)&&(u|=this.CHANGE_FULL)}return c.$dirty=!v||!m,u&&this._signal("resize",w),u},$.prototype.onGutterResize=function(S){var E=this.$showGutter?S:0;E!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,E,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},$.prototype.adjustWrapLimit=function(){var E=Math.floor((this.$size.scrollerWidth-2*this.$padding)/this.characterWidth);return this.session.adjustWrapLimit(E,this.$showPrintMargin&&this.$printMarginColumn)},$.prototype.setAnimatedScroll=function(S){this.setOption("animatedScroll",S)},$.prototype.getAnimatedScroll=function(){return this.$animatedScroll},$.prototype.setShowInvisibles=function(S){this.setOption("showInvisibles",S),this.session.$bidiHandler.setShowInvisibles(S)},$.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},$.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},$.prototype.setDisplayIndentGuides=function(S){this.setOption("displayIndentGuides",S)},$.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},$.prototype.setHighlightIndentGuides=function(S){this.setOption("highlightIndentGuides",S)},$.prototype.setShowPrintMargin=function(S){this.setOption("showPrintMargin",S)},$.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},$.prototype.setPrintMarginColumn=function(S){this.setOption("printMarginColumn",S)},$.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},$.prototype.getShowGutter=function(){return this.getOption("showGutter")},$.prototype.setShowGutter=function(S){return this.setOption("showGutter",S)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},$.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var S=L.createElement("div");S.className="ace_layer ace_print-margin-layer",this.$printMarginEl=L.createElement("div"),this.$printMarginEl.className="ace_print-margin",S.appendChild(this.$printMarginEl),this.content.insertBefore(S,this.content.firstChild)}var E=this.$printMarginEl.style;E.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",E.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},$.prototype.getContainerElement=function(){return this.container},$.prototype.getMouseEventTarget=function(){return this.scroller},$.prototype.getTextAreaContainer=function(){return this.container},$.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var S=this.textarea.style,E=this.$composition;if(!this.$keepTextAreaAtCursor&&!E)return void L.translate(this.textarea,-100,0);var v=this.$cursorLayer.$pixelPos;if(v){E&&E.markerRange&&(v=this.$cursorLayer.getPixelPosition(E.markerRange.start,!0));var m=this.layerConfig,u=v.top,c=v.left,w=E&&E.useTextareaForIME||y.isMobile?this.lineHeight:1;if((u-=m.offset)<0||u>m.height-w)return void L.translate(this.textarea,0,0);var A=1,k=this.$size.height-w;E?E.useTextareaForIME?A=this.characterWidth*this.session.$getStringScreenWidth(this.textarea.value)[0]:u+=this.lineHeight+2:u+=this.lineHeight,(c-=this.scrollLeft)>this.$size.scrollerWidth-A&&(c=this.$size.scrollerWidth-A),c+=this.gutterWidth+this.margin.left,L.setStyle(S,"height",w+"px"),L.setStyle(S,"width",A+"px"),L.translate(this.textarea,Math.min(c,this.$size.scrollerWidth-A),Math.min(u,k))}}},$.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},$.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},$.prototype.getLastFullyVisibleRow=function(){var S=this.layerConfig,E=S.lastRow;return this.session.documentToScreenRow(E,0)*S.lineHeight-this.session.getScrollTop()>S.height-S.lineHeight?E-1:E},$.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},$.prototype.setPadding=function(S){this.$padding=S,this.$textLayer.setPadding(S),this.$cursorLayer.setPadding(S),this.$markerFront.setPadding(S),this.$markerBack.setPadding(S),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},$.prototype.setScrollMargin=function(S,E,v,m){var u=this.scrollMargin;u.top=0|S,u.bottom=0|E,u.right=0|m,u.left=0|v,u.v=u.top+u.bottom,u.h=u.left+u.right,u.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-u.top),this.updateFull()},$.prototype.setMargin=function(S,E,v,m){var u=this.margin;u.top=0|S,u.bottom=0|E,u.right=0|m,u.left=0|v,u.v=u.top+u.bottom,u.h=u.left+u.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},$.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},$.prototype.setHScrollBarAlwaysVisible=function(S){this.setOption("hScrollBarAlwaysVisible",S)},$.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},$.prototype.setVScrollBarAlwaysVisible=function(S){this.setOption("vScrollBarAlwaysVisible",S)},$.prototype.$updateScrollBarV=function(){var S=this.layerConfig.maxHeight,E=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>(S-=(E-this.lineHeight)*this.$scrollPastEnd)-E&&(S=this.scrollTop+E,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(S+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},$.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},$.prototype.freeze=function(){this.$frozen=!0},$.prototype.unfreeze=function(){this.$frozen=!1},$.prototype.$renderChanges=function(S,E){if(this.$changes&&(S|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(S||E)){if(this.$size.$dirty)return this.$changes|=S,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",S),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var v=this.layerConfig;if(S&this.CHANGE_FULL||S&this.CHANGE_SIZE||S&this.CHANGE_TEXT||S&this.CHANGE_LINES||S&this.CHANGE_SCROLL||S&this.CHANGE_H_SCROLL){if(S|=this.$computeLayerConfig()|this.$loop.clear(),v.firstRow!=this.layerConfig.firstRow&&v.firstRowScreen==this.layerConfig.firstRowScreen){var m=this.scrollTop+(v.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;m>0&&(this.scrollTop=m,S|=this.CHANGE_SCROLL,S|=this.$computeLayerConfig()|this.$loop.clear())}v=this.layerConfig,this.$updateScrollBarV(),S&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),L.translate(this.content,-this.scrollLeft,-v.offset);var c=v.minHeight+"px";L.setStyle(this.content.style,"width",v.width+2*this.$padding+"px"),L.setStyle(this.content.style,"height",c)}return S&this.CHANGE_H_SCROLL&&(L.translate(this.content,-this.scrollLeft,-v.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),S&this.CHANGE_FULL?(this.$changedLines=null,this.$textLayer.update(v),this.$showGutter&&this.$gutterLayer.update(v),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(v),this.$markerBack.update(v),this.$markerFront.update(v),this.$cursorLayer.update(v),this.$moveTextAreaToCursor(),void this._signal("afterRender",S)):S&this.CHANGE_SCROLL?(this.$changedLines=null,S&this.CHANGE_TEXT||S&this.CHANGE_LINES?this.$textLayer.update(v):this.$textLayer.scrollLines(v),this.$showGutter&&(S&this.CHANGE_GUTTER||S&this.CHANGE_LINES?this.$gutterLayer.update(v):this.$gutterLayer.scrollLines(v)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(v),this.$markerBack.update(v),this.$markerFront.update(v),this.$cursorLayer.update(v),this.$moveTextAreaToCursor(),void this._signal("afterRender",S)):(S&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(v),this.$showGutter&&this.$gutterLayer.update(v),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(v)):S&this.CHANGE_LINES?((this.$updateLines()||S&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(v),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(v)):S&this.CHANGE_TEXT||S&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(v),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(v)):S&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(v),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(v)),S&this.CHANGE_CURSOR&&(this.$cursorLayer.update(v),this.$moveTextAreaToCursor()),S&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(v),S&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(v),void this._signal("afterRender",S))}this.$changes|=S},$.prototype.$autosize=function(){var S=this.session.getScreenLength()*this.lineHeight,E=this.$maxLines*this.lineHeight,v=Math.min(E,Math.max((this.$minLines||1)*this.lineHeight,S))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(v+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&v>this.$maxPixelHeight&&(v=this.$maxPixelHeight);var u=!(v<=2*this.lineHeight)&&S>E;if(v!=this.desiredHeight||this.$size.height!=this.desiredHeight||u!=this.$vScroll){u!=this.$vScroll&&(this.$vScroll=u,this.scrollBarV.setVisible(u));var c=this.container.clientWidth;this.container.style.height=v+"px",this.$updateCachedSize(!0,this.$gutterWidth,c,v),this.desiredHeight=v,this._signal("autosize")}},$.prototype.$computeLayerConfig=function(){var S=this.session,E=this.$size,v=E.height<=2*this.lineHeight,u=this.session.getScreenLength()*this.lineHeight,c=this.$getLongestLine(),w=!v&&(this.$hScrollBarAlwaysVisible||E.scrollerWidth-c-2*this.$padding<0),A=this.$horizScroll!==w;A&&(this.$horizScroll=w,this.scrollBarH.setVisible(w));var k=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),v=E.height<=2*this.lineHeight);var _=E.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(E.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;u+=I;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,u-E.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,c+2*this.$padding-E.scrollerWidth+D.right)));var N=!v&&(this.$vScrollBarAlwaysVisible||E.scrollerHeight-u+I<0||this.scrollTop>D.top),O=k!==N;O&&(this.$vScroll=N,this.scrollBarV.setVisible(N));var V,U,W=this.scrollTop%this.lineHeight,F=Math.ceil(_/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-W)/this.lineHeight)),z=H+F,P=this.lineHeight;H=S.screenToDocumentRow(H,0);var G=S.getFoldLine(H);G&&(H=G.start.row),V=S.documentToScreenRow(H,0),U=S.getRowLength(H)*P,z=Math.min(S.screenToDocumentRow(z,0),S.getLength()-1),_=E.scrollerHeight+S.getRowLength(z)*P+U,(W=this.scrollTop-V*P)<0&&V>0&&(V=Math.max(0,V+Math.floor(W/P)),W=this.scrollTop-V*P);var j=0;return(this.layerConfig.width!=c||A)&&(j=this.CHANGE_H_SCROLL),(A||O)&&(j|=this.$updateCachedSize(!0,this.gutterWidth,E.width,E.height),this._signal("scrollbarVisibilityChanged"),O&&(c=this.$getLongestLine())),this.layerConfig={width:c,padding:this.$padding,firstRow:H,firstRowScreen:V,lastRow:z,lineHeight:P,characterWidth:this.characterWidth,minHeight:_,maxHeight:u,offset:W,gutterOffset:P?Math.max(0,Math.ceil((W+E.height-E.scrollerHeight)/P)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(c-this.$padding),j},$.prototype.$updateLines=function(){if(this.$changedLines){var S=this.$changedLines.firstRow,E=this.$changedLines.lastRow;this.$changedLines=null;var v=this.layerConfig;if(!(S>v.lastRow+1||Ethis.$textLayer.MAX_LINE_LENGTH&&(S=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(S*this.characterWidth))},$.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},$.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},$.prototype.addGutterDecoration=function(S,E){this.$gutterLayer.addGutterDecoration(S,E)},$.prototype.removeGutterDecoration=function(S,E){this.$gutterLayer.removeGutterDecoration(S,E)},$.prototype.updateBreakpoints=function(S){this._rows=S,this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.setAnnotations=function(S){this.$gutterLayer.setAnnotations(S),this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},$.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},$.prototype.showCursor=function(){this.$cursorLayer.showCursor()},$.prototype.scrollSelectionIntoView=function(S,E,v){this.scrollCursorIntoView(S,v),this.scrollCursorIntoView(E,v)},$.prototype.scrollCursorIntoView=function(S,E,v){if(0!==this.$size.scrollerHeight){var m=this.$cursorLayer.getPixelPosition(S),u=m.left,c=m.top,w=v&&v.top||0,A=v&&v.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var k=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;k+w>c?(E&&k+w>c+this.lineHeight&&(c-=E*this.$size.scrollerHeight),0===c&&(c=-this.scrollMargin.top),this.session.setScrollTop(c)):k+this.$size.scrollerHeight-A=1-this.scrollMargin.top||E>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||S<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||S>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},$.prototype.pixelToScreenCoordinates=function(S,E){var v;if(this.$hasCssTransforms){v={top:0,left:0};var m=this.$fontMetrics.transformCoordinates([S,E]);S=m[1]-this.gutterWidth-this.margin.left,E=m[0]}else v=this.scroller.getBoundingClientRect();var u=S+this.scrollLeft-v.left-this.$padding,c=u/this.characterWidth,w=Math.floor((E+this.scrollTop-v.top)/this.lineHeight),A=this.$blockCursor?Math.floor(c):Math.round(c);return{row:w,column:A,side:c-A>0?1:-1,offsetX:u}},$.prototype.screenToTextCoordinates=function(S,E){var v;if(this.$hasCssTransforms){v={top:0,left:0};var m=this.$fontMetrics.transformCoordinates([S,E]);S=m[1]-this.gutterWidth-this.margin.left,E=m[0]}else v=this.scroller.getBoundingClientRect();var u=S+this.scrollLeft-v.left-this.$padding,c=u/this.characterWidth,w=this.$blockCursor?Math.floor(c):Math.round(c),A=Math.floor((E+this.scrollTop-v.top)/this.lineHeight);return this.session.screenToDocumentPosition(A,Math.max(w,0),u)},$.prototype.textToScreenCoordinates=function(S,E){var v=this.scroller.getBoundingClientRect(),m=this.session.documentToScreenPosition(S,E),u=this.$padding+(this.session.$bidiHandler.isBidiRow(m.row,S)?this.session.$bidiHandler.getPosLeft(m.column):Math.round(m.column*this.characterWidth));return{pageX:v.left+u-this.scrollLeft,pageY:v.top+m.row*this.lineHeight-this.scrollTop}},$.prototype.visualizeFocus=function(){L.addCssClass(this.container,"ace_focus")},$.prototype.visualizeBlur=function(){L.removeCssClass(this.container,"ace_focus")},$.prototype.showComposition=function(S){this.$composition=S,S.cssText||(S.cssText=this.textarea.style.cssText),null==S.useTextareaForIME&&(S.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(L.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):S.markerId=this.session.addMarker(S.markerRange,"ace_composition_marker","text")},$.prototype.setCompositionText=function(S){var E=this.session.selection.cursor;this.addToken(S,"composition_placeholder",E.row,E.column),this.$moveTextAreaToCursor()},$.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),L.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var S=this.session.selection.cursor;this.removeExtraToken(S.row,S.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},$.prototype.setGhostText=function(S,E){var v=this.session.selection.cursor,m=E||{row:v.row,column:v.column};this.removeGhostText();var u=this.$calculateWrappedTextChunks(S,m);this.addToken(u[0].text,"ghost_text",m.row,m.column),this.$ghostText={text:S,position:{row:m.row,column:m.column}};var c=L.createElement("div");if(u.length>1){var A,w=this.hideTokensAfterPosition(m.row,m.column);u.slice(1).forEach(function(O){var W=L.createElement("div"),F=L.createElement("span");F.className="ace_ghost_text",O.wrapped&&(W.className="ghost_text_line_wrapped"),0===O.text.length&&(O.text=" "),F.appendChild(L.createTextNode(O.text)),W.appendChild(F),c.appendChild(W),A=W}),w.forEach(function(O){var W=L.createElement("span");f(O.type)||(W.className="ace_"+O.type.replace(/\./g," ace_")),W.appendChild(L.createTextNode(O.value)),A.appendChild(W)}),this.$ghostTextWidget={el:c,row:m.row,column:m.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var k=this.$cursorLayer.getPixelPosition(m,!0),I=this.container.getBoundingClientRect().height,D=u.length*this.lineHeight;if(D0){var _=0;k.push(u[w].length);for(var I=0;I1||Math.abs(S.$size.height-m)>1?S.$resizeTimer.delay():S.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},$}();C.prototype.CHANGE_CURSOR=1,C.prototype.CHANGE_MARKER=2,C.prototype.CHANGE_GUTTER=4,C.prototype.CHANGE_SCROLL=8,C.prototype.CHANGE_LINES=16,C.prototype.CHANGE_TEXT=32,C.prototype.CHANGE_SIZE=64,C.prototype.CHANGE_MARKER_BACK=128,C.prototype.CHANGE_MARKER_FRONT=256,C.prototype.CHANGE_FULL=512,C.prototype.CHANGE_H_SCROLL=1024,C.prototype.$changes=0,C.prototype.$padding=null,C.prototype.$frozen=!1,C.prototype.STEPS=8,T.implement(C.prototype,g),a.defineOptions(C.prototype,"renderer",{useResizeObserver:{set:function($){!$&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):$&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function($){this.$textLayer.setShowInvisibles($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function($){"number"==typeof $&&(this.$printMarginColumn=$),this.$showPrintMargin=!!$,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function($){this.$gutter.style.display=$?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function($){this.$gutterLayer.$useSvgGutterIcons=$},initialValue:!1},showFoldedAnnotations:{set:function($){this.$gutterLayer.$showFoldedAnnotations=$},initialValue:!1},fadeFoldWidgets:{set:function($){L.setCssClass(this.$gutter,"ace_fade-fold-widgets",$)},initialValue:!1},showFoldWidgets:{set:function($){this.$gutterLayer.setShowFoldWidgets($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function($){this.$textLayer.setDisplayIndentGuides($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function($){1==this.$textLayer.setHighlightIndentGuides($)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function($){this.$gutterLayer.setHighlightGutterLine($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function($){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function($){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function($){"number"==typeof $&&($+="px"),this.container.style.fontSize=$,this.updateFontSize()},initialValue:12},fontFamily:{set:function($){this.container.style.fontFamily=$,this.updateFontSize()}},maxLines:{set:function($){this.updateFull()}},minLines:{set:function($){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function($){this.updateFull()},initialValue:0},scrollPastEnd:{set:function($){this.$scrollPastEnd!=($=+$||0)&&(this.$scrollPastEnd=$,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function($){this.$gutterLayer.$fixedWidth=!!$,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function($){this.$updateCustomScrollbar($)},initialValue:!1},theme:{set:function($){this.setTheme($)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),x.VirtualRenderer=C}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(R,x,B){"use strict";var T=R("../lib/oop"),L=R("../lib/net"),M=R("../lib/event_emitter").EventEmitter,a=R("../config");function r(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=function l(t){var e="importScripts('"+L.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var s=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return s.append(e),s.getBlob("application/javascript")}}(t),s=(window.URL||window.webkitURL).createObjectURL(e);return new Worker(s)}return new Worker(t)}var o=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){T.implement(this,M),this.$createWorkerFromOldConfig=function(t,e,n,s,h){if(R.nameToUrl&&!R.toUrl&&(R.toUrl=R.nameToUrl),a.get("packaged")||!R.toUrl)s=s||a.moduleUrl(e,"worker");else{var d=this.$normalizePath;s=s||d(R.toUrl("ace/worker/worker.js",null,"_"));var g={};t.forEach(function(p){g[p]=d(R.toUrl(p,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(s),h&&this.send("importScripts",h),this.$worker.postMessage({init:!0,tlns:g,module:e,classname:n}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var n=this.callbacks[e.id];n&&(n(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data)}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return L.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,n){if(n){var s=this.callbackId++;this.callbacks[s]=n,e.push(s)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),this.deltaQueue.push(t.start,"insert"==t.action?t.lines:t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(o.prototype),x.UIWorkerClient=function(t,e,n){var s=null,h=!1,d=Object.create(M),g=[],p=new o({messageBuffer:g,terminate:function(){},postMessage:function(y){g.push(y),s&&(h?setTimeout(b):b())}});p.setEmitSync=function(y){h=y};var b=function(){var y=g.shift();y.command?s[y.command].apply(s,y.args):y.event&&d._signal(y.event,y.data)};return d.postMessage=function(y){p.onMessage({data:y})},d.callback=function(y,f){this.postMessage({type:"call",id:f,data:y})},d.emit=function(y,f){this.postMessage({type:"event",name:y,data:f})},a.loadModule(["worker",e],function(y){for(s=new y[n](d);g.length;)b()}),p},x.WorkerClient=o,x.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(R,x,B){"use strict";var T=R("./range").Range,L=R("./lib/event_emitter").EventEmitter,M=R("./lib/oop"),a=function(){function l(r,o,i,t,e,n){var s=this;this.length=o,this.session=r,this.doc=r.getDocument(),this.mainClass=e,this.othersClass=n,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=i;var h=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return l.prototype.setup=function(){var r=this,o=this.doc,i=this.session;this.selectionBefore=i.selection.toJSON(),i.selection.inMultiSelectMode&&i.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=i.addMarker(new T(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var n=o.createAnchor(e.row,e.column);n.$insertRight=!0,n.detach(),r.others.push(n)}),i.setUndoSelect(!1)},l.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,o=this;this.othersActive=!0,this.others.forEach(function(i){i.markerId=r.addMarker(new T(i.row,i.column,i.row,i.column+o.length),o.othersClass,null,!1)})}},l.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(r),t&&(this.length+=i),t&&!this.session.$fromUndo)if("insert"===r.action)for(var n=this.others.length-1;n>=0;n--)this.doc.insertMergedLines(h={row:(s=this.others[n]).row,column:s.column+e},r.lines);else if("remove"===r.action)for(n=this.others.length-1;n>=0;n--){var s,h;this.doc.remove(new T((h={row:(s=this.others[n]).row,column:s.column+e}).row,h.column,h.row,h.column-i))}this.$updating=!1,this.updateMarkers()}},l.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var o=this.others.length;o--;)this.others[o].onChange(r);this.updateMarkers()},l.prototype.updateMarkers=function(){if(!this.$updating){var r=this,o=this.session,i=function(e,n){o.removeMarker(e.markerId),e.markerId=o.addMarker(new T(e.row,e.column,e.row,e.column+r.length),n,null,!1)};i(this.pos,this.mainClass);for(var t=this.others.length;t--;)i(this.others[t],this.othersClass)}},l.prototype.onCursorChange=function(r){if(!this.$updating&&this.session){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},l.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},l.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var r=this.session.getUndoManager(),o=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,i=0;i1?L.multiSelect.joinSelections():L.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(L){L.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(L){L.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(L){L.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],x.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(L){L.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(L){return L&&L.inMultiSelectMode}}];var T=R("../keyboard/hash_handler").HashHandler;x.keyboardHandler=new T(x.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(R,x,B){var T=R("./range_list").RangeList,L=R("./range").Range,M=R("./selection").Selection,a=R("./mouse/multi_select_handler").onMouseDown,l=R("./lib/event"),r=R("./lib/lang"),o=R("./commands/multi_select_commands");x.commands=o.defaultCommands.concat(o.multiSelectCommands);var t=new(0,R("./search").Search),n=R("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(n.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(p,b){if(p){if(!this.inMultiSelectMode&&0===this.rangeCount){var y=this.toOrientedRange();if(this.rangeList.add(y),this.rangeList.add(p),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),b||this.fromOrientedRange(p);this.rangeList.removeAll(),this.rangeList.add(y),this.$onAddRange(y)}p.cursor||(p.cursor=p.end);var f=this.rangeList.add(p);return this.$onAddRange(p),f.length&&this.$onRemoveRange(f),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(p)}},this.toSingleRange=function(p){p=p||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),p&&this.fromOrientedRange(p)},this.substractPoint=function(p){var b=this.rangeList.substractPoint(p);if(b)return this.$onRemoveRange(b),b[0]},this.mergeOverlappingRanges=function(){var p=this.rangeList.merge();p.length&&this.$onRemoveRange(p)},this.$onAddRange=function(p){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(p),this._signal("addRange",{range:p})},this.$onRemoveRange=function(p){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();p.push(b),this.rangeCount=0}for(var y=p.length;y--;){var f=this.ranges.indexOf(p[y]);this.ranges.splice(f,1)}this._signal("removeRange",{ranges:p}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(b=b||this.ranges[0])&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new T,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var p=this.ranges.length?this.ranges:[this.getRange()],b=[],y=0;y1){var p=this.rangeList.ranges,b=p[p.length-1],y=L.fromPoints(p[0].start,b.end);this.toSingleRange(),this.setSelectionRange(y,b.cursor==b.start)}else{var f=this.session.documentToScreenPosition(this.cursor),C=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(f,C).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(p,b,y){var f=[],C=p.column0;)_--;if(_>0)for(var I=0;f[I].isEmpty();)I++;for(var D=_;D>=I;D--)f[D].isEmpty()&&f.splice(D,1)}return f}}.call(M.prototype);var s=R("./editor").Editor;function h(p,b){return p.row==b.row&&p.column==b.column}function d(p){p.$multiselectOnSessionChange||(p.$onAddRange=p.$onAddRange.bind(p),p.$onRemoveRange=p.$onRemoveRange.bind(p),p.$onMultiSelect=p.$onMultiSelect.bind(p),p.$onSingleSelect=p.$onSingleSelect.bind(p),p.$multiselectOnSessionChange=x.onSessionChange.bind(p),p.$checkMultiselectChange=p.$checkMultiselectChange.bind(p),p.$multiselectOnSessionChange(p),p.on("changeSession",p.$multiselectOnSessionChange),p.on("mousedown",a),p.commands.addCommands(o.defaultCommands),function g(p){if(p.textInput){var b=p.textInput.getElement(),y=!1;l.addListener(b,"keydown",function(C){p.$blockSelectEnabled&&18==C.keyCode&&!(C.ctrlKey||C.shiftKey||C.metaKey)?y||(p.renderer.setMouseCursor("crosshair"),y=!0):y&&f()},p),l.addListener(b,"keyup",f,p),l.addListener(b,"blur",f,p)}function f(C){y&&(p.renderer.setMouseCursor(""),y=!1)}}(p))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(p){p.cursor||(p.cursor=p.end);var b=this.getSelectionStyle();return p.marker=this.session.addMarker(p,"ace_selection",b),this.session.$selectionMarkers.push(p),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,p},this.removeSelectionMarker=function(p){if(p.marker){this.session.removeMarker(p.marker);var b=this.session.$selectionMarkers.indexOf(p);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(p){for(var b=this.session.$selectionMarkers,y=p.length;y--;){var f=p[y];if(f.marker){this.session.removeMarker(f.marker);var C=b.indexOf(f);-1!=C&&b.splice(C,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(p){this.addSelectionMarker(p.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(p){this.removeSelectionMarkers(p.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(p){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(o.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(p){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(o.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(p){var b=p.command,y=p.editor;if(y.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?f=y.forEachSelection(b,p.args):"forEachLine"==b.multiSelectAction?f=y.forEachSelection(b,p.args,!0):"single"==b.multiSelectAction?(y.exitMultiSelectMode(),f=b.exec(y,p.args||{})):f=b.multiSelectAction(y,p.args||{});else{var f=b.exec(y,p.args||{});y.multiSelect.addRange(y.multiSelect.toOrientedRange()),y.multiSelect.mergeOverlappingRanges()}return f}},this.forEachSelection=function(p,b,y){if(!this.inVirtualSelectionMode){var m,C=1==y||y&&y.$byLines,$=this.session,S=this.selection,v=(y&&y.keepOrder?S:S.rangeList).ranges;if(!v.length)return p.exec?p.exec(this,b||{}):p(this,b||{});var u=S._eventRegistry;S._eventRegistry={};var c=new M($);this.inVirtualSelectionMode=!0;for(var w=v.length;w--;){if(C)for(;w>0&&v[w].start.row==v[w-1].end.row;)w--;c.fromOrientedRange(v[w]),c.index=w,this.selection=$.selection=c;var A=p.exec?p.exec(this,b||{}):p(this,b||{});!m&&void 0!==A&&(m=A),c.toOrientedRange(v[w])}c.detach(),this.selection=$.selection=S,this.inVirtualSelectionMode=!1,S._eventRegistry=u,S.mergeOverlappingRanges(),S.ranges[0]&&S.fromOrientedRange(S.ranges[0]);var k=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),k&&k.from==k.to&&this.renderer.animateScrolling(k.from),m}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var p="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,y=[],f=0;fw&&(w=I.column),NO?p.insert(D,r.stringRepeat(" ",N-O)):p.remove(new L(D.row,D.column,D.row,D.column-N+O)),_.start.column=_.end.column=w,_.start.row=_.end.row=D.row,_.cursor=_.end}),b.fromOrientedRange(y[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var $=this.selection.getRange(),S=$.start.row,E=$.end.row,v=S==E;if(v){var u,m=this.session.getLength();do{u=this.session.getLine(E)}while(/[=:]/.test(u)&&++E0);S<0&&(S=0),E>=m&&(E=m-1)}var c=this.session.removeFullLines(S,E);c=this.$reAlignText(c,v),this.session.insert({row:S,column:0},c.join("\n")+"\n"),v||($.start.column=0,$.end.column=c[c.length-1].length),this.selection.setRange($)}},this.$reAlignText=function(p,b){var C,$,S,y=!0,f=!0;return p.map(function(c){var w=c.match(/(\s*)(.*?)(\s*)([=:].*)/);return w?null==C?(C=w[1].length,$=w[2].length,S=w[3].length,w):(C+$+S!=w[1].length+w[2].length+w[3].length&&(f=!1),C!=w[1].length&&(y=!1),C>w[1].length&&(C=w[1].length),$w[3].length&&(S=w[3].length),w):[c]}).map(b?v:y?f?function m(c){return c[2]?E(C+$-c[2].length)+c[2]+E(S)+c[4].replace(/^([=:])\s+/,"$1 "):c[0]}:v:function u(c){return c[2]?E(C)+c[2]+E(S)+c[4].replace(/^([=:])\s+/,"$1 "):c[0]});function E(c){return r.stringRepeat(" ",c)}function v(c){return c[2]?E(C)+c[2]+E($-c[2].length+S)+c[4].replace(/^([=:])\s+/,"$1 "):c[0]}}}).call(s.prototype),x.onSessionChange=function(p){var b=p.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var y=p.oldSession;y&&(y.multiSelect.off("addRange",this.$onAddRange),y.multiSelect.off("removeRange",this.$onRemoveRange),y.multiSelect.off("multiSelect",this.$onMultiSelect),y.multiSelect.off("singleSelect",this.$onSingleSelect),y.multiSelect.lead.off("change",this.$checkMultiselectChange),y.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},x.MultiSelect=d,R("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(p){d(this),p?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(p){this.$blockSelectEnabled=p},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(R,x,B){"use strict";var T=R("../../range").Range,L=x.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(M,a,l){var r=M.getLine(l);return this.foldingStartMarker.test(r)?"start":"markbeginend"==a&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(M,a,l){return null},this.indentationBlock=function(M,a,l){var r=/\S/,o=M.getLine(a),i=o.search(r);if(-1!=i){for(var t=l||o.length,e=M.getLength(),n=a,s=a;++an){var g=M.getLine(s).length;return new T(n,t,s,g)}}},this.openingBracketBlock=function(M,a,l,r,o){var i={row:l,column:r+1},t=M.$findClosingBracket(a,i,o);if(t){var e=M.foldWidgets[t.row];return null==e&&(e=M.getFoldWidget(t.row)),"start"==e&&t.row>i.row&&(t.row--,t.column=M.getLine(t.row).length),T.fromPoints(i,t)}},this.closingBracketBlock=function(M,a,l,r,o){var i={row:l,column:r},t=M.$findOpeningBracket(a,i);if(t)return t.column++,i.column--,T.fromPoints(t,i)}}).call(L.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(R,x,B){"use strict";var T=R("../lib/dom"),L=R("../range").Range,M=R("../config").nls;x.showErrorMarker=function(r,o){var i=r.session,t=r.getCursorPosition(),e=t.row,n=i.widgetManager.getWidgetsAtRow(e).filter(function(C){return"errorMarker"==C.type})[0];n?n.destroy():e-=o;var h,s=function l(r,o,i){var t=r.getAnnotations().sort(L.comparePoints);if(t.length){var e=function a(r,o,i){for(var t=0,e=r.length-1;t<=e;){var n=t+e>>1,s=i(o,r[n]);if(s>0)t=n+1;else{if(!(s<0))return n;e=n-1}}return-(t+1)}(t,{row:o,column:-1},L.comparePoints);e<0&&(e=-e-1),e>=t.length?e=i>0?0:t.length-1:0===e&&i<0&&(e=t.length-1);var n=t[e];if(n&&i){if(n.row===o){do{n=t[e+=i]}while(n&&n.row===o);if(!n)return t.slice()}var s=[];o=n.row;do{s[i<0?"unshift":"push"](n),n=t[e+=i]}while(n&&n.row==o);return s.length&&s}}}(i,e,o);if(s){var d=s[0];t.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,t.row=d.row,h=r.renderer.$gutterLayer.$annotations[t.row]}else{if(n)return;h={displayText:[M("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(t.row),r.selection.moveToPosition(t);var g={row:t.row,fixedWidth:!0,coverGutter:!0,el:T.createElement("div"),type:"errorMarker"},p=g.el.appendChild(T.createElement("div")),b=g.el.appendChild(T.createElement("div"));b.className="error_widget_arrow "+h.className;var y=r.renderer.$cursorLayer.getPixelPosition(t).left;b.style.left=y+r.renderer.gutterWidth-5+"px",g.el.className="error_widget_wrapper",p.className="error_widget "+h.className,h.displayText.forEach(function(C,$){p.appendChild(T.createTextNode(C)),${r.r(I),r.d(I,{DfAppDetailsComponent:()=>P});var i=r(18724),F=r(21406),l=r(78227),g=r(11863),m=r(75066),E=r(91900),v=r(58001),R=r(54342),C=r(68660),p=r(93138),b=r(60368),c=r(42250),_=r(33492),d=r(18331),$=r(453),h=r(54688),A=r(94093),G=r(31147),L=r(98337),x=r(97828),U=r(43015),D=r(52483),k=r(73151),y=r(80972),T=r(56579),B=r(51407),Y=r(15629),M=r(66460),S=r(16994),t=r(1843),K=r(16396),N=r(19206),W=r(10056);r(69099);const w=["rolesInput"];function X(a,n){1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.createApp.applicationName.error")," "))}function J(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.name.getError("server"))," ")}}function V(a,n){if(1&a&&(t.j41(0,"mat-option",35),t.EFF(1),t.k0s()),2&a){const e=n.$implicit;t.Y8G("value",e),t.R7$(1),t.SpI(" ",e.name," ")}}function z(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.defaultRole.getError("server"))," ")}}function H(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.description.getError("server"))," ")}}const Q=function(){return{"word-break":"break-all"}};function Z(a,n){if(1&a){const e=t.RV6();t.j41(0,"mat-card",36)(1,"mat-card-header")(2,"mat-card-subtitle"),t.EFF(3),t.nI1(4,"transloco"),t.k0s()(),t.j41(5,"mat-card-content"),t.EFF(6),t.k0s(),t.j41(7,"mat-card-actions")(8,"button",37),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.copyApiKey())}),t.nrm(9,"fa-icon",38),t.EFF(10),t.nI1(11,"transloco"),t.k0s(),t.j41(12,"button",39),t.bIt("click",function(){t.eBV(e);const s=t.XpG();return t.Njj(s.refreshApiKey())}),t.nrm(13,"fa-icon",38),t.EFF(14),t.nI1(15,"transloco"),t.k0s()()()}if(2&a){const e=t.XpG();t.Aen(t.lJ4(15,Q)),t.R7$(3),t.JRh(t.bMT(4,9,"apps.createApp.apiKey.label")),t.R7$(3),t.SpI(" ",e.editApp.apiKey," "),t.R7$(3),t.Y8G("icon",e.faCopy),t.R7$(1),t.SpI(" ",t.bMT(11,11,"apps.createApp.apiKey.copy")," "),t.R7$(2),t.Y8G("disabled",e.disableKeyRefresh),t.R7$(1),t.Y8G("icon",e.faRefresh),t.R7$(1),t.SpI(" ",t.bMT(15,13,"apps.createApp.apiKey.refresh")," ")}}function q(a,n){if(1&a&&(t.j41(0,"mat-form-field",43)(1,"mat-label"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.j41(4,"mat-select",44)(5,"mat-option",35),t.EFF(6),t.nI1(7,"transloco"),t.k0s(),t.j41(8,"mat-option",35),t.EFF(9),t.nI1(10,"transloco"),t.k0s()(),t.nrm(11,"fa-icon",4),t.nI1(12,"transloco"),t.k0s()),2&a){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,7,"apps.createApp.appLocation.options.fileStorage.storageService.label")),t.R7$(3),t.Y8G("value",3),t.R7$(1),t.SpI(" ",t.bMT(7,9,"apps.createApp.appLocation.options.fileStorage.storageService.options.file")," "),t.R7$(2),t.Y8G("value",4),t.R7$(1),t.SpI(" ",t.bMT(10,11,"apps.createApp.appLocation.options.fileStorage.storageService.options.log")," "),t.R7$(2),t.Y8G("icon",e.faCircleInfo)("matTooltip",t.bMT(12,13,"apps.createApp.appLocation.options.fileStorage.storageService.tooltip"))}}function tt(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG(3);t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.storageContainer.getError("server"))," ")}}function et(a,n){if(1&a&&(t.j41(0,"mat-form-field",43)(1,"mat-label"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.nrm(4,"input",45),t.nI1(5,"transloco"),t.DNE(6,tt,3,3,"mat-error",5),t.nrm(7,"fa-icon",4),t.nI1(8,"transloco"),t.k0s()),2&a){const e=t.XpG(2);t.R7$(2),t.JRh(t.bMT(3,5,"apps.createApp.appLocation.options.fileStorage.storageFolder.label")),t.R7$(2),t.FS9("placeholder",t.bMT(5,7,"apps.createApp.appLocation.options.fileStorage.storageFolder.placeholder")),t.R7$(2),t.Y8G("ngIf",e.appForm.controls.storageContainer.hasError("server")),t.R7$(1),t.Y8G("icon",e.faCircleInfo)("matTooltip",t.bMT(8,9,"apps.createApp.appLocation.options.fileStorage.storageFolder.tooltip"))}}function at(a,n){1&a&&(t.j41(0,"mat-label"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.createApp.appLocation.options.fileStorage.launchPath.label")," "))}function nt(a,n){1&a&&(t.j41(0,"mat-label"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.createApp.appLocation.options.webServer.pathToApp.label")," "))}function ot(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG(3);t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.path.getError("server"))," ")}}function rt(a,n){if(1&a&&(t.j41(0,"mat-form-field",43),t.DNE(1,at,3,3,"mat-label",5),t.DNE(2,nt,3,3,"mat-label",5),t.nrm(3,"input",46),t.nI1(4,"transloco"),t.DNE(5,ot,3,3,"mat-error",5),t.nrm(6,"fa-icon",4),t.nI1(7,"transloco"),t.k0s()),2&a){const e=t.XpG(2);t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","3"===e.appForm.controls.appLocation.value),t.R7$(1),t.FS9("placeholder",t.bMT(4,6,"apps.createApp.appLocation.options.fileStorage.launchPath.placeholder")),t.R7$(2),t.Y8G("ngIf",e.appForm.controls.path.hasError("server")),t.R7$(1),t.Y8G("icon",e.faCircleInfo)("matTooltip",t.bMT(7,8,"apps.createApp.appLocation.options."+("1"===e.appForm.controls.appLocation.value?"fileStorage.launchPath":"webServer.pathToApp")+".tooltip"))}}function it(a,n){if(1&a&&(t.j41(0,"mat-error"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG(3);t.R7$(1),t.SpI(" ",t.bMT(2,1,e.appForm.controls.url.getError("server"))," ")}}function st(a,n){if(1&a&&(t.j41(0,"mat-form-field",43)(1,"mat-label"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.nrm(4,"input",47),t.nI1(5,"transloco"),t.DNE(6,it,3,3,"mat-error",5),t.nrm(7,"fa-icon",4),t.nI1(8,"transloco"),t.k0s()),2&a){const e=t.XpG(2);t.R7$(2),t.SpI(" ",t.bMT(3,5,"apps.createApp.appLocation.options.remoteUrl.label")," "),t.R7$(2),t.FS9("placeholder",t.bMT(5,7,"apps.createApp.appLocation.options.fileStorage.launchPath.placeholder")),t.R7$(2),t.Y8G("ngIf",e.appForm.controls.url.hasError("server")),t.R7$(1),t.Y8G("icon",e.faCircleInfo)("matTooltip",t.bMT(8,9,"apps.createApp.appLocation.options.remoteUrl.url.tooltip"))}}function pt(a,n){if(1&a){const e=t.RV6();t.j41(0,"mat-card",48)(1,"mat-card-header")(2,"mat-card-subtitle"),t.EFF(3),t.nI1(4,"transloco"),t.k0s()(),t.j41(5,"mat-card-content"),t.EFF(6),t.k0s(),t.j41(7,"mat-card-actions")(8,"button",49),t.bIt("click",function(){t.eBV(e);const s=t.XpG(2);return t.Njj(s.copyAppUrl())}),t.nrm(9,"fa-icon",50),t.EFF(10),t.nI1(11,"transloco"),t.k0s()()()}if(2&a){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,4,"apps.createApp.appLocation.options.urlPath.label")),t.R7$(3),t.SpI(" ",e.getAppLocationUrl()," "),t.R7$(3),t.Y8G("icon",e.faCopy),t.R7$(1),t.SpI(" ",t.bMT(11,6,"apps.createApp.appLocation.options.urlPath.copy")," ")}}function lt(a,n){if(1&a&&(t.j41(0,"div",40),t.DNE(1,q,13,15,"mat-form-field",41),t.DNE(2,et,9,11,"mat-form-field",41),t.DNE(3,rt,8,10,"mat-form-field",41),t.DNE(4,st,9,11,"mat-form-field",41),t.DNE(5,pt,12,8,"mat-card",42),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value||"3"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","2"===e.appForm.controls.appLocation.value),t.R7$(1),t.Y8G("ngIf","1"===e.appForm.controls.appLocation.value||"3"===e.appForm.controls.appLocation.value)}}const ct=function(a){return{role:a}};function mt(a,n){if(1&a&&(t.j41(0,"p",51),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a){const e=t.XpG();t.R7$(1),t.SpI(" ",t.i5U(2,1,"apps.metering.reachHintRole",t.eq3(4,ct,null==e.appForm.value.defaultRole?null:e.appForm.value.defaultRole.name))," ")}}function _t(a,n){1&a&&(t.j41(0,"p",51),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.metering.reachHintPending")," "))}const dt=function(a){return{period:a}};function ft(a,n){if(1&a&&(t.j41(0,"div",53)(1,"div",54)(2,"span",55),t.EFF(3),t.k0s(),t.j41(4,"span",56),t.EFF(5),t.nI1(6,"transloco"),t.k0s()(),t.j41(7,"div",57),t.nrm(8,"div",58),t.k0s()()),2&a){const e=n.$implicit;t.HbH("df-meter--"+e.variant),t.R7$(3),t.JRh(e.name),t.R7$(2),t.Lme("",e.label," ",t.i5U(6,7,"apps.metering.perPeriod",t.eq3(10,dt,e.period)),""),t.R7$(3),t.xc7("width",100*e.ratio,"%")}}function ut(a,n){if(1&a&&(t.qex(0),t.DNE(1,ft,9,12,"div",52),t.bVm()),2&a){const e=t.XpG();t.R7$(1),t.Y8G("ngForOf",e.roleLimits)}}function gt(a,n){1&a&&(t.j41(0,"p",51),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.metering.limitsEmpty")," "))}function ht(a,n){if(1&a&&(t.j41(0,"div",61)(1,"div",62)(2,"span",63),t.EFF(3),t.nI1(4,"number"),t.k0s(),t.j41(5,"span",64),t.EFF(6),t.nI1(7,"transloco"),t.k0s()(),t.j41(8,"div",62)(9,"span",63),t.EFF(10),t.nI1(11,"currency"),t.k0s(),t.j41(12,"span",64),t.EFF(13),t.nI1(14,"transloco"),t.k0s()(),t.j41(15,"div",62)(16,"span",63),t.EFF(17),t.nI1(18,"number"),t.k0s(),t.j41(19,"span",64),t.EFF(20),t.nI1(21,"transloco"),t.k0s()()()),2&a){const e=t.XpG(2);t.R7$(3),t.JRh(t.bMT(4,6,e.keyUsage.tokens)),t.R7$(3),t.JRh(t.bMT(7,8,"apps.metering.tokensLabel")),t.R7$(4),t.JRh(t.ii3(11,10,e.keyUsage.spend,"USD","symbol","1.2-2")),t.R7$(3),t.JRh(t.bMT(14,15,"apps.metering.spendLabel")),t.R7$(4),t.JRh(t.bMT(18,17,e.keyUsage.requests)),t.R7$(3),t.JRh(t.bMT(21,19,"apps.metering.requestsLabel"))}}function vt(a,n){1&a&&(t.j41(0,"p",51),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.SpI(" ",t.bMT(2,1,"apps.metering.usageEmpty")," "))}function Mt(a,n){if(1&a&&(t.j41(0,"div",24)(1,"h3"),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.DNE(4,ht,22,21,"div",59),t.DNE(5,vt,3,3,"ng-template",null,60,t.C5r),t.k0s()),2&a){const e=t.sdS(6),o=t.XpG();t.R7$(2),t.JRh(t.bMT(3,3,"apps.metering.usageTitle")),t.R7$(2),t.Y8G("ngIf",o.keyUsage)("ngIfElse",e)}}function It(a,n){1&a&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.JRh(t.bMT(2,1,"save")))}function Et(a,n){1&a&&(t.j41(0,"span"),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&a&&(t.R7$(1),t.JRh(t.bMT(2,1,"create")))}let P=class O{constructor(n,e,o,s,f,u,Rt,Ct,bt){this.fb=n,this.appsService=e,this.limitService=o,this.usageService=s,this.systemConfigDataService=f,this.activatedRoute=u,this.router=Rt,this.themeService=Ct,this.snackbarService=bt,this.roles=[],this.filteredRoles=[],this.trackById=(At,Dt)=>Dt.id,this.faCopy=A.jPR,this.faCircleInfo=A.mEO,this.faRefresh=A.Vpu,this.alertMsg="",this.showAlert=!1,this.alertType="error",this.selectedRoleId=null,this.roleLimits=[],this.keyUsage=null,this.limitsRoute=["/",S.b.API_SECURITY,S.b.RATE_LIMITING],this.allLimits=[],this.isDarkMode=this.themeService.darkMode$,this.urlOrigin=window.location.origin,this.appForm=this.fb.group({name:["",l.k0.required],description:[""],defaultRole:[null],active:[!1],appLocation:["0"],storageServiceId:[3],storageContainer:["applications"],path:[""],url:[""]})}ngOnInit(){this.activatedRoute.data.subscribe(({roles:n,appData:e})=>{this.roles=n.resource||[],this.filteredRoles=n.resource||[],this.editApp=e||null}),this.snackbarService.setSnackbarLastEle(this.editApp.name,!0),this.editApp&&this.appForm.patchValue({name:this.editApp.name,description:this.editApp.description,defaultRole:this.editApp.roleByRoleId,active:this.editApp.isActive,appLocation:`${this.editApp.type}`,storageServiceId:this.editApp.storageServiceId,storageContainer:this.editApp.storageContainer,path:this.editApp.path,url:this.editApp.url}),this.appForm.controls.appLocation.valueChanges.subscribe(n=>{const e=this.appForm.get("path"),o=this.appForm.get("url");"2"===n?(e?.clearValidators(),o?.setValidators([l.k0.required])):"3"===n&&(e?.setValidators([l.k0.required]),o?.clearValidators()),e?.updateValueAndValidity(),o?.updateValueAndValidity()}),this.appForm.controls.storageServiceId.updateValueAndValidity(),this.selectedRoleId=this.editApp?.roleId??null,this.appForm.controls.defaultRole.valueChanges.subscribe(n=>{this.selectedRoleId=n?.id??null,this.recomputeRoleLimits()}),this.loadMetering()}loadMetering(){if(this.limitService.getAll({limit:0,related:"limit_cache_by_limit_id"}).pipe((0,D.W)(()=>(0,k.of)({resource:[],meta:{count:0}}))).subscribe(n=>{this.allLimits=n.resource??[],this.recomputeRoleLimits()}),null!=this.editApp?.id){const n=this.editApp.id;this.usageService.loadAll("30d").pipe((0,D.W)(()=>(0,k.of)(null))).subscribe(e=>{const o=e?.raw.by_app?.find(s=>s.app_id===n);this.keyUsage=o?{tokens:(0,M.n)(o.input_tokens)+(0,M.n)(o.output_tokens),spend:(0,M.n)(o.cost_usd),requests:(0,M.n)(o.requests)}:null})}}recomputeRoleLimits(){const n=this.selectedRoleId;this.roleLimits=null!=n?this.allLimits.filter(e=>e.isActive&&e.roleId===n).map(e=>this.toMeter(e)).filter(e=>null!==e):[]}toMeter(n){const e=n.limitCacheByLimitId?.[0],o=e?.max??n.rate;if(!o||o<=0)return null;const s=e?.attempts??0,f=Math.max(0,Math.min(1,s/o));let u="ok";return f>=.9?u="danger":f>=.75&&(u="warning"),{name:n.name,consumed:s,cap:o,ratio:f,period:n.period,variant:u,label:`${s} / ${o}`}}filter(){const n=this.rolesInput.nativeElement.value.toLowerCase();this.filteredRoles=this.roles.filter(e=>e.name.toLowerCase().includes(n))}displayFn(n){return n&&n.name?n.name:""}getAppLocationUrl(){return`${this.urlOrigin}/\n ${"1"===this.appForm.value.appLocation&&3===this.appForm.value.storageServiceId?"file/":""}\n ${"1"===this.appForm.value.appLocation&&4===this.appForm.value.storageServiceId?"log/":""}\n ${"1"===this.appForm.value.appLocation?this.appForm.value.storageContainer+"/":""}\n ${this.appForm.value.path}`.replaceAll(/\s/g,"")}copyApiKey(){navigator.clipboard.writeText(this.editApp.apiKey).then().catch(n=>console.error(n))}copyAppUrl(){const n=this.getAppLocationUrl();navigator.clipboard.writeText(n).then().catch(e=>console.error(e))}triggerAlert(n,e){this.alertType=n,this.alertMsg=e,this.showAlert=!0}goBack(){this.router.navigate(["../"],{relativeTo:this.activatedRoute})}save(){if(this.appForm.invalid)return;const n={name:this.appForm.value.name,description:this.appForm.value.description,type:this.appForm.value.appLocation,role_id:this.appForm.value.defaultRole?this.appForm.value.defaultRole.id:null,is_active:this.appForm.value.active,url:"2"===this.appForm.value.appLocation?this.appForm.value.url:null,storage_service_id:"1"===this.appForm.value.appLocation?this.appForm.value.storageServiceId:null,storage_container:"1"===this.appForm.value.appLocation?this.appForm.value.storageContainer:null,path:"1"===this.appForm.value.appLocation||"3"===this.appForm.value.appLocation?this.appForm.value.path:null};this.editApp?this.appsService.update(this.editApp.id,n,{snackbarSuccess:"apps.updateSuccess"}).pipe((0,D.W)(e=>{const o=(0,T.cQ)(e);return this.triggerAlert("error",o.message),(0,y.$)(()=>o)})).subscribe(()=>{this.goBack()}):this.appsService.create({resource:[n]},{snackbarSuccess:"apps.createSuccess",fields:"*",related:"role_by_role_id"}).pipe((0,D.W)(e=>{const o=(0,T.cQ)(e),s=(0,T.aI)(this.appForm,o);return this.triggerAlert("error",s.length?s.join(" "):o.message),(0,y.$)(()=>o)})).subscribe(()=>{this.goBack()})}get disableKeyRefresh(){return null===this.editApp.createdById}refreshApiKey(){var n=this;return(0,i.A)(function*(){const e=yield(0,U.X)(n.systemConfigDataService.environment.server.host,n.appForm.getRawValue().name);n.appsService.update(n.editApp.id,{apiKey:e}).subscribe(()=>n.editApp.apiKey=e)})()}static{this.\u0275fac=function(e){return new(e||O)(t.rXU(l.ok),t.rXU(m.u7),t.rXU(m.gu),t.rXU(M.D_),t.rXU(K.f),t.rXU(g.nX),t.rXU(g.Ix),t.rXU(N.n),t.rXU(W.L))}}static{this.\u0275cmp=t.VBU({type:O,selectors:[["df-app-details"]],viewQuery:function(e,o){if(1&e&&t.GBs(w,5),2&e){let s;t.mGM(s=t.lsd())&&(o.rolesInput=s.first)}},standalone:!0,features:[t.aNF],decls:97,vars:95,consts:[[3,"showAlert","alertType","alertClosed"],[1,"details-section",3,"formGroup","ngSubmit"],["subscriptSizing","dynamic","appearance","outline",1,"dynamic-width"],["matInput","","formControlName","name","required","",3,"placeholder"],["matSuffix","",1,"tool-tip-trigger",3,"icon","matTooltip"],[4,"ngIf"],["type","text","placeholder","Pick one","matInput","","formControlName","defaultRole",3,"matAutocomplete","input","focus"],["rolesInput",""],["requireSelection","",3,"displayWith"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["subscriptSizing","dynamic","appearance","outline",1,"full-width"],["rows","1","matInput","","formControlName","description",3,"placeholder"],["formControlName","active","color","primary",1,"full-width"],["class","full-width api-card",3,"style",4,"ngIf"],[1,"flex-col","full-width"],["aria-label","Select an option","formControlName","appLocation",1,"flex-col"],["value","0"],["value","1"],["value","3"],["value","2"],["class","full-width",4,"ngIf"],[1,"metering","full-width"],[1,"metering-head"],[1,"metering-block"],["class","metering-hint",4,"ngIf","ngIfElse"],["noRoleHint",""],[3,"roleId"],[4,"ngIf","ngIfElse"],["noLimits",""],[1,"metering-link",3,"routerLink"],["class","metering-block",4,"ngIf"],[1,"full-width","action-bar"],["mat-flat-button","","type","button",1,"cancel-btn",3,"click"],["mat-flat-button","","color","primary",1,"save-btn"],[3,"value"],[1,"full-width","api-card"],["mat-button","","type","button",1,"copy-btn",3,"click"],[3,"icon"],["mat-button","","type","button",1,"refresh-btn",3,"disabled","click"],[1,"full-width"],["appearance","outline",4,"ngIf"],["class","location-card",4,"ngIf"],["appearance","outline"],["formControlName","storageServiceId","name","defaultRole"],["matInput","","formControlName","storageContainer",3,"placeholder"],["matInput","","formControlName","path",3,"placeholder"],["matInput","","formControlName","url",3,"placeholder"],[1,"location-card"],["mat-button","","type","button",3,"click"],[1,"copy-icon",3,"icon"],[1,"metering-hint"],["class","metering-limit",3,"class",4,"ngFor","ngForOf"],[1,"metering-limit"],[1,"metering-limit-head"],[1,"metering-limit-name"],[1,"metering-limit-rate","df-numeric"],[1,"df-meter-track"],[1,"df-meter-fill"],["class","metering-stats",4,"ngIf","ngIfElse"],["noUsage",""],[1,"metering-stats"],[1,"metering-stat"],[1,"metering-stat-value","df-numeric"],[1,"metering-stat-label"]],template:function(e,o){if(1&e&&(t.j41(0,"div")(1,"df-alert",0),t.bIt("alertClosed",function(){return o.showAlert=!1}),t.EFF(2),t.nI1(3,"transloco"),t.k0s(),t.j41(4,"form",1),t.bIt("ngSubmit",function(){return o.save()}),t.j41(5,"mat-form-field",2)(6,"mat-label"),t.EFF(7),t.nI1(8,"transloco"),t.k0s(),t.nrm(9,"input",3),t.nI1(10,"transloco"),t.nrm(11,"fa-icon",4),t.nI1(12,"transloco"),t.DNE(13,X,3,3,"mat-error",5),t.DNE(14,J,3,3,"mat-error",5),t.k0s(),t.j41(15,"mat-form-field",2)(16,"mat-label"),t.EFF(17),t.nI1(18,"transloco"),t.k0s(),t.j41(19,"input",6,7),t.bIt("input",function(){return o.filter()})("focus",function(){return o.filter()}),t.k0s(),t.nrm(21,"fa-icon",4),t.nI1(22,"transloco"),t.j41(23,"mat-autocomplete",8,9),t.DNE(25,V,2,2,"mat-option",10),t.k0s(),t.DNE(26,z,3,3,"mat-error",5),t.j41(27,"mat-hint"),t.EFF(28),t.nI1(29,"transloco"),t.k0s()(),t.j41(30,"mat-form-field",11)(31,"mat-label"),t.EFF(32),t.nI1(33,"transloco"),t.k0s(),t.nrm(34,"textarea",12),t.nI1(35,"transloco"),t.DNE(36,H,3,3,"mat-error",5),t.nrm(37,"fa-icon",4),t.nI1(38,"transloco"),t.k0s(),t.j41(39,"mat-slide-toggle",13),t.EFF(40),t.nI1(41,"transloco"),t.k0s(),t.DNE(42,Z,16,16,"mat-card",14),t.j41(43,"div",15)(44,"p"),t.EFF(45),t.nI1(46,"transloco"),t.nrm(47,"fa-icon",4),t.nI1(48,"transloco"),t.k0s(),t.j41(49,"mat-radio-group",16)(50,"mat-radio-button",17),t.EFF(51),t.nI1(52,"transloco"),t.k0s(),t.j41(53,"mat-radio-button",18),t.EFF(54),t.nI1(55,"transloco"),t.k0s(),t.j41(56,"mat-radio-button",19),t.EFF(57),t.nI1(58,"transloco"),t.k0s(),t.j41(59,"mat-radio-button",20),t.EFF(60),t.nI1(61,"transloco"),t.k0s()()(),t.DNE(62,lt,6,5,"div",21),t.j41(63,"section",22)(64,"header",23)(65,"h2"),t.EFF(66),t.nI1(67,"transloco"),t.k0s(),t.j41(68,"p"),t.EFF(69),t.nI1(70,"transloco"),t.k0s()(),t.j41(71,"div",24)(72,"h3"),t.EFF(73),t.nI1(74,"transloco"),t.k0s(),t.DNE(75,mt,3,6,"p",25),t.DNE(76,_t,3,3,"ng-template",null,26,t.C5r),t.nrm(78,"df-scope-map",27),t.k0s(),t.j41(79,"div",24)(80,"h3"),t.EFF(81),t.nI1(82,"transloco"),t.k0s(),t.DNE(83,ut,2,1,"ng-container",28),t.DNE(84,gt,3,3,"ng-template",null,29,t.C5r),t.j41(86,"a",30),t.EFF(87),t.nI1(88,"transloco"),t.k0s()(),t.DNE(89,Mt,7,5,"div",31),t.k0s(),t.j41(90,"div",32)(91,"button",33),t.bIt("click",function(){return o.goBack()}),t.EFF(92),t.nI1(93,"transloco"),t.k0s(),t.j41(94,"button",34),t.DNE(95,It,3,3,"span",5),t.DNE(96,Et,3,3,"span",5),t.k0s()()()()),2&e){const s=t.sdS(24),f=t.sdS(77),u=t.sdS(85);t.R7$(1),t.Y8G("showAlert",o.showAlert)("alertType",o.alertType),t.R7$(1),t.SpI(" ",t.bMT(3,49,o.alertMsg)," "),t.R7$(2),t.Y8G("formGroup",o.appForm),t.R7$(3),t.SpI(" ",t.bMT(8,51,"apps.createApp.applicationName.label")," "),t.R7$(2),t.FS9("placeholder",t.bMT(10,53,"apps.createApp.applicationName.label")),t.R7$(2),t.Y8G("icon",o.faCircleInfo)("matTooltip",t.bMT(12,55,"apps.createApp.applicationName.tooltip")),t.R7$(2),t.Y8G("ngIf",o.appForm.controls.name.hasError("required")),t.R7$(1),t.Y8G("ngIf",o.appForm.controls.name.hasError("server")),t.R7$(3),t.JRh(t.bMT(18,57,"apps.createApp.defaultRole.label")),t.R7$(2),t.Y8G("matAutocomplete",s),t.R7$(2),t.Y8G("icon",o.faCircleInfo)("matTooltip",t.bMT(22,59,"apps.createApp.defaultRole.tooltip")),t.R7$(2),t.Y8G("displayWith",o.displayFn),t.R7$(2),t.Y8G("ngForOf",o.filteredRoles)("ngForTrackBy",o.trackById),t.R7$(1),t.Y8G("ngIf",o.appForm.controls.defaultRole.hasError("server")),t.R7$(2),t.JRh(t.bMT(29,61,"apps.createApp.defaultRole.hint")),t.R7$(4),t.JRh(t.bMT(33,63,"apps.createApp.description.label")),t.R7$(2),t.FS9("placeholder",t.bMT(35,65,"apps.createApp.description.label")),t.R7$(2),t.Y8G("ngIf",o.appForm.controls.description.hasError("server")),t.R7$(1),t.Y8G("icon",o.faCircleInfo)("matTooltip",t.bMT(38,67,"apps.createApp.description.tooltip")),t.R7$(3),t.JRh(t.bMT(41,69,"apps.createApp.active")),t.R7$(2),t.Y8G("ngIf",o.editApp),t.R7$(3),t.SpI(" ",t.bMT(46,71,"apps.createApp.appLocation.label"),""),t.R7$(2),t.Y8G("icon",o.faCircleInfo)("matTooltip",t.bMT(48,73,"apps.createApp.appLocation.tooltip")),t.R7$(4),t.JRh(t.bMT(52,75,"apps.createApp.appLocation.options.noStorage")),t.R7$(3),t.JRh(t.bMT(55,77,"apps.createApp.appLocation.options.fileStorage.label")),t.R7$(3),t.JRh(t.bMT(58,79,"apps.createApp.appLocation.options.webServer.label")),t.R7$(3),t.JRh(t.bMT(61,81,"apps.createApp.appLocation.options.remoteUrl.label")),t.R7$(2),t.Y8G("ngIf","1"===o.appForm.controls.appLocation.value||"2"===o.appForm.controls.appLocation.value||"3"===o.appForm.controls.appLocation.value),t.R7$(4),t.JRh(t.bMT(67,83,"apps.metering.title")),t.R7$(3),t.JRh(t.bMT(70,85,"apps.metering.subtitle")),t.R7$(4),t.JRh(t.bMT(74,87,"apps.metering.reachTitle")),t.R7$(2),t.Y8G("ngIf",null!==o.selectedRoleId)("ngIfElse",f),t.R7$(3),t.Y8G("roleId",o.selectedRoleId),t.R7$(3),t.JRh(t.bMT(82,89,"apps.metering.limitsTitle")),t.R7$(2),t.Y8G("ngIf",o.roleLimits.length)("ngIfElse",u),t.R7$(3),t.Y8G("routerLink",o.limitsRoute),t.R7$(1),t.SpI(" ",t.bMT(88,91,"apps.metering.limitsManage")," "),t.R7$(2),t.Y8G("ngIf",o.editApp),t.R7$(3),t.SpI(" ",t.bMT(93,93,"cancel")," "),t.R7$(3),t.Y8G("ngIf",o.editApp),t.R7$(1),t.Y8G("ngIf",!o.editApp)}},dependencies:[l.X1,l.qT,l.me,l.BC,l.cb,l.YS,l.j4,l.JD,h.RG,h.rl,h.nJ,h.MV,h.TL,h.yw,$.fS,$.fg,d.bT,_.jL,_.$3,c.wT,_.pN,d.pM,c.Sy,b.mV,b.sG,p.Hu,p.RN,p.YY,p.m2,p.MM,p.Lc,C.Hl,C.$z,R.dX,R.aY,v.Wk,v.VT,v._g,E.Ve,E.VO,G.Kj,L.uc,L.oV,B.W,Y.A,d.QX,d.oe,g.Wk],styles:["mat-card[_ngcontent-%COMP%]{word-wrap:break-word}.api-card[_ngcontent-%COMP%], .location-card[_ngcontent-%COMP%]{background-color:var(--df-surface-2);border:1px solid var(--df-border-2);border-radius:var(--df-radius);box-shadow:none}.api-card[_ngcontent-%COMP%] mat-card-subtitle[_ngcontent-%COMP%], .location-card[_ngcontent-%COMP%] mat-card-subtitle[_ngcontent-%COMP%]{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.api-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%], .location-card[_ngcontent-%COMP%] mat-card-content[_ngcontent-%COMP%]{font-family:SFMono-Regular,Menlo,Consolas,monospace;font-size:1.3rem;color:var(--df-text)}.api-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .location-card[_ngcontent-%COMP%] mat-card-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{color:var(--df-accent)}.action-bar[_ngcontent-%COMP%]{display:flex;justify-content:flex-end}.metering[_ngcontent-%COMP%]{margin-top:var(--df-space-6);padding-top:var(--df-space-5);border-top:1px solid var(--df-border-2);display:flex;flex-direction:column;gap:var(--df-space-5)}.metering[_ngcontent-%COMP%] .metering-head[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{margin:0;font-size:1.6rem;font-weight:600;color:var(--df-text)}.metering[_ngcontent-%COMP%] .metering-head[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:var(--df-space-1) 0 0;font-size:1.3rem;color:var(--df-text-muted)}.metering[_ngcontent-%COMP%] .metering-block[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2)}.metering[_ngcontent-%COMP%] .metering-block[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}.metering[_ngcontent-%COMP%] .metering-hint[_ngcontent-%COMP%]{margin:0;font-size:1.3rem;color:var(--df-text-muted)}.metering[_ngcontent-%COMP%] .metering-link[_ngcontent-%COMP%]{align-self:flex-start;font-size:1.3rem;color:var(--df-accent);text-decoration:none}.metering[_ngcontent-%COMP%] .metering-link[_ngcontent-%COMP%]:hover{text-decoration:underline}.metering-limit[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1);padding:var(--df-space-2) 0}.metering-limit[_ngcontent-%COMP%] .metering-limit-head[_ngcontent-%COMP%]{display:flex;justify-content:space-between;gap:var(--df-space-3);font-size:1.3rem}.metering-limit[_ngcontent-%COMP%] .metering-limit-name[_ngcontent-%COMP%]{color:var(--df-text);font-weight:500}.metering-limit[_ngcontent-%COMP%] .metering-limit-rate[_ngcontent-%COMP%]{color:var(--df-text-muted);white-space:nowrap}.df-meter-track[_ngcontent-%COMP%]{position:relative;height:.6rem;border-radius:var(--df-radius-sm);background:var(--df-surface-2);border:1px solid var(--df-border);overflow:hidden}.df-meter-fill[_ngcontent-%COMP%]{height:100%;border-radius:inherit;background:var(--df-accent);transition:width .24s ease}.df-meter--warning[_ngcontent-%COMP%] .df-meter-fill[_ngcontent-%COMP%]{background:var(--df-warning)}.df-meter--warning[_ngcontent-%COMP%] .metering-limit-rate[_ngcontent-%COMP%]{color:var(--df-warning)}.df-meter--danger[_ngcontent-%COMP%] .df-meter-fill[_ngcontent-%COMP%]{background:var(--df-danger)}.df-meter--danger[_ngcontent-%COMP%] .metering-limit-rate[_ngcontent-%COMP%]{color:var(--df-danger)}.metering-stats[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:var(--df-space-6)}.metering-stat[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-1)}.metering-stat[_ngcontent-%COMP%] .metering-stat-value[_ngcontent-%COMP%]{font-size:2rem;font-weight:600;color:var(--df-text)}.metering-stat[_ngcontent-%COMP%] .metering-stat-label[_ngcontent-%COMP%]{font-size:1.1rem;text-transform:uppercase;letter-spacing:.06em;color:var(--df-text-muted)}"]})}};P=(0,F.Cg)([(0,x.d)({checkProperties:!0})],P)},51407:(j,I,r)=>{r.d(I,{W:()=>C});var i=r(1843),F=r(18331),l=r(68660),g=r(54342),m=r(94093);function E(p,b){if(1&p){const c=i.RV6();i.j41(0,"button",5),i.bIt("click",function(){i.eBV(c);const d=i.XpG(2);return i.Njj(d.dismissAlert())}),i.j41(1,"fa-icon",6),i.EFF(2),i.k0s()()}if(2&p){const c=i.XpG(2);i.R7$(1),i.Y8G("icon",c.faXmark),i.R7$(1),i.JRh("alerts.close")}}function v(p,b){if(1&p&&(i.j41(0,"div",1),i.nrm(1,"fa-icon",2),i.j41(2,"span",3),i.SdG(3),i.k0s(),i.DNE(4,E,3,2,"button",4),i.k0s()),2&p){const c=i.XpG();i.HbH(c.alertType),i.R7$(1),i.Y8G("icon",c.icon),i.R7$(3),i.Y8G("ngIf",c.dismissible)}}const R=["*"];let C=(()=>{class p{constructor(){this.alertType="success",this.showAlert=!1,this.dismissible=!0,this.alertClosed=new i.bkB,this.faXmark=m.Jyw}dismissAlert(){this.alertClosed.emit()}get icon(){switch(this.alertType){case"success":return m.SGM;case"error":return m.rfe;case"warning":return m.tUE;default:return m.iW_}}static{this.\u0275fac=function(_){return new(_||p)}}static{this.\u0275cmp=i.VBU({type:p,selectors:[["df-alert"]],inputs:{alertType:"alertType",showAlert:"showAlert",dismissible:"dismissible"},outputs:{alertClosed:"alertClosed"},standalone:!0,features:[i.aNF],ngContentSelectors:R,decls:1,vars:1,consts:[["class","alert-container",3,"class",4,"ngIf"],[1,"alert-container"],["aria-hidden","true",1,"alert-icon",3,"icon"],["role","alert",1,"alert-message"],["mat-icon-button","","class","dismiss-alert",3,"click",4,"ngIf"],["mat-icon-button","",1,"dismiss-alert",3,"click"],[3,"icon"]],template:function(_,d){1&_&&(i.NAR(),i.DNE(0,v,5,4,"div",0)),2&_&&i.Y8G("ngIf",d.showAlert)},dependencies:[F.bT,l.Hl,l.iY,g.dX,g.aY],styles:[".alert-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--df-surface);color:var(--df-text);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);font-size:1.4rem}.alert-container[_ngcontent-%COMP%] .alert-message[_ngcontent-%COMP%]{flex:1;padding:8px}.alert-container[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{padding:0 10px}.alert-container.success[_ngcontent-%COMP%]{border-color:var(--df-success-border)}.alert-container.success[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-success)}.alert-container.error[_ngcontent-%COMP%]{border-color:var(--df-danger-border)}.alert-container.error[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-danger)}.alert-container.warning[_ngcontent-%COMP%]{border-color:var(--df-warning, var(--df-danger-border))}.alert-container.warning[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-warning, var(--df-danger))}.alert-container.info[_ngcontent-%COMP%] .alert-icon[_ngcontent-%COMP%]{color:var(--df-accent)}"]})}}return p})()}}]); \ No newline at end of file diff --git a/dist/3357.8880ce34ee7d0627.js b/dist/3357.8880ce34ee7d0627.js new file mode 100644 index 00000000..0a5284df --- /dev/null +++ b/dist/3357.8880ce34ee7d0627.js @@ -0,0 +1 @@ +(self.webpackChunkdf_admin_interface=self.webpackChunkdf_admin_interface||[]).push([[3357],{22571:(v,A)=>{"use strict";A.J=void 0;var c=/^([^\w]*)(javascript|data|vbscript)/im,p=/&#(\w+)(^\w|;)?/g,y=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,E=/^([^:]+):/gm,b=[".","/"];A.J=function F(U){var W=function R(U){return U.replace(p,function(W,H){return String.fromCharCode(H)})}(U||"").replace(y,"").trim();if(!W)return"about:blank";if(function w(U){return b.indexOf(U[0])>-1}(W))return W;var H=W.match(E);return H&&c.test(H[0])?"about:blank":W}},93357:(v,A,n)=>{"use strict";n.r(A),n.d(A,{DfApiDocsComponent:()=>xg,absolutizeServers:()=>Vy});var c={};n.r(c),n.d(c,{JsonPatchError:()=>zi,_areEquals:()=>Xl,applyOperation:()=>Jl,applyPatch:()=>Ks,applyReducer:()=>Od,deepClone:()=>$p,getValueByPointer:()=>Yl,validate:()=>Td,validator:()=>Zu});var p={};n.r(p),n.d(p,{compare:()=>Jh,generate:()=>Qu,observe:()=>Rd,unobserve:()=>Yh});var y={};n.r(y),n.d(y,{cookie:()=>ux,header:()=>lx,path:()=>ix,query:()=>ax});var E=n(31635),b=n(10467),w=n(91395),R=n(20039);function F(e){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function W(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=function be(e,t){return function(r){if("string"==typeof r)return(0,R.is)(t[r],e[r]);if(Array.isArray(r))return(0,R.is)(ye(t,r),ye(e,r));throw new TypeError("Invalid key: expected Array or string: "+r)}}(t,r),i=e||Object.keys(function te(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return!ae(this.updateOnProps,this.props,o,"updateOnProps")||!ae(this.updateOnStates,this.state,i,"updateOnStates")}}]),t}(w.Component);const Ge=De;function kt(e,t){if(Array.prototype.indexOf)return e.indexOf(t);for(var r=0,o=e.length;r=0;r--)!0===t(e[r])&&e.splice(r,1)}function tt(e){throw new Error("Unhandled case for value: '".concat(e,"'"))}var r,bt=function(){function e(t){void 0===t&&(t={}),this.tagName="",this.attrs={},this.innerHTML="",this.whitespaceRegex=/\s+/,this.tagName=t.tagName||"",this.attrs=t.attrs||{},this.innerHTML=t.innerHtml||t.innerHTML||""}return e.prototype.setTagName=function(t){return this.tagName=t,this},e.prototype.getTagName=function(){return this.tagName||""},e.prototype.setAttr=function(t,r){return this.getAttrs()[t]=r,this},e.prototype.getAttr=function(t){return this.getAttrs()[t]},e.prototype.setAttrs=function(t){return Object.assign(this.getAttrs(),t),this},e.prototype.getAttrs=function(){return this.attrs||(this.attrs={})},e.prototype.setClass=function(t){return this.setAttr("class",t)},e.prototype.addClass=function(t){for(var u,r=this.getClass(),o=this.whitespaceRegex,i=r?r.split(o):[],s=t.split(o);u=s.shift();)-1===kt(i,u)&&i.push(u);return this.getAttrs().class=i.join(" "),this},e.prototype.removeClass=function(t){for(var u,r=this.getClass(),o=this.whitespaceRegex,i=r?r.split(o):[],s=t.split(o);i.length&&(u=s.shift());){var f=kt(i,u);-1!==f&&i.splice(f,1)}return this.getAttrs().class=i.join(" "),this},e.prototype.getClass=function(){return this.getAttrs().class||""},e.prototype.hasClass=function(t){return-1!==(" "+this.getClass()+" ").indexOf(" "+t+" ")},e.prototype.setInnerHTML=function(t){return this.innerHTML=t,this},e.prototype.setInnerHtml=function(t){return this.setInnerHTML(t)},e.prototype.getInnerHTML=function(){return this.innerHTML||""},e.prototype.getInnerHtml=function(){return this.getInnerHTML()},e.prototype.toAnchorString=function(){var t=this.getTagName(),r=this.buildAttrsStr();return["<",t,r=r?" "+r:"",">",this.getInnerHtml(),""].join("")},e.prototype.buildAttrsStr=function(){if(!this.attrs)return"";var t=this.getAttrs(),r=[];for(var o in t)t.hasOwnProperty(o)&&r.push(o+'="'+t[o]+'"');return r.join(" ")},e}(),Gt=function(){function e(t){void 0===t&&(t={}),this.newWindow=!1,this.truncate={},this.className="",this.newWindow=t.newWindow||!1,this.truncate=t.truncate||{},this.className=t.className||""}return e.prototype.build=function(t){return new bt({tagName:"a",attrs:this.createAttrs(t),innerHtml:this.processAnchorText(t.getAnchorText())})},e.prototype.createAttrs=function(t){var r={href:t.getAnchorHref()},o=this.createCssClass(t);return o&&(r.class=o),this.newWindow&&(r.target="_blank",r.rel="noopener noreferrer"),this.truncate&&this.truncate.length&&this.truncate.length=m)return S.host.length==t?(S.host.substr(0,t-i)+r).substr(0,m+o):f(I,m).substr(0,m+o);var P="";if(S.path&&(P+="/"+S.path),S.query&&(P+="?"+S.query),P){if((I+P).length>=m)return(I+P).length==t?(I+P).substr(0,t):(I+f(P,m-I.length)).substr(0,m+o);I+=P}if(S.fragment){var M="#"+S.fragment;if((I+M).length>=m)return(I+M).length==t?(I+M).substr(0,t):(I+f(M,m-I.length)).substr(0,m+o);I+=M}if(S.scheme&&S.host){var D=S.scheme+"://";if((I+D).length0&&(L=I.substr(-1*Math.floor(m/2))),(I.substr(0,Math.ceil(m/2))+r+L).substr(0,m+o)}(t,o):"middle"===i?function Nt(e,t,r){if(e.length<=t)return e;var o,i;null==r?(r="…",o=8,i=3):(o=r.length,i=r.length);var s=t-i,u="";return s>0&&(u=e.substr(-1*Math.floor(s/2))),(e.substr(0,Math.ceil(s/2))+r+u).substr(0,s+o)}(t,o):function Bt(e,t,r){return function Qe(e,t,r){var o;return e.length>t&&(null==r?(r="…",o=3):o=r.length,e=e.substring(0,t-o)+r),e}(e,t,r)}(t,o)},e}(),Jt=function(){function e(t){this.__jsduckDummyDocProp=null,this.matchedText="",this.offset=0,this.tagBuilder=t.tagBuilder,this.matchedText=t.matchedText,this.offset=t.offset}return e.prototype.getMatchedText=function(){return this.matchedText},e.prototype.setOffset=function(t){this.offset=t},e.prototype.getOffset=function(){return this.offset},e.prototype.getCssClassSuffixes=function(){return[this.getType()]},e.prototype.buildTag=function(){return this.tagBuilder.build(this)},e}(),lr=function(e){function t(r){var o=e.call(this,r)||this;return o.email="",o.email=r.email,o}return(0,E.C6)(t,e),t.prototype.getType=function(){return"email"},t.prototype.getEmail=function(){return this.email},t.prototype.getAnchorHref=function(){return"mailto:"+this.email},t.prototype.getAnchorText=function(){return this.email},t}(Jt),Cn=function(e){function t(r){var o=e.call(this,r)||this;return o.serviceName="",o.hashtag="",o.serviceName=r.serviceName,o.hashtag=r.hashtag,o}return(0,E.C6)(t,e),t.prototype.getType=function(){return"hashtag"},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getHashtag=function(){return this.hashtag},t.prototype.getAnchorHref=function(){var r=this.serviceName,o=this.hashtag;switch(r){case"twitter":return"https://twitter.com/hashtag/"+o;case"facebook":return"https://www.facebook.com/hashtag/"+o;case"instagram":return"https://instagram.com/explore/tags/"+o;case"tiktok":return"https://www.tiktok.com/tag/"+o;default:throw new Error("Unknown service name to point hashtag to: "+r)}},t.prototype.getAnchorText=function(){return"#"+this.hashtag},t}(Jt),Ln=function(e){function t(r){var o=e.call(this,r)||this;return o.serviceName="twitter",o.mention="",o.mention=r.mention,o.serviceName=r.serviceName,o}return(0,E.C6)(t,e),t.prototype.getType=function(){return"mention"},t.prototype.getMention=function(){return this.mention},t.prototype.getServiceName=function(){return this.serviceName},t.prototype.getAnchorHref=function(){switch(this.serviceName){case"twitter":return"https://twitter.com/"+this.mention;case"instagram":return"https://instagram.com/"+this.mention;case"soundcloud":return"https://soundcloud.com/"+this.mention;case"tiktok":return"https://www.tiktok.com/@"+this.mention;default:throw new Error("Unknown service name to point mention to: "+this.serviceName)}},t.prototype.getAnchorText=function(){return"@"+this.mention},t.prototype.getCssClassSuffixes=function(){var r=e.prototype.getCssClassSuffixes.call(this),o=this.getServiceName();return o&&r.push(o),r},t}(Jt),Rn=function(e){function t(r){var o=e.call(this,r)||this;return o.number="",o.plusSign=!1,o.number=r.number,o.plusSign=r.plusSign,o}return(0,E.C6)(t,e),t.prototype.getType=function(){return"phone"},t.prototype.getPhoneNumber=function(){return this.number},t.prototype.getNumber=function(){return this.getPhoneNumber()},t.prototype.getAnchorHref=function(){return"tel:"+(this.plusSign?"+":"")+this.number},t.prototype.getAnchorText=function(){return this.matchedText},t}(Jt),lo=function(e){function t(r){var o=e.call(this,r)||this;return o.url="",o.urlMatchType="scheme",o.protocolUrlMatch=!1,o.protocolRelativeMatch=!1,o.stripPrefix={scheme:!0,www:!0},o.stripTrailingSlash=!0,o.decodePercentEncoding=!0,o.schemePrefixRegex=/^(https?:\/\/)?/i,o.wwwPrefixRegex=/^(https?:\/\/)?(www\.)?/i,o.protocolRelativeRegex=/^\/\//,o.protocolPrepended=!1,o.urlMatchType=r.urlMatchType,o.url=r.url,o.protocolUrlMatch=r.protocolUrlMatch,o.protocolRelativeMatch=r.protocolRelativeMatch,o.stripPrefix=r.stripPrefix,o.stripTrailingSlash=r.stripTrailingSlash,o.decodePercentEncoding=r.decodePercentEncoding,o}return(0,E.C6)(t,e),t.prototype.getType=function(){return"url"},t.prototype.getUrlMatchType=function(){return this.urlMatchType},t.prototype.getUrl=function(){var r=this.url;return!this.protocolRelativeMatch&&!this.protocolUrlMatch&&!this.protocolPrepended&&(r=this.url="http://"+r,this.protocolPrepended=!0),r},t.prototype.getAnchorHref=function(){return this.getUrl().replace(/&/g,"&")},t.prototype.getAnchorText=function(){var r=this.getMatchedText();return this.protocolRelativeMatch&&(r=this.stripProtocolRelativePrefix(r)),this.stripPrefix.scheme&&(r=this.stripSchemePrefix(r)),this.stripPrefix.www&&(r=this.stripWwwPrefix(r)),this.stripTrailingSlash&&(r=this.removeTrailingSlash(r)),this.decodePercentEncoding&&(r=this.removePercentEncoding(r)),r},t.prototype.stripSchemePrefix=function(r){return r.replace(this.schemePrefixRegex,"")},t.prototype.stripWwwPrefix=function(r){return r.replace(this.wwwPrefixRegex,"$1")},t.prototype.stripProtocolRelativePrefix=function(r){return r.replace(this.protocolRelativeRegex,"")},t.prototype.removeTrailingSlash=function(r){return"/"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),r},t.prototype.removePercentEncoding=function(r){var o=r.replace(/%22/gi,""").replace(/%26/gi,"&").replace(/%27/gi,"'").replace(/%3C/gi,"<").replace(/%3E/gi,">");try{return decodeURIComponent(o)}catch{return o}},t}(Jt),Pn=function e(t){this.__jsduckDummyDocProp=null,this.tagBuilder=t.tagBuilder},Dn=/[A-Za-z]/,Ao=/[\d]/,Mo=/[\D]/,Mr=/\s/,mo=/['"]/,Gr=/[\x00-\x1F\x7F]/,_o=/A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u08B6-\u08BD\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AE\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC/.source,dr=_o+/\u2700-\u27bf\udde6-\uddff\ud800-\udbff\udc00-\udfff\ufe0e\ufe0f\u0300-\u036f\ufe20-\ufe23\u20d0-\u20f0\ud83c\udffb-\udfff\u200d\u3299\u3297\u303d\u3030\u24c2\ud83c\udd70-\udd71\udd7e-\udd7f\udd8e\udd91-\udd9a\udde6-\uddff\ude01-\ude02\ude1a\ude2f\ude32-\ude3a\ude50-\ude51\u203c\u2049\u25aa-\u25ab\u25b6\u25c0\u25fb-\u25fe\u00a9\u00ae\u2122\u2139\udc04\u2600-\u26FF\u2b05\u2b06\u2b07\u2b1b\u2b1c\u2b50\u2b55\u231a\u231b\u2328\u23cf\u23e9-\u23f3\u23f8-\u23fa\udccf\u2935\u2934\u2190-\u21ff/.source+/\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D4-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F/.source,rr=/0-9\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0BE6-\u0BEF\u0C66-\u0C6F\u0CE6-\u0CEF\u0D66-\u0D6F\u0DE6-\u0DEF\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F29\u1040-\u1049\u1090-\u1099\u17E0-\u17E9\u1810-\u1819\u1946-\u194F\u19D0-\u19D9\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\uA620-\uA629\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uA9F0-\uA9F9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19/.source,Or=dr+rr,Rt=dr+rr,Sr=new RegExp("[".concat(Rt,"]")),En="(?:["+rr+"]{1,3}\\.){3}["+rr+"]{1,3}",rn="["+Rt+"](?:["+Rt+"\\-_]{0,61}["+Rt+"])?",nn=function(e){return"(?=("+rn+"))\\"+e},po=function(e){return"(?:"+nn(e)+"(?:\\."+nn(e+1)+"){0,126}|"+En+")"},Nr=(new RegExp("["+Rt+".\\-]*["+Rt+"\\-]"),Sr),wr=/(?:xn--vermgensberatung-pwb|xn--vermgensberater-ctb|xn--clchc0ea0b2g2a9gcd|xn--w4r85el8fhu5dnra|northwesternmutual|travelersinsurance|verm\xf6gensberatung|xn--5su34j936bgsg|xn--bck1b9a5dre4c|xn--mgbah1a3hjkrd|xn--mgbai9azgqp6j|xn--mgberp4a5d4ar|xn--xkc2dl3a5ee0h|verm\xf6gensberater|xn--fzys8d69uvgm|xn--mgba7c0bbn0a|xn--mgbcpq6gpa1a|xn--xkc2al3hye2a|americanexpress|kerryproperties|sandvikcoromant|xn--i1b6b1a6a2e|xn--kcrx77d1x4a|xn--lgbbat1ad8j|xn--mgba3a4f16a|xn--mgbaakc7dvf|xn--mgbc0a9azcg|xn--nqv7fs00ema|americanfamily|bananarepublic|cancerresearch|cookingchannel|kerrylogistics|weatherchannel|xn--54b7fta0cc|xn--6qq986b3xl|xn--80aqecdr1a|xn--b4w605ferd|xn--fiq228c5hs|xn--h2breg3eve|xn--jlq480n2rg|xn--jlq61u9w7b|xn--mgba3a3ejt|xn--mgbaam7a8h|xn--mgbayh7gpa|xn--mgbbh1a71e|xn--mgbca7dzdo|xn--mgbi4ecexp|xn--mgbx4cd0ab|xn--rvc1e0am3e|international|lifeinsurance|travelchannel|wolterskluwer|xn--cckwcxetd|xn--eckvdtc9d|xn--fpcrj9c3d|xn--fzc2c9e2c|xn--h2brj9c8c|xn--tiq49xqyj|xn--yfro4i67o|xn--ygbi2ammx|construction|lplfinancial|scholarships|versicherung|xn--3e0b707e|xn--45br5cyl|xn--4dbrk0ce|xn--80adxhks|xn--80asehdb|xn--8y0a063a|xn--gckr3f0f|xn--mgb9awbf|xn--mgbab2bd|xn--mgbgu82a|xn--mgbpl2fh|xn--mgbt3dhd|xn--mk1bu44c|xn--ngbc5azd|xn--ngbe9e0a|xn--ogbpf8fl|xn--qcka1pmc|accountants|barclaycard|blackfriday|blockbuster|bridgestone|calvinklein|contractors|creditunion|engineering|enterprises|foodnetwork|investments|kerryhotels|lamborghini|motorcycles|olayangroup|photography|playstation|productions|progressive|redumbrella|williamhill|xn--11b4c3d|xn--1ck2e1b|xn--1qqw23a|xn--2scrj9c|xn--3bst00m|xn--3ds443g|xn--3hcrj9c|xn--42c2d9a|xn--45brj9c|xn--55qw42g|xn--6frz82g|xn--80ao21a|xn--9krt00a|xn--cck2b3b|xn--czr694b|xn--d1acj3b|xn--efvy88h|xn--fct429k|xn--fjq720a|xn--flw351e|xn--g2xx48c|xn--gecrj9c|xn--gk3at1e|xn--h2brj9c|xn--hxt814e|xn--imr513n|xn--j6w193g|xn--jvr189m|xn--kprw13d|xn--kpry57d|xn--mgbbh1a|xn--mgbtx2b|xn--mix891f|xn--nyqy26a|xn--otu796d|xn--pgbs0dh|xn--q9jyb4c|xn--rhqv96g|xn--rovu88b|xn--s9brj9c|xn--ses554g|xn--t60b56a|xn--vuq861b|xn--w4rs40l|xn--xhq521b|xn--zfr164b|\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd|accountant|apartments|associates|basketball|bnpparibas|boehringer|capitalone|consulting|creditcard|cuisinella|eurovision|extraspace|foundation|healthcare|immobilien|industries|management|mitsubishi|nextdirect|properties|protection|prudential|realestate|republican|restaurant|schaeffler|tatamotors|technology|university|vlaanderen|volkswagen|xn--30rr7y|xn--3pxu8k|xn--45q11c|xn--4gbrim|xn--55qx5d|xn--5tzm5g|xn--80aswg|xn--90a3ac|xn--9dbq2a|xn--9et52u|xn--c2br7g|xn--cg4bki|xn--czrs0t|xn--czru2d|xn--fiq64b|xn--fiqs8s|xn--fiqz9s|xn--io0a7i|xn--kput3i|xn--mxtq1m|xn--o3cw4h|xn--pssy2u|xn--q7ce6a|xn--unup4y|xn--wgbh1c|xn--wgbl6a|xn--y9a3aq|accenture|alfaromeo|allfinanz|amsterdam|analytics|aquarelle|barcelona|bloomberg|christmas|community|directory|education|equipment|fairwinds|financial|firestone|fresenius|frontdoor|furniture|goldpoint|hisamitsu|homedepot|homegoods|homesense|institute|insurance|kuokgroup|lancaster|landrover|lifestyle|marketing|marshalls|melbourne|microsoft|panasonic|passagens|pramerica|richardli|shangrila|solutions|statebank|statefarm|stockholm|travelers|vacations|xn--90ais|xn--c1avg|xn--d1alf|xn--e1a4c|xn--fhbei|xn--j1aef|xn--j1amh|xn--l1acc|xn--ngbrx|xn--nqv7f|xn--p1acf|xn--qxa6a|xn--tckwe|xn--vhquv|yodobashi|\u0645\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u0627|abudhabi|airforce|allstate|attorney|barclays|barefoot|bargains|baseball|boutique|bradesco|broadway|brussels|builders|business|capetown|catering|catholic|cipriani|cityeats|cleaning|clinique|clothing|commbank|computer|delivery|deloitte|democrat|diamonds|discount|discover|download|engineer|ericsson|etisalat|exchange|feedback|fidelity|firmdale|football|frontier|goodyear|grainger|graphics|guardian|hdfcbank|helsinki|holdings|hospital|infiniti|ipiranga|istanbul|jpmorgan|lighting|lundbeck|marriott|maserati|mckinsey|memorial|merckmsd|mortgage|observer|partners|pharmacy|pictures|plumbing|property|redstone|reliance|saarland|samsclub|security|services|shopping|showtime|softbank|software|stcgroup|supplies|training|vanguard|ventures|verisign|woodside|xn--90ae|xn--node|xn--p1ai|xn--qxam|yokohama|\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629|abogado|academy|agakhan|alibaba|android|athleta|auction|audible|auspost|avianca|banamex|bauhaus|bentley|bestbuy|booking|brother|bugatti|capital|caravan|careers|channel|charity|chintai|citadel|clubmed|college|cologne|comcast|company|compare|contact|cooking|corsica|country|coupons|courses|cricket|cruises|dentist|digital|domains|exposed|express|farmers|fashion|ferrari|ferrero|finance|fishing|fitness|flights|florist|flowers|forsale|frogans|fujitsu|gallery|genting|godaddy|grocery|guitars|hamburg|hangout|hitachi|holiday|hosting|hoteles|hotmail|hyundai|ismaili|jewelry|juniper|kitchen|komatsu|lacaixa|lanxess|lasalle|latrobe|leclerc|limited|lincoln|markets|monster|netbank|netflix|network|neustar|okinawa|oldnavy|organic|origins|philips|pioneer|politie|realtor|recipes|rentals|reviews|rexroth|samsung|sandvik|schmidt|schwarz|science|shiksha|singles|staples|storage|support|surgery|systems|temasek|theater|theatre|tickets|tiffany|toshiba|trading|walmart|wanggou|watches|weather|website|wedding|whoswho|windows|winners|xfinity|yamaxun|youtube|zuerich|\u043a\u0430\u0442\u043e\u043b\u0438\u043a|\u0627\u062a\u0635\u0627\u0644\u0627\u062a|\u0627\u0644\u0628\u062d\u0631\u064a\u0646|\u0627\u0644\u062c\u0632\u0627\u0626\u0631|\u0627\u0644\u0639\u0644\u064a\u0627\u0646|\u067e\u0627\u06a9\u0633\u062a\u0627\u0646|\u0643\u0627\u062b\u0648\u0644\u064a\u0643|\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe|abarth|abbott|abbvie|africa|agency|airbus|airtel|alipay|alsace|alstom|amazon|anquan|aramco|author|bayern|beauty|berlin|bharti|bostik|boston|broker|camera|career|casino|center|chanel|chrome|church|circle|claims|clinic|coffee|comsec|condos|coupon|credit|cruise|dating|datsun|dealer|degree|dental|design|direct|doctor|dunlop|dupont|durban|emerck|energy|estate|events|expert|family|flickr|futbol|gallup|garden|george|giving|global|google|gratis|health|hermes|hiphop|hockey|hotels|hughes|imamat|insure|intuit|jaguar|joburg|juegos|kaufen|kinder|kindle|kosher|lancia|latino|lawyer|lefrak|living|locker|london|luxury|madrid|maison|makeup|market|mattel|mobile|monash|mormon|moscow|museum|mutual|nagoya|natura|nissan|nissay|norton|nowruz|office|olayan|online|oracle|orange|otsuka|pfizer|photos|physio|pictet|quebec|racing|realty|reisen|repair|report|review|rocher|rogers|ryukyu|safety|sakura|sanofi|school|schule|search|secure|select|shouji|soccer|social|stream|studio|supply|suzuki|swatch|sydney|taipei|taobao|target|tattoo|tennis|tienda|tjmaxx|tkmaxx|toyota|travel|unicom|viajes|viking|villas|virgin|vision|voting|voyage|vuelos|walter|webcam|xihuan|yachts|yandex|zappos|\u043c\u043e\u0441\u043a\u0432\u0430|\u043e\u043d\u043b\u0430\u0439\u043d|\u0627\u0628\u0648\u0638\u0628\u064a|\u0627\u0631\u0627\u0645\u0643\u0648|\u0627\u0644\u0627\u0631\u062f\u0646|\u0627\u0644\u0645\u063a\u0631\u0628|\u0627\u0645\u0627\u0631\u0627\u062a|\u0641\u0644\u0633\u0637\u064a\u0646|\u0645\u0644\u064a\u0633\u064a\u0627|\u092d\u093e\u0930\u0924\u092e\u094d|\u0b87\u0bb2\u0b99\u0bcd\u0b95\u0bc8|\u30d5\u30a1\u30c3\u30b7\u30e7\u30f3|actor|adult|aetna|amfam|amica|apple|archi|audio|autos|azure|baidu|beats|bible|bingo|black|boats|bosch|build|canon|cards|chase|cheap|cisco|citic|click|cloud|coach|codes|crown|cymru|dabur|dance|deals|delta|drive|dubai|earth|edeka|email|epson|faith|fedex|final|forex|forum|gallo|games|gifts|gives|glass|globo|gmail|green|gripe|group|gucci|guide|homes|honda|horse|house|hyatt|ikano|irish|jetzt|koeln|kyoto|lamer|lease|legal|lexus|lilly|linde|lipsy|loans|locus|lotte|lotto|macys|mango|media|miami|money|movie|music|nexus|nikon|ninja|nokia|nowtv|omega|osaka|paris|parts|party|phone|photo|pizza|place|poker|praxi|press|prime|promo|quest|radio|rehab|reise|ricoh|rocks|rodeo|rugby|salon|sener|seven|sharp|shell|shoes|skype|sling|smart|smile|solar|space|sport|stada|store|study|style|sucks|swiss|tatar|tires|tirol|tmall|today|tokyo|tools|toray|total|tours|trade|trust|tunes|tushu|ubank|vegas|video|vodka|volvo|wales|watch|weber|weibo|works|world|xerox|yahoo|\u05d9\u05e9\u05e8\u05d0\u05dc|\u0627\u06cc\u0631\u0627\u0646|\u0628\u0627\u0632\u0627\u0631|\u0628\u06be\u0627\u0631\u062a|\u0633\u0648\u062f\u0627\u0646|\u0633\u0648\u0631\u064a\u0629|\u0647\u0645\u0631\u0627\u0647|\u092d\u093e\u0930\u094b\u0924|\u0938\u0902\u0917\u0920\u0928|\u09ac\u09be\u0982\u09b2\u09be|\u0c2d\u0c3e\u0c30\u0c24\u0c4d|\u0d2d\u0d3e\u0d30\u0d24\u0d02|\u5609\u91cc\u5927\u9152\u5e97|aarp|able|adac|aero|akdn|ally|amex|arab|army|arpa|arte|asda|asia|audi|auto|baby|band|bank|bbva|beer|best|bike|bing|blog|blue|bofa|bond|book|buzz|cafe|call|camp|care|cars|casa|case|cash|cbre|cern|chat|citi|city|club|cool|coop|cyou|data|date|dclk|deal|dell|desi|diet|dish|docs|dvag|erni|fage|fail|fans|farm|fast|fiat|fido|film|fire|fish|flir|food|ford|free|fund|game|gbiz|gent|ggee|gift|gmbh|gold|golf|goog|guge|guru|hair|haus|hdfc|help|here|hgtv|host|hsbc|icbc|ieee|imdb|immo|info|itau|java|jeep|jobs|jprs|kddi|kids|kiwi|kpmg|kred|land|lego|lgbt|lidl|life|like|limo|link|live|loan|loft|love|ltda|luxe|maif|meet|meme|menu|mini|mint|mobi|moda|moto|name|navy|news|next|nico|nike|ollo|open|page|pars|pccw|pics|ping|pink|play|plus|pohl|porn|post|prod|prof|qpon|read|reit|rent|rest|rich|room|rsvp|ruhr|safe|sale|sarl|save|saxo|scot|seat|seek|sexy|shaw|shia|shop|show|silk|sina|site|skin|sncf|sohu|song|sony|spot|star|surf|talk|taxi|team|tech|teva|tiaa|tips|town|toys|tube|vana|visa|viva|vivo|vote|voto|wang|weir|wien|wiki|wine|work|xbox|yoga|zara|zero|zone|\u0434\u0435\u0442\u0438|\u0441\u0430\u0439\u0442|\u0628\u0627\u0631\u062a|\u0628\u064a\u062a\u0643|\u0680\u0627\u0631\u062a|\u062a\u0648\u0646\u0633|\u0634\u0628\u0643\u0629|\u0639\u0631\u0627\u0642|\u0639\u0645\u0627\u0646|\u0645\u0648\u0642\u0639|\u092d\u093e\u0930\u0924|\u09ad\u09be\u09b0\u09a4|\u09ad\u09be\u09f0\u09a4|\u0a2d\u0a3e\u0a30\u0a24|\u0aad\u0abe\u0ab0\u0aa4|\u0b2d\u0b3e\u0b30\u0b24|\u0cad\u0cbe\u0cb0\u0ca4|\u0dbd\u0d82\u0d9a\u0dcf|\u30a2\u30de\u30be\u30f3|\u30b0\u30fc\u30b0\u30eb|\u30af\u30e9\u30a6\u30c9|\u30dd\u30a4\u30f3\u30c8|\u7ec4\u7ec7\u673a\u6784|\u96fb\u8a0a\u76c8\u79d1|\u9999\u683c\u91cc\u62c9|aaa|abb|abc|aco|ads|aeg|afl|aig|anz|aol|app|art|aws|axa|bar|bbc|bbt|bcg|bcn|bet|bid|bio|biz|bms|bmw|bom|boo|bot|box|buy|bzh|cab|cal|cam|car|cat|cba|cbn|cbs|ceo|cfa|cfd|com|cpa|crs|dad|day|dds|dev|dhl|diy|dnp|dog|dot|dtv|dvr|eat|eco|edu|esq|eus|fan|fit|fly|foo|fox|frl|ftr|fun|fyi|gal|gap|gay|gdn|gea|gle|gmo|gmx|goo|gop|got|gov|hbo|hiv|hkt|hot|how|ibm|ice|icu|ifm|inc|ing|ink|int|ist|itv|jcb|jio|jll|jmp|jnj|jot|joy|kfh|kia|kim|kpn|krd|lat|law|lds|llc|llp|lol|lpl|ltd|man|map|mba|med|men|mil|mit|mlb|mls|mma|moe|moi|mom|mov|msd|mtn|mtr|nab|nba|nec|net|new|nfl|ngo|nhk|now|nra|nrw|ntt|nyc|obi|one|ong|onl|ooo|org|ott|ovh|pay|pet|phd|pid|pin|pnc|pro|pru|pub|pwc|red|ren|ril|rio|rip|run|rwe|sap|sas|sbi|sbs|sca|scb|ses|sew|sex|sfr|ski|sky|soy|spa|srl|stc|tab|tax|tci|tdk|tel|thd|tjx|top|trv|tui|tvs|ubs|uno|uol|ups|vet|vig|vin|vip|wed|win|wme|wow|wtc|wtf|xin|xxx|xyz|you|yun|zip|\u0431\u0435\u043b|\u043a\u043e\u043c|\u049b\u0430\u0437|\u043c\u043a\u0434|\u043c\u043e\u043d|\u043e\u0440\u0433|\u0440\u0443\u0441|\u0441\u0440\u0431|\u0443\u043a\u0440|\u0570\u0561\u0575|\u05e7\u05d5\u05dd|\u0639\u0631\u0628|\u0642\u0637\u0631|\u0643\u0648\u0645|\u0645\u0635\u0631|\u0915\u0949\u092e|\u0928\u0947\u091f|\u0e04\u0e2d\u0e21|\u0e44\u0e17\u0e22|\u0ea5\u0eb2\u0ea7|\u30b9\u30c8\u30a2|\u30bb\u30fc\u30eb|\u307f\u3093\u306a|\u4e2d\u6587\u7f51|\u4e9a\u9a6c\u900a|\u5929\u4e3b\u6559|\u6211\u7231\u4f60|\u65b0\u52a0\u5761|\u6de1\u9a6c\u9521|\u8bfa\u57fa\u4e9a|\u98de\u5229\u6d66|ac|ad|ae|af|ag|ai|al|am|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cu|cv|cw|cx|cy|cz|de|dj|dk|dm|do|dz|ec|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|za|zm|zw|\u03b5\u03bb|\u03b5\u03c5|\u0431\u0433|\u0435\u044e|\u0440\u0444|\u10d2\u10d4|\ub2f7\ub137|\ub2f7\ucef4|\uc0bc\uc131|\ud55c\uad6d|\u30b3\u30e0|\u4e16\u754c|\u4e2d\u4fe1|\u4e2d\u56fd|\u4e2d\u570b|\u4f01\u4e1a|\u4f5b\u5c71|\u4fe1\u606f|\u5065\u5eb7|\u516b\u5366|\u516c\u53f8|\u516c\u76ca|\u53f0\u6e7e|\u53f0\u7063|\u5546\u57ce|\u5546\u5e97|\u5546\u6807|\u5609\u91cc|\u5728\u7ebf|\u5927\u62ff|\u5a31\u4e50|\u5bb6\u96fb|\u5e7f\u4e1c|\u5fae\u535a|\u6148\u5584|\u624b\u673a|\u62db\u8058|\u653f\u52a1|\u653f\u5e9c|\u65b0\u95fb|\u65f6\u5c1a|\u66f8\u7c4d|\u673a\u6784|\u6e38\u620f|\u6fb3\u9580|\u70b9\u770b|\u79fb\u52a8|\u7f51\u5740|\u7f51\u5e97|\u7f51\u7ad9|\u7f51\u7edc|\u8054\u901a|\u8c37\u6b4c|\u8d2d\u7269|\u901a\u8ca9|\u96c6\u56e2|\u98df\u54c1|\u9910\u5385|\u9999\u6e2f)/,Ar=new RegExp("[".concat(Rt,"!#$%&'*+/=?^_`{|}~-]")),$r=new RegExp("^".concat(wr.source,"$")),kn=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.localPartCharRegex=Ar,r.strictTldRegex=$r,r}return(0,E.C6)(t,e),t.prototype.parseMatches=function(r){for(var o=this.tagBuilder,i=this.localPartCharRegex,s=this.strictTldRegex,u=[],f=r.length,m=new He,S={m:"a",a:"i",i:"l",l:"t",t:"o",o:":"},T=0,I=0,P=m;T-1},e.isValidUriScheme=function(t){var r=t.match(this.uriSchemeRegex),o=r&&r[0].toLowerCase();return"javascript:"!==o&&"vbscript:"!==o},e.urlMatchDoesNotHaveProtocolOrDot=function(t,r){return!(!t||r&&this.hasFullProtocolRegex.test(r)||-1!==t.indexOf("."))},e.urlMatchDoesNotHaveAtLeastOneWordChar=function(t,r){return!(!t||!r||this.hasFullProtocolRegex.test(r)||this.hasWordCharAfterProtocolRegex.test(t))},e.hasFullProtocolRegex=/^[A-Za-z][-.+A-Za-z0-9]*:\/\//,e.uriSchemeRegex=/^[A-Za-z][-.+A-Za-z0-9]*:/,e.hasWordCharAfterProtocolRegex=new RegExp(":[^\\s]*?["+_o+"]"),e.ipRegex=/[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?\.[0-9][0-9]?[0-9]?(:[0-9]*)?\/?$/,e}(),vt=(r=new RegExp("[/?#](?:["+Rt+"\\-+&@#/%=~_()|'$*\\[\\]{}?!:,.;^\u2713]*["+Rt+"\\-+&@#/%=~_()|'$*\\[\\]{}\u2713])?"),new RegExp(["(?:","(",/(?:[A-Za-z][-.+A-Za-z0-9]{0,63}:(?![A-Za-z][-.+A-Za-z0-9]{0,63}:\/\/)(?!\d+\/?)(?:\/\/)?)/.source,po(2),")","|","(","(//)?",/(?:www\.)/.source,po(6),")","|","(","(//)?",po(10)+"\\.",wr.source,"(?![-"+Or+"])",")",")","(?::[0-9]+)?","(?:"+r.source+")?"].join(""),"gi")),Kt=new RegExp("["+Rt+"]"),nr=function(e){function t(r){var o=e.call(this,r)||this;return o.stripPrefix={scheme:!0,www:!0},o.stripTrailingSlash=!0,o.decodePercentEncoding=!0,o.matcherRegex=vt,o.wordCharRegExp=Kt,o.stripPrefix=r.stripPrefix,o.stripTrailingSlash=r.stripTrailingSlash,o.decodePercentEncoding=r.decodePercentEncoding,o}return(0,E.C6)(t,e),t.prototype.parseMatches=function(r){for(var S,o=this.matcherRegex,i=this.stripPrefix,s=this.stripTrailingSlash,u=this.decodePercentEncoding,f=this.tagBuilder,m=[],T=function(){var P=S[0],O=S[1],M=S[4],L=S.index,G=S[5]||S[9],Z=r.charAt(L-1);if(!$t.isValid(P,O)||L>0&&"@"===Z||L>0&&G&&I.wordCharRegExp.test(Z))return"continue";if(/\?$/.test(P)&&(P=P.substr(0,P.length-1)),I.matchHasUnbalancedClosingParen(P))P=P.substr(0,P.length-1);else{var we=I.matchHasInvalidCharAfterTld(P,O);we>-1&&(P=P.substr(0,we))}var xe=["http://","https://"].find(function(Ue){return!!O&&-1!==O.indexOf(Ue)});if(xe){var Ae=P.indexOf(xe);P=P.substr(Ae),O=O.substr(Ae),L+=Ae}m.push(new lo({tagBuilder:f,matchedText:P,offset:L,urlMatchType:O?"scheme":M?"www":"tld",url:P,protocolUrlMatch:!!O,protocolRelativeMatch:!!G,stripPrefix:i,stripTrailingSlash:s,decodePercentEncoding:u}))},I=this;null!==(S=o.exec(r));)T();return m},t.prototype.matchHasUnbalancedClosingParen=function(r){var i,o=r.charAt(r.length-1);if(")"===o)i="(";else if("]"===o)i="[";else{if("}"!==o)return!1;i="{"}for(var s=0,u=0,f=r.length-1;u-1&&f-m<=140){var D=r.slice(m,f),L=new Cn({tagBuilder:o,matchedText:D,offset:m,serviceName:i,hashtag:D.slice(1)});s.push(L)}}},t}(Pn),Zt=["twitter","facebook","instagram","tiktok"],Kr=new RegExp("".concat(/(?:(?:(?:(\+)?\d{1,3}[-\040.]?)?\(?\d{3}\)?[-\040.]?\d{3}[-\040.]?\d{4})|(?:(\+)(?:9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[87654321]|4[987654310]|3[9643210]|2[70]|7|1)[-\040.]?(?:\d[-\040.]?){6,12}\d+))([,;]+[0-9]+#?)*/.source,"|").concat(/(0([1-9]{1}-?[1-9]\d{3}|[1-9]{2}-?\d{3}|[1-9]{2}\d{1}-?\d{2}|[1-9]{2}\d{2}-?\d{1})-?\d{4}|0[789]0-?\d{4}-?\d{4}|050-?\d{4}-?\d{4})/.source),"g"),An=function(e){function t(){var r=null!==e&&e.apply(this,arguments)||this;return r.matcherRegex=Kr,r}return(0,E.C6)(t,e),t.prototype.parseMatches=function(r){for(var u,o=this.matcherRegex,i=this.tagBuilder,s=[];null!==(u=o.exec(r));){var f=u[0],m=f.replace(/[^0-9,;#]/g,""),S=!(!u[1]&&!u[2]),T=0==u.index?"":r.substr(u.index-1,1),I=r.substr(u.index+f.length,1),P=!T.match(/\d/)&&!I.match(/\d/);this.testMatch(u[3])&&this.testMatch(f)&&P&&s.push(new Rn({tagBuilder:i,matchedText:f,offset:u.index,number:m,plusSign:S}))}return s},t.prototype.testMatch=function(r){return Mo.test(r)},t}(Pn),Jo=new RegExp("@[_".concat(Rt,"]{1,50}(?![_").concat(Rt,"])"),"g"),Mi=new RegExp("@[_.".concat(Rt,"]{1,30}(?![_").concat(Rt,"])"),"g"),xi=new RegExp("@[-_.".concat(Rt,"]{1,50}(?![-_").concat(Rt,"])"),"g"),Yi=new RegExp("@[_.".concat(Rt,"]{1,23}[_").concat(Rt,"](?![_").concat(Rt,"])"),"g"),ki=new RegExp("[^"+Rt+"]"),ha=function(e){function t(r){var o=e.call(this,r)||this;return o.serviceName="twitter",o.matcherRegexes={twitter:Jo,instagram:Mi,soundcloud:xi,tiktok:Yi},o.nonWordCharRegex=ki,o.serviceName=r.serviceName,o}return(0,E.C6)(t,e),t.prototype.parseMatches=function(r){var m,o=this.serviceName,i=this.matcherRegexes[this.serviceName],s=this.nonWordCharRegex,u=this.tagBuilder,f=[];if(!i)return f;for(;null!==(m=i.exec(r));){var S=m.index,T=r.charAt(S-1);if(0===S||s.test(T)){var I=m[0].replace(/\.+$/g,""),P=I.slice(1);f.push(new Ln({tagBuilder:u,matchedText:I,offset:S,serviceName:o,mention:P}))}}return f},t}(Pn);var ei=function e(t){void 0===t&&(t={}),this.idx=void 0!==t.idx?t.idx:-1,this.type=t.type||"tag",this.name=t.name||"",this.isOpening=!!t.isOpening,this.isClosing=!!t.isClosing},Ni=function(){function e(t){void 0===t&&(t={}),this.version=e.version,this.urls={},this.email=!0,this.phone=!0,this.hashtag=!1,this.mention=!1,this.newWindow=!0,this.stripPrefix={scheme:!0,www:!0},this.stripTrailingSlash=!0,this.decodePercentEncoding=!0,this.truncate={length:0,location:"end"},this.className="",this.replaceFn=null,this.context=void 0,this.sanitizeHtml=!1,this.matchers=null,this.tagBuilder=null,this.urls=this.normalizeUrlsCfg(t.urls),this.email="boolean"==typeof t.email?t.email:this.email,this.phone="boolean"==typeof t.phone?t.phone:this.phone,this.hashtag=t.hashtag||this.hashtag,this.mention=t.mention||this.mention,this.newWindow="boolean"==typeof t.newWindow?t.newWindow:this.newWindow,this.stripPrefix=this.normalizeStripPrefixCfg(t.stripPrefix),this.stripTrailingSlash="boolean"==typeof t.stripTrailingSlash?t.stripTrailingSlash:this.stripTrailingSlash,this.decodePercentEncoding="boolean"==typeof t.decodePercentEncoding?t.decodePercentEncoding:this.decodePercentEncoding,this.sanitizeHtml=t.sanitizeHtml||!1;var r=this.mention;if(!1!==r&&-1===["twitter","instagram","soundcloud","tiktok"].indexOf(r))throw new Error("invalid `mention` cfg '".concat(r,"' - see docs"));var o=this.hashtag;if(!1!==o&&-1===Zt.indexOf(o))throw new Error("invalid `hashtag` cfg '".concat(o,"' - see docs"));this.truncate=this.normalizeTruncateCfg(t.truncate),this.className=t.className||this.className,this.replaceFn=t.replaceFn||this.replaceFn,this.context=t.context||this}return e.link=function(t,r){return new e(r).link(t)},e.parse=function(t,r){return new e(r).parse(t)},e.prototype.normalizeUrlsCfg=function(t){return null==t&&(t=!0),"boolean"==typeof t?{schemeMatches:t,wwwMatches:t,tldMatches:t}:{schemeMatches:"boolean"!=typeof t.schemeMatches||t.schemeMatches,wwwMatches:"boolean"!=typeof t.wwwMatches||t.wwwMatches,tldMatches:"boolean"!=typeof t.tldMatches||t.tldMatches}},e.prototype.normalizeStripPrefixCfg=function(t){return null==t&&(t=!0),"boolean"==typeof t?{scheme:t,www:t}:{scheme:"boolean"!=typeof t.scheme||t.scheme,www:"boolean"!=typeof t.www||t.www}},e.prototype.normalizeTruncateCfg=function(t){return"number"==typeof t?{length:t,location:"end"}:function at(e,t){for(var r in t)t.hasOwnProperty(r)&&void 0===e[r]&&(e[r]=t[r]);return e}(t||{},{length:Number.POSITIVE_INFINITY,location:"end"})},e.prototype.parse=function(t){var r=this,o=["a","style","script"],i=0,s=[];return function la(e,t){for(var r=t.onOpenTag,o=t.onCloseTag,i=t.onText,s=t.onComment,u=t.onDoctype,f=new ei,m=0,S=e.length,T=0,I=0,P=f;m"===pt?(P=new ei((0,E.Cl)((0,E.Cl)({},P),{name:sr()})),Ke()):!Dn.test(pt)&&!Ao.test(pt)&&":"!==pt&&Pe()}function L(pt){">"===pt?Pe():Dn.test(pt)?T=3:Pe()}function G(pt){Mr.test(pt)||("/"===pt?T=12:">"===pt?Ke():"<"===pt?it():"="===pt||mo.test(pt)||Gr.test(pt)?Pe():T=5)}function Z(pt){Mr.test(pt)?T=6:"/"===pt?T=12:"="===pt?T=7:">"===pt?Ke():"<"===pt?it():mo.test(pt)&&Pe()}function we(pt){Mr.test(pt)||("/"===pt?T=12:"="===pt?T=7:">"===pt?Ke():"<"===pt?it():mo.test(pt)?Pe():T=5)}function xe(pt){Mr.test(pt)||('"'===pt?T=8:"'"===pt?T=9:/[>=`]/.test(pt)?Pe():"<"===pt?it():T=10)}function Ae(pt){'"'===pt&&(T=11)}function Se(pt){"'"===pt&&(T=11)}function qe(pt){Mr.test(pt)?T=4:">"===pt?Ke():"<"===pt&&it()}function Ue(pt){Mr.test(pt)?T=4:"/"===pt?T=12:">"===pt?Ke():"<"===pt?it():(T=4,function yr(){m--}())}function ut(pt){">"===pt?(P=new ei((0,E.Cl)((0,E.Cl)({},P),{isClosing:!0})),Ke()):T=4}function wt(pt){"-"===pt?T=15:">"===pt?Pe():T=16}function Ot(pt){"-"===pt?T=18:">"===pt?Pe():T=16}function Ht(pt){"-"===pt&&(T=17)}function gr(pt){T="-"===pt?18:16}function lt(pt){">"===pt?Ke():"!"===pt?T=19:"-"===pt||(T=16)}function Xe(pt){"-"===pt?T=17:">"===pt?Ke():T=16}function Oe(pt){">"===pt?Ke():"<"===pt&&it()}function Pe(){T=0,P=f}function it(){T=1,P=new ei({idx:m})}function Ke(){var pt=e.slice(I,P.idx);pt&&i(pt,I),"comment"===P.type?s(P.idx):"doctype"===P.type?u(P.idx):(P.isOpening&&r(P.name,P.idx),P.isClosing&&o(P.name,P.idx)),Pe(),I=m+1}function sr(){return e.slice(P.idx+(P.isClosing?2:1),m).toLowerCase()}I=0&&i++},onText:function(u,f){if(0===i){var S=function gt(e,t){if(!t.global)throw new Error("`splitRegex` must have the 'g' flag set");for(var i,r=[],o=0;i=t.exec(e);)r.push(e.substring(o,i.index)),r.push(i[0]),o=i.index+i[0].length;return r.push(e.substring(o)),r}(u,/( | |<|<|>|>|"|"|')/gi),T=f;S.forEach(function(I,P){if(P%2==0){var O=r.parseText(I,T);s.push.apply(s,O)}T+=I.length})}},onCloseTag:function(u){o.indexOf(u)>=0&&(i=Math.max(i-1,0))},onComment:function(u){},onDoctype:function(u){}}),s=this.compactMatches(s),s=this.removeUnwantedMatches(s)},e.prototype.compactMatches=function(t){t.sort(function(m,S){return m.getOffset()-S.getOffset()});for(var r=0;rs?r:r+1;t.splice(f,1);continue}if(t[r+1].getOffset()/g,">"));for(var r=this.parse(t),o=[],i=0,s=0,u=r.length;s\s]/i.test(e)}function Vi(e){return/^<\/a\s*>/i.test(e)}function Oo(){var e=[],t=new $o({stripPrefix:!1,url:!0,email:!0,replaceFn:function(r){switch(r.getType()){case"url":e.push({text:r.matchedText,url:r.getUrl()});break;case"email":e.push({text:r.matchedText,url:"mailto:"+r.getEmail().replace(/^mailto:/i,"")})}return!1}});return{links:e,autolinker:t}}function qr(e){var t,r,o,i,s,u,f,m,S,T,I,M,d,P=e.tokens,O=null;for(r=0,o=P.length;r=0;t--)if("link_close"!==(s=i[t]).type){if("htmltag"===s.type&&(Yr(s.content)&&I>0&&I--,Vi(s.content)&&I++),!(I>0)&&"text"===s.type&&Do.test(s.content)){if(O||(M=(O=Oo()).links,d=O.autolinker),u=s.content,M.length=0,d.link(u),!M.length)continue;for(f=[],T=s.level,m=0;me({url:s,loadSpec:!0,requestInterceptor:r,responseInterceptor:o,headers:{Accept:Si},credentials:i}).then(u=>u.body)}const{fetch:hi,Response:$n,Headers:Ui,Request:li,FormData:ga,File:Wi,Blob:Zr}=globalThis;function sn(e,t){return!t&&typeof navigator<"u"&&(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!=typeof e||"string"!=typeof e.uri):!!(typeof File<"u"&&e instanceof File||typeof Blob<"u"&&e instanceof Blob||ArrayBuffer.isView(e))||null!==e&&"object"==typeof e&&"function"==typeof e.pipe}function On(e,t){return Array.isArray(e)&&e.some(r=>sn(r,t))}typeof globalThis.fetch>"u"&&(globalThis.fetch=hi),typeof globalThis.Headers>"u"&&(globalThis.Headers=Ui),typeof globalThis.Request>"u"&&(globalThis.Request=li),typeof globalThis.Response>"u"&&(globalThis.Response=$n),typeof globalThis.FormData>"u"&&(globalThis.FormData=ga),typeof globalThis.File>"u"&&(globalThis.File=Wi),typeof globalThis.Blob>"u"&&(globalThis.Blob=Zr);class no extends File{constructor(t,r="",o={}){super([t],r,o),this.data=t}valueOf(){return this.data}toString(){return this.valueOf()}}const Qo=e=>":/?#[]@!$&'()*+,;=".indexOf(e)>-1,xa=e=>/^[a-z0-9\-._~]+$/i.test(e);function ca(e,t="reserved"){return[...e].map(r=>{if(xa(r)||Qo(r)&&"unsafe"===t)return r;const o=new TextEncoder;return Array.from(o.encode(r)).map(s=>`0${s.toString(16).toUpperCase()}`.slice(-2)).map(s=>`%${s}`).join("")}).join("")}function fa(e){const{value:t}=e;return Array.isArray(t)?function qo({key:e,value:t,style:r,explode:o,escape:i}){if("simple"===r)return t.map(s=>ko(s,i)).join(",");if("label"===r)return`.${t.map(s=>ko(s,i)).join(".")}`;if("matrix"===r)return t.map(s=>ko(s,i)).reduce((s,u)=>!s||o?`${s||""};${e}=${u}`:`${s},${u}`,"");if("form"===r){const s=o?`&${e}=`:",";return t.map(u=>ko(u,i)).join(s)}if("spaceDelimited"===r){const s=o?`${e}=`:"";return t.map(u=>ko(u,i)).join(` ${s}`)}if("pipeDelimited"===r){const s=o?`${e}=`:"";return t.map(u=>ko(u,i)).join(`|${s}`)}}(e):"object"==typeof t?function tl({key:e,value:t,style:r,explode:o,escape:i}){const s=Object.keys(t);return"simple"===r?s.reduce((u,f)=>{const m=ko(t[f],i);return`${u?`${u},`:""}${f}${o?"=":","}${m}`},""):"label"===r?s.reduce((u,f)=>{const m=ko(t[f],i);return`${u?`${u}.`:"."}${f}${o?"=":"."}${m}`},""):"matrix"===r&&o?s.reduce((u,f)=>`${u?`${u};`:";"}${f}=${ko(t[f],i)}`,""):"matrix"===r?s.reduce((u,f)=>{const m=ko(t[f],i);return`${u?`${u},`:`;${e}=`}${f},${m}`},""):"form"===r?s.reduce((u,f)=>{const m=ko(t[f],i);return`${u?`${u}${o?"&":","}`:""}${f}${o?"=":","}${m}`},""):void 0}(e):function No({key:e,value:t,style:r,escape:o}){return"simple"===r?ko(t,o):"label"===r?`.${ko(t,o)}`:"matrix"===r?`;${e}=${ko(t,o)}`:"form"===r||"deepObject"===r?ko(t,o):void 0}(e)}function ko(e,t=!1){return Array.isArray(e)||null!==e&&"object"==typeof e?e=JSON.stringify(e):("number"==typeof e||"boolean"==typeof e)&&(e=String(e)),t&&"string"==typeof e&&e.length>0?ca(e,t):e??""}const $a={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Ja={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function on(e,t,r=!1){const{collectionFormat:o,allowEmptyValue:i,serializationOption:s,encoding:u}=t,f="object"!=typeof t||Array.isArray(t)?t:t.value,m=r?T=>T.toString():T=>encodeURIComponent(T),S=m(e);if(typeof f>"u"&&i)return[[S,""]];if(sn(f)||On(f))return[[S,f]];if(s)return st(e,f,r,s);if(u){if([typeof u.style,typeof u.explode,typeof u.allowReserved].some(T=>"undefined"!==T)){const{style:T,explode:I,allowReserved:P}=u;return st(e,f,r,{style:T,explode:I,allowReserved:P})}if("string"==typeof u.contentType){if(u.contentType.startsWith("application/json")){const O=m("string"==typeof f?f:JSON.stringify(f));return[[S,new no(O,"blob",{type:u.contentType})]]}const T=m(String(f));return[[S,new no(T,"blob",{type:u.contentType})]]}return"object"!=typeof f?[[S,m(f)]]:Array.isArray(f)&&f.every(T=>"object"!=typeof T)?[[S,f.map(m).join(",")]]:[[S,m(JSON.stringify(f))]]}return"object"!=typeof f?[[S,m(f)]]:Array.isArray(f)?"multi"===o?[[S,f.map(m)]]:[[S,f.map(m).join(Ja[o||"csv"])]]:[[S,""]]}function st(e,t,r,o){const i=o.style||"form",s=typeof o.explode>"u"?"form"===i:o.explode,u=!r&&(o&&o.allowReserved?"unsafe":"reserved"),f=S=>ko(S,u),m=r?S=>S:S=>f(S);return"object"!=typeof t?[[m(e),f(t)]]:Array.isArray(t)?s?[[m(e),t.map(f)]]:[[m(e),t.map(f).join($a[i])]]:"deepObject"===i?Object.keys(t).map(S=>[m(`${e}[${S}]`),f(t[S])]):s?Object.keys(t).map(S=>[m(S),f(t[S])]):[[m(e),Object.keys(t).map(S=>[`${m(S)},${f(t[S])}`]).join(",")]]}const Pr=(e,{encode:t=!0}={})=>{const r=(s,u,f)=>(Array.isArray(f)?f.reduce((m,S)=>r(s,u,S),s):f instanceof Date?s.append(u,f.toISOString()):"object"==typeof f?Object.entries(f).reduce((m,[S,T])=>r(s,`${u}[${S}]`,T),s):s.append(u,f),s),o=Object.entries(e).reduce((s,[u,f])=>r(s,u,f),new URLSearchParams),i=String(o);return t?i:decodeURIComponent(i)};function Xn(e){const t=Object.keys(e).reduce((r,o)=>{for(const[i,s]of on(o,e[o]))r[i]=s instanceof no?s.valueOf():s;return r},{});return Pr(t,{encode:!1})}function yi(e={}){const{url:t="",query:r,form:o}=e;if(o){if(Object.keys(o).some(f=>{const{value:m}=o[f];return sn(m)||On(m)})||/multipart\/form-data/i.test(e.headers["content-type"]||e.headers["Content-Type"])){const f=function mr(e){return Object.entries(e).reduce((t,[r,o])=>{for(const[i,s]of on(r,o,!0))if(Array.isArray(s))for(const u of s)if(ArrayBuffer.isView(u)){const f=new Blob([u]);t.append(i,f)}else t.append(i,u);else if(ArrayBuffer.isView(s)){const u=new Blob([s]);t.append(i,u)}else t.append(i,s);return t},new FormData)}(e.form);e.formdata=f,e.body=f}else e.body=Xn(o);delete e.form}if(r){const[s,u]=t.split("?");let f="";if(u){const S=new URLSearchParams(u);Object.keys(r).forEach(I=>S.delete(I)),f=String(S)}const m=((...s)=>{const u=s.filter(f=>f).join("&");return u?`?${u}`:""})(f,Xn(r));e.url=s+m,delete e.query}return e}function ui(e){return typeof e>"u"||null===e}var Fo={isNothing:ui,isObject:function jo(e){return"object"==typeof e&&null!==e},toArray:function za(e){return Array.isArray(e)?e:ui(e)?[]:[e]},repeat:function Fs(e,t){var o,r="";for(o=0;of&&(t=o-f+(s=" ... ").length),r-o>f&&(r=o+f-(u=" ...").length),{str:s+e.slice(t,r).replace(/\t/g,"\u2192")+u,pos:o-t+s.length}}function Xi(e,t){return Fo.repeat(" ",t-e.length)+e}var ra=function Nl(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var s,r=/\r?\n|\r|\0/g,o=[0],i=[],u=-1;s=r.exec(e.buffer);)i.push(s.index),o.push(s.index+s[0].length),e.position<=s.index&&u<0&&(u=o.length-2);u<0&&(u=o.length-1);var m,S,f="",T=Math.min(e.line+t.linesAfter,i.length).toString().length,I=t.maxLength-(t.indent+T+3);for(m=1;m<=t.linesBefore&&!(u-m<0);m++)S=To(e.buffer,o[u-m],i[u-m],e.position-(o[u]-o[u-m]),I),f=Fo.repeat(" ",t.indent)+Xi((e.line-m+1).toString(),T)+" | "+S.str+"\n"+f;for(S=To(e.buffer,o[u],i[u],e.position,I),f+=Fo.repeat(" ",t.indent)+Xi((e.line+1).toString(),T)+" | "+S.str+"\n",f+=Fo.repeat("-",t.indent+T+3+S.pos)+"^\n",m=1;m<=t.linesAfter&&!(u+m>=i.length);m++)S=To(e.buffer,o[u+m],i[u+m],e.position-(o[u]-o[u+m]),I),f+=Fo.repeat(" ",t.indent)+Xi((e.line+m+1).toString(),T)+" | "+S.str+"\n";return f.replace(/\n$/,"")},na=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Ls=["scalar","sequence","mapping"],Lo=function Cu(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(-1===na.indexOf(r))throw new ji('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function ol(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}(t.styleAliases||null),-1===Ls.indexOf(this.kind))throw new ji('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function Ti(e,t){var r=[];return e[t].forEach(function(o){var i=r.length;r.forEach(function(s,u){s.tag===o.tag&&s.kind===o.kind&&s.multi===o.multi&&(i=u)}),r[i]=o}),r}function Bs(e){return this.extend(e)}Bs.prototype.extend=function(t){var r=[],o=[];if(t instanceof Lo)o.push(t);else if(Array.isArray(t))o=o.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new ji("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit))}r.forEach(function(s){if(!(s instanceof Lo))throw new ji("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&"scalar"!==s.loadKind)throw new ji("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new ji("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(s){if(!(s instanceof Lo))throw new ji("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Bs.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(o),i.compiledImplicit=Ti(i,"implicit"),i.compiledExplicit=Ti(i,"explicit"),i.compiledTypeMap=function ns(){var t,r,e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),da=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),va=/^[-+]?[0-9]+e/,is=new Lo("tag:yaml.org,2002:float",{kind:"scalar",resolve:function Dl(e){return!(null===e||!da.test(e)||"_"===e[e.length-1])},construct:function Fl(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function ia(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||Fo.isNegativeZero(e))},represent:function Tu(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Fo.isNegativeZero(e))return"-0.0";return r=e.toString(10),va.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),Os=il.extend({implicit:[Za,sl,Ra,is]}),Di=Os,as=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),El=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),ul=new Lo("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function ll(e){return null!==e&&(null!==as.exec(e)||null!==El.exec(e))},construct:function su(e){var t,r,o,i,s,u,f,P,m=0,S=null;if(null===(t=as.exec(e))&&(t=El.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],o=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,o,i));if(s=+t[4],u=+t[5],f=+t[6],t[7]){for(m=t[7].slice(0,3);m.length<3;)m+="0";m=+m}return t[9]&&(S=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(S=-S)),P=new Date(Date.UTC(r,o,i,s,u,f,m)),S&&P.setTime(P.getTime()-S),P},instanceOf:Date,represent:function zs(e){return e.toISOString()}}),ss=new Lo("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function Ts(e){return"<<"===e||null===e}}),cl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",pe=new Lo("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function g(e){if(null===e)return!1;var t,r,o=0,i=e.length,s=cl;for(r=0;r64)){if(t<0)return!1;o+=6}return o%8==0},construct:function N(e){var t,r,o=e.replace(/[\r\n=]/g,""),i=o.length,s=cl,u=0,f=[];for(t=0;t>16&255),f.push(u>>8&255),f.push(255&u)),u=u<<6|s.indexOf(o.charAt(t));return 0==(r=i%4*6)?(f.push(u>>16&255),f.push(u>>8&255),f.push(255&u)):18===r?(f.push(u>>10&255),f.push(u>>2&255)):12===r&&f.push(u>>4&255),new Uint8Array(f)},predicate:function ne(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function Y(e){var o,i,t="",r=0,s=e.length,u=cl;for(o=0;o>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[63&r]),r=(r<<8)+e[o];return 0==(i=s%3)?(t+=u[r>>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[63&r]):2===i?(t+=u[r>>10&63],t+=u[r>>4&63],t+=u[r<<2&63],t+=u[64]):1===i&&(t+=u[r>>2&63],t+=u[r<<4&63],t+=u[64],t+=u[64]),t}}),Ie=Object.prototype.hasOwnProperty,Le=Object.prototype.toString,Ut=new Lo("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function dt(e){if(null===e)return!0;var r,o,i,s,u,t=[],f=e;for(r=0,o=f.length;r>10),56320+(e-65536&1023))}function Du(e,t,r){"__proto__"===t?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:r}):e[t]=r}for(var Fu=new Array(256),pc=new Array(256),us=0;us<256;us++)Fu[us]=Nu(us)?1:0,pc[us]=Nu(us);function Lu(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||fl,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function wl(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=ra(r),new ji(t,r)}function _n(e,t){throw wl(e,t)}function C(e,t){e.onWarning&&e.onWarning.call(null,wl(e,t))}var _={YAML:function(t,r,o){var i,s,u;null!==t.version&&_n(t,"duplication of %YAML directive"),1!==o.length&&_n(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(o[0]))&&_n(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),u=parseInt(i[2],10),1!==s&&_n(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=u<2,1!==u&&2!==u&&C(t,"unsupported YAML version of the document")},TAG:function(t,r,o){var i,s;2!==o.length&&_n(t,"TAG directive accepts exactly two arguments"),s=o[1],Sl.test(i=o[0])||_n(t,"ill-formed tag handle (first argument) of the TAG directive"),Zi.call(t.tagMap,i)&&_n(t,'there is a previously declared suffix for "'+i+'" tag handle'),Ul.test(s)||_n(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{_n(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function j(e,t,r,o){var i,s,u,f;if(t1&&(e.result+=Fo.repeat("\n",t-1))}function Nn(e,t){var r,m,o=e.tag,i=e.anchor,s=[],f=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),m=e.input.charCodeAt(e.position);0!==m&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,_n(e,"tab characters must not be used in indentation")),45===m&&oo(e.input.charCodeAt(e.position+1)));)if(f=!0,e.position++,de(e,!0,-1)&&e.lineIndent<=t)s.push(null),m=e.input.charCodeAt(e.position);else if(r=e.line,Vs(e,t,Iu,!1,!0),s.push(e.result),de(e,!0,-1),m=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==m)_n(e,"bad indentation of a sequence entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt)&&(D&&(u=e.line,f=e.lineStart,m=e.position),Vs(e,t,Bl,!0,i)&&(D?M=e.result:d=e.result),D||(K(e,I,P,O,M,d,u,f,m),O=M=d=null),de(e,!0,-1),G=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&0!==G)_n(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===T?_n(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?_n(e,"repeat of an indentation width identifier"):(f=t+T-1,u=!0)}if(oi(I)){do{I=e.input.charCodeAt(++e.position)}while(oi(I));if(35===I)do{I=e.input.charCodeAt(++e.position)}while(!ls(I)&&0!==I)}for(;0!==I;){for(fe(e),e.lineIndent=0,I=e.input.charCodeAt(e.position);(!u||e.lineIndentf&&(f=e.lineIndent),ls(I))m++;else{if(e.lineIndent0){for(i=u,s=0;i>0;i--)(u=ku(f=e.input.charCodeAt(++e.position)))>=0?s=(s<<4)+u:_n(e,"expected hexadecimal character");e.result+=ju(s),e.position++}else _n(e,"unknown escape sequence");r=o=e.position}else ls(f)?(j(e,r,o,!0),We(e,de(e,!1,t)),r=o=e.position):e.position===e.lineStart&&Re(e)?_n(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}_n(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?T=!0:function cs(e){var t,r,o;if(42!==(o=e.input.charCodeAt(e.position)))return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!oo(o)&&!Hs(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&_n(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),Zi.call(e.anchorMap,r)||_n(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],de(e,!0,-1),!0}(e)?(T=!0,(null!==e.tag||null!==e.anchor)&&_n(e,"alias node should not have any properties")):function _t(e,t,r){var i,s,u,f,m,S,T,O,I=e.kind,P=e.result;if(oo(O=e.input.charCodeAt(e.position))||Hs(O)||35===O||38===O||42===O||33===O||124===O||62===O||39===O||34===O||37===O||64===O||96===O||(63===O||45===O)&&(oo(i=e.input.charCodeAt(e.position+1))||r&&Hs(i)))return!1;for(e.kind="scalar",e.result="",s=u=e.position,f=!1;0!==O;){if(58===O){if(oo(i=e.input.charCodeAt(e.position+1))||r&&Hs(i))break}else if(35===O){if(oo(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&Re(e)||r&&Hs(O))break;if(ls(O)){if(m=e.line,S=e.lineStart,T=e.lineIndent,de(e,!1,-1),e.lineIndent>=t){f=!0,O=e.input.charCodeAt(e.position);continue}e.position=u,e.line=m,e.lineStart=S,e.lineIndent=T;break}}f&&(j(e,s,u,!1),We(e,e.line-m),s=u=e.position,f=!1),oi(O)||(u=e.position+1),O=e.input.charCodeAt(++e.position)}return j(e,s,u,!1),!!e.result||(e.kind=I,e.result=P,!1)}(e,d,Ll===r)&&(T=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(T=f&&Nn(e,D))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&_n(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),I=0,P=e.implicitTypes.length;I"),null!==e.result&&M.kind!==e.kind&&_n(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+M.kind+'", not "'+e.kind+'"'),M.resolve(e.result,e.tag)?(e.result=M.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):_n(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||T}function of(e){var r,o,i,u,t=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(u=e.input.charCodeAt(e.position))&&(de(e,!0,-1),u=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==u));){for(s=!0,u=e.input.charCodeAt(++e.position),r=e.position;0!==u&&!oo(u);)u=e.input.charCodeAt(++e.position);for(i=[],(o=e.input.slice(r,e.position)).length<1&&_n(e,"directive name must not be less than one character in length");0!==u;){for(;oi(u);)u=e.input.charCodeAt(++e.position);if(35===u){do{u=e.input.charCodeAt(++e.position)}while(0!==u&&!ls(u));break}if(ls(u))break;for(r=e.position;0!==u&&!oo(u);)u=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}0!==u&&fe(e),Zi.call(_,o)?_[o](e,o,i):C(e,'unknown document directive "'+o+'"')}de(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,de(e,!0,-1)):s&&_n(e,"directives end mark is expected"),Vs(e,e.lineIndent-1,Bl,!1,!0),de(e,!0,-1),e.checkLineBreaks&&Qa.test(e.input.slice(t,e.position))&&C(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Re(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,de(e,!0,-1)):e.position"u"&&(r=t,t=null);var o=ud(e,r);if("function"!=typeof t)return o;for(var i=0,s=o.length;i=55296&&r<=56319&&t+1=56320&&o<=57343?1024*(r-55296)+o-56320+65536:r}function pf(e){return/^\n* /.test(e)}var Ed=1,zl=2,fs=3,Al=4,Hl=5;function Vl(e,t,r,o,i){e.dump=function(){if(0===t.length)return e.quotingType===zu?'""':"''";if(!e.noCompatMode&&(-1!==cf.indexOf(t)||yd.test(t)))return e.quotingType===zu?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),u=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s);switch(function kp(e,t,r,o,i,s,u,f){var m,S=0,T=null,I=!1,P=!1,O=-1!==o,M=-1,d=function Vu(e){return Va(e)&&e!==ka&&!ff(e)&&e!==dd&&e!==Kh&&e!==lf&&e!==sf&&e!==hd&&e!==md&&e!==gd&&e!==Rp&&e!==Uu&&e!==fd&&e!==Gh&&e!==Cp&&e!==vd&&e!==Tp&&e!==pd&&e!==cu&&e!==Ap&&e!==Op&&e!==uf&&e!==Ip}(du(e,0))&&function df(e){return!ff(e)&&e!==lf}(du(e,e.length-1));if(t||u)for(m=0;m=65536?m+=2:m++){if(!Va(S=du(e,m)))return Hl;d=d&&mc(S,T,f),T=S}else{for(m=0;m=65536?m+=2:m++){if((S=du(e,m))===dl)I=!0,O&&(P=P||m-M-1>o&&" "!==e[M+1],M=m);else if(!Va(S))return Hl;d=d&&mc(S,T,f),T=S}P=P||O&&m-M-1>o&&" "!==e[M+1]}return I||P?r>9&&pf(e)?Hl:u?s===zu?Hl:zl:P?Al:fs:!d||u||i(e)?s===zu?Hl:zl:Ed}(t,o||e.flowLevel>-1&&r>=e.flowLevel,e.indent,u,function m(S){return function Mp(e,t){var r,o;for(r=0,o=e.implicitTypes.length;r"+Ol(t,e.indent)+bd(Hu(function gc(e,t){for(var s,u,r=/(\n+)([^\n]*)/g,o=(S=void 0,S=e.indexOf("\n"),r.lastIndex=S=-1!==S?S:e.length,xd(e.slice(0,S),t)),i="\n"===e[0]||" "===e[0];u=r.exec(e);){var m=u[2];s=" "===m[0],o+=u[1]+(i||s||""===m?"":"\n")+xd(m,t),i=s}var S;return o}(t,u),s));case Hl:return'"'+function Np(e){for(var o,t="",r=0,i=0;i=65536?i+=2:i++)r=du(e,i),!(o=Fi[r])&&Va(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=o||Na(r);return t}(t)+'"';default:throw new ji("impossible error: invalid scalar style")}}()}function Ol(e,t){var r=pf(e)?String(t):"",o="\n"===e[e.length-1];return r+(!o||"\n"!==e[e.length-2]&&"\n"!==e?o?"":"-":"+")+"\n"}function bd(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function xd(e,t){if(""===e||" "===e[0])return e;for(var o,s,r=/ [^ ]/g,i=0,u=0,f=0,m="";o=r.exec(e);)(f=o.index)-i>t&&(m+="\n"+e.slice(i,s=u>i?u:f),i=s+1),u=f;return m+="\n",(m+=e.length-i>t&&u>i?e.slice(i,u)+"\n"+e.slice(u+1):e.slice(i)).slice(1)}function Sd(e,t,r){var o,i,s,u,f,m;for(s=0,u=(i=r?e.explicitTypes:e.implicitTypes).length;s tag resolver accepts not "'+m+'" style');o=f.represent[m](t,m)}e.dump=o}return!0}return!1}function Ws(e,t,r,o,i,s,u){e.tag=null,e.dump=r,Sd(e,r,!1)||Sd(e,r,!0);var S,f=Cl.call(e.dump),m=o;o&&(o=e.flowLevel<0||e.flowLevel>t);var I,P,T="[object Object]"===f||"[object Array]"===f;if(T&&(P=-1!==(I=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||P||2!==e.indent&&t>0)&&(i=!1),P&&e.usedDuplicates[I])e.dump="*ref_"+I;else{if(T&&P&&!e.usedDuplicates[I]&&(e.usedDuplicates[I]=!0),"[object Object]"===f)o&&0!==Object.keys(e.dump).length?(function Dp(e,t,r,o){var f,m,S,T,I,P,i="",s=e.tag,u=Object.keys(r);if(!0===e.sortKeys)u.sort();else if("function"==typeof e.sortKeys)u.sort(e.sortKeys);else if(e.sortKeys)throw new ji("sortKeys must be a boolean or a function");for(f=0,m=u.length;f1024)&&(e.dump&&dl===e.dump.charCodeAt(0)?P+="?":P+="? "),P+=e.dump,I&&(P+=Is(e,t)),Ws(e,t+1,T,!0,I)&&(e.dump&&dl===e.dump.charCodeAt(0)?P+=":":P+=": ",i+=P+=e.dump));e.tag=s,e.dump=i||"{}"}(e,t,e.dump,i),P&&(e.dump="&ref_"+I+e.dump)):(function jp(e,t,r){var u,f,m,S,T,o="",i=e.tag,s=Object.keys(r);for(u=0,f=s.length;u1024&&(T+="? "),T+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),Ws(e,t,S,!1,!1)&&(o+=T+=e.dump));e.tag=i,e.dump="{"+o+"}"}(e,t,e.dump),P&&(e.dump="&ref_"+I+" "+e.dump));else if("[object Array]"===f)o&&0!==e.dump.length?(function vc(e,t,r,o){var u,f,m,i="",s=e.tag;for(u=0,f=r.length;u"u"&&Ws(e,t+1,null,!0,!0,!1,!0))&&((!o||""!==i)&&(i+=Is(e,t)),e.dump&&dl===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}(e,e.noArrayIndent&&!u&&t>0?t-1:t,e.dump,i),P&&(e.dump="&ref_"+I+e.dump)):(function hf(e,t,r){var s,u,f,o="",i=e.tag;for(s=0,u=r.length;s"u"&&Ws(e,t,null,!1,!1))&&(""!==o&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=i,e.dump="["+o+"]"}(e,t,e.dump),P&&(e.dump="&ref_"+I+" "+e.dump));else{if("[object String]"!==f){if("[object Undefined]"===f)return!1;if(e.skipInvalid)return!1;throw new ji("unacceptable kind of an object to dump "+f)}"?"!==e.tag&&Vl(e,e.dump,t,s,m)}null!==e.tag&&"?"!==e.tag&&(S=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),S="!"===e.tag[0]?"!"+S:"tag:yaml.org,2002:"===S.slice(0,18)?"!!"+S.slice(18):"!<"+S+">",e.dump=S+" "+e.dump)}return!0}function mf(e,t){var i,s,r=[],o=[];for(pu(e,r,o),i=0,s=o.length;i/(json|xml|yaml|text)\b/.test(e);function bf(e={}){return"function"!=typeof e.entries?{}:Array.from(e.entries()).reduce((t,[r,o])=>(t[r]=function Up(e){return e.includes(", ")?e.split(", "):e}(o),t),{})}function xf(e,t,{loadSpec:r=!1}={}){const o={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:bf(e.headers)},i=o.headers["content-type"],s=r||Bp(i);return(s?e.text:e.blob||e.buffer).call(e).then(f=>{if(o.text=f,o.data=f,s)try{const m=function Ad(e,t){if(t){if(0===t.indexOf("application/json")||t.indexOf("+json")>0)return JSON.parse(e);if(0===t.indexOf("application/xml")||t.indexOf("+xml")>0)return e}return Cd.load(e)}(f,i);o.body=m,o.obj=m}catch(m){o.parseError=m}return o})}function Gl(e){return xc.apply(this,arguments)}function xc(){return(xc=(0,b.A)(function*(e,t={}){let o;"object"==typeof e&&(e=(t=e).url),t.headers=t.headers||{},(t=yi(t)).headers&&Object.keys(t.headers).forEach(i=>{const s=t.headers[i];"string"==typeof s&&(t.headers[i]=s.replace(/\n+/g," "))}),t.requestInterceptor&&(t=(yield t.requestInterceptor(t))||t),/multipart\/form-data/i.test(t.headers["content-type"]||t.headers["Content-Type"])&&(delete t.headers["content-type"],delete t.headers["Content-Type"]);try{o=yield(t.userFetch||fetch)(t.url,t),o=yield xf(o,e,t),t.responseInterceptor&&(o=(yield t.responseInterceptor(o))||o)}catch(i){if(!o)throw i;const s=new Error(o.statusText||`response status is ${o.status}`);throw s.status=o.status,s.statusCode=o.status,s.responseError=i,s}if(!o.ok){const i=new Error(o.statusText||`response status is ${o.status}`);throw i.status=o.status,i.statusCode=o.status,i.response=o,i}return o})).apply(this,arguments)}function Sc(e,t,r){return r=r||(o=>o),t=t||(o=>o),o=>("string"==typeof o&&(o={url:o}),o=yi(o),o=t(o),r(e(o)))}const ds=e=>{var t,r;const{baseDoc:o,url:i}=e,s=null!==(t=o??i)&&void 0!==t?t:"";return"string"==typeof(null===(r=globalThis.document)||void 0===r?void 0:r.baseURI)?String(new URL(s,globalThis.document.baseURI)):s},Gu=e=>{const{fetch:t,http:r}=e;return t||r||Gl};var e,Qi=(e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,i){o.__proto__=i}||function(o,i){for(var s in i)i.hasOwnProperty(s)&&(o[s]=i[s])})(t,r)},function(t,r){function o(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}),ja=Object.prototype.hasOwnProperty;function sa(e,t){return ja.call(e,t)}function Ku(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r=48&&o<=57))return!1;t++}return!0}function Gs(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Sf(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Rs(e){if(void 0===e)return!0;if(e)if(Array.isArray(e)){for(var t=0,r=e.length;t0&&"constructor"==m[T-1]))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&void 0===P&&(void 0===S[O]?P=m.slice(0,T).join("/"):T==I-1&&(P=t.path),void 0!==P&&M(t,0,e,P)),T++,Array.isArray(S)){if("-"===O)O=S.length;else{if(r&&!Da(O))throw new zi("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",s,t,e);Da(O)&&(O=~~O)}if(T>=I){if(r&&"add"===t.op&&O>S.length)throw new zi("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",s,t,e);if(!1===(u=_c[t.op].call(t,S,O,e)).test)throw new zi("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return u}}else if(T>=I){if(!1===(u=mu[t.op].call(t,S,O,e)).test)throw new zi("Test operation failed","TEST_OPERATION_FAILED",s,t,e);return u}if(S=S[O],r&&T0)throw new zi('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new zi("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new zi("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&Rs(e.value))throw new zi("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r)if("add"==e.op){var i=e.path.split("/").length,s=o.split("/").length;if(i!==s+1&&i!==s)throw new zi("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==o)throw new zi("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if("move"===e.op||"copy"===e.op){var f=Td([{op:"_get",path:e.from,value:void 0}],r);if(f&&"OPERATION_PATH_UNRESOLVABLE"===f.name)throw new zi("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}function Td(e,t,r){try{if(!Array.isArray(e))throw new zi("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Ks(wa(t),wa(e),r||!0);else{r=r||Zu;for(var o=0;o0&&(e.patches=[],e.callback&&e.callback(o)),o}function Pd(e,t,r,o,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var s=Ku(t),u=Ku(e),m=!1,S=u.length-1;S>=0;S--){var I=e[T=u[S]];if(!sa(t,T)||void 0===t[T]&&void 0!==I&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(i&&r.push({op:"test",path:o+"/"+Gs(T),value:wa(I)}),r.push({op:"remove",path:o+"/"+Gs(T)}),m=!0):(i&&r.push({op:"test",path:o,value:e}),r.push({op:"replace",path:o,value:t}));else{var P=t[T];"object"==typeof I&&null!=I&&"object"==typeof P&&null!=P&&Array.isArray(I)===Array.isArray(P)?Pd(I,P,r,o+"/"+Gs(T),i):I!==P&&(i&&r.push({op:"test",path:o+"/"+Gs(T),value:wa(I)}),r.push({op:"replace",path:o+"/"+Gs(T),value:wa(P)}))}}if(m||s.length!=u.length)for(S=0;Stypeof o<"u"&&r?r[o]:r,e)},applyPatch:function Gp(e,t,r){if(r=r||{},"merge"===(t={...t,path:t.path&&Md(t.path)}).op){const o=Tf(e,t.path);Object.assign(o,t.value),Ks(e,[qu(t.path,o)])}else if("mergeDeep"===t.op){const o=Tf(e,t.path),i=Ps()(o,t.value,{customMerge:s=>{if("enum"===s)return(u,f)=>Array.isArray(u)&&Array.isArray(f)?[...new Set([...u,...f])]:Ps()(u,f)}});e=Ks(e,[qu(t.path,i)]).newDocument}else if("add"===t.op&&""===t.path&&Il(t.value))Ks(e,Object.keys(t.value).reduce((i,s)=>(i.push({op:"add",path:`/${Md(s)}`,value:t.value[s]}),i),[]));else if("replace"===t.op&&""===t.path){let{value:o}=t;r.allowMetaPatches&&t.meta&&ec(t)&&(Array.isArray(t.value)||Il(t.value))&&(o={...o,...t.meta}),e=o}else if(Ks(e,[t]),r.allowMetaPatches&&t.meta&&ec(t)&&(Array.isArray(t.value)||Il(t.value))){const i={...Tf(e,t.path),...t.meta};Ks(e,[qu(t.path,i)])}return e},parentPathMatch:function Zp(e,t){if(!Array.isArray(t))return!1;for(let r=0,o=t.length;r(t+"").replace(/~/g,"~0").replace(/\//g,"~1")).join("/")}`:e}function qu(e,t,r){return{op:"replace",path:e,value:t,meta:r}}function jd(e,t,r){return Ld(ps(e.filter(ec).map(u=>t(u.value,r,u.path))||[]))}function Cf(e,t,r){return r=r||[],Array.isArray(e)?e.map((o,i)=>Cf(o,t,r.concat(i))):Il(e)?Object.keys(e).map(o=>Cf(e[o],t,r.concat(o))):t(e,r[r.length-1],r)}function Af(e,t,r){let o=[];if((r=r||[]).length>0){const i=t(e,r[r.length-1],r);i&&(o=o.concat(i))}if(Array.isArray(e)){const i=e.map((s,u)=>Af(s,t,r.concat(u)));i&&(o=o.concat(i))}else if(Il(e)){const i=Object.keys(e).map(s=>Af(e[s],t,r.concat(s)));i&&(o=o.concat(i))}return o=ps(o),o}function Fd(e){return Array.isArray(e)?e:[e]}function ps(e){return[].concat(...e.map(t=>Array.isArray(t)?ps(t):t))}function Ld(e){return e.filter(t=>typeof t<"u")}function Il(e){return e&&"object"==typeof e}function Bd(e){return e&&"function"==typeof e}function eh(e){if(Cc(e)){const{op:t}=e;return"add"===t||"remove"===t||"replace"===t}return!1}function Of(e){return eh(e)||Cc(e)&&"mutation"===e.type}function ec(e){return Of(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function Cc(e){return e&&"object"==typeof e}function Tf(e,t){try{return Yl(e,t)}catch(r){return console.error(r),{}}}var qh=n(48675);const em=class th extends qh{constructor(t,r,o){if(super(t,r,o),this.name=this.constructor.name,"string"==typeof r&&(this.message=r),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(r).stack,null!=o&&"object"==typeof o&&Object.hasOwn(o,"cause")&&!("cause"in this)){const{cause:i}=o;this.cause=i,i instanceof Error&&"stack"in i&&(this.stack=`${this.stack}\nCAUSE: ${i.stack}`)}}};class tm extends Error{static[Symbol.hasInstance](t){return super[Symbol.hasInstance](t)||Function.prototype[Symbol.hasInstance].call(em,t)}constructor(t,r){if(super(t,r),this.name=this.constructor.name,"string"==typeof t&&(this.message=t),"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack,null!=r&&"object"==typeof r&&Object.hasOwn(r,"cause")&&!("cause"in this)){const{cause:o}=r;this.cause=o,o instanceof Error&&"stack"in o&&(this.stack=`${this.stack}\nCAUSE: ${o.stack}`)}}}const rh=tm,Ud=class nh extends rh{constructor(t,r){if(super(t,r),null!=r&&"object"==typeof r){const{cause:o,...i}=r;Object.assign(this,i)}}};function Ac(e,t){switch(e){case 0:return function(){return t.apply(this,arguments)};case 1:return function(r){return t.apply(this,arguments)};case 2:return function(r,o){return t.apply(this,arguments)};case 3:return function(r,o,i){return t.apply(this,arguments)};case 4:return function(r,o,i,s){return t.apply(this,arguments)};case 5:return function(r,o,i,s,u){return t.apply(this,arguments)};case 6:return function(r,o,i,s,u,f){return t.apply(this,arguments)};case 7:return function(r,o,i,s,u,f,m){return t.apply(this,arguments)};case 8:return function(r,o,i,s,u,f,m,S){return t.apply(this,arguments)};case 9:return function(r,o,i,s,u,f,m,S,T){return t.apply(this,arguments)};case 10:return function(r,o,i,s,u,f,m,S,T,I){return t.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function oh(e,t){return function(){return t.call(this,e.apply(this,arguments))}}function bi(e){return null!=e&&"object"==typeof e&&!0===e["@@functional/placeholder"]}function mi(e){return function t(r){return 0===arguments.length||bi(r)?t:e.apply(this,arguments)}}function gi(e){return function t(r,o){switch(arguments.length){case 0:return t;case 1:return bi(r)?t:mi(function(i){return e(r,i)});default:return bi(r)&&bi(o)?t:bi(r)?mi(function(i){return e(i,o)}):bi(o)?mi(function(i){return e(r,i)}):e(r,o)}}}function gu(e){return function t(r,o,i){switch(arguments.length){case 0:return t;case 1:return bi(r)?t:gi(function(s,u){return e(r,s,u)});case 2:return bi(r)&&bi(o)?t:bi(r)?gi(function(s,u){return e(s,o,u)}):bi(o)?gi(function(s,u){return e(r,s,u)}):mi(function(s){return e(r,o,s)});default:return bi(r)&&bi(o)&&bi(i)?t:bi(r)&&bi(o)?gi(function(s,u){return e(s,u,i)}):bi(r)&&bi(i)?gi(function(s,u){return e(s,o,u)}):bi(o)&&bi(i)?gi(function(s,u){return e(r,s,u)}):bi(r)?mi(function(s){return e(s,o,i)}):bi(o)?mi(function(s){return e(r,s,i)}):bi(i)?mi(function(s){return e(r,o,s)}):e(r,o,i)}}}const Oc=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};function $d(e){return"[object String]"===Object.prototype.toString.call(e)}const If=mi(function(t){return!!Oc(t)||!(!t||"object"!=typeof t||$d(t))&&(0===t.length||t.length>0&&t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1))});var Rf=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function Zn(e,t,r){return function(i,s,u){if(If(u))return e(i,s,u);if(null==u)return s;if("function"==typeof u["fantasy-land/reduce"])return t(i,s,u,"fantasy-land/reduce");if(null!=u[Rf])return r(i,s,u[Rf]());if("function"==typeof u.next)return r(i,s,u);if("function"==typeof u.reduce)return t(i,s,u,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function Wa(e,t,r){for(var o=0,i=r.length;o=arguments.length)?m=t[u]:(m=arguments[i],i+=1),o[u]=m,bi(m)?f=!0:s-=1,u+=1}return!f&&s<=0?r.apply(this,o):Ac(Math.max(0,s),kf(e,o,r))}}var ml=gi(function(t,r){return 1===t?mi(r):Ac(t,kf(t,[],r))});const qi=ml;const Mc=mi(function(t){return qi(t.length,t)});function kc(e){var t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t||"[object GeneratorFunction]"===t||"[object AsyncGeneratorFunction]"===t}function Nf(e){for(var r,t=[];!(r=e.next()).done;)t.push(r.value);return t}function gl(e,t,r){for(var o=0,i=r.length;o=0;)Js(r=Rl[o],t)&&!Df(i,r)&&(i[i.length]=r),o-=1;return i}:function(t){return Object(t)!==t?[]:Object.keys(t)});const yu=Ms;const Ml=mi(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function ih(e,t,r,o){var i=Nf(e);function u(f,m){return Ff(f,m,r.slice(),o.slice())}return!gl(function(f,m){return!gl(u,m,f)},Nf(t),i)}function Ff(e,t,r,o){if(hs(e,t))return!0;var i=Ml(e);if(i!==Ml(t))return!1;if("function"==typeof e["fantasy-land/equals"]||"function"==typeof t["fantasy-land/equals"])return"function"==typeof e["fantasy-land/equals"]&&e["fantasy-land/equals"](t)&&"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](e);if("function"==typeof e.equals||"function"==typeof t.equals)return"function"==typeof e.equals&&e.equals(t)&&"function"==typeof t.equals&&t.equals(e);switch(i){case"Arguments":case"Array":case"Object":if("function"==typeof e.constructor&&"Promise"===function Nc(e){var t=String(e).match(/^function (\w*)/);return null==t?"":t[1]}(e.constructor))return e===t;break;case"Boolean":case"Number":case"String":if(typeof e!=typeof t||!hs(e.valueOf(),t.valueOf()))return!1;break;case"Date":if(!hs(e.valueOf(),t.valueOf()))return!1;break;case"Error":return e.name===t.name&&e.message===t.message;case"RegExp":if(e.source!==t.source||e.global!==t.global||e.ignoreCase!==t.ignoreCase||e.multiline!==t.multiline||e.sticky!==t.sticky||e.unicode!==t.unicode)return!1}for(var s=r.length-1;s>=0;){if(r[s]===e)return o[s]===t;s-=1}switch(i){case"Map":return e.size===t.size&&ih(e.entries(),t.entries(),r.concat([e]),o.concat([t]));case"Set":return e.size===t.size&&ih(e.values(),t.values(),r.concat([e]),o.concat([t]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=yu(e);if(u.length!==yu(t).length)return!1;var f=r.concat([e]),m=o.concat([t]);for(s=u.length-1;s>=0;){var S=u[s];if(!Js(S,t)||!Ff(t[S],e[S],f,m))return!1;s-=1}return!0}var ah=gi(function(t,r){return Ff(t,r,[],[])});const Zl=ah;function Eu(e,t){return function Vd(e,t,r){var o,i;if("function"==typeof e.indexOf)switch(typeof t){case"number":if(0===t){for(o=1/t;r=0}function Lc(e,t){for(var r=0,o=t.length,i=Array(o);r":Gd(u,f)},o=function(s,u){return Lc(function(f){return Lf(f)+": "+r(s[f])},u.slice().sort())};switch(Object.prototype.toString.call(e)){case"[object Arguments]":return"(function() { return arguments; }("+Lc(r,e).join(", ")+"))";case"[object Array]":return"["+Lc(r,e).concat(o(e,lm(function(s){return/^\d+$/.test(s)},yu(e)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof e?"new Boolean("+r(e.valueOf())+")":e.toString();case"[object Date]":return"new Date("+(isNaN(e.valueOf())?r(NaN):Lf(om(e)))+")";case"[object Map]":return"new Map("+r(Array.from(e))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof e?"new Number("+r(e.valueOf())+")":1/e==-1/0?"-0":e.toString(10);case"[object Set]":return"new Set("+r(Array.from(e).sort())+")";case"[object String]":return"object"==typeof e?"new String("+r(e.valueOf())+")":Lf(e);case"[object Undefined]":return"undefined";default:if("function"==typeof e.toString){var i=e.toString();if("[object Object]"!==i)return i}return"{"+o(e,yu(e)).join(", ")+"}"}}const La=mi(function(t){return Gd(t,[])});var Kd=gi(function(t,r){return qi(t+1,function(){var o=arguments[t];if(null!=o&&kc(o[r]))return o[r].apply(o,Array.prototype.slice.call(arguments,0,t));throw new TypeError(La(o)+' does not have a method named "'+r+'"')})});const ch=Kd,Bf=ch(1,"split");function ic(e,t){for(var r=t.length-1;r>=0&&e(t[r]);)r-=1;return Mf(0,r+1,t)}var Yd=function(){function e(t,r){this.f=t,this.retained=[],this.xf=r}return e.prototype["@@transducer/init"]=Uc_init,e.prototype["@@transducer/result"]=function(t){return this.retained=null,this.xf["@@transducer/result"](t)},e.prototype["@@transducer/step"]=function(t,r){return this.f(r)?this.retain(t,r):this.flush(t,r)},e.prototype.flush=function(t,r){return t=Tc(this.xf,t,this.retained),this.retained=[],this.xf["@@transducer/step"](t,r)},e.prototype.retain=function(t,r){return this.retained.push(r),t},e}();function Jd(e){return function(t){return new Yd(e,t)}}const cm=gi(Wd([],Jd,ic)),Uf=ch(1,"join");var Zd=mi(function(t){return qi(t.length,function(r,o){var i=Array.prototype.slice.call(arguments,0);return i[0]=o,i[1]=r,t.apply(this,i)})});const $c=Zd(gi(Eu));var dm=Mc(function(e,t){return Ys(Bf(""),cm($c(e)),Uf(""))(t)});const $f=dm;function pm(e,t,r){for(var o=r.next();!o.done;)t=e(t,o.value),o=r.next();return t}function zc(e,t,r,o){return r[o](e,t)}const zf=Zn(Bc,zc,pm);var a=function(){function e(t,r){this.xf=r,this.f=t}return e.prototype["@@transducer/init"]=Uc_init,e.prototype["@@transducer/result"]=Uc_result,e.prototype["@@transducer/step"]=function(t,r){return this.xf["@@transducer/step"](t,this.f(r))},e}(),l=function(t){return function(r){return new a(t,r)}},k=gi(Wd(["fantasy-land/map","map"],l,function(t,r){switch(Object.prototype.toString.call(r)){case"[object Function]":return qi(r.length,function(){return t.call(this,r.apply(this,arguments))});case"[object Object]":return Bc(function(o,i){return o[i]=t(r[i]),o},{},yu(r));default:return Lc(t,r)}}));const z=k;var re=gi(function(t,r){return"function"==typeof r["fantasy-land/ap"]?r["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(r):"function"==typeof t?function(o){return t(o)(r(o))}:zf(function(o,i){return function dh(e,t){var r,o=(e=e||[]).length,i=(t=t||[]).length,s=[];for(r=0;r{try{const t=new URL(e);return $f(":",t.protocol)}catch{return}},l1=(Ys(bo,uo),e=>{const t=bo(e);return"http"===t||"https"===t}),ep=(e,t)=>{const r=new URL(t,new URL(e,"resolve://"));if("resolve:"===r.protocol){const{pathname:o,search:i,hash:s}=r;return o+i+s}return r.toString()};function Dg(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r"u"?"undefined":Hf(e))&&null!==e){var r;if(Hg(e))r=[];else if(y1(e))r=new Date(e.getTime?e.getTime():e);else if(E1(e))r=new RegExp(e);else if(b1(e))r={message:e.message};else if(x1(e)||S1(e)||_1(e))r=Object(e);else{if(zg(e))return e.slice();r=Object.create(Object.getPrototypeOf(e))}var o=t.includeSymbols?gm:Object.keys,i=!0,s=!1,u=void 0;try{for(var m,f=o(e)[Symbol.iterator]();!(i=(m=f.next()).done);i=!0){var S=m.value;r[S]=e[S]}}catch(T){s=!0,u=T}finally{try{!i&&null!=f.return&&f.return()}finally{if(s)throw u}}return r}return e}var Wg={includeSymbols:!1,immutable:!1};function Gg(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Wg,o=[],i=[],s=!0,u=r.includeSymbols?gm:Object.keys,f=!!r.immutable;return function m(S){var T=f?Vg(S,r):S,I={},P=!0,O={node:T,node_:S,path:[].concat(o),parent:i[i.length-1],parents:i,key:o[o.length-1],isRoot:0===o.length,level:o.length,circular:void 0,isLeaf:!1,notLeaf:!0,notRoot:!0,isFirst:!1,isLast:!1,update:function(wt){var Ot=arguments.length>1&&void 0!==arguments[1]&&arguments[1];O.isRoot||(O.parent.node[O.key]=wt),O.node=wt,Ot&&(P=!1)},delete:function(wt){delete O.parent.node[O.key],wt&&(P=!1)},remove:function(wt){Hg(O.parent.node)?O.parent.node.splice(O.key,1):delete O.parent.node[O.key],wt&&(P=!1)},keys:null,before:function(wt){I.before=wt},after:function(wt){I.after=wt},pre:function(wt){I.pre=wt},post:function(wt){I.post=wt},stop:function(){s=!1},block:function(){P=!1}};if(!s)return O;function M(){if("object"===Hf(O.node)&&null!==O.node){(!O.keys||O.node_!==O.node)&&(O.keys=u(O.node)),O.isLeaf=0===O.keys.length;for(var Ze=0;Ze1&&void 0!==arguments[1]?arguments[1]:Wg;(function d1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),$g(this,ks),$g(this,ac),mm(this,ks,t),mm(this,ac,r)}return function p1(e,t,r){t&&Fg(e.prototype,t),r&&Fg(e,r)}(e,[{key:"get",value:function(r){for(var o=gs(this,ks),i=0;o&&i"u"?"undefined":Hf(s)))return;o=o[s]}return o}},{key:"has",value:function(r){for(var o=gs(this,ks),i=0;o&&i"u"?"undefined":Hf(s)))return!1;o=o[s]}return!0}},{key:"set",value:function(r,o){var i=gs(this,ks),s=0;for(s=0;s"u"?"undefined":Hf(u))&&null!==u){var m=Vg(u,i);r.push(u),o.push(m);var S=i.includeSymbols?gm:Object.keys,T=!0,I=!1,P=void 0;try{for(var M,O=S(u)[Symbol.iterator]();!(T=(M=O.next()).done);T=!0){var d=M.value;m[d]=s(u[d])}}catch(D){I=!0,P=D}finally{try{!T&&null!=O.return&&O.return()}finally{if(I)throw P}}return r.pop(),o.pop(),m}return u}(gs(this,ks))}}]),e}();ks=new WeakMap,ac=new WeakMap;var tu=function(e,t){return new eu(e,t)};tu.get=function(e,t,r){return new eu(e,r).get(t)},tu.set=function(e,t,r,o){return new eu(e,o).set(t,r)},tu.has=function(e,t,r){return new eu(e,r).has(t)},tu.map=function(e,t,r){return new eu(e,r).map(t)},tu.forEach=function(e,t,r){return new eu(e,r).forEach(t)},tu.reduce=function(e,t,r,o){return new eu(e,o).reduce(t,r)},tu.paths=function(e,t){return new eu(e,t).paths()},tu.nodes=function(e,t){return new eu(e,t).nodes()},tu.clone=function(e,t){return new eu(e,t).clone()};var T1=tu;const I1=["properties"],R1=["properties"],P1=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],M1=["schema/example","items/example"];function Kg(e){const t=e[e.length-1],r=e[e.length-2],o=e.join("/");return I1.indexOf(t)>-1&&-1===R1.indexOf(r)||P1.indexOf(o)>-1||M1.some(i=>o.indexOf(i)>-1)}function vm(e,t){const[r,o]=e.split("#"),i=t??"",s=r??"";let u;if(l1(i))u=ep(i,s);else{const f=ep(Ua,i),S=ep(f,s).replace(Ua,"");u=s.startsWith("/")?S:S.substring(1)}return o?`${u}#${o}`:u}const N1=/^([a-z]+:\/\/|\/\/)/i;class Wf extends Ud{}const Su={},Yg=new WeakMap,j1=[e=>"paths"===e[0]&&"responses"===e[3]&&"examples"===e[5],e=>"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"example"===e[7],e=>"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"examples"===e[7]&&"value"===e[9],e=>"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"example"===e[6],e=>"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"examples"===e[6]&&"value"===e[8],e=>"paths"===e[0]&&"parameters"===e[2]&&"example"===e[4],e=>"paths"===e[0]&&"parameters"===e[3]&&"example"===e[5],e=>"paths"===e[0]&&"parameters"===e[2]&&"examples"===e[4]&&"value"===e[6],e=>"paths"===e[0]&&"parameters"===e[3]&&"examples"===e[5]&&"value"===e[7],e=>"paths"===e[0]&&"parameters"===e[2]&&"content"===e[4]&&"example"===e[6],e=>"paths"===e[0]&&"parameters"===e[2]&&"content"===e[4]&&"examples"===e[6]&&"value"===e[8],e=>"paths"===e[0]&&"parameters"===e[3]&&"content"===e[4]&&"example"===e[7],e=>"paths"===e[0]&&"parameters"===e[3]&&"content"===e[5]&&"examples"===e[7]&&"value"===e[9]],Jg=Object.assign({key:"$ref",plugin:(e,t,r,o)=>{const i=o.getInstance(),s=r.slice(0,-1);if(Kg(s)||(e=>j1.some(t=>t(e)))(s))return;const{baseDoc:u}=o.getContext(r);if("string"!=typeof e)return new Wf("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:u,fullPath:r});const f=Zg(e),m=f[0],S=f[1]||"";let T,I,P;try{T=u||m?Xg(m,u):null}catch(d){return ym(d,{pointer:S,$ref:e,basePath:T,fullPath:r})}if(function z1(e,t,r,o){let i=Yg.get(o);i||(i={},Yg.set(o,i));const s=function U1(e){return 0===e.length?"":`/${e.map(tv).join("/")}`}(r),u=`${t||""}#${e}`,f=s.replace(/allOf\/\d+\/?/g,"");if(t===o.contextTree.get([]).baseDoc&&xm(f,e))return!0;let S="";if(r.some(I=>(S=`${S}/${tv(I)}`,i[S]&&i[S].some(P=>xm(P,u)||xm(u,P)))))return!0;i[f]=(i[f]||[]).concat(u)}(S,T,s,o)&&!i.useCircularStructures){const d=vm(e,T);return e===d?null:co.replace(r,d)}if(null==T?(P=bm(S),I=o.get(P),typeof I>"u"&&(I=new Wf(`Could not resolve reference: ${e}`,{pointer:S,$ref:e,baseDoc:u,fullPath:r}))):(I=Qg(T,S),I=null!=I.__value?I.__value:I.catch(d=>{throw ym(d,{pointer:S,$ref:e,baseDoc:u,fullPath:r})})),I instanceof Error)return[co.remove(r),I];const O=vm(e,T),M=co.replace(s,I,{$$ref:O});if(T&&T!==u)return[M,co.context(s,{baseDoc:T})];try{if(!function H1(e,t){const r=[e];return t.path.reduce((i,s)=>(r.push(i[s]),i[s]),e),function o(i){return co.isObject(i)&&(r.indexOf(i)>=0||Object.keys(i).some(s=>o(i[s])))}(t.value)}(o.state,M)||i.useCircularStructures)return M}catch{return null}}},{docCache:Su,absoluteify:Xg,clearCache:function L1(e){typeof e<"u"?delete Su[e]:Object.keys(Su).forEach(t=>{delete Su[t]})},JSONRefError:Wf,wrapError:ym,getDoc:qg,split:Zg,extractFromDoc:Qg,fetchJSON:function B1(e){return fetch(e,{headers:{Accept:Si},loadSpec:!0}).then(t=>t.text()).then(t=>Cd.load(t))},extract:Em,jsonPointerToArray:bm,unescapeJsonPointerToken:ev}),F1=Jg;function Xg(e,t){if(!N1.test(e)){if(!t)throw new Wf(`Tried to resolve a relative URL, without having a basePath. path: '${e}' basePath: '${t}'`);return ep(t,e)}return e}function ym(e,t){let r;return r=e&&e.response&&e.response.body?`${e.response.body.code} ${e.response.body.message}`:e.message,new Wf(`Could not resolve reference: ${r}`,{...t,cause:e})}function Zg(e){return(e+"").split("#")}function Qg(e,t){const r=Su[e];if(r&&!co.isPromise(r))try{const o=Em(t,r);return Object.assign(Promise.resolve(o),{__value:o})}catch(o){return Promise.reject(o)}return qg(e).then(o=>Em(t,o))}function qg(e){const t=Su[e];return t?co.isPromise(t)?t:Promise.resolve(t):(Su[e]=Jg.fetchJSON(e).then(r=>(Su[e]=r,r)),Su[e])}function Em(e,t){const r=bm(e);if(r.length<1)return t;const o=co.getIn(t,r);if(typeof o>"u")throw new Wf(`Could not resolve pointer: ${e} does not exist in document`,{pointer:e});return o}function bm(e){if("string"!=typeof e)throw new TypeError("Expected a string, got a "+typeof e);return"/"===e[0]&&(e=e.substr(1)),""===e?[]:e.split("/").map(ev)}function ev(e){return"string"!=typeof e?e:new URLSearchParams(`=${e.replace(/~1/g,"/").replace(/~0/g,"~")}`).get("")}function tv(e){return new URLSearchParams([["",e.replace(/~/g,"~0").replace(/\//g,"~1")]]).toString().slice(1)}const $1=e=>!e||"/"===e||"#"===e;function xm(e,t){if($1(t))return!0;const r=e.charAt(t.length),o=t.slice(-1);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)&&"#"!==o}const V1={key:"allOf",plugin:(e,t,r,o,i)=>{if(i.meta&&i.meta.$$ref)return;const s=r.slice(0,-1);if(Kg(s))return;if(!Array.isArray(e)){const S=new TypeError("allOf must be an array");return S.fullPath=r,S}let u=!1,f=i.value;if(s.forEach(S=>{f&&(f=f[S])}),f={...f},0===Object.keys(f).length)return;delete f.allOf;const m=[];return m.push(o.replace(s,{})),e.forEach((S,T)=>{if(!o.isObject(S)){if(u)return null;u=!0;const O=new TypeError("Elements in allOf must be objects");return O.fullPath=r,m.push(O)}m.push(o.mergeDeep(s,S));const P=function k1(e,t,{specmap:r,getBaseUrlForNodePath:o=(s=>r.getContext([...t,...s]).baseDoc),targetKeys:i=["$ref","$$ref"]}={}){const s=[];return T1(e).forEach(function(){if(i.includes(this.key)&&"string"==typeof this.node){const f=this.path,m=t.concat(this.path),S=vm(this.node,o(f));s.push(r.replace(m,S))}}),s}(S,r.slice(0,-1),{getBaseUrlForNodePath:O=>o.getContext([...r,T,...O]).baseDoc,specmap:o});m.push(...P)}),f.example&&m.push(o.remove([].concat(s,"example"))),m.push(o.mergeDeep(s,f)),f.$$ref||m.push(o.remove([].concat(s,"$$ref"))),m}},W1={key:"parameters",plugin:(e,t,r,o)=>{if(Array.isArray(e)&&e.length){const i=Object.assign([],e),s=r.slice(0,-1),u={...co.getIn(o.spec,s)};for(let f=0;f{const i={...e};for(const u in e)try{i[u].default=o.modelPropertyMacro(i[u])}catch(f){const m=new Error(f);return m.fullPath=r,m}return co.replace(r,i)}};class K1{constructor(t){this.root=Sm(t||{})}set(t,r){const o=this.getParent(t,!0);if(!o)return void mh(this.root,r,null);const i=t[t.length-1],{children:s}=o;s[i]?mh(s[i],r,o):s[i]=Sm(r,o)}get(t){if((t=t||[]).length<1)return this.root.value;let o,i,r=this.root;for(let s=0;s{if(!o)return o;const{children:s}=o;return!s[i]&&r&&(s[i]=Sm(null,o)),s[i]},this.root)}}function Sm(e,t){return mh({children:{}},e,t)}function mh(e,t,r){return e.value=t||{},e.protoValue=r?{...r.protoValue,...e.value}:e.value,Object.keys(e.children).forEach(o=>{const i=e.children[o];e.children[o]=mh(i,i.value,e)}),e}const nv=()=>{};class Y1{static getPluginName(t){return t.pluginName}static getPatchesOfType(t,r){return t.filter(r)}constructor(t){Object.assign(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new K1,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Object.assign(Object.create(this),co,{getInstance:()=>this}),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=this.plugins.map(this.wrapPlugin.bind(this)).filter(co.isFunction),this.patches.push(co.add([],this.spec)),this.patches.push(co.context([],this.context)),this.updatePatches(this.patches)}debug(t,...r){this.debugLevel===t&&console.log(...r)}verbose(t,...r){"verbose"===this.debugLevel&&console.log(`[${t}] `,...r)}wrapPlugin(t,r){const{pathDiscriminator:o}=this;let s,i=null;return t[this.pluginProp]?(i=t,s=t[this.pluginProp]):co.isFunction(t)?s=t:co.isObject(t)&&(s=function u(f){const m=(S,T)=>!Array.isArray(S)||S.every((I,P)=>I===T[P]);return function*(T,I){const P={};for(const[M,d]of T.filter(co.isAdditiveMutation).entries()){if(!(M<3e3))return;yield*O(d.value,d.path,d)}function*O(M,d,D){if(co.isObject(M)){const L=d.length-1,G=d[L],Z=d.indexOf("properties"),we="properties"===G&&L===Z,xe=I.allowMetaPatches&&P[M.$$ref];for(const Ae of Object.keys(M)){const Se=M[Ae],qe=d.concat(Ae),Ue=co.isObject(Se),ut=M.$$ref;if(xe||Ue&&(I.allowMetaPatches&&ut&&m(o,qe)&&(P[ut]=!0),yield*O(Se,qe,D)),!we&&Ae===f.key){const Ze=m(o,d);(!o||Ze)&&(yield f.plugin(Se,Ae,qe,I,D))}}}else f.key===d[d.length-1]&&(yield f.plugin(M,f.key,d,I))}}}(t)),Object.assign(s.bind(i),{pluginName:t.name||r,isGenerator:co.isGenerator(s)})}nextPlugin(){return this.wrappedPlugins.find(t=>this.getMutationsForPlugin(t).length>0)}nextPromisedPatch(){if(this.promisedPatches.length>0)return Promise.race(this.promisedPatches.map(t=>t.value))}getPluginHistory(t){const r=this.constructor.getPluginName(t);return this.pluginHistory[r]||[]}getPluginRunCount(t){return this.getPluginHistory(t).length}getPluginHistoryTip(t){const r=this.getPluginHistory(t);return r&&r[r.length-1]||{}}getPluginMutationIndex(t){const r=this.getPluginHistoryTip(t).mutationIndex;return"number"!=typeof r?-1:r}updatePluginHistory(t,r){const o=this.constructor.getPluginName(t);this.pluginHistory[o]=this.pluginHistory[o]||[],this.pluginHistory[o].push(r)}updatePatches(t){co.normalizeArray(t).forEach(r=>{if(r instanceof Error)this.errors.push(r);else try{if(!co.isObject(r))return void this.debug("updatePatches","Got a non-object patch",r);if(this.showDebug&&this.allPatches.push(r),co.isPromise(r.value))return this.promisedPatches.push(r),void this.promisedPatchThen(r);if(co.isContextPatch(r))return void this.setContext(r.path,r.value);co.isMutation(r)&&this.updateMutations(r)}catch(o){console.error(o),this.errors.push(o)}})}updateMutations(t){"object"==typeof t.value&&!Array.isArray(t.value)&&this.allowMetaPatches&&(t.value={...t.value});const r=co.applyPatch(this.state,t,{allowMetaPatches:this.allowMetaPatches});r&&(this.mutations.push(t),this.state=r)}removePromisedPatch(t){const r=this.promisedPatches.indexOf(t);r<0?this.debug("Tried to remove a promisedPatch that isn't there!"):this.promisedPatches.splice(r,1)}promisedPatchThen(t){return t.value=t.value.then(r=>{const o={...t,value:r};this.removePromisedPatch(t),this.updatePatches(o)}).catch(r=>{this.removePromisedPatch(t),this.updatePatches(r)}),t.value}getMutations(t,r){return"number"!=typeof r&&(r=this.mutations.length),this.mutations.slice(t=t||0,r)}getCurrentMutations(){return this.getMutationsForPlugin(this.getCurrentPlugin())}getMutationsForPlugin(t){const r=this.getPluginMutationIndex(t);return this.getMutations(r+1)}getCurrentPlugin(){return this.currentPlugin}getLib(){return this.libMethods}_get(t){return co.getIn(this.state,t)}_getContext(t){return this.contextTree.get(t)}setContext(t,r){return this.contextTree.set(t,r)}_hasRun(t){return this.getPluginRunCount(this.getCurrentPlugin())>(t||0)}dispatch(){const t=this,r=this.nextPlugin();if(!r){const s=this.nextPromisedPatch();if(s)return s.then(()=>this.dispatch()).catch(()=>this.dispatch());const u={spec:this.state,errors:this.errors};return this.showDebug&&(u.patches=this.allPatches),Promise.resolve(u)}if(t.pluginCount=t.pluginCount||new WeakMap,t.pluginCount.set(r,(t.pluginCount.get(r)||0)+1),t.pluginCount[r]>100)return Promise.resolve({spec:t.state,errors:t.errors.concat(new Error("We've reached a hard limit of 100 plugin runs"))});if(r!==this.currentPlugin&&this.promisedPatches.length){const s=this.promisedPatches.map(u=>u.value);return Promise.all(s.map(u=>u.then(nv,nv))).then(()=>this.dispatch())}return function o(){t.currentPlugin=r;const s=t.getCurrentMutations(),u=t.mutations.length-1;try{if(r.isGenerator)for(const f of r(s,t.getLib()))i(f);else i(r(s,t.getLib()))}catch(f){console.error(f),i([Object.assign(Object.create(f),{plugin:r})])}finally{t.updatePluginHistory(r,{mutationIndex:u})}return t.dispatch()}();function i(s){s&&(s=co.fullyNormalizeArray(s),t.updatePatches(s,r))}}}const Gf={refs:F1,allOf:V1,parameters:W1,properties:G1};function _m(e){return wm.apply(this,arguments)}function wm(){return wm=(0,b.A)(function*(e){const{spec:t,mode:r,allowMetaPatches:o=!0,pathDiscriminator:i,modelPropertyMacro:s,parameterMacro:u,requestInterceptor:f,responseInterceptor:m,skipNormalization:S=!1,useCircularStructures:T,strategies:I}=e,P=ds(e),O=Gu(e),M=I.find(L=>L.match(t));return function d(L){return D.apply(this,arguments)}(t);function D(){return D=(0,b.A)(function*(L){P&&(Gf.refs.docCache[P]=L),Gf.refs.fetchJSON=ba(O,{requestInterceptor:f,responseInterceptor:m});const G=[Gf.refs];"function"==typeof u&&G.push(Gf.parameters),"function"==typeof s&&G.push(Gf.properties),"strict"!==r&&G.push(Gf.allOf);const Z=yield function J1(e){return new Y1(e).dispatch()}({spec:L,context:{baseDoc:P},plugins:G,allowMetaPatches:o,pathDiscriminator:i,parameterMacro:u,modelPropertyMacro:s,useCircularStructures:T});return S||(Z.spec=M.normalize(Z.spec)),Z}),D.apply(this,arguments)}}),wm.apply(this,arguments)}var ov=function(e,t){switch(arguments.length){case 0:return ov;case 1:return function r(o){return 0===arguments.length?r:hs(e,o)};default:return hs(e,t)}};const tp=ov,iv=Number.isInteger||function(t){return t<<0===t};function av(e,t){var r=e<0?t.length+e:e;return $d(t)?t.charAt(r):t[r]}var Z1=gu(function(t,r,o){return t(function X1(e,t){for(var r=t,o=0;oS!=S>m)return S>m?S:m}var i=o(t,r);if(void 0!==i)return i;var s=o(typeof t,typeof r);if(void 0!==s)return s===typeof t?t:r;var u=La(t),f=o(u,La(r));return void 0!==f&&f===u?t:r});const cv=sE;var lE=gi(function(t,r){if(null!=r)return iv(t)?av(t,r):r[t]});const uE=lE;var cE=gi(function(t,r){return z(uE(t),r)});const fv=cE;var fE=mi(function(t){return qi(Rc(cv,0,fv("length",t)),function(){for(var r=0,o=t.length;re.replace(/\W/gi,"_");function Om(e,t,r="",{v2OperationIdCompatibilityMode:o}={}){return e&&"object"==typeof e?(e.operationId||"").replace(/\s/g,"").length?pv(e.operationId):function SE(e,t,{v2OperationIdCompatibilityMode:r}={}){if(r){let o=`${t.toLowerCase()}_${e}`.replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return o=o||`${e.substring(1)}_${t}`,o.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return`${t.toLowerCase()}${pv(e)}`}(t,r,{v2OperationIdCompatibilityMode:o}):null}function Tm(e){const{spec:t}=e,{paths:r}=t,o={};if(!r||t.$$normalized)return e;for(const i in r){const s=r[i];if(null==s||!["object","function"].includes(typeof s))continue;const u=s.parameters;for(const f in s){const m=s[f];if(null==m||!["object","function"].includes(typeof m))continue;const S=Om(m,i,f);if(S){o[S]?o[S].push(m):o[S]=[m];const T=o[S];if(T.length>1)T.forEach((I,P)=>{I.__originalOperationId=I.__originalOperationId||I.operationId,I.operationId=`${S}${P+1}`});else if(typeof m.operationId<"u"){const I=T[0];I.__originalOperationId=I.__originalOperationId||m.operationId,I.operationId=S}}if("parameters"!==f){const T=[],I={};for(const P in t)("produces"===P||"consumes"===P||"security"===P)&&(I[P]=t[P],T.push(I));if(u&&(I.parameters=u,T.push(I)),T.length)for(const P of T)for(const O in P)if(Array.isArray(m[O])){if("parameters"===O)for(const M of P[O])m[O].some(D=>!(!Kf(D)&&!Kf(M))&&(D===M||["name","$ref","$$ref"].some(L=>"string"==typeof D[L]&&"string"==typeof M[L]&&D[L]===M[L])))||m[O].push(M)}else m[O]=P[O]}}}return t.$$normalized=!0,e}const hv={name:"generic",match:()=>!0,normalize(e){const{spec:t}=Tm({spec:e});return t},resolve:e=>(0,b.A)(function*(){return _m(e)})()};function Im(){return Im=(0,b.A)(function*(e){return _m(e)}),Im.apply(this,arguments)}const mv=e=>{try{const{openapi:t}=e;return"string"==typeof t&&/^3\.0\.(?:[1-9]\d*|0)$/.test(t)}catch{return!1}},gv=e=>{try{const{openapi:t}=e;return"string"==typeof t&&/^3\.1\.(?:[1-9]\d*|0)$/.test(t)}catch{return!1}},vv=e=>mv(e)||gv(e)||(e=>{try{const{openapi:t}=e;return"string"==typeof t&&/^3\.2\.(?:[1-9]\d*|0)$/.test(t)}catch{return!1}})(e),yv={name:"openapi-2",match:e=>(e=>{try{const{swagger:t}=e;return"2.0"===t}catch{return!1}})(e),normalize(e){const{spec:t}=Tm({spec:e});return t},resolve:e=>(0,b.A)(function*(){return function _E(e){return Im.apply(this,arguments)}(e)})()};function Rm(){return Rm=(0,b.A)(function*(e){return _m(e)}),Rm.apply(this,arguments)}const Ev={name:"openapi-3-0",match:e=>mv(e),normalize(e){const{spec:t}=Tm({spec:e});return t},resolve:e=>(0,b.A)(function*(){return function AE(e){return Rm.apply(this,arguments)}(e)})()},OE=function(){var e=(0,b.A)(function*(t){const{spec:r,requestInterceptor:o,responseInterceptor:i}=t,s=ds(t),u=Gu(t),f=r||(yield ba(u,{requestInterceptor:o,responseInterceptor:i})(s)),m={...t,spec:f};return t.strategies.find(T=>T.match(f)).resolve(m)});return function(r){return e.apply(this,arguments)}}(),bv=(e=>function(){var t=(0,b.A)(function*(r){const o={...e,...r};return OE(o)});return function(r){return t.apply(this,arguments)}}())({strategies:[Ev,yv,hv]});const xv=mi(function(t){return null==t});var IE=gi(function(t,r){if(0===t.length||xv(r))return!1;for(var o=r,i=0;i{this.state=t.ACTIVE,this.phraseLength=0}};o.parse=(Oe,Pe,it,Ke)=>{const Lt=`${i}parse(): `;u=0,f=0,m=0,S=0,T=0,I=void 0,P=void 0,O=void 0,M=void 0,d.refresh(),D=void 0,L=void 0,G=void 0,M=r.stringToChars(it),I=Oe.rules,P=Oe.udts;const sr=Pe.toLowerCase();let yr;for(const Me in I)if(I.hasOwnProperty(Me)&&sr===I[Me].lower){yr=I[Me].index;break}if(void 0===yr)throw new Error(`${Lt}start rule name '${startRule}' not recognized`);(()=>{const Oe=`${i}initializeCallbacks(): `;let Pe,it;for(D=[],L=[],Pe=0;Pe{if(Pe.phraseLength>it){let Lt=`${i}opRNM(${Oe.name}): callback function error: `;throw Lt+=`sysData.phraseLength: ${Pe.phraseLength}`,Lt+=` must be <= remaining chars: ${it}`,new Error(Lt)}switch(Pe.state){case t.ACTIVE:if(!Ke)throw new Error(`${i}opRNM(${Oe.name}): callback function return error. ACTIVE state not allowed.`);break;case t.EMPTY:Pe.phraseLength=0;break;case t.MATCH:0===Pe.phraseLength&&(Pe.state=t.EMPTY);break;case t.NOMATCH:Pe.phraseLength=0;break;default:throw new Error(`${i}opRNM(${Oe.name}): callback function return error. Unrecognized return state: ${Pe.state}`)}},Xe=(Oe,Pe)=>{const it=`${i}opExecute(): `,Ke=O[Oe];switch(S+=1,f>m&&(m=f),f+=1,d.refresh(),o.trace&&o.trace.down(Ke,Pe),Ke.type){case t.ALT:((Oe,Pe)=>{const it=O[Oe];for(let Ke=0;Ke{let it,Ke,Lt,sr;const yr=O[Oe];o.ast&&(Ke=o.ast.getLength()),it=!0,Lt=Pe,sr=0;for(let pt=0;pt{let it,Ke,Lt,sr;const yr=O[Oe];if(0===yr.max)return d.state=t.EMPTY,void(d.phraseLength=0);for(Ke=Pe,Lt=0,sr=0,o.ast&&(it=o.ast.getLength());!(Ke>=M.length||(Xe(Oe+1,Ke),d.state===t.NOMATCH)||d.state===t.EMPTY||(sr+=1,Lt+=d.phraseLength,Ke+=d.phraseLength,sr===yr.max)););d.state===t.EMPTY||sr>=yr.min?(d.state=0===Lt?t.EMPTY:t.MATCH,d.phraseLength=Lt):(d.state=t.NOMATCH,d.phraseLength=0,o.ast&&o.ast.setLength(it))})(Oe,Pe);break;case t.RNM:((Oe,Pe)=>{let it,Ke,Lt;const sr=O[Oe],yr=I[sr.index],pt=D[yr.index];if(u||(Ke=o.ast&&o.ast.ruleDefined(sr.index),Ke&&(it=o.ast.getLength(),o.ast.down(sr.index,I[sr.index].name))),pt){const Me=M.length-Pe;pt(d,M,Pe,G),qe(yr,d,Me,!0),d.state===t.ACTIVE&&(Lt=O,O=yr.opcodes,Xe(0,Pe),O=Lt,pt(d,M,Pe,G),qe(yr,d,Me,!1))}else Lt=O,O=yr.opcodes,Xe(0,Pe,d),O=Lt;u||Ke&&(d.state===t.NOMATCH?o.ast.setLength(it):o.ast.up(sr.index,yr.name,Pe,d.phraseLength))})(Oe,Pe);break;case t.TRG:((Oe,Pe)=>{const it=O[Oe];d.state=t.NOMATCH,Pe{const it=O[Oe],Ke=it.string.length;if(d.state=t.NOMATCH,Pe+Ke<=M.length){for(let Lt=0;Lt{let it;const Ke=O[Oe];d.state=t.NOMATCH;const Lt=Ke.string.length;if(0!==Lt){if(Pe+Lt<=M.length){for(let sr=0;sr=65&&it<=90&&(it+=32),it!==Ke.string[sr])return;d.state=t.MATCH,d.phraseLength=Lt}}else d.state=t.EMPTY})(Oe,Pe);break;case t.UDT:((Oe,Pe)=>{let it,Ke,Lt;const sr=O[Oe],yr=P[sr.index];d.UdtIndex=yr.index,u||(Lt=o.ast&&o.ast.udtDefined(sr.index),Lt&&(Ke=I.length+sr.index,it=o.ast.getLength(),o.ast.down(Ke,yr.name)));const pt=M.length-Pe;L[sr.index](d,M,Pe,G),((Oe,Pe,it)=>{if(Pe.phraseLength>it){let Ke=`${i}opUDT(${Oe.name}): callback function error: `;throw Ke+=`sysData.phraseLength: ${Pe.phraseLength}`,Ke+=` must be <= remaining chars: ${it}`,new Error(Ke)}switch(Pe.state){case t.ACTIVE:throw new Error(`${i}opUDT(${Oe.name}) ACTIVE state return not allowed.`);case t.EMPTY:if(!Oe.empty)throw new Error(`${i}opUDT(${Oe.name}) may not return EMPTY.`);Pe.phraseLength=0;break;case t.MATCH:if(0===Pe.phraseLength){if(!Oe.empty)throw new Error(`${i}opUDT(${Oe.name}) may not return EMPTY.`);Pe.state=t.EMPTY}break;case t.NOMATCH:Pe.phraseLength=0;break;default:throw new Error(`${i}opUDT(${Oe.name}): callback function return error. Unrecognized return state: ${Pe.state}`)}})(yr,d,pt),u||Lt&&(d.state===t.NOMATCH?o.ast.setLength(it):o.ast.up(Ke,yr.name,Pe,d.phraseLength))})(Oe,Pe);break;case t.AND:((Oe,Pe)=>{switch(u+=1,Xe(Oe+1,Pe),u-=1,d.phraseLength=0,d.state){case t.EMPTY:case t.MATCH:d.state=t.EMPTY;break;case t.NOMATCH:d.state=t.NOMATCH;break;default:throw new Error(`opAND: invalid state ${d.state}`)}})(Oe,Pe);break;case t.NOT:((Oe,Pe)=>{switch(u+=1,Xe(Oe+1,Pe),u-=1,d.phraseLength=0,d.state){case t.EMPTY:case t.MATCH:d.state=t.NOMATCH;break;case t.NOMATCH:d.state=t.EMPTY;break;default:throw new Error(`opNOT: invalid state ${d.state}`)}})(Oe,Pe);break;default:throw new Error(`${it}unrecognized operator`)}u||Pe+d.phraseLength>T&&(T=Pe+d.phraseLength),o.stats&&o.stats.collect(Ke,d),o.trace&&o.trace.up(Ke,d.state,Pe,d.phraseLength),f-=1}},Sv=function(){const r=yo,o=vl,i=this;let s,u,f,m=0;const S=[],T=[],I=[];function P(O){let M="";for(;O-- >0;)M+=" ";return M}i.callbacks=[],i.init=(O,M,d)=>{let D;T.length=0,I.length=0,m=0,s=O,u=M,f=d;const L=[];for(D=0;D!!S[O],i.udtDefined=O=>!!S[s.length+O],i.down=(O,M)=>{const d=I.length;return T.push(d),I.push({name:M,thisIndex:d,thatIndex:void 0,state:r.SEM_PRE,callbackIndex:O,phraseIndex:void 0,phraseLength:void 0,stack:T.length}),d},i.up=(O,M,d,D)=>{const L=I.length,G=T.pop();return I.push({name:M,thisIndex:L,thatIndex:G,state:r.SEM_POST,callbackIndex:O,phraseIndex:d,phraseLength:D,stack:T.length}),I[G].thatIndex=L,I[G].phraseIndex=d,I[G].phraseLength=D,L},i.translate=O=>{let d,D;for(let L=0;L{I.length=O,T.length=O>0?I[O-1].stack:0},i.getLength=()=>I.length,i.toXml=()=>{let O="",M=0;return O+='\n',O+=`\n`,O+="\x3c!-- input string --\x3e\n",O+=P(M+2),O+=o.charsToString(f),O+="\n",I.forEach(d=>{d.state===r.SEM_PRE?(M+=1,O+=P(M),O+=`\n`,O+=P(M+2),O+=o.charsToString(f,d.phraseIndex,d.phraseLength),O+="\n"):(O+=P(M),O+=`\x3c!-- name="${d.name}" --\x3e\n`,M-=1)}),O+="\n",O}},vl={stringToChars:e=>[...e].map(t=>t.codePointAt(0)),charsToString:(e,t,r)=>{let o=e;for(;!(void 0===t||t<0);){if(void 0===r){o=e.slice(t);break}if(r<=0)return"";o=e.slice(t,t+r);break}return String.fromCodePoint(...o)}},yo={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,idName:e=>{switch(e){case yo.ALT:return"ALT";case yo.CAT:return"CAT";case yo.REP:return"REP";case yo.RNM:return"RNM";case yo.TRG:return"TRG";case yo.TBS:return"TBS";case yo.TLS:return"TLS";case yo.UDT:return"UDT";case yo.AND:return"AND";case yo.NOT:return"NOT";case yo.ACTIVE:return"ACTIVE";case yo.EMPTY:return"EMPTY";case yo.MATCH:return"MATCH";case yo.NOMATCH:return"NOMATCH";case yo.SEM_PRE:return"SEM_PRE";case yo.SEM_POST:return"SEM_POST";case yo.SEM_OK:return"SEM_OK";default:return"UNRECOGNIZED STATE"}}},eb=(e,t,r,o,i)=>{if(e===yo.SEM_PRE){if(!1===Array.isArray(i))throw new Error("parser's user data must be an array");i.push(["server-url-template",vl.charsToString(t,r,o)])}return yo.SEM_OK},tb=(e,t,r,o,i)=>{if(e===yo.SEM_PRE){if(!1===Array.isArray(i))throw new Error("parser's user data must be an array");i.push(["server-variable",vl.charsToString(t,r,o)])}return yo.SEM_OK},rb=(e,t,r,o,i)=>{if(e===yo.SEM_PRE){if(!1===Array.isArray(i))throw new Error("parser's user data must be an array");i.push(["server-variable-name",vl.charsToString(t,r,o)])}return yo.SEM_OK},nb=(e,t,r,o,i)=>{if(e===yo.SEM_PRE){if(!1===Array.isArray(i))throw new Error("parser's user data must be an array");i.push(["literals",vl.charsToString(t,r,o)])}return yo.SEM_OK},ob=new function qE(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"server-url-template",lower:"server-url-template",index:0,isBkr:!1},this.rules[1]={name:"server-variable",lower:"server-variable",index:1,isBkr:!1},this.rules[2]={name:"server-variable-name",lower:"server-variable-name",index:2,isBkr:!1},this.rules[3]={name:"literals",lower:"literals",index:3,isBkr:!1},this.rules[4]={name:"DIGIT",lower:"digit",index:4,isBkr:!1},this.rules[5]={name:"HEXDIG",lower:"hexdig",index:5,isBkr:!1},this.rules[6]={name:"pct-encoded",lower:"pct-encoded",index:6,isBkr:!1},this.rules[7]={name:"ucschar",lower:"ucschar",index:7,isBkr:!1},this.rules[8]={name:"iprivate",lower:"iprivate",index:8,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:1,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3]},this.rules[0].opcodes[2]={type:4,index:3},this.rules[0].opcodes[3]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2,3]},this.rules[1].opcodes[1]={type:7,string:[123]},this.rules[1].opcodes[2]={type:4,index:2},this.rules[1].opcodes[3]={type:7,string:[125]},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:1,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3,4]},this.rules[2].opcodes[2]={type:5,min:0,max:122},this.rules[2].opcodes[3]={type:6,string:[124]},this.rules[2].opcodes[4]={type:5,min:126,max:1114111},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3,4,5,6,7,8,9,10,11,12,13]},this.rules[3].opcodes[2]={type:6,string:[33]},this.rules[3].opcodes[3]={type:5,min:35,max:36},this.rules[3].opcodes[4]={type:5,min:38,max:59},this.rules[3].opcodes[5]={type:6,string:[61]},this.rules[3].opcodes[6]={type:5,min:63,max:91},this.rules[3].opcodes[7]={type:6,string:[93]},this.rules[3].opcodes[8]={type:6,string:[95]},this.rules[3].opcodes[9]={type:5,min:97,max:122},this.rules[3].opcodes[10]={type:6,string:[126]},this.rules[3].opcodes[11]={type:4,index:7},this.rules[3].opcodes[12]={type:4,index:8},this.rules[3].opcodes[13]={type:4,index:6},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:5,min:48,max:57},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[5].opcodes[1]={type:4,index:4},this.rules[5].opcodes[2]={type:7,string:[97]},this.rules[5].opcodes[3]={type:7,string:[98]},this.rules[5].opcodes[4]={type:7,string:[99]},this.rules[5].opcodes[5]={type:7,string:[100]},this.rules[5].opcodes[6]={type:7,string:[101]},this.rules[5].opcodes[7]={type:7,string:[102]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,3]},this.rules[6].opcodes[1]={type:7,string:[37]},this.rules[6].opcodes[2]={type:4,index:5},this.rules[6].opcodes[3]={type:4,index:5},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[7].opcodes[1]={type:5,min:160,max:55295},this.rules[7].opcodes[2]={type:5,min:63744,max:64975},this.rules[7].opcodes[3]={type:5,min:65008,max:65519},this.rules[7].opcodes[4]={type:5,min:65536,max:131069},this.rules[7].opcodes[5]={type:5,min:131072,max:196605},this.rules[7].opcodes[6]={type:5,min:196608,max:262141},this.rules[7].opcodes[7]={type:5,min:262144,max:327677},this.rules[7].opcodes[8]={type:5,min:327680,max:393213},this.rules[7].opcodes[9]={type:5,min:393216,max:458749},this.rules[7].opcodes[10]={type:5,min:458752,max:524285},this.rules[7].opcodes[11]={type:5,min:524288,max:589821},this.rules[7].opcodes[12]={type:5,min:589824,max:655357},this.rules[7].opcodes[13]={type:5,min:655360,max:720893},this.rules[7].opcodes[14]={type:5,min:720896,max:786429},this.rules[7].opcodes[15]={type:5,min:786432,max:851965},this.rules[7].opcodes[16]={type:5,min:851968,max:917501},this.rules[7].opcodes[17]={type:5,min:921600,max:983037},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3]},this.rules[8].opcodes[1]={type:5,min:57344,max:63743},this.rules[8].opcodes[2]={type:5,min:983040,max:1048573},this.rules[8].opcodes[3]={type:5,min:1048576,max:1114109},this.toString=function(){let t="";return t+="; OpenAPI Server URL templating ABNF syntax\n",t+="server-url-template = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2\n",t+='server-variable = "{" server-variable-name "}"\n',t+="server-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\n",t+="\n",t+="; https://www.rfc-editor.org/rfc/rfc6570#section-2.1\n",t+="; https://www.rfc-editor.org/errata/eid6937\n",t+="literals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B\n",t+=" / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\n",t+=" / pct-encoded)\n",t+=" ; any Unicode character except: CTL, SP,\n",t+=' ; DQUOTE, "%" (aside from pct-encoded),\n',t+=' ; "<", ">", "\\", "^", "`", "{", "|", "}"\n',t+="\n",t+="; https://www.rfc-editor.org/rfc/rfc6570#section-1.5\n",t+="DIGIT = %x30-39 ; 0-9\n",t+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" ; case-insensitive\n',t+="\n",t+='pct-encoded = "%" HEXDIG HEXDIG\n',t+="\n",t+="ucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n",t+=" / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n",t+=" / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n",t+=" / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n",t+=" / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n",t+=" / %xD0000-DFFFD / %xE1000-EFFFD\n",t+="\n",t+="iprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\n",'; OpenAPI Server URL templating ABNF syntax\nserver-url-template = 1*( literals / server-variable ) ; variant of https://www.rfc-editor.org/rfc/rfc6570#section-2\nserver-variable = "{" server-variable-name "}"\nserver-variable-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\n\n; https://www.rfc-editor.org/rfc/rfc6570#section-2.1\n; https://www.rfc-editor.org/errata/eid6937\nliterals = 1*( %x21 / %x23-24 / %x26-3B / %x3D / %x3F-5B\n / %x5D / %x5F / %x61-7A / %x7E / ucschar / iprivate\n / pct-encoded)\n ; any Unicode character except: CTL, SP,\n ; DQUOTE, "%" (aside from pct-encoded),\n ; "<", ">", "\\", "^", "`", "{", "|", "}"\n\n; https://www.rfc-editor.org/rfc/rfc6570#section-1.5\nDIGIT = %x30-39 ; 0-9\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F" ; case-insensitive\n\npct-encoded = "%" HEXDIG HEXDIG\n\nucschar = %xA0-D7FF / %xF900-FDCF / %xFDF0-FFEF\n / %x10000-1FFFD / %x20000-2FFFD / %x30000-3FFFD\n / %x40000-4FFFD / %x50000-5FFFD / %x60000-6FFFD\n / %x70000-7FFFD / %x80000-8FFFD / %x90000-9FFFD\n / %xA0000-AFFFD / %xB0000-BFFFD / %xC0000-CFFFD\n / %xD0000-DFFFD / %xE1000-EFFFD\n\niprivate = %xE000-F8FF / %xF0000-FFFFD / %x100000-10FFFD\n'}},_v=e=>{const t=new Hc;return t.ast=new Sv,t.ast.callbacks["server-url-template"]=eb,t.ast.callbacks["server-variable"]=tb,t.ast.callbacks["server-variable-name"]=rb,t.ast.callbacks.literals=nb,{result:t.parse(ob,"server-url-template",e),ast:t.ast}},sb=e=>(e=>{try{return"string"==typeof e&&decodeURIComponent(e)!==e}catch{return!1}})(e)?e:encodeURIComponent(e).replace(/%5B/g,"[").replace(/%5D/g,"]"),lb=["literals","server-variable-name"];function wv(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"path-template",lower:"path-template",index:0,isBkr:!1},this.rules[1]={name:"path-segment",lower:"path-segment",index:1,isBkr:!1},this.rules[2]={name:"slash",lower:"slash",index:2,isBkr:!1},this.rules[3]={name:"path-literal",lower:"path-literal",index:3,isBkr:!1},this.rules[4]={name:"template-expression",lower:"template-expression",index:4,isBkr:!1},this.rules[5]={name:"template-expression-param-name",lower:"template-expression-param-name",index:5,isBkr:!1},this.rules[6]={name:"pchar",lower:"pchar",index:6,isBkr:!1},this.rules[7]={name:"unreserved",lower:"unreserved",index:7,isBkr:!1},this.rules[8]={name:"pct-encoded",lower:"pct-encoded",index:8,isBkr:!1},this.rules[9]={name:"sub-delims",lower:"sub-delims",index:9,isBkr:!1},this.rules[10]={name:"ALPHA",lower:"alpha",index:10,isBkr:!1},this.rules[11]={name:"DIGIT",lower:"digit",index:11,isBkr:!1},this.rules[12]={name:"HEXDIG",lower:"hexdig",index:12,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2,6]},this.rules[0].opcodes[1]={type:4,index:2},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:2,children:[4,5]},this.rules[0].opcodes[4]={type:4,index:1},this.rules[0].opcodes[5]={type:4,index:2},this.rules[0].opcodes[6]={type:3,min:0,max:1},this.rules[0].opcodes[7]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:3,min:1,max:1/0},this.rules[1].opcodes[1]={type:1,children:[2,3]},this.rules[1].opcodes[2]={type:4,index:3},this.rules[1].opcodes[3]={type:4,index:4},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:7,string:[47]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:4,index:6},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:2,children:[1,2,3]},this.rules[4].opcodes[1]={type:7,string:[123]},this.rules[4].opcodes[2]={type:4,index:5},this.rules[4].opcodes[3]={type:7,string:[125]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:3,min:1,max:1/0},this.rules[5].opcodes[1]={type:1,children:[2,3,4]},this.rules[5].opcodes[2]={type:5,min:0,max:122},this.rules[5].opcodes[3]={type:6,string:[124]},this.rules[5].opcodes[4]={type:5,min:126,max:1114111},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[6].opcodes[4]={type:7,string:[58]},this.rules[6].opcodes[5]={type:7,string:[64]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2,3,4,5,6]},this.rules[7].opcodes[1]={type:4,index:10},this.rules[7].opcodes[2]={type:4,index:11},this.rules[7].opcodes[3]={type:7,string:[45]},this.rules[7].opcodes[4]={type:7,string:[46]},this.rules[7].opcodes[5]={type:7,string:[95]},this.rules[7].opcodes[6]={type:7,string:[126]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:2,children:[1,2,3]},this.rules[8].opcodes[1]={type:7,string:[37]},this.rules[8].opcodes[2]={type:4,index:12},this.rules[8].opcodes[3]={type:4,index:12},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11]},this.rules[9].opcodes[1]={type:7,string:[33]},this.rules[9].opcodes[2]={type:7,string:[36]},this.rules[9].opcodes[3]={type:7,string:[38]},this.rules[9].opcodes[4]={type:7,string:[39]},this.rules[9].opcodes[5]={type:7,string:[40]},this.rules[9].opcodes[6]={type:7,string:[41]},this.rules[9].opcodes[7]={type:7,string:[42]},this.rules[9].opcodes[8]={type:7,string:[43]},this.rules[9].opcodes[9]={type:7,string:[44]},this.rules[9].opcodes[10]={type:7,string:[59]},this.rules[9].opcodes[11]={type:7,string:[61]},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2]},this.rules[10].opcodes[1]={type:5,min:65,max:90},this.rules[10].opcodes[2]={type:5,min:97,max:122},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:5,min:48,max:57},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,2,3,4,5,6,7]},this.rules[12].opcodes[1]={type:4,index:11},this.rules[12].opcodes[2]={type:7,string:[97]},this.rules[12].opcodes[3]={type:7,string:[98]},this.rules[12].opcodes[4]={type:7,string:[99]},this.rules[12].opcodes[5]={type:7,string:[100]},this.rules[12].opcodes[6]={type:7,string:[101]},this.rules[12].opcodes[7]={type:7,string:[102]},this.toString=function(){let t="";return t+="; OpenAPI Path Templating ABNF syntax\n",t+="; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\n",t+="path-template = slash *( path-segment slash ) [ path-segment ]\n",t+="path-segment = 1*( path-literal / template-expression )\n",t+='slash = "/"\n',t+="path-literal = 1*pchar\n",t+='template-expression = "{" template-expression-param-name "}"\n',t+="template-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\n",t+="\n",t+="; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\n",t+='pchar = unreserved / pct-encoded / sub-delims / ":" / "@"\n',t+='unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"\n',t+=" ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\n",t+='pct-encoded = "%" HEXDIG HEXDIG\n',t+=" ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1\n",t+='sub-delims = "!" / "$" / "&" / "\'" / "(" / ")"\n',t+=' / "*" / "+" / "," / ";" / "="\n',t+=" ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\n",t+="\n",t+="; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\n",t+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",t+="DIGIT = %x30-39 ; 0-9\n",t+='HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n','; OpenAPI Path Templating ABNF syntax\n; variant of https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\npath-template = slash *( path-segment slash ) [ path-segment ]\npath-segment = 1*( path-literal / template-expression )\nslash = "/"\npath-literal = 1*pchar\ntemplate-expression = "{" template-expression-param-name "}"\ntemplate-expression-param-name = 1*( %x00-7A / %x7C / %x7E-10FFFF ) ; every UTF8 character except { and } (from OpenAPI)\n\n; https://datatracker.ietf.org/doc/html/rfc3986#section-3.3\npchar = unreserved / pct-encoded / sub-delims / ":" / "@"\nunreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"\n ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\npct-encoded = "%" HEXDIG HEXDIG\n ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.1\nsub-delims = "!" / "$" / "&" / "\'" / "(" / ")"\n / "*" / "+" / "," / ";" / "="\n ; https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\n\n; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\nDIGIT = %x30-39 ; 0-9\nHEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"\n'}}const cb=(e,t,r,o,i)=>(e===yo.SEM_PRE&&i.push(["slash",vl.charsToString(t,r,o)]),yo.SEM_OK),fb=(e,t,r,o,i)=>{if(e===yo.SEM_PRE){if(!1===Array.isArray(i))throw new Error("parser's user data must be an array");i.push(["path-template",vl.charsToString(t,r,o)])}return yo.SEM_OK},db=(e,t,r,o,i)=>(e===yo.SEM_PRE&&i.push(["path-literal",vl.charsToString(t,r,o)]),yo.SEM_OK),pb=(e,t,r,o,i)=>(e===yo.SEM_PRE&&i.push(["template-expression",vl.charsToString(t,r,o)]),yo.SEM_OK),hb=(e,t,r,o,i)=>(e===yo.SEM_PRE&&i.push(["template-expression-param-name",vl.charsToString(t,r,o)]),yo.SEM_OK),mb=new wv,yb=e=>(e=>{try{return"string"==typeof e&&decodeURIComponent(e)!==e}catch{return!1}})(e)?e:encodeURIComponent(e).replace(/%5B/g,"[").replace(/%5D/g,"]"),Eb=["slash","path-literal","template-expression-param-name"],Mm=(e,t,r={})=>{const i={encoder:yb,...r},s=(e=>{const t=new Hc;return t.ast=new Sv,t.ast.callbacks["path-template"]=fb,t.ast.callbacks.slash=cb,t.ast.callbacks["path-literal"]=db,t.ast.callbacks["template-expression"]=pb,t.ast.callbacks["template-expression-param-name"]=hb,{result:t.parse(mb,"path-template",e),ast:t.ast}})(e);if(!s.result.success)return e;const u=[];return s.ast.translate(u),u.filter(([m])=>Eb.includes(m)).map(([m,S])=>"template-expression-param-name"===m?Object.prototype.hasOwnProperty.call(t,S)?i.encoder(t[S],S):`{${S}}`:S).join("")},Cb=(new wv,new Hc,{body:function Ab({req:e,value:t}){void 0!==t&&(e.body=t)},header:function Tb({req:e,parameter:t,value:r}){e.headers=e.headers||{},typeof r<"u"&&(e.headers[t.name]=r)},query:function Rb({req:e,value:t,parameter:r}){if(e.query=e.query||{},!1===t&&"boolean"===r.type&&(t="false"),0===t&&["number","integer"].indexOf(r.type)>-1&&(t="0"),t)e.query[r.name]={collectionFormat:r.collectionFormat,value:t};else if(r.allowEmptyValue&&void 0!==t){const o=r.name;e.query[o]=e.query[o]||{},e.query[o].allowEmptyValue=!0}},path:function Ib({req:e,value:t,parameter:r,baseURL:o}){if(void 0!==t){const i=e.url.replace(o,""),s=Mm(i,{[r.name]:t});e.url=o+s}},formData:function Ob({req:e,value:t,parameter:r}){if(!1===t&&"boolean"===r.type&&(t="false"),0===t&&["number","integer"].indexOf(r.type)>-1&&(t="0"),t)e.form=e.form||{},e.form[r.name]={collectionFormat:r.collectionFormat,value:t};else if(r.allowEmptyValue&&void 0!==t){e.form=e.form||{};const o=r.name;e.form[o]=e.form[o]||{},e.form[o].allowEmptyValue=!0}}});function gh(e,t){return t.includes("application/json")?"string"==typeof e?e:(Array.isArray(e)&&(e=e.map(r=>{try{return JSON.parse(r)}catch{return r}})),JSON.stringify(e)):String(e)}var Pb=gu(function(t,r,o){var s,i={};for(s in o=o||{},r=r||{})Js(s,r)&&(i[s]=Js(s,o)?t(s,r[s],o[s]):r[s]);for(s in o)Js(s,o)&&!Js(s,i)&&(i[s]=o[s]);return i});const Mb=Pb;var kb=gu(function e(t,r,o){return Mb(function(i,s,u){return Xs(s)&&Xs(u)?e(t,s,u):t(i,s,u)},r,o)});const Nb=kb;var jb=gi(function(t,r){return Nb(function(o,i,s){return s},t,r)});const Db=jb;function rp(){this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"lenient-cookie-string",lower:"lenient-cookie-string",index:0,isBkr:!1},this.rules[1]={name:"lenient-cookie-entry",lower:"lenient-cookie-entry",index:1,isBkr:!1},this.rules[2]={name:"lenient-cookie-pair",lower:"lenient-cookie-pair",index:2,isBkr:!1},this.rules[3]={name:"lenient-cookie-pair-invalid",lower:"lenient-cookie-pair-invalid",index:3,isBkr:!1},this.rules[4]={name:"lenient-cookie-name",lower:"lenient-cookie-name",index:4,isBkr:!1},this.rules[5]={name:"lenient-cookie-value",lower:"lenient-cookie-value",index:5,isBkr:!1},this.rules[6]={name:"lenient-quoted-value",lower:"lenient-quoted-value",index:6,isBkr:!1},this.rules[7]={name:"lenient-quoted-char",lower:"lenient-quoted-char",index:7,isBkr:!1},this.rules[8]={name:"lenient-cookie-octet",lower:"lenient-cookie-octet",index:8,isBkr:!1},this.rules[9]={name:"cookie-string",lower:"cookie-string",index:9,isBkr:!1},this.rules[10]={name:"cookie-pair",lower:"cookie-pair",index:10,isBkr:!1},this.rules[11]={name:"cookie-name",lower:"cookie-name",index:11,isBkr:!1},this.rules[12]={name:"cookie-value",lower:"cookie-value",index:12,isBkr:!1},this.rules[13]={name:"cookie-octet",lower:"cookie-octet",index:13,isBkr:!1},this.rules[14]={name:"OWS",lower:"ows",index:14,isBkr:!1},this.rules[15]={name:"token",lower:"token",index:15,isBkr:!1},this.rules[16]={name:"tchar",lower:"tchar",index:16,isBkr:!1},this.rules[17]={name:"CHAR",lower:"char",index:17,isBkr:!1},this.rules[18]={name:"CTL",lower:"ctl",index:18,isBkr:!1},this.rules[19]={name:"separators",lower:"separators",index:19,isBkr:!1},this.rules[20]={name:"SP",lower:"sp",index:20,isBkr:!1},this.rules[21]={name:"HT",lower:"ht",index:21,isBkr:!1},this.rules[22]={name:"ALPHA",lower:"alpha",index:22,isBkr:!1},this.rules[23]={name:"DIGIT",lower:"digit",index:23,isBkr:!1},this.rules[24]={name:"DQUOTE",lower:"dquote",index:24,isBkr:!1},this.rules[25]={name:"WSP",lower:"wsp",index:25,isBkr:!1},this.rules[26]={name:"HTAB",lower:"htab",index:26,isBkr:!1},this.rules[27]={name:"CRLF",lower:"crlf",index:27,isBkr:!1},this.rules[28]={name:"CR",lower:"cr",index:28,isBkr:!1},this.rules[29]={name:"LF",lower:"lf",index:29,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,2]},this.rules[0].opcodes[1]={type:4,index:1},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:2,children:[4,5,6]},this.rules[0].opcodes[4]={type:7,string:[59]},this.rules[0].opcodes[5]={type:4,index:14},this.rules[0].opcodes[6]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:1,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:3},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4,5,6,7]},this.rules[2].opcodes[1]={type:4,index:14},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:7,string:[61]},this.rules[2].opcodes[5]={type:4,index:14},this.rules[2].opcodes[6]={type:4,index:5},this.rules[2].opcodes[7]={type:4,index:14},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,4]},this.rules[3].opcodes[1]={type:4,index:14},this.rules[3].opcodes[2]={type:3,min:1,max:1/0},this.rules[3].opcodes[3]={type:4,index:16},this.rules[3].opcodes[4]={type:4,index:14},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:3,min:1,max:1/0},this.rules[4].opcodes[1]={type:1,children:[2,3,4]},this.rules[4].opcodes[2]={type:5,min:33,max:58},this.rules[4].opcodes[3]={type:6,string:[60]},this.rules[4].opcodes[4]={type:5,min:62,max:126},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,6]},this.rules[5].opcodes[1]={type:2,children:[2,3]},this.rules[5].opcodes[2]={type:4,index:6},this.rules[5].opcodes[3]={type:3,min:0,max:1},this.rules[5].opcodes[4]={type:3,min:0,max:1/0},this.rules[5].opcodes[5]={type:4,index:8},this.rules[5].opcodes[6]={type:3,min:0,max:1/0},this.rules[5].opcodes[7]={type:4,index:8},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,4]},this.rules[6].opcodes[1]={type:4,index:24},this.rules[6].opcodes[2]={type:3,min:0,max:1/0},this.rules[6].opcodes[3]={type:4,index:7},this.rules[6].opcodes[4]={type:4,index:24},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:5,min:32,max:33},this.rules[7].opcodes[2]={type:5,min:35,max:126},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2,3]},this.rules[8].opcodes[1]={type:5,min:33,max:43},this.rules[8].opcodes[2]={type:5,min:45,max:58},this.rules[8].opcodes[3]={type:5,min:60,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:2,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:10},this.rules[9].opcodes[2]={type:3,min:0,max:1/0},this.rules[9].opcodes[3]={type:2,children:[4,5,6]},this.rules[9].opcodes[4]={type:7,string:[59]},this.rules[9].opcodes[5]={type:4,index:20},this.rules[9].opcodes[6]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:2,children:[1,2,3]},this.rules[10].opcodes[1]={type:4,index:11},this.rules[10].opcodes[2]={type:7,string:[61]},this.rules[10].opcodes[3]={type:4,index:12},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:4,index:15},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:1,children:[1,6]},this.rules[12].opcodes[1]={type:2,children:[2,3,5]},this.rules[12].opcodes[2]={type:4,index:24},this.rules[12].opcodes[3]={type:3,min:0,max:1/0},this.rules[12].opcodes[4]={type:4,index:13},this.rules[12].opcodes[5]={type:4,index:24},this.rules[12].opcodes[6]={type:3,min:0,max:1/0},this.rules[12].opcodes[7]={type:4,index:13},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:1,children:[1,2,3,4,5]},this.rules[13].opcodes[1]={type:6,string:[33]},this.rules[13].opcodes[2]={type:5,min:35,max:43},this.rules[13].opcodes[3]={type:5,min:45,max:58},this.rules[13].opcodes[4]={type:5,min:60,max:91},this.rules[13].opcodes[5]={type:5,min:93,max:126},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:3,min:0,max:1/0},this.rules[14].opcodes[1]={type:2,children:[2,4]},this.rules[14].opcodes[2]={type:3,min:0,max:1},this.rules[14].opcodes[3]={type:4,index:27},this.rules[14].opcodes[4]={type:4,index:25},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:3,min:1,max:1/0},this.rules[15].opcodes[1]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17]},this.rules[16].opcodes[1]={type:7,string:[33]},this.rules[16].opcodes[2]={type:7,string:[35]},this.rules[16].opcodes[3]={type:7,string:[36]},this.rules[16].opcodes[4]={type:7,string:[37]},this.rules[16].opcodes[5]={type:7,string:[38]},this.rules[16].opcodes[6]={type:7,string:[39]},this.rules[16].opcodes[7]={type:7,string:[42]},this.rules[16].opcodes[8]={type:7,string:[43]},this.rules[16].opcodes[9]={type:7,string:[45]},this.rules[16].opcodes[10]={type:7,string:[46]},this.rules[16].opcodes[11]={type:7,string:[94]},this.rules[16].opcodes[12]={type:7,string:[95]},this.rules[16].opcodes[13]={type:7,string:[96]},this.rules[16].opcodes[14]={type:7,string:[124]},this.rules[16].opcodes[15]={type:7,string:[126]},this.rules[16].opcodes[16]={type:4,index:23},this.rules[16].opcodes[17]={type:4,index:22},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:5,min:1,max:127},this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2]},this.rules[18].opcodes[1]={type:5,min:0,max:31},this.rules[18].opcodes[2]={type:6,string:[127]},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]},this.rules[19].opcodes[1]={type:7,string:[40]},this.rules[19].opcodes[2]={type:7,string:[41]},this.rules[19].opcodes[3]={type:7,string:[60]},this.rules[19].opcodes[4]={type:7,string:[62]},this.rules[19].opcodes[5]={type:7,string:[64]},this.rules[19].opcodes[6]={type:7,string:[44]},this.rules[19].opcodes[7]={type:7,string:[59]},this.rules[19].opcodes[8]={type:7,string:[58]},this.rules[19].opcodes[9]={type:7,string:[92]},this.rules[19].opcodes[10]={type:6,string:[34]},this.rules[19].opcodes[11]={type:7,string:[47]},this.rules[19].opcodes[12]={type:7,string:[91]},this.rules[19].opcodes[13]={type:7,string:[93]},this.rules[19].opcodes[14]={type:7,string:[63]},this.rules[19].opcodes[15]={type:7,string:[61]},this.rules[19].opcodes[16]={type:7,string:[123]},this.rules[19].opcodes[17]={type:7,string:[125]},this.rules[19].opcodes[18]={type:4,index:20},this.rules[19].opcodes[19]={type:4,index:21},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:6,string:[32]},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:6,string:[9]},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:1,children:[1,2]},this.rules[22].opcodes[1]={type:5,min:65,max:90},this.rules[22].opcodes[2]={type:5,min:97,max:122},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:5,min:48,max:57},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:6,string:[34]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:1,children:[1,2]},this.rules[25].opcodes[1]={type:4,index:20},this.rules[25].opcodes[2]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:6,string:[9]},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:4,index:28},this.rules[27].opcodes[2]={type:4,index:29},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:6,string:[13]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:6,string:[10]},this.toString=function(){let t="";return t+="; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\n",t+='lenient-cookie-string = lenient-cookie-entry *( ";" OWS lenient-cookie-entry )\n',t+="lenient-cookie-entry = lenient-cookie-pair / lenient-cookie-pair-invalid\n",t+='lenient-cookie-pair = OWS lenient-cookie-name OWS "=" OWS lenient-cookie-value OWS\n',t+='lenient-cookie-pair-invalid = OWS 1*tchar OWS ; Allow for standalone entries like "fizz" to be ignored\n',t+='lenient-cookie-name = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except "="\n',t+="lenient-cookie-value = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\n",t+="lenient-quoted-value = DQUOTE *( lenient-quoted-char ) DQUOTE\n",t+="lenient-quoted-char = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\n",t+="lenient-cookie-octet = %x21-2B / %x2D-3A / %x3C-7E\n",t+=" ; Allow all printable characters except CTLs, semicolon and SP\n",t+="\n",t+="; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\n",t+='cookie-string = cookie-pair *( ";" SP cookie-pair )\n',t+="\n",t+="; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\n",t+="; https://www.rfc-editor.org/errata/eid5518\n",t+='cookie-pair = cookie-name "=" cookie-value\n',t+="cookie-name = token\n",t+="cookie-value = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\n",t+=" ; https://www.rfc-editor.org/errata/eid8242\n",t+="cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n",t+=" ; US-ASCII characters excluding CTLs,\n",t+=" ; whitespace, DQUOTE, comma, semicolon,\n",t+=" ; and backslash\n",t+="\n",t+="; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\n",t+='OWS = *( [ CRLF ] WSP ) ; "optional" whitespace\n',t+="\n",t+="; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\n",t+="token = 1*(tchar)\n",t+='tchar = "!" / "#" / "$" / "%" / "&" / "\'" / "*"\n',t+=' / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"\n',t+=" / DIGIT / ALPHA\n",t+=" ; any VCHAR, except delimiters\n",t+="\n",t+="; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\n",t+="CHAR = %x01-7F ; any US-ASCII character (octets 0 - 127)\n",t+="CTL = %x00-1F / %x7F ; any US-ASCII control character\n",t+='separators = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\\" / %x22 / "/" / "[" / "]" / "?" / "=" / "{" / "}" / SP / HT\n',t+="SP = %x20 ; US-ASCII SP, space (32)\n",t+="HT = %x09 ; US-ASCII HT, horizontal-tab (9)\n",t+="\n",t+="; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\n",t+="ALPHA = %x41-5A / %x61-7A ; A-Z / a-z\n",t+="DIGIT = %x30-39 ; 0-9\n",t+='DQUOTE = %x22 ; " (Double Quote)\n',t+="WSP = SP / HTAB ; white space\n",t+="HTAB = %x09 ; horizontal tab\n",t+="CRLF = CR LF ; Internet standard newline\n",t+="CR = %x0D ; carriage return\n",t+="LF = %x0A ; linefeed\n",'; Lenient version of https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\nlenient-cookie-string = lenient-cookie-entry *( ";" OWS lenient-cookie-entry )\nlenient-cookie-entry = lenient-cookie-pair / lenient-cookie-pair-invalid\nlenient-cookie-pair = OWS lenient-cookie-name OWS "=" OWS lenient-cookie-value OWS\nlenient-cookie-pair-invalid = OWS 1*tchar OWS ; Allow for standalone entries like "fizz" to be ignored\nlenient-cookie-name = 1*( %x21-3A / %x3C / %x3E-7E ) ; Allow all printable US-ASCII except "="\nlenient-cookie-value = lenient-quoted-value [ *lenient-cookie-octet ] / *lenient-cookie-octet\nlenient-quoted-value = DQUOTE *( lenient-quoted-char ) DQUOTE\nlenient-quoted-char = %x20-21 / %x23-7E ; Allow all printable US-ASCII except DQUOTE\nlenient-cookie-octet = %x21-2B / %x2D-3A / %x3C-7E\n ; Allow all printable characters except CTLs, semicolon and SP\n\n; https://datatracker.ietf.org/doc/html/rfc6265#section-4.2.1\ncookie-string = cookie-pair *( ";" SP cookie-pair )\n\n; https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.1\n; https://www.rfc-editor.org/errata/eid5518\ncookie-pair = cookie-name "=" cookie-value\ncookie-name = token\ncookie-value = ( DQUOTE *cookie-octet DQUOTE ) / *cookie-octet\n ; https://www.rfc-editor.org/errata/eid8242\ncookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n ; US-ASCII characters excluding CTLs,\n ; whitespace, DQUOTE, comma, semicolon,\n ; and backslash\n\n; https://datatracker.ietf.org/doc/html/rfc6265#section-2.2\nOWS = *( [ CRLF ] WSP ) ; "optional" whitespace\n\n; https://datatracker.ietf.org/doc/html/rfc9110#section-5.6.2\ntoken = 1*(tchar)\ntchar = "!" / "#" / "$" / "%" / "&" / "\'" / "*"\n / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"\n / DIGIT / ALPHA\n ; any VCHAR, except delimiters\n\n; https://datatracker.ietf.org/doc/html/rfc2616#section-2.2\nCHAR = %x01-7F ; any US-ASCII character (octets 0 - 127)\nCTL = %x00-1F / %x7F ; any US-ASCII control character\nseparators = "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\\" / %x22 / "/" / "[" / "]" / "?" / "=" / "{" / "}" / SP / HT\nSP = %x20 ; US-ASCII SP, space (32)\nHT = %x09 ; US-ASCII HT, horizontal-tab (9)\n\n; https://datatracker.ietf.org/doc/html/rfc5234#appendix-B.1\nALPHA = %x41-5A / %x61-7A ; A-Z / a-z\nDIGIT = %x30-39 ; 0-9\nDQUOTE = %x22 ; " (Double Quote)\nWSP = SP / HTAB ; white space\nHTAB = %x09 ; horizontal tab\nCRLF = CR LF ; Internet standard newline\nCR = %x0D ; carriage return\nLF = %x0A ; linefeed\n'}}new rp;const Lb=e=>{if("string"!=typeof e||1!==[...e].length)throw new TypeError("Input must be a single character string.");const t=e.codePointAt(0);return t<=127?`%${t.toString(16).toUpperCase().padStart(2,"0")}`:encodeURIComponent(e)},vh=e=>e.length>=2&&e.startsWith('"')&&e.endsWith('"'),Cv=e=>vh(e)?e.slice(1,-1):e,Av=e=>`"${e}"`,Ov=e=>e,Ub=new Hc,$b=new rp,km=(e,{strict:t=!0,quoted:r=null}={})=>{try{const i=Ub.parse($b,t?"cookie-value":"lenient-cookie-value",e);return"boolean"==typeof r?i.success&&r===vh(e):i.success}catch{return!1}},Tv=e=>{const r=(new TextEncoder).encode(e).reduce((o,i)=>o+String.fromCharCode(i),"");return btoa(r)},Hb=e=>(e=>e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,""))(Tv(e)),Wb=new Hc,Gb=new rp,Iv=(e,{strict:t=!0}={})=>{try{return Wb.parse(Gb,t?"cookie-name":"lenient-cookie-name",e).success}catch{return!1}},Rv=e=>{if(!km(e))throw new TypeError(`Invalid cookie value: ${e}`)},Nm={encoders:{name:Ov,value:e=>((e,t=Tv)=>{const r=String(e);if(km(r))return r;const o=vh(r),s=t(o?Cv(r):r);return o?Av(s):s})(e,Hb)},validators:{name:e=>{if(!Iv(e))throw new TypeError(`Invalid cookie name: ${e}`)},value:Rv}},Xb=new Hc,Zb=new rp,tx=(new Hc,new rp,e=>{if(!Iv(e,{strict:!1}))throw new TypeError(`Invalid cookie name: ${e}`)}),ox=e=>(e=>{const t=String(e);if(km(t))return t;const r=vh(t),o=r?Cv(t):t;let i="";for(const s of o)i+=Xb.parse(Zb,"cookie-octet",s).success?s:Lb(s);return r?Av(i):i})(e).replace(/[=&]/gu,t=>"="===t?"%3D":"%26"),jm=(e,t={})=>((e,t={})=>(Array.isArray(e)?e:"object"==typeof e&&null!==e?Object.entries(e):[]).map(([o,i])=>((e,t,r={})=>{const o={...Nm,...r,encoders:{...Nm.encoders,...r.encoders},validators:{...Nm.validators,...r.validators}},i=o.encoders.name(e),s=o.encoders.value(t);return o.validators.name(i),o.validators.value(s),`${i}=${s}`})(o,i,t)).join("; "))(e,Db({encoders:{name:Ov,value:ox},validators:{name:tx,value:Rv}},t));function ix({req:e,value:t,parameter:r,baseURL:o}){const{name:i,style:s,explode:u,content:f}=r;if(void 0===t)return;const m=e.url.replace(o,"");let S;if(f){const T=Object.keys(f)[0];S=Mm(m,{[i]:t},{encoder:I=>ca(gh(I,T))})}else S=Mm(m,{[i]:t},{encoder:T=>fa({key:r.name,value:T,style:s||"simple",explode:u??!1,escape:"reserved"})});e.url=o+S}function ax({req:e,value:t,parameter:r}){if(e.query=e.query||{},void 0!==t&&r.content){const i=gh(t,Object.keys(r.content)[0]);if(i)e.query[r.name]=i;else if(r.allowEmptyValue){const s=r.name;e.query[s]=e.query[s]||{},e.query[s].allowEmptyValue=!0}}else if(!1===t&&(t="false"),0===t&&(t="0"),t){const{style:o,explode:i,allowReserved:s}=r;e.query[r.name]={value:t,serializationOption:{style:o,explode:i,allowReserved:s}}}else if(r.allowEmptyValue&&void 0!==t){const o=r.name;e.query[o]=e.query[o]||{},e.query[o].allowEmptyValue=!0}}const sx=["accept","authorization","content-type"];function lx({req:e,parameter:t,value:r}){if(e.headers=e.headers||{},!(sx.indexOf(t.name.toLowerCase())>-1)){if(void 0!==r&&t.content){const o=Object.keys(t.content)[0];return void(e.headers[t.name]=gh(r,o))}void 0!==r&&(!Array.isArray(r)||0!==r.length)&&(e.headers[t.name]=fa({key:t.name,value:r,style:t.style||"simple",explode:!(typeof t.explode>"u")&&t.explode,escape:!1}))}}function ux({req:e,parameter:t,value:r}){const{name:o}=t;if(e.headers=e.headers||{},void 0!==r&&t.content){const u=gh(r,Object.keys(t.content)[0]);e.headers.Cookie=jm({[o]:u})}else if(void 0!==r&&(!Array.isArray(r)||0!==r.length)){var i;const s=fa({key:t.name,value:r,escape:!1,style:t.style||"form",explode:null!==(i=t.explode)&&void 0!==i&&i}),u=Array.isArray(r)&&t.explode?`${o}=${s}`:s;e.headers.Cookie=jm({[o]:u})}}const cx=typeof globalThis<"u"?globalThis:typeof self<"u"?self:window,{btoa:fx}=cx,Pv=fx;function Mv(e,t){return`${t.toLowerCase()}-${e}`}const kv=e=>Array.isArray(e)?e:[],np=(e,{recurse:t=!0,depth:r=1}={})=>{if(Kf(e)){if("object"===e.type||"array"===e.type||Array.isArray(e.type)&&(e.type.includes("object")||e.type.includes("array")))return e;if(!(r>3e3)&&t){const o=Array.isArray(e.oneOf)?e.oneOf.find(s=>np(s,{recurse:t,depth:r+1})):void 0;if(o)return o;const i=Array.isArray(e.anyOf)?e.anyOf.find(s=>np(s,{recurse:t,depth:r+1})):void 0;if(i)return i}}},Dm=({value:e,silentFail:t=!1})=>{try{const r=JSON.parse(e);if(Kf(r)||Array.isArray(r))return r;if(!t)throw new Error("Expected JSON serialized object or array")}catch{if(!t)throw new Error("Could not parse parameter value string as JSON Object or JSON Array")}return e},yh=e=>{try{return new URL(e)}catch{const t=new URL(e,Ua),r=String(e).startsWith("/")?t.pathname:t.pathname.substring(1);return{hash:t.hash,host:"",hostname:"",href:"",origin:"",password:"",pathname:r,port:"",protocol:"",search:t.search,searchParams:t.searchParams}}};class Ex extends Ud{}const Sx={buildRequest:Nv};function _x({http:e,fetch:t,spec:r,operationId:o,pathName:i,method:s,parameters:u,securities:f,...m}){const S=e||t||Gl;i&&s&&!o&&(o=Mv(i,s));const T=Sx.buildRequest({spec:r,operationId:o,parameters:u,securities:f,http:S,...m});return T.body&&(Kf(T.body)||Array.isArray(T.body))&&(T.body=JSON.stringify(T.body)),S(T)}function Nv(e){const{spec:t,operationId:r,responseContentType:o,scheme:i,requestInterceptor:s,responseInterceptor:u,contextUrl:f,userFetch:m,server:S,serverVariables:T,http:I,signal:P,serverVariableEncoder:O}=e;let{parameters:M,parameterBuilders:d,baseURL:D}=e;const L=vv(t);d||(d=L?y:Cb);let Z={url:"",credentials:I&&I.withCredentials?"include":"same-origin",headers:{},cookies:{}};P&&(Z.signal=P),s&&(Z.requestInterceptor=s),u&&(Z.responseInterceptor=u),m&&(Z.userFetch=m);const we=function yx(e,t){return e&&e.paths?function vx(e,t){return function gx(e,t,r){if(!e||"object"!=typeof e||!e.paths||"object"!=typeof e.paths)return null;const{paths:o}=e;for(const i in o)for(const s in o[i]){if("PARAMETERS"===s.toUpperCase())continue;const u=o[i][s];if(!u||"object"!=typeof u)continue;const f={spec:e,pathName:i,method:s.toUpperCase(),operation:u},m=t(f);if(r&&m)return f}}(e,t,!0)||null}(e,({pathName:r,method:o,operation:i})=>{if(!i||"object"!=typeof i)return!1;const s=i.operationId;return[Om(i,r,o),Mv(r,o),s].some(m=>m&&m===t)}):null}(t,r);if(!we)throw new Ex(`Operation ${r} not found`);const{operation:xe={},method:Ae,pathName:Se}=we;if(D=D??function wx(e){return vv(e.spec)?function Cx({spec:e,pathName:t,method:r,server:o,contextUrl:i,serverVariables:s={},serverVariableEncoder:u}){var f,m;let I,S=[],T="";const P=null==e||null===(f=e.paths)||void 0===f||null===(f=f[t])||void 0===f||null===(f=f[(r||"").toLowerCase()])||void 0===f?void 0:f.servers,O=null==e||null===(m=e.paths)||void 0===m||null===(m=m[t])||void 0===m?void 0:m.servers,M=e?.servers;if(S=Lm(P)?P:Lm(O)?O:Lm(M)?M:[ri],o&&(I=S.find(d=>d.url===o),I&&(T=o)),T||([I]=S,T=I.url),((e,{strict:t=!1}={})=>{try{const r=_v(e);if(!r.result.success)return!1;const o=[];r.ast.translate(o);const i=o.some(([s])=>"server-variable"===s);if(!t&&!i)try{return new URL(e,"https://vladimirgorej.com"),!0}catch{return!1}return!t||i}catch{return!1}})(T,{strict:!0})){const d=Object.entries({...I.variables}).reduce((D,[L,G])=>(D[L]=G.default,D),{});T=((e,t,r={})=>{const i={encoder:sb,...r},s=_v(e);if(!s.result.success)return e;const u=[];return s.ast.translate(u),u.filter(([m])=>lb.includes(m)).map(([m,S])=>"server-variable-name"===m?Object.hasOwn(t,S)?i.encoder(t[S],S):`{${S}}`:S).join("")})(T,{...d,...s},{encoder:"function"==typeof u?u:NE})}return function Ax(e="",t=""){const r=yh(e&&t?ep(t,e):e),o=yh(t),i=Fm(r.protocol)||Fm(o.protocol),s=r.host||o.host,u=r.pathname;let f;return f=i&&s?`${i}://${s+u}`:u,"/"===f[f.length-1]?f.slice(0,-1):f}(T,i)}(e):function Ox({spec:e,scheme:t,contextUrl:r=""}){const o=yh(r),i=Array.isArray(e.schemes)?e.schemes[0]:null,s=t||i||Fm(o.protocol)||"http",u=e.host||o.host||"",f=e.basePath||"";let m;return m=s&&u?`${s}://${u+f}`:f,"/"===m[m.length-1]?m.slice(0,-1):m}(e)}({spec:t,scheme:i,contextUrl:f,server:S,serverVariables:T,pathName:Se,method:Ae,serverVariableEncoder:O}),Z.url+=D,!r)return delete Z.cookies,Z;Z.url+=Se,Z.method=`${Ae}`.toUpperCase(),M=M||{};const qe=t.paths[Se]||{};o&&(Z.headers.accept=o);const Ue=(e=>{const t={};e.forEach(o=>{t[o.in]||(t[o.in]={}),t[o.in][o.name]=o});const r=[];return Object.keys(t).forEach(o=>{Object.keys(t[o]).forEach(i=>{r.push(t[o][i])})}),r})([].concat(kv(xe.parameters)).concat(kv(qe.parameters)));Ue.forEach(Ze=>{const wt=d[Ze.in];let Ot;if("body"===Ze.in&&Ze.schema&&Ze.schema.properties&&(Ot=M),Ot=Ze&&Ze.name&&M[Ze.name],typeof Ot>"u"?Ot=Ze&&Ze.name&&M[`${Ze.in}.${Ze.name}`]:((e,t)=>t.filter(r=>r.name===e))(Ze.name,Ue).length>1&&console.warn(`Parameter '${Ze.name}' is ambiguous because the defined spec has more than one parameter with the name: '${Ze.name}' and the passed-in parameter values did not define an 'in' value.`),null!==Ot){if(typeof Ze.default<"u"&&typeof Ot>"u"&&(Ot=Ze.default),typeof Ot>"u"&&Ze.required&&!Ze.allowEmptyValue)throw new Error(`Required parameter ${Ze.name} is not provided`);L&&"string"==typeof Ot&&(Pm("type",Ze.schema)&&"string"==typeof Ze.schema.type&&np(Ze.schema,{recurse:!1})?Ot=Dm({value:Ot,silentFail:!1}):(Pm("type",Ze.schema)&&Array.isArray(Ze.schema.type)&&np(Ze.schema,{recurse:!1})||!Pm("type",Ze.schema)&&np(Ze.schema,{recurse:!0}))&&(Ot=Dm({value:Ot,silentFail:!0}))),wt&&wt({req:Z,parameter:Ze,value:Ot,operation:xe,spec:t,baseURL:D})}});const ut={...e,operation:xe};if(Z=L?function dx(e,t){const{operation:r,requestBody:o,securities:i,spec:s,attachContentTypeForEmptyPayload:u}=e;let{requestContentType:f}=e;t=function px({request:e,securities:t={},operation:r={},spec:o}){var i;const s={...e},{authorized:u={}}=t,f=r.security||o.security||[],m=u&&!!Object.keys(u).length,S=(null==o||null===(i=o.components)||void 0===i?void 0:i.securitySchemes)||{};return s.headers=s.headers||{},s.query=s.query||{},Object.keys(t).length&&m&&f&&(!Array.isArray(r.security)||r.security.length)?(f.forEach(T=>{Object.keys(T).forEach(I=>{const P=u[I],O=S[I];if(!P)return;const M=P.value||P,{type:d}=O;if(P)if("apiKey"===d)"query"===O.in&&(s.query[O.name]=M),"header"===O.in&&(s.headers[O.name]=M),"cookie"===O.in&&(s.cookies[O.name]=M);else if("http"===d){if(/^basic$/i.test(O.scheme)){const G=Pv(`${M.username||""}:${M.password||""}`);s.headers.Authorization=`Basic ${G}`}/^bearer$/i.test(O.scheme)&&(s.headers.Authorization=`Bearer ${M}`)}else if("oauth2"===d||"openIdConnect"===d){const D=P.token||{},G=D[O["x-tokenName"]||"access_token"];let Z=D.token_type;(!Z||"bearer"===Z.toLowerCase())&&(Z="Bearer"),s.headers.Authorization=`${Z} ${G}`}})}),s):e}({request:t,securities:i,operation:r,spec:s});const m=r.requestBody||{},S=Object.keys(m.content||{}),T=f&&S.indexOf(f)>-1;if(o||u){if(f&&T)t.headers["Content-Type"]=f;else if(!f){const d=S[0];d&&(t.headers["Content-Type"]=d,f=d)}}else f&&T&&(t.headers["Content-Type"]=f);if(!e.responseContentType&&r.responses){const d=Object.entries(r.responses).filter(([D,L])=>{const G=parseInt(D,10);return G>=200&&G<300&&Kf(L.content)}).reduce((D,[,L])=>D.concat(Object.keys(L.content)),[]);d.length>0&&(t.headers.accept=d.join(", "))}if(o)if(f){if(S.indexOf(f)>-1)if("application/x-www-form-urlencoded"===f||"multipart/form-data"===f)if("object"==typeof o){var I,P;const d=null!==(I=null===(P=m.content[f])||void 0===P?void 0:P.encoding)&&void 0!==I?I:{};t.form={},Object.keys(o).forEach(D=>{let L;try{L=JSON.parse(o[D])}catch{L=o[D]}t.form[D]={value:L,encoding:d[D]||{}}})}else if("string"==typeof o){var O,M;const d=null!==(O=null===(M=m.content[f])||void 0===M?void 0:M.encoding)&&void 0!==O?O:{};try{t.form={};const D=JSON.parse(o);Object.entries(D).forEach(([L,G])=>{t.form[L]={value:G,encoding:d[L]||{}}})}catch{t.form=o}}else t.form=o;else t.body=o}else t.body=o;return t}(ut,Z):function hx(e,t){const{spec:r,operation:o,securities:i,requestContentType:s,responseContentType:u,attachContentTypeForEmptyPayload:f}=e;if(t=function mx({request:e,securities:t={},operation:r={},spec:o}){const i={...e},{authorized:s={},specSecurity:u=[]}=t,f=r.security||u,m=s&&!!Object.keys(s).length,S=o.securityDefinitions;return i.headers=i.headers||{},i.query=i.query||{},Object.keys(t).length&&m&&f&&(!Array.isArray(r.security)||r.security.length)?(f.forEach(T=>{Object.keys(T).forEach(I=>{const P=s[I];if(!P)return;const{token:O}=P,M=P.value||P,d=S[I],{type:D}=d,G=O&&O[d["x-tokenName"]||"access_token"];let Z=O&&O.token_type;if(P)if("apiKey"===D){const we="query"===d.in?"query":"headers";i[we]=i[we]||{},i[we][d.name]=M}else"basic"===D?M.header?i.headers.authorization=M.header:(M.base64=Pv(`${M.username||""}:${M.password||""}`),i.headers.authorization=`Basic ${M.base64}`):"oauth2"===D&&G&&(Z=Z&&"bearer"!==Z.toLowerCase()?Z:"Bearer",i.headers.authorization=`${Z} ${G}`)})}),i):e}({request:t,securities:i,operation:o,spec:r}),t.body||t.form||f)s?t.headers["Content-Type"]=s:Array.isArray(o.consumes)?[t.headers["Content-Type"]]=o.consumes:Array.isArray(r.consumes)?[t.headers["Content-Type"]]=r.consumes:o.parameters&&o.parameters.filter(m=>"file"===m.type).length?t.headers["Content-Type"]="multipart/form-data":o.parameters&&o.parameters.filter(m=>"formData"===m.in).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(s){const m=o.parameters&&o.parameters.filter(T=>"body"===T.in).length>0,S=o.parameters&&o.parameters.filter(T=>"formData"===T.in).length>0;(m||S)&&(t.headers["Content-Type"]=s)}return!u&&Array.isArray(o.produces)&&o.produces.length>0&&(t.headers.accept=o.produces.join(", ")),t}(ut,Z),Z.cookies&&Object.keys(Z.cookies).length>0){const Ze=jm(Z.cookies);QE(Z.headers.Cookie)?Z.headers.Cookie+=`; ${Ze}`:Z.headers.Cookie=Ze}return Z.cookies&&delete Z.cookies,yi(Z)}const Fm=e=>e?e.replace(/\W/g,""):null,Lm=e=>Array.isArray(e)&&e.length>0,Tx=function(){var e=(0,b.A)(function*(t,r,o={}){const{returnEntireTree:i,baseDoc:s,requestInterceptor:u,responseInterceptor:f,parameterMacro:m,modelPropertyMacro:S,useCircularStructures:T,strategies:I}=o,P={spec:t,pathDiscriminator:r,baseDoc:s,requestInterceptor:u,responseInterceptor:f,parameterMacro:m,modelPropertyMacro:S,useCircularStructures:T,strategies:I},M=I.find(D=>D.match(t)).normalize(t),d=yield bv({spec:M,...P,allowMetaPatches:!0,skipNormalization:!gv(t)});return!i&&Array.isArray(r)&&r.length&&(d.spec=r.reduce((D,L)=>D?.[L],d.spec)||null),d});return function(r,o){return e.apply(this,arguments)}}(),Ix=(e=>function(){var t=(0,b.A)(function*(r,o,i={}){const s={...e,...i};return Tx(r,o,s)});return function(r,o){return t.apply(this,arguments)}}())({strategies:[Ev,yv,hv]});var jv=n(36046),Dv=w.createContext(null),Fv=function Rx(e){e()},Mx=function(){return Fv},Lv={notify:function(){},get:function(){return[]}};function Bv(e,t){var r,o=Lv;function u(){T.onStateChange&&T.onStateChange()}function m(){r||(r=t?t.addNestedSub(u):e.subscribe(u),o=function kx(){var e=Mx(),t=null,r=null;return{clear:function(){t=null,r=null},notify:function(){e(function(){for(var i=t;i;)i.callback(),i=i.next})},get:function(){for(var i=[],s=t;s;)i.push(s),s=s.next;return i},subscribe:function(i){var s=!0,u=r={callback:i,next:null,prev:r};return u.prev?u.prev.next=u:t=u,function(){!s||null===t||(s=!1,u.next?u.next.prev=u.prev:r=u.prev,u.prev?u.prev.next=u.next:t=u.next)}}}}())}var T={addNestedSub:function i(I){return m(),o.subscribe(I)},notifyNestedSubs:function s(){o.notify()},handleChangeWrapper:u,isSubscribed:function f(){return!!r},trySubscribe:m,tryUnsubscribe:function S(){r&&(r(),r=void 0,o.clear(),o=Lv)},getListeners:function(){return o}};return T}var Uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?w.useLayoutEffect:w.useEffect;const jx=function Nx(e){var t=e.store,r=e.context,o=e.children,i=(0,w.useMemo)(function(){var f=Bv(t);return{store:t,subscription:f}},[t]),s=(0,w.useMemo)(function(){return t.getState()},[t]);return Uv(function(){var f=i.subscription;return f.onStateChange=f.notifyNestedSubs,f.trySubscribe(),s!==t.getState()&&f.notifyNestedSubs(),function(){f.tryUnsubscribe(),f.onStateChange=null}},[i,s]),w.createElement((r||Dv).Provider,{value:i},o)};function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[i]=e[i]);return r}var Dx=n(75243),$v=n.n(Dx),Fx=n(58770),Lx=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Bx=["reactReduxForwardedRef"],Ux=[],$x=[null,null];function zx(e,t){return[t.payload,e[1]+1]}function zv(e,t,r){Uv(function(){return e.apply(void 0,t)},r)}function Hx(e,t,r,o,i,s,u){e.current=o,t.current=i,r.current=!1,s.current&&(s.current=null,u())}function Vx(e,t,r,o,i,s,u,f,m,S){if(e){var T=!1,I=null,P=function(){if(!T){var D,L,d=t.getState();try{D=o(d,i.current)}catch(G){L=G,I=G}L||(I=null),D===s.current?u.current||m():(s.current=D,f.current=D,u.current=!0,S({type:"STORE_UPDATED",payload:{error:L}}))}};return r.onStateChange=P,r.trySubscribe(),P(),function(){if(T=!0,r.tryUnsubscribe(),r.onStateChange=null,I)throw I}}}var Wx=function(){return[null,0]};function Gx(e,t){void 0===t&&(t={});var o=t.getDisplayName,i=void 0===o?function(Ae){return"ConnectAdvanced("+Ae+")"}:o,s=t.methodName,u=void 0===s?"connectAdvanced":s,f=t.renderCountProp,m=void 0===f?void 0:f,S=t.shouldHandleStateChanges,T=void 0===S||S,I=t.storeKey,P=void 0===I?"store":I,d=t.forwardRef,D=void 0!==d&&d,L=t.context,G=void 0===L?Dv:L,Z=op(t,Lx),xe=G;return function(Se){var qe=Se.displayName||Se.name||"Component",Ue=i(qe),ut=_u({},Z,{getDisplayName:i,methodName:u,renderCountProp:m,shouldHandleStateChanges:T,storeKey:P,displayName:Ue,wrappedComponentName:qe,WrappedComponent:Se}),Ze=Z.pure,Ot=Ze?w.useMemo:function(Xe){return Xe()};function Ht(Xe){var Oe=(0,w.useMemo)(function(){var ht=Xe.reactReduxForwardedRef,Mt=op(Xe,Bx);return[Xe.context,ht,Mt]},[Xe]),Pe=Oe[0],it=Oe[1],Ke=Oe[2],Lt=(0,w.useMemo)(function(){return Pe&&Pe.Consumer&&(0,Fx.isContextConsumer)(w.createElement(Pe.Consumer,null))?Pe:xe},[Pe,xe]),sr=(0,w.useContext)(Lt),yr=!!Xe.store&&!!Xe.store.getState&&!!Xe.store.dispatch,Me=yr?Xe.store:sr.store,Ne=(0,w.useMemo)(function(){return function wt(Xe){return e(Xe.dispatch,ut)}(Me)},[Me]),Dt=(0,w.useMemo)(function(){if(!T)return $x;var ht=Bv(Me,yr?null:sr.subscription),Mt=ht.notifyNestedSubs.bind(ht);return[ht,Mt]},[Me,yr,sr]),xr=Dt[0],St=Dt[1],an=(0,w.useMemo)(function(){return yr?sr:_u({},sr,{subscription:xr})},[yr,sr,xr]),Tr=(0,w.useReducer)(zx,Ux,Wx),zn=Tr[0][0],Wn=Tr[1];if(zn&&zn.error)throw zn.error;var so=(0,w.useRef)(),Hn=(0,w.useRef)(Ke),$=(0,w.useRef)(),Q=(0,w.useRef)(!1),me=Ot(function(){return $.current&&Ke===Hn.current?$.current:Ne(Me.getState(),Ke)},[Me,zn,Ke]);zv(Hx,[Hn,so,Q,Ke,me,$,St]),zv(Vx,[T,Me,xr,Ne,Hn,so,Q,$,St,Wn],[Me,xr,Ne]);var ze=(0,w.useMemo)(function(){return w.createElement(Se,_u({},me,{ref:it}))},[it,Se,me]);return(0,w.useMemo)(function(){return T?w.createElement(Lt.Provider,{value:an},ze):ze},[Lt,ze,an])}var gr=Ze?w.memo(Ht):Ht;if(gr.WrappedComponent=Se,gr.displayName=Ht.displayName=Ue,D){var lt=w.forwardRef(function(Oe,Pe){return w.createElement(gr,_u({},Oe,{reactReduxForwardedRef:Pe}))});return lt.displayName=Ue,lt.WrappedComponent=Se,$v()(lt,Se)}return $v()(gr,Se)}}function Hv(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Bm(e,t){if(Hv(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(var i=0;i=0;o--){var i=t[o](e);if(i)return i}return function(s,u){throw new Error("Invalid value of type "+typeof e+" for "+r+" argument when connecting component "+u.wrappedComponentName+".")}}function f2(e,t){return e===t}function d2(e){var t=void 0===e?{}:e,r=t.connectHOC,o=void 0===r?Gx:r,i=t.mapStateToPropsFactories,s=void 0===i?e2:i,u=t.mapDispatchToPropsFactories,f=void 0===u?Zx:u,m=t.mergePropsFactories,S=void 0===m?i2:m,T=t.selectorFactory,I=void 0===T?u2:T;return function(O,M,d,D){void 0===D&&(D={});var G=D.pure,Z=void 0===G||G,we=D.areStatesEqual,xe=void 0===we?f2:we,Ae=D.areOwnPropsEqual,Se=void 0===Ae?Bm:Ae,qe=D.areStatePropsEqual,Ue=void 0===qe?Bm:qe,ut=D.areMergedPropsEqual,Ze=void 0===ut?Bm:ut,wt=op(D,c2),Ot=$m(O,s,"mapStateToProps"),Ht=$m(M,f,"mapDispatchToProps"),gr=$m(d,S,"mergeProps");return o(I,_u({methodName:"connect",getDisplayName:function(Xe){return"Connect("+Xe+")"},shouldHandleStateChanges:!!O,initMapStateToProps:Ot,initMapDispatchToProps:Ht,initMergeProps:gr,pure:Z,areStatesEqual:xe,areOwnPropsEqual:Se,areStatePropsEqual:Ue,areMergedPropsEqual:Ze},wt))}}const p2=d2();Fv=jv.unstable_batchedUpdates;var g2=n(43712),v2=n.n(g2),y2=n(39631),E2=n.n(y2);function zm(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,i=function T2(e){if(0===e.length||1===e.length)return e;var t=e.join(".");return Wm[t]||(Wm[t]=function O2(e){var t=e.length;return 0===t||1===t?e:2===t?[e[0],e[1],"".concat(e[0],".").concat(e[1]),"".concat(e[1],".").concat(e[0])]:3===t?[e[0],e[1],e[2],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0])]:t>=4?[e[0],e[1],e[2],e[3],"".concat(e[0],".").concat(e[1]),"".concat(e[0],".").concat(e[2]),"".concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[0]),"".concat(e[1],".").concat(e[2]),"".concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[1]),"".concat(e[2],".").concat(e[3]),"".concat(e[3],".").concat(e[0]),"".concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[0]),"".concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[0],".").concat(e[1],".").concat(e[2],".").concat(e[3]),"".concat(e[0],".").concat(e[1],".").concat(e[3],".").concat(e[2]),"".concat(e[0],".").concat(e[2],".").concat(e[1],".").concat(e[3]),"".concat(e[0],".").concat(e[2],".").concat(e[3],".").concat(e[1]),"".concat(e[0],".").concat(e[3],".").concat(e[1],".").concat(e[2]),"".concat(e[0],".").concat(e[3],".").concat(e[2],".").concat(e[1]),"".concat(e[1],".").concat(e[0],".").concat(e[2],".").concat(e[3]),"".concat(e[1],".").concat(e[0],".").concat(e[3],".").concat(e[2]),"".concat(e[1],".").concat(e[2],".").concat(e[0],".").concat(e[3]),"".concat(e[1],".").concat(e[2],".").concat(e[3],".").concat(e[0]),"".concat(e[1],".").concat(e[3],".").concat(e[0],".").concat(e[2]),"".concat(e[1],".").concat(e[3],".").concat(e[2],".").concat(e[0]),"".concat(e[2],".").concat(e[0],".").concat(e[1],".").concat(e[3]),"".concat(e[2],".").concat(e[0],".").concat(e[3],".").concat(e[1]),"".concat(e[2],".").concat(e[1],".").concat(e[0],".").concat(e[3]),"".concat(e[2],".").concat(e[1],".").concat(e[3],".").concat(e[0]),"".concat(e[2],".").concat(e[3],".").concat(e[0],".").concat(e[1]),"".concat(e[2],".").concat(e[3],".").concat(e[1],".").concat(e[0]),"".concat(e[3],".").concat(e[0],".").concat(e[1],".").concat(e[2]),"".concat(e[3],".").concat(e[0],".").concat(e[2],".").concat(e[1]),"".concat(e[3],".").concat(e[1],".").concat(e[0],".").concat(e[2]),"".concat(e[3],".").concat(e[1],".").concat(e[2],".").concat(e[0]),"".concat(e[3],".").concat(e[2],".").concat(e[0],".").concat(e[1]),"".concat(e[3],".").concat(e[2],".").concat(e[1],".").concat(e[0])]:void 0}(e)),Wm[t]}(e.filter(function(s){return"token"!==s}));return i.reduce(function(s,u){return Yf(Yf({},s),r[u])},t)}function Kv(e){return e.join(" ")}function Yv(e){var t=e.node,r=e.stylesheet,o=e.style,i=void 0===o?{}:o,s=e.useInlineStyles,u=e.key,f=t.properties,S=t.tagName;if("text"===t.type)return t.value;if(S){var P,I=function R2(e,t){var r=0;return function(o){return r+=1,o.map(function(i,s){return Yv({node:i,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(r,"-").concat(s)})})}}(r,s);if(s){var O=Object.keys(r).reduce(function(L,G){return G.split(".").forEach(function(Z){L.includes(Z)||L.push(Z)}),L},[]),M=f.className&&f.className.includes("token")?["token"]:[],d=f.className&&M.concat(f.className.filter(function(L){return!O.includes(L)}));P=Yf(Yf({},f),{},{className:Kv(d)||void 0,style:I2(f.className,Object.assign({},f.style,i),r)})}else P=Yf(Yf({},f),{},{className:Kv(f.className)});var D=I(t.children);return w.createElement(S,_u({key:u},P),D)}}var M2=["language","children","style","customStyle","codeTagProps","useInlineStyles","showLineNumbers","showInlineLineNumbers","startingLineNumber","lineNumberContainerStyle","lineNumberStyle","wrapLines","wrapLongLines","lineProps","renderer","PreTag","CodeTag","code","astGenerator"];function Jv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,o)}return r}function sc(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],o=0;o2&&void 0!==arguments[2]?arguments[2]:[];return t||Se.length>0?function M(xe,Ae){return Eh({children:xe,lineNumber:Ae,lineNumberStyle:f,largestLineNumber:u,showInlineLineNumbers:i,lineProps:r,className:arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],showLineNumbers:o,wrapLongLines:m,wrapLines:t})}(xe,Ae,Se):function d(xe,Ae){if(o&&Ae&&i){var Se=Zv(f,Ae,u);xe.unshift(Xv(Ae,Se))}return xe}(xe,Ae)}for(var L=function(){var Ae=T[O],Se=Ae.children[0].value,qe=function N2(e){return e.match(k2)}(Se);if(qe){var Ue=Se.split("\n");Ue.forEach(function(ut,Ze){var wt=o&&I.length+s,Ot={type:"text",value:"".concat(ut,"\n")};if(0===Ze){var gr=D(T.slice(P+1,O).concat(Eh({children:[Ot],className:Ae.properties.className})),wt);I.push(gr)}else if(Ze===Ue.length-1){var lt=T[O+1]&&T[O+1].children&&T[O+1].children[0],Xe={type:"text",value:"".concat(ut)};if(lt){var Oe=Eh({children:[Xe],className:Ae.properties.className});T.splice(O+1,0,Oe)}else{var it=D([Xe],wt,Ae.properties.className);I.push(it)}}else{var Lt=D([Ot],wt,Ae.properties.className);I.push(Lt)}}),P=O}O++};O=0)&&Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(o,M2);Ke=Ke||e;var sr=L?w.createElement(D2,{containerStyle:Ae,codeStyle:O.style||{},numberStyle:qe,startingLineNumber:xe,codeString:it}):null,yr=S.hljs||S['pre[class*="language-"]']||{backgroundColor:"#fff"},pt=qv(Ke)?"hljs":"prismjs",Me=Object.assign({},Lt,d?{style:Object.assign({},yr,I)}:{className:Lt.className?"".concat(pt," ").concat(Lt.className):pt,style:Object.assign({},I)});if(O.style=sc(Ze?{whiteSpace:"pre-wrap"}:{whiteSpace:"pre"},O.style),!Ke)return w.createElement(lt,Me,sr,w.createElement(Oe,O,it));(void 0===Ue&&Ht||Ze)&&(Ue=!0),Ht=Ht||B2;var Ne=[{type:"text",value:it}],Dt=function U2(e){var t=e.astGenerator,r=e.language,o=e.code,i=e.defaultCodeValue;if(qv(t)){var s=function(e,t){return-1!==e.listLanguages().indexOf(t)}(t,r);return"text"===r?{value:i,language:"text"}:s?t.highlight(r,o):t.highlightAuto(o)}try{return r&&"text"!==r?{value:t.highlight(o,r)}:{value:i}}catch{return{value:i}}}({astGenerator:Ke,language:u,code:it,defaultCodeValue:Ne});null===Dt.language&&(Dt.value=Ne);var an=L2(Dt,Ue,Ot,L,Z,xe,xe+(null!==(i=null===(s=it.match(/\n/g))||void 0===s?void 0:s.length)&&void 0!==i?i:0),qe,Ze);return w.createElement(lt,Me,w.createElement(Oe,O,!Z&&sr,Ht({rows:an,stylesheet:S,useInlineStyles:d})))}}(e0,{});t0.registerLanguage=e0.registerLanguage;const z2=t0;var H2=n(57458);const W2=n.n(H2)();var G2=n(42467);const Y2=n.n(G2)();var J2=n(73428);const Z2=n.n(J2)();var Q2=n(47719);const eS=n.n(Q2)();var tS=n(64346);const nS=n.n(tS)();var oS=n(1357);const aS=n.n(oS)();var sS=n(68676);const uS=n.n(sS)(),cS={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#333",color:"white"},"hljs-name":{fontWeight:"bold"},"hljs-strong":{fontWeight:"bold"},"hljs-code":{fontStyle:"italic",color:"#888"},"hljs-emphasis":{fontStyle:"italic"},"hljs-tag":{color:"#62c8f3"},"hljs-variable":{color:"#ade5fc"},"hljs-template-variable":{color:"#ade5fc"},"hljs-selector-id":{color:"#ade5fc"},"hljs-selector-class":{color:"#ade5fc"},"hljs-string":{color:"#a2fca2"},"hljs-bullet":{color:"#d36363"},"hljs-type":{color:"#ffa"},"hljs-title":{color:"#ffa"},"hljs-section":{color:"#ffa"},"hljs-attribute":{color:"#ffa"},"hljs-quote":{color:"#ffa"},"hljs-built_in":{color:"#ffa"},"hljs-builtin-name":{color:"#ffa"},"hljs-number":{color:"#d36363"},"hljs-symbol":{color:"#d36363"},"hljs-keyword":{color:"#fcc28c"},"hljs-selector-tag":{color:"#fcc28c"},"hljs-literal":{color:"#fcc28c"},"hljs-comment":{color:"#888"},"hljs-deletion":{color:"#333",backgroundColor:"#fc9b9b"},"hljs-regexp":{color:"#c6b4f0"},"hljs-link":{color:"#c6b4f0"},"hljs-meta":{color:"#fc9b9b"},"hljs-addition":{backgroundColor:"#a2fca2",color:"#333"}},fS={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#222",color:"#aaa"},"hljs-subst":{color:"#aaa"},"hljs-section":{color:"#fff",fontWeight:"bold"},"hljs-comment":{color:"#444"},"hljs-quote":{color:"#444"},"hljs-meta":{color:"#444"},"hljs-string":{color:"#ffcc33"},"hljs-symbol":{color:"#ffcc33"},"hljs-bullet":{color:"#ffcc33"},"hljs-regexp":{color:"#ffcc33"},"hljs-number":{color:"#00cc66"},"hljs-addition":{color:"#00cc66"},"hljs-built_in":{color:"#32aaee"},"hljs-builtin-name":{color:"#32aaee"},"hljs-literal":{color:"#32aaee"},"hljs-type":{color:"#32aaee"},"hljs-template-variable":{color:"#32aaee"},"hljs-attribute":{color:"#32aaee"},"hljs-link":{color:"#32aaee"},"hljs-keyword":{color:"#6644aa"},"hljs-selector-tag":{color:"#6644aa"},"hljs-name":{color:"#6644aa"},"hljs-selector-id":{color:"#6644aa"},"hljs-selector-class":{color:"#6644aa"},"hljs-title":{color:"#bb1166"},"hljs-variable":{color:"#bb1166"},"hljs-deletion":{color:"#bb1166"},"hljs-template-tag":{color:"#bb1166"},"hljs-doctag":{fontWeight:"bold"},"hljs-strong":{fontWeight:"bold"},"hljs-emphasis":{fontStyle:"italic"}},dS={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#272822",color:"#ddd"},"hljs-tag":{color:"#f92672"},"hljs-keyword":{color:"#f92672",fontWeight:"bold"},"hljs-selector-tag":{color:"#f92672",fontWeight:"bold"},"hljs-literal":{color:"#f92672",fontWeight:"bold"},"hljs-strong":{color:"#f92672"},"hljs-name":{color:"#f92672"},"hljs-code":{color:"#66d9ef"},"hljs-class .hljs-title":{color:"white"},"hljs-attribute":{color:"#bf79db"},"hljs-symbol":{color:"#bf79db"},"hljs-regexp":{color:"#bf79db"},"hljs-link":{color:"#bf79db"},"hljs-string":{color:"#a6e22e"},"hljs-bullet":{color:"#a6e22e"},"hljs-subst":{color:"#a6e22e"},"hljs-title":{color:"#a6e22e",fontWeight:"bold"},"hljs-section":{color:"#a6e22e",fontWeight:"bold"},"hljs-emphasis":{color:"#a6e22e"},"hljs-type":{color:"#a6e22e",fontWeight:"bold"},"hljs-built_in":{color:"#a6e22e"},"hljs-builtin-name":{color:"#a6e22e"},"hljs-selector-attr":{color:"#a6e22e"},"hljs-selector-pseudo":{color:"#a6e22e"},"hljs-addition":{color:"#a6e22e"},"hljs-variable":{color:"#a6e22e"},"hljs-template-tag":{color:"#a6e22e"},"hljs-template-variable":{color:"#a6e22e"},"hljs-comment":{color:"#75715e"},"hljs-quote":{color:"#75715e"},"hljs-deletion":{color:"#75715e"},"hljs-meta":{color:"#75715e"},"hljs-doctag":{fontWeight:"bold"},"hljs-selector-id":{fontWeight:"bold"}},pS={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#2E3440",color:"#D8DEE9"},"hljs-subst":{color:"#D8DEE9"},"hljs-selector-tag":{color:"#81A1C1"},"hljs-selector-id":{color:"#8FBCBB",fontWeight:"bold"},"hljs-selector-class":{color:"#8FBCBB"},"hljs-selector-attr":{color:"#8FBCBB"},"hljs-selector-pseudo":{color:"#88C0D0"},"hljs-addition":{backgroundColor:"rgba(163, 190, 140, 0.5)"},"hljs-deletion":{backgroundColor:"rgba(191, 97, 106, 0.5)"},"hljs-built_in":{color:"#8FBCBB"},"hljs-type":{color:"#8FBCBB"},"hljs-class":{color:"#8FBCBB"},"hljs-function":{color:"#88C0D0"},"hljs-function > .hljs-title":{color:"#88C0D0"},"hljs-keyword":{color:"#81A1C1"},"hljs-literal":{color:"#81A1C1"},"hljs-symbol":{color:"#81A1C1"},"hljs-number":{color:"#B48EAD"},"hljs-regexp":{color:"#EBCB8B"},"hljs-string":{color:"#A3BE8C"},"hljs-title":{color:"#8FBCBB"},"hljs-params":{color:"#D8DEE9"},"hljs-bullet":{color:"#81A1C1"},"hljs-code":{color:"#8FBCBB"},"hljs-emphasis":{fontStyle:"italic"},"hljs-formula":{color:"#8FBCBB"},"hljs-strong":{fontWeight:"bold"},"hljs-link:hover":{textDecoration:"underline"},"hljs-quote":{color:"#4C566A"},"hljs-comment":{color:"#4C566A"},"hljs-doctag":{color:"#8FBCBB"},"hljs-meta":{color:"#5E81AC"},"hljs-meta-keyword":{color:"#5E81AC"},"hljs-meta-string":{color:"#A3BE8C"},"hljs-attr":{color:"#8FBCBB"},"hljs-attribute":{color:"#D8DEE9"},"hljs-builtin-name":{color:"#81A1C1"},"hljs-name":{color:"#81A1C1"},"hljs-section":{color:"#88C0D0"},"hljs-tag":{color:"#81A1C1"},"hljs-variable":{color:"#D8DEE9"},"hljs-template-variable":{color:"#D8DEE9"},"hljs-template-tag":{color:"#5E81AC"},"abnf .hljs-attribute":{color:"#88C0D0"},"abnf .hljs-symbol":{color:"#EBCB8B"},"apache .hljs-attribute":{color:"#88C0D0"},"apache .hljs-section":{color:"#81A1C1"},"arduino .hljs-built_in":{color:"#88C0D0"},"aspectj .hljs-meta":{color:"#D08770"},"aspectj > .hljs-title":{color:"#88C0D0"},"bnf .hljs-attribute":{color:"#8FBCBB"},"clojure .hljs-name":{color:"#88C0D0"},"clojure .hljs-symbol":{color:"#EBCB8B"},"coq .hljs-built_in":{color:"#88C0D0"},"cpp .hljs-meta-string":{color:"#8FBCBB"},"css .hljs-built_in":{color:"#88C0D0"},"css .hljs-keyword":{color:"#D08770"},"diff .hljs-meta":{color:"#8FBCBB"},"ebnf .hljs-attribute":{color:"#8FBCBB"},"glsl .hljs-built_in":{color:"#88C0D0"},"groovy .hljs-meta:not(:first-child)":{color:"#D08770"},"haxe .hljs-meta":{color:"#D08770"},"java .hljs-meta":{color:"#D08770"},"ldif .hljs-attribute":{color:"#8FBCBB"},"lisp .hljs-name":{color:"#88C0D0"},"lua .hljs-built_in":{color:"#88C0D0"},"moonscript .hljs-built_in":{color:"#88C0D0"},"nginx .hljs-attribute":{color:"#88C0D0"},"nginx .hljs-section":{color:"#5E81AC"},"pf .hljs-built_in":{color:"#88C0D0"},"processing .hljs-built_in":{color:"#88C0D0"},"scss .hljs-keyword":{color:"#81A1C1"},"stylus .hljs-keyword":{color:"#81A1C1"},"swift .hljs-meta":{color:"#D08770"},"vim .hljs-built_in":{color:"#88C0D0",fontStyle:"italic"},"yaml .hljs-meta":{color:"#D08770"}},hS={hljs:{display:"block",overflowX:"auto",padding:"0.5em",background:"#282b2e",color:"#e0e2e4"},"hljs-keyword":{color:"#93c763",fontWeight:"bold"},"hljs-selector-tag":{color:"#93c763",fontWeight:"bold"},"hljs-literal":{color:"#93c763",fontWeight:"bold"},"hljs-selector-id":{color:"#93c763"},"hljs-number":{color:"#ffcd22"},"hljs-attribute":{color:"#668bb0"},"hljs-code":{color:"white"},"hljs-class .hljs-title":{color:"white"},"hljs-section":{color:"white",fontWeight:"bold"},"hljs-regexp":{color:"#d39745"},"hljs-link":{color:"#d39745"},"hljs-meta":{color:"#557182"},"hljs-tag":{color:"#8cbbad"},"hljs-name":{color:"#8cbbad",fontWeight:"bold"},"hljs-bullet":{color:"#8cbbad"},"hljs-subst":{color:"#8cbbad"},"hljs-emphasis":{color:"#8cbbad"},"hljs-type":{color:"#8cbbad",fontWeight:"bold"},"hljs-built_in":{color:"#8cbbad"},"hljs-selector-attr":{color:"#8cbbad"},"hljs-selector-pseudo":{color:"#8cbbad"},"hljs-addition":{color:"#8cbbad"},"hljs-variable":{color:"#8cbbad"},"hljs-template-tag":{color:"#8cbbad"},"hljs-template-variable":{color:"#8cbbad"},"hljs-string":{color:"#ec7600"},"hljs-symbol":{color:"#ec7600"},"hljs-comment":{color:"#818e96"},"hljs-quote":{color:"#818e96"},"hljs-deletion":{color:"#818e96"},"hljs-selector-class":{color:"#A082BD"},"hljs-doctag":{fontWeight:"bold"},"hljs-title":{fontWeight:"bold"},"hljs-strong":{fontWeight:"bold"}},mS={"hljs-comment":{color:"#969896"},"hljs-quote":{color:"#969896"},"hljs-variable":{color:"#cc6666"},"hljs-template-variable":{color:"#cc6666"},"hljs-tag":{color:"#cc6666"},"hljs-name":{color:"#cc6666"},"hljs-selector-id":{color:"#cc6666"},"hljs-selector-class":{color:"#cc6666"},"hljs-regexp":{color:"#cc6666"},"hljs-deletion":{color:"#cc6666"},"hljs-number":{color:"#de935f"},"hljs-built_in":{color:"#de935f"},"hljs-builtin-name":{color:"#de935f"},"hljs-literal":{color:"#de935f"},"hljs-type":{color:"#de935f"},"hljs-params":{color:"#de935f"},"hljs-meta":{color:"#de935f"},"hljs-link":{color:"#de935f"},"hljs-attribute":{color:"#f0c674"},"hljs-string":{color:"#b5bd68"},"hljs-symbol":{color:"#b5bd68"},"hljs-bullet":{color:"#b5bd68"},"hljs-addition":{color:"#b5bd68"},"hljs-title":{color:"#81a2be"},"hljs-section":{color:"#81a2be"},"hljs-keyword":{color:"#b294bb"},"hljs-selector-tag":{color:"#b294bb"},hljs:{display:"block",overflowX:"auto",background:"#1d1f21",color:"#c5c8c6",padding:"0.5em"},"hljs-emphasis":{fontStyle:"italic"},"hljs-strong":{fontWeight:"bold"}};var gS=n(22571),vS=n(34827),yS=n.n(vS),ES=n(8339),bS=n.n(ES),xS=n(47838),SS=n.n(xS),_S=n(69285),wS=n.n(_S),CS=n(12651),AS=n.n(CS),OS=n(13306),TS=n.n(OS),IS=n(26327),RS=n.n(IS),PS=n(49763),MS=n.n(PS),kS=n(66615),NS=n.n(kS),jS=n(94870),DS=n.n(jS),FS=n(11393),LS=n.n(FS),BS=n(2457),US=n.n(BS),$S=n(14166),zS=n.n($S),HS=n(96319),VS=n.n(HS),WS=n(71426),GS=n.n(WS),KS=n(86226),YS=n.n(KS),JS=n(8628),XS=n.n(JS),ZS=n(64007),QS=n.n(ZS),qS=n(15413),e_=n.n(qS),t_=n(48079),r_=n.n(t_),n_=n(73363),o_=n.n(n_),i_=n(18979),a_=n.n(i_),s_=n(31721),l_=n.n(s_),u_=n(129),c_=n.n(u_),f_=n(165),d_=n.n(f_),p_=n(11265),h_=n.n(p_),m_=n(85569),g_=n.n(m_),v_=n(74707),y_=n.n(v_),E_=n(29544),b_=n.n(E_),x_=n(73078),S_=n.n(x_),__=n(57119),w_=n.n(__),C_=n(56255),A_=n.n(C_),O_=n(96984),T_=n.n(O_),I_=n(89126),bh=n(41570),R_=n(10850);function ap(e){return(ap="function"==typeof bh&&"symbol"==typeof R_?function(t){return typeof t}:function(t){return t&&"function"==typeof bh&&t.constructor===bh&&t!==bh.prototype?"symbol":typeof t})(e)}var P_=n(68205);function N_(e,t,r){return(t=function k_(e){var t=function M_(e,t){if("object"!=ap(e)||!e)return e;var r=e[P_];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=ap(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ap(t)?t:t+""}(t))in e?I_(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var r0=n(36820),j_=n(79610);function Gm(){var e;return Gm=r0?j_(e=r0).call(e):function(t){for(var r=1;r"u"||null===e}var Aa={isNothing:n0,isObject:function H_(e){return"object"==typeof e&&null!==e},toArray:function V_(e){return Array.isArray(e)?e:n0(e)?[]:[e]},repeat:function G_(e,t){var o,r="";for(o=0;of&&(t=o-f+(s=" ... ").length),r-o>f&&(r=o+f-(u=" ...").length),{str:s+e.slice(t,r).replace(/\t/g,"\u2192")+u,pos:o-t+s.length}}function Ym(e,t){return Aa.repeat(" ",t-e.length)+e}var tw=function ew(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||(t.maxLength=79),"number"!=typeof t.indent&&(t.indent=1),"number"!=typeof t.linesBefore&&(t.linesBefore=3),"number"!=typeof t.linesAfter&&(t.linesAfter=2);for(var s,r=/\r?\n|\r|\0/g,o=[0],i=[],u=-1;s=r.exec(e.buffer);)i.push(s.index),o.push(s.index+s[0].length),e.position<=s.index&&u<0&&(u=o.length-2);u<0&&(u=o.length-1);var m,S,f="",T=Math.min(e.line+t.linesAfter,i.length).toString().length,I=t.maxLength-(t.indent+T+3);for(m=1;m<=t.linesBefore&&!(u-m<0);m++)S=Km(e.buffer,o[u-m],i[u-m],e.position-(o[u]-o[u-m]),I),f=Aa.repeat(" ",t.indent)+Ym((e.line-m+1).toString(),T)+" | "+S.str+"\n"+f;for(S=Km(e.buffer,o[u],i[u],e.position,I),f+=Aa.repeat(" ",t.indent)+Ym((e.line+1).toString(),T)+" | "+S.str+"\n",f+=Aa.repeat("-",t.indent+T+3+S.pos)+"^\n",m=1;m<=t.linesAfter&&!(u+m>=i.length);m++)S=Km(e.buffer,o[u+m],i[u+m],e.position-(o[u]-o[u+m]),I),f+=Aa.repeat(" ",t.indent)+Ym((e.line+m+1).toString(),T)+" | "+S.str+"\n";return f.replace(/\n$/,"")},rw=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],nw=["scalar","sequence","mapping"],Ga=function iw(e,t){if(t=t||{},Object.keys(t).forEach(function(r){if(-1===rw.indexOf(r))throw new vs('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(r){return r},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=function ow(e){var t={};return null!==e&&Object.keys(e).forEach(function(r){e[r].forEach(function(o){t[String(o)]=r})}),t}(t.styleAliases||null),-1===nw.indexOf(this.kind))throw new vs('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')};function i0(e,t){var r=[];return e[t].forEach(function(o){var i=r.length;r.forEach(function(s,u){s.tag===o.tag&&s.kind===o.kind&&s.multi===o.multi&&(i=u)}),r[i]=o}),r}function Jm(e){return this.extend(e)}Jm.prototype.extend=function(t){var r=[],o=[];if(t instanceof Ga)o.push(t);else if(Array.isArray(t))o=o.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new vs("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(r=r.concat(t.implicit)),t.explicit&&(o=o.concat(t.explicit))}r.forEach(function(s){if(!(s instanceof Ga))throw new vs("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&"scalar"!==s.loadKind)throw new vs("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new vs("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),o.forEach(function(s){if(!(s instanceof Ga))throw new vs("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var i=Object.create(Jm.prototype);return i.implicit=(this.implicit||[]).concat(r),i.explicit=(this.explicit||[]).concat(o),i.compiledImplicit=i0(i,"implicit"),i.compiledExplicit=i0(i,"explicit"),i.compiledTypeMap=function aw(){var t,r,e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Ew=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),Sw=/^[-+]?[0-9]+e/,h0=new Ga("tag:yaml.org,2002:float",{kind:"scalar",resolve:function bw(e){return!(null===e||!Ew.test(e)||"_"===e[e.length-1])},construct:function xw(e){var t,r;return r="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:r*parseFloat(t,10)},predicate:function ww(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||Aa.isNegativeZero(e))},represent:function _w(e,t){var r;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Aa.isNegativeZero(e))return"-0.0";return r=e.toString(10),Sw.test(r)?r.replace("e",".e"):r},defaultStyle:"lowercase"}),m0=c0.extend({implicit:[f0,d0,p0,h0]}),g0=m0,v0=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),y0=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"),E0=new Ga("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function Cw(e){return null!==e&&(null!==v0.exec(e)||null!==y0.exec(e))},construct:function Aw(e){var t,r,o,i,s,u,f,P,m=0,S=null;if(null===(t=v0.exec(e))&&(t=y0.exec(e)),null===t)throw new Error("Date resolve error");if(r=+t[1],o=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(r,o,i));if(s=+t[4],u=+t[5],f=+t[6],t[7]){for(m=t[7].slice(0,3);m.length<3;)m+="0";m=+m}return t[9]&&(S=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(S=-S)),P=new Date(Date.UTC(r,o,i,s,u,f,m)),S&&P.setTime(P.getTime()-S),P},instanceOf:Date,represent:function Ow(e){return e.toISOString()}}),b0=new Ga("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function Tw(e){return"<<"===e||null===e}}),Xm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r",x0=new Ga("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function Iw(e){if(null===e)return!1;var t,r,o=0,i=e.length,s=Xm;for(r=0;r64)){if(t<0)return!1;o+=6}return o%8==0},construct:function Rw(e){var t,r,o=e.replace(/[\r\n=]/g,""),i=o.length,s=Xm,u=0,f=[];for(t=0;t>16&255),f.push(u>>8&255),f.push(255&u)),u=u<<6|s.indexOf(o.charAt(t));return 0==(r=i%4*6)?(f.push(u>>16&255),f.push(u>>8&255),f.push(255&u)):18===r?(f.push(u>>10&255),f.push(u>>2&255)):12===r&&f.push(u>>4&255),new Uint8Array(f)},predicate:function Mw(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)},represent:function Pw(e){var o,i,t="",r=0,s=e.length,u=Xm;for(o=0;o>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[63&r]),r=(r<<8)+e[o];return 0==(i=s%3)?(t+=u[r>>18&63],t+=u[r>>12&63],t+=u[r>>6&63],t+=u[63&r]):2===i?(t+=u[r>>10&63],t+=u[r>>4&63],t+=u[r<<2&63],t+=u[64]):1===i&&(t+=u[r>>2&63],t+=u[r<<4&63],t+=u[64],t+=u[64]),t}}),kw=Object.prototype.hasOwnProperty,Nw=Object.prototype.toString,S0=new Ga("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function jw(e){if(null===e)return!0;var r,o,i,s,u,t=[],f=e;for(r=0,o=f.length;r>10),56320+(e-65536&1023))}for(var M0=new Array(256),k0=new Array(256),Xf=0;Xf<256;Xf++)M0[Xf]=P0(Xf)?1:0,k0[Xf]=P0(Xf);function Zw(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||Zm,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function N0(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return r.snippet=tw(r),new vs(t,r)}function jn(e,t){throw N0(e,t)}function _h(e,t){e.onWarning&&e.onWarning.call(null,N0(e,t))}var j0={YAML:function(t,r,o){var i,s,u;null!==t.version&&jn(t,"duplication of %YAML directive"),1!==o.length&&jn(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(o[0]))&&jn(t,"ill-formed argument of the YAML directive"),s=parseInt(i[1],10),u=parseInt(i[2],10),1!==s&&jn(t,"unacceptable YAML version of the document"),t.version=o[0],t.checkLineBreaks=u<2,1!==u&&2!==u&&_h(t,"unsupported YAML version of the document")},TAG:function(t,r,o){var i,s;2!==o.length&&jn(t,"TAG directive accepts exactly two arguments"),s=o[1],T0.test(i=o[0])||jn(t,"ill-formed tag handle (first argument) of the TAG directive"),lc.call(t.tagMap,i)&&jn(t,'there is a previously declared suffix for "'+i+'" tag handle'),I0.test(s)||jn(t,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{jn(t,"tag prefix is malformed: "+s)}t.tagMap[i]=s}};function uc(e,t,r,o){var i,s,u,f;if(t1&&(e.result+=Aa.repeat("\n",t-1))}function F0(e,t){var r,m,o=e.tag,i=e.anchor,s=[],f=!1;if(-1!==e.firstTabInLine)return!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=s),m=e.input.charCodeAt(e.position);0!==m&&(-1!==e.firstTabInLine&&(e.position=e.firstTabInLine,jn(e,"tab characters must not be used in indentation")),45===m&&Ns(e.input.charCodeAt(e.position+1)));)if(f=!0,e.position++,Ea(e,!0,-1)&&e.lineIndent<=t)s.push(null),m=e.input.charCodeAt(e.position);else if(r=e.line,Qf(e,t,A0,!1,!0),s.push(e.result),Ea(e,!0,-1),m=e.input.charCodeAt(e.position),(e.line===r||e.lineIndent>t)&&0!==m)jn(e,"bad indentation of a sequence entry");else if(e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt?m=1:e.lineIndent===t?m=0:e.lineIndentt)&&(D&&(u=e.line,f=e.lineStart,m=e.position),Qf(e,t,Sh,!0,i)&&(D?M=e.result:d=e.result),D||(Zf(e,I,P,O,M,d,u,f,m),O=M=d=null),Ea(e,!0,-1),G=e.input.charCodeAt(e.position)),(e.line===s||e.lineIndent>t)&&0!==G)jn(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===T?jn(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?jn(e,"repeat of an indentation width identifier"):(f=t+T-1,u=!0)}if(Wc(I)){do{I=e.input.charCodeAt(++e.position)}while(Wc(I));if(35===I)do{I=e.input.charCodeAt(++e.position)}while(!ru(I)&&0!==I)}for(;0!==I;){for(qm(e),e.lineIndent=0,I=e.input.charCodeAt(e.position);(!u||e.lineIndentf&&(f=e.lineIndent),ru(I))m++;else{if(e.lineIndent0){for(i=u,s=0;i>0;i--)(u=Kw(f=e.input.charCodeAt(++e.position)))>=0?s=(s<<4)+u:jn(e,"expected hexadecimal character");e.result+=Xw(s),e.position++}else jn(e,"unknown escape sequence");r=o=e.position}else ru(f)?(uc(e,r,o,!0),eg(e,Ea(e,!1,t)),r=o=e.position):e.position===e.lineStart&&wh(e)?jn(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}jn(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?T=!0:function aC(e){var t,r,o;if(42!==(o=e.input.charCodeAt(e.position)))return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!Ns(o)&&!Jf(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&jn(e,"name of an alias node must contain at least one character"),r=e.input.slice(t,e.position),lc.call(e.anchorMap,r)||jn(e,'unidentified alias "'+r+'"'),e.result=e.anchorMap[r],Ea(e,!0,-1),!0}(e)?(T=!0,(null!==e.tag||null!==e.anchor)&&jn(e,"alias node should not have any properties")):function Qw(e,t,r){var i,s,u,f,m,S,T,O,I=e.kind,P=e.result;if(Ns(O=e.input.charCodeAt(e.position))||Jf(O)||35===O||38===O||42===O||33===O||124===O||62===O||39===O||34===O||37===O||64===O||96===O||(63===O||45===O)&&(Ns(i=e.input.charCodeAt(e.position+1))||r&&Jf(i)))return!1;for(e.kind="scalar",e.result="",s=u=e.position,f=!1;0!==O;){if(58===O){if(Ns(i=e.input.charCodeAt(e.position+1))||r&&Jf(i))break}else if(35===O){if(Ns(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&wh(e)||r&&Jf(O))break;if(ru(O)){if(m=e.line,S=e.lineStart,T=e.lineIndent,Ea(e,!1,-1),e.lineIndent>=t){f=!0,O=e.input.charCodeAt(e.position);continue}e.position=u,e.line=m,e.lineStart=S,e.lineIndent=T;break}}f&&(uc(e,s,u,!1),eg(e,e.line-m),s=u=e.position,f=!1),Wc(O)||(u=e.position+1),O=e.input.charCodeAt(++e.position)}return uc(e,s,u,!1),!!e.result||(e.kind=I,e.result=P,!1)}(e,d,xh===r)&&(T=!0,null===e.tag&&(e.tag="?")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===m&&(T=f&&F0(e,D))),null===e.tag)null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);else if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&jn(e,'unacceptable node kind for ! tag; it should be "scalar", not "'+e.kind+'"'),I=0,P=e.implicitTypes.length;I"),null!==e.result&&M.kind!==e.kind&&jn(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+M.kind+'", not "'+e.kind+'"'),M.resolve(e.result,e.tag)?(e.result=M.construct(e.result,e.tag),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):jn(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||T}function sC(e){var r,o,i,u,t=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(u=e.input.charCodeAt(e.position))&&(Ea(e,!0,-1),u=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==u));){for(s=!0,u=e.input.charCodeAt(++e.position),r=e.position;0!==u&&!Ns(u);)u=e.input.charCodeAt(++e.position);for(i=[],(o=e.input.slice(r,e.position)).length<1&&jn(e,"directive name must not be less than one character in length");0!==u;){for(;Wc(u);)u=e.input.charCodeAt(++e.position);if(35===u){do{u=e.input.charCodeAt(++e.position)}while(0!==u&&!ru(u));break}if(ru(u))break;for(r=e.position;0!==u&&!Ns(u);)u=e.input.charCodeAt(++e.position);i.push(e.input.slice(r,e.position))}0!==u&&qm(e),lc.call(j0,o)?j0[o](e,o,i):_h(e,'unknown document directive "'+o+'"')}Ea(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,Ea(e,!0,-1)):s&&jn(e,"directives end mark is expected"),Qf(e,e.lineIndent-1,Sh,!1,!0),Ea(e,!0,-1),e.checkLineBreaks&&Ww.test(e.input.slice(t,e.position))&&_h(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&wh(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,Ea(e,!0,-1)):e.position"u"&&(r=t,t=null);var o=L0(e,r);if("function"!=typeof t)return o;for(var i=0,s=o.length;i=55296&&r<=56319&&t+1=56320&&o<=57343?1024*(r-55296)+o-56320+65536:r}function X0(e){return/^\n* /.test(e)}var Z0=1,og=2,Q0=3,q0=4,qf=5;function LC(e,t,r,o,i){e.dump=function(){if(0===t.length)return e.quotingType===up?'""':"''";if(!e.noCompatMode&&(-1!==TC.indexOf(t)||IC.test(t)))return e.quotingType===up?'"'+t+'"':"'"+t+"'";var s=e.indent*Math.max(1,r),u=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-s);switch(function FC(e,t,r,o,i,s,u,f){var m,S=0,T=null,I=!1,P=!1,O=-1!==o,M=-1,d=function jC(e){return cp(e)&&e!==tg&&!Ah(e)&&e!==xC&&e!==wC&&e!==Ch&&e!==z0&&e!==H0&&e!==V0&&e!==W0&&e!==G0&&e!==rg&&e!==yC&&e!==bC&&e!==mC&&e!==OC&&e!==SC&&e!==_C&&e!==EC&&e!==gC&&e!==vC&&e!==CC&&e!==AC}(fp(e,0))&&function DC(e){return!Ah(e)&&e!==Ch}(fp(e,e.length-1));if(t||u)for(m=0;m=65536?m+=2:m++){if(!cp(S=fp(e,m)))return qf;d=d&&J0(S,T,f),T=S}else{for(m=0;m=65536?m+=2:m++){if((S=fp(e,m))===lp)I=!0,O&&(P=P||m-M-1>o&&" "!==e[M+1],M=m);else if(!cp(S))return qf;d=d&&J0(S,T,f),T=S}P=P||O&&m-M-1>o&&" "!==e[M+1]}return I||P?r>9&&X0(e)?qf:u?s===up?qf:og:P?q0:Q0:!d||u||i(e)?s===up?qf:og:Z0}(t,o||e.flowLevel>-1&&r>=e.flowLevel,e.indent,u,function m(S){return function NC(e,t){var r,o;for(r=0,o=e.implicitTypes.length;r"+ey(t,e.indent)+ty(K0(function BC(e,t){for(var s,u,r=/(\n+)([^\n]*)/g,o=(S=void 0,S=e.indexOf("\n"),r.lastIndex=S=-1!==S?S:e.length,ry(e.slice(0,S),t)),i="\n"===e[0]||" "===e[0];u=r.exec(e);){var m=u[2];s=" "===m[0],o+=u[1]+(i||s||""===m?"":"\n")+ry(m,t),i=s}var S;return o}(t,u),s));case qf:return'"'+function UC(e){for(var o,t="",r=0,i=0;i=65536?i+=2:i++)r=fp(e,i),!(o=es[r])&&cp(r)?(t+=e[i],r>=65536&&(t+=e[i+1])):t+=o||PC(r);return t}(t)+'"';default:throw new vs("impossible error: invalid scalar style")}}()}function ey(e,t){var r=X0(e)?String(t):"",o="\n"===e[e.length-1];return r+(!o||"\n"!==e[e.length-2]&&"\n"!==e?o?"":"-":"+")+"\n"}function ty(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function ry(e,t){if(""===e||" "===e[0])return e;for(var o,s,r=/ [^ ]/g,i=0,u=0,f=0,m="";o=r.exec(e);)(f=o.index)-i>t&&(m+="\n"+e.slice(i,s=u>i?u:f),i=s+1),u=f;return m+="\n",(m+=e.length-i>t&&u>i?e.slice(i,u)+"\n"+e.slice(u+1):e.slice(i)).slice(1)}function oy(e,t,r){var o,i,s,u,f,m;for(s=0,u=(i=r?e.explicitTypes:e.implicitTypes).length;s tag resolver accepts not "'+m+'" style');o=f.represent[m](t,m)}e.dump=o}return!0}return!1}function wu(e,t,r,o,i,s,u){e.tag=null,e.dump=r,oy(e,r,!1)||oy(e,r,!0);var S,f=U0.call(e.dump),m=o;o&&(o=e.flowLevel<0||e.flowLevel>t);var I,P,T="[object Object]"===f||"[object Array]"===f;if(T&&(P=-1!==(I=e.duplicates.indexOf(r))),(null!==e.tag&&"?"!==e.tag||P||2!==e.indent&&t>0)&&(i=!1),P&&e.usedDuplicates[I])e.dump="*ref_"+I;else{if(T&&P&&!e.usedDuplicates[I]&&(e.usedDuplicates[I]=!0),"[object Object]"===f)o&&0!==Object.keys(e.dump).length?(function HC(e,t,r,o){var f,m,S,T,I,P,i="",s=e.tag,u=Object.keys(r);if(!0===e.sortKeys)u.sort();else if("function"==typeof e.sortKeys)u.sort(e.sortKeys);else if(e.sortKeys)throw new vs("sortKeys must be a boolean or a function");for(f=0,m=u.length;f1024)&&(e.dump&&lp===e.dump.charCodeAt(0)?P+="?":P+="? "),P+=e.dump,I&&(P+=ng(e,t)),wu(e,t+1,T,!0,I)&&(e.dump&&lp===e.dump.charCodeAt(0)?P+=":":P+=": ",i+=P+=e.dump));e.tag=s,e.dump=i||"{}"}(e,t,e.dump,i),P&&(e.dump="&ref_"+I+e.dump)):(function zC(e,t,r){var u,f,m,S,T,o="",i=e.tag,s=Object.keys(r);for(u=0,f=s.length;u1024&&(T+="? "),T+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),wu(e,t,S,!1,!1)&&(o+=T+=e.dump));e.tag=i,e.dump="{"+o+"}"}(e,t,e.dump),P&&(e.dump="&ref_"+I+" "+e.dump));else if("[object Array]"===f)o&&0!==e.dump.length?(function ny(e,t,r,o){var u,f,m,i="",s=e.tag;for(u=0,f=r.length;u"u"&&wu(e,t+1,null,!0,!0,!1,!0))&&((!o||""!==i)&&(i+=ng(e,t)),e.dump&&lp===e.dump.charCodeAt(0)?i+="-":i+="- ",i+=e.dump);e.tag=s,e.dump=i||"[]"}(e,e.noArrayIndent&&!u&&t>0?t-1:t,e.dump,i),P&&(e.dump="&ref_"+I+e.dump)):(function $C(e,t,r){var s,u,f,o="",i=e.tag;for(s=0,u=r.length;s"u"&&wu(e,t,null,!1,!1))&&(""!==o&&(o+=","+(e.condenseFlow?"":" ")),o+=e.dump);e.tag=i,e.dump="["+o+"]"}(e,t,e.dump),P&&(e.dump="&ref_"+I+" "+e.dump));else{if("[object String]"!==f){if("[object Undefined]"===f)return!1;if(e.skipInvalid)return!1;throw new vs("unacceptable kind of an object to dump "+f)}"?"!==e.tag&&LC(e,e.dump,t,s,m)}null!==e.tag&&"?"!==e.tag&&(S=encodeURI("!"===e.tag[0]?e.tag.slice(1):e.tag).replace(/!/g,"%21"),S="!"===e.tag[0]?"!"+S:"tag:yaml.org,2002:"===S.slice(0,18)?"!!"+S.slice(18):"!<"+S+">",e.dump=S+" "+e.dump)}return!0}function VC(e,t){var i,s,r=[],o=[];for(ig(e,r,o),i=0,s=o.length;i"u"&&(r=t,t=void 0),typeof r<"u"){if("function"!=typeof r)throw new Error(Ka(1));return r(cy)(e,t)}if("function"!=typeof e)throw new Error(Ka(2));var i=e,s=t,u=[],f=u,m=!1;function S(){f===u&&(f=u.slice())}function T(){if(m)throw new Error(Ka(3));return s}function I(d){if("function"!=typeof d)throw new Error(Ka(4));if(m)throw new Error(Ka(5));var D=!0;return S(),f.push(d),function(){if(D){if(m)throw new Error(Ka(6));D=!1,S();var G=f.indexOf(d);f.splice(G,1),u=null}}}function P(d){if(!function uy(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(d))throw new Error(Ka(7));if(typeof d.type>"u")throw new Error(Ka(8));if(m)throw new Error(Ka(9));try{m=!0,s=i(s,d)}finally{m=!1}for(var D=u=f,L=0;L?@[\]^_`{|}~-])/g;function td(e){return e.indexOf("\\")<0?e:e.replace(RA,"$1")}function ug(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||65535==(65535&e)||65534==(65535&e)||e>=0&&e<=8||11===e||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function Th(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e))):String.fromCharCode(e)}var PA=/&([a-z#][a-z0-9]{1,31});/gi,MA=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))/i;function kA(e,t){var r=0,o=py(t);return t!==o?o:35===t.charCodeAt(0)&&MA.test(t)&&ug(r="x"===t[1].toLowerCase()?parseInt(t.slice(2),16):parseInt(t.slice(1),10))?Th(r):e}function cc(e){return e.indexOf("&")<0?e:e.replace(PA,kA)}var NA=/[&<>"]/,jA=/[&<>"]/g,DA={"&":"&","<":"<",">":">",'"':"""};function FA(e){return DA[e]}function ys(e){return NA.test(e)?e.replace(jA,FA):e}var vn={};function my(e,t){return++t>=e.length-2?t:"paragraph_open"===e[t].type&&e[t].tight&&"inline"===e[t+1].type&&0===e[t+1].content.length&&"paragraph_close"===e[t+2].type&&e[t+2].tight?my(e,t+2):t}vn.blockquote_open=function(){return"
\n"},vn.blockquote_close=function(e,t){return"
"+Gc(e,t)},vn.code=function(e,t){return e[t].block?"
"+ys(e[t].content)+"
"+Gc(e,t):""+ys(e[t].content)+""},vn.fence=function(e,t,r,o,i){var S,T,s=e[t],u="",f=r.langPrefix;if(s.params){if(T=(S=s.params.split(/\s+/g)).join(" "),function hy(e,t){return!!e&&IA.call(e,t)}(i.rules.fence_custom,S[0]))return i.rules.fence_custom[S[0]](e,t,r,o,i);u=' class="'+f+ys(cc(td(T)))+'"'}return"
"+(r.highlight&&r.highlight.apply(r.highlight,[s.content].concat(S))||ys(s.content))+"
"+Gc(e,t)},vn.fence_custom={},vn.heading_open=function(e,t){return""},vn.heading_close=function(e,t){return"\n"},vn.hr=function(e,t,r){return(r.xhtmlOut?"
":"
")+Gc(e,t)},vn.bullet_list_open=function(){return"
    \n"},vn.bullet_list_close=function(e,t){return"
"+Gc(e,t)},vn.list_item_open=function(){return"
  • "},vn.list_item_close=function(){return"
  • \n"},vn.ordered_list_open=function(e,t){var r=e[t];return"1?' start="'+r.order+'"':"")+">\n"},vn.ordered_list_close=function(e,t){return""+Gc(e,t)},vn.paragraph_open=function(e,t){return e[t].tight?"":"

    "},vn.paragraph_close=function(e,t){return(e[t].tight?"":"

    ")+(e[t].tight&&t&&"inline"===e[t-1].type&&!e[t-1].content?"":Gc(e,t))},vn.link_open=function(e,t,r){var o=e[t].title?' title="'+ys(cc(e[t].title))+'"':"",i=r.linkTarget?' target="'+r.linkTarget+'"':"";return'"},vn.link_close=function(){return""},vn.image=function(e,t,r){var o=' src="'+ys(e[t].src)+'"',i=e[t].title?' title="'+ys(cc(e[t].title))+'"':"";return""},vn.table_open=function(){return"\n"},vn.table_close=function(){return"
    \n"},vn.thead_open=function(){return"\n"},vn.thead_close=function(){return"\n"},vn.tbody_open=function(){return"\n"},vn.tbody_close=function(){return"\n"},vn.tr_open=function(){return""},vn.tr_close=function(){return"\n"},vn.th_open=function(e,t){var r=e[t];return""},vn.th_close=function(){return""},vn.td_open=function(e,t){var r=e[t];return""},vn.td_close=function(){return""},vn.strong_open=function(){return""},vn.strong_close=function(){return""},vn.em_open=function(){return""},vn.em_close=function(){return""},vn.del_open=function(){return""},vn.del_close=function(){return""},vn.ins_open=function(){return""},vn.ins_close=function(){return""},vn.mark_open=function(){return""},vn.mark_close=function(){return""},vn.sub=function(e,t){return""+ys(e[t].content)+""},vn.sup=function(e,t){return""+ys(e[t].content)+""},vn.hardbreak=function(e,t,r){return r.xhtmlOut?"
    \n":"
    \n"},vn.softbreak=function(e,t,r){return r.breaks?r.xhtmlOut?"
    \n":"
    \n":"\n"},vn.text=function(e,t){return ys(e[t].content)},vn.htmlblock=function(e,t){return e[t].content},vn.htmltag=function(e,t){return e[t].content},vn.abbr_open=function(e,t){return''},vn.abbr_close=function(){return""},vn.footnote_ref=function(e,t){var r=Number(e[t].id+1).toString(),o="fnref"+r;return e[t].subId>0&&(o+=":"+e[t].subId),'['+r+"]"},vn.footnote_block_open=function(e,t,r){return(r.xhtmlOut?'
    \n':'
    \n')+'
    \n
      \n'},vn.footnote_block_close=function(){return"
    \n
    \n"},vn.footnote_open=function(e,t){return'
  • '},vn.footnote_close=function(){return"
  • \n"},vn.footnote_anchor=function(e,t){var o="fnref"+Number(e[t].id+1).toString();return e[t].subId>0&&(o+=":"+e[t].subId),' \u21a9'},vn.dl_open=function(){return"
    \n"},vn.dt_open=function(){return"
    "},vn.dd_open=function(){return"
    "},vn.dl_close=function(){return"
    \n"},vn.dt_close=function(){return"\n"},vn.dd_close=function(){return"\n"};var Gc=vn.getBreak=function(t,r){return(r=my(t,r))"u"&&(o.abbreviations[":"+m]=S),u)}function fg(e){var t=cc(e);try{t=decodeURI(t)}catch{}return encodeURI(t)}function gy(e,t){var r,o,i,s=t,u=e.posMax;if(60===e.src.charCodeAt(t)){for(t++;t1||41===r&&--o<0)break;t++}return!(s===t||(i=td(e.src.slice(s,t)),!e.parser.validateLink(i))||(e.linkContent=i,e.pos=t,0))}function vy(e,t){var r,o=t,i=e.posMax,s=e.src.charCodeAt(t);if(34!==s&&39!==s&&40!==s)return!1;for(t++,40===s&&(s=41);t"u"&&(o.references[P]={title:I,href:T}),u)}cg.prototype.renderInline=function(e,t,r){for(var o=this.rules,i=e.length,s=0,u="";i--;)u+=o[e[s].type](e,s++,t,r,this);return u},cg.prototype.render=function(e,t,r){for(var o=this.rules,i=e.length,s=-1,u="";++s=e.length||QA.test(e[t]))}function rd(e,t,r){return e.substr(0,t)+r+e.substr(t+1)}var pg=[["block",function LA(e){e.inlineMode?e.tokens.push({type:"inline",content:e.src.replace(/\n/g," ").trim(),level:0,lines:[0,1],children:[]}):e.block.parse(e.src,e.options,e.env,e.tokens)}],["abbr",function UA(e){var r,o,i,s,t=e.tokens;if(!e.inlineMode)for(r=1,o=t.length-1;r0?u[t].count:1,o=0;o=0;t--)if("text"===(s=i[t]).type){for(m=0,u=s.content,T.lastIndex=0,S=s.level,f=[];I=T.exec(u);)T.lastIndex>m&&f.push({type:"text",content:u.slice(m,I.index+I[1].length),level:S}),f.push({type:"abbr_open",title:e.env.abbreviations[":"+I[2]],level:S++}),f.push({type:"text",content:I[2],level:S}),f.push({type:"abbr_close",level:--S}),m=T.lastIndex-I[3].length;f.length&&(m=0;s--)if("inline"===e.tokens[s].type)for(t=(i=e.tokens[s].children).length-1;t>=0;t--)"text"===(r=i[t]).type&&(o=JA(o=r.content),GA.test(o)&&(o=o.replace(/\+-/g,"\xb1").replace(/\.{2,}/g,"\u2026").replace(/([?!])\u2026/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---([^-]|$)/gm,"$1\u2014$2").replace(/(^|\s)--(\s|$)/gm,"$1\u2013$2").replace(/(^|[^-\s])--([^-\s]|$)/gm,"$1\u2013$2")),r.content=o)}],["smartquotes",function qA(e){var t,r,o,i,s,u,f,m,S,T,I,P,O,M,d,D,L;if(e.options.typographer)for(L=[],d=e.tokens.length-1;d>=0;d--)if("inline"===e.tokens[d].type)for(D=e.tokens[d].children,L.length=0,t=0;t=0&&!(L[O].level<=f);O--);L.length=O+1,s=0,u=(o=r.content).length;e:for(;s=0&&(T=L[O],!(L[O].level=(i=e.eMarks[t])||42!==(r=e.src.charCodeAt(o++))&&45!==r&&43!==r||o=i||(r=e.src.charCodeAt(o++))<48||r>57)return-1;for(;;){if(o>=i)return-1;if(!((r=e.src.charCodeAt(o++))>=48&&r<=57)){if(41===r||46===r)break;return-1}}return o=this.eMarks[t]},Yc.prototype.skipEmptyLines=function(t){for(var r=this.lineMax;to;)if(r!==this.src.charCodeAt(--t))return t+1;return t},Yc.prototype.getLines=function(t,r,o,i){var s,u,m,S,T=t;if(t>=r)return"";if(T+1===r)return u=this.bMarks[T]+Math.min(this.tShift[T],o),this.src.slice(u,i?this.eMarks[T]+1:this.eMarks[T]);for(m=new Array(r-t),s=0;To&&(S=o),S<0&&(S=0),m[s]=this.src.slice(u=this.bMarks[T]+S,T+1]/,c3=/^<\/([a-zA-Z]{1,15})[\s>]/;function hg(e,t){var r=e.bMarks[t]+e.blkIndent;return e.src.substr(r,e.eMarks[t]-r)}function Ih(e,t){var r,o,i=e.bMarks[t]+e.tShift[t],s=e.eMarks[t];return i>=s||126!==(o=e.src.charCodeAt(i++))&&58!==o||i===(r=e.skipSpaces(i))||r>=s?-1:r}var Rh=[["code",function e3(e,t,r){var o,i;if(e.tShift[t]-e.blkIndent<4)return!1;for(i=o=t+1;o=4))break;i=++o}return e.line=o,e.tokens.push({type:"code",content:e.getLines(t,i,4+e.blkIndent,!0),block:!0,lines:[t,e.line],level:e.level}),!0}],["fences",function t3(e,t,r,o){var i,s,u,f,m,S=!1,T=e.bMarks[t]+e.tShift[t],I=e.eMarks[t];if(T+3>I||126!==(i=e.src.charCodeAt(T))&&96!==i||(m=T,(s=(T=e.skipChars(T,i))-m)<3)||(u=e.src.slice(T,I).trim()).indexOf("`")>=0)return!1;if(o)return!0;for(f=t;!(++f>=r||(T=m=e.bMarks[f]+e.tShift[f],I=e.eMarks[f],T=4||(T=e.skipChars(T,i),T-mD||62!==e.src.charCodeAt(d++)||e.level>=e.options.maxNesting)return!1;if(o)return!0;for(32===e.src.charCodeAt(d)&&d++,m=e.blkIndent,e.blkIndent=0,f=[e.bMarks[t]],e.bMarks[t]=d,s=(d=d=D,u=[e.tShift[t]],e.tShift[t]=d-e.bMarks[t],I=e.parser.ruler.getRules("blockquote"),i=t+1;i=(D=e.eMarks[i]));i++)if(62!==e.src.charCodeAt(d++)){if(s)break;for(M=!1,P=0,O=I.length;P=D,u.push(e.tShift[i]),e.tShift[i]=d-e.bMarks[i];for(S=e.parentType,e.parentType="blockquote",e.tokens.push({type:"blockquote_open",lines:T=[t,0],level:e.level++}),e.parser.tokenize(e,t,i),e.tokens.push({type:"blockquote_close",level:--e.level}),e.parentType=S,T[1]=e.line,P=0;Pm||42!==(i=e.src.charCodeAt(f++))&&45!==i&&95!==i)return!1;for(s=1;f=0)D=!0;else{if(!((I=wy(e,t))>=0))return!1;D=!1}if(e.level>=e.options.maxNesting)return!1;if(d=e.src.charCodeAt(I-1),o)return!0;for(G=e.tokens.length,D?(T=e.bMarks[t]+e.tShift[t],M=Number(e.src.substr(T,I-T-1)),e.tokens.push({type:"ordered_list_open",order:M,lines:we=[t,0],level:e.level++})):e.tokens.push({type:"bullet_list_open",lines:we=[t,0],level:e.level++}),i=t,Z=!1,Se=e.parser.ruler.getRules("list");i=e.eMarks[i]?1:L-I)>4&&(O=1),O<1&&(O=1),s=I-e.bMarks[i]+O,e.tokens.push({type:"list_item_open",lines:xe=[t,0],level:e.level++}),f=e.blkIndent,m=e.tight,u=e.tShift[t],S=e.parentType,e.tShift[t]=L-e.bMarks[t],e.blkIndent=s,e.tight=!0,e.parentType="list",e.parser.tokenize(e,t,r,!0),(!e.tight||Z)&&(Ae=!1),Z=e.line-t>1&&e.isEmpty(e.line-1),e.blkIndent=f,e.tShift[t]=u,e.tight=m,e.parentType=S,e.tokens.push({type:"list_item_close",level:--e.level}),i=t=e.line,xe[1]=i,L=e.bMarks[t],!(i>=r||e.isEmpty(i)||e.tShift[i]T||91!==e.src.charCodeAt(S)||94!==e.src.charCodeAt(S+1)||e.level>=e.options.maxNesting)return!1;for(f=S+2;f=T||58!==e.src.charCodeAt(++f)||(o||(f++,e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.refs||(e.env.footnotes.refs={}),m=e.src.slice(S+2,f-2),e.env.footnotes.refs[":"+m]=-1,e.tokens.push({type:"footnote_reference_open",label:m,level:e.level++}),i=e.bMarks[t],s=e.tShift[t],u=e.parentType,e.tShift[t]=e.skipSpaces(f)-f,e.bMarks[t]=f,e.blkIndent+=4,e.parentType="footnote",e.tShift[t]=m||35!==(i=e.src.charCodeAt(f))||f>=m)return!1;for(s=1,i=e.src.charCodeAt(++f);35===i&&f6||ff&&32===e.src.charCodeAt(u-1)&&(m=u),e.line=t+1,e.tokens.push({type:"heading_open",hLevel:s,lines:[t,e.line],level:e.level}),f=r||e.tShift[u]3||(i=e.bMarks[u]+e.tShift[u],s=e.eMarks[u],i>=s)||(o=e.src.charCodeAt(i),45!==o&&61!==o)||(i=e.skipChars(i,o),i=e.skipSpaces(i),i3||f+2>=m||60!==e.src.charCodeAt(f))return!1;if(33===(i=e.src.charCodeAt(f+1))||63===i){if(o)return!0}else{if(47!==i&&!function f3(e){var t=32|e;return t>=97&&t<=122}(i))return!1;if(47===i){if(!(s=e.src.slice(f,m).match(c3)))return!1}else if(!(s=e.src.slice(f,m).match(u3)))return!1;if(!0!==Ay[s[1].toLowerCase()])return!1;if(o)return!0}for(u=t+1;ur||e.tShift[m=t+1]=e.eMarks[m]||124!==(i=e.src.charCodeAt(u))&&45!==i&&58!==i||(s=hg(e,t+1),!/^[-:| ]+$/.test(s))||(S=s.split("|"))<=2)return!1;for(I=[],f=0;f=0;if(e.isEmpty(T=t+1)&&++T>r||e.tShift[T]=e.options.maxNesting)return!1;S=e.tokens.length,e.tokens.push({type:"dl_open",lines:m=[t,0],level:e.level++}),u=t,s=T;e:for(;;){for(L=!0,D=!1,e.tokens.push({type:"dt_open",lines:[u,u],level:e.level++}),e.tokens.push({type:"inline",content:e.getLines(u,u+1,e.blkIndent,!1).trim(),level:e.level+1,lines:[u,u],children:[]}),e.tokens.push({type:"dt_close",level:--e.level});;){if(e.tokens.push({type:"dd_open",lines:f=[T,0],level:e.level++}),d=e.tight,P=e.ddIndent,I=e.blkIndent,M=e.tShift[s],O=e.parentType,e.blkIndent=e.ddIndent=e.tShift[s]+2,e.tShift[s]=i-e.bMarks[s],e.tight=!0,e.parentType="deflist",e.parser.tokenize(e,s,r,!0),(!e.tight||D)&&(L=!1),D=e.line-s>1&&e.isEmpty(e.line-1),e.tShift[s]=M,e.tight=d,e.parentType=O,e.blkIndent=I,e.ddIndent=P,e.tokens.push({type:"dd_close",level:--e.level}),f[1]=T=e.line,T>=r||e.tShift[T]=r||e.isEmpty(u=T)||e.tShift[u]=r||(e.isEmpty(s)&&s++,s>=r)||e.tShift[s]3)){for(i=!1,s=0,u=m.length;s=r||e.tShift[s]=0&&(e=e.replace(v3,function(f,m){var S;return 10===e.charCodeAt(m)?(s=m+1,u=0,f):(S=" ".slice((m-s-u)%4),u=m-s+1,S)})),i=new Yc(e,this,t,r,o),this.tokenize(i,i.line,i.lineMax)};for(var gg=[],Oy=0;Oy<256;Oy++)gg.push(0);function Ty(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122}function Iy(e,t){var o,i,s,r=t,u=!0,f=!0,m=e.posMax,S=e.src.charCodeAt(t);for(o=t>0?e.src.charCodeAt(t-1):-1;r=m&&(u=!1),(s=r-t)>=4?u=f=!1:((32===(i=r?@[]^_`{|}~-".split("").forEach(function(e){gg[e.charCodeAt(0)]=1});var I3=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g,P3=/\\([ \\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g,D3=["coap","doi","javascript","aaa","aaas","about","acap","cap","cid","crid","data","dav","dict","dns","file","ftp","geo","go","gopher","h323","http","https","iax","icap","im","imap","info","ipp","iris","iris.beep","iris.xpc","iris.xpcs","iris.lwz","ldap","mailto","mid","msrp","msrps","mtqp","mupdate","news","nfs","ni","nih","nntp","opaquelocktoken","pop","pres","rtsp","service","session","shttp","sieve","sip","sips","sms","snmp","soap.beep","soap.beeps","tag","tel","telnet","tftp","thismessage","tn3270","tip","tv","urn","vemmi","ws","wss","xcon","xcon-userid","xmlrpc.beep","xmlrpc.beeps","xmpp","z39.50r","z39.50s","adiumxtra","afp","afs","aim","apt","attachment","aw","beshare","bitcoin","bolo","callto","chrome","chrome-extension","com-eventbrite-attendee","content","cvs","dlna-playsingle","dlna-playcontainer","dtn","dvb","ed2k","facetime","feed","finger","fish","gg","git","gizmoproject","gtalk","hcp","icon","ipn","irc","irc6","ircs","itms","jar","jms","keyparc","lastfm","ldaps","magnet","maps","market","message","mms","ms-help","msnim","mumble","mvn","notes","oid","palm","paparazzi","platform","proxy","psyc","query","res","resource","rmi","rsync","rtmp","secondlife","sftp","sgn","skype","smb","soldat","spotify","ssh","steam","svn","teamspeak","things","udp","unreal","ut2004","ventrilo","view-source","webcal","wtai","wyciwyg","xfire","xri","ymsgr"],F3=/^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,L3=/^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;function Ph(e,t){return e=e.source,t=t||"",function r(o,i){return o?(e=e.replace(o,i=i.source||i),r):new RegExp(e,t)}}var V3=Ph(/(?:unquoted|single_quoted|double_quoted)/)("unquoted",/[^"'=<>`\x00-\x20]+/)("single_quoted",/'[^']*'/)("double_quoted",/"[^"]*"/)(),W3=Ph(/(?:\s+attr_name(?:\s*=\s*attr_value)?)/)("attr_name",/[a-zA-Z_:][a-zA-Z0-9:._-]*/)("attr_value",V3)(),G3=Ph(/<[A-Za-z][A-Za-z0-9]*attribute*\s*\/?>/)("attribute",W3)(),Q3=Ph(/^(?:open_tag|close_tag|comment|processing|declaration|cdata)/)("open_tag",G3)("close_tag",/<\/[A-Za-z][A-Za-z0-9]*\s*>/)("comment",/|/)("processing",/<[?].*?[?]>/)("declaration",/]*>/)("cdata",//)(),tO=/^&#((?:x[a-f0-9]{1,8}|[0-9]{1,8}));/i,rO=/^&([a-z][a-z0-9]{1,31});/i,vg=[["text",function x3(e,t){for(var r=e.pos;r=0&&32===e.pending.charCodeAt(r))if(r>=1&&32===e.pending.charCodeAt(r-1)){for(var s=r-2;s>=0;s--)if(32!==e.pending.charCodeAt(s)){e.pending=e.pending.substring(0,s+1);break}e.push({type:"hardbreak",level:e.level})}else e.pending=e.pending.slice(0,-1),e.push({type:"softbreak",level:e.level});else e.push({type:"softbreak",level:e.level});for(i++;i=s||126!==e.src.charCodeAt(u+1)||e.level>=e.options.maxNesting||(f=u>0?e.src.charCodeAt(u-1):-1,m=e.src.charCodeAt(u+2),126===f)||126===m||32===m||10===m)return!1;for(o=u+2;ou+3)return e.pos+=o-u,t||(e.pending+=e.src.slice(u,o)),!0;for(e.pos=u+2,i=1;e.pos+1=s||43!==e.src.charCodeAt(u+1)||e.level>=e.options.maxNesting||(f=u>0?e.src.charCodeAt(u-1):-1,m=e.src.charCodeAt(u+2),43===f)||43===m||32===m||10===m)return!1;for(o=u+2;o=s||61!==e.src.charCodeAt(u+1)||e.level>=e.options.maxNesting||(f=u>0?e.src.charCodeAt(u-1):-1,m=e.src.charCodeAt(u+2),61===f)||61===m||32===m||10===m)return!1;for(o=u+2;o=e.options.maxNesting)return!1;for(e.pos=T+r,f=[r];e.pos=i||e.level>=e.options.maxNesting)return!1;for(e.pos=s+1;e.pos=i||e.level>=e.options.maxNesting)return!1;for(e.pos=s+1;e.pos=e.options.maxNesting||(r=O+1,(o=dp(e,O))<0))return!1;if((f=o+1)=P)return!1;for(O=f,gy(e,f)?(s=e.linkContent,f=e.pos):s="",O=f;f=P||41!==e.src.charCodeAt(f))return e.pos=I,!1;f++}else{if(e.linkLevel>0)return!1;for(;f=0?i=e.src.slice(O,f++):f=O-1),i||(typeof i>"u"&&(f=o+1),i=e.src.slice(r,o)),!(m=e.env.references[yy(i)]))return e.pos=I,!1;s=m.href,u=m.title}return t||(e.pos=r,e.posMax=o,T?e.push({type:"image",src:s,title:u,alt:e.src.substr(r,o-r),level:e.level}):(e.push({type:"link_open",href:s,title:u,level:e.level++}),e.linkLevel++,e.parser.tokenize(e),e.linkLevel--,e.push({type:"link_close",level:--e.level}))),e.pos=f,e.posMax=P,!0}],["footnote_inline",function N3(e,t){var r,o,i,s,u=e.posMax,f=e.pos;return!(f+2>=u||94!==e.src.charCodeAt(f)||91!==e.src.charCodeAt(f+1)||e.level>=e.options.maxNesting||(r=f+2,o=dp(e,f+1),o<0)||(t||(e.env.footnotes||(e.env.footnotes={}),e.env.footnotes.list||(e.env.footnotes.list=[]),i=e.env.footnotes.list.length,e.pos=r,e.posMax=o,e.push({type:"footnote_ref",id:i,level:e.level}),e.linkLevel++,s=e.tokens.length,e.parser.tokenize(e),e.env.footnotes.list[i]={tokens:e.tokens.splice(s)},e.linkLevel--),e.pos=o+1,e.posMax=u,0))}],["footnote_ref",function j3(e,t){var r,o,i,s,u=e.posMax,f=e.pos;if(f+3>u||!e.env.footnotes||!e.env.footnotes.refs||91!==e.src.charCodeAt(f)||94!==e.src.charCodeAt(f+1)||e.level>=e.options.maxNesting)return!1;for(o=f+2;o=u||(o++,r=e.src.slice(f+2,o-1),typeof e.env.footnotes.refs[":"+r]>"u")||(t||(e.env.footnotes.list||(e.env.footnotes.list=[]),e.env.footnotes.refs[":"+r]<0?(e.env.footnotes.list[i=e.env.footnotes.list.length]={label:r,count:0},e.env.footnotes.refs[":"+r]=i):i=e.env.footnotes.refs[":"+r],s=e.env.footnotes.list[i].count,e.env.footnotes.list[i].count++,e.push({type:"footnote_ref",id:i,subId:s,level:e.level})),e.pos=o,e.posMax=u,0))}],["autolink",function B3(e,t){var r,o,i,s,u,f=e.pos;return!(60!==e.src.charCodeAt(f)||(r=e.src.slice(f),r.indexOf(">")<0)||((o=r.match(L3))?D3.indexOf(o[1].toLowerCase())<0||(s=o[0].slice(1,-1),u=fg(s),!e.parser.validateLink(s))||(t||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:s,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=o[0].length,0):!(i=r.match(F3))||(u=fg("mailto:"+(s=i[0].slice(1,-1))),!e.parser.validateLink(u)||(t||(e.push({type:"link_open",href:u,level:e.level}),e.push({type:"text",content:s,level:e.level+1}),e.push({type:"link_close",level:e.level})),e.pos+=i[0].length,0))))}],["htmltag",function eO(e,t){var r,o,i,s=e.pos;return!(!e.options.html||(i=e.posMax,60!==e.src.charCodeAt(s)||s+2>=i)||(r=e.src.charCodeAt(s+1),33!==r&&63!==r&&47!==r&&!function q3(e){var t=32|e;return t>=97&&t<=122}(r))||(o=e.src.slice(s).match(Q3),!o)||(t||e.push({type:"htmltag",content:e.src.slice(s,s+o[0].length),level:e.level}),e.pos+=o[0].length,0))}],["entity",function nO(e,t){var o,i,s=e.pos,u=e.posMax;if(38!==e.src.charCodeAt(s))return!1;if(s+10)e.pos=s;else{for(i=0;i=o)break}else e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()},Mh.prototype.parse=function(e,t,r,o){var i=new Kc(e,this,t,r,o);this.tokenize(i)};var lO={default:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","replacements","smartquotes","references","abbr2","footnote_tail"]},block:{rules:["blockquote","code","fences","footnote","heading","hr","htmlblock","lheading","list","paragraph","table"]},inline:{rules:["autolink","backticks","del","emphasis","entity","escape","footnote_ref","htmltag","links","newline","text"]}}},full:{options:{html:!1,xhtmlOut:!1,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{},block:{},inline:{}}},commonmark:{options:{html:!0,xhtmlOut:!0,breaks:!1,langPrefix:"language-",linkTarget:"",typographer:!1,quotes:"\u201c\u201d\u2018\u2019",highlight:null,maxNesting:20},components:{core:{rules:["block","inline","references","abbr2"]},block:{rules:["blockquote","code","fences","heading","hr","htmlblock","lheading","list","paragraph"]},inline:{rules:["autolink","backticks","emphasis","entity","escape","htmltag","links","newline","text"]}}}};function Ry(e,t,r){this.src=t,this.env=r,this.options=e.options,this.tokens=[],this.inlineMode=!1,this.inline=e.inline,this.block=e.block,this.renderer=e.renderer,this.typographer=e.typographer}function fc(e,t){"string"!=typeof e&&(t=e,e="default"),t&&null!=t.linkify&&console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"),this.inline=new Mh,this.block=new mg,this.core=new _y,this.renderer=new cg,this.ruler=new Zs,this.options={},this.configure(lO[e]),this.set(t||{})}fc.prototype.set=function(e){lg(this.options,e)},fc.prototype.configure=function(e){var t=this;if(!e)throw new Error("Wrong `remarkable` preset, check name/content");e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(r){e.components[r].rules&&t[r].ruler.enable(e.components[r].rules,!0)})},fc.prototype.use=function(e,t){return e(this,t),this},fc.prototype.parse=function(e,t){var r=new Ry(this,e,t);return this.core.process(r),r.tokens},fc.prototype.render=function(e,t){return this.renderer.render(this.parse(e,t=t||{}),this.options,t)},fc.prototype.parseInline=function(e,t){var r=new Ry(this,e,t);return r.inlineMode=!0,this.core.process(r),r.tokens},fc.prototype.renderInline=function(e,t){return this.renderer.render(this.parseInline(e,t=t||{}),this.options,t)};var kh="NOT_FOUND",fO=function(t,r){return t===r};function pO(e,t){var r="object"==typeof t?t:{equalityCheck:t},o=r.equalityCheck,s=r.maxSize,u=void 0===s?1:s,f=r.resultEqualityCheck,m=function dO(e){return function(r,o){if(null===r||null===o||r.length!==o.length)return!1;for(var i=r.length,s=0;s-1){var S=r[m];return m>0&&(r.splice(m,1),r.unshift(S)),S.value}return kh}return{get:o,put:function i(f,m){o(f)===kh&&(r.unshift({key:f,value:m}),r.length>e&&r.pop())},getEntries:function s(){return r},clear:function u(){r=[]}}}(u,m);function T(){var I=S.get(arguments);if(I===kh){if(I=e.apply(null,arguments),f){var O=S.getEntries().find(function(M){return f(M.value,I)});O&&(I=O.value)}S.put(arguments,I)}return I}return T.clearCache=function(){return S.clear()},T}function mO(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o{r.d(t,{Z:()=>I});var o=r(863),i=r(775),s=r(8818),u=r(2565),f=r(810);const m=(r.d(O={},{default:()=>Ge}),O);var O,S=r(9569),T=r(5053);class I extends m.default{constructor(){super(...arguments),(0,i.default)(this,"getModelName",O=>-1!==(0,s.default)(O).call(O,"#/definitions/")?O.replace(/^.*#\/definitions\//,""):-1!==(0,s.default)(O).call(O,"#/components/schemas/")?O.replace(/^.*#\/components\/schemas\//,""):void 0),(0,i.default)(this,"getRefSchema",O=>{let{specSelectors:M}=this.props;return M.findDefinition(O)})}render(){let{getComponent:O,getConfigs:M,specSelectors:d,schema:D,required:L,name:G,isRef:Z,specPath:we,displayName:xe,includeReadOnly:Ae,includeWriteOnly:Se}=this.props;const qe=O("ObjectModel"),Ue=O("ArrayModel"),ut=O("PrimitiveModel");let Ze="object",wt=D&&D.get("$$ref");if(!G&&wt&&(G=this.getModelName(wt)),!D&&wt&&(D=this.getRefSchema(G)),!D)return f.default.createElement("span",{className:"model model-title"},f.default.createElement("span",{className:"model-title__text"},xe||G),f.default.createElement("img",{src:r(2517),height:"20px",width:"20px"}));const Ot=d.isOAS3()&&D.get("deprecated");switch(Z=void 0!==Z?Z:!!wt,Ze=D&&D.get("type")||Ze,Ze){case"object":return f.default.createElement(qe,(0,o.default)({className:"object"},this.props,{specPath:we,getConfigs:M,schema:D,name:G,deprecated:Ot,isRef:Z,includeReadOnly:Ae,includeWriteOnly:Se}));case"array":return f.default.createElement(Ue,(0,o.default)({className:"array"},this.props,{getConfigs:M,schema:D,name:G,deprecated:Ot,required:L,includeReadOnly:Ae,includeWriteOnly:Se}));default:return f.default.createElement(ut,(0,o.default)({},this.props,{getComponent:O,getConfigs:M,schema:D,name:G,deprecated:Ot,required:L}))}}}(0,i.default)(I,"propTypes",{schema:(0,u.default)(S.default).isRequired,getComponent:T.default.func.isRequired,getConfigs:T.default.func.isRequired,specSelectors:T.default.object.isRequired,name:T.default.string,displayName:T.default.string,isRef:T.default.bool,required:T.default.bool,expandDepth:T.default.number,depth:T.default.number,specPath:S.default.list.isRequired,includeReadOnly:T.default.bool,includeWriteOnly:T.default.bool})},5623:(e,t,r)=>{r.d(t,{Z:()=>S});var o=r(775),i=r(2740),s=r(810),u=r(8900),f=(r(5053),r(6298)),m=r(7504);class S extends s.default.Component{constructor(P,O){super(P,O),(0,o.default)(this,"getDefinitionUrl",()=>{let{specSelectors:D}=this.props;return new u.default(D.url(),m.Z.location).toString()});let{getConfigs:M}=P,{validatorUrl:d}=M();this.state={url:this.getDefinitionUrl(),validatorUrl:void 0===d?"https://validator.swagger.io/validator":d}}UNSAFE_componentWillReceiveProps(P){let{getConfigs:O}=P,{validatorUrl:M}=O();this.setState({url:this.getDefinitionUrl(),validatorUrl:void 0===M?"https://validator.swagger.io/validator":M})}render(){let{getConfigs:P}=this.props,{spec:O}=P(),M=(0,f.Nm)(this.state.validatorUrl);return"object"==typeof O&&(0,i.default)(O).length?null:this.state.url&&(0,f.hW)(this.state.validatorUrl)&&(0,f.hW)(this.state.url)?s.default.createElement("span",{className:"float-right"},s.default.createElement("a",{target:"_blank",rel:"noopener noreferrer",href:`${M}/debug?url=${encodeURIComponent(this.state.url)}`},s.default.createElement(T,{src:`${M}?url=${encodeURIComponent(this.state.url)}`,alt:"Online validator badge"}))):null}}class T extends s.default.Component{constructor(P){super(P),this.state={loaded:!1,error:!1}}componentDidMount(){const P=new Image;P.onload=()=>{this.setState({loaded:!0})},P.onerror=()=>{this.setState({error:!0})},P.src=this.props.src}UNSAFE_componentWillReceiveProps(P){if(P.src!==this.props.src){const O=new Image;O.onload=()=>{this.setState({loaded:!0})},O.onerror=()=>{this.setState({error:!0})},O.src=P.src}}render(){return this.state.error?s.default.createElement("img",{alt:"Error"}):this.state.loaded?s.default.createElement("img",{src:this.props.src,alt:this.props.alt}):null}}},5466:(e,t,r)=>{r.d(t,{Z:()=>S,s:()=>T});var o=r(810),i=(r(5053),r(3952));const s=(r.d(P={},{linkify:()=>Xo}),P),u=(I=>{var P={};return r.d(P,I),P})({default:()=>ta()});var P,f=r(8096);function m(I){let{source:P,className:O="",getConfigs:M}=I;if("string"!=typeof P)return null;const d=new i.Remarkable({html:!0,typographer:!0,breaks:!0,linkTarget:"_blank"}).use(s.linkify);d.core.ruler.disable(["replacements","smartquotes"]);const{useUnsafeMarkdown:D}=M(),L=d.render(P),G=T(L,{useUnsafeMarkdown:D});return P&&L&&G?o.default.createElement("div",{className:(0,f.default)(O,"markdown"),dangerouslySetInnerHTML:{__html:G}}):null}u.default.addHook&&u.default.addHook("beforeSanitizeElements",function(I){return I.href&&I.setAttribute("rel","noopener noreferrer"),I}),m.defaultProps={getConfigs:()=>({useUnsafeMarkdown:!1})};const S=m;function T(I){let{useUnsafeMarkdown:P=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const O=P,M=P?[]:["style","class"];return P&&!T.hasWarnedAboutDeprecation&&(console.warn("useUnsafeMarkdown display configuration parameter is deprecated since >3.26.0 and will be removed in v4.0.0."),T.hasWarnedAboutDeprecation=!0),u.default.sanitize(I,{ADD_ATTR:["target"],FORBID_TAGS:["style","form"],ALLOW_DATA_ATTR:O,FORBID_ATTR:M})}T.hasWarnedAboutDeprecation=!1},5308:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var o,i=r(29),s=r(5487),u=r(6298),f=r(8102);const m=r(5102),S={},T=S;(0,i.default)(o=(0,s.default)(m).call(m)).call(o,function(I){if("./index.js"===I)return;let P=m(I);S[(0,u.Zl)(I)]=P.default?P.default:P}),S.SafeRender=f.default},5812:(e,t,r)=>{r.r(t),r.d(t,{SHOW_AUTH_POPUP:()=>m,AUTHORIZE:()=>S,LOGOUT:()=>T,PRE_AUTHORIZE_OAUTH2:()=>I,AUTHORIZE_OAUTH2:()=>P,VALIDATE:()=>O,CONFIGURE_AUTH:()=>M,RESTORE_AUTHORIZATION:()=>d,showDefinitions:()=>D,authorize:()=>L,authorizeWithPersistOption:()=>G,logout:()=>Z,logoutWithPersistOption:()=>we,preAuthorizeImplicit:()=>xe,authorizeOauth2:()=>Ae,authorizeOauth2WithPersistOption:()=>Se,authorizePassword:()=>qe,authorizeApplication:()=>Ue,authorizeAccessCodeWithFormParams:()=>ut,authorizeAccessCodeWithBasicAuthentication:()=>Ze,authorizeRequest:()=>wt,configureAuth:()=>Ot,restoreAuthorization:()=>Ht,persistAuthorizationIfNeeded:()=>gr,authPopup:()=>lt});var o=r(313),i=r(7512),s=r(8900),u=r(7504),f=r(6298);const m="show_popup",S="authorize",T="logout",I="pre_authorize_oauth2",P="authorize_oauth2",O="validate",M="configure_auth",d="restore_authorization";function D(Xe){return{type:m,payload:Xe}}function L(Xe){return{type:S,payload:Xe}}const G=Xe=>Oe=>{let{authActions:Pe}=Oe;Pe.authorize(Xe),Pe.persistAuthorizationIfNeeded()};function Z(Xe){return{type:T,payload:Xe}}const we=Xe=>Oe=>{let{authActions:Pe}=Oe;Pe.logout(Xe),Pe.persistAuthorizationIfNeeded()},xe=Xe=>Oe=>{let{authActions:Pe,errActions:it}=Oe,{auth:Ke,token:Lt,isValid:sr}=Xe,{schema:yr,name:pt}=Ke,Me=yr.get("flow");delete u.Z.swaggerUIRedirectOauth2,"accessCode"===Me||sr||it.newAuthErr({authId:pt,source:"auth",level:"warning",message:"Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"}),Lt.error?it.newAuthErr({authId:pt,source:"auth",level:"error",message:(0,o.default)(Lt)}):Pe.authorizeOauth2WithPersistOption({auth:Ke,token:Lt})};function Ae(Xe){return{type:P,payload:Xe}}const Se=Xe=>Oe=>{let{authActions:Pe}=Oe;Pe.authorizeOauth2(Xe),Pe.persistAuthorizationIfNeeded()},qe=Xe=>Oe=>{let{authActions:Pe}=Oe,{schema:it,name:Ke,username:Lt,password:sr,passwordType:yr,clientId:pt,clientSecret:Me}=Xe,Ne={grant_type:"password",scope:Xe.scopes.join(" "),username:Lt,password:sr},Dt={};switch(yr){case"request-body":xr=Ne,an=Me,(St=pt)&&(0,i.default)(xr,{client_id:St}),an&&(0,i.default)(xr,{client_secret:an});break;case"basic":Dt.Authorization="Basic "+(0,f.r3)(pt+":"+Me);break;default:console.warn(`Warning: invalid passwordType ${yr} was passed, not including client id and secret`)}var xr,St,an;return Pe.authorizeRequest({body:(0,f.GZ)(Ne),url:it.get("tokenUrl"),name:Ke,headers:Dt,query:{},auth:Xe})},Ue=Xe=>Oe=>{let{authActions:Pe}=Oe,{schema:it,scopes:Ke,name:Lt,clientId:sr,clientSecret:yr}=Xe,pt={Authorization:"Basic "+(0,f.r3)(sr+":"+yr)},Me={grant_type:"client_credentials",scope:Ke.join(" ")};return Pe.authorizeRequest({body:(0,f.GZ)(Me),name:Lt,url:it.get("tokenUrl"),auth:Xe,headers:pt})},ut=Xe=>{let{auth:Oe,redirectUrl:Pe}=Xe;return it=>{let{authActions:Ke}=it,{schema:Lt,name:sr,clientId:yr,clientSecret:pt,codeVerifier:Me}=Oe;return Ke.authorizeRequest({body:(0,f.GZ)({grant_type:"authorization_code",code:Oe.code,client_id:yr,client_secret:pt,redirect_uri:Pe,code_verifier:Me}),name:sr,url:Lt.get("tokenUrl"),auth:Oe})}},Ze=Xe=>{let{auth:Oe,redirectUrl:Pe}=Xe;return it=>{let{authActions:Ke}=it,{schema:Lt,name:sr,clientId:yr,clientSecret:pt,codeVerifier:Me}=Oe,Ne={Authorization:"Basic "+(0,f.r3)(yr+":"+pt)};return Ke.authorizeRequest({body:(0,f.GZ)({grant_type:"authorization_code",code:Oe.code,client_id:yr,redirect_uri:Pe,code_verifier:Me}),name:sr,url:Lt.get("tokenUrl"),auth:Oe,headers:Ne})}},wt=Xe=>Oe=>{let Pe,{fn:it,getConfigs:Ke,authActions:Lt,errActions:sr,oas3Selectors:yr,specSelectors:pt,authSelectors:Me}=Oe,{body:Ne,query:Dt={},headers:xr={},name:St,url:an,auth:Tr}=Xe,{additionalQueryStringParams:Tn}=Me.getConfigs()||{};if(pt.isOAS3()){let so=yr.serverEffectiveValue(yr.selectedServer());Pe=(0,s.default)(an,so,!0)}else Pe=(0,s.default)(an,pt.url(),!0);"object"==typeof Tn&&(Pe.query=(0,i.default)({},Pe.query,Tn));const zn=Pe.toString();let Wn=(0,i.default)({Accept:"application/json, text/plain, */*","Content-Type":"application/x-www-form-urlencoded","X-Requested-With":"XMLHttpRequest"},xr);it.fetch({url:zn,method:"post",headers:Wn,query:Dt,body:Ne,requestInterceptor:Ke().requestInterceptor,responseInterceptor:Ke().responseInterceptor}).then(function(so){let Hn=JSON.parse(so.data);so.ok?Hn&&Hn.error||Hn&&Hn.parseError?sr.newAuthErr({authId:St,level:"error",source:"auth",message:(0,o.default)(Hn)}):Lt.authorizeOauth2WithPersistOption({auth:Tr,token:Hn}):sr.newAuthErr({authId:St,level:"error",source:"auth",message:so.statusText})}).catch(so=>{let Hn=new Error(so).message;if(so.response&&so.response.data){const $=so.response.data;try{const Q="string"==typeof $?JSON.parse($):$;Q.error&&(Hn+=`, error: ${Q.error}`),Q.error_description&&(Hn+=`, description: ${Q.error_description}`)}catch{}}sr.newAuthErr({authId:St,level:"error",source:"auth",message:Hn})})};function Ot(Xe){return{type:M,payload:Xe}}function Ht(Xe){return{type:d,payload:Xe}}const gr=()=>Xe=>{let{authSelectors:Oe,getConfigs:Pe}=Xe;if(Pe().persistAuthorization){const it=Oe.authorized();localStorage.setItem("authorized",(0,o.default)(it.toJS()))}},lt=(Xe,Oe)=>()=>{u.Z.swaggerUIRedirectOauth2=Oe,u.Z.open(Xe)}},3705:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m,preauthorizeBasic:()=>S,preauthorizeApiKey:()=>T});var o=r(5527),i=r(3962),s=r(5812),u=r(35),f=r(8302);function m(){return{afterLoad(I){this.rootInjects=this.rootInjects||{},this.rootInjects.initOAuth=I.authActions.configureAuth,this.rootInjects.preauthorizeApiKey=(0,o.default)(T).call(T,null,I),this.rootInjects.preauthorizeBasic=(0,o.default)(S).call(S,null,I)},statePlugins:{auth:{reducers:i.default,actions:s,selectors:u},spec:{wrapActions:f}}}}function S(I,P,O,M){const{authActions:{authorize:d},specSelectors:{specJson:D,isOAS3:L}}=I,G=L()?["components","securitySchemes"]:["securityDefinitions"],Z=D().getIn([...G,P]);return Z?d({[P]:{value:{username:O,password:M},schema:Z.toJS()}}):null}function T(I,P,O){const{authActions:{authorize:M},specSelectors:{specJson:d,isOAS3:D}}=I,L=D()?["components","securitySchemes"]:["securityDefinitions"],G=d().getIn([...L,P]);return G?M({[P]:{value:O,schema:G.toJS()}}):null}},3962:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(29),i=r(7512),s=r(9725),u=r(6298),f=r(5812);const m={[f.SHOW_AUTH_POPUP]:(S,T)=>{let{payload:I}=T;return S.set("showDefinitions",I)},[f.AUTHORIZE]:(S,T)=>{var I;let{payload:P}=T,O=(0,s.fromJS)(P),M=S.get("authorized")||(0,s.Map)();return(0,o.default)(I=O.entrySeq()).call(I,d=>{let[D,L]=d;if(!(0,u.Wl)(L.getIn))return S.set("authorized",M);let G=L.getIn(["schema","type"]);if("apiKey"===G||"http"===G)M=M.set(D,L);else if("basic"===G){let Z=L.getIn(["value","username"]),we=L.getIn(["value","password"]);M=M.setIn([D,"value"],{username:Z,header:"Basic "+(0,u.r3)(Z+":"+we)}),M=M.setIn([D,"schema"],L.get("schema"))}}),S.set("authorized",M)},[f.AUTHORIZE_OAUTH2]:(S,T)=>{let I,{payload:P}=T,{auth:O,token:M}=P;O.token=(0,i.default)({},M),I=(0,s.fromJS)(O);let d=S.get("authorized")||(0,s.Map)();return d=d.set(I.get("name"),I),S.set("authorized",d)},[f.LOGOUT]:(S,T)=>{let{payload:I}=T,P=S.get("authorized").withMutations(O=>{(0,o.default)(I).call(I,M=>{O.delete(M)})});return S.set("authorized",P)},[f.CONFIGURE_AUTH]:(S,T)=>{let{payload:I}=T;return S.set("configs",I)},[f.RESTORE_AUTHORIZATION]:(S,T)=>{let{payload:I}=T;return S.set("authorized",(0,s.fromJS)(I.authorized))}}},35:(e,t,r)=>{r.r(t),r.d(t,{shownDefinitions:()=>P,definitionsToAuthorize:()=>O,getDefinitionsByNames:()=>M,definitionsForRequirements:()=>d,authorized:()=>D,isAuthorized:()=>L,getConfigs:()=>G});var o=r(29),i=r(1778),s=r(6145),u=r(8818),f=r(2565),m=r(2740),S=r(8639),T=r(9725);const I=Z=>Z,P=(0,S.createSelector)(I,Z=>Z.get("showDefinitions")),O=(0,S.createSelector)(I,()=>Z=>{var we;let{specSelectors:xe}=Z,Ae=xe.securityDefinitions()||(0,T.Map)({}),Se=(0,T.List)();return(0,o.default)(we=Ae.entrySeq()).call(we,qe=>{let[Ue,ut]=qe,Ze=(0,T.Map)();Ze=Ze.set(Ue,ut),Se=Se.push(Ze)}),Se}),M=(Z,we)=>xe=>{var Ae;let{specSelectors:Se}=xe;console.warn("WARNING: getDefinitionsByNames is deprecated and will be removed in the next major version.");let qe=Se.securityDefinitions(),Ue=(0,T.List)();return(0,o.default)(Ae=we.valueSeq()).call(Ae,ut=>{var Ze;let wt=(0,T.Map)();(0,o.default)(Ze=ut.entrySeq()).call(Ze,Ot=>{let Ht,[gr,lt]=Ot,Xe=qe.get(gr);var Oe;"oauth2"===Xe.get("type")&<.size&&(Ht=Xe.get("scopes"),(0,o.default)(Oe=Ht.keySeq()).call(Oe,Pe=>{lt.contains(Pe)||(Ht=Ht.delete(Pe))}),Xe=Xe.set("allowedScopes",Ht)),wt=wt.set(gr,Xe)}),Ue=Ue.push(wt)}),Ue},d=function(Z){let we=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,T.List)();return xe=>{let{authSelectors:Ae}=xe;const Se=Ae.definitionsToAuthorize()||(0,T.List)();let qe=(0,T.List)();return(0,o.default)(Se).call(Se,Ue=>{let ut=(0,i.default)(we).call(we,Ze=>Ze.get(Ue.keySeq().first()));ut&&((0,o.default)(Ue).call(Ue,(Ze,wt)=>{if("oauth2"===Ze.get("type")){const Ht=ut.get(wt);let gr=Ze.get("scopes");var Ot;T.List.isList(Ht)&&T.Map.isMap(gr)&&((0,o.default)(Ot=gr.keySeq()).call(Ot,lt=>{Ht.contains(lt)||(gr=gr.delete(lt))}),Ue=Ue.set(wt,Ze.set("scopes",gr)))}}),qe=qe.push(Ue))}),qe}},D=(0,S.createSelector)(I,Z=>Z.get("authorized")||(0,T.Map)()),L=(Z,we)=>xe=>{var Ae;let{authSelectors:Se}=xe,qe=Se.authorized();return T.List.isList(we)?!!(0,s.default)(Ae=we.toJS()).call(Ae,Ue=>{var ut,Ze;return-1===(0,u.default)(ut=(0,f.default)(Ze=(0,m.default)(Ue)).call(Ze,wt=>!!qe.get(wt))).call(ut,!1)}).length:null},G=(0,S.createSelector)(I,Z=>Z.get("configs"))},8302:(e,t,r)=>{r.r(t),r.d(t,{execute:()=>o});const o=(i,s)=>{let{authSelectors:u,specSelectors:f}=s;return m=>{let{path:S,method:T,operation:I,extras:P}=m,O={authorized:u.authorized()&&u.authorized().toJS(),definitions:f.securityDefinitions()&&f.securityDefinitions().toJS(),specSecurity:f.security()&&f.security().toJS()};return i({path:S,method:T,operation:I,securities:O,...P})}}},714:(e,t,r)=>{r.r(t),r.d(t,{UPDATE_CONFIGS:()=>o,TOGGLE_CONFIGS:()=>i,update:()=>s,toggle:()=>u,loaded:()=>f});const o="configs_update",i="configs_toggle";function s(m,S){return{type:o,payload:{[m]:S}}}function u(m){return{type:i,payload:m}}const f=()=>m=>{let{getConfigs:S,authActions:T}=m;if(S().persistAuthorization){const I=localStorage.getItem("authorized");I&&T.restoreAuthorization({authorized:JSON.parse(I)})}}},2256:(e,t,r)=>{r.r(t),r.d(t,{parseYamlConfig:()=>i});var o=r(626);const i=(s,u)=>{try{return o.default.load(s)}catch(f){return u&&u.errActions.newThrownErr(new Error(f)),{}}}},1661:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var o=r(5163),i=r(2256),s=r(714),u=r(2698),f=r(9018),m=r(7743);const S={getLocalConfig:()=>(0,i.parseYamlConfig)(o)};function T(){return{statePlugins:{spec:{actions:u,selectors:S},configs:{reducers:m.default,actions:s,selectors:f}}}}},7743:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var o=r(9725),i=r(714);const s={[i.UPDATE_CONFIGS]:(u,f)=>u.merge((0,o.fromJS)(f.payload)),[i.TOGGLE_CONFIGS]:(u,f)=>{const m=f.payload,S=u.get(m);return u.set(m,!S)}}},9018:(e,t,r)=>{r.r(t),r.d(t,{get:()=>i});var o=r(4163);const i=(s,u)=>s.getIn((0,o.default)(u)?u:[u])},2698:(e,t,r)=>{r.r(t),r.d(t,{downloadConfig:()=>i,getConfigByUrl:()=>s});var o=r(2256);const i=u=>f=>{const{fn:{fetch:m}}=f;return m(u)},s=(u,f)=>m=>{let{specActions:S}=m;if(u)return S.downloadConfig(u).then(T,T);function T(I){I instanceof Error||I.status>=400?(S.updateLoadingStatus("failedConfig"),S.updateLoadingStatus("failedConfig"),S.updateUrl(""),console.error(I.statusText+" "+u.url),f(null)):f((0,o.parseYamlConfig)(I.text))}}},1970:(e,t,r)=>{r.r(t),r.d(t,{setHash:()=>o});const o=i=>i?history.pushState(null,null,`#${i}`):window.location.hash=""},4980:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var o=r(5858),i=r(877),s=r(4584);function u(){return[o.default,{statePlugins:{configs:{wrapActions:{loaded:(f,m)=>function(){f(...arguments);const S=decodeURIComponent(window.location.hash);m.layoutActions.parseDeepLinkHash(S)}}}},wrapComponents:{operation:i.default,OperationTag:s.default}}]}},5858:(e,t,r)=>{r.r(t),r.d(t,{clearScrollTo:()=>G,default:()=>Z,parseDeepLinkHash:()=>d,readyToScroll:()=>D,scrollTo:()=>M,scrollToElement:()=>L,show:()=>O});var o=r(4163),i=r(8136),s=r(2565),u=r(8818),f=r(1970);const m=(r.d(xe={},{default:()=>Xt()}),xe);var xe,S=r(6298),T=r(9725);const I="layout_scroll_to",P="layout_clear_scroll",O=(we,xe)=>{let{getConfigs:Ae,layoutSelectors:Se}=xe;return function(){for(var qe=arguments.length,Ue=new Array(qe),ut=0;ut({type:I,payload:(0,o.default)(we)?we:[we]}),d=we=>xe=>{let{layoutActions:Ae,layoutSelectors:Se,getConfigs:qe}=xe;if(qe().deepLinking&&we){var Ue;let ut=(0,i.default)(we).call(we,1);"!"===ut[0]&&(ut=(0,i.default)(ut).call(ut,1)),"/"===ut[0]&&(ut=(0,i.default)(ut).call(ut,1));const Ze=(0,s.default)(Ue=ut.split("/")).call(Ue,lt=>lt||""),wt=Se.isShownKeyFromUrlHashArray(Ze),[Ot,Ht="",gr=""]=wt;if("operations"===Ot){const lt=Se.isShownKeyFromUrlHashArray([Ht]);(0,u.default)(Ht).call(Ht,"_")>-1&&(console.warn("Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead."),Ae.show((0,s.default)(lt).call(lt,Xe=>Xe.replace(/_/g," ")),!0)),Ae.show(lt,!0)}((0,u.default)(Ht).call(Ht,"_")>-1||(0,u.default)(gr).call(gr,"_")>-1)&&(console.warn("Warning: escaping deep link whitespace with `_` will be unsupported in v4.0, use `%20` instead."),Ae.show((0,s.default)(wt).call(wt,lt=>lt.replace(/_/g," ")),!0)),Ae.show(wt,!0),Ae.scrollTo(wt)}},D=(we,xe)=>Ae=>{const Se=Ae.layoutSelectors.getScrollToKey();T.default.is(Se,(0,T.fromJS)(we))&&(Ae.layoutActions.scrollToElement(xe),Ae.layoutActions.clearScrollTo())},L=(we,xe)=>Ae=>{try{xe=xe||Ae.fn.getScrollParent(we),m.default.createScroller(xe).to(we)}catch(Se){console.error(Se)}},G=()=>({type:P}),Z={fn:{getScrollParent:function(we,xe){const Ae=document.documentElement;let Se=getComputedStyle(we);const qe="absolute"===Se.position,Ue=xe?/(auto|scroll|hidden)/:/(auto|scroll)/;if("fixed"===Se.position)return Ae;for(let ut=we;ut=ut.parentElement;)if(Se=getComputedStyle(ut),(!qe||"static"!==Se.position)&&Ue.test(Se.overflow+Se.overflowY+Se.overflowX))return ut;return Ae}},statePlugins:{layout:{actions:{scrollToElement:L,scrollTo:M,clearScrollTo:G,readyToScroll:D,parseDeepLinkHash:d},selectors:{getScrollToKey:we=>we.get("scrollToKey"),isShownKeyFromUrlHashArray(we,xe){const[Ae,Se]=xe;return Se?["operations",Ae,Se]:Ae?["operations-tag",Ae]:[]},urlHashArrayFromIsShownKey(we,xe){let[Ae,Se,qe]=xe;return"operations"==Ae?[Se,qe]:"operations-tag"==Ae?[Se]:[]}},reducers:{[I]:(we,xe)=>we.set("scrollToKey",T.default.fromJS(xe.payload)),[P]:we=>we.delete("scrollToKey")},wrapActions:{show:O}}}}},4584:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var o=r(775),i=r(810);r(5053);const s=(u,f)=>class extends i.default.Component{constructor(){super(...arguments),(0,o.default)(this,"onLoad",m=>{const{tag:S}=this.props;f.layoutActions.readyToScroll(["operations-tag",S],m)})}render(){return i.default.createElement("span",{ref:this.onLoad},i.default.createElement(u,this.props))}}},877:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var o=r(775),i=r(810);r(9569);const s=(u,f)=>class extends i.default.Component{constructor(){super(...arguments),(0,o.default)(this,"onLoad",m=>{const{operation:S}=this.props,{tag:T,operationId:I}=S.toObject();let{isShownKey:P}=S.toObject();P=P||["operations",T,I],f.layoutActions.readyToScroll(P,m)})}render(){return i.default.createElement("span",{ref:this.onLoad},i.default.createElement(u,this.props))}}},8011:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var o=r(7512),i=r(3769),s=r(8818),u=r(313),f=r(8639),m=r(9725),S=r(7504);function T(I){let{fn:P}=I;return{statePlugins:{spec:{actions:{download:O=>M=>{let{errActions:d,specSelectors:D,specActions:L,getConfigs:G}=M,{fetch:Z}=P;const we=G();function xe(Ae){if(Ae instanceof Error||Ae.status>=400)return L.updateLoadingStatus("failed"),d.newThrownErr((0,o.default)(new Error((Ae.message||Ae.statusText)+" "+O),{source:"fetch"})),void(!Ae.status&&Ae instanceof Error&&function(){try{let Se;if("URL"in S.Z?Se=new i.default(O):(Se=document.createElement("a"),Se.href=O),"https:"!==Se.protocol&&"https:"===S.Z.location.protocol){const qe=(0,o.default)(new Error(`Possible mixed-content issue? The page was loaded over https:// but a ${Se.protocol}// URL was specified. Check that you are not attempting to load mixed content.`),{source:"fetch"});return void d.newThrownErr(qe)}if(Se.origin!==S.Z.location.origin){const qe=(0,o.default)(new Error(`Possible cross-origin (CORS) issue? The URL origin (${Se.origin}) does not match the page (${S.Z.location.origin}). Check the server returns the correct 'Access-Control-Allow-*' headers.`),{source:"fetch"});d.newThrownErr(qe)}}catch{return}}());L.updateLoadingStatus("success"),L.updateSpec(Ae.text),D.url()!==O&&L.updateUrl(O)}O=O||D.url(),L.updateLoadingStatus("loading"),d.clear({source:"fetch"}),Z({url:O,loadSpec:!0,requestInterceptor:we.requestInterceptor||(Ae=>Ae),responseInterceptor:we.responseInterceptor||(Ae=>Ae),credentials:"same-origin",headers:{Accept:"application/json,*/*"}}).then(xe,xe)},updateLoadingStatus:O=>{let M=[null,"loading","failed","success","failedConfig"];return-1===(0,s.default)(M).call(M,O)&&console.error(`Error: ${O} is not one of ${(0,u.default)(M)}`),{type:"spec_update_loading_status",payload:O}}},reducers:{spec_update_loading_status:(O,M)=>"string"==typeof M.payload?O.set("loadingStatus",M.payload):O},selectors:{loadingStatus:(0,f.createSelector)(O=>O||(0,m.Map)(),O=>O.get("loadingStatus")||null)}}}}}},4966:(e,t,r)=>{r.r(t),r.d(t,{NEW_THROWN_ERR:()=>i,NEW_THROWN_ERR_BATCH:()=>s,NEW_SPEC_ERR:()=>u,NEW_SPEC_ERR_BATCH:()=>f,NEW_AUTH_ERR:()=>m,CLEAR:()=>S,CLEAR_BY:()=>T,newThrownErr:()=>I,newThrownErrBatch:()=>P,newSpecErr:()=>O,newSpecErrBatch:()=>M,newAuthErr:()=>d,clear:()=>D,clearBy:()=>L});var o=r(8518);const i="err_new_thrown_err",s="err_new_thrown_err_batch",u="err_new_spec_err",f="err_new_spec_err_batch",m="err_new_auth_err",S="err_clear",T="err_clear_by";function I(G){return{type:i,payload:(0,o.serializeError)(G)}}function P(G){return{type:s,payload:G}}function O(G){return{type:u,payload:G}}function M(G){return{type:f,payload:G}}function d(G){return{type:m,payload:G}}function D(){return{type:S,payload:arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}}}function L(){return{type:T,payload:arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>!0}}},6808:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var o=r(6145),i=r(2565);const s=(r.d(S={},{default:()=>ft()}),S),u=[r(2392),r(1835)];var S;function f(m){var S;let T={jsSpec:{}},I=(0,s.default)(u,(P,O)=>{try{let M=O.transform(P,T);return(0,o.default)(M).call(M,d=>!!d)}catch(M){return console.error("Transformer error:",M),P}},m);return(0,i.default)(S=(0,o.default)(I).call(I,P=>!!P)).call(S,P=>(!P.get("line")&&P.get("path"),P))}},2392:(e,t,r)=>{r.r(t),r.d(t,{transform:()=>f});var o=r(2565),i=r(8818),s=r(8136),u=r(6785);function f(m){return(0,o.default)(m).call(m,S=>{var T;let P=(0,i.default)(T=S.get("message")).call(T,"is not of a type(s)");if(P>-1){var O,M;let d=(0,s.default)(O=S.get("message")).call(O,P+19).split(",");return S.set("message",(0,s.default)(M=S.get("message")).call(M,0,P)+(0,u.default)(D=d).call(D,(L,G,Z,we)=>Z===we.length-1&&we.length>1?L+"or "+G:we[Z+1]&&we.length>2?L+G+", ":we[Z+1]?L+G+" ":L+G,"should be a"))}var D;return S})}},1835:(e,t,r)=>{function o(i,s){return i}r.r(t),r.d(t,{transform:()=>o}),r(2565),r(8818),r(9908),r(9725)},7793:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var o=r(3527),i=r(4966),s=r(7667);function u(f){return{statePlugins:{err:{reducers:(0,o.default)(f),actions:i,selectors:s}}}}},3527:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var o=r(7512),i=r(2565),s=r(5171),u=r(6145),f=r(7930),m=r(4966),S=r(9725),T=r(6808);let I={line:0,level:"error",message:"Unknown error"};function P(){return{[m.NEW_THROWN_ERR]:(O,M)=>{let{payload:d}=M,D=(0,o.default)(I,d,{type:"thrown"});return O.update("errors",L=>(L||(0,S.List)()).push((0,S.fromJS)(D))).update("errors",L=>(0,T.default)(L))},[m.NEW_THROWN_ERR_BATCH]:(O,M)=>{let{payload:d}=M;return d=(0,i.default)(d).call(d,D=>(0,S.fromJS)((0,o.default)(I,D,{type:"thrown"}))),O.update("errors",D=>{var L;return(0,s.default)(L=D||(0,S.List)()).call(L,(0,S.fromJS)(d))}).update("errors",D=>(0,T.default)(D))},[m.NEW_SPEC_ERR]:(O,M)=>{let{payload:d}=M,D=(0,S.fromJS)(d);return D=D.set("type","spec"),O.update("errors",L=>(L||(0,S.List)()).push((0,S.fromJS)(D)).sortBy(G=>G.get("line"))).update("errors",L=>(0,T.default)(L))},[m.NEW_SPEC_ERR_BATCH]:(O,M)=>{let{payload:d}=M;return d=(0,i.default)(d).call(d,D=>(0,S.fromJS)((0,o.default)(I,D,{type:"spec"}))),O.update("errors",D=>{var L;return(0,s.default)(L=D||(0,S.List)()).call(L,(0,S.fromJS)(d))}).update("errors",D=>(0,T.default)(D))},[m.NEW_AUTH_ERR]:(O,M)=>{let{payload:d}=M,D=(0,S.fromJS)((0,o.default)({},d));return D=D.set("type","auth"),O.update("errors",L=>(L||(0,S.List)()).push((0,S.fromJS)(D))).update("errors",L=>(0,T.default)(L))},[m.CLEAR]:(O,M)=>{var d;let{payload:D}=M;if(!D||!O.get("errors"))return O;let L=(0,u.default)(d=O.get("errors")).call(d,G=>{var Z;return(0,f.default)(Z=G.keySeq()).call(Z,we=>{const xe=G.get(we),Ae=D[we];return!Ae||xe!==Ae})});return O.merge({errors:L})},[m.CLEAR_BY]:(O,M)=>{var d;let{payload:D}=M;if(!D||"function"!=typeof D)return O;let L=(0,u.default)(d=O.get("errors")).call(d,G=>D(G));return O.merge({errors:L})}}}},7667:(e,t,r)=>{r.r(t),r.d(t,{allErrors:()=>s,lastError:()=>u});var o=r(9725),i=r(8639);const s=(0,i.createSelector)(f=>f,f=>f.get("errors",(0,o.List)())),u=(0,i.createSelector)(s,f=>f.last())},9978:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var o=r(4309);function i(){return{fn:{opsFilter:o.default}}}},4309:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var o=r(6145),i=r(8818);function s(u,f){return(0,o.default)(u).call(u,(m,S)=>-1!==(0,i.default)(S).call(S,f))}},5474:(e,t,r)=>{r.r(t),r.d(t,{UPDATE_LAYOUT:()=>i,UPDATE_FILTER:()=>s,UPDATE_MODE:()=>u,SHOW:()=>f,updateLayout:()=>m,updateFilter:()=>S,show:()=>T,changeMode:()=>I});var o=r(6298);const i="layout_update_layout",s="layout_update_filter",u="layout_update_mode",f="layout_show";function m(P){return{type:i,payload:P}}function S(P){return{type:s,payload:P}}function T(P){let O=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return P=(0,o.AF)(P),{type:f,payload:{thing:P,shown:O}}}function I(P){let O=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return P=(0,o.AF)(P),{type:u,payload:{thing:P,mode:O}}}},6821:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var o=r(5672),i=r(5474),s=r(4400),u=r(8989);function f(){return{statePlugins:{layout:{reducers:o.default,actions:i,selectors:s},spec:{wrapSelectors:u}}}}},5672:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var o=r(5171),i=r(9725),s=r(5474);const u={[s.UPDATE_LAYOUT]:(f,m)=>f.set("layout",m.payload),[s.UPDATE_FILTER]:(f,m)=>f.set("filter",m.payload),[s.SHOW]:(f,m)=>{const S=m.payload.shown,T=(0,i.fromJS)(m.payload.thing);return f.update("shown",(0,i.fromJS)({}),I=>I.set(T,S))},[s.UPDATE_MODE]:(f,m)=>{var S;let T=m.payload.thing,I=m.payload.mode;return f.setIn((0,o.default)(S=["modes"]).call(S,T),(I||"")+"")}}},4400:(e,t,r)=>{r.r(t),r.d(t,{current:()=>u,currentFilter:()=>f,isShown:()=>m,whatMode:()=>S,showSummary:()=>T});var o=r(8639),i=r(6298),s=r(9725);const u=I=>I.get("layout"),f=I=>I.get("filter"),m=(I,P,O)=>(P=(0,i.AF)(P),I.get("shown",(0,s.fromJS)({})).get((0,s.fromJS)(P),O)),S=function(I,P){let O=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return P=(0,i.AF)(P),I.getIn(["modes",...P],O)},T=(0,o.createSelector)(I=>I,I=>!m(I,"editor"))},8989:(e,t,r)=>{r.r(t),r.d(t,{taggedOperations:()=>i});var o=r(8136);const i=(s,u)=>function(f){for(var m=arguments.length,S=new Array(m>1?m-1:0),T=1;T=0&&(I=(0,o.default)(I).call(I,0,D)),I}},9150:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var o=r(5527);function i(s){let{configs:u}=s;const f={debug:0,info:1,log:2,warn:3,error:4},m=P=>f[P]||-1;let{logLevel:S}=u,T=m(S);function I(P){for(var O=arguments.length,M=new Array(O>1?O-1:0),d=1;d=T&&console[P](...M)}return I.warn=(0,o.default)(I).call(I,null,"warn"),I.error=(0,o.default)(I).call(I,null,"error"),I.info=(0,o.default)(I).call(I,null,"info"),I.debug=(0,o.default)(I).call(I,null,"debug"),{rootInjects:{log:I}}}},7002:(e,t,r)=>{r.r(t),r.d(t,{UPDATE_SELECTED_SERVER:()=>o,UPDATE_REQUEST_BODY_VALUE:()=>i,UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG:()=>s,UPDATE_REQUEST_BODY_INCLUSION:()=>u,UPDATE_ACTIVE_EXAMPLES_MEMBER:()=>f,UPDATE_REQUEST_CONTENT_TYPE:()=>m,UPDATE_RESPONSE_CONTENT_TYPE:()=>S,UPDATE_SERVER_VARIABLE_VALUE:()=>T,SET_REQUEST_BODY_VALIDATE_ERROR:()=>I,CLEAR_REQUEST_BODY_VALIDATE_ERROR:()=>P,CLEAR_REQUEST_BODY_VALUE:()=>O,setSelectedServer:()=>M,setRequestBodyValue:()=>d,setRetainRequestBodyValueFlag:()=>D,setRequestBodyInclusion:()=>L,setActiveExamplesMember:()=>G,setRequestContentType:()=>Z,setResponseContentType:()=>we,setServerVariableValue:()=>xe,setRequestBodyValidateError:()=>Ae,clearRequestBodyValidateError:()=>Se,initRequestBodyValidateError:()=>qe,clearRequestBodyValue:()=>Ue});const o="oas3_set_servers",i="oas3_set_request_body_value",s="oas3_set_request_body_retain_flag",u="oas3_set_request_body_inclusion",f="oas3_set_active_examples_member",m="oas3_set_request_content_type",S="oas3_set_response_content_type",T="oas3_set_server_variable_value",I="oas3_set_request_body_validate_error",P="oas3_clear_request_body_validate_error",O="oas3_clear_request_body_value";function M(ut,Ze){return{type:o,payload:{selectedServerUrl:ut,namespace:Ze}}}function d(ut){let{value:Ze,pathMethod:wt}=ut;return{type:i,payload:{value:Ze,pathMethod:wt}}}const D=ut=>{let{value:Ze,pathMethod:wt}=ut;return{type:s,payload:{value:Ze,pathMethod:wt}}};function L(ut){let{value:Ze,pathMethod:wt,name:Ot}=ut;return{type:u,payload:{value:Ze,pathMethod:wt,name:Ot}}}function G(ut){let{name:Ze,pathMethod:wt,contextType:Ot,contextName:Ht}=ut;return{type:f,payload:{name:Ze,pathMethod:wt,contextType:Ot,contextName:Ht}}}function Z(ut){let{value:Ze,pathMethod:wt}=ut;return{type:m,payload:{value:Ze,pathMethod:wt}}}function we(ut){let{value:Ze,path:wt,method:Ot}=ut;return{type:S,payload:{value:Ze,path:wt,method:Ot}}}function xe(ut){let{server:Ze,namespace:wt,key:Ot,val:Ht}=ut;return{type:T,payload:{server:Ze,namespace:wt,key:Ot,val:Ht}}}const Ae=ut=>{let{path:Ze,method:wt,validationErrors:Ot}=ut;return{type:I,payload:{path:Ze,method:wt,validationErrors:Ot}}},Se=ut=>{let{path:Ze,method:wt}=ut;return{type:P,payload:{path:Ze,method:wt}}},qe=ut=>{let{pathMethod:Ze}=ut;return{type:P,payload:{path:Ze[0],method:Ze[1]}}},Ue=ut=>{let{pathMethod:Ze}=ut;return{type:O,payload:{pathMethod:Ze}}}},3723:(e,t,r)=>{r.r(t),r.d(t,{definitionsToAuthorize:()=>S});var o=r(29),i=r(6145),s=r(6785),u=r(8639),f=r(9725),m=r(7779);const S=(T=(0,u.createSelector)(I=>I,I=>{let{specSelectors:P}=I;return P.securityDefinitions()},(I,P)=>{var O;let M=(0,f.List)();return P&&(0,o.default)(O=P.entrySeq()).call(O,d=>{let[D,L]=d;const G=L.get("type");var Z;if("oauth2"===G&&(0,o.default)(Z=L.get("flows").entrySeq()).call(Z,we=>{let[xe,Ae]=we,Se=(0,f.fromJS)({flow:xe,authorizationUrl:Ae.get("authorizationUrl"),tokenUrl:Ae.get("tokenUrl"),scopes:Ae.get("scopes"),type:L.get("type"),description:L.get("description")});M=M.push(new f.Map({[D]:(0,i.default)(Se).call(Se,qe=>void 0!==qe)}))}),"http"!==G&&"apiKey"!==G||(M=M.push(new f.Map({[D]:L}))),"openIdConnect"===G&&L.get("openIdConnectData")){let we=L.get("openIdConnectData"),xe=we.get("grant_types_supported")||["authorization_code","implicit"];(0,o.default)(xe).call(xe,Ae=>{var Se;let qe=we.get("scopes_supported")&&(0,s.default)(Se=we.get("scopes_supported")).call(Se,(ut,Ze)=>ut.set(Ze,""),new f.Map),Ue=(0,f.fromJS)({flow:Ae,authorizationUrl:we.get("authorization_endpoint"),tokenUrl:we.get("token_endpoint"),scopes:qe,type:"oauth2",openIdConnectUrl:L.get("openIdConnectUrl")});M=M.push(new f.Map({[D]:(0,i.default)(Ue).call(Ue,ut=>void 0!==ut)}))})}}),M}),(I,P)=>function(){const O=P.getSystem().specSelectors.specJson();for(var M=arguments.length,d=new Array(M),D=0;D{r.r(t),r.d(t,{default:()=>f});var o=r(863),i=r(2565),s=r(810),u=(r(5053),r(9569),r(9725));const f=m=>{var S;let{callbacks:T,getComponent:I,specPath:P}=m;const O=I("OperationContainer",!0);if(!T)return s.default.createElement("span",null,"No callbacks");let M=(0,i.default)(S=T.entrySeq()).call(S,d=>{var D;let[L,G]=d;return s.default.createElement("div",{key:L},s.default.createElement("h2",null,L),(0,i.default)(D=G.entrySeq()).call(D,Z=>{var we;let[xe,Ae]=Z;return"$$ref"===xe?null:s.default.createElement("div",{key:xe},(0,i.default)(we=Ae.entrySeq()).call(we,Se=>{let[qe,Ue]=Se;if("$$ref"===qe)return null;let ut=(0,u.fromJS)({operation:Ue});return s.default.createElement(O,(0,o.default)({},m,{op:ut,key:qe,tag:"",method:qe,path:xe,specPath:P.push(L,xe,qe),allowTryItOut:!1}))}))}))});return s.default.createElement("div",null,M)}},6775:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(775),i=r(7512),s=r(6145),u=r(2565),f=r(810);r(5053);class m extends f.default.Component{constructor(T,I){super(T,I),(0,o.default)(this,"onChange",d=>{let{onChange:D}=this.props,{value:L,name:G}=d.target,Z=(0,i.default)({},this.state.value);G?Z[G]=L:Z=L,this.setState({value:Z},()=>D(this.state))});let{name:P,schema:O}=this.props,M=this.getValue();this.state={name:P,schema:O,value:M}}getValue(){let{name:T,authorized:I}=this.props;return I&&I.getIn([T,"value"])}render(){var T;let{schema:I,getComponent:P,errSelectors:O,name:M}=this.props;const d=P("Input"),D=P("Row"),L=P("Col"),G=P("authError"),Z=P("Markdown",!0),we=P("JumpToPath",!0),xe=(I.get("scheme")||"").toLowerCase();let Ae=this.getValue(),Se=(0,s.default)(T=O.allErrors()).call(T,ut=>ut.get("authId")===M);if("basic"===xe){var qe;let ut=Ae?Ae.get("username"):null;return f.default.createElement("div",null,f.default.createElement("h4",null,f.default.createElement("code",null,M||I.get("name")),"\xa0 (http, Basic)",f.default.createElement(we,{path:["securityDefinitions",M]})),ut&&f.default.createElement("h6",null,"Authorized"),f.default.createElement(D,null,f.default.createElement(Z,{source:I.get("description")})),f.default.createElement(D,null,f.default.createElement("label",null,"Username:"),ut?f.default.createElement("code",null," ",ut," "):f.default.createElement(L,null,f.default.createElement(d,{type:"text",required:"required",name:"username","aria-label":"auth-basic-username",onChange:this.onChange,autoFocus:!0}))),f.default.createElement(D,null,f.default.createElement("label",null,"Password:"),ut?f.default.createElement("code",null," ****** "):f.default.createElement(L,null,f.default.createElement(d,{autoComplete:"new-password",name:"password",type:"password","aria-label":"auth-basic-password",onChange:this.onChange}))),(0,u.default)(qe=Se.valueSeq()).call(qe,(Ze,wt)=>f.default.createElement(G,{error:Ze,key:wt})))}var Ue;return"bearer"===xe?f.default.createElement("div",null,f.default.createElement("h4",null,f.default.createElement("code",null,M||I.get("name")),"\xa0 (http, Bearer)",f.default.createElement(we,{path:["securityDefinitions",M]})),Ae&&f.default.createElement("h6",null,"Authorized"),f.default.createElement(D,null,f.default.createElement(Z,{source:I.get("description")})),f.default.createElement(D,null,f.default.createElement("label",null,"Value:"),Ae?f.default.createElement("code",null," ****** "):f.default.createElement(L,null,f.default.createElement(d,{type:"text","aria-label":"auth-bearer-value",onChange:this.onChange,autoFocus:!0}))),(0,u.default)(Ue=Se.valueSeq()).call(Ue,(ut,Ze)=>f.default.createElement(G,{error:ut,key:Ze}))):f.default.createElement("div",null,f.default.createElement("em",null,f.default.createElement("b",null,M)," HTTP authentication: unsupported scheme ",`'${xe}'`))}}},6467:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var o=r(3427),i=r(2458),s=r(5757),u=r(6617),f=r(9928),m=r(5327),S=r(6775),T=r(6796);const I={Callbacks:o.default,HttpAuth:S.default,RequestBody:i.default,Servers:u.default,ServersContainer:f.default,RequestBodyEditor:m.default,OperationServers:T.default,operationLink:s.default}},5757:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var o=r(313),i=r(2565),s=r(810);r(5053),r(9569);const f=class u extends s.Component{render(){const{link:S,name:T,getComponent:I}=this.props,P=I("Markdown",!0);let O=S.get("operationId")||S.get("operationRef"),M=S.get("parameters")&&S.get("parameters").toJS(),d=S.get("description");return s.default.createElement("div",{className:"operation-link"},s.default.createElement("div",{className:"description"},s.default.createElement("b",null,s.default.createElement("code",null,T)),d?s.default.createElement(P,{source:d}):null),s.default.createElement("pre",null,"Operation `",O,"`",s.default.createElement("br",null),s.default.createElement("br",null),"Parameters ",("string"!=typeof(L=(0,o.default)(M,null,2))?"":(0,i.default)(G=L.split("\n")).call(G,(Z,we)=>we>0?Array(1).join(" ")+Z:Z).join("\n"))||"{}",s.default.createElement("br",null)));var L,G}}},6796:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var o=r(775),i=r(810);r(5053),r(9569);class s extends i.default.Component{constructor(){super(...arguments),(0,o.default)(this,"setSelectedServer",f=>{const{path:m,method:S}=this.props;return this.forceUpdate(),this.props.setSelectedServer(f,`${m}:${S}`)}),(0,o.default)(this,"setServerVariableValue",f=>{const{path:m,method:S}=this.props;return this.forceUpdate(),this.props.setServerVariableValue({...f,namespace:`${m}:${S}`})}),(0,o.default)(this,"getSelectedServer",()=>{const{path:f,method:m}=this.props;return this.props.getSelectedServer(`${f}:${m}`)}),(0,o.default)(this,"getServerVariable",(f,m)=>{const{path:S,method:T}=this.props;return this.props.getServerVariable({namespace:`${S}:${T}`,server:f},m)}),(0,o.default)(this,"getEffectiveServerValue",f=>{const{path:m,method:S}=this.props;return this.props.getEffectiveServerValue({server:f,namespace:`${m}:${S}`})})}render(){const{operationServers:f,pathServers:m,getComponent:S}=this.props;if(!f&&!m)return null;const T=S("Servers"),I=f||m,P=f?"operation":"path";return i.default.createElement("div",{className:"opblock-section operation-servers"},i.default.createElement("div",{className:"opblock-section-header"},i.default.createElement("div",{className:"tab-header"},i.default.createElement("h4",{className:"opblock-title"},"Servers"))),i.default.createElement("div",{className:"opblock-description-wrapper"},i.default.createElement("h4",{className:"message"},"These ",P,"-level options override the global server options."),i.default.createElement(T,{servers:I,currentServer:this.getSelectedServer(),setSelectedServer:this.setSelectedServer,setServerVariableValue:this.setServerVariableValue,getServerVariable:this.getServerVariable,getEffectiveServerValue:this.getEffectiveServerValue})))}}},5327:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(775),i=r(810),s=(r(5053),r(8096)),u=r(6298);const f=Function.prototype;class m extends i.PureComponent{constructor(T,I){super(T,I),(0,o.default)(this,"applyDefaultValue",P=>{const{onChange:O,defaultValue:M}=P||this.props;return this.setState({value:M}),O(M)}),(0,o.default)(this,"onChange",P=>{this.props.onChange((0,u.Pz)(P))}),(0,o.default)(this,"onDomChange",P=>{const O=P.target.value;this.setState({value:O},()=>this.onChange(O))}),this.state={value:(0,u.Pz)(T.value)||T.defaultValue},T.onChange(T.value)}UNSAFE_componentWillReceiveProps(T){this.props.value!==T.value&&T.value!==this.state.value&&this.setState({value:(0,u.Pz)(T.value)}),!T.value&&T.defaultValue&&this.state.value&&this.applyDefaultValue(T)}render(){let{getComponent:T,errors:I}=this.props,{value:P}=this.state,O=I.size>0;const M=T("TextArea");return i.default.createElement("div",{className:"body-param"},i.default.createElement(M,{className:(0,s.default)("body-param__text",{invalid:O}),title:I.size?I.join(", "):"",value:P,onChange:this.onDomChange}))}}(0,o.default)(m,"defaultProps",{onChange:f,userHasEditedBody:!1})},2458:(e,t,r)=>{r.r(t),r.d(t,{getDefaultRequestBodyValue:()=>I,default:()=>P});var o=r(2565),i=r(8818),s=r(2372),u=r(4163),f=r(810),m=(r(5053),r(9569),r(9725)),S=r(6298),T=r(2518);const I=(O,M,d)=>{const D=O.getIn(["content",M]),L=D.get("schema").toJS(),G=void 0!==D.get("examples"),Z=D.get("example"),we=G?D.getIn(["examples",d,"value"]):Z,xe=(0,S.xi)(L,M,{includeWriteOnly:!0},we);return(0,S.Pz)(xe)},P=O=>{let{userHasEditedBody:M,requestBody:d,requestBodyValue:D,requestBodyInclusionSetting:L,requestBodyErrors:G,getComponent:Z,getConfigs:we,specSelectors:xe,fn:Ae,contentType:Se,isExecute:qe,specPath:Ue,onChange:ut,onChangeIncludeEmpty:Ze,activeExamplesKey:wt,updateActiveExamplesKey:Ot,setRetainRequestBodyValueFlag:Ht}=O;const gr=Hn=>{ut(Hn.target.files[0])},lt=Hn=>{let $={key:Hn,shouldDispatchInit:!1,defaultValue:!0};return"no value"===L.get(Hn,"no value")&&($.shouldDispatchInit=!0),$},Xe=Z("Markdown",!0),Oe=Z("modelExample"),Pe=Z("RequestBodyEditor"),it=Z("highlightCode"),Ke=Z("ExamplesSelectValueRetainer"),Lt=Z("Example"),sr=Z("ParameterIncludeEmpty"),{showCommonExtensions:yr}=we(),pt=d&&d.get("description")||null,Me=d&&d.get("content")||new m.OrderedMap;Se=Se||Me.keySeq().first()||"";const Ne=Me.get(Se,(0,m.OrderedMap)()),Dt=Ne.get("schema",(0,m.OrderedMap)()),xr=Ne.get("examples",null),St=null==xr?void 0:(0,o.default)(xr).call(xr,(Hn,$)=>{var Q;const me=null===(Q=Hn)||void 0===Q?void 0:Q.get("value",null);return me&&(Hn=Hn.set("value",I(d,Se,$),me)),Hn});if(G=m.List.isList(G)?G:(0,m.List)(),!Ne.size)return null;const an="object"===Ne.getIn(["schema","type"]),Tr="binary"===Ne.getIn(["schema","format"]),Tn="base64"===Ne.getIn(["schema","format"]);if("application/octet-stream"===Se||0===(0,i.default)(Se).call(Se,"image/")||0===(0,i.default)(Se).call(Se,"audio/")||0===(0,i.default)(Se).call(Se,"video/")||Tr||Tn){const Hn=Z("Input");return qe?f.default.createElement(Hn,{type:"file",onChange:gr}):f.default.createElement("i",null,"Example values are not available for ",f.default.createElement("code",null,Se)," media types.")}if(an&&("application/x-www-form-urlencoded"===Se||0===(0,i.default)(Se).call(Se,"multipart/"))&&Dt.get("properties",(0,m.OrderedMap)()).size>0){var zn;const Hn=Z("JsonSchemaForm"),$=Z("ParameterExt"),Q=Dt.get("properties",(0,m.OrderedMap)());return D=m.Map.isMap(D)?D:(0,m.OrderedMap)(),f.default.createElement("div",{className:"table-container"},pt&&f.default.createElement(Xe,{source:pt}),f.default.createElement("table",null,f.default.createElement("tbody",null,m.Map.isMap(Q)&&(0,o.default)(zn=Q.entrySeq()).call(zn,me=>{var ze,Ye;let[ht,Mt]=me;if(Mt.get("readOnly"))return;let xn=yr?(0,S.po)(Mt):null;const Bn=(0,s.default)(ze=Dt.get("required",(0,m.List)())).call(ze,ht),xo=Mt.get("type"),Qn=Mt.get("format"),Ko=Mt.get("description"),Ya=D.getIn([ht,"value"]),bs=D.getIn([ht,"errors"])||G,Li=L.get(ht)||!1,ir=Mt.has("default")||Mt.has("example")||Mt.hasIn(["items","example"])||Mt.hasIn(["items","default"]),At=Mt.has("enum")&&(1===Mt.get("enum").size||Bn),pr=ir||At;let mn="";"array"!==xo||pr||(mn=[]),("object"===xo||pr)&&(mn=(0,S.xi)(Mt,!1,{includeWriteOnly:!0})),"string"!=typeof mn&&"object"===xo&&(mn=(0,S.Pz)(mn)),"string"==typeof mn&&"array"===xo&&(mn=JSON.parse(mn));const ho="string"===xo&&("binary"===Qn||"base64"===Qn);return f.default.createElement("tr",{key:ht,className:"parameters","data-property-name":ht},f.default.createElement("td",{className:"parameters-col_name"},f.default.createElement("div",{className:Bn?"parameter__name required":"parameter__name"},ht,Bn?f.default.createElement("span",null,"\xa0*"):null),f.default.createElement("div",{className:"parameter__type"},xo,Qn&&f.default.createElement("span",{className:"prop-format"},"($",Qn,")"),yr&&xn.size?(0,o.default)(Ye=xn.entrySeq()).call(Ye,Bo=>{let[Zo,Et]=Bo;return f.default.createElement($,{key:`${Zo}-${Et}`,xKey:Zo,xVal:Et})}):null),f.default.createElement("div",{className:"parameter__deprecated"},Mt.get("deprecated")?"deprecated":null)),f.default.createElement("td",{className:"parameters-col_description"},f.default.createElement(Xe,{source:Ko}),qe?f.default.createElement("div",null,f.default.createElement(Hn,{fn:Ae,dispatchInitialValue:!ho,schema:Mt,description:ht,getComponent:Z,value:void 0===Ya?mn:Ya,required:Bn,errors:bs,onChange:Bo=>{ut(Bo,[ht])}}),Bn?null:f.default.createElement(sr,{onChange:Bo=>Ze(ht,Bo),isIncluded:Li,isIncludedOptions:lt(ht),isDisabled:(0,u.default)(Ya)?0!==Ya.length:!(0,S.O2)(Ya)})):null))}))))}const Wn=I(d,Se,wt);let so=null;return(0,T.O)(Wn)&&(so="json"),f.default.createElement("div",null,pt&&f.default.createElement(Xe,{source:pt}),St?f.default.createElement(Ke,{userHasEditedBody:M,examples:St,currentKey:wt,currentUserInputValue:D,onSelect:Hn=>{Ot(Hn)},updateValue:ut,defaultToFirstExample:!0,getComponent:Z,setRetainRequestBodyValueFlag:Ht}):null,qe?f.default.createElement("div",null,f.default.createElement(Pe,{value:D,errors:G,defaultValue:Wn,onChange:ut,getComponent:Z})):f.default.createElement(Oe,{getComponent:Z,getConfigs:we,specSelectors:xe,expandDepth:1,isExecute:qe,schema:Ne.get("schema"),specPath:Ue.push("content",Se),example:f.default.createElement(it,{className:"body-param__example",getConfigs:we,language:so,value:(0,S.Pz)(D)||Wn}),includeWriteOnly:!0}),St?f.default.createElement(Lt,{example:St.get(wt),getComponent:Z,getConfigs:we}):null)}},9928:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var o=r(810);r(5053);class i extends o.default.Component{render(){const{specSelectors:u,oas3Selectors:f,oas3Actions:m,getComponent:S}=this.props,T=u.servers(),I=S("Servers");return T&&T.size?o.default.createElement("div",null,o.default.createElement("span",{className:"servers-title"},"Servers"),o.default.createElement(I,{servers:T,currentServer:f.selectedServer(),setSelectedServer:m.setSelectedServer,setServerVariableValue:m.setServerVariableValue,getServerVariable:f.serverVariableValue,getEffectiveServerValue:f.serverEffectiveValue})):null}}},6617:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(775),i=r(1778),s=r(2565),u=r(810),f=r(9725);r(5053),r(9569);class m extends u.default.Component{constructor(){super(...arguments),(0,o.default)(this,"onServerChange",T=>{this.setServer(T.target.value)}),(0,o.default)(this,"onServerVariableValueChange",T=>{let{setServerVariableValue:I,currentServer:P}=this.props,O=T.target.getAttribute("data-variable");"function"==typeof I&&I({server:P,key:O,val:T.target.value})}),(0,o.default)(this,"setServer",T=>{let{setSelectedServer:I}=this.props;I(T)})}componentDidMount(){var T;let{servers:I,currentServer:P}=this.props;P||this.setServer(null===(T=I.first())||void 0===T?void 0:T.get("url"))}UNSAFE_componentWillReceiveProps(T){let{servers:I,setServerVariableValue:P,getServerVariable:O}=T;if(this.props.currentServer!==T.currentServer||this.props.servers!==T.servers){var M;let d=(0,i.default)(I).call(I,xe=>xe.get("url")===T.currentServer),D=(0,i.default)(M=this.props.servers).call(M,xe=>xe.get("url")===this.props.currentServer)||(0,f.OrderedMap)();if(!d)return this.setServer(I.first().get("url"));let L=D.get("variables")||(0,f.OrderedMap)(),G=((0,i.default)(L).call(L,xe=>xe.get("default"))||(0,f.OrderedMap)()).get("default"),Z=d.get("variables")||(0,f.OrderedMap)(),we=((0,i.default)(Z).call(Z,xe=>xe.get("default"))||(0,f.OrderedMap)()).get("default");(0,s.default)(Z).call(Z,(xe,Ae)=>{O(T.currentServer,Ae)&&G===we||P({server:T.currentServer,key:Ae,val:xe.get("default")||""})})}}render(){var T,I;let{servers:P,currentServer:O,getServerVariable:M,getEffectiveServerValue:d}=this.props,D=((0,i.default)(P).call(P,G=>G.get("url")===O)||(0,f.OrderedMap)()).get("variables")||(0,f.OrderedMap)(),L=0!==D.size;return u.default.createElement("div",{className:"servers"},u.default.createElement("label",{htmlFor:"servers"},u.default.createElement("select",{onChange:this.onServerChange,value:O},(0,s.default)(T=P.valueSeq()).call(T,G=>u.default.createElement("option",{value:G.get("url"),key:G.get("url")},G.get("url"),G.get("description")&&` - ${G.get("description")}`)).toArray())),L?u.default.createElement("div",null,u.default.createElement("div",{className:"computed-url"},"Computed URL:",u.default.createElement("code",null,d(O))),u.default.createElement("h4",null,"Server variables"),u.default.createElement("table",null,u.default.createElement("tbody",null,(0,s.default)(I=D.entrySeq()).call(I,G=>{var Z;let[we,xe]=G;return u.default.createElement("tr",{key:we},u.default.createElement("td",null,we),u.default.createElement("td",null,xe.get("enum")?u.default.createElement("select",{"data-variable":we,onChange:this.onServerVariableValueChange},(0,s.default)(Z=xe.get("enum")).call(Z,Ae=>u.default.createElement("option",{selected:Ae===M(O,we),key:Ae,value:Ae},Ae))):u.default.createElement("input",{type:"text",value:M(O,we)||"",onChange:this.onServerVariableValueChange,"data-variable":we})))})))):null)}}},7779:(e,t,r)=>{r.r(t),r.d(t,{isOAS3:()=>u,isSwagger2:()=>f,OAS3ComponentWrapFactory:()=>m});var o=r(863),i=r(3590),s=r(810);function u(S){const T=S.get("openapi");return"string"==typeof T&&(0,i.default)(T).call(T,"3.0.")&&T.length>4}function f(S){const T=S.get("swagger");return"string"==typeof T&&(0,i.default)(T).call(T,"2.0")}function m(S){return(T,I)=>P=>I&&I.specSelectors&&I.specSelectors.specJson?u(I.specSelectors.specJson())?s.default.createElement(S,(0,o.default)({},P,I,{Ori:T})):s.default.createElement(T,P):(console.warn("OAS3 wrapper: couldn't get spec"),null)}},7451:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var o=r(2044),i=r(3723),s=r(1741),u=r(6467),f=r(7761),m=r(7002),S=r(5065),T=r(2109);function I(){return{components:u.default,wrapComponents:f.default,statePlugins:{spec:{wrapSelectors:o,selectors:s},auth:{wrapSelectors:i},oas3:{actions:m,reducers:T.default,selectors:S}}}}},2109:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(5487),i=r(29),s=r(6785),u=r(9725),f=r(7002);const m={[f.UPDATE_SELECTED_SERVER]:(S,T)=>{let{payload:{selectedServerUrl:I,namespace:P}}=T;return S.setIn(P?[P,"selectedServer"]:["selectedServer"],I)},[f.UPDATE_REQUEST_BODY_VALUE]:(S,T)=>{let{payload:{value:I,pathMethod:P}}=T,[O,M]=P;if(!u.Map.isMap(I))return S.setIn(["requestData",O,M,"bodyValue"],I);let d,D=S.getIn(["requestData",O,M,"bodyValue"])||(0,u.Map)();u.Map.isMap(D)||(D=(0,u.Map)());const[...L]=(0,o.default)(I).call(I);return(0,i.default)(L).call(L,G=>{let Z=I.getIn([G]);D.has(G)&&u.Map.isMap(Z)||(d=D.setIn([G,"value"],Z))}),S.setIn(["requestData",O,M,"bodyValue"],d)},[f.UPDATE_REQUEST_BODY_VALUE_RETAIN_FLAG]:(S,T)=>{let{payload:{value:I,pathMethod:P}}=T,[O,M]=P;return S.setIn(["requestData",O,M,"retainBodyValue"],I)},[f.UPDATE_REQUEST_BODY_INCLUSION]:(S,T)=>{let{payload:{value:I,pathMethod:P,name:O}}=T,[M,d]=P;return S.setIn(["requestData",M,d,"bodyInclusion",O],I)},[f.UPDATE_ACTIVE_EXAMPLES_MEMBER]:(S,T)=>{let{payload:{name:I,pathMethod:P,contextType:O,contextName:M}}=T,[d,D]=P;return S.setIn(["examples",d,D,O,M,"activeExample"],I)},[f.UPDATE_REQUEST_CONTENT_TYPE]:(S,T)=>{let{payload:{value:I,pathMethod:P}}=T,[O,M]=P;return S.setIn(["requestData",O,M,"requestContentType"],I)},[f.UPDATE_RESPONSE_CONTENT_TYPE]:(S,T)=>{let{payload:{value:I,path:P,method:O}}=T;return S.setIn(["requestData",P,O,"responseContentType"],I)},[f.UPDATE_SERVER_VARIABLE_VALUE]:(S,T)=>{let{payload:{server:I,namespace:P,key:O,val:M}}=T;return S.setIn(P?[P,"serverVariableValues",I,O]:["serverVariableValues",I,O],M)},[f.SET_REQUEST_BODY_VALIDATE_ERROR]:(S,T)=>{let{payload:{path:I,method:P,validationErrors:O}}=T,M=[];if(M.push("Required field is not provided"),O.missingBodyValue)return S.setIn(["requestData",I,P,"errors"],(0,u.fromJS)(M));if(O.missingRequiredKeys&&O.missingRequiredKeys.length>0){const{missingRequiredKeys:d}=O;return S.updateIn(["requestData",I,P,"bodyValue"],(0,u.fromJS)({}),D=>(0,s.default)(d).call(d,(L,G)=>L.setIn([G,"errors"],(0,u.fromJS)(M)),D))}return console.warn("unexpected result: SET_REQUEST_BODY_VALIDATE_ERROR"),S},[f.CLEAR_REQUEST_BODY_VALIDATE_ERROR]:(S,T)=>{let{payload:{path:I,method:P}}=T;const O=S.getIn(["requestData",I,P,"bodyValue"]);if(!u.Map.isMap(O))return S.setIn(["requestData",I,P,"errors"],(0,u.fromJS)([]));const[...M]=(0,o.default)(O).call(O);return M?S.updateIn(["requestData",I,P,"bodyValue"],(0,u.fromJS)({}),d=>(0,s.default)(M).call(M,(D,L)=>D.setIn([L,"errors"],(0,u.fromJS)([])),d)):S},[f.CLEAR_REQUEST_BODY_VALUE]:(S,T)=>{let{payload:{pathMethod:I}}=T,[P,O]=I;const M=S.getIn(["requestData",P,O,"bodyValue"]);return M?u.Map.isMap(M)?S.setIn(["requestData",P,O,"bodyValue"],(0,u.Map)()):S.setIn(["requestData",P,O,"bodyValue"],""):S}}},5065:(e,t,r)=>{r.r(t),r.d(t,{selectedServer:()=>P,requestBodyValue:()=>O,shouldRetainRequestBodyValue:()=>M,selectDefaultRequestBodyValue:()=>d,hasUserEditedBody:()=>D,requestBodyInclusionSetting:()=>L,requestBodyErrors:()=>G,activeExamplesMember:()=>Z,requestContentType:()=>we,responseContentType:()=>xe,serverVariableValue:()=>Ae,serverVariables:()=>Se,serverEffectiveValue:()=>qe,validateBeforeExecute:()=>Ue,validateShallowRequired:()=>Ze});var o=r(2565),i=r(29),s=r(2740),u=r(8818),f=r(9725),m=r(7779),S=r(2458),T=r(6298);function I(wt){return function(){for(var Ot=arguments.length,Ht=new Array(Ot),gr=0;gr{const Xe=lt.getSystem().specSelectors.specJson();return(0,m.isOAS3)(Xe)?wt(...Ht):null}}}const P=I((wt,Ot)=>wt.getIn(Ot?[Ot,"selectedServer"]:["selectedServer"])||""),O=I((wt,Ot,Ht)=>wt.getIn(["requestData",Ot,Ht,"bodyValue"])||null),M=I((wt,Ot,Ht)=>wt.getIn(["requestData",Ot,Ht,"retainBodyValue"])||!1),d=(wt,Ot,Ht)=>gr=>{const{oas3Selectors:lt,specSelectors:Xe}=gr.getSystem(),Oe=Xe.specJson();if((0,m.isOAS3)(Oe)){const Pe=lt.requestContentType(Ot,Ht);if(Pe)return(0,S.getDefaultRequestBodyValue)(Xe.specResolvedSubtree(["paths",Ot,Ht,"requestBody"]),Pe,lt.activeExamplesMember(Ot,Ht,"requestBody","requestBody"))}return null},D=(wt,Ot,Ht)=>gr=>{const{oas3Selectors:lt,specSelectors:Xe}=gr.getSystem(),Oe=Xe.specJson();if((0,m.isOAS3)(Oe)){let Pe=!1;const it=lt.requestContentType(Ot,Ht);let Ke=lt.requestBodyValue(Ot,Ht);if(f.Map.isMap(Ke)&&(Ke=(0,T.Pz)(Ke.mapEntries(Lt=>f.Map.isMap(Lt[1])?[Lt[0],Lt[1].get("value")]:Lt).toJS())),f.List.isList(Ke)&&(Ke=(0,T.Pz)(Ke)),it){const Lt=(0,S.getDefaultRequestBodyValue)(Xe.specResolvedSubtree(["paths",Ot,Ht,"requestBody"]),it,lt.activeExamplesMember(Ot,Ht,"requestBody","requestBody"));Pe=!!Ke&&Ke!==Lt}return Pe}return null},L=I((wt,Ot,Ht)=>wt.getIn(["requestData",Ot,Ht,"bodyInclusion"])||(0,f.Map)()),G=I((wt,Ot,Ht)=>wt.getIn(["requestData",Ot,Ht,"errors"])||null),Z=I((wt,Ot,Ht,gr,lt)=>wt.getIn(["examples",Ot,Ht,gr,lt,"activeExample"])||null),we=I((wt,Ot,Ht)=>wt.getIn(["requestData",Ot,Ht,"requestContentType"])||null),xe=I((wt,Ot,Ht)=>wt.getIn(["requestData",Ot,Ht,"responseContentType"])||null),Ae=I((wt,Ot,Ht)=>{let gr;if("string"!=typeof Ot){const{server:lt,namespace:Xe}=Ot;gr=Xe?[Xe,"serverVariableValues",lt,Ht]:["serverVariableValues",lt,Ht]}else gr=["serverVariableValues",Ot,Ht];return wt.getIn(gr)||null}),Se=I((wt,Ot)=>{let Ht;if("string"!=typeof Ot){const{server:gr,namespace:lt}=Ot;Ht=lt?[lt,"serverVariableValues",gr]:["serverVariableValues",gr]}else Ht=["serverVariableValues",Ot];return wt.getIn(Ht)||(0,f.OrderedMap)()}),qe=I((wt,Ot)=>{var Ht,gr;if("string"!=typeof Ot){const{server:Xe,namespace:Oe}=Ot;gr=Xe,Ht=wt.getIn(Oe?[Oe,"serverVariableValues",gr]:["serverVariableValues",gr])}else Ht=wt.getIn(["serverVariableValues",gr=Ot]);Ht=Ht||(0,f.OrderedMap)();let lt=gr;return(0,o.default)(Ht).call(Ht,(Xe,Oe)=>{lt=lt.replace(new RegExp(`{${Oe}}`,"g"),Xe)}),lt}),Ue=(ut=(wt,Ot)=>{return gr=(gr=Ot)||[],!!wt.getIn(["requestData",...gr,"bodyValue"]);var gr},function(){for(var wt=arguments.length,Ot=new Array(wt),Ht=0;Ht{const lt=gr.getSystem().specSelectors.specJson();let Xe=[...Ot][1]||[];return!lt.getIn(["paths",...Xe,"requestBody","required"])||ut(...Ot)}});var ut;const Ze=(wt,Ot)=>{var Ht;let{oas3RequiredRequestBodyContentType:gr,oas3RequestContentType:lt,oas3RequestBodyValue:Xe}=Ot,Oe=[];if(!f.Map.isMap(Xe))return Oe;let Pe=[];return(0,i.default)(Ht=(0,s.default)(gr.requestContentType)).call(Ht,it=>{if(it===lt){let Ke=gr.requestContentType[it];(0,i.default)(Ke).call(Ke,Lt=>{(0,u.default)(Pe).call(Pe,Lt)<0&&Pe.push(Lt)})}}),(0,i.default)(Pe).call(Pe,it=>{Xe.getIn([it,"value"])||Oe.push(it)}),Oe}},1741:(e,t,r)=>{r.r(t),r.d(t,{servers:()=>S,isSwagger2:()=>I});var o=r(8639),i=r(9725),s=r(7779);const u=P=>P||(0,i.Map)(),f=(0,o.createSelector)(u,P=>P.get("json",(0,i.Map)())),m=(0,o.createSelector)(u,P=>P.get("resolved",(0,i.Map)())),S=(T=(0,o.createSelector)(P=>{let O=m(P);return O.count()<1&&(O=f(P)),O},P=>P.getIn(["servers"])||(0,i.Map)()),()=>function(P){const O=P.getSystem().specSelectors.specJson();if((0,s.isOAS3)(O)){for(var M=arguments.length,d=new Array(M>1?M-1:0),D=1;D()=>{const M=O.getSystem().specSelectors.specJson();return(0,s.isSwagger2)(M)}},2044:(e,t,r)=>{r.r(t),r.d(t,{definitions:()=>O,hasHost:()=>M,securityDefinitions:()=>d,host:()=>D,basePath:()=>L,consumes:()=>G,produces:()=>Z,schemes:()=>we,servers:()=>xe,isOAS3:()=>Ae,isSwagger2:()=>Se});var o=r(8639),i=r(3881),s=r(9725),u=r(7779);function f(qe){return(Ue,ut)=>function(){const Ze=ut.getSystem().specSelectors.specJson();return(0,u.isOAS3)(Ze)?qe(...arguments):Ue(...arguments)}}const m=qe=>qe||(0,s.Map)(),S=f((0,o.createSelector)(()=>null)),T=(0,o.createSelector)(m,qe=>qe.get("json",(0,s.Map)())),I=(0,o.createSelector)(m,qe=>qe.get("resolved",(0,s.Map)())),P=qe=>{let Ue=I(qe);return Ue.count()<1&&(Ue=T(qe)),Ue},O=f((0,o.createSelector)(P,qe=>{const Ue=qe.getIn(["components","schemas"]);return s.Map.isMap(Ue)?Ue:(0,s.Map)()})),M=f(qe=>P(qe).hasIn(["servers",0])),d=f((0,o.createSelector)(i.specJsonWithResolvedSubtrees,qe=>qe.getIn(["components","securitySchemes"])||null)),D=S,L=S,G=S,Z=S,we=S,xe=f((0,o.createSelector)(P,qe=>qe.getIn(["servers"])||(0,s.Map)())),Ae=(qe,Ue)=>()=>{const ut=Ue.getSystem().specSelectors.specJson();return(0,u.isOAS3)(s.Map.isMap(ut)?ut:(0,s.Map)())},Se=(qe,Ue)=>()=>{const ut=Ue.getSystem().specSelectors.specJson();return(0,u.isSwagger2)(s.Map.isMap(ut)?ut:(0,s.Map)())}},356:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var o=r(810);const i=(0,r(7779).OAS3ComponentWrapFactory)(s=>{let{Ori:u,...f}=s;const{schema:m,getComponent:S,errSelectors:T,authorized:I,onAuthChange:P,name:O}=f,M=S("HttpAuth");return"http"===m.get("type")?o.default.createElement(M,{key:O,schema:m,name:O,errSelectors:T,authorized:I,getComponent:S,onChange:P}):o.default.createElement(u,f)})},7761:(e,t,r)=>{r.r(t),r.d(t,{default:()=>S});var o=r(2460),i=r(356),s=r(9487),u=r(58),f=r(3499),m=r(287);const S={Markdown:o.default,AuthItem:i.default,JsonSchema_string:m.default,VersionStamp:s.default,model:f.default,onlineValidatorBadge:u.default}},287:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var o=r(810);const i=(0,r(7779).OAS3ComponentWrapFactory)(s=>{let{Ori:u,...f}=s;const{schema:m,getComponent:S,errors:T,onChange:I}=f,P=m&&m.get?m.get("format"):null,O=m&&m.get?m.get("type"):null,M=S("Input");return O&&"string"===O&&P&&("binary"===P||"base64"===P)?o.default.createElement(M,{type:"file",className:T.length?"invalid":"",title:T.length?T:"",onChange:d=>{I(d.target.files[0])},disabled:u.isDisabled}):o.default.createElement(u,f)})},2460:(e,t,r)=>{r.r(t),r.d(t,{Markdown:()=>T,default:()=>I});var o=r(5942),i=r(810),s=(r(5053),r(8096)),u=r(3952),f=r(7779),m=r(5466);const S=new u.Remarkable("commonmark");S.block.ruler.enable(["table"]),S.set({linkTarget:"_blank"});const T=P=>{let{source:O,className:M="",getConfigs:d}=P;if("string"!=typeof O)return null;if(O){const{useUnsafeMarkdown:D}=d(),L=S.render(O),G=(0,m.s)(L,{useUnsafeMarkdown:D});let Z;return"string"==typeof G&&(Z=(0,o.default)(G).call(G)),i.default.createElement("div",{dangerouslySetInnerHTML:{__html:Z},className:(0,s.default)(M,"renderedMarkdown")})}return null};T.defaultProps={getConfigs:()=>({useUnsafeMarkdown:!1})};const I=(0,f.OAS3ComponentWrapFactory)(T)},3499:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(863),i=r(810),s=(r(5053),r(7779)),u=r(1543);const m=(0,s.OAS3ComponentWrapFactory)(class f extends i.Component{render(){let{getConfigs:T,schema:I}=this.props,P=["model-box"],O=null;return!0===I.get("deprecated")&&(P.push("deprecated"),O=i.default.createElement("span",{className:"model-deprecated-warning"},"Deprecated:")),i.default.createElement("div",{className:P.join(" ")},O,i.default.createElement(u.Z,(0,o.default)({},this.props,{getConfigs:T,depth:1,expandDepth:this.props.expandDepth||0})))}})},58:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var o=r(7779),i=r(5623);const s=(0,o.OAS3ComponentWrapFactory)(i.Z)},9487:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var o=r(810);const i=(0,r(7779).OAS3ComponentWrapFactory)(s=>{const{Ori:u}=s;return o.default.createElement("span",null,o.default.createElement(u,s),o.default.createElement("small",{className:"version-stamp"},o.default.createElement("pre",{className:"version"},"OAS3")))})},8560:(e,t,r)=>{r.r(t),r.d(t,{default:()=>s});var o=r(6235);let i=!1;function s(){return{statePlugins:{spec:{wrapActions:{updateSpec:u=>function(){return i=!0,u(...arguments)},updateJsonSpec:(u,f)=>function(){const m=f.getConfigs().onComplete;return i&&"function"==typeof m&&((0,o.default)(m,0),i=!1),u(...arguments)}}}}}}},4624:(e,t,r)=>{r.r(t),r.d(t,{requestSnippetGenerator_curl_bash:()=>Z,requestSnippetGenerator_curl_cmd:()=>we,requestSnippetGenerator_curl_powershell:()=>G});var o=r(8818),i=r(5942),s=r(313),u=r(2565);const f=(r.d(Ae={},{default:()=>fn()}),Ae);var Ae,m=r(2954),S=r(2372),T=r(7504),I=r(9725);const P=xe=>{var Ae;return(0,o.default)(xe).call(xe,"_**[]")<0?xe:(0,i.default)(Ae=xe.split("_**[]")[0]).call(Ae)},O=xe=>"-d "===xe||/^[_\/-]/g.test(xe)?xe:"'"+xe.replace(/'/g,"'\\''")+"'",M=xe=>"-d "===(xe=xe.replace(/\^/g,"^^").replace(/\\"/g,'\\\\"').replace(/"/g,'""').replace(/\n/g,"^\n"))?xe.replace(/-d /g,"-d ^\n"):/^[_\/-]/g.test(xe)?xe:'"'+xe+'"',d=xe=>"-d "===xe?xe:/\n/.test(xe)?'@"\n'+xe.replace(/"/g,'\\"').replace(/`/g,"``").replace(/\$/,"`$")+'\n"@':/^[_\/-]/g.test(xe)?xe:"'"+xe.replace(/"/g,'""').replace(/'/g,"''")+"'",L=function(xe,Ae,Se){let qe=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",Ue=!1,ut="";const Ze=function(){for(var Pe=arguments.length,it=new Array(Pe),Ke=0;Keut+=` ${Se}`,Ht=function(){let it=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return ut+=(0,f.default)(" ").call(" ",it)};let gr=xe.get("headers");if(ut+="curl"+qe,xe.has("curlOptions")&&Ze(...xe.get("curlOptions")),Ze("-X",xe.get("method")),Ot(),Ht(),wt(`${xe.get("url")}`),gr&&gr.size)for(let Pe of(0,m.default)(lt=xe.get("headers")).call(lt)){var lt;Ot(),Ht();let[it,Ke]=Pe;wt("-H",`${it}: ${Ke}`),Ue=Ue||/^content-type$/i.test(it)&&/^multipart\/form-data$/i.test(Ke)}const Xe=xe.get("body");var Oe;if(Xe)if(Ue&&(0,S.default)(Oe=["POST","PUT","PATCH"]).call(Oe,xe.get("method")))for(let[Pe,it]of Xe.entrySeq()){let Ke=P(Pe);Ot(),Ht(),wt("-F"),Ze(it instanceof T.Z.File?`${Ke}=@${it.name}${it.type?`;type=${it.type}`:""}`:`${Ke}=${it}`)}else if(Xe instanceof T.Z.File)Ot(),Ht(),wt(`--data-binary '@${Xe.name}'`);else{Ot(),Ht(),wt("-d ");let Pe=Xe;I.Map.isMap(Pe)?wt(function D(xe){let Ae=[];for(let[Se,qe]of xe.get("body").entrySeq()){let Ue=P(Se);Ae.push(qe instanceof T.Z.File?` "${Ue}": {\n "name": "${qe.name}"${qe.type?`,\n "type": "${qe.type}"`:""}\n }`:` "${Ue}": ${(0,s.default)(qe,null,2).replace(/(\r\n|\r|\n)/g,"\n ")}`)}return`{\n${Ae.join(",\n")}\n}`}(xe)):("string"!=typeof Pe&&(Pe=(0,s.default)(Pe)),wt(Pe))}else Xe||"POST"!==xe.get("method")||(Ot(),Ht(),wt("-d ''"));return ut},G=xe=>L(xe,d,"`\n",".exe"),Z=xe=>L(xe,O,"\\\n"),we=xe=>L(xe,M,"^\n")},6575:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var o=r(4624),i=r(4669),s=r(4206);const u=()=>({components:{RequestSnippets:s.default},fn:o,statePlugins:{requestSnippets:{selectors:i}}})},4206:(e,t,r)=>{r.r(t),r.d(t,{default:()=>M});var o=r(6145),i=r(8898),s=r(29),u=r(2565),f=r(810),m=(r(5053),r(9908)),S=r(7068),T=r(9874),I=r(471);const P={cursor:"pointer",lineHeight:1,display:"inline-flex",backgroundColor:"rgb(250, 250, 250)",paddingBottom:"0",paddingTop:"0",border:"1px solid rgb(51, 51, 51)",borderRadius:"4px 4px 0 0",boxShadow:"none",borderBottom:"none"},O={cursor:"pointer",lineHeight:1,display:"inline-flex",backgroundColor:"rgb(51, 51, 51)",boxShadow:"none",border:"1px solid rgb(51, 51, 51)",paddingBottom:"0",paddingTop:"0",borderRadius:"4px 4px 0 0",marginTop:"-5px",marginRight:"-5px",marginLeft:"-5px",zIndex:"9999",borderBottom:"none"},M=d=>{var D,L;let{request:G,requestSnippetsSelectors:Z,getConfigs:we}=d;const xe=(0,S.default)(we)?we():null,Ae=!1!==(0,m.default)(xe,"syntaxHighlight")&&(0,m.default)(xe,"syntaxHighlight.activated",!0),Se=(0,f.useRef)(null),[qe,Ue]=(0,f.useState)(null===(D=Z.getSnippetGenerators())||void 0===D?void 0:D.keySeq().first()),[ut,Ze]=(0,f.useState)(Z?.getDefaultExpanded());(0,f.useEffect)(()=>{},[]),(0,f.useEffect)(()=>{var Pe;const it=(0,o.default)(Pe=(0,i.default)(Se.current.childNodes)).call(Pe,Ke=>{var Lt;return!!Ke.nodeType&&(null===(Lt=Ke.classList)||void 0===Lt?void 0:Lt.contains("curl-command"))});return(0,s.default)(it).call(it,Ke=>Ke.addEventListener("mousewheel",Xe,{passive:!1})),()=>{(0,s.default)(it).call(it,Ke=>Ke.removeEventListener("mousewheel",Xe))}},[G]);const wt=Z.getSnippetGenerators(),Ot=wt.get(qe),Ht=Ot.get("fn")(G),gr=()=>{Ze(!ut)},lt=Pe=>Pe===qe?O:P,Xe=Pe=>{const{target:it,deltaY:Ke}=Pe,{scrollHeight:Lt,offsetHeight:sr,scrollTop:yr}=it;Lt>sr&&(0===yr&&Ke<0||sr+yr>=Lt&&Ke>0)&&Pe.preventDefault()},Oe=Ae?f.default.createElement(I.d3,{language:Ot.get("syntax"),className:"curl microlight",style:(0,I.C2)((0,m.default)(xe,"syntaxHighlight.theme"))},Ht):f.default.createElement("textarea",{readOnly:!0,className:"curl",value:Ht});return f.default.createElement("div",{className:"request-snippets",ref:Se},f.default.createElement("div",{style:{width:"100%",display:"flex",justifyContent:"flex-start",alignItems:"center",marginBottom:"15px"}},f.default.createElement("h4",{onClick:()=>gr(),style:{cursor:"pointer"}},"Snippets"),f.default.createElement("button",{onClick:()=>gr(),style:{border:"none",background:"none"},title:ut?"Collapse operation":"Expand operation"},f.default.createElement("svg",{className:"arrow",width:"10",height:"10"},f.default.createElement("use",{href:ut?"#large-arrow-down":"#large-arrow",xlinkHref:ut?"#large-arrow-down":"#large-arrow"})))),ut&&f.default.createElement("div",{className:"curl-command"},f.default.createElement("div",{style:{paddingLeft:"15px",paddingRight:"10px",width:"100%",display:"flex"}},(0,u.default)(L=wt.entrySeq()).call(L,Pe=>{let[it,Ke]=Pe;return f.default.createElement("div",{style:lt(it),className:"btn",key:it,onClick:()=>{var Lt;qe!==(Lt=it)&&Ue(Lt)}},f.default.createElement("h4",{style:it===qe?{color:"white"}:{}},Ke.get("title")))})),f.default.createElement("div",{className:"copy-to-clipboard"},f.default.createElement(T.CopyToClipboard,{text:Ht},f.default.createElement("button",null))),f.default.createElement("div",null,Oe)))}},4669:(e,t,r)=>{r.r(t),r.d(t,{getGenerators:()=>S,getSnippetGenerators:()=>T,getActiveLanguage:()=>I,getDefaultExpanded:()=>P});var o=r(6145),i=r(2372),s=r(2565),u=r(8639),f=r(9725);const m=O=>O||(0,f.Map)(),S=(0,u.createSelector)(m,O=>{const M=O.get("languages"),d=O.get("generators",(0,f.Map)());return!M||M.isEmpty()?d:(0,o.default)(d).call(d,(D,L)=>(0,i.default)(M).call(M,L))}),T=O=>M=>{var d,D;let{fn:L}=M;return(0,o.default)(d=(0,s.default)(D=S(O)).call(D,(G,Z)=>{const we=L[`requestSnippetGenerator_${Z}`];return"function"!=typeof we?null:G.set("fn",we)})).call(d,G=>G)},I=(0,u.createSelector)(m,O=>O.get("activeLanguage")),P=(0,u.createSelector)(m,O=>O.get("defaultExpanded"))},6195:(e,t,r)=>{r.r(t),r.d(t,{ErrorBoundary:()=>u,default:()=>f}),r(5053);var o=r(810),i=r(6189),s=r(9403);class u extends o.Component{static getDerivedStateFromError(S){return{hasError:!0,error:S}}constructor(){super(...arguments),this.state={hasError:!1,error:null}}componentDidCatch(S,T){this.props.fn.componentDidCatch(S,T)}render(){const{getComponent:S,targetName:T,children:I}=this.props;if(this.state.hasError){const P=S("Fallback");return o.default.createElement(P,{name:T})}return I}}u.defaultProps={targetName:"this component",getComponent:()=>s.default,fn:{componentDidCatch:i.componentDidCatch},children:null};const f=u},9403:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var o=r(810);r(5053);const i=s=>{let{name:u}=s;return o.default.createElement("div",{className:"fallback"},"\u{1f631} ",o.default.createElement("i",null,"Could not render ","t"===u?"this component":u,", see the console."))}},6189:(e,t,r)=>{r.r(t),r.d(t,{componentDidCatch:()=>s,withErrorBoundary:()=>u});var o=r(863),i=r(810);const s=console.error,u=f=>m=>{const{getComponent:S,fn:T}=f(),I=S("ErrorBoundary"),P=T.getDisplayName(m);class O extends i.Component{render(){return i.default.createElement(I,{targetName:P,getComponent:S,fn:T},i.default.createElement(m,(0,o.default)({},this.props,this.context)))}}var M;return O.displayName=`WithErrorBoundary(${P})`,(M=m).prototype&&M.prototype.isReactComponent&&(O.prototype.mapStateToProps=m.prototype.mapStateToProps),O}},8102:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});const o=(r.d(T={},{default:()=>ro()}),T),i=(S=>{var T={};return r.d(T,S),T})({default:()=>_r()});var T,s=r(6195),u=r(9403),f=r(6189);const m=function(){let{componentList:S=[],fullOverride:T=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return I=>{var P;let{getSystem:O}=I;const M=T?S:["App","BaseLayout","VersionPragmaFilter","InfoContainer","ServersContainer","SchemesContainer","AuthorizeBtnContainer","FilterContainer","Operations","OperationContainer","parameters","responses","OperationServers","Models","ModelWrapper",...S],d=(0,i.default)(M,(0,o.default)(P=Array(M.length)).call(P,(D,L)=>{let{fn:G}=L;return G.withErrorBoundary(D)}));return{fn:{componentDidCatch:f.componentDidCatch,withErrorBoundary:(0,f.withErrorBoundary)(O)},components:{ErrorBoundary:s.default,Fallback:u.default},wrapComponents:d}}}},2473:(e,t,r)=>{r.r(t),r.d(t,{createXMLExample:()=>Ot,inferSchema:()=>wt,memoizedCreateXMLExample:()=>lt,memoizedSampleFromSchema:()=>Xe,sampleFromSchema:()=>Ht,sampleFromSchemaGeneric:()=>Ze});var o=r(8818),i=r(29),s=r(4163),u=r(2372),f=r(9963),m=r(8136),S=r(1778),T=r(5171),I=r(2565),P=r(313),O=r(3479),M=r.n(O);const d=(r.d(Pe={},{default:()=>Vt()}),Pe),D=(Oe=>{var Pe={};return r.d(Pe,Oe),Pe})({default:()=>si()});var Pe,L=r(6298),G=r(9669);const Z={string:Oe=>Oe.pattern?(Pe=>{try{return new d.default(Pe).gen()}catch{return"string"}})(Oe.pattern):"string",string_email:()=>"user@example.com","string_date-time":()=>(new Date).toISOString(),string_date:()=>(new Date).toISOString().substring(0,10),string_uuid:()=>"3fa85f64-5717-4562-b3fc-2c963f66afa6",string_hostname:()=>"example.com",string_ipv4:()=>"198.51.100.42",string_ipv6:()=>"2001:0db8:5b96:0000:0000:426f:8e17:642a",number:()=>0,number_float:()=>0,integer:()=>0,boolean:Oe=>"boolean"!=typeof Oe.default||Oe.default},we=Oe=>{Oe=(0,L.mz)(Oe);let{type:Pe,format:it}=Oe,Ke=Z[`${Pe}_${it}`]||Z[Pe];return(0,L.Wl)(Ke)?Ke(Oe):"Unknown Type: "+Oe.type},Ae=["maxProperties","minProperties"],Se=["minItems","maxItems"],qe=["minimum","maximum","exclusiveMinimum","exclusiveMaximum"],Ue=["minLength","maxLength"],ut=function(Oe,Pe){var it;let Ke=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};var sr;if((0,i.default)(it=["example","default","enum","xml","type",...Ae,...Se,...qe,...Ue]).call(it,pt=>(pt=>{void 0===Pe[pt]&&void 0!==Oe[pt]&&(Pe[pt]=Oe[pt])})(pt)),void 0!==Oe.required&&(0,s.default)(Oe.required)&&(void 0!==Pe.required&&Pe.required.length||(Pe.required=[]),(0,i.default)(sr=Oe.required).call(sr,pt=>{var Me;(0,u.default)(Me=Pe.required).call(Me,pt)||Pe.required.push(pt)})),Oe.properties){Pe.properties||(Pe.properties={});let pt=(0,L.mz)(Oe.properties);for(let Me in pt){var yr;Object.prototype.hasOwnProperty.call(pt,Me)&&(!pt[Me]||!pt[Me].deprecated)&&(!pt[Me]||!pt[Me].readOnly||Ke.includeReadOnly)&&(!pt[Me]||!pt[Me].writeOnly||Ke.includeWriteOnly)&&(Pe.properties[Me]||(Pe.properties[Me]=pt[Me],!Oe.required&&(0,s.default)(Oe.required)&&-1!==(0,o.default)(yr=Oe.required).call(yr,Me)&&(Pe.required?Pe.required.push(Me):Pe.required=[Me])))}}return Oe.items&&(Pe.items||(Pe.items={}),Pe.items=ut(Oe.items,Pe.items,Ke)),Pe},Ze=function(Oe){let Pe=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},it=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,Ke=arguments.length>3&&void 0!==arguments[3]&&arguments[3];Oe&&(0,L.Wl)(Oe.toJS)&&(Oe=Oe.toJS());let Lt=void 0!==it||Oe&&void 0!==Oe.example||Oe&&void 0!==Oe.default;const sr=!Lt&&Oe&&Oe.oneOf&&Oe.oneOf.length>0;if(!Lt&&(sr||!Lt&&Oe&&Oe.anyOf&&Oe.anyOf.length>0)){const ir=(0,L.mz)(sr?Oe.oneOf[0]:Oe.anyOf[0]);if(ut(ir,Oe,Pe),!Oe.xml&&ir.xml&&(Oe.xml=ir.xml),void 0!==Oe.example&&void 0!==ir.example)Lt=!0;else if(ir.properties){Oe.properties||(Oe.properties={});let At=(0,L.mz)(ir.properties);for(let pr in At){var pt;Object.prototype.hasOwnProperty.call(At,pr)&&(!At[pr]||!At[pr].deprecated)&&(!At[pr]||!At[pr].readOnly||Pe.includeReadOnly)&&(!At[pr]||!At[pr].writeOnly||Pe.includeWriteOnly)&&(Oe.properties[pr]||(Oe.properties[pr]=At[pr],!ir.required&&(0,s.default)(ir.required)&&-1!==(0,o.default)(pt=ir.required).call(pt,pr)&&(Oe.required?Oe.required.push(pr):Oe.required=[pr])))}}}const Me={};let{xml:Ne,type:Dt,example:xr,properties:St,additionalProperties:an,items:Tr}=Oe||{},{includeReadOnly:Tn,includeWriteOnly:zn}=Pe;Ne=Ne||{};let Wn,{name:so,prefix:Hn,namespace:$}=Ne,Q={};Ke&&(so=so||"notagname",Wn=(Hn?Hn+":":"")+so,$)&&(Me[Hn?"xmlns:"+Hn:"xmlns"]=$),Ke&&(Q[Wn]=[]);const me=ir=>(0,f.default)(ir).call(ir,At=>Object.prototype.hasOwnProperty.call(Oe,At));Oe&&!Dt&&(St||an||me(Ae)?Dt="object":Tr||me(Se)?Dt="array":me(qe)?(Dt="number",Oe.type="number"):Lt||Oe.enum||(Dt="string",Oe.type="string"));const ze=ir=>{var At,pr,mn,ho,Bo;if(null!==(null===(At=Oe)||void 0===At?void 0:At.maxItems)&&void 0!==(null===(pr=Oe)||void 0===pr?void 0:pr.maxItems)&&(ir=(0,m.default)(ir).call(ir,0,null===(Bo=Oe)||void 0===Bo?void 0:Bo.maxItems)),null!==(null===(mn=Oe)||void 0===mn?void 0:mn.minItems)&&void 0!==(null===(ho=Oe)||void 0===ho?void 0:ho.minItems)){let Et=0;for(;ir.length<(null===(Zo=Oe)||void 0===Zo?void 0:Zo.minItems);){var Zo;ir.push(ir[Et++%ir.length])}}return ir},Ye=(0,L.mz)(St);let ht,Mt=0;const xn=()=>Oe&&null!=Oe.maxProperties&&Mt>=Oe.maxProperties,Qn=ir=>!Oe||null==Oe.maxProperties||!xn()&&(!(ir=>{var At;return!(Oe&&Oe.required&&Oe.required.length&&(0,u.default)(At=Oe.required).call(At,ir))})(ir)||Oe.maxProperties-Mt-(()=>{if(!Oe||!Oe.required)return 0;let ir=0;var At,pr;return Ke?(0,i.default)(At=Oe.required).call(At,mn=>ir+=void 0===Q[mn]?0:1):(0,i.default)(pr=Oe.required).call(pr,mn=>{var ho;return ir+=void 0===(null===(ho=Q[Wn])||void 0===ho?void 0:(0,S.default)(ho).call(ho,Bo=>void 0!==Bo[mn]))?0:1}),Oe.required.length-ir})()>0);if(ht=Ke?function(ir){let At=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Oe&&Ye[ir]){if(Ye[ir].xml=Ye[ir].xml||{},Ye[ir].xml.attribute){const ho=(0,s.default)(Ye[ir].enum)?Ye[ir].enum[0]:void 0,Bo=Ye[ir].example,Zo=Ye[ir].default;return void(Me[Ye[ir].xml.name||ir]=void 0!==Bo?Bo:void 0!==Zo?Zo:void 0!==ho?ho:we(Ye[ir]))}Ye[ir].xml.name=Ye[ir].xml.name||ir}else Ye[ir]||!1===an||(Ye[ir]={xml:{name:ir}});let pr=Ze(Oe&&Ye[ir]||void 0,Pe,At,Ke);var mn;Qn(ir)&&(Mt++,(0,s.default)(pr)?Q[Wn]=(0,T.default)(mn=Q[Wn]).call(mn,pr):Q[Wn].push(pr))}:(ir,At)=>{if(Qn(ir)){if(Object.prototype.hasOwnProperty.call(Oe,"discriminator")&&Oe.discriminator&&Object.prototype.hasOwnProperty.call(Oe.discriminator,"mapping")&&Oe.discriminator.mapping&&Object.prototype.hasOwnProperty.call(Oe,"$$ref")&&Oe.$$ref&&Oe.discriminator.propertyName===ir){for(let pr in Oe.discriminator.mapping)if(-1!==Oe.$$ref.search(Oe.discriminator.mapping[pr])){Q[ir]=pr;break}}else Q[ir]=Ze(Ye[ir],Pe,At,Ke);Mt++}},Lt){let ir;if(ir=(Oe=>(0,L.XV)(Oe,"$$ref",Pe=>"string"==typeof Pe&&(0,o.default)(Pe).call(Pe,"#")>-1))(void 0!==it?it:void 0!==xr?xr:Oe.default),!Ke){if("number"==typeof ir&&"string"===Dt)return`${ir}`;if("string"!=typeof ir||"string"===Dt)return ir;try{return JSON.parse(ir)}catch{return ir}}if(Oe||(Dt=(0,s.default)(ir)?"array":typeof ir),"array"===Dt){if(!(0,s.default)(ir)){if("string"==typeof ir)return ir;ir=[ir]}const At=Oe?Oe.items:void 0;At&&(At.xml=At.xml||Ne||{},At.xml.name=At.xml.name||Ne.name);let pr=(0,I.default)(ir).call(ir,mn=>Ze(At,Pe,mn,Ke));return pr=ze(pr),Ne.wrapped?(Q[Wn]=pr,(0,D.default)(Me)||Q[Wn].push({_attr:Me})):Q=pr,Q}if("object"===Dt){if("string"==typeof ir)return ir;for(let At in ir)Object.prototype.hasOwnProperty.call(ir,At)&&(Oe&&Ye[At]&&Ye[At].readOnly&&!Tn||Oe&&Ye[At]&&Ye[At].writeOnly&&!zn||(Oe&&Ye[At]&&Ye[At].xml&&Ye[At].xml.attribute?Me[Ye[At].xml.name||At]=ir[At]:ht(At,ir[At])));return(0,D.default)(Me)||Q[Wn].push({_attr:Me}),Q}return Q[Wn]=(0,D.default)(Me)?ir:[{_attr:Me},ir],Q}if("object"===Dt){for(let ir in Ye)Object.prototype.hasOwnProperty.call(Ye,ir)&&(Ye[ir]&&Ye[ir].deprecated||Ye[ir]&&Ye[ir].readOnly&&!Tn||Ye[ir]&&Ye[ir].writeOnly&&!zn||ht(ir));if(Ke&&Me&&Q[Wn].push({_attr:Me}),xn())return Q;if(!0===an)Ke?Q[Wn].push({additionalProp:"Anything can be here"}):Q.additionalProp1={},Mt++;else if(an){const ir=(0,L.mz)(an),At=Ze(ir,Pe,void 0,Ke);if(Ke&&ir.xml&&ir.xml.name&&"notagname"!==ir.xml.name)Q[Wn].push(At);else{const pr=null!=Oe.minProperties&&MtZe(ut(Tr,At,Pe),Pe,void 0,Ke));else if((0,s.default)(Tr.oneOf)){var bs;ir=(0,I.default)(bs=Tr.oneOf).call(bs,At=>Ze(ut(Tr,At,Pe),Pe,void 0,Ke))}else{if(!(!Ke||Ke&&Ne.wrapped))return Ze(Tr,Pe,void 0,Ke);ir=[Ze(Tr,Pe,void 0,Ke)]}return ir=ze(ir),Ke&&Ne.wrapped?(Q[Wn]=ir,(0,D.default)(Me)||Q[Wn].push({_attr:Me}),Q):ir}let Li;if(Oe&&(0,s.default)(Oe.enum))Li=(0,L.AF)(Oe.enum)[0];else{if(!Oe)return;if(Li=we(Oe),"number"==typeof Li){let ir=Oe.minimum;null!=ir&&(Oe.exclusiveMinimum&&ir++,Li=ir);let At=Oe.maximum;null!=At&&(Oe.exclusiveMaximum&&At--,Li=At)}if("string"==typeof Li&&(null!=Oe.maxLength&&(Li=(0,m.default)(Li).call(Li,0,Oe.maxLength)),null!=Oe.minLength)){let ir=0;for(;Li.length(Oe.schema&&(Oe=Oe.schema),Oe.properties&&(Oe.type="object"),Oe),Ot=(Oe,Pe,it)=>{const Ke=Ze(Oe,Pe,it,!0);if(Ke)return"string"==typeof Ke?Ke:M()(Ke,{declaration:!0,indent:"\t"})},Ht=(Oe,Pe,it)=>Ze(Oe,Pe,it,!1),gr=(Oe,Pe,it)=>[Oe,(0,P.default)(Pe),(0,P.default)(it)],lt=(0,G.Z)(Ot,gr),Xe=(0,G.Z)(Ht,gr)},8883:(e,t,r)=>{r.r(t),r.d(t,{default:()=>i});var o=r(2473);function i(){return{fn:o}}},5179:(e,t,r)=>{r.r(t),r.d(t,{CLEAR_REQUEST:()=>it,CLEAR_RESPONSE:()=>Pe,CLEAR_VALIDATE_PARAMS:()=>Ke,LOG_REQUEST:()=>Oe,SET_MUTATED_REQUEST:()=>Xe,SET_REQUEST:()=>lt,SET_RESPONSE:()=>gr,SET_SCHEME:()=>pt,UPDATE_EMPTY_PARAM_INCLUSION:()=>Ot,UPDATE_JSON:()=>Ze,UPDATE_OPERATION_META_VALUE:()=>Lt,UPDATE_PARAM:()=>wt,UPDATE_RESOLVED:()=>sr,UPDATE_RESOLVED_SUBTREE:()=>yr,UPDATE_SPEC:()=>Ue,UPDATE_URL:()=>ut,VALIDATE_PARAMS:()=>Ht,changeConsumesValue:()=>ht,changeParam:()=>so,changeParamByIdentity:()=>Hn,changeProducesValue:()=>Mt,clearRequest:()=>Li,clearResponse:()=>bs,clearValidateParams:()=>Ye,execute:()=>Ya,executeRequest:()=>Ko,invalidateResolvedSubtreeCache:()=>Q,logRequest:()=>Qn,parseToJson:()=>St,requestResolvedSubtree:()=>Wn,resolveSpec:()=>Tr,setMutatedRequest:()=>xo,setRequest:()=>Bn,setResponse:()=>xn,setScheme:()=>ir,updateEmptyParamInclusion:()=>ze,updateJsonSpec:()=>xr,updateResolved:()=>Ne,updateResolvedSubtree:()=>$,updateSpec:()=>Me,updateUrl:()=>Dt,validateParams:()=>me});var o=r(4163),i=r(2565),s=r(6718),u=r.n(s),f=r(6785),m=r(7930);const S=(r.d(pr={},{default:()=>go()}),pr);var pr,T=r(6145),I=r(374),P=r(8818),O=r(29),M=r(2740),d=r(7512);const D=(At=>{var pr={};return r.d(pr,At),pr})({default:()=>ti()});var L=r(626),G=r(9725),Z=r(8900),we=r(8518);const xe=(At=>{var pr={};return r.d(pr,At),pr})({default:()=>ma()}),Ae=(At=>{var pr={};return r.d(pr,At),pr})({default:()=>Ba()}),Se=(At=>{var pr={};return r.d(pr,At),pr})({default:()=>ua()});var qe=r(6298);const Ue="spec_update_spec",ut="spec_update_url",Ze="spec_update_json",wt="spec_update_param",Ot="spec_update_empty_param_inclusion",Ht="spec_validate_param",gr="spec_set_response",lt="spec_set_request",Xe="spec_set_mutated_request",Oe="spec_log_request",Pe="spec_clear_response",it="spec_clear_request",Ke="spec_clear_validate_param",Lt="spec_update_operation_meta_value",sr="spec_update_resolved",yr="spec_update_resolved_subtree",pt="set_scheme";function Me(At){const pr=(mn=At,(0,xe.default)(mn)?mn:"").replace(/\t/g," ");var mn;if("string"==typeof At)return{type:Ue,payload:pr}}function Ne(At){return{type:sr,payload:At}}function Dt(At){return{type:ut,payload:At}}function xr(At){return{type:Ze,payload:At}}const St=At=>pr=>{let{specActions:mn,specSelectors:ho,errActions:Bo}=pr,{specStr:Zo}=ho,Et=null;try{At=At||Zo(),Bo.clear({source:"parser"}),Et=L.default.load(At,{schema:L.JSON_SCHEMA})}catch(Qt){return console.error(Qt),Bo.newSpecErr({source:"parser",level:"error",message:Qt.reason,line:Qt.mark&&Qt.mark.line?Qt.mark.line+1:void 0})}return Et&&"object"==typeof Et?mn.updateJsonSpec(Et):{}};let an=!1;const Tr=(At,pr)=>mn=>{let{specActions:ho,specSelectors:Bo,errActions:Zo,fn:{fetch:Et,resolve:Qt,AST:hr={}},getConfigs:Br}=mn;an||(console.warn("specActions.resolveSpec is deprecated since v3.10.0 and will be removed in v4.0.0; use requestResolvedSubtree instead!"),an=!0);const{modelPropertyMacro:bn,parameterMacro:Sn,requestInterceptor:In,responseInterceptor:vi}=Br();void 0===At&&(At=Bo.specJson()),void 0===pr&&(pr=Bo.url());let $e=hr.getLineNumberForPath?hr.getLineNumberForPath:()=>{},tr=Bo.specStr();return Qt({fetch:Et,spec:At,baseDoc:pr,modelPropertyMacro:bn,parameterMacro:Sn,requestInterceptor:In,responseInterceptor:vi}).then(ln=>{let{spec:Ur,errors:tn}=ln;if(Zo.clear({type:"thrown"}),(0,o.default)(tn)&&tn.length>0){let Rr=(0,i.default)(tn).call(tn,wo=>(console.error(wo),wo.line=wo.fullPath?$e(tr,wo.fullPath):null,wo.path=wo.fullPath?wo.fullPath.join("."):null,wo.level="error",wo.type="thrown",wo.source="resolver",u()(wo,"message",{enumerable:!0,value:wo.message}),wo));Zo.newThrownErrBatch(Rr)}return ho.updateResolved(Ur)})};let Tn=[];const zn=(0,Ae.default)((0,b.A)(function*(){const At=Tn.system;if(!At)return void console.error("debResolveSubtrees: don't have a system to operate on, aborting.");const{errActions:pr,errSelectors:mn,fn:{resolveSubtree:ho,fetch:Bo,AST:Zo={}},specSelectors:Et,specActions:Qt}=At;if(!ho)return void console.error("Error: Swagger-Client did not provide a `resolveSubtree` method, doing nothing.");let hr=Zo.getLineNumberForPath?Zo.getLineNumberForPath:()=>{};const Br=Et.specStr(),{modelPropertyMacro:bn,parameterMacro:Sn,requestInterceptor:In,responseInterceptor:vi}=At.getConfigs();try{var $e=yield(0,f.default)(Tn).call(Tn,function(){var tr=(0,b.A)(function*(ln,Ur){const{resultMap:tn,specWithCurrentSubtrees:Rr}=yield ln,{errors:wo,spec:_i}=yield ho(Rr,Ur,{baseDoc:Et.url(),modelPropertyMacro:bn,parameterMacro:Sn,requestInterceptor:In,responseInterceptor:vi});if(mn.allErrors().size&&pr.clearBy(Ro=>{var wi;return"thrown"!==Ro.get("type")||"resolver"!==Ro.get("source")||!(0,m.default)(wi=Ro.get("fullPath")).call(wi,(ou,js)=>ou===Ur[js]||void 0===Ur[js])}),(0,o.default)(wo)&&wo.length>0){let Ro=(0,i.default)(wo).call(wo,wi=>(wi.line=wi.fullPath?hr(Br,wi.fullPath):null,wi.path=wi.fullPath?wi.fullPath.join("."):null,wi.level="error",wi.type="thrown",wi.source="resolver",u()(wi,"message",{enumerable:!0,value:wi.message}),wi));pr.newThrownErrBatch(Ro)}var ea,Io;return _i&&Et.isOAS3()&&"components"===Ur[0]&&"securitySchemes"===Ur[1]&&(yield S.default.all((0,i.default)(ea=(0,T.default)(Io=(0,I.default)(_i)).call(Io,Ro=>"openIdConnect"===Ro.type)).call(ea,function(){var Ro=(0,b.A)(function*(wi){const ou={url:wi.openIdConnectUrl,requestInterceptor:In,responseInterceptor:vi};try{const js=yield Bo(ou);js instanceof Error||js.status>=400?console.error(js.statusText+" "+ou.url):wi.openIdConnectData=JSON.parse(js.text)}catch(js){console.error(js)}});return function(wi){return Ro.apply(this,arguments)}}()))),(0,Se.default)(tn,Ur,_i),(0,Se.default)(Rr,Ur,_i),{resultMap:tn,specWithCurrentSubtrees:Rr}});return function(ln,Ur){return tr.apply(this,arguments)}}(),S.default.resolve({resultMap:(Et.specResolvedSubtree([])||(0,G.Map)()).toJS(),specWithCurrentSubtrees:Et.specJson().toJS()}));delete Tn.system,Tn=[]}catch(tr){console.error(tr)}Qt.updateResolvedSubtree([],$e.resultMap)}),35),Wn=At=>pr=>{var mn;(0,P.default)(mn=(0,i.default)(Tn).call(Tn,ho=>ho.join("@@"))).call(mn,At.join("@@"))>-1||(Tn.push(At),Tn.system=pr,zn())};function so(At,pr,mn,ho,Bo){return{type:wt,payload:{path:At,value:ho,paramName:pr,paramIn:mn,isXml:Bo}}}function Hn(At,pr,mn,ho){return{type:wt,payload:{path:At,param:pr,value:mn,isXml:ho}}}const $=(At,pr)=>({type:yr,payload:{path:At,value:pr}}),Q=()=>({type:yr,payload:{path:[],value:(0,G.Map)()}}),me=(At,pr)=>({type:Ht,payload:{pathMethod:At,isOAS3:pr}}),ze=(At,pr,mn,ho)=>({type:Ot,payload:{pathMethod:At,paramName:pr,paramIn:mn,includeEmptyValue:ho}});function Ye(At){return{type:Ke,payload:{pathMethod:At}}}function ht(At,pr){return{type:Lt,payload:{path:At,value:pr,key:"consumes_value"}}}function Mt(At,pr){return{type:Lt,payload:{path:At,value:pr,key:"produces_value"}}}const xn=(At,pr,mn)=>({payload:{path:At,method:pr,res:mn},type:gr}),Bn=(At,pr,mn)=>({payload:{path:At,method:pr,req:mn},type:lt}),xo=(At,pr,mn)=>({payload:{path:At,method:pr,req:mn},type:Xe}),Qn=At=>({payload:At,type:Oe}),Ko=At=>pr=>{let{fn:mn,specActions:ho,specSelectors:Bo,getConfigs:Zo,oas3Selectors:Et}=pr,{pathName:Qt,method:hr,operation:Br}=At,{requestInterceptor:bn,responseInterceptor:Sn}=Zo(),In=Br.toJS();var vi,$e;if(Br&&Br.get("parameters")&&(0,O.default)(vi=(0,T.default)($e=Br.get("parameters")).call($e,tn=>tn&&!0===tn.get("allowEmptyValue"))).call(vi,tn=>{if(Bo.parameterInclusionSettingFor([Qt,hr],tn.get("name"),tn.get("in"))){At.parameters=At.parameters||{};const Rr=(0,qe.cz)(tn,At.parameters);(!Rr||Rr&&0===Rr.size)&&(At.parameters[tn.get("name")]="")}}),At.contextUrl=(0,Z.default)(Bo.url()).toString(),In&&In.operationId?At.operationId=In.operationId:In&&Qt&&hr&&(At.operationId=mn.opId(In,Qt,hr)),Bo.isOAS3()){const tn=`${Qt}:${hr}`;At.server=Et.selectedServer(tn)||Et.selectedServer();const Rr=Et.serverVariables({server:At.server,namespace:tn}).toJS(),wo=Et.serverVariables({server:At.server}).toJS();At.serverVariables=(0,M.default)(Rr).length?Rr:wo,At.requestContentType=Et.requestContentType(Qt,hr),At.responseContentType=Et.responseContentType(Qt,hr)||"*/*";const _i=Et.requestBodyValue(Qt,hr),ea=Et.requestBodyInclusionSetting(Qt,hr);var tr;At.requestBody=_i&&_i.toJS?(0,T.default)(tr=(0,i.default)(_i).call(_i,Io=>G.Map.isMap(Io)?Io.get("value"):Io)).call(tr,(Io,Ro)=>((0,o.default)(Io)?0!==Io.length:!(0,qe.O2)(Io))||ea.get(Ro)).toJS():_i}let ln=(0,d.default)({},At);ln=mn.buildRequest(ln),ho.setRequest(At.pathName,At.method,ln),At.requestInterceptor=function(){var tn=(0,b.A)(function*(Rr){let wo=yield bn.apply(void 0,[Rr]),_i=(0,d.default)({},wo);return ho.setMutatedRequest(At.pathName,At.method,_i),wo});return function(Rr){return tn.apply(this,arguments)}}(),At.responseInterceptor=Sn;const Ur=(0,D.default)();return mn.execute(At).then(tn=>{tn.duration=(0,D.default)()-Ur,ho.setResponse(At.pathName,At.method,tn)}).catch(tn=>{"Failed to fetch"===tn.message&&(tn.name="",tn.message='**Failed to fetch.** \n**Possible Reasons:** \n - CORS \n - Network Failure \n - URL scheme must be "http" or "https" for CORS request.'),ho.setResponse(At.pathName,At.method,{error:!0,err:(0,we.serializeError)(tn)})})},Ya=function(){let{path:At,method:pr,...mn}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ho=>{let{fn:{fetch:Bo},specSelectors:Zo,specActions:Et}=ho,Qt=Zo.specJsonWithResolvedSubtrees().toJS(),hr=Zo.operationScheme(At,pr),{requestContentType:Br,responseContentType:bn}=Zo.contentTypeValues([At,pr]).toJS(),Sn=/xml/i.test(Br),In=Zo.parameterValues([At,pr],Sn).toJS();return Et.executeRequest({...mn,fetch:Bo,spec:Qt,pathName:At,method:pr,parameters:In,requestContentType:Br,scheme:hr,responseContentType:bn})}};function bs(At,pr){return{type:Pe,payload:{path:At,method:pr}}}function Li(At,pr){return{type:it,payload:{path:At,method:pr}}}function ir(At,pr,mn){return{type:pt,payload:{scheme:At,path:pr,method:mn}}}},7038:(e,t,r)=>{r.r(t),r.d(t,{default:()=>f});var o=r(32),i=r(5179),s=r(3881),u=r(7508);function f(){return{statePlugins:{spec:{wrapActions:u,reducers:o.default,actions:i,selectors:s}}}}},32:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var o=r(6785),i=r(2565),s=r(7512),u=r(9725),f=r(6298),m=r(7504),S=r(3881),T=r(5179);const I={[T.UPDATE_SPEC]:(P,O)=>"string"==typeof O.payload?P.set("spec",O.payload):P,[T.UPDATE_URL]:(P,O)=>P.set("url",O.payload+""),[T.UPDATE_JSON]:(P,O)=>P.set("json",(0,f.oG)(O.payload)),[T.UPDATE_RESOLVED]:(P,O)=>P.setIn(["resolved"],(0,f.oG)(O.payload)),[T.UPDATE_RESOLVED_SUBTREE]:(P,O)=>{const{value:M,path:d}=O.payload;return P.setIn(["resolvedSubtrees",...d],(0,f.oG)(M))},[T.UPDATE_PARAM]:(P,O)=>{let{payload:M}=O,{path:d,paramName:D,paramIn:L,param:G,value:Z,isXml:we}=M,xe=G?(0,f.V9)(G):`${L}.${D}`;return P.setIn(["meta","paths",...d,"parameters",xe,we?"value_xml":"value"],Z)},[T.UPDATE_EMPTY_PARAM_INCLUSION]:(P,O)=>{let{payload:M}=O,{pathMethod:d,paramName:D,paramIn:L,includeEmptyValue:G}=M;return D&&L?P.setIn(["meta","paths",...d,"parameter_inclusions",`${L}.${D}`],G):(console.warn("Warning: UPDATE_EMPTY_PARAM_INCLUSION could not generate a paramKey."),P)},[T.VALIDATE_PARAMS]:(P,O)=>{let{payload:{pathMethod:M,isOAS3:d}}=O;const D=(0,S.specJsonWithResolvedSubtrees)(P).getIn(["paths",...M]),L=(0,S.parameterValues)(P,M).toJS();return P.updateIn(["meta","paths",...M,"parameters"],(0,u.fromJS)({}),G=>{var Z;return(0,o.default)(Z=D.get("parameters",(0,u.List)())).call(Z,(we,xe)=>{const Ae=(0,f.cz)(xe,L),Se=(0,S.parameterInclusionSettingFor)(P,M,xe.get("name"),xe.get("in")),qe=(0,f.Ik)(xe,Ae,{bypassRequiredCheck:Se,isOAS3:d});return we.setIn([(0,f.V9)(xe),"errors"],(0,u.fromJS)(qe))},G)})},[T.CLEAR_VALIDATE_PARAMS]:(P,O)=>{let{payload:{pathMethod:M}}=O;return P.updateIn(["meta","paths",...M,"parameters"],(0,u.fromJS)([]),d=>(0,i.default)(d).call(d,D=>D.set("errors",(0,u.fromJS)([]))))},[T.SET_RESPONSE]:(P,O)=>{let M,{payload:{res:d,path:D,method:L}}=O;M=d.error?(0,s.default)({error:!0,name:d.err.name,message:d.err.message,statusCode:d.err.statusCode},d.err.response):d,M.headers=M.headers||{};let G=P.setIn(["responses",D,L],(0,f.oG)(M));return m.Z.Blob&&d.data instanceof m.Z.Blob&&(G=G.setIn(["responses",D,L,"text"],d.data)),G},[T.SET_REQUEST]:(P,O)=>{let{payload:{req:M,path:d,method:D}}=O;return P.setIn(["requests",d,D],(0,f.oG)(M))},[T.SET_MUTATED_REQUEST]:(P,O)=>{let{payload:{req:M,path:d,method:D}}=O;return P.setIn(["mutatedRequests",d,D],(0,f.oG)(M))},[T.UPDATE_OPERATION_META_VALUE]:(P,O)=>{let{payload:{path:M,value:d,key:D}}=O,L=["paths",...M],G=["meta","paths",...M];return P.getIn(["json",...L])||P.getIn(["resolved",...L])||P.getIn(["resolvedSubtrees",...L])?P.setIn([...G,D],(0,u.fromJS)(d)):P},[T.CLEAR_RESPONSE]:(P,O)=>{let{payload:{path:M,method:d}}=O;return P.deleteIn(["responses",M,d])},[T.CLEAR_REQUEST]:(P,O)=>{let{payload:{path:M,method:d}}=O;return P.deleteIn(["requests",M,d])},[T.SET_SCHEME]:(P,O)=>{let{payload:{scheme:M,path:d,method:D}}=O;return d&&D?P.setIn(["scheme",d,D],M):d||D?void 0:P.setIn(["scheme","_defaultScheme"],M)}}},3881:(e,t,r)=>{r.r(t),r.d(t,{lastError:()=>G,url:()=>Z,specStr:()=>we,specSource:()=>xe,specJson:()=>Ae,specResolved:()=>Se,specResolvedSubtree:()=>qe,specJsonWithResolvedSubtrees:()=>ut,spec:()=>Ze,isOAS3:()=>wt,info:()=>Ot,externalDocs:()=>Ht,version:()=>gr,semver:()=>lt,paths:()=>Xe,operations:()=>Oe,consumes:()=>Pe,produces:()=>it,security:()=>Ke,securityDefinitions:()=>Lt,findDefinition:()=>sr,definitions:()=>yr,basePath:()=>pt,host:()=>Me,schemes:()=>Ne,operationsWithRootInherited:()=>Dt,tags:()=>xr,tagDetails:()=>St,operationsWithTags:()=>an,taggedOperations:()=>Tr,responses:()=>Tn,requests:()=>zn,mutatedRequests:()=>Wn,responseFor:()=>so,requestFor:()=>Hn,mutatedRequestFor:()=>$,allowTryItOutFor:()=>Q,parameterWithMetaByIdentity:()=>me,parameterInclusionSettingFor:()=>ze,parameterWithMeta:()=>Ye,operationWithMeta:()=>ht,getParameter:()=>Mt,hasHost:()=>xn,parameterValues:()=>Bn,parametersIncludeIn:()=>xo,parametersIncludeType:()=>Qn,contentTypeValues:()=>Ko,currentProducesFor:()=>Ya,producesOptionsFor:()=>bs,consumesOptionsFor:()=>Li,operationScheme:()=>ir,canExecuteScheme:()=>At,validationErrors:()=>pr,validateBeforeExecute:()=>mn,getOAS3RequiredRequestBodyContentType:()=>ho,isMediaTypeSchemaPropertiesEqual:()=>Bo});var o=r(8136),i=r(29),s=r(8818),u=r(2565),f=r(6145),m=r(1778),S=r(6785),T=r(4350),I=r(9963),P=r(4163),O=r(8639),M=r(6298),d=r(9725);const D=["get","put","post","delete","options","head","patch","trace"],L=Et=>Et||(0,d.Map)(),G=(0,O.createSelector)(L,Et=>Et.get("lastError")),Z=(0,O.createSelector)(L,Et=>Et.get("url")),we=(0,O.createSelector)(L,Et=>Et.get("spec")||""),xe=(0,O.createSelector)(L,Et=>Et.get("specSource")||"not-editor"),Ae=(0,O.createSelector)(L,Et=>Et.get("json",(0,d.Map)())),Se=(0,O.createSelector)(L,Et=>Et.get("resolved",(0,d.Map)())),qe=(Et,Qt)=>Et.getIn(["resolvedSubtrees",...Qt],void 0),Ue=(Et,Qt)=>d.Map.isMap(Et)&&d.Map.isMap(Qt)?Qt.get("$$ref")?Qt:(0,d.OrderedMap)().mergeWith(Ue,Et,Qt):Qt,ut=(0,O.createSelector)(L,Et=>(0,d.OrderedMap)().mergeWith(Ue,Et.get("json"),Et.get("resolvedSubtrees"))),Ze=Et=>Ae(Et),wt=(0,O.createSelector)(Ze,()=>!1),Ot=(0,O.createSelector)(Ze,Et=>Zo(Et&&Et.get("info"))),Ht=(0,O.createSelector)(Ze,Et=>Zo(Et&&Et.get("externalDocs"))),gr=(0,O.createSelector)(Ot,Et=>Et&&Et.get("version")),lt=(0,O.createSelector)(gr,Et=>{var Qt;return(0,o.default)(Qt=/v?([0-9]*)\.([0-9]*)\.([0-9]*)/i.exec(Et)).call(Qt,1)}),Xe=(0,O.createSelector)(ut,Et=>Et.get("paths")),Oe=(0,O.createSelector)(Xe,Et=>{if(!Et||Et.size<1)return(0,d.List)();let Qt=(0,d.List)();return Et&&(0,i.default)(Et)?((0,i.default)(Et).call(Et,(hr,Br)=>{if(!hr||!(0,i.default)(hr))return{};(0,i.default)(hr).call(hr,(bn,Sn)=>{(0,s.default)(D).call(D,Sn)<0||(Qt=Qt.push((0,d.fromJS)({path:Br,method:Sn,operation:bn,id:`${Sn}-${Br}`})))})}),Qt):(0,d.List)()}),Pe=(0,O.createSelector)(Ze,Et=>(0,d.Set)(Et.get("consumes"))),it=(0,O.createSelector)(Ze,Et=>(0,d.Set)(Et.get("produces"))),Ke=(0,O.createSelector)(Ze,Et=>Et.get("security",(0,d.List)())),Lt=(0,O.createSelector)(Ze,Et=>Et.get("securityDefinitions")),sr=(Et,Qt)=>{const hr=Et.getIn(["resolvedSubtrees","definitions",Qt],null),Br=Et.getIn(["json","definitions",Qt],null);return hr||Br||null},yr=(0,O.createSelector)(Ze,Et=>{const Qt=Et.get("definitions");return d.Map.isMap(Qt)?Qt:(0,d.Map)()}),pt=(0,O.createSelector)(Ze,Et=>Et.get("basePath")),Me=(0,O.createSelector)(Ze,Et=>Et.get("host")),Ne=(0,O.createSelector)(Ze,Et=>Et.get("schemes",(0,d.Map)())),Dt=(0,O.createSelector)(Oe,Pe,it,(Et,Qt,hr)=>(0,u.default)(Et).call(Et,Br=>Br.update("operation",bn=>bn?d.Map.isMap(bn)?bn.withMutations(Sn=>(Sn.get("consumes")||Sn.update("consumes",In=>(0,d.Set)(In).merge(Qt)),Sn.get("produces")||Sn.update("produces",In=>(0,d.Set)(In).merge(hr)),Sn)):void 0:(0,d.Map)()))),xr=(0,O.createSelector)(Ze,Et=>{const Qt=Et.get("tags",(0,d.List)());return d.List.isList(Qt)?(0,f.default)(Qt).call(Qt,hr=>d.Map.isMap(hr)):(0,d.List)()}),St=(Et,Qt)=>{var hr;let Br=xr(Et)||(0,d.List)();return(0,m.default)(hr=(0,f.default)(Br).call(Br,d.Map.isMap)).call(hr,bn=>bn.get("name")===Qt,(0,d.Map)())},an=(0,O.createSelector)(Dt,xr,(Et,Qt)=>(0,S.default)(Et).call(Et,(hr,Br)=>{let bn=(0,d.Set)(Br.getIn(["operation","tags"]));return bn.count()<1?hr.update("default",(0,d.List)(),Sn=>Sn.push(Br)):(0,S.default)(bn).call(bn,(Sn,In)=>Sn.update(In,(0,d.List)(),vi=>vi.push(Br)),hr)},(0,S.default)(Qt).call(Qt,(hr,Br)=>hr.set(Br.get("name"),(0,d.List)()),(0,d.OrderedMap)()))),Tr=Et=>Qt=>{var hr;let{getConfigs:Br}=Qt,{tagsSorter:bn,operationsSorter:Sn}=Br();return(0,u.default)(hr=an(Et).sortBy((In,vi)=>vi,(In,vi)=>{let $e="function"==typeof bn?bn:M.wh.tagsSorter[bn];return $e?$e(In,vi):null})).call(hr,(In,vi)=>{let $e="function"==typeof Sn?Sn:M.wh.operationsSorter[Sn],tr=$e?(0,T.default)(In).call(In,$e):In;return(0,d.Map)({tagDetails:St(Et,vi),operations:tr})})},Tn=(0,O.createSelector)(L,Et=>Et.get("responses",(0,d.Map)())),zn=(0,O.createSelector)(L,Et=>Et.get("requests",(0,d.Map)())),Wn=(0,O.createSelector)(L,Et=>Et.get("mutatedRequests",(0,d.Map)())),so=(Et,Qt,hr)=>Tn(Et).getIn([Qt,hr],null),Hn=(Et,Qt,hr)=>zn(Et).getIn([Qt,hr],null),$=(Et,Qt,hr)=>Wn(Et).getIn([Qt,hr],null),Q=()=>!0,me=(Et,Qt,hr)=>{const Br=ut(Et).getIn(["paths",...Qt,"parameters"],(0,d.OrderedMap)()),bn=Et.getIn(["meta","paths",...Qt,"parameters"],(0,d.OrderedMap)()),Sn=(0,u.default)(Br).call(Br,In=>{const vi=bn.get(`${hr.get("in")}.${hr.get("name")}`),$e=bn.get(`${hr.get("in")}.${hr.get("name")}.hash-${hr.hashCode()}`);return(0,d.OrderedMap)().merge(In,vi,$e)});return(0,m.default)(Sn).call(Sn,In=>In.get("in")===hr.get("in")&&In.get("name")===hr.get("name"),(0,d.OrderedMap)())},ze=(Et,Qt,hr,Br)=>Et.getIn(["meta","paths",...Qt,"parameter_inclusions",`${Br}.${hr}`],!1),Ye=(Et,Qt,hr,Br)=>{const bn=ut(Et).getIn(["paths",...Qt,"parameters"],(0,d.OrderedMap)()),Sn=(0,m.default)(bn).call(bn,In=>In.get("in")===Br&&In.get("name")===hr,(0,d.OrderedMap)());return me(Et,Qt,Sn)},ht=(Et,Qt,hr)=>{var Br;const bn=ut(Et).getIn(["paths",Qt,hr],(0,d.OrderedMap)()),Sn=Et.getIn(["meta","paths",Qt,hr],(0,d.OrderedMap)()),In=(0,u.default)(Br=bn.get("parameters",(0,d.List)())).call(Br,vi=>me(Et,[Qt,hr],vi));return(0,d.OrderedMap)().merge(bn,Sn).set("parameters",In)};function Mt(Et,Qt,hr,Br){Qt=Qt||[];let bn=Et.getIn(["meta","paths",...Qt,"parameters"],(0,d.fromJS)([]));return(0,m.default)(bn).call(bn,Sn=>d.Map.isMap(Sn)&&Sn.get("name")===hr&&Sn.get("in")===Br)||(0,d.Map)()}const xn=(0,O.createSelector)(Ze,Et=>{const Qt=Et.get("host");return"string"==typeof Qt&&Qt.length>0&&"/"!==Qt[0]});function Bn(Et,Qt,hr){Qt=Qt||[];let Br=ht(Et,...Qt).get("parameters",(0,d.List)());return(0,S.default)(Br).call(Br,(bn,Sn)=>{let In=hr&&"body"===Sn.get("in")?Sn.get("value_xml"):Sn.get("value");return bn.set((0,M.V9)(Sn,{allowHashes:!1}),In)},(0,d.fromJS)({}))}function xo(Et){let Qt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(d.List.isList(Et))return(0,I.default)(Et).call(Et,hr=>d.Map.isMap(hr)&&hr.get("in")===Qt)}function Qn(Et){let Qt=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(d.List.isList(Et))return(0,I.default)(Et).call(Et,hr=>d.Map.isMap(hr)&&hr.get("type")===Qt)}function Ko(Et,Qt){Qt=Qt||[];let hr=ut(Et).getIn(["paths",...Qt],(0,d.fromJS)({})),Br=Et.getIn(["meta","paths",...Qt],(0,d.fromJS)({})),bn=Ya(Et,Qt);const Sn=hr.get("parameters")||new d.List,In=Br.get("consumes_value")?Br.get("consumes_value"):Qn(Sn,"file")?"multipart/form-data":Qn(Sn,"formData")?"application/x-www-form-urlencoded":void 0;return(0,d.fromJS)({requestContentType:In,responseContentType:bn})}function Ya(Et,Qt){Qt=Qt||[];const hr=ut(Et).getIn(["paths",...Qt],null);if(null===hr)return;const Br=Et.getIn(["meta","paths",...Qt,"produces_value"],null),bn=hr.getIn(["produces",0],null);return Br||bn||"application/json"}function bs(Et,Qt){Qt=Qt||[];const hr=ut(Et),Br=hr.getIn(["paths",...Qt],null);if(null===Br)return;const[bn]=Qt,Sn=Br.get("produces",null),In=hr.getIn(["paths",bn,"produces"],null),vi=hr.getIn(["produces"],null);return Sn||In||vi}function Li(Et,Qt){Qt=Qt||[];const hr=ut(Et),Br=hr.getIn(["paths",...Qt],null);if(null===Br)return;const[bn]=Qt,Sn=Br.get("consumes",null),In=hr.getIn(["paths",bn,"consumes"],null),vi=hr.getIn(["consumes"],null);return Sn||In||vi}const ir=(Et,Qt,hr)=>{let Br=Et.get("url").match(/^([a-z][a-z0-9+\-.]*):/),bn=(0,P.default)(Br)?Br[1]:null;return Et.getIn(["scheme",Qt,hr])||Et.getIn(["scheme","_defaultScheme"])||bn||""},At=(Et,Qt,hr)=>{var Br;return(0,s.default)(Br=["http","https"]).call(Br,ir(Et,Qt,hr))>-1},pr=(Et,Qt)=>{Qt=Qt||[];let hr=Et.getIn(["meta","paths",...Qt,"parameters"],(0,d.fromJS)([]));const Br=[];return(0,i.default)(hr).call(hr,bn=>{let Sn=bn.get("errors");Sn&&Sn.count()&&(0,i.default)(Sn).call(Sn,In=>Br.push(In))}),Br},mn=(Et,Qt)=>0===pr(Et,Qt).length,ho=(Et,Qt)=>{var hr;let Br={requestBody:!1,requestContentType:{}},bn=Et.getIn(["resolvedSubtrees","paths",...Qt,"requestBody"],(0,d.fromJS)([]));return bn.size<1||(bn.getIn(["required"])&&(Br.requestBody=bn.getIn(["required"])),(0,i.default)(hr=bn.getIn(["content"]).entrySeq()).call(hr,Sn=>{const In=Sn[0];if(Sn[1].getIn(["schema","required"])){const vi=Sn[1].getIn(["schema","required"]).toJS();Br.requestContentType[In]=vi}})),Br},Bo=(Et,Qt,hr,Br)=>{if((hr||Br)&&hr===Br)return!0;let bn=Et.getIn(["resolvedSubtrees","paths",...Qt,"requestBody","content"],(0,d.fromJS)([]));if(bn.size<2||!hr||!Br)return!1;let Sn=bn.getIn([hr,"schema","properties"],(0,d.fromJS)([])),In=bn.getIn([Br,"schema","properties"],(0,d.fromJS)([]));return!!Sn.equals(In)};function Zo(Et){return d.Map.isMap(Et)?Et:new d.Map}},7508:(e,t,r)=>{r.r(t),r.d(t,{updateSpec:()=>u,updateJsonSpec:()=>f,executeRequest:()=>m,validateParams:()=>S});var o=r(2740),i=r(29),s=r(9908);const u=(T,I)=>{let{specActions:P}=I;return function(){T(...arguments),P.parseToJson(...arguments)}},f=(T,I)=>{let{specActions:P}=I;return function(){for(var O=arguments.length,M=new Array(O),d=0;d{(0,s.default)(L,[Z]).$ref&&P.requestResolvedSubtree(["paths",Z])}),P.requestResolvedSubtree(["components","securitySchemes"])}},m=(T,I)=>{let{specActions:P}=I;return O=>(P.logRequest(O),T(O))},S=(T,I)=>{let{specSelectors:P}=I;return O=>T(O,P.isOAS3())}},4852:(e,t,r)=>{r.r(t),r.d(t,{loaded:()=>o});const o=(i,s)=>function(){i(...arguments);const u=s.getConfigs().withCredentials;void 0!==u&&(s.fn.fetch.withCredentials="string"==typeof u?"true"===u:!!u)}},2990:(e,t,r)=>{r.r(t),r.d(t,{default:()=>S});const o=(r.d(I={},{default:()=>bv}),I),i=(T=>{var I={};return r.d(I,T),I})({buildRequest:()=>Nv,execute:()=>_x}),s=(T=>{var I={};return r.d(I,T),I})({default:()=>Gl,makeHttp:()=>Sc,serializeRes:()=>xf}),u=(T=>{var I={};return r.d(I,T),I})({default:()=>Ix});var I,f=r(5013),m=r(4852);function S(T){let{configs:I,getConfigs:P}=T;return{fn:{fetch:(0,s.makeHttp)(s.default,I.preFetch,I.postFetch),buildRequest:i.buildRequest,execute:i.execute,resolve:o.default,resolveSubtree:function(O,M,d){if(void 0===d){const Z=P();d={modelPropertyMacro:Z.modelPropertyMacro,parameterMacro:Z.parameterMacro,requestInterceptor:Z.requestInterceptor,responseInterceptor:Z.responseInterceptor}}for(var D=arguments.length,L=new Array(D>3?D-3:0),G=3;G{r.r(t),r.d(t,{default:()=>i});var o=r(6298);function i(){return{fn:{shallowEqualKeys:o.be}}}},8347:(e,t,r)=>{r.r(t),r.d(t,{getDisplayName:()=>o});const o=i=>i.displayName||i.name||"Component"},3420:(e,t,r)=>{r.r(t),r.d(t,{default:()=>m});var o=r(313),i=r(6298),s=r(5005),u=r(8347),f=r(9669);const m=S=>{let{getComponents:T,getStore:I,getSystem:P}=S;const O=(M=(0,s.getComponent)(P,I,T),(0,i.HP)(M,function(){for(var D=arguments.length,L=new Array(D),G=0;G{r.r(t),r.d(t,{getComponent:()=>L,render:()=>D,withMappedContainer:()=>d});var o=r(863),i=r(2740),s=r(810);const u=(r.d(Z={},{default:()=>jv}),Z);var Z,f=r(9871);const m=(G=>{var Z={};return r.d(Z,G),Z})({Provider:()=>jx,connect:()=>p2}),S=(G=>{var Z={};return r.d(Z,G),Z})({default:()=>v2()}),T=(G=>{var Z={};return r.d(Z,G),Z})({default:()=>E2()}),I=G=>Z=>{const{fn:we}=G();class xe extends s.Component{render(){return s.default.createElement(Z,(0,o.default)({},G(),this.props,this.context))}}return xe.displayName=`WithSystem(${we.getDisplayName(Z)})`,xe},P=(G,Z)=>we=>{const{fn:xe}=G();class Ae extends s.Component{render(){return s.default.createElement(m.Provider,{store:Z},s.default.createElement(we,(0,o.default)({},this.props,this.context)))}}return Ae.displayName=`WithRoot(${xe.getDisplayName(we)})`,Ae},O=(G,Z,we)=>(0,f.compose)(we?P(G,we):T.default,(0,m.connect)((xe,Ae)=>{var Se;const qe={...Ae,...G()};return((null===(Se=Z.prototype)||void 0===Se?void 0:Se.mapStateToProps)||(ut=>({state:ut})))(xe,qe)}),I(G))(Z),M=(G,Z,we,xe)=>{for(const Ae in Z){const Se=Z[Ae];"function"==typeof Se&&Se(we[Ae],xe[Ae],G())}},d=(G,Z,we)=>(xe,Ae)=>{const{fn:Se}=G(),qe=we(xe,"root");class Ue extends s.Component{constructor(Ze,wt){super(Ze,wt),M(G,Ae,Ze,{})}UNSAFE_componentWillReceiveProps(Ze){M(G,Ae,Ze,this.props)}render(){const Ze=(0,S.default)(this.props,Ae?(0,i.default)(Ae):[]);return s.default.createElement(qe,Ze)}}return Ue.displayName=`WithMappedContainer(${Se.getDisplayName(qe)})`,Ue},D=(G,Z,we,xe)=>Ae=>{const Se=we(G,Z,xe)("App","root");u.default.render(s.default.createElement(Se,null),Ae)},L=(G,Z,we)=>function(xe,Ae){let Se=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof xe)throw new TypeError("Need a string, to fetch a component. Was given a "+typeof xe);const qe=we(xe);return qe?Ae?"root"===Ae?O(G,qe,Z()):O(G,qe):qe:(Se.failSilently||G().log.warn("Could not find component:",xe),null)}},471:(e,t,r)=>{r.d(t,{d3:()=>s.default,C2:()=>xe});var o=r(2740),i=r(2372);const s=(r.d(Se={},{default:()=>z2}),Se),u=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>W2}),f=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>Y2}),m=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>Z2}),S=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>eS}),T=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>nS}),I=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>aS}),P=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>uS}),O=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>cS}),M=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>fS}),d=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>dS}),D=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>pS}),L=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>hS}),G=(Ae=>{var Se={};return r.d(Se,Ae),Se})({default:()=>mS});var Se;s.default.registerLanguage("json",f.default),s.default.registerLanguage("js",u.default),s.default.registerLanguage("xml",m.default),s.default.registerLanguage("yaml",T.default),s.default.registerLanguage("http",I.default),s.default.registerLanguage("bash",S.default),s.default.registerLanguage("powershell",P.default),s.default.registerLanguage("javascript",u.default);const Z={agate:O.default,arta:M.default,monokai:d.default,nord:D.default,obsidian:L.default,"tomorrow-night":G.default},we=(0,o.default)(Z),xe=Ae=>(0,i.default)(we).call(we,Ae)?Z[Ae]:(console.warn(`Request style '${Ae}' is not available, returning default instead`),O.default)},6298:(e,t,r)=>{r.d(t,{r3:()=>Qn,GZ:()=>Ya,Xb:()=>Sn,oJ:()=>pr,XV:()=>Zo,iQ:()=>Wn,J6:()=>mn,DR:()=>Hn,oG:()=>pt,Uj:()=>bn,QG:()=>At,po:()=>Bo,nX:()=>ho,gp:()=>so,xi:()=>Bn,kJ:()=>St,O2:()=>vi,LQ:()=>Ne,Wl:()=>xr,Kn:()=>Dt,HP:()=>an,AF:()=>Me,D$:()=>Qt,Ay:()=>Tr,Q2:()=>Tn,mz:()=>yr,V9:()=>hr,cz:()=>Br,UG:()=>xo,Zl:()=>$,hW:()=>ir,Nm:()=>Li,be:()=>bs,wh:()=>Ko,Pz:()=>Et,_5:()=>zn,Ik:()=>me});var o=r(4163),i=r(2565),s=r(2954),u=r(29),f=r(6145),m=r(2740),S=(r(5527),r(6785)),T=r(7512),I=r(4350),P=r(8136),O=(r(5171),r(9963)),M=(r(2372),r(313)),d=r(8818),D=r(1778),L=r(3590),G=r(5942),Z=r(9725);const we=(r.d(tr={},{sanitizeUrl:()=>gS.J}),tr),xe=($e=>{var tr={};return r.d(tr,$e),tr})({default:()=>yS()}),Ae=($e=>{var tr={};return r.d(tr,$e),tr})({default:()=>bS()});var tr,Se=r(5476);const qe=($e=>{var tr={};return r.d(tr,$e),tr})({default:()=>SS()}),Ue=($e=>{var tr={};return r.d(tr,$e),tr})({default:()=>wS()}),ut=($e=>{var tr={};return r.d(tr,$e),tr})({default:()=>AS()});var Ze=r(7068),wt=r(2473),Ot=r(7504);const Ht=($e=>{var tr={};return r.d(tr,$e),tr})({default:()=>TS()});var gr=r(9069),lt=r(1798),Xe=r.n(lt),Oe=r(9072),Pe=r.n(Oe),it=r(626),Ke=r(8764).Buffer;const Lt="default",sr=$e=>Z.default.Iterable.isIterable($e);function yr($e){return Dt($e)?sr($e)?$e.toJS():$e:{}}function pt($e){var tr,ln;if(sr($e)||$e instanceof Ot.Z.File||!Dt($e))return $e;if((0,o.default)($e))return(0,i.default)(ln=Z.default.Seq($e)).call(ln,pt).toList();if((0,Ze.default)((0,s.default)($e))){var Ur;const tn=function(Rr){if(!(0,Ze.default)((0,s.default)(Rr)))return Rr;const wo={},ea={};for(let Io of(0,s.default)(Rr).call(Rr))wo[Io[0]]||ea[Io[0]]&&ea[Io[0]].containsMultiple?(ea[Io[0]]||(ea[Io[0]]={containsMultiple:!0,length:1},wo[`${Io[0]}_**[]${ea[Io[0]].length}`]=wo[Io[0]],delete wo[Io[0]]),ea[Io[0]].length+=1,wo[`${Io[0]}_**[]${ea[Io[0]].length}`]=Io[1]):wo[Io[0]]=Io[1];return wo}($e);return(0,i.default)(Ur=Z.default.OrderedMap(tn)).call(Ur,pt)}return(0,i.default)(tr=Z.default.OrderedMap($e)).call(tr,pt)}function Me($e){return(0,o.default)($e)?$e:[$e]}function Ne($e){return"function"==typeof $e}function Dt($e){return!!$e&&"object"==typeof $e}function xr($e){return"function"==typeof $e}function St($e){return(0,o.default)($e)}const an=Se.default;function Tr($e,tr){var ln;return(0,S.default)(ln=(0,m.default)($e)).call(ln,(Ur,tn)=>(Ur[tn]=tr($e[tn],tn),Ur),{})}function Tn($e,tr){var ln;return(0,S.default)(ln=(0,m.default)($e)).call(ln,(Ur,tn)=>{let Rr=tr($e[tn],tn);return Rr&&"object"==typeof Rr&&(0,T.default)(Ur,Rr),Ur},{})}function zn($e){return tr=>tn=>Rr=>"function"==typeof Rr?Rr($e()):tn(Rr)}function Wn($e){var tr;let ln=$e.keySeq();return ln.contains(Lt)?Lt:(0,I.default)(tr=(0,f.default)(ln).call(ln,Ur=>"2"===(Ur+"")[0])).call(tr).first()}function so($e,tr){if(!Z.default.Iterable.isIterable($e))return Z.default.List();let ln=$e.getIn((0,o.default)(tr)?tr:[tr]);return Z.default.List.isList(ln)?ln:Z.default.List()}function Hn($e){let tr,ln=[/filename\*=[^']+'\w*'"([^"]+)";?/i,/filename\*=[^']+'\w*'([^;]+);?/i,/filename="([^;]*);?"/i,/filename=([^;]*);?/i];if((0,O.default)(ln).call(ln,Ur=>(tr=Ur.exec($e),null!==tr)),null!==tr&&tr.length>1)try{return decodeURIComponent(tr[1])}catch(Ur){console.error(Ur)}return null}function $($e){return tr=$e.replace(/\.[^./]*$/,""),(0,Ae.default)((0,xe.default)(tr));var tr}function Q($e,tr,ln,Ur,tn){if(!tr)return[];let Rr=[],wo=tr.get("nullable"),_i=tr.get("required"),ea=tr.get("maximum"),Io=tr.get("minimum"),Ro=tr.get("type"),wi=tr.get("format"),ou=tr.get("maxLength"),js=tr.get("minLength"),ad=tr.get("uniqueItems"),gp=tr.get("maxItems"),Fh=tr.get("minItems"),qc=tr.get("pattern");const vp=ln||!0===_i,sd=null!=$e;if(wo&&null===$e||!Ro||!(vp||sd&&"array"===Ro||vp||sd))return[];let Lh="string"===Ro&&$e,Bh="array"===Ro&&(0,o.default)($e)&&$e.length,Uh="array"===Ro&&Z.default.List.isList($e)&&$e.count();const yp=[Lh,Bh,Uh,"array"===Ro&&"string"==typeof $e&&$e,"file"===Ro&&$e instanceof Ot.Z.File,"boolean"===Ro&&($e||!1===$e),"number"===Ro&&($e||0===$e),"integer"===Ro&&($e||0===$e),"object"===Ro&&"object"==typeof $e&&null!==$e,"object"===Ro&&"string"==typeof $e&&$e],Sg=(0,O.default)(yp).call(yp,Yn=>!!Yn);if(vp&&!Sg&&!Ur)return Rr.push("Required field is not provided"),Rr;if("object"===Ro&&(null===tn||"application/json"===tn)){let Yn=$e;if("string"==typeof $e)try{Yn=JSON.parse($e)}catch{return Rr.push("Parameter string value must be valid JSON"),Rr}var $h;tr&&tr.has("required")&&xr(_i.isList)&&_i.isList()&&(0,u.default)(_i).call(_i,Gn=>{void 0===Yn[Gn]&&Rr.push({propKey:Gn,error:"Required property not found"})}),tr&&tr.has("properties")&&(0,u.default)($h=tr.get("properties")).call($h,(Gn,Ho)=>{const qs=Q(Yn[Ho],Gn,!1,Ur,tn);Rr.push(...(0,i.default)(qs).call(qs,ef=>({propKey:Ho,error:ef})))})}if(qc){let Yn=((Gn,Ho)=>{if(!new RegExp(Ho).test(Gn))return"Value must follow pattern "+Ho})($e,qc);Yn&&Rr.push(Yn)}if(Fh&&"array"===Ro){let Yn=((Gn,Ho)=>{if(!Gn&&Ho>=1||Gn&&Gn.length{if(Gn&&Gn.length>Ho)return`Array must not contain more then ${Ho} item${1===Ho?"":"s"}`})($e,gp);Yn&&Rr.push({needRemove:!0,error:Yn})}if(ad&&"array"===Ro){let Yn=((Gn,Ho)=>{if(Gn&&("true"===Ho||!0===Ho)){const qs=(0,Z.fromJS)(Gn),ef=qs.toSet();if(Gn.length>ef.size){let tf=(0,Z.Set)();if((0,u.default)(qs).call(qs,(ld,_g)=>{(0,f.default)(qs).call(qs,Ep=>xr(Ep.equals)?Ep.equals(ld):Ep===ld).size>1&&(tf=tf.add(_g))}),0!==tf.size)return(0,i.default)(tf).call(tf,ld=>({index:ld,error:"No duplicates allowed."})).toArray()}}})($e,ad);Yn&&Rr.push(...Yn)}if(ou||0===ou){let Yn=((Gn,Ho)=>{if(Gn.length>Ho)return`Value must be no longer than ${Ho} character${1!==Ho?"s":""}`})($e,ou);Yn&&Rr.push(Yn)}if(js){let Yn=((Gn,Ho)=>{if(Gn.length{if(Gn>Ho)return`Value must be less than ${Ho}`})($e,ea);Yn&&Rr.push(Yn)}if(Io||0===Io){let Yn=((Gn,Ho)=>{if(Gn{if(isNaN(Date.parse(Gn)))return"Value must be a DateTime"})($e):"uuid"===wi?(Gn=>{if(Gn=Gn.toString().toLowerCase(),!/^[{(]?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[)}]?$/.test(Gn))return"Value must be a Guid"})($e):(Gn=>{if(Gn&&"string"!=typeof Gn)return"Value must be a string"})($e),!Yn)return Rr;Rr.push(Yn)}else if("boolean"===Ro){let Yn=(Gn=>{if("true"!==Gn&&"false"!==Gn&&!0!==Gn&&!1!==Gn)return"Value must be a boolean"})($e);if(!Yn)return Rr;Rr.push(Yn)}else if("number"===Ro){let Yn=(Gn=>{if(!/^-?\d+(\.?\d+)?$/.test(Gn))return"Value must be a number"})($e);if(!Yn)return Rr;Rr.push(Yn)}else if("integer"===Ro){let Yn=(Gn=>{if(!/^-?\d+$/.test(Gn))return"Value must be an integer"})($e);if(!Yn)return Rr;Rr.push(Yn)}else if("array"===Ro){if(!Bh&&!Uh)return Rr;$e&&(0,u.default)($e).call($e,(Yn,Gn)=>{const Ho=Q(Yn,tr.get("items"),!1,Ur,tn);Rr.push(...(0,i.default)(Ho).call(Ho,qs=>({index:Gn,error:qs})))})}else if("file"===Ro){let Yn=(Gn=>{if(Gn&&!(Gn instanceof Ot.Z.File))return"Value must be a file"})($e);if(!Yn)return Rr;Rr.push(Yn)}return Rr}const me=function($e,tr){let{isOAS3:ln=!1,bypassRequiredCheck:Ur=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},tn=$e.get("required"),{schema:Rr,parameterContentMediaType:wo}=(0,gr.Z)($e,{isOAS3:ln});return Q(tr,Rr,tn,Ur,wo)},Ye=[{when:/json/,shouldStringifyTypes:["string"]}],ht=["object"],Mt=($e,tr,ln,Ur)=>{const tn=(0,wt.memoizedSampleFromSchema)($e,tr,Ur),Rr=typeof tn,wo=(0,S.default)(Ye).call(Ye,(_i,ea)=>ea.when.test(ln)?[..._i,...ea.shouldStringifyTypes]:_i,ht);return(0,Ue.default)(wo,_i=>_i===Rr)?(0,M.default)(tn,null,2):tn},Bn=function($e){let tr=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",ln=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},Ur=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;return $e&&xr($e.toJS)&&($e=$e.toJS()),Ur&&xr(Ur.toJS)&&(Ur=Ur.toJS()),/xml/.test(tr)?(($e,tr,ln)=>{if($e&&!$e.xml&&($e.xml={}),$e&&!$e.xml.name){if(!$e.$$ref&&($e.type||$e.items||$e.properties||$e.additionalProperties))return'\n\x3c!-- XML example cannot be generated; root element name is undefined --\x3e';if($e.$$ref){let Ur=$e.$$ref.match(/\S*\/(\S+)$/);$e.xml.name=Ur[1]}}return(0,wt.memoizedCreateXMLExample)($e,tr,ln)})($e,ln,Ur):/(yaml|yml)/.test(tr)?(($e,tr,ln,Ur)=>{const tn=Mt($e,tr,ln,Ur);let Rr;try{Rr=it.default.dump(it.default.load(tn),{lineWidth:-1},{schema:it.JSON_SCHEMA}),"\n"===Rr[Rr.length-1]&&(Rr=(0,P.default)(Rr).call(Rr,0,Rr.length-1))}catch(wo){return console.error(wo),"error: could not generate yaml example"}return Rr.replace(/\t/g," ")})($e,ln,tr,Ur):Mt($e,ln,tr,Ur)},xo=()=>{let $e={},tr=Ot.Z.location.search;if(!tr)return{};if(""!=tr){let ln=tr.substr(1).split("&");for(let Ur in ln)Object.prototype.hasOwnProperty.call(ln,Ur)&&(Ur=ln[Ur].split("="),$e[decodeURIComponent(Ur[0])]=Ur[1]&&decodeURIComponent(Ur[1])||"")}return $e},Qn=$e=>{let tr;return tr=$e instanceof Ke?$e:Ke.from($e.toString(),"utf-8"),tr.toString("base64")},Ko={operationsSorter:{alpha:($e,tr)=>$e.get("path").localeCompare(tr.get("path")),method:($e,tr)=>$e.get("method").localeCompare(tr.get("method"))},tagsSorter:{alpha:($e,tr)=>$e.localeCompare(tr)}},Ya=$e=>{let tr=[];for(let ln in $e){let Ur=$e[ln];void 0!==Ur&&""!==Ur&&tr.push([ln,"=",encodeURIComponent(Ur).replace(/%20/g,"+")].join(""))}return tr.join("&")},bs=($e,tr,ln)=>!!(0,qe.default)(ln,Ur=>(0,ut.default)($e[Ur],tr[Ur]));function Li($e){return"string"!=typeof $e||""===$e?"":(0,we.sanitizeUrl)($e)}function ir($e){return!(!$e||(0,d.default)($e).call($e,"localhost")>=0||(0,d.default)($e).call($e,"127.0.0.1")>=0||"none"===$e)}function At($e){if(!Z.default.OrderedMap.isOrderedMap($e)||!$e.size)return null;const tr=(0,D.default)($e).call($e,(tn,Rr)=>(0,L.default)(Rr).call(Rr,"2")&&(0,m.default)(tn.get("content")||{}).length>0),ln=$e.get("default")||Z.default.OrderedMap(),Ur=(ln.get("content")||Z.default.OrderedMap()).keySeq().toJS().length?ln:null;return tr||Ur}const pr=$e=>"string"==typeof $e||$e instanceof String?(0,G.default)($e).call($e).replace(/\s/g,"%20"):"",mn=$e=>(0,Ht.default)(pr($e).replace(/%20/g,"_")),ho=$e=>(0,f.default)($e).call($e,(tr,ln)=>/^x-/.test(ln)),Bo=$e=>(0,f.default)($e).call($e,(tr,ln)=>/^pattern|maxLength|minLength|maximum|minimum/.test(ln));function Zo($e,tr){var ln;let Ur=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>!0;if("object"!=typeof $e||(0,o.default)($e)||null===$e||!tr)return $e;const tn=(0,T.default)({},$e);return(0,u.default)(ln=(0,m.default)(tn)).call(ln,Rr=>{Rr===tr&&Ur(tn[Rr],Rr)?delete tn[Rr]:tn[Rr]=Zo(tn[Rr],tr,Ur)}),tn}function Et($e){if("string"==typeof $e)return $e;if($e&&$e.toJS&&($e=$e.toJS()),"object"==typeof $e&&null!==$e)try{return(0,M.default)($e,null,2)}catch{return String($e)}return null==$e?"":$e.toString()}function Qt($e){return"number"==typeof $e?$e.toString():$e}function hr($e){let{returnAll:tr=!1,allowHashes:ln=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Z.default.Map.isMap($e))throw new Error("paramToIdentifier: received a non-Im.Map parameter as input");const Ur=$e.get("name"),tn=$e.get("in");let Rr=[];return $e&&$e.hashCode&&tn&&Ur&&ln&&Rr.push(`${tn}.${Ur}.hash-${$e.hashCode()}`),tn&&Ur&&Rr.push(`${tn}.${Ur}`),Rr.push(Ur),tr?Rr:Rr[0]||""}function Br($e,tr){var ln;const Ur=hr($e,{returnAll:!0});return(0,f.default)(ln=(0,i.default)(Ur).call(Ur,tn=>tr[tn])).call(ln,tn=>void 0!==tn)[0]}function bn(){return In(Xe()(32).toString("base64"))}function Sn($e){return In(Pe()("sha256").update($e).digest("base64"))}function In($e){return $e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}const vi=$e=>!$e||!(!sr($e)||!$e.isEmpty())},2518:(e,t,r)=>{function o(i){return function(s){try{return!!JSON.parse(s)}catch{return null}}(i)?"json":null}r.d(t,{O:()=>o})},7504:(e,t,r)=>{r.d(t,{Z:()=>o});const o=function(){var i={location:{},history:{},open:()=>{},close:()=>{},File:function(){}};if(typeof window>"u")return i;try{for(var s of(i=window,["File","Blob","FormData"]))s in window&&(i[s]=window[s])}catch(u){console.error(u)}return i}()},9069:(e,t,r)=>{r.d(t,{Z:()=>f});var o=r(6145),i=r(2372),s=r(9725);const u=s.default.Set.of("type","format","items","default","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf");function f(m){let{isOAS3:S}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!s.default.Map.isMap(m))return{schema:s.default.Map(),parameterContentMediaType:null};if(!S)return"body"===m.get("in")?{schema:m.get("schema",s.default.Map()),parameterContentMediaType:null}:{schema:(0,o.default)(m).call(m,(T,I)=>(0,i.default)(u).call(u,I)),parameterContentMediaType:null};if(m.get("content")){const T=m.get("content",s.default.Map({})).keySeq().first();return{schema:m.getIn(["content",T,"schema"],s.default.Map()),parameterContentMediaType:T}}return{schema:m.get("schema")?m.get("schema",s.default.Map()):s.default.Map(),parameterContentMediaType:null}}},9669:(e,t,r)=>{r.d(t,{Z:()=>M});var o=r(4163),i=r(7930),s=r(8898),u=r(5487),f=r(1778);const m=(r.d(D={},{default:()=>RS()}),D);var D,S=r(6914),T=r(5476);const I=d=>D=>(0,o.default)(d)&&(0,o.default)(D)&&d.length===D.length&&(0,i.default)(d).call(d,(L,G)=>L===D[G]),P=function(){for(var d=arguments.length,D=new Array(d),L=0;L1&&void 0!==arguments[1]?arguments[1]:P;const{Cache:L}=T.default;T.default.Cache=O;const G=(0,T.default)(d,D);return T.default.Cache=L,G}},8764:(e,t,r)=>{const o=r(4780),i=r(3294),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=m,t.SlowBuffer=function($){return+$!=$&&($=0),m.alloc(+$)},t.INSPECT_MAX_BYTES=50;const u=2147483647;function f($){if($>u)throw new RangeError('The value "'+$+'" is invalid for option "size"');const Q=new Uint8Array($);return Object.setPrototypeOf(Q,m.prototype),Q}function m($,Q,me){if("number"==typeof $){if("string"==typeof Q)throw new TypeError('The "string" argument must be of type string. Received type number');return I($)}return S($,Q,me)}function S($,Q,me){if("string"==typeof $)return function(ht,Mt){if("string"==typeof Mt&&""!==Mt||(Mt="utf8"),!m.isEncoding(Mt))throw new TypeError("Unknown encoding: "+Mt);const xn=0|d(ht,Mt);let Bn=f(xn);const xo=Bn.write(ht,Mt);return xo!==xn&&(Bn=Bn.slice(0,xo)),Bn}($,Q);if(ArrayBuffer.isView($))return function(ht){if(Tn(ht,Uint8Array)){const Mt=new Uint8Array(ht);return O(Mt.buffer,Mt.byteOffset,Mt.byteLength)}return P(ht)}($);if(null==$)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $);if(Tn($,ArrayBuffer)||$&&Tn($.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Tn($,SharedArrayBuffer)||$&&Tn($.buffer,SharedArrayBuffer)))return O($,Q,me);if("number"==typeof $)throw new TypeError('The "value" argument must not be of type number. Received type number');const ze=$.valueOf&&$.valueOf();if(null!=ze&&ze!==$)return m.from(ze,Q,me);const Ye=function(ht){if(m.isBuffer(ht)){const Mt=0|M(ht.length),xn=f(Mt);return 0===xn.length||ht.copy(xn,0,0,Mt),xn}return void 0!==ht.length?"number"!=typeof ht.length||zn(ht.length)?f(0):P(ht):"Buffer"===ht.type&&Array.isArray(ht.data)?P(ht.data):void 0}($);if(Ye)return Ye;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof $[Symbol.toPrimitive])return m.from($[Symbol.toPrimitive]("string"),Q,me);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof $)}function T($){if("number"!=typeof $)throw new TypeError('"size" argument must be of type number');if($<0)throw new RangeError('The value "'+$+'" is invalid for option "size"')}function I($){return T($),f($<0?0:0|M($))}function P($){const Q=$.length<0?0:0|M($.length),me=f(Q);for(let ze=0;ze=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|$}function d($,Q){if(m.isBuffer($))return $.length;if(ArrayBuffer.isView($)||Tn($,ArrayBuffer))return $.byteLength;if("string"!=typeof $)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof $);const me=$.length,ze=arguments.length>2&&!0===arguments[2];if(!ze&&0===me)return 0;let Ye=!1;for(;;)switch(Q){case"ascii":case"latin1":case"binary":return me;case"utf8":case"utf-8":return St($).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*me;case"hex":return me>>>1;case"base64":return an($).length;default:if(Ye)return ze?-1:St($).length;Q=(""+Q).toLowerCase(),Ye=!0}}function D($,Q,me){let ze=!1;if((void 0===Q||Q<0)&&(Q=0),Q>this.length||((void 0===me||me>this.length)&&(me=this.length),me<=0)||(me>>>=0)<=(Q>>>=0))return"";for($||($="utf8");;)switch($){case"hex":return Ht(this,Q,me);case"utf8":case"utf-8":return ut(this,Q,me);case"ascii":return wt(this,Q,me);case"latin1":case"binary":return Ot(this,Q,me);case"base64":return Ue(this,Q,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gr(this,Q,me);default:if(ze)throw new TypeError("Unknown encoding: "+$);$=($+"").toLowerCase(),ze=!0}}function L($,Q,me){const ze=$[Q];$[Q]=$[me],$[me]=ze}function G($,Q,me,ze,Ye){if(0===$.length)return-1;if("string"==typeof me?(ze=me,me=0):me>2147483647?me=2147483647:me<-2147483648&&(me=-2147483648),zn(me=+me)&&(me=Ye?0:$.length-1),me<0&&(me=$.length+me),me>=$.length){if(Ye)return-1;me=$.length-1}else if(me<0){if(!Ye)return-1;me=0}if("string"==typeof Q&&(Q=m.from(Q,ze)),m.isBuffer(Q))return 0===Q.length?-1:Z($,Q,me,ze,Ye);if("number"==typeof Q)return Q&=255,"function"==typeof Uint8Array.prototype.indexOf?Ye?Uint8Array.prototype.indexOf.call($,Q,me):Uint8Array.prototype.lastIndexOf.call($,Q,me):Z($,[Q],me,ze,Ye);throw new TypeError("val must be string, number or Buffer")}function Z($,Q,me,ze,Ye){let ht,Mt=1,xn=$.length,Bn=Q.length;if(void 0!==ze&&("ucs2"===(ze=String(ze).toLowerCase())||"ucs-2"===ze||"utf16le"===ze||"utf-16le"===ze)){if($.length<2||Q.length<2)return-1;Mt=2,xn/=2,Bn/=2,me/=2}function xo(Qn,Ko){return 1===Mt?Qn[Ko]:Qn.readUInt16BE(Ko*Mt)}if(Ye){let Qn=-1;for(ht=me;htxn&&(me=xn-Bn),ht=me;ht>=0;ht--){let Qn=!0;for(let Ko=0;KoYe&&(ze=Ye):ze=Ye;const ht=Q.length;let Mt;for(ze>ht/2&&(ze=ht/2),Mt=0;Mt>8,Bn=Mt%256,xo.push(Bn),xo.push(xn);return xo}(Q,$.length-me),$,me,ze)}function Ue($,Q,me){return o.fromByteArray(0===Q&&me===$.length?$:$.slice(Q,me))}function ut($,Q,me){me=Math.min($.length,me);const ze=[];let Ye=Q;for(;Ye239?4:ht>223?3:ht>191?2:1;if(Ye+xn<=me){let Bn,xo,Qn,Ko;switch(xn){case 1:ht<128&&(Mt=ht);break;case 2:Bn=$[Ye+1],128==(192&Bn)&&(Ko=(31&ht)<<6|63&Bn,Ko>127&&(Mt=Ko));break;case 3:Bn=$[Ye+1],xo=$[Ye+2],128==(192&Bn)&&128==(192&xo)&&(Ko=(15&ht)<<12|(63&Bn)<<6|63&xo,Ko>2047&&(Ko<55296||Ko>57343)&&(Mt=Ko));break;case 4:Bn=$[Ye+1],xo=$[Ye+2],Qn=$[Ye+3],128==(192&Bn)&&128==(192&xo)&&128==(192&Qn)&&(Ko=(15&ht)<<18|(63&Bn)<<12|(63&xo)<<6|63&Qn,Ko>65535&&Ko<1114112&&(Mt=Ko))}}null===Mt?(Mt=65533,xn=1):Mt>65535&&(Mt-=65536,ze.push(Mt>>>10&1023|55296),Mt=56320|1023&Mt),ze.push(Mt),Ye+=xn}return function(ht){const Mt=ht.length;if(Mt<=Ze)return String.fromCharCode.apply(String,ht);let xn="",Bn=0;for(;Bn"u"||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(m.prototype,"parent",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.buffer}}),Object.defineProperty(m.prototype,"offset",{enumerable:!0,get:function(){if(m.isBuffer(this))return this.byteOffset}}),m.poolSize=8192,m.from=function($,Q,me){return S($,Q,me)},Object.setPrototypeOf(m.prototype,Uint8Array.prototype),Object.setPrototypeOf(m,Uint8Array),m.alloc=function($,Q,me){return Ye=Q,ht=me,T(ze=$),ze<=0?f(ze):void 0!==Ye?"string"==typeof ht?f(ze).fill(Ye,ht):f(ze).fill(Ye):f(ze);var ze,Ye,ht},m.allocUnsafe=function($){return I($)},m.allocUnsafeSlow=function($){return I($)},m.isBuffer=function($){return null!=$&&!0===$._isBuffer&&$!==m.prototype},m.compare=function($,Q){if(Tn($,Uint8Array)&&($=m.from($,$.offset,$.byteLength)),Tn(Q,Uint8Array)&&(Q=m.from(Q,Q.offset,Q.byteLength)),!m.isBuffer($)||!m.isBuffer(Q))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if($===Q)return 0;let me=$.length,ze=Q.length;for(let Ye=0,ht=Math.min(me,ze);Yeze.length?(m.isBuffer(ht)||(ht=m.from(ht)),ht.copy(ze,Ye)):Uint8Array.prototype.set.call(ze,ht,Ye);else{if(!m.isBuffer(ht))throw new TypeError('"list" argument must be an Array of Buffers');ht.copy(ze,Ye)}Ye+=ht.length}return ze},m.byteLength=d,m.prototype._isBuffer=!0,m.prototype.swap16=function(){const $=this.length;if($%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Q=0;Q<$;Q+=2)L(this,Q,Q+1);return this},m.prototype.swap32=function(){const $=this.length;if($%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Q=0;Q<$;Q+=4)L(this,Q,Q+3),L(this,Q+1,Q+2);return this},m.prototype.swap64=function(){const $=this.length;if($%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Q=0;Q<$;Q+=8)L(this,Q,Q+7),L(this,Q+1,Q+6),L(this,Q+2,Q+5),L(this,Q+3,Q+4);return this},m.prototype.toLocaleString=m.prototype.toString=function(){const $=this.length;return 0===$?"":0===arguments.length?ut(this,0,$):D.apply(this,arguments)},m.prototype.equals=function($){if(!m.isBuffer($))throw new TypeError("Argument must be a Buffer");return this===$||0===m.compare(this,$)},m.prototype.inspect=function(){let $="";const Q=t.INSPECT_MAX_BYTES;return $=this.toString("hex",0,Q).replace(/(.{2})/g,"$1 ").trim(),this.length>Q&&($+=" ... "),""},s&&(m.prototype[s]=m.prototype.inspect),m.prototype.compare=function($,Q,me,ze,Ye){if(Tn($,Uint8Array)&&($=m.from($,$.offset,$.byteLength)),!m.isBuffer($))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof $);if(void 0===Q&&(Q=0),void 0===me&&(me=$?$.length:0),void 0===ze&&(ze=0),void 0===Ye&&(Ye=this.length),Q<0||me>$.length||ze<0||Ye>this.length)throw new RangeError("out of range index");if(ze>=Ye&&Q>=me)return 0;if(ze>=Ye)return-1;if(Q>=me)return 1;if(this===$)return 0;let ht=(Ye>>>=0)-(ze>>>=0),Mt=(me>>>=0)-(Q>>>=0);const xn=Math.min(ht,Mt),Bn=this.slice(ze,Ye),xo=$.slice(Q,me);for(let Qn=0;Qn>>=0,isFinite(me)?(me>>>=0,void 0===ze&&(ze="utf8")):(ze=me,me=void 0)}const Ye=this.length-Q;if((void 0===me||me>Ye)&&(me=Ye),$.length>0&&(me<0||Q<0)||Q>this.length)throw new RangeError("Attempt to write outside buffer bounds");ze||(ze="utf8");let ht=!1;for(;;)switch(ze){case"hex":return we(this,$,Q,me);case"utf8":case"utf-8":return xe(this,$,Q,me);case"ascii":case"latin1":case"binary":return Ae(this,$,Q,me);case"base64":return Se(this,$,Q,me);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qe(this,$,Q,me);default:if(ht)throw new TypeError("Unknown encoding: "+ze);ze=(""+ze).toLowerCase(),ht=!0}},m.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const Ze=4096;function wt($,Q,me){let ze="";me=Math.min($.length,me);for(let Ye=Q;Yeze)&&(me=ze);let Ye="";for(let ht=Q;htme)throw new RangeError("Trying to access beyond buffer length")}function Xe($,Q,me,ze,Ye,ht){if(!m.isBuffer($))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>Ye||Q$.length)throw new RangeError("Index out of range")}function Oe($,Q,me,ze,Ye){Me(Q,ze,Ye,$,me,7);let ht=Number(Q&BigInt(4294967295));$[me++]=ht,ht>>=8,$[me++]=ht,ht>>=8,$[me++]=ht,ht>>=8,$[me++]=ht;let Mt=Number(Q>>BigInt(32)&BigInt(4294967295));return $[me++]=Mt,Mt>>=8,$[me++]=Mt,Mt>>=8,$[me++]=Mt,Mt>>=8,$[me++]=Mt,me}function Pe($,Q,me,ze,Ye){Me(Q,ze,Ye,$,me,7);let ht=Number(Q&BigInt(4294967295));$[me+7]=ht,ht>>=8,$[me+6]=ht,ht>>=8,$[me+5]=ht,ht>>=8,$[me+4]=ht;let Mt=Number(Q>>BigInt(32)&BigInt(4294967295));return $[me+3]=Mt,Mt>>=8,$[me+2]=Mt,Mt>>=8,$[me+1]=Mt,Mt>>=8,$[me]=Mt,me+8}function it($,Q,me,ze,Ye,ht){if(me+ze>$.length)throw new RangeError("Index out of range");if(me<0)throw new RangeError("Index out of range")}function Ke($,Q,me,ze,Ye){return Q=+Q,me>>>=0,Ye||it($,0,me,4),i.write($,Q,me,ze,23,4),me+4}function Lt($,Q,me,ze,Ye){return Q=+Q,me>>>=0,Ye||it($,0,me,8),i.write($,Q,me,ze,52,8),me+8}m.prototype.slice=function($,Q){const me=this.length;($=~~$)<0?($+=me)<0&&($=0):$>me&&($=me),(Q=void 0===Q?me:~~Q)<0?(Q+=me)<0&&(Q=0):Q>me&&(Q=me),Q<$&&(Q=$);const ze=this.subarray($,Q);return Object.setPrototypeOf(ze,m.prototype),ze},m.prototype.readUintLE=m.prototype.readUIntLE=function($,Q,me){$>>>=0,Q>>>=0,me||lt($,Q,this.length);let ze=this[$],Ye=1,ht=0;for(;++ht>>=0,Q>>>=0,me||lt($,Q,this.length);let ze=this[$+--Q],Ye=1;for(;Q>0&&(Ye*=256);)ze+=this[$+--Q]*Ye;return ze},m.prototype.readUint8=m.prototype.readUInt8=function($,Q){return $>>>=0,Q||lt($,1,this.length),this[$]},m.prototype.readUint16LE=m.prototype.readUInt16LE=function($,Q){return $>>>=0,Q||lt($,2,this.length),this[$]|this[$+1]<<8},m.prototype.readUint16BE=m.prototype.readUInt16BE=function($,Q){return $>>>=0,Q||lt($,2,this.length),this[$]<<8|this[$+1]},m.prototype.readUint32LE=m.prototype.readUInt32LE=function($,Q){return $>>>=0,Q||lt($,4,this.length),(this[$]|this[$+1]<<8|this[$+2]<<16)+16777216*this[$+3]},m.prototype.readUint32BE=m.prototype.readUInt32BE=function($,Q){return $>>>=0,Q||lt($,4,this.length),16777216*this[$]+(this[$+1]<<16|this[$+2]<<8|this[$+3])},m.prototype.readBigUInt64LE=so(function($){Ne($>>>=0,"offset");const Q=this[$],me=this[$+7];void 0!==Q&&void 0!==me||Dt($,this.length-8);const ze=Q+256*this[++$]+65536*this[++$]+this[++$]*2**24,Ye=this[++$]+256*this[++$]+65536*this[++$]+me*2**24;return BigInt(ze)+(BigInt(Ye)<>>=0,"offset");const Q=this[$],me=this[$+7];void 0!==Q&&void 0!==me||Dt($,this.length-8);const ze=Q*2**24+65536*this[++$]+256*this[++$]+this[++$],Ye=this[++$]*2**24+65536*this[++$]+256*this[++$]+me;return(BigInt(ze)<>>=0,Q>>>=0,me||lt($,Q,this.length);let ze=this[$],Ye=1,ht=0;for(;++ht=Ye&&(ze-=Math.pow(2,8*Q)),ze},m.prototype.readIntBE=function($,Q,me){$>>>=0,Q>>>=0,me||lt($,Q,this.length);let ze=Q,Ye=1,ht=this[$+--ze];for(;ze>0&&(Ye*=256);)ht+=this[$+--ze]*Ye;return Ye*=128,ht>=Ye&&(ht-=Math.pow(2,8*Q)),ht},m.prototype.readInt8=function($,Q){return $>>>=0,Q||lt($,1,this.length),128&this[$]?-1*(255-this[$]+1):this[$]},m.prototype.readInt16LE=function($,Q){$>>>=0,Q||lt($,2,this.length);const me=this[$]|this[$+1]<<8;return 32768&me?4294901760|me:me},m.prototype.readInt16BE=function($,Q){$>>>=0,Q||lt($,2,this.length);const me=this[$+1]|this[$]<<8;return 32768&me?4294901760|me:me},m.prototype.readInt32LE=function($,Q){return $>>>=0,Q||lt($,4,this.length),this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24},m.prototype.readInt32BE=function($,Q){return $>>>=0,Q||lt($,4,this.length),this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]},m.prototype.readBigInt64LE=so(function($){Ne($>>>=0,"offset");const Q=this[$],me=this[$+7];return void 0!==Q&&void 0!==me||Dt($,this.length-8),(BigInt(this[$+4]+256*this[$+5]+65536*this[$+6]+(me<<24))<>>=0,"offset");const Q=this[$],me=this[$+7];void 0!==Q&&void 0!==me||Dt($,this.length-8);const ze=(Q<<24)+65536*this[++$]+256*this[++$]+this[++$];return(BigInt(ze)<>>=0,Q||lt($,4,this.length),i.read(this,$,!0,23,4)},m.prototype.readFloatBE=function($,Q){return $>>>=0,Q||lt($,4,this.length),i.read(this,$,!1,23,4)},m.prototype.readDoubleLE=function($,Q){return $>>>=0,Q||lt($,8,this.length),i.read(this,$,!0,52,8)},m.prototype.readDoubleBE=function($,Q){return $>>>=0,Q||lt($,8,this.length),i.read(this,$,!1,52,8)},m.prototype.writeUintLE=m.prototype.writeUIntLE=function($,Q,me,ze){$=+$,Q>>>=0,me>>>=0,!ze&&Xe(this,$,Q,me,Math.pow(2,8*me)-1,0);let Ye=1,ht=0;for(this[Q]=255&$;++ht>>=0,me>>>=0,!ze&&Xe(this,$,Q,me,Math.pow(2,8*me)-1,0);let Ye=me-1,ht=1;for(this[Q+Ye]=255&$;--Ye>=0&&(ht*=256);)this[Q+Ye]=$/ht&255;return Q+me},m.prototype.writeUint8=m.prototype.writeUInt8=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,1,255,0),this[Q]=255&$,Q+1},m.prototype.writeUint16LE=m.prototype.writeUInt16LE=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,2,65535,0),this[Q]=255&$,this[Q+1]=$>>>8,Q+2},m.prototype.writeUint16BE=m.prototype.writeUInt16BE=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,2,65535,0),this[Q]=$>>>8,this[Q+1]=255&$,Q+2},m.prototype.writeUint32LE=m.prototype.writeUInt32LE=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,4,4294967295,0),this[Q+3]=$>>>24,this[Q+2]=$>>>16,this[Q+1]=$>>>8,this[Q]=255&$,Q+4},m.prototype.writeUint32BE=m.prototype.writeUInt32BE=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,4,4294967295,0),this[Q]=$>>>24,this[Q+1]=$>>>16,this[Q+2]=$>>>8,this[Q+3]=255&$,Q+4},m.prototype.writeBigUInt64LE=so(function($,Q=0){return Oe(this,$,Q,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeBigUInt64BE=so(function($,Q=0){return Pe(this,$,Q,BigInt(0),BigInt("0xffffffffffffffff"))}),m.prototype.writeIntLE=function($,Q,me,ze){if($=+$,Q>>>=0,!ze){const xn=Math.pow(2,8*me-1);Xe(this,$,Q,me,xn-1,-xn)}let Ye=0,ht=1,Mt=0;for(this[Q]=255&$;++Ye>0)-Mt&255;return Q+me},m.prototype.writeIntBE=function($,Q,me,ze){if($=+$,Q>>>=0,!ze){const xn=Math.pow(2,8*me-1);Xe(this,$,Q,me,xn-1,-xn)}let Ye=me-1,ht=1,Mt=0;for(this[Q+Ye]=255&$;--Ye>=0&&(ht*=256);)$<0&&0===Mt&&0!==this[Q+Ye+1]&&(Mt=1),this[Q+Ye]=($/ht>>0)-Mt&255;return Q+me},m.prototype.writeInt8=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,1,127,-128),$<0&&($=255+$+1),this[Q]=255&$,Q+1},m.prototype.writeInt16LE=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,2,32767,-32768),this[Q]=255&$,this[Q+1]=$>>>8,Q+2},m.prototype.writeInt16BE=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,2,32767,-32768),this[Q]=$>>>8,this[Q+1]=255&$,Q+2},m.prototype.writeInt32LE=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,4,2147483647,-2147483648),this[Q]=255&$,this[Q+1]=$>>>8,this[Q+2]=$>>>16,this[Q+3]=$>>>24,Q+4},m.prototype.writeInt32BE=function($,Q,me){return $=+$,Q>>>=0,me||Xe(this,$,Q,4,2147483647,-2147483648),$<0&&($=4294967295+$+1),this[Q]=$>>>24,this[Q+1]=$>>>16,this[Q+2]=$>>>8,this[Q+3]=255&$,Q+4},m.prototype.writeBigInt64LE=so(function($,Q=0){return Oe(this,$,Q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeBigInt64BE=so(function($,Q=0){return Pe(this,$,Q,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),m.prototype.writeFloatLE=function($,Q,me){return Ke(this,$,Q,!0,me)},m.prototype.writeFloatBE=function($,Q,me){return Ke(this,$,Q,!1,me)},m.prototype.writeDoubleLE=function($,Q,me){return Lt(this,$,Q,!0,me)},m.prototype.writeDoubleBE=function($,Q,me){return Lt(this,$,Q,!1,me)},m.prototype.copy=function($,Q,me,ze){if(!m.isBuffer($))throw new TypeError("argument should be a Buffer");if(me||(me=0),ze||0===ze||(ze=this.length),Q>=$.length&&(Q=$.length),Q||(Q=0),ze>0&&ze=this.length)throw new RangeError("Index out of range");if(ze<0)throw new RangeError("sourceEnd out of bounds");ze>this.length&&(ze=this.length),$.length-Q>>=0,me=void 0===me?this.length:me>>>0,$||($=0),"number"==typeof $)for(Ye=Q;Ye=ze+4;me-=3)Q=`_${$.slice(me-3,me)}${Q}`;return`${$.slice(0,me)}${Q}`}function Me($,Q,me,ze,Ye,ht){if($>me||$3?0===Q||Q===BigInt(0)?`>= 0${Mt} and < 2${Mt} ** ${8*(ht+1)}${Mt}`:`>= -(2${Mt} ** ${8*(ht+1)-1}${Mt}) and < 2 ** ${8*(ht+1)-1}${Mt}`:`>= ${Q}${Mt} and <= ${me}${Mt}`,new sr.ERR_OUT_OF_RANGE("value",xn,$)}var Mt,xn,Bn;Mt=ze,Bn=ht,Ne(xn=Ye,"offset"),void 0!==Mt[xn]&&void 0!==Mt[xn+Bn]||Dt(xn,Mt.length-(Bn+1))}function Ne($,Q){if("number"!=typeof $)throw new sr.ERR_INVALID_ARG_TYPE(Q,"number",$)}function Dt($,Q,me){throw Math.floor($)!==$?(Ne($,me),new sr.ERR_OUT_OF_RANGE(me||"offset","an integer",$)):Q<0?new sr.ERR_BUFFER_OUT_OF_BOUNDS:new sr.ERR_OUT_OF_RANGE(me||"offset",`>= ${me?1:0} and <= ${Q}`,$)}yr("ERR_BUFFER_OUT_OF_BOUNDS",function($){return $?`${$} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),yr("ERR_INVALID_ARG_TYPE",function($,Q){return`The "${$}" argument must be of type number. Received type ${typeof Q}`},TypeError),yr("ERR_OUT_OF_RANGE",function($,Q,me){let ze=`The value of "${$}" is out of range.`,Ye=me;return Number.isInteger(me)&&Math.abs(me)>2**32?Ye=pt(String(me)):"bigint"==typeof me&&(Ye=String(me),(me>BigInt(2)**BigInt(32)||me<-(BigInt(2)**BigInt(32)))&&(Ye=pt(Ye)),Ye+="n"),ze+=` It must be ${Q}. Received ${Ye}`,ze},RangeError);const xr=/[^+/0-9A-Za-z-_]/g;function St($,Q){let me;Q=Q||1/0;const ze=$.length;let Ye=null;const ht=[];for(let Mt=0;Mt55295&&me<57344){if(!Ye){if(me>56319){(Q-=3)>-1&&ht.push(239,191,189);continue}if(Mt+1===ze){(Q-=3)>-1&&ht.push(239,191,189);continue}Ye=me;continue}if(me<56320){(Q-=3)>-1&&ht.push(239,191,189),Ye=me;continue}me=65536+(Ye-55296<<10|me-56320)}else Ye&&(Q-=3)>-1&&ht.push(239,191,189);if(Ye=null,me<128){if((Q-=1)<0)break;ht.push(me)}else if(me<2048){if((Q-=2)<0)break;ht.push(me>>6|192,63&me|128)}else if(me<65536){if((Q-=3)<0)break;ht.push(me>>12|224,me>>6&63|128,63&me|128)}else{if(!(me<1114112))throw new Error("Invalid code point");if((Q-=4)<0)break;ht.push(me>>18|240,me>>12&63|128,me>>6&63|128,63&me|128)}}return ht}function an($){return o.toByteArray(function(Q){if((Q=(Q=Q.split("=")[0]).trim().replace(xr,"")).length<2)return"";for(;Q.length%4!=0;)Q+="=";return Q}($))}function Tr($,Q,me,ze){let Ye;for(Ye=0;Ye=Q.length||Ye>=$.length);++Ye)Q[Ye+me]=$[Ye];return Ye}function Tn($,Q){return $ instanceof Q||null!=$&&null!=$.constructor&&null!=$.constructor.name&&$.constructor.name===Q.name}function zn($){return $!=$}const Wn=function(){const $="0123456789abcdef",Q=new Array(256);for(let me=0;me<16;++me){const ze=16*me;for(let Ye=0;Ye<16;++Ye)Q[ze+Ye]=$[me]+$[Ye]}return Q}();function so($){return typeof BigInt>"u"?Hn:$}function Hn(){throw new Error("BigInt not supported")}},8171:(e,t,r)=>{r(6450);var o=r(4058).Object,i=e.exports=function(s,u,f){return o.defineProperty(s,u,f)};o.defineProperty.sham&&(i.sham=!0)},4883:(e,t,r)=>{var o=r(1899),i=r(7475),s=r(9826),u=o.TypeError;e.exports=function(f){if(i(f))return f;throw u(s(f)+" is not a function")}},6059:(e,t,r)=>{var o=r(1899),i=r(941),s=o.String,u=o.TypeError;e.exports=function(f){if(i(f))return f;throw u(s(f)+" is not an object")}},2532:(e,t,r)=>{var o=r(5329),i=o({}.toString),s=o("".slice);e.exports=function(u){return s(i(u),8,-1)}},2029:(e,t,r)=>{var o=r(5746),i=r(5988),s=r(1887);e.exports=o?function(u,f,m){return i.f(u,f,s(1,m))}:function(u,f,m){return u[f]=m,u}},1887:e=>{e.exports=function(t,r){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:r}}},5746:(e,t,r)=>{var o=r(5981);e.exports=!o(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},1333:(e,t,r)=>{var o=r(1899),i=r(941),s=o.document,u=i(s)&&i(s.createElement);e.exports=function(f){return u?s.createElement(f):{}}},2861:(e,t,r)=>{var o=r(224);e.exports=o("navigator","userAgent")||""},3385:(e,t,r)=>{var o,i,s=r(1899),u=r(2861),f=s.process,m=s.Deno,S=f&&f.versions||m&&m.version,T=S&&S.v8;T&&(i=(o=T.split("."))[0]>0&&o[0]<4?1:+(o[0]+o[1])),!i&&u&&(!(o=u.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=u.match(/Chrome\/(\d+)/))&&(i=+o[1]),e.exports=i},6887:(e,t,r)=>{var o=r(1899),i=r(9730),s=r(5329),u=r(7475),f=r(9677).f,m=r(7252),S=r(4058),T=r(6843),I=r(2029),P=r(953),O=function(M){var d=function(D,L,G){if(this instanceof d){switch(arguments.length){case 0:return new M;case 1:return new M(D);case 2:return new M(D,L)}return new M(D,L,G)}return i(M,this,arguments)};return d.prototype=M.prototype,d};e.exports=function(M,d){var D,L,G,Z,we,xe,Ae,Se,qe=M.target,Ue=M.global,ut=M.stat,Ze=M.proto,wt=Ue?o:ut?o[qe]:(o[qe]||{}).prototype,Ot=Ue?S:S[qe]||I(S,qe,{})[qe],Ht=Ot.prototype;for(G in d)D=!m(Ue?G:qe+(ut?".":"#")+G,M.forced)&&wt&&P(wt,G),we=Ot[G],D&&(xe=M.noTargetGet?(Se=f(wt,G))&&Se.value:wt[G]),Z=D&&xe?xe:d[G],D&&typeof we==typeof Z||(Ae=M.bind&&D?T(Z,o):M.wrap&&D?O(Z):Ze&&u(Z)?s(Z):Z,(M.sham||Z&&Z.sham||we&&we.sham)&&I(Ae,"sham",!0),I(Ot,G,Ae),Ze&&(P(S,L=qe+"Prototype")||I(S,L,{}),I(S[L],G,Z),M.real&&Ht&&!Ht[G]&&I(Ht,G,Z)))}},5981:e=>{e.exports=function(t){try{return!!t()}catch{return!0}}},9730:(e,t,r)=>{var o=r(8285),i=Function.prototype,s=i.apply,u=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(o?u.bind(s):function(){return u.apply(s,arguments)})},6843:(e,t,r)=>{var o=r(5329),i=r(4883),s=r(8285),u=o(o.bind);e.exports=function(f,m){return i(f),void 0===m?f:s?u(f,m):function(){return f.apply(m,arguments)}}},8285:(e,t,r)=>{var o=r(5981);e.exports=!o(function(){var i=function(){}.bind();return"function"!=typeof i||i.hasOwnProperty("prototype")})},8834:(e,t,r)=>{var o=r(8285),i=Function.prototype.call;e.exports=o?i.bind(i):function(){return i.apply(i,arguments)}},5329:(e,t,r)=>{var o=r(8285),i=Function.prototype,u=i.call,f=o&&i.bind.bind(u,u);e.exports=o?function(m){return m&&f(m)}:function(m){return m&&function(){return u.apply(m,arguments)}}},224:(e,t,r)=>{var o=r(4058),i=r(1899),s=r(7475),u=function(f){return s(f)?f:void 0};e.exports=function(f,m){return arguments.length<2?u(o[f])||u(i[f]):o[f]&&o[f][m]||i[f]&&i[f][m]}},9733:(e,t,r)=>{var o=r(4883);e.exports=function(i,s){var u=i[s];return null==u?void 0:o(u)}},1899:(e,t,r)=>{var o=function(i){return i&&i.Math==Math&&i};e.exports=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof r.g&&r.g)||function(){return this}()||Function("return this")()},953:(e,t,r)=>{var o=r(5329),i=r(9678),s=o({}.hasOwnProperty);e.exports=Object.hasOwn||function(u,f){return s(i(u),f)}},2840:(e,t,r)=>{var o=r(5746),i=r(5981),s=r(1333);e.exports=!o&&!i(function(){return 7!=Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},7026:(e,t,r)=>{var o=r(1899),i=r(5329),s=r(5981),u=r(2532),f=o.Object,m=i("".split);e.exports=s(function(){return!f("z").propertyIsEnumerable(0)})?function(S){return"String"==u(S)?m(S,""):f(S)}:f},7475:e=>{e.exports=function(t){return"function"==typeof t}},7252:(e,t,r)=>{var o=r(5981),i=r(7475),s=/#|\.prototype\./,u=function(I,P){var O=m[f(I)];return O==T||O!=S&&(i(P)?o(P):!!P)},f=u.normalize=function(I){return String(I).replace(s,".").toLowerCase()},m=u.data={},S=u.NATIVE="N",T=u.POLYFILL="P";e.exports=u},941:(e,t,r)=>{var o=r(7475);e.exports=function(i){return"object"==typeof i?null!==i:o(i)}},2529:e=>{e.exports=!0},6664:(e,t,r)=>{var o=r(1899),i=r(224),s=r(7475),u=r(7046),f=r(2302),m=o.Object;e.exports=f?function(S){return"symbol"==typeof S}:function(S){var T=i("Symbol");return s(T)&&u(T.prototype,m(S))}},2497:(e,t,r)=>{var o=r(3385),i=r(5981);e.exports=!!Object.getOwnPropertySymbols&&!i(function(){var s=Symbol();return!String(s)||!(Object(s)instanceof Symbol)||!Symbol.sham&&o&&o<41})},5988:(e,t,r)=>{var o=r(1899),i=r(5746),s=r(2840),u=r(3937),f=r(6059),m=r(3894),S=o.TypeError,T=Object.defineProperty,I=Object.getOwnPropertyDescriptor;t.f=i?u?function(d,D,L){if(f(d),D=m(D),f(L),"function"==typeof d&&"prototype"===D&&"value"in L&&"writable"in L&&!L.writable){var G=I(d,D);G&&G.writable&&(d[D]=L.value,L={configurable:"configurable"in L?L.configurable:G.configurable,enumerable:"enumerable"in L?L.enumerable:G.enumerable,writable:!1})}return T(d,D,L)}:T:function(d,D,L){if(f(d),D=m(D),f(L),s)try{return T(d,D,L)}catch{}if("get"in L||"set"in L)throw S("Accessors not supported");return"value"in L&&(d[D]=L.value),d}},9677:(e,t,r)=>{var o=r(5746),i=r(8834),s=r(6760),u=r(1887),f=r(4529),m=r(3894),S=r(953),T=r(2840),I=Object.getOwnPropertyDescriptor;t.f=o?I:function(P,O){if(P=f(P),O=m(O),T)try{return I(P,O)}catch{}if(S(P,O))return u(!i(s.f,P,O),P[O])}},7046:(e,t,r)=>{var o=r(5329);e.exports=o({}.isPrototypeOf)},6760:(e,t)=>{var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(s){var u=o(this,s);return!!u&&u.enumerable}:r},9811:(e,t,r)=>{var o=r(1899),i=r(8834),s=r(7475),u=r(941),f=o.TypeError;e.exports=function(m,S){var T,I;if("string"===S&&s(T=m.toString)&&!u(I=i(T,m))||s(T=m.valueOf)&&!u(I=i(T,m))||"string"!==S&&s(T=m.toString)&&!u(I=i(T,m)))return I;throw f("Can't convert object to primitive value")}},4058:e=>{e.exports={}},8219:(e,t,r)=>{var o=r(1899).TypeError;e.exports=function(i){if(null==i)throw o("Can't call method on "+i);return i}},4911:(e,t,r)=>{var o=r(1899),i=Object.defineProperty;e.exports=function(s,u){try{i(o,s,{value:u,configurable:!0,writable:!0})}catch{o[s]=u}return u}},3030:(e,t,r)=>{var o=r(1899),i=r(4911),s="__core-js_shared__",u=o[s]||i(s,{});e.exports=u},8726:(e,t,r)=>{var o=r(2529),i=r(3030);(e.exports=function(s,u){return i[s]||(i[s]=void 0!==u?u:{})})("versions",[]).push({version:"3.20.3",mode:o?"pure":"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE",source:"https://github.com/zloirock/core-js"})},4529:(e,t,r)=>{var o=r(7026),i=r(8219);e.exports=function(s){return o(i(s))}},9678:(e,t,r)=>{var o=r(1899),i=r(8219),s=o.Object;e.exports=function(u){return s(i(u))}},6935:(e,t,r)=>{var o=r(1899),i=r(8834),s=r(941),u=r(6664),f=r(9733),m=r(9811),S=r(9813),T=o.TypeError,I=S("toPrimitive");e.exports=function(P,O){if(!s(P)||u(P))return P;var M,d=f(P,I);if(d){if(void 0===O&&(O="default"),M=i(d,P,O),!s(M)||u(M))return M;throw T("Can't convert object to primitive value")}return void 0===O&&(O="number"),m(P,O)}},3894:(e,t,r)=>{var o=r(6935),i=r(6664);e.exports=function(s){var u=o(s,"string");return i(u)?u:u+""}},9826:(e,t,r)=>{var o=r(1899).String;e.exports=function(i){try{return o(i)}catch{return"Object"}}},9418:(e,t,r)=>{var o=r(5329),i=0,s=Math.random(),u=o(1..toString);e.exports=function(f){return"Symbol("+(void 0===f?"":f)+")_"+u(++i+s,36)}},2302:(e,t,r)=>{var o=r(2497);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},3937:(e,t,r)=>{var o=r(5746),i=r(5981);e.exports=o&&i(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},9813:(e,t,r)=>{var o=r(1899),i=r(8726),s=r(953),u=r(9418),f=r(2497),m=r(2302),S=i("wks"),T=o.Symbol,I=T&&T.for,P=m?T:T&&T.withoutSetter||u;e.exports=function(O){if(!s(S,O)||!f&&"string"!=typeof S[O]){var M="Symbol."+O;S[O]=f&&s(T,O)?T[O]:m&&I?I(M):P(M)}return S[O]}},6450:(e,t,r)=>{var o=r(6887),i=r(5746),s=r(5988).f;o({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!i},{defineProperty:s})},1910:(e,t,r)=>{var o=r(8171);e.exports=o},7698:(e,t,r)=>{var o=r(8764).Buffer;function i(S){return S instanceof o||S instanceof Date||S instanceof RegExp}function s(S){if(S instanceof o){var T=o.alloc?o.alloc(S.length):new o(S.length);return S.copy(T),T}if(S instanceof Date)return new Date(S.getTime());if(S instanceof RegExp)return new RegExp(S);throw new Error("Unexpected situation")}function u(S){var T=[];return S.forEach(function(I,P){T[P]="object"==typeof I&&null!==I?Array.isArray(I)?u(I):i(I)?s(I):m({},I):I}),T}function f(S,T){return"__proto__"===T?void 0:S[T]}var m=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var S,T,I=arguments[0];return Array.prototype.slice.call(arguments,1).forEach(function(O){"object"!=typeof O||null===O||Array.isArray(O)||Object.keys(O).forEach(function(M){return T=f(I,M),(S=f(O,M))===I?void 0:"object"!=typeof S||null===S?void(I[M]=S):Array.isArray(S)?void(I[M]=u(S)):i(S)?void(I[M]=s(S)):"object"!=typeof T||null===T||Array.isArray(T)?void(I[M]=m({},S)):void(I[M]=m(T,S))})}),I}},7187:e=>{var t,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(D,L,G){return Function.prototype.apply.call(D,L,G)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(D){return Object.getOwnPropertyNames(D).concat(Object.getOwnPropertySymbols(D))}:function(D){return Object.getOwnPropertyNames(D)};var i=Number.isNaN||function(D){return D!=D};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(D,L){return new Promise(function(G,Z){function we(Ae){D.removeListener(L,xe),Z(Ae)}function xe(){"function"==typeof D.removeListener&&D.removeListener("error",we),G([].slice.call(arguments))}var Ae;d(D,L,xe,{once:!0}),"error"!==L&&("function"==typeof(Ae=D).on&&d(Ae,"error",we,{once:!0}))})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function f(D){if("function"!=typeof D)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof D)}function m(D){return void 0===D._maxListeners?s.defaultMaxListeners:D._maxListeners}function S(D,L,G,Z){var we,xe,Ae;if(f(G),void 0===(xe=D._events)?(xe=D._events=Object.create(null),D._eventsCount=0):(void 0!==xe.newListener&&(D.emit("newListener",L,G.listener?G.listener:G),xe=D._events),Ae=xe[L]),void 0===Ae)Ae=xe[L]=G,++D._eventsCount;else if("function"==typeof Ae?Ae=xe[L]=Z?[G,Ae]:[Ae,G]:Z?Ae.unshift(G):Ae.push(G),(we=m(D))>0&&Ae.length>we&&!Ae.warned){Ae.warned=!0;var qe=new Error("Possible EventEmitter memory leak detected. "+Ae.length+" "+String(L)+" listeners added. Use emitter.setMaxListeners() to increase limit");qe.name="MaxListenersExceededWarning",qe.emitter=D,qe.type=L,qe.count=Ae.length,console&&console.warn&&console.warn(qe)}return D}function T(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function I(D,L,G){var Z={fired:!1,wrapFn:void 0,target:D,type:L,listener:G},we=T.bind(Z);return we.listener=G,Z.wrapFn=we,we}function P(D,L,G){var Z=D._events;if(void 0===Z)return[];var we=Z[L];return void 0===we?[]:"function"==typeof we?G?[we.listener||we]:[we]:G?function(xe){for(var Ae=new Array(xe.length),Se=0;Se0&&(xe=L[0]),xe instanceof Error)throw xe;var Ae=new Error("Unhandled error."+(xe?" ("+xe.message+")":""));throw Ae.context=xe,Ae}var Se=we[D];if(void 0===Se)return!1;if("function"==typeof Se)o(Se,this,L);else{var qe=Se.length,Ue=M(Se,qe);for(G=0;G=0;xe--)if(G[xe]===L||G[xe].listener===L){Ae=G[xe].listener,we=xe;break}if(we<0)return this;0===we?G.shift():function(Se,qe){for(;qe+1=0;Z--)this.removeListener(D,L[Z]);return this},s.prototype.listeners=function(D){return P(this,D,!0)},s.prototype.rawListeners=function(D){return P(this,D,!1)},s.listenerCount=function(D,L){return"function"==typeof D.listenerCount?D.listenerCount(L):O.call(D,L)},s.prototype.listenerCount=O,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},5717:e=>{e.exports="function"==typeof Object.create?function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:function(t,r){if(r){t.super_=r;var o=function(){};o.prototype=r.prototype,t.prototype=new o,t.prototype.constructor=t}}},4155:e=>{var t,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(d){if(t===setTimeout)return setTimeout(d,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(d,0);try{return t(d,0)}catch{try{return t.call(null,d,0)}catch{return t.call(this,d,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch{t=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch{r=s}}();var f,m=[],S=!1,T=-1;function I(){S&&f&&(S=!1,f.length?m=f.concat(m):T=-1,m.length&&P())}function P(){if(!S){var d=u(I);S=!0;for(var D=m.length;D;){for(f=m,m=[];++T1)for(var L=1;L{var o=r(4155),i=65536,u=r(396).Buffer,f=r.g.crypto||r.g.msCrypto;e.exports=f&&f.getRandomValues?function(m,S){if(m>4294967295)throw new RangeError("requested too many random bytes");var T=u.allocUnsafe(m);if(m>0)if(m>i)for(var I=0;I{var t={};function r(i,s,u){u||(u=Error);var f=function(m){var S,T;function I(P,O,M){return m.call(this,"string"==typeof s?s:s(P,O,M))||this}return T=m,(S=I).prototype=Object.create(T.prototype),S.prototype.constructor=S,S.__proto__=T,I}(u);f.prototype.name=u.name,f.prototype.code=i,t[i]=f}function o(i,s){if(Array.isArray(i)){var u=i.length;return i=i.map(function(f){return String(f)}),u>2?"one of ".concat(s," ").concat(i.slice(0,u-1).join(", "),", or ")+i[u-1]:2===u?"one of ".concat(s," ").concat(i[0]," or ").concat(i[1]):"of ".concat(s," ").concat(i[0])}return"of ".concat(s," ").concat(String(i))}r("ERR_INVALID_OPT_VALUE",function(i,s){return'The value "'+s+'" is invalid for option "'+i+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(i,s,u){var f,T,P,M;if("string"==typeof s&&("not ","not "===s.substr(0,4))?(f="must not be",s=s.replace(/^not /,"")):f="must be",P=i," argument",(void 0===M||M>P.length)&&(M=P.length)," argument"===P.substring(M-9,M))T="The ".concat(i," ").concat(f," ").concat(o(s,"type"));else{var I=function(P,O,M){return"number"!=typeof M&&(M=0),!(M+1>P.length)&&-1!==P.indexOf(".",M)}(i)?"property":"argument";T='The "'.concat(i,'" ').concat(I," ").concat(f," ").concat(o(s,"type"))}return T+". Received type ".concat(typeof u)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(i){return"The "+i+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(i){return"Cannot call "+i+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(i){return"Unknown encoding: "+i},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.q=t},6753:(e,t,r)=>{var o=r(4155),i=Object.keys||function(O){var M=[];for(var d in O)M.push(d);return M};e.exports=T;var s=r(9481),u=r(4229);r(5717)(T,s);for(var f=i(u.prototype),m=0;m{e.exports=i;var o=r(4605);function i(s){if(!(this instanceof i))return new i(s);o.call(this,s)}r(5717)(i,o),i.prototype._transform=function(s,u,f){f(null,s)}},9481:(e,t,r)=>{var o,i=r(4155);e.exports=Ue,Ue.ReadableState=qe,r(7187);var S,s=function(Me,Ne){return Me.listeners(Ne).length},u=r(2503),f=r(8764).Buffer,m=r.g.Uint8Array||function(){},T=r(4616);S=T&&T.debuglog?T.debuglog("stream"):function(){};var I,P,O,M=r(7327),d=r(1195),D=r(2457).getHighWaterMark,L=r(4281).q,G=L.ERR_INVALID_ARG_TYPE,Z=L.ERR_STREAM_PUSH_AFTER_EOF,we=L.ERR_METHOD_NOT_IMPLEMENTED,xe=L.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(5717)(Ue,u);var Ae=d.errorOrDestroy,Se=["error","close","destroy","pause","resume"];function qe(Me,Ne,Dt){o=o||r(6753),"boolean"!=typeof Dt&&(Dt=Ne instanceof o),this.objectMode=!!(Me=Me||{}).objectMode,Dt&&(this.objectMode=this.objectMode||!!Me.readableObjectMode),this.highWaterMark=D(this,Me,"readableHighWaterMark",Dt),this.buffer=new M,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==Me.emitClose,this.autoDestroy=!!Me.autoDestroy,this.destroyed=!1,this.defaultEncoding=Me.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Me.encoding&&(I||(I=r(2553).s),this.decoder=new I(Me.encoding),this.encoding=Me.encoding)}function Ue(Me){if(o=o||r(6753),!(this instanceof Ue))return new Ue(Me);this._readableState=new qe(Me,this,this instanceof o),this.readable=!0,Me&&("function"==typeof Me.read&&(this._read=Me.read),"function"==typeof Me.destroy&&(this._destroy=Me.destroy)),u.call(this)}function ut(Me,Ne,Dt,xr,St){S("readableAddChunk",Ne);var an,Tn,zn,Wn,so,Tr=Me._readableState;if(null===Ne)Tr.reading=!1,function(Tn,zn){if(S("onEofChunk"),!zn.ended){if(zn.decoder){var Wn=zn.decoder.end();Wn&&Wn.length&&(zn.buffer.push(Wn),zn.length+=zn.objectMode?1:Wn.length)}zn.ended=!0,zn.sync?Ht(Tn):(zn.needReadable=!1,zn.emittedReadable||(zn.emittedReadable=!0,gr(Tn)))}}(Me,Tr);else if(St||(Tn=Tr,f.isBuffer(so=zn=Ne)||so instanceof m||"string"==typeof zn||void 0===zn||Tn.objectMode||(Wn=new G("chunk",["string","Buffer","Uint8Array"],zn)),an=Wn),an)Ae(Me,an);else if(Tr.objectMode||Ne&&Ne.length>0)if("string"==typeof Ne||Tr.objectMode||Object.getPrototypeOf(Ne)===f.prototype||(Ne=function(Tn){return f.from(Tn)}(Ne)),xr)Tr.endEmitted?Ae(Me,new xe):Ze(Me,Tr,Ne,!0);else if(Tr.ended)Ae(Me,new Z);else{if(Tr.destroyed)return!1;Tr.reading=!1,Tr.decoder&&!Dt?(Ne=Tr.decoder.write(Ne),Tr.objectMode||0!==Ne.length?Ze(Me,Tr,Ne,!1):lt(Me,Tr)):Ze(Me,Tr,Ne,!1)}else xr||(Tr.reading=!1,lt(Me,Tr));return!Tr.ended&&(Tr.lengthNe.highWaterMark&&(Ne.highWaterMark=((Dt=Me)>=wt?Dt=wt:(Dt--,Dt|=Dt>>>1,Dt|=Dt>>>2,Dt|=Dt>>>4,Dt|=Dt>>>8,Dt|=Dt>>>16,Dt++),Dt)),Me<=Ne.length?Me:Ne.ended?Ne.length:(Ne.needReadable=!0,0));var Dt}function Ht(Me){var Ne=Me._readableState;S("emitReadable",Ne.needReadable,Ne.emittedReadable),Ne.needReadable=!1,Ne.emittedReadable||(S("emitReadable",Ne.flowing),Ne.emittedReadable=!0,i.nextTick(gr,Me))}function gr(Me){var Ne=Me._readableState;S("emitReadable_",Ne.destroyed,Ne.length,Ne.ended),Ne.destroyed||!Ne.length&&!Ne.ended||(Me.emit("readable"),Ne.emittedReadable=!1),Ne.needReadable=!Ne.flowing&&!Ne.ended&&Ne.length<=Ne.highWaterMark,Ke(Me)}function lt(Me,Ne){Ne.readingMore||(Ne.readingMore=!0,i.nextTick(Xe,Me,Ne))}function Xe(Me,Ne){for(;!Ne.reading&&!Ne.ended&&(Ne.length0,Ne.resumeScheduled&&!Ne.paused?Ne.flowing=!0:Me.listenerCount("data")>0&&Me.resume()}function Pe(Me){S("readable nexttick read 0"),Me.read(0)}function it(Me,Ne){S("resume",Ne.reading),Ne.reading||Me.read(0),Ne.resumeScheduled=!1,Me.emit("resume"),Ke(Me),Ne.flowing&&!Ne.reading&&Me.read(0)}function Ke(Me){var Ne=Me._readableState;for(S("flow",Ne.flowing);Ne.flowing&&null!==Me.read(););}function Lt(Me,Ne){return 0===Ne.length?null:(Ne.objectMode?Dt=Ne.buffer.shift():!Me||Me>=Ne.length?(Dt=Ne.decoder?Ne.buffer.join(""):1===Ne.buffer.length?Ne.buffer.first():Ne.buffer.concat(Ne.length),Ne.buffer.clear()):Dt=Ne.buffer.consume(Me,Ne.decoder),Dt);var Dt}function sr(Me){var Ne=Me._readableState;S("endReadable",Ne.endEmitted),Ne.endEmitted||(Ne.ended=!0,i.nextTick(yr,Ne,Me))}function yr(Me,Ne){if(S("endReadableNT",Me.endEmitted,Me.length),!Me.endEmitted&&0===Me.length&&(Me.endEmitted=!0,Ne.readable=!1,Ne.emit("end"),Me.autoDestroy)){var Dt=Ne._writableState;(!Dt||Dt.autoDestroy&&Dt.finished)&&Ne.destroy()}}function pt(Me,Ne){for(var Dt=0,xr=Me.length;Dt=Ne.highWaterMark:Ne.length>0)||Ne.ended))return S("read: emitReadable",Ne.length,Ne.ended),0===Ne.length&&Ne.ended?sr(this):Ht(this),null;if(0===(Me=Ot(Me,Ne))&&Ne.ended)return 0===Ne.length&&sr(this),null;var xr,St=Ne.needReadable;return S("need readable",St),(0===Ne.length||Ne.length-Me0?Lt(Me,Ne):null)?(Ne.needReadable=Ne.length<=Ne.highWaterMark,Me=0):(Ne.length-=Me,Ne.awaitDrain=0),0===Ne.length&&(Ne.ended||(Ne.needReadable=!0),Dt!==Me&&Ne.ended&&sr(this)),null!==xr&&this.emit("data",xr),xr},Ue.prototype._read=function(Me){Ae(this,new we("_read()"))},Ue.prototype.pipe=function(Me,Ne){var Dt=this,xr=this._readableState;switch(xr.pipesCount){case 0:xr.pipes=Me;break;case 1:xr.pipes=[xr.pipes,Me];break;default:xr.pipes.push(Me)}xr.pipesCount+=1,S("pipe count=%d opts=%j",xr.pipesCount,Ne);var St=Ne&&!1===Ne.end||Me===i.stdout||Me===i.stderr?Q:Tr;function Tr(){S("onend"),Me.end()}xr.endEmitted?i.nextTick(St):Dt.once("end",St),Me.on("unpipe",function an(me,ze){S("onunpipe"),me===Dt&&ze&&!1===ze.hasUnpiped&&(ze.hasUnpiped=!0,S("cleanup"),Me.removeListener("close",Hn),Me.removeListener("finish",$),Me.removeListener("drain",Tn),Me.removeListener("error",so),Me.removeListener("unpipe",an),Dt.removeListener("end",Tr),Dt.removeListener("end",Q),Dt.removeListener("data",Wn),zn=!0,!xr.awaitDrain||Me._writableState&&!Me._writableState.needDrain||Tn())});var me,Tn=(me=Dt,function(){var ze=me._readableState;S("pipeOnDrain",ze.awaitDrain),ze.awaitDrain&&ze.awaitDrain--,0===ze.awaitDrain&&s(me,"data")&&(ze.flowing=!0,Ke(me))});Me.on("drain",Tn);var zn=!1;function Wn(me){S("ondata");var ze=Me.write(me);S("dest.write",ze),!1===ze&&((1===xr.pipesCount&&xr.pipes===Me||xr.pipesCount>1&&-1!==pt(xr.pipes,Me))&&!zn&&(S("false write response, pause",xr.awaitDrain),xr.awaitDrain++),Dt.pause())}function so(me){S("onerror",me),Q(),Me.removeListener("error",so),0===s(Me,"error")&&Ae(Me,me)}function Hn(){Me.removeListener("finish",$),Q()}function $(){S("onfinish"),Me.removeListener("close",Hn),Q()}function Q(){S("unpipe"),Dt.unpipe(Me)}return Dt.on("data",Wn),function(me,ze,Ye){if("function"==typeof me.prependListener)return me.prependListener(ze,Ye);me._events&&me._events[ze]?Array.isArray(me._events[ze])?me._events[ze].unshift(Ye):me._events[ze]=[Ye,me._events[ze]]:me.on(ze,Ye)}(Me,"error",so),Me.once("close",Hn),Me.once("finish",$),Me.emit("pipe",Dt),xr.flowing||(S("pipe resume"),Dt.resume()),Me},Ue.prototype.unpipe=function(Me){var Ne=this._readableState,Dt={hasUnpiped:!1};if(0===Ne.pipesCount)return this;if(1===Ne.pipesCount)return Me&&Me!==Ne.pipes||(Me||(Me=Ne.pipes),Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1,Me&&Me.emit("unpipe",this,Dt)),this;if(!Me){var xr=Ne.pipes,St=Ne.pipesCount;Ne.pipes=null,Ne.pipesCount=0,Ne.flowing=!1;for(var an=0;an0,!1!==xr.flowing&&this.resume()):"readable"===Me&&(xr.endEmitted||xr.readableListening||(xr.readableListening=xr.needReadable=!0,xr.flowing=!1,xr.emittedReadable=!1,S("on readable",xr.length,xr.reading),xr.length?Ht(this):xr.reading||i.nextTick(Pe,this))),Dt},Ue.prototype.removeListener=function(Me,Ne){var Dt=u.prototype.removeListener.call(this,Me,Ne);return"readable"===Me&&i.nextTick(Oe,this),Dt},Ue.prototype.removeAllListeners=function(Me){var Ne=u.prototype.removeAllListeners.apply(this,arguments);return"readable"!==Me&&void 0!==Me||i.nextTick(Oe,this),Ne},Ue.prototype.resume=function(){var Dt,Me=this._readableState;return Me.flowing||(S("resume"),Me.flowing=!Me.readableListening,this,(Dt=Me).resumeScheduled||(Dt.resumeScheduled=!0,i.nextTick(it,this,Dt))),Me.paused=!1,this},Ue.prototype.pause=function(){return S("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(S("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},Ue.prototype.wrap=function(Me){var Ne=this,Dt=this._readableState,xr=!1;for(var St in Me.on("end",function(){if(S("wrapped end"),Dt.decoder&&!Dt.ended){var Tr=Dt.decoder.end();Tr&&Tr.length&&Ne.push(Tr)}Ne.push(null)}),Me.on("data",function(Tr){S("wrapped data"),Dt.decoder&&(Tr=Dt.decoder.write(Tr)),Dt.objectMode&&null==Tr||(Dt.objectMode||Tr&&Tr.length)&&(Ne.push(Tr)||(xr=!0,Me.pause()))}),Me)void 0===this[St]&&"function"==typeof Me[St]&&(this[St]=function(Tr){return function(){return Me[Tr].apply(Me,arguments)}}(St));for(var an=0;an{e.exports=T;var o=r(4281).q,i=o.ERR_METHOD_NOT_IMPLEMENTED,s=o.ERR_MULTIPLE_CALLBACK,u=o.ERR_TRANSFORM_ALREADY_TRANSFORMING,f=o.ERR_TRANSFORM_WITH_LENGTH_0,m=r(6753);function S(O,M){var d=this._transformState;d.transforming=!1;var D=d.writecb;if(null===D)return this.emit("error",new s);d.writechunk=null,d.writecb=null,null!=M&&this.push(M),D(O);var L=this._readableState;L.reading=!1,(L.needReadable||L.length{var o,i=r(4155);function s(lt){var Xe=this;this.next=null,this.entry=null,this.finish=function(){!function(Oe,Pe,it){var Ke=Oe.entry;for(Oe.entry=null;Ke;){var Lt=Ke.callback;Pe.pendingcb--,Lt(void 0),Ke=Ke.next}Pe.corkedRequestsFree.next=Oe}(Xe,lt)}}e.exports=Ue,Ue.WritableState=qe;var T,u={deprecate:r(4927)},f=r(2503),m=r(8764).Buffer,S=r.g.Uint8Array||function(){},I=r(1195),P=r(2457).getHighWaterMark,O=r(4281).q,M=O.ERR_INVALID_ARG_TYPE,d=O.ERR_METHOD_NOT_IMPLEMENTED,D=O.ERR_MULTIPLE_CALLBACK,L=O.ERR_STREAM_CANNOT_PIPE,G=O.ERR_STREAM_DESTROYED,Z=O.ERR_STREAM_NULL_VALUES,we=O.ERR_STREAM_WRITE_AFTER_END,xe=O.ERR_UNKNOWN_ENCODING,Ae=I.errorOrDestroy;function Se(){}function qe(lt,Xe,Oe){o=o||r(6753),"boolean"!=typeof Oe&&(Oe=Xe instanceof o),this.objectMode=!!(lt=lt||{}).objectMode,Oe&&(this.objectMode=this.objectMode||!!lt.writableObjectMode),this.highWaterMark=P(this,lt,"writableHighWaterMark",Oe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===lt.decodeStrings),this.defaultEncoding=lt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(it){!function(Ke,Lt){var Ne,sr=Ke._writableState,yr=sr.sync,pt=sr.writecb;if("function"!=typeof pt)throw new D;if((Ne=sr).writing=!1,Ne.writecb=null,Ne.length-=Ne.writelen,Ne.writelen=0,Lt)!function(Ne,Dt,xr,St,an){--Dt.pendingcb,xr?(i.nextTick(an,St),i.nextTick(gr,Ne,Dt),Ne._writableState.errorEmitted=!0,Ae(Ne,St)):(an(St),Ne._writableState.errorEmitted=!0,Ae(Ne,St),gr(Ne,Dt))}(Ke,sr,yr,Lt,pt);else{var Me=Ot(sr)||Ke.destroyed;Me||sr.corked||sr.bufferProcessing||!sr.bufferedRequest||wt(Ke,sr),yr?i.nextTick(Ze,Ke,sr,Me,pt):Ze(Ke,sr,Me,pt)}}(Xe,it)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==lt.emitClose,this.autoDestroy=!!lt.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function Ue(lt){var Xe=this instanceof(o=o||r(6753));if(!Xe&&!T.call(Ue,this))return new Ue(lt);this._writableState=new qe(lt,this,Xe),this.writable=!0,lt&&("function"==typeof lt.write&&(this._write=lt.write),"function"==typeof lt.writev&&(this._writev=lt.writev),"function"==typeof lt.destroy&&(this._destroy=lt.destroy),"function"==typeof lt.final&&(this._final=lt.final)),f.call(this)}function ut(lt,Xe,Oe,Pe,it,Ke,Lt){Xe.writelen=Pe,Xe.writecb=Lt,Xe.writing=!0,Xe.sync=!0,Xe.destroyed?Xe.onwrite(new G("write")):Oe?lt._writev(it,Xe.onwrite):lt._write(it,Ke,Xe.onwrite),Xe.sync=!1}function Ze(lt,Xe,Oe,Pe){var it,Ke;Oe||(it=lt,0===(Ke=Xe).length&&Ke.needDrain&&(Ke.needDrain=!1,it.emit("drain"))),Xe.pendingcb--,Pe(),gr(lt,Xe)}function wt(lt,Xe){Xe.bufferProcessing=!0;var Oe=Xe.bufferedRequest;if(lt._writev&&Oe&&Oe.next){var it=new Array(Xe.bufferedRequestCount),Ke=Xe.corkedRequestsFree;Ke.entry=Oe;for(var Lt=0,sr=!0;Oe;)it[Lt]=Oe,Oe.isBuf||(sr=!1),Oe=Oe.next,Lt+=1;it.allBuffers=sr,ut(lt,Xe,!0,Xe.length,it,"",Ke.finish),Xe.pendingcb++,Xe.lastBufferedRequest=null,Ke.next?(Xe.corkedRequestsFree=Ke.next,Ke.next=null):Xe.corkedRequestsFree=new s(Xe),Xe.bufferedRequestCount=0}else{for(;Oe;){var yr=Oe.chunk;if(ut(lt,Xe,!1,Xe.objectMode?1:yr.length,yr,Oe.encoding,Oe.callback),Oe=Oe.next,Xe.bufferedRequestCount--,Xe.writing)break}null===Oe&&(Xe.lastBufferedRequest=null)}Xe.bufferedRequest=Oe,Xe.bufferProcessing=!1}function Ot(lt){return lt.ending&&0===lt.length&&null===lt.bufferedRequest&&!lt.finished&&!lt.writing}function Ht(lt,Xe){lt._final(function(Oe){Xe.pendingcb--,Oe&&Ae(lt,Oe),Xe.prefinished=!0,lt.emit("prefinish"),gr(lt,Xe)})}function gr(lt,Xe){var it,Ke,Oe=Ot(Xe);if(Oe&&(it=lt,(Ke=Xe).prefinished||Ke.finalCalled||("function"!=typeof it._final||Ke.destroyed?(Ke.prefinished=!0,it.emit("prefinish")):(Ke.pendingcb++,Ke.finalCalled=!0,i.nextTick(Ht,it,Ke))),0===Xe.pendingcb&&(Xe.finished=!0,lt.emit("finish"),Xe.autoDestroy))){var Pe=lt._readableState;(!Pe||Pe.autoDestroy&&Pe.endEmitted)&<.destroy()}return Oe}r(5717)(Ue,f),qe.prototype.getBuffer=function(){for(var lt=this.bufferedRequest,Xe=[];lt;)Xe.push(lt),lt=lt.next;return Xe},function(){try{Object.defineProperty(qe.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ue,Symbol.hasInstance,{value:function(lt){return!!T.call(this,lt)||this===Ue&<&<._writableState instanceof qe}})):T=function(lt){return lt instanceof this},Ue.prototype.pipe=function(){Ae(this,new L)},Ue.prototype.write=function(lt,Xe,Oe){var Pe,sr,yr,pt,it=this._writableState,Ke=!1,Lt=!it.objectMode&&(m.isBuffer(Pe=lt)||Pe instanceof S);return Lt&&!m.isBuffer(lt)&&(lt=m.from(lt)),"function"==typeof Xe&&(Oe=Xe,Xe=null),Lt?Xe="buffer":Xe||(Xe=it.defaultEncoding),"function"!=typeof Oe&&(Oe=Se),it.ending?(sr=this,yr=Oe,pt=new we,Ae(sr,pt),i.nextTick(yr,pt)):(Lt||function(sr,yr,pt,Me){var Ne;return null===pt?Ne=new Z:"string"==typeof pt||yr.objectMode||(Ne=new M("chunk",["string","Buffer"],pt)),!Ne||(Ae(sr,Ne),i.nextTick(Me,Ne),!1)}(this,it,lt,Oe))&&(it.pendingcb++,Ke=function(sr,yr,pt,Me,Ne,Dt){if(!pt){var xr=(zn=Me,(Tn=yr).objectMode||!1===Tn.decodeStrings||"string"!=typeof zn||(zn=m.from(zn,Ne)),zn);Me!==xr&&(pt=!0,Ne="buffer",Me=xr)}var Tn,zn,St=yr.objectMode?1:Me.length;yr.length+=St;var an=yr.length-1))throw new xe(lt);return this._writableState.defaultEncoding=lt,this},Object.defineProperty(Ue.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Ue.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Ue.prototype._write=function(lt,Xe,Oe){Oe(new d("_write()"))},Ue.prototype._writev=null,Ue.prototype.end=function(lt,Xe,Oe){var Ke,Lt,Pe=this._writableState;return"function"==typeof lt?(Oe=lt,lt=null,Xe=null):"function"==typeof Xe&&(Oe=Xe,Xe=null),null!=lt&&this.write(lt,Xe),Pe.corked&&(Pe.corked=1,this.uncork()),Pe.ending||(this,Lt=Oe,(Ke=Pe).ending=!0,gr(this,Ke),Lt&&(Ke.finished?i.nextTick(Lt):this.once("finish",Lt)),Ke.ended=!0,this.writable=!1),this},Object.defineProperty(Ue.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Ue.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(lt){this._writableState&&(this._writableState.destroyed=lt)}}),Ue.prototype.destroy=I.destroy,Ue.prototype._undestroy=I.undestroy,Ue.prototype._destroy=function(lt,Xe){Xe(lt)}},5850:(e,t,r)=>{var o,i=r(4155);function s(Z,we,xe){return we in Z?Object.defineProperty(Z,we,{value:xe,enumerable:!0,configurable:!0,writable:!0}):Z[we]=xe,Z}var u=r(8610),f=Symbol("lastResolve"),m=Symbol("lastReject"),S=Symbol("error"),T=Symbol("ended"),I=Symbol("lastPromise"),P=Symbol("handlePromise"),O=Symbol("stream");function M(Z,we){return{value:Z,done:we}}function d(Z){var we=Z[f];if(null!==we){var xe=Z[O].read();null!==xe&&(Z[I]=null,Z[f]=null,Z[m]=null,we(M(xe,!1)))}}function D(Z){i.nextTick(d,Z)}var L=Object.getPrototypeOf(function(){}),G=Object.setPrototypeOf((s(o={get stream(){return this[O]},next:function(){var Z=this,we=this[S];if(null!==we)return Promise.reject(we);if(this[T])return Promise.resolve(M(void 0,!0));if(this[O].destroyed)return new Promise(function(qe,Ue){i.nextTick(function(){Z[S]?Ue(Z[S]):qe(M(void 0,!0))})});var xe,qe,Ue,Ae=this[I];if(Ae)xe=new Promise((qe=Ae,Ue=this,function(ut,Ze){qe.then(function(){Ue[T]?ut(M(void 0,!0)):Ue[P](ut,Ze)},Ze)}));else{var Se=this[O].read();if(null!==Se)return Promise.resolve(M(Se,!1));xe=new Promise(this[P])}return this[I]=xe,xe}},Symbol.asyncIterator,function(){return this}),s(o,"return",function(){var Z=this;return new Promise(function(we,xe){Z[O].destroy(null,function(Ae){Ae?xe(Ae):we(M(void 0,!0))})})}),o),L);e.exports=function(Z){var we,xe=Object.create(G,(s(we={},O,{value:Z,writable:!0}),s(we,f,{value:null,writable:!0}),s(we,m,{value:null,writable:!0}),s(we,S,{value:null,writable:!0}),s(we,T,{value:Z._readableState.endEmitted,writable:!0}),s(we,P,{value:function(Ae,Se){var qe=xe[O].read();qe?(xe[I]=null,xe[f]=null,xe[m]=null,Ae(M(qe,!1))):(xe[f]=Ae,xe[m]=Se)},writable:!0}),we));return xe[I]=null,u(Z,function(Ae){if(Ae&&"ERR_STREAM_PREMATURE_CLOSE"!==Ae.code){var Se=xe[m];return null!==Se&&(xe[I]=null,xe[f]=null,xe[m]=null,Se(Ae)),void(xe[S]=Ae)}var qe=xe[f];null!==qe&&(xe[I]=null,xe[f]=null,xe[m]=null,qe(M(void 0,!0))),xe[T]=!0}),Z.on("readable",D.bind(null,xe)),xe}},7327:(e,t,r)=>{function o(S,T){var I=Object.keys(S);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(S);T&&(P=P.filter(function(O){return Object.getOwnPropertyDescriptor(S,O).enumerable})),I.push.apply(I,P)}return I}function i(S,T,I){return T in S?Object.defineProperty(S,T,{value:I,enumerable:!0,configurable:!0,writable:!0}):S[T]=I,S}var u=r(8764).Buffer,f=r(2361).inspect,m=f&&f.custom||"inspect";e.exports=function(){function S(){(function(O,M){if(!(O instanceof M))throw new TypeError("Cannot call a class as a function")})(this,S),this.head=null,this.tail=null,this.length=0}var I;return I=[{key:"push",value:function(O){var M={data:O,next:null};this.length>0?this.tail.next=M:this.head=M,this.tail=M,++this.length}},{key:"unshift",value:function(O){var M={data:O,next:this.head};0===this.length&&(this.tail=M),this.head=M,++this.length}},{key:"shift",value:function(){if(0!==this.length){var O=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,O}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(O){if(0===this.length)return"";for(var M=this.head,d=""+M.data;M=M.next;)d+=O+M.data;return d}},{key:"concat",value:function(O){if(0===this.length)return u.alloc(0);for(var L=u.allocUnsafe(O>>>0),G=this.head,Z=0;G;)u.prototype.copy.call(G.data,L,Z),Z+=G.data.length,G=G.next;return L}},{key:"consume",value:function(O,M){var d;return OL.length?L.length:O;if(D+=G===L.length?L:L.slice(0,O),0==(O-=G)){G===L.length?(++d,this.head=M.next?M.next:this.tail=null):(this.head=M,M.data=L.slice(G));break}++d}return this.length-=d,D}},{key:"_getBuffer",value:function(O){var M=u.allocUnsafe(O),d=this.head,D=1;for(d.data.copy(M),O-=d.data.length;d=d.next;){var L=d.data,G=O>L.length?L.length:O;if(L.copy(M,M.length-O,0,G),0==(O-=G)){G===L.length?(++D,this.head=d.next?d.next:this.tail=null):(this.head=d,d.data=L.slice(G));break}++D}return this.length-=D,M}},{key:m,value:function(O,M){return f(this,function(d){for(var D=1;D{var o=r(4155);function i(f,m){u(f,m),s(f)}function s(f){f._writableState&&!f._writableState.emitClose||f._readableState&&!f._readableState.emitClose||f.emit("close")}function u(f,m){f.emit("error",m)}e.exports={destroy:function(f,m){var S=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(m?m(f):f&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,o.nextTick(u,this,f)):o.nextTick(u,this,f)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(P){!m&&P?S._writableState?S._writableState.errorEmitted?o.nextTick(s,S):(S._writableState.errorEmitted=!0,o.nextTick(i,S,P)):o.nextTick(i,S,P):m?(o.nextTick(s,S),m(P)):o.nextTick(s,S)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(f,m){var S=f._readableState,T=f._writableState;S&&S.autoDestroy||T&&T.autoDestroy?f.destroy(m):f.emit("error",m)}}},8610:(e,t,r)=>{var o=r(4281).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function s(u,f,m){if("function"==typeof f)return s(u,null,f);var Z,we;f||(f={}),Z=m||i,we=!1,m=function(){if(!we){we=!0;for(var xe=arguments.length,Ae=new Array(xe),Se=0;Se{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},9946:(e,t,r)=>{var o,i=r(4281).q,s=i.ERR_MISSING_ARGS,u=i.ERR_STREAM_DESTROYED;function f(P){if(P)throw P}function S(P){P()}function T(P,O){return P.pipe(O)}e.exports=function(){for(var P=arguments.length,O=new Array(P),M=0;M0,function(xe){d||(d=xe),xe&&L.forEach(S),we||(L.forEach(S),D(d))})});return O.reduce(T)}},2457:(e,t,r)=>{var o=r(4281).q.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(i,s,u,f){var S,m=null!=(S=s).highWaterMark?S.highWaterMark:f?S[u]:null;if(null!=m){if(!isFinite(m)||Math.floor(m)!==m||m<0)throw new o(f?u:"highWaterMark",m);return Math.floor(m)}return i.objectMode?16:16384}}},2503:(e,t,r)=>{e.exports=r(7187).EventEmitter},4189:(e,t,r)=>{var o=r(396).Buffer;function i(s,u){this._block=o.alloc(s),this._finalSize=u,this._blockSize=s,this._len=0}i.prototype.update=function(s,u){"string"==typeof s&&(s=o.from(s,u=u||"utf8"));for(var f=this._block,m=this._blockSize,S=s.length,T=this._len,I=0;I=this._finalSize&&(this._update(this._block),this._block.fill(0));var f=8*this._len;if(f<=4294967295)this._block.writeUInt32BE(f,this._blockSize-4);else{var m=(4294967295&f)>>>0;this._block.writeUInt32BE((f-m)/4294967296,this._blockSize-8),this._block.writeUInt32BE(m,this._blockSize-4)}this._update(this._block);var T=this._hash();return s?T.toString(s):T},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},9072:(e,t,r)=>{var o=e.exports=function(i){i=i.toLowerCase();var s=o[i];if(!s)throw new Error(i+" is not supported (we accept pull requests)");return new s};o.sha=r(4448),o.sha1=r(8336),o.sha224=r(8432),o.sha256=r(7499),o.sha384=r(1686),o.sha512=r(7816)},4448:(e,t,r)=>{var o=r(5717),i=r(4189),s=r(396).Buffer,u=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);function m(){this.init(),this._w=f,i.call(this,64,56)}function S(I){return I<<30|I>>>2}function T(I,P,O,M){return 0===I?P&O|~P&M:2===I?P&O|P&M|O&M:P^O^M}o(m,i),m.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},m.prototype._update=function(I){for(var P,O=this._w,M=0|this._a,d=0|this._b,D=0|this._c,L=0|this._d,G=0|this._e,Z=0;Z<16;++Z)O[Z]=I.readInt32BE(4*Z);for(;Z<80;++Z)O[Z]=O[Z-3]^O[Z-8]^O[Z-14]^O[Z-16];for(var we=0;we<80;++we){var xe=~~(we/20),Ae=0|((P=M)<<5|P>>>27)+T(xe,d,D,L)+G+O[we]+u[xe];G=L,L=D,D=S(d),d=M,M=Ae}this._a=M+this._a|0,this._b=d+this._b|0,this._c=D+this._c|0,this._d=L+this._d|0,this._e=G+this._e|0},m.prototype._hash=function(){var I=s.allocUnsafe(20);return I.writeInt32BE(0|this._a,0),I.writeInt32BE(0|this._b,4),I.writeInt32BE(0|this._c,8),I.writeInt32BE(0|this._d,12),I.writeInt32BE(0|this._e,16),I},e.exports=m},8336:(e,t,r)=>{var o=r(5717),i=r(4189),s=r(396).Buffer,u=[1518500249,1859775393,-1894007588,-899497514],f=new Array(80);function m(){this.init(),this._w=f,i.call(this,64,56)}function S(P){return P<<5|P>>>27}function T(P){return P<<30|P>>>2}function I(P,O,M,d){return 0===P?O&M|~O&d:2===P?O&M|O&d|M&d:O^M^d}o(m,i),m.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},m.prototype._update=function(P){for(var O,M=this._w,d=0|this._a,D=0|this._b,L=0|this._c,G=0|this._d,Z=0|this._e,we=0;we<16;++we)M[we]=P.readInt32BE(4*we);for(;we<80;++we)M[we]=(O=M[we-3]^M[we-8]^M[we-14]^M[we-16])<<1|O>>>31;for(var xe=0;xe<80;++xe){var Ae=~~(xe/20),Se=S(d)+I(Ae,D,L,G)+Z+M[xe]+u[Ae]|0;Z=G,G=L,L=T(D),D=d,d=Se}this._a=d+this._a|0,this._b=D+this._b|0,this._c=L+this._c|0,this._d=G+this._d|0,this._e=Z+this._e|0},m.prototype._hash=function(){var P=s.allocUnsafe(20);return P.writeInt32BE(0|this._a,0),P.writeInt32BE(0|this._b,4),P.writeInt32BE(0|this._c,8),P.writeInt32BE(0|this._d,12),P.writeInt32BE(0|this._e,16),P},e.exports=m},8432:(e,t,r)=>{var o=r(5717),i=r(7499),s=r(4189),u=r(396).Buffer,f=new Array(64);function m(){this.init(),this._w=f,s.call(this,64,56)}o(m,i),m.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},m.prototype._hash=function(){var S=u.allocUnsafe(28);return S.writeInt32BE(this._a,0),S.writeInt32BE(this._b,4),S.writeInt32BE(this._c,8),S.writeInt32BE(this._d,12),S.writeInt32BE(this._e,16),S.writeInt32BE(this._f,20),S.writeInt32BE(this._g,24),S},e.exports=m},7499:(e,t,r)=>{var o=r(5717),i=r(4189),s=r(396).Buffer,u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],f=new Array(64);function m(){this.init(),this._w=f,i.call(this,64,56)}function S(M,d,D){return D^M&(d^D)}function T(M,d,D){return M&d|D&(M|d)}function I(M){return(M>>>2|M<<30)^(M>>>13|M<<19)^(M>>>22|M<<10)}function P(M){return(M>>>6|M<<26)^(M>>>11|M<<21)^(M>>>25|M<<7)}function O(M){return(M>>>7|M<<25)^(M>>>18|M<<14)^M>>>3}o(m,i),m.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},m.prototype._update=function(M){for(var d,D=this._w,L=0|this._a,G=0|this._b,Z=0|this._c,we=0|this._d,xe=0|this._e,Ae=0|this._f,Se=0|this._g,qe=0|this._h,Ue=0;Ue<16;++Ue)D[Ue]=M.readInt32BE(4*Ue);for(;Ue<64;++Ue)D[Ue]=0|(((d=D[Ue-2])>>>17|d<<15)^(d>>>19|d<<13)^d>>>10)+D[Ue-7]+O(D[Ue-15])+D[Ue-16];for(var ut=0;ut<64;++ut){var Ze=qe+P(xe)+S(xe,Ae,Se)+u[ut]+D[ut]|0,wt=I(L)+T(L,G,Z)|0;qe=Se,Se=Ae,Ae=xe,xe=we+Ze|0,we=Z,Z=G,G=L,L=Ze+wt|0}this._a=L+this._a|0,this._b=G+this._b|0,this._c=Z+this._c|0,this._d=we+this._d|0,this._e=xe+this._e|0,this._f=Ae+this._f|0,this._g=Se+this._g|0,this._h=qe+this._h|0},m.prototype._hash=function(){var M=s.allocUnsafe(32);return M.writeInt32BE(this._a,0),M.writeInt32BE(this._b,4),M.writeInt32BE(this._c,8),M.writeInt32BE(this._d,12),M.writeInt32BE(this._e,16),M.writeInt32BE(this._f,20),M.writeInt32BE(this._g,24),M.writeInt32BE(this._h,28),M},e.exports=m},1686:(e,t,r)=>{var o=r(5717),i=r(7816),s=r(4189),u=r(396).Buffer,f=new Array(160);function m(){this.init(),this._w=f,s.call(this,128,112)}o(m,i),m.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},m.prototype._hash=function(){var S=u.allocUnsafe(48);function T(I,P,O){S.writeInt32BE(I,O),S.writeInt32BE(P,O+4)}return T(this._ah,this._al,0),T(this._bh,this._bl,8),T(this._ch,this._cl,16),T(this._dh,this._dl,24),T(this._eh,this._el,32),T(this._fh,this._fl,40),S},e.exports=m},7816:(e,t,r)=>{var o=r(5717),i=r(4189),s=r(396).Buffer,u=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],f=new Array(160);function m(){this.init(),this._w=f,i.call(this,128,112)}function S(G,Z,we){return we^G&(Z^we)}function T(G,Z,we){return G&Z|we&(G|Z)}function I(G,Z){return(G>>>28|Z<<4)^(Z>>>2|G<<30)^(Z>>>7|G<<25)}function P(G,Z){return(G>>>14|Z<<18)^(G>>>18|Z<<14)^(Z>>>9|G<<23)}function O(G,Z){return(G>>>1|Z<<31)^(G>>>8|Z<<24)^G>>>7}function M(G,Z){return(G>>>1|Z<<31)^(G>>>8|Z<<24)^(G>>>7|Z<<25)}function d(G,Z){return(G>>>19|Z<<13)^(Z>>>29|G<<3)^G>>>6}function D(G,Z){return(G>>>19|Z<<13)^(Z>>>29|G<<3)^(G>>>6|Z<<26)}function L(G,Z){return G>>>0>>0?1:0}o(m,i),m.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},m.prototype._update=function(G){for(var Z=this._w,we=0|this._ah,xe=0|this._bh,Ae=0|this._ch,Se=0|this._dh,qe=0|this._eh,Ue=0|this._fh,ut=0|this._gh,Ze=0|this._hh,wt=0|this._al,Ot=0|this._bl,Ht=0|this._cl,gr=0|this._dl,lt=0|this._el,Xe=0|this._fl,Oe=0|this._gl,Pe=0|this._hl,it=0;it<32;it+=2)Z[it]=G.readInt32BE(4*it),Z[it+1]=G.readInt32BE(4*it+4);for(;it<160;it+=2){var Ke=Z[it-30],Lt=Z[it-30+1],sr=O(Ke,Lt),yr=M(Lt,Ke),pt=d(Ke=Z[it-4],Lt=Z[it-4+1]),Me=D(Lt,Ke),xr=Z[it-32],St=Z[it-32+1],an=yr+Z[it-14+1]|0,Tr=sr+Z[it-14]+L(an,yr)|0;Tr=(Tr=Tr+pt+L(an=an+Me|0,Me)|0)+xr+L(an=an+St|0,St)|0,Z[it]=Tr,Z[it+1]=an}for(var Tn=0;Tn<160;Tn+=2){Tr=Z[Tn],an=Z[Tn+1];var zn=T(we,xe,Ae),Wn=T(wt,Ot,Ht),so=I(we,wt),Hn=I(wt,we),$=P(qe,lt),Q=P(lt,qe),me=u[Tn],ze=u[Tn+1],Ye=S(qe,Ue,ut),ht=S(lt,Xe,Oe),Mt=Pe+Q|0,xn=Ze+$+L(Mt,Pe)|0;xn=(xn=(xn=xn+Ye+L(Mt=Mt+ht|0,ht)|0)+me+L(Mt=Mt+ze|0,ze)|0)+Tr+L(Mt=Mt+an|0,an)|0;var Bn=Hn+Wn|0,xo=so+zn+L(Bn,Hn)|0;Ze=ut,Pe=Oe,ut=Ue,Oe=Xe,Ue=qe,Xe=lt,qe=Se+xn+L(lt=gr+Mt|0,gr)|0,Se=Ae,gr=Ht,Ae=xe,Ht=Ot,xe=we,Ot=wt,we=xn+xo+L(wt=Mt+Bn|0,Mt)|0}this._al=this._al+wt|0,this._bl=this._bl+Ot|0,this._cl=this._cl+Ht|0,this._dl=this._dl+gr|0,this._el=this._el+lt|0,this._fl=this._fl+Xe|0,this._gl=this._gl+Oe|0,this._hl=this._hl+Pe|0,this._ah=this._ah+we+L(this._al,wt)|0,this._bh=this._bh+xe+L(this._bl,Ot)|0,this._ch=this._ch+Ae+L(this._cl,Ht)|0,this._dh=this._dh+Se+L(this._dl,gr)|0,this._eh=this._eh+qe+L(this._el,lt)|0,this._fh=this._fh+Ue+L(this._fl,Xe)|0,this._gh=this._gh+ut+L(this._gl,Oe)|0,this._hh=this._hh+Ze+L(this._hl,Pe)|0},m.prototype._hash=function(){var G=s.allocUnsafe(64);function Z(we,xe,Ae){G.writeInt32BE(we,Ae),G.writeInt32BE(xe,Ae+4)}return Z(this._ah,this._al,0),Z(this._bh,this._bl,8),Z(this._ch,this._cl,16),Z(this._dh,this._dl,24),Z(this._eh,this._el,32),Z(this._fh,this._fl,40),Z(this._gh,this._gl,48),Z(this._hh,this._hl,56),G},e.exports=m},2830:(e,t,r)=>{e.exports=i;var o=r(7187).EventEmitter;function i(){o.call(this)}r(5717)(i,o),i.Readable=r(9481),i.Writable=r(4229),i.Duplex=r(6753),i.Transform=r(4605),i.PassThrough=r(2725),i.finished=r(8610),i.pipeline=r(9946),i.Stream=i,i.prototype.pipe=function(s,u){var f=this;function m(d){s.writable&&!1===s.write(d)&&f.pause&&f.pause()}function S(){f.readable&&f.resume&&f.resume()}f.on("data",m),s.on("drain",S),s._isStdio||u&&!1===u.end||(f.on("end",I),f.on("close",P));var T=!1;function I(){T||(T=!0,s.end())}function P(){T||(T=!0,"function"==typeof s.destroy&&s.destroy())}function O(d){if(M(),0===o.listenerCount(this,"error"))throw d}function M(){f.removeListener("data",m),s.removeListener("drain",S),f.removeListener("end",I),f.removeListener("close",P),f.removeListener("error",O),s.removeListener("error",O),f.removeListener("end",M),f.removeListener("close",M),s.removeListener("close",M)}return f.on("error",O),s.on("error",O),f.on("end",M),f.on("close",M),s.on("close",M),s.emit("pipe",f),s}},2553:(e,t,r)=>{var o=r(396).Buffer,i=o.isEncoding||function(M){switch((M=""+M)&&M.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(M){var d;switch(this.encoding=function(D){var L=function(G){if(!G)return"utf8";for(var Z;;)switch(G){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return G;default:if(Z)return;G=(""+G).toLowerCase(),Z=!0}}(D);if("string"!=typeof L&&(o.isEncoding===i||!i(D)))throw new Error("Unknown encoding: "+D);return L||D}(M),this.encoding){case"utf16le":this.text=m,this.end=S,d=4;break;case"utf8":this.fillLast=f,d=4;break;case"base64":this.text=T,this.end=I,d=3;break;default:return this.write=P,void(this.end=O)}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(d)}function u(M){return M<=127?0:M>>5==6?2:M>>4==14?3:M>>3==30?4:M>>6==2?-1:-2}function f(M){var d=this.lastTotal-this.lastNeed,D=function(L,G,Z){if(128!=(192&G[0]))return L.lastNeed=0,"\ufffd";if(L.lastNeed>1&&G.length>1){if(128!=(192&G[1]))return L.lastNeed=1,"\ufffd";if(L.lastNeed>2&&G.length>2&&128!=(192&G[2]))return L.lastNeed=2,"\ufffd"}}(this,M);return void 0!==D?D:this.lastNeed<=M.length?(M.copy(this.lastChar,d,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(M.copy(this.lastChar,d,0,M.length),void(this.lastNeed-=M.length))}function m(M,d){if((M.length-d)%2==0){var D=M.toString("utf16le",d);if(D){var L=D.charCodeAt(D.length-1);if(L>=55296&&L<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1],D.slice(0,-1)}return D}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=M[M.length-1],M.toString("utf16le",d,M.length-1)}function S(M){var d=M&&M.length?this.write(M):"";return this.lastNeed?d+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):d}function T(M,d){var D=(M.length-d)%3;return 0===D?M.toString("base64",d):(this.lastNeed=3-D,this.lastTotal=3,1===D?this.lastChar[0]=M[M.length-1]:(this.lastChar[0]=M[M.length-2],this.lastChar[1]=M[M.length-1]),M.toString("base64",d,M.length-D))}function I(M){var d=M&&M.length?this.write(M):"";return this.lastNeed?d+this.lastChar.toString("base64",0,3-this.lastNeed):d}function P(M){return M.toString(this.encoding)}function O(M){return M&&M.length?this.write(M):""}t.s=s,s.prototype.write=function(M){if(0===M.length)return"";var d,D;if(this.lastNeed){if(void 0===(d=this.fillLast(M)))return"";D=this.lastNeed,this.lastNeed=0}else D=0;return D=0?(Ae>0&&(G.lastNeed=Ae-1),Ae):--xe=0?(Ae>0&&(G.lastNeed=Ae-2),Ae):--xe=0?(Ae>0&&(2===Ae?Ae=0:G.lastNeed=Ae-3),Ae):0}(this,M,d);if(!this.lastNeed)return M.toString("utf8",d);this.lastTotal=D;var L=M.length-(D-this.lastNeed);return M.copy(this.lastChar,0,L),M.toString("utf8",d,L)},s.prototype.fillLast=function(M){if(this.lastNeed<=M.length)return M.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);M.copy(this.lastChar,this.lastTotal-this.lastNeed,0,M.length),this.lastNeed-=M.length}},396:(e,t,r)=>{var o=r(8764),i=o.Buffer;function s(f,m){for(var S in f)m[S]=f[S]}function u(f,m,S){return i(f,m,S)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=o:(s(o,t),t.Buffer=u),u.prototype=Object.create(i.prototype),s(i,u),u.from=function(f,m,S){if("number"==typeof f)throw new TypeError("Argument must not be a number");return i(f,m,S)},u.alloc=function(f,m,S){if("number"!=typeof f)throw new TypeError("Argument must be a number");var T=i(f);return void 0!==m?"string"==typeof S?T.fill(m,S):T.fill(m):T.fill(0),T},u.allocUnsafe=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return i(f)},u.allocUnsafeSlow=function(f){if("number"!=typeof f)throw new TypeError("Argument must be a number");return o.SlowBuffer(f)}},4927:(e,t,r)=>{function o(i){try{if(!r.g.localStorage)return!1}catch{return!1}var s=r.g.localStorage[i];return null!=s&&"true"===String(s).toLowerCase()}e.exports=function(i,s){if(o("noDeprecation"))return i;var u=!1;return function(){if(!u){if(o("throwDeprecation"))throw new Error(s);o("traceDeprecation")?console.trace(s):console.warn(s),u=!0}return i.apply(this,arguments)}}},255:e=>{var t={"&":"&",'"':""","'":"'","<":"<",">":">"};e.exports=function(r){return r&&r.replace?r.replace(/([&"<>'])/g,function(o,i){return t[i]}):r}},3479:(e,t,r)=>{var o=r(4155),i=r(255),s=r(2830).Stream;function u(m,S,T){T=T||0;var I,P,O=(I=S,new Array(T||0).join(I||"")),M=m;if("object"==typeof m&&(M=m[P=Object.keys(m)[0]])&&M._elem)return M._elem.name=P,M._elem.icount=T,M._elem.indent=S,M._elem.indents=O,M._elem.interrupt=M,M._elem;var d,D=[],L=[];function G(Z){Object.keys(Z).forEach(function(we){D.push(we+'="'+i(Z[we])+'"')})}switch(typeof M){case"object":if(null===M)break;M._attr&&G(M._attr),M._cdata&&L.push(("/g,"]]]]>")+"]]>"),M.forEach&&(d=!1,L.push(""),M.forEach(function(Z){"object"==typeof Z?"_attr"==Object.keys(Z)[0]?G(Z._attr):L.push(u(Z,S,T+1)):(L.pop(),d=!0,L.push(i(Z)))}),d||L.push(""));break;default:L.push(i(M))}return{name:P,interrupt:!1,attributes:D,content:L,icount:T,indents:O,indent:S}}function f(m,S,T){if("object"!=typeof S)return m(!1,S);var I=S.interrupt?1:S.content.length;function P(){for(;S.content.length;){var M=S.content.shift();if(void 0!==M){if(O(M))return;f(m,M)}}m(!1,(I>1?S.indents:"")+(S.name?"":"")+(S.indent&&!T?"\n":"")),T&&T()}function O(M){return!!M.interrupt&&(M.interrupt.append=m,M.interrupt.end=P,M.interrupt=!1,m(!0),!0)}if(m(!1,S.indents+(S.name?"<"+S.name:"")+(S.attributes.length?" "+S.attributes.join(" "):"")+(I?S.name?">":"":S.name?"/>":"")+(S.indent&&I>1?"\n":"")),!I)return m(!1,S.indent?"\n":"");O(S)||P()}e.exports=function(m,S){"object"!=typeof S&&(S={indent:S});var T,I,P=S.stream?new s:null,O="",M=!1,d=S.indent?!0===S.indent?" ":S.indent:"",D=!0;function L(xe){D?o.nextTick(xe):xe()}function G(xe,Ae){if(void 0!==Ae&&(O+=Ae),xe&&!M&&(P=P||new s,M=!0),xe&&M){var Se=O;L(function(){P.emit("data",Se)}),O=""}}function Z(xe,Ae){f(G,u(xe,d,d?1:0),Ae)}function we(){if(P){var xe=O;L(function(){P.emit("data",xe),P.emit("end"),P.readable=!1,P.emit("close")})}}return L(function(){D=!1}),S.declaration&&(I={version:"1.0",encoding:(T=S.declaration).encoding||"UTF-8"},T.standalone&&(I.standalone=T.standalone),Z({"?xml":{_attr:I}}),O=O.replace("/>","?>")),m&&m.forEach?m.forEach(function(xe,Ae){var Se;Ae+1===m.length&&(Se=we),Z(xe,Se)}):Z(m,we),P?(P.readable=!0,P):O},e.exports.element=e.exports.Element=function(){return{_elem:u(Array.prototype.slice.call(arguments)),push:function(T){if(!this.append)throw new Error("not assigned to a parent!");var I=this,P=this._elem.indent;f(this.append,u(T,P,this._elem.icount+(P?1:0)),function(){I.append(!0)})},close:function(T){void 0!==T&&this.push(T),this.end&&this.end()}}}},5102:(e,t,r)=>{var o={"./all.js":5308,"./auth/actions.js":5812,"./auth/index.js":3705,"./auth/reducers.js":3962,"./auth/selectors.js":35,"./auth/spec-wrap-actions.js":8302,"./configs/actions.js":714,"./configs/helpers.js":2256,"./configs/index.js":1661,"./configs/reducers.js":7743,"./configs/selectors.js":9018,"./configs/spec-actions.js":2698,"./deep-linking/helpers.js":1970,"./deep-linking/index.js":4980,"./deep-linking/layout.js":5858,"./deep-linking/operation-tag-wrapper.jsx":4584,"./deep-linking/operation-wrapper.jsx":877,"./download-url.js":8011,"./err/actions.js":4966,"./err/error-transformers/hook.js":6808,"./err/error-transformers/transformers/not-of-type.js":2392,"./err/error-transformers/transformers/parameter-oneof.js":1835,"./err/index.js":7793,"./err/reducers.js":3527,"./err/selectors.js":7667,"./filter/index.js":9978,"./filter/opsFilter.js":4309,"./layout/actions.js":5474,"./layout/index.js":6821,"./layout/reducers.js":5672,"./layout/selectors.js":4400,"./layout/spec-extensions/wrap-selector.js":8989,"./logs/index.js":9150,"./oas3/actions.js":7002,"./oas3/auth-extensions/wrap-selectors.js":3723,"./oas3/components/callbacks.jsx":3427,"./oas3/components/http-auth.jsx":6775,"./oas3/components/index.js":6467,"./oas3/components/operation-link.jsx":5757,"./oas3/components/operation-servers.jsx":6796,"./oas3/components/request-body-editor.jsx":5327,"./oas3/components/request-body.jsx":2458,"./oas3/components/servers-container.jsx":9928,"./oas3/components/servers.jsx":6617,"./oas3/helpers.jsx":7779,"./oas3/index.js":7451,"./oas3/reducers.js":2109,"./oas3/selectors.js":5065,"./oas3/spec-extensions/selectors.js":1741,"./oas3/spec-extensions/wrap-selectors.js":2044,"./oas3/wrap-components/auth-item.jsx":356,"./oas3/wrap-components/index.js":7761,"./oas3/wrap-components/json-schema-string.jsx":287,"./oas3/wrap-components/markdown.jsx":2460,"./oas3/wrap-components/model.jsx":3499,"./oas3/wrap-components/online-validator-badge.js":58,"./oas3/wrap-components/version-stamp.jsx":9487,"./on-complete/index.js":8560,"./request-snippets/fn.js":4624,"./request-snippets/index.js":6575,"./request-snippets/request-snippets.jsx":4206,"./request-snippets/selectors.js":4669,"./safe-render/components/error-boundary.jsx":6195,"./safe-render/components/fallback.jsx":9403,"./safe-render/fn.jsx":6189,"./safe-render/index.js":8102,"./samples/fn.js":2473,"./samples/index.js":8883,"./spec/actions.js":5179,"./spec/index.js":7038,"./spec/reducers.js":32,"./spec/selectors.js":3881,"./spec/wrap-actions.js":7508,"./swagger-js/configs-wrap-actions.js":4852,"./swagger-js/index.js":2990,"./util/index.js":8525,"./view/fn.js":8347,"./view/index.js":3420,"./view/root-injects.jsx":5005,"core/plugins/all.js":5308,"core/plugins/auth/actions.js":5812,"core/plugins/auth/index.js":3705,"core/plugins/auth/reducers.js":3962,"core/plugins/auth/selectors.js":35,"core/plugins/auth/spec-wrap-actions.js":8302,"core/plugins/configs/actions.js":714,"core/plugins/configs/helpers.js":2256,"core/plugins/configs/index.js":1661,"core/plugins/configs/reducers.js":7743,"core/plugins/configs/selectors.js":9018,"core/plugins/configs/spec-actions.js":2698,"core/plugins/deep-linking/helpers.js":1970,"core/plugins/deep-linking/index.js":4980,"core/plugins/deep-linking/layout.js":5858,"core/plugins/deep-linking/operation-tag-wrapper.jsx":4584,"core/plugins/deep-linking/operation-wrapper.jsx":877,"core/plugins/download-url.js":8011,"core/plugins/err/actions.js":4966,"core/plugins/err/error-transformers/hook.js":6808,"core/plugins/err/error-transformers/transformers/not-of-type.js":2392,"core/plugins/err/error-transformers/transformers/parameter-oneof.js":1835,"core/plugins/err/index.js":7793,"core/plugins/err/reducers.js":3527,"core/plugins/err/selectors.js":7667,"core/plugins/filter/index.js":9978,"core/plugins/filter/opsFilter.js":4309,"core/plugins/layout/actions.js":5474,"core/plugins/layout/index.js":6821,"core/plugins/layout/reducers.js":5672,"core/plugins/layout/selectors.js":4400,"core/plugins/layout/spec-extensions/wrap-selector.js":8989,"core/plugins/logs/index.js":9150,"core/plugins/oas3/actions.js":7002,"core/plugins/oas3/auth-extensions/wrap-selectors.js":3723,"core/plugins/oas3/components/callbacks.jsx":3427,"core/plugins/oas3/components/http-auth.jsx":6775,"core/plugins/oas3/components/index.js":6467,"core/plugins/oas3/components/operation-link.jsx":5757,"core/plugins/oas3/components/operation-servers.jsx":6796,"core/plugins/oas3/components/request-body-editor.jsx":5327,"core/plugins/oas3/components/request-body.jsx":2458,"core/plugins/oas3/components/servers-container.jsx":9928,"core/plugins/oas3/components/servers.jsx":6617,"core/plugins/oas3/helpers.jsx":7779,"core/plugins/oas3/index.js":7451,"core/plugins/oas3/reducers.js":2109,"core/plugins/oas3/selectors.js":5065,"core/plugins/oas3/spec-extensions/selectors.js":1741,"core/plugins/oas3/spec-extensions/wrap-selectors.js":2044,"core/plugins/oas3/wrap-components/auth-item.jsx":356,"core/plugins/oas3/wrap-components/index.js":7761,"core/plugins/oas3/wrap-components/json-schema-string.jsx":287,"core/plugins/oas3/wrap-components/markdown.jsx":2460,"core/plugins/oas3/wrap-components/model.jsx":3499,"core/plugins/oas3/wrap-components/online-validator-badge.js":58,"core/plugins/oas3/wrap-components/version-stamp.jsx":9487,"core/plugins/on-complete/index.js":8560,"core/plugins/request-snippets/fn.js":4624,"core/plugins/request-snippets/index.js":6575,"core/plugins/request-snippets/request-snippets.jsx":4206,"core/plugins/request-snippets/selectors.js":4669,"core/plugins/safe-render/components/error-boundary.jsx":6195,"core/plugins/safe-render/components/fallback.jsx":9403,"core/plugins/safe-render/fn.jsx":6189,"core/plugins/safe-render/index.js":8102,"core/plugins/samples/fn.js":2473,"core/plugins/samples/index.js":8883,"core/plugins/spec/actions.js":5179,"core/plugins/spec/index.js":7038,"core/plugins/spec/reducers.js":32,"core/plugins/spec/selectors.js":3881,"core/plugins/spec/wrap-actions.js":7508,"core/plugins/swagger-js/configs-wrap-actions.js":4852,"core/plugins/swagger-js/index.js":2990,"core/plugins/util/index.js":8525,"core/plugins/view/fn.js":8347,"core/plugins/view/index.js":3420,"core/plugins/view/root-injects.jsx":5005};function i(u){var f=s(u);return r(f)}function s(u){if(!r.o(o,u)){var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}return o[u]}i.keys=function(){return Object.keys(o)},i.resolve=s,e.exports=i,i.id=5102},2517:e=>{e.exports="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwcHgiICBoZWlnaHQ9IjIwMHB4IiAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCIgcHJlc2VydmVBc3BlY3RSYXRpbz0ieE1pZFlNaWQiIGNsYXNzPSJsZHMtcm9sbGluZyIgc3R5bGU9ImJhY2tncm91bmQtaW1hZ2U6IG5vbmU7IGJhY2tncm91bmQtcG9zaXRpb246IGluaXRpYWwgaW5pdGlhbDsgYmFja2dyb3VuZC1yZXBlYXQ6IGluaXRpYWwgaW5pdGlhbDsiPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIGZpbGw9Im5vbmUiIG5nLWF0dHItc3Ryb2tlPSJ7e2NvbmZpZy5jb2xvcn19IiBuZy1hdHRyLXN0cm9rZS13aWR0aD0ie3tjb25maWcud2lkdGh9fSIgbmctYXR0ci1yPSJ7e2NvbmZpZy5yYWRpdXN9fSIgbmctYXR0ci1zdHJva2UtZGFzaGFycmF5PSJ7e2NvbmZpZy5kYXNoYXJyYXl9fSIgc3Ryb2tlPSIjNTU1NTU1IiBzdHJva2Utd2lkdGg9IjEwIiByPSIzNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTY0LjkzMzYxNDMxMzQ2NDE1IDU2Ljk3Nzg3MTQzNzgyMTM4Ij48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgY2FsY01vZGU9ImxpbmVhciIgdmFsdWVzPSIwIDUwIDUwOzM2MCA1MCA1MCIga2V5VGltZXM9IjA7MSIgZHVyPSIxcyIgYmVnaW49IjBzIiByZXBlYXRDb3VudD0iaW5kZWZpbml0ZSI+PC9hbmltYXRlVHJhbnNmb3JtPjwvY2lyY2xlPjwvc3ZnPgo="},5163:e=>{e.exports='---\nurl: "https://petstore.swagger.io/v2/swagger.json"\ndom_id: "#swagger-ui"\nvalidatorUrl: "https://validator.swagger.io/validator"\n'},8898:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>MS()}),i)},4163:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>NS()}),i)},5527:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>DS()}),i)},5171:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>LS()}),i)},2954:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>US()}),i)},7930:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>zS()}),i)},6145:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>VS()}),i)},1778:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>GS()}),i)},29:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>YS()}),i)},2372:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>XS()}),i)},8818:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>QS()}),i)},5487:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>e_()}),i)},2565:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>r_()}),i)},6785:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>o_()}),i)},8136:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>a_()}),i)},9963:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>l_()}),i)},4350:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>c_()}),i)},3590:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>d_()}),i)},5942:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>h_()}),i)},313:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>g_()}),i)},6914:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>y_()}),i)},7512:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>b_()}),i)},2740:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>S_()}),i)},374:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>w_()}),i)},6235:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>A_()}),i)},3769:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>T_()}),i)},775:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>N_}),i)},863:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>Gm}),i)},4780:e=>{e.exports=F_},8096:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>B_()}),i)},3294:e=>{e.exports=$_},9725:(e,t,r)=>{var i;e.exports=(r.d(i={},{List:()=>Vc.List,Map:()=>Vc.Map,OrderedMap:()=>Vc.OrderedMap,Seq:()=>Vc.Seq,Set:()=>Vc.Set,default:()=>z_(),fromJS:()=>Vc.fromJS}),i)},626:(e,t,r)=>{var i;e.exports=(r.d(i={},{JSON_SCHEMA:()=>iy,default:()=>lA}),i)},9908:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>cA()}),i)},7068:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>dA()}),i)},5476:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>hA()}),i)},5053:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>gA()}),i)},810:(e,t,r)=>{var i;e.exports=(r.d(i={},{Component:()=>w.Component,PureComponent:()=>w.PureComponent,default:()=>w,useEffect:()=>w.useEffect,useRef:()=>w.useRef,useState:()=>w.useState}),i)},9874:(e,t,r)=>{var i;e.exports=(r.d(i={},{CopyToClipboard:()=>vA.CopyToClipboard}),i)},9569:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>EA()}),i)},9871:(e,t,r)=>{var i;e.exports=(r.d(i={},{applyMiddleware:()=>AA,bindActionCreators:()=>CA,compose:()=>dy,createStore:()=>cy}),i)},3952:(e,t,r)=>{var i;e.exports=(r.d(i={},{Remarkable:()=>fc}),i)},8639:(e,t,r)=>{var i;e.exports=(r.d(i={},{createSelector:()=>Py}),i)},8518:(e,t,r)=>{var i;e.exports=(r.d(i={},{serializeError:()=>gO.serializeError}),i)},5013:(e,t,r)=>{var i;e.exports=(r.d(i={},{opId:()=>Om}),i)},8900:(e,t,r)=>{var i;e.exports=(r.d(i={},{default:()=>yO()}),i)},2361:()=>{},4616:()=>{},6718:(e,t,r)=>{e.exports=r(1910)}},My={};function Cr(e){var t=My[e];if(void 0!==t)return t.exports;var r=My[e]={exports:{}};return LO[e](r,r.exports,Cr),r.exports}Cr.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return Cr.d(t,{a:t}),t},Cr.d=(e,t)=>{for(var r in t)Cr.o(t,r)&&!Cr.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},Cr.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),Cr.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Cr.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var ky={};(()=>{Cr.d(ky,{Z:()=>u4});var e={};Cr.r(e),Cr.d(e,{Button:()=>Yy,Col:()=>E5,Collapse:()=>Qy,Container:()=>y5,Input:()=>S5,Link:()=>Xy,Row:()=>b5,Select:()=>Jy,TextArea:()=>x5});var t={};Cr.r(t),Cr.d(t,{JsonSchemaArrayItemFile:()=>Og,JsonSchemaArrayItemText:()=>Ag,JsonSchemaForm:()=>r1,JsonSchema_array:()=>o1,JsonSchema_boolean:()=>i1,JsonSchema_object:()=>a1,JsonSchema_string:()=>n1});const r=(Cr.d(V={},{default:()=>bO()}),V);var V,o=Cr(6145),i=Cr(2740),s=Cr(313),u=Cr(7698),f=Cr.n(u),m=Cr(5527),S=Cr(7512),T=Cr(8136),I=Cr(4163),P=Cr(6785),O=Cr(2565),M=Cr(5171),d=Cr(810),D=Cr(9871),L=Cr(9725);const G=(nt=>{var V={};return Cr.d(V,nt),V})({combineReducers:()=>xO.H});var Z=Cr(8518);const we=(nt=>{var V={};return Cr.d(V,nt),V})({default:()=>_O()});var xe=Cr(4966),Ae=Cr(7504),Se=Cr(6298);const qe=nt=>nt;class Ue{constructor(){var V;let J=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f()(this,{state:{},plugins:[],pluginsOptions:{},system:{configs:{},fn:{},components:{},rootInjects:{},statePlugins:{}},boundSystem:{},toolbox:{}},J),this.getSystem=(0,m.default)(V=this._getSystem).call(V,this),this.store=function(Ve,Be,et){let Je=[(0,Se._5)(et)];return(0,D.createStore)(Ve,Be,(Ae.Z.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||D.compose)((0,D.applyMiddleware)(...Je)))}(qe,(0,L.fromJS)(this.state),this.getSystem),this.buildSystem(!1),this.register(this.plugins)}getStore(){return this.store}register(V){let J=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];var ie=ut(V,this.getSystem(),this.pluginsOptions);wt(this.system,ie),J&&this.buildSystem(),Ze.call(this.system,V,this.getSystem())&&this.buildSystem()}buildSystem(){let V=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],J=this.getStore().dispatch,ie=this.getStore().getState;this.boundSystem=(0,S.default)({},this.getRootInjects(),this.getWrappedAndBoundActions(J),this.getWrappedAndBoundSelectors(ie,this.getSystem),this.getStateThunks(ie),this.getFn(),this.getConfigs()),V&&this.rebuildReducer()}_getSystem(){return this.boundSystem}getRootInjects(){var V,J,ie;return(0,S.default)({getSystem:this.getSystem,getStore:(0,m.default)(V=this.getStore).call(V,this),getComponents:(0,m.default)(J=this.getComponents).call(J,this),getState:this.getStore().getState,getConfigs:(0,m.default)(ie=this._getConfigs).call(ie,this),Im:L.default,React:d.default},this.system.rootInjects||{})}_getConfigs(){return this.system.configs}getConfigs(){return{configs:this.system.configs}}setConfigs(V){this.system.configs=V}rebuildReducer(){this.store.replaceReducer(function(J){var ie;let he=(0,P.default)(ie=(0,i.default)(J)).call(ie,(Ce,Ve)=>{return Ce[Ve]=(Be=J[Ve],function(){let et=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new L.Map,Je=arguments.length>1?arguments[1]:void 0;if(!Be)return et;let ot=Be[Je.type];if(ot){const It=Ot(ot)(et,Je);return null===It?et:It}return et}),Ce;var Be},{});return(0,i.default)(he).length?(0,G.combineReducers)(he):qe}((0,Se.Ay)(this.system.statePlugins,J=>J.reducers)))}getType(V){let J=V[0].toUpperCase()+(0,T.default)(V).call(V,1);return(0,Se.Q2)(this.system.statePlugins,(ie,he)=>{let Ce=ie[V];if(Ce)return{[he+J]:Ce}})}getSelectors(){return this.getType("selectors")}getActions(){let V=this.getType("actions");return(0,Se.Ay)(V,J=>(0,Se.Q2)(J,(ie,he)=>{if((0,Se.LQ)(ie))return{[he]:ie}}))}getWrappedAndBoundActions(V){var J=this;let ie=this.getBoundActions(V);return(0,Se.Ay)(ie,(he,Ce)=>{let Ve=this.system.statePlugins[(0,T.default)(Ce).call(Ce,0,-7)].wrapActions;return Ve?(0,Se.Ay)(he,(Be,et)=>{let Je=Ve[et];return Je?((0,I.default)(Je)||(Je=[Je]),(0,P.default)(Je).call(Je,(ot,It)=>{let qt=function(){return It(ot,J.getSystem())(...arguments)};if(!(0,Se.LQ)(qt))throw new TypeError("wrapActions needs to return a function that returns a new function (ie the wrapped action)");return Ot(qt)},Be||Function.prototype)):Be}):he})}getWrappedAndBoundSelectors(V,J){var ie=this;let he=this.getBoundSelectors(V,J);return(0,Se.Ay)(he,(Ce,Ve)=>{let Be=[(0,T.default)(Ve).call(Ve,0,-9)],et=this.system.statePlugins[Be].wrapSelectors;return et?(0,Se.Ay)(Ce,(Je,ot)=>{let It=et[ot];return It?((0,I.default)(It)||(It=[It]),(0,P.default)(It).call(It,(qt,Ft)=>{let Wt=function(){for(var Er=arguments.length,Ir=new Array(Er),jr=0;jr(ie[he]=V.get(he),ie),{})}getStateThunks(V){var J;return(0,P.default)(J=(0,i.default)(this.system.statePlugins)).call(J,(ie,he)=>(ie[he]=()=>V().get(he),ie),{})}getFn(){return{fn:this.system.fn}}getComponents(V){const J=this.system.components[V];return(0,I.default)(J)?(0,P.default)(J).call(J,(ie,he)=>he(ie,this.getSystem())):void 0!==V?this.system.components[V]:this.system.components}getBoundSelectors(V,J){return(0,Se.Ay)(this.getSelectors(),(ie,he)=>{let Ce=[(0,T.default)(he).call(he,0,-9)];return(0,Se.Ay)(ie,Be=>function(){for(var et=arguments.length,Je=new Array(et),ot=0;ot"function"!=typeof he?(0,Se.Ay)(he,Ce=>ie(Ce)):function(){var Ce=null;try{Ce=he(...arguments)}catch(Ve){Ce={type:xe.NEW_THROWN_ERR,error:!0,payload:(0,Z.serializeError)(Ve)}}finally{return Ce}};return(0,Se.Ay)(J,he=>(0,D.bindActionCreators)(ie(he),V))}getMapStateToProps(){return()=>(0,S.default)({},this.getSystem())}getMapDispatchToProps(V){return J=>f()({},this.getWrappedAndBoundActions(J),this.getFn(),V)}}function ut(nt,V,J){if((0,Se.Kn)(nt)&&!(0,Se.kJ)(nt))return(0,we.default)({},nt);if((0,Se.Wl)(nt))return ut(nt(V),V,J);if((0,Se.kJ)(nt)){var ie;const he="chain"===J.pluginLoadType?V.getComponents():{};return(0,P.default)(ie=(0,O.default)(nt).call(nt,Ce=>ut(Ce,V,J))).call(ie,wt,he)}return{}}function Ze(nt,V){let{hasLoaded:J}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},ie=J;return(0,Se.Kn)(nt)&&!(0,Se.kJ)(nt)&&"function"==typeof nt.afterLoad&&(ie=!0,Ot(nt.afterLoad).call(this,V)),(0,Se.Wl)(nt)?Ze.call(this,nt(V),V,{hasLoaded:ie}):(0,Se.kJ)(nt)?(0,O.default)(nt).call(nt,he=>Ze.call(this,he,V,{hasLoaded:ie})):ie}function wt(){let nt=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},V=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(0,Se.Kn)(nt))return{};if(!(0,Se.Kn)(V))return nt;V.wrapComponents&&((0,Se.Ay)(V.wrapComponents,(Ce,Ve)=>{const Be=nt.components&&nt.components[Ve];Be&&(0,I.default)(Be)?(nt.components[Ve]=(0,M.default)(Be).call(Be,[Ce]),delete V.wrapComponents[Ve]):Be&&(nt.components[Ve]=[Be,Ce],delete V.wrapComponents[Ve])}),(0,i.default)(V.wrapComponents).length||delete V.wrapComponents);const{statePlugins:J}=nt;if((0,Se.Kn)(J))for(let Ce in J){const Ve=J[Ce];if(!(0,Se.Kn)(Ve))continue;const{wrapActions:Be,wrapSelectors:et}=Ve;if((0,Se.Kn)(Be))for(let Je in Be){let ot=Be[Je];var ie;(0,I.default)(ot)||(ot=[ot],Be[Je]=ot),V&&V.statePlugins&&V.statePlugins[Ce]&&V.statePlugins[Ce].wrapActions&&V.statePlugins[Ce].wrapActions[Je]&&(V.statePlugins[Ce].wrapActions[Je]=(0,M.default)(ie=Be[Je]).call(ie,V.statePlugins[Ce].wrapActions[Je]))}if((0,Se.Kn)(et))for(let Je in et){let ot=et[Je];var he;(0,I.default)(ot)||(ot=[ot],et[Je]=ot),V&&V.statePlugins&&V.statePlugins[Ce]&&V.statePlugins[Ce].wrapSelectors&&V.statePlugins[Ce].wrapSelectors[Je]&&(V.statePlugins[Ce].wrapSelectors[Je]=(0,M.default)(he=et[Je]).call(he,V.statePlugins[Ce].wrapSelectors[Je]))}}return f()(nt,V)}function Ot(nt){let{logErrors:V=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"function"!=typeof nt?nt:function(){try{for(var J=arguments.length,ie=new Array(J),he=0;he{let{layoutActions:he,tag:Ce,operationId:Ve,isShown:Be}=this.props;const et=this.getResolvedSubtree();Be||void 0!==et||this.requestResolvedSubtree(),he.show(["operations",Ce,Ve],!Be)}),(0,St.default)(this,"onCancelClick",()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})}),(0,St.default)(this,"onTryoutClick",()=>{this.setState({tryItOutEnabled:!this.state.tryItOutEnabled})}),(0,St.default)(this,"onResetClick",he=>{const Ce=this.props.oas3Selectors.selectDefaultRequestBodyValue(...he);this.props.oas3Actions.setRequestBodyValue({value:Ce,pathMethod:he})}),(0,St.default)(this,"onExecute",()=>{this.setState({executeInProgress:!0})}),(0,St.default)(this,"getResolvedSubtree",()=>{const{specSelectors:he,path:Ce,method:Ve,specPath:Be}=this.props;return he.specResolvedSubtree(Be?Be.toJS():["paths",Ce,Ve])}),(0,St.default)(this,"requestResolvedSubtree",()=>{const{specActions:he,path:Ce,method:Ve,specPath:Be}=this.props;return he.requestResolvedSubtree(Be?Be.toJS():["paths",Ce,Ve])});const{tryItOutEnabled:ie}=V.getConfigs();this.state={tryItOutEnabled:!0===ie||"true"===ie,executeInProgress:!1}}mapStateToProps(V,J){const{op:ie,layoutSelectors:he,getConfigs:Ce}=J,{docExpansion:Ve,deepLinking:Be,displayOperationId:et,displayRequestDuration:Je,supportedSubmitMethods:ot}=Ce(),It=he.showSummary(),qt=ie.getIn(["operation","__originalOperationId"])||ie.getIn(["operation","operationId"])||(0,Tr.opId)(ie.get("operation"),J.path,J.method)||ie.get("id"),Ft=["operations",J.tag,qt],Wt=Be&&"false"!==Be,Er=(0,an.default)(ot).call(ot,J.method)>=0&&(void 0===J.allowTryItOut?J.specSelectors.allowTryItOutFor(J.path,J.method):J.allowTryItOut),Ir=ie.getIn(["operation","security"])||J.specSelectors.security();return{operationId:qt,isDeepLinkingEnabled:Wt,showSummary:It,displayOperationId:et,displayRequestDuration:Je,allowTryItOut:Er,security:Ir,isAuthorized:J.authSelectors.isAuthorized(Ir),isShown:he.isShown(Ft,"full"===Ve),jumpToKey:`paths.${J.path}.${J.method}`,response:J.specSelectors.responseFor(J.path,J.method),request:J.specSelectors.requestFor(J.path,J.method)}}componentDidMount(){const{isShown:V}=this.props,J=this.getResolvedSubtree();V&&void 0===J&&this.requestResolvedSubtree()}UNSAFE_componentWillReceiveProps(V){const{response:J,isShown:ie}=V,he=this.getResolvedSubtree();J!==this.props.response&&this.setState({executeInProgress:!1}),ie&&void 0===he&&this.requestResolvedSubtree()}render(){let{op:V,tag:J,path:ie,method:he,security:Ce,isAuthorized:Ve,operationId:Be,showSummary:et,isShown:Je,jumpToKey:ot,allowTryItOut:It,response:qt,request:Ft,displayOperationId:Wt,displayRequestDuration:Er,isDeepLinkingEnabled:Ir,specPath:jr,specSelectors:yn,specActions:Un,getComponent:Qr,getConfigs:un,layoutSelectors:Xr,layoutActions:Fn,authActions:Wr,authSelectors:Yo,oas3Actions:cn,oas3Selectors:Jn,fn:fo}=this.props;const Po=Qr("operation"),ii=this.getResolvedSubtree()||(0,L.Map)(),So=(0,L.fromJS)({op:ii,tag:J,path:ie,summary:V.getIn(["operation","summary"])||"",deprecated:ii.get("deprecated")||V.getIn(["operation","deprecated"])||!1,method:he,security:Ce,isAuthorized:Ve,operationId:Be,originalOperationId:ii.getIn(["operation","__originalOperationId"]),showSummary:et,isShown:Je,jumpToKey:ot,allowTryItOut:It,request:Ft,displayOperationId:Wt,displayRequestDuration:Er,isDeepLinkingEnabled:Ir,executeInProgress:this.state.executeInProgress,tryItOutEnabled:this.state.tryItOutEnabled});return d.default.createElement(Po,{operation:So,response:qt,request:Ft,isShown:Je,toggleShown:this.toggleShown,onTryoutClick:this.onTryoutClick,onResetClick:this.onResetClick,onCancelClick:this.onCancelClick,onExecute:this.onExecute,specPath:jr,specActions:Un,specSelectors:yn,oas3Actions:cn,oas3Selectors:Jn,layoutActions:Fn,layoutSelectors:Xr,authActions:Wr,authSelectors:Yo,getComponent:Qr,getConfigs:un,fn:fo})}}(0,St.default)(Tn,"defaultProps",{showSummary:!0,response:null,allowTryItOut:!0,displayOperationId:!1,displayRequestDuration:!1});let zn=(()=>{class nt extends d.default.Component{getLayout(){let{getComponent:J,layoutSelectors:ie}=this.props;const he=ie.current();return J(he,!0)||(()=>d.default.createElement("h1",null,' No layout defined for "',he,'" '))}render(){const J=this.getLayout();return d.default.createElement(J,null)}}return nt.defaultProps={},nt})();class Wn extends d.default.Component{constructor(){super(...arguments),(0,St.default)(this,"close",()=>{let{authActions:V}=this.props;V.showDefinitions(!1)})}render(){var V;let{authSelectors:J,authActions:ie,getComponent:he,errSelectors:Ce,specSelectors:Ve,fn:{AST:Be={}}}=this.props,et=J.shownDefinitions();const Je=he("auths");return d.default.createElement("div",{className:"dialog-ux"},d.default.createElement("div",{className:"backdrop-ux"}),d.default.createElement("div",{className:"modal-ux"},d.default.createElement("div",{className:"modal-dialog-ux"},d.default.createElement("div",{className:"modal-ux-inner"},d.default.createElement("div",{className:"modal-ux-header"},d.default.createElement("h3",null,"Available authorizations"),d.default.createElement("button",{type:"button",className:"close-modal",onClick:this.close},d.default.createElement("svg",{width:"20",height:"20"},d.default.createElement("use",{href:"#close",xlinkHref:"#close"})))),d.default.createElement("div",{className:"modal-ux-content"},(0,O.default)(V=et.valueSeq()).call(V,(ot,It)=>d.default.createElement(Je,{key:It,AST:Be,definitions:ot,getComponent:he,errSelectors:Ce,authSelectors:J,authActions:ie,specSelectors:Ve})))))))}}class so extends d.default.Component{render(){let{isAuthorized:V,showPopup:J,onClick:ie,getComponent:he}=this.props;const Ce=he("authorizationPopup",!0);return d.default.createElement("div",{className:"auth-wrapper"},d.default.createElement("button",{className:V?"btn authorize locked":"btn authorize unlocked",onClick:ie},d.default.createElement("span",null,"Authorize"),d.default.createElement("svg",{width:"20",height:"20"},d.default.createElement("use",{href:V?"#locked":"#unlocked",xlinkHref:V?"#locked":"#unlocked"}))),J&&d.default.createElement(Ce,null))}}class Hn extends d.default.Component{render(){const{authActions:V,authSelectors:J,specSelectors:ie,getComponent:he}=this.props,Ce=ie.securityDefinitions(),Ve=J.definitionsToAuthorize(),Be=he("authorizeBtn");return Ce?d.default.createElement(Be,{onClick:()=>V.showDefinitions(Ve),isAuthorized:!!J.authorized().size,showPopup:!!J.shownDefinitions(),getComponent:he}):null}}class $ extends d.default.Component{constructor(){super(...arguments),(0,St.default)(this,"onClick",V=>{V.stopPropagation();let{onClick:J}=this.props;J&&J()})}render(){let{isAuthorized:V}=this.props;return d.default.createElement("button",{className:V?"authorization__btn locked":"authorization__btn unlocked","aria-label":V?"authorization button locked":"authorization button unlocked",onClick:this.onClick},d.default.createElement("svg",{width:"20",height:"20"},d.default.createElement("use",{href:V?"#locked":"#unlocked",xlinkHref:V?"#locked":"#unlocked"})))}}class Q extends d.default.Component{constructor(V,J){super(V,J),(0,St.default)(this,"onAuthChange",ie=>{let{name:he}=ie;this.setState({[he]:ie})}),(0,St.default)(this,"submitAuth",ie=>{ie.preventDefault();let{authActions:he}=this.props;he.authorizeWithPersistOption(this.state)}),(0,St.default)(this,"logoutClick",ie=>{ie.preventDefault();let{authActions:he,definitions:Ce}=this.props,Ve=(0,O.default)(Ce).call(Ce,(Be,et)=>et).toArray();this.setState((0,P.default)(Ve).call(Ve,(Be,et)=>(Be[et]="",Be),{})),he.logoutWithPersistOption(Ve)}),(0,St.default)(this,"close",ie=>{ie.preventDefault();let{authActions:he}=this.props;he.showDefinitions(!1)}),this.state={}}render(){var V;let{definitions:J,getComponent:ie,authSelectors:he,errSelectors:Ce}=this.props;const Ve=ie("AuthItem"),Be=ie("oauth2",!0),et=ie("Button");let Je=he.authorized(),ot=(0,o.default)(J).call(J,(Ft,Wt)=>!!Je.get(Wt)),It=(0,o.default)(J).call(J,Ft=>"oauth2"!==Ft.get("type")),qt=(0,o.default)(J).call(J,Ft=>"oauth2"===Ft.get("type"));return d.default.createElement("div",{className:"auth-container"},!!It.size&&d.default.createElement("form",{onSubmit:this.submitAuth},(0,O.default)(It).call(It,(Ft,Wt)=>d.default.createElement(Ve,{key:Wt,schema:Ft,name:Wt,getComponent:ie,onAuthChange:this.onAuthChange,authorized:Je,errSelectors:Ce})).toArray(),d.default.createElement("div",{className:"auth-btn-wrapper"},It.size===ot.size?d.default.createElement(et,{className:"btn modal-btn auth",onClick:this.logoutClick},"Logout"):d.default.createElement(et,{type:"submit",className:"btn modal-btn auth authorize"},"Authorize"),d.default.createElement(et,{className:"btn modal-btn auth btn-done",onClick:this.close},"Close"))),qt&&qt.size?d.default.createElement("div",null,d.default.createElement("div",{className:"scope-def"},d.default.createElement("p",null,"Scopes are used to grant an application different levels of access to data on behalf of the end user. Each API may declare one or more scopes."),d.default.createElement("p",null,"API requires the following scopes. Select which ones you want to grant to Swagger UI.")),(0,O.default)(V=(0,o.default)(J).call(J,Ft=>"oauth2"===Ft.get("type"))).call(V,(Ft,Wt)=>d.default.createElement("div",{key:Wt},d.default.createElement(Be,{authorized:Je,schema:Ft,name:Wt}))).toArray()):null)}}class me extends d.default.Component{render(){let{schema:V,name:J,getComponent:ie,onAuthChange:he,authorized:Ce,errSelectors:Ve}=this.props;const Be=ie("apiKeyAuth"),et=ie("basicAuth");let Je;const ot=V.get("type");switch(ot){case"apiKey":Je=d.default.createElement(Be,{key:J,schema:V,name:J,errSelectors:Ve,authorized:Ce,getComponent:ie,onChange:he});break;case"basic":Je=d.default.createElement(et,{key:J,schema:V,name:J,errSelectors:Ve,authorized:Ce,getComponent:ie,onChange:he});break;default:Je=d.default.createElement("div",{key:J},"Unknown security definition type ",ot)}return d.default.createElement("div",{key:`${J}-jump`},Je)}}class ze extends d.default.Component{render(){let{error:V}=this.props,J=V.get("level"),ie=V.get("message"),he=V.get("source");return d.default.createElement("div",{className:"errors"},d.default.createElement("b",null,he," ",J),d.default.createElement("span",null,ie))}}class Ye extends d.default.Component{constructor(V,J){super(V,J),(0,St.default)(this,"onChange",Ve=>{let{onChange:Be}=this.props,Je=(0,S.default)({},this.state,{value:Ve.target.value});this.setState(Je),Be(Je)});let{name:ie,schema:he}=this.props,Ce=this.getValue();this.state={name:ie,schema:he,value:Ce}}getValue(){let{name:V,authorized:J}=this.props;return J&&J.getIn([V,"value"])}render(){var V,J;let{schema:ie,getComponent:he,errSelectors:Ce,name:Ve}=this.props;const Be=he("Input"),et=he("Row"),Je=he("Col"),ot=he("authError"),It=he("Markdown",!0),qt=he("JumpToPath",!0);let Ft=this.getValue(),Wt=(0,o.default)(V=Ce.allErrors()).call(V,Er=>Er.get("authId")===Ve);return d.default.createElement("div",null,d.default.createElement("h4",null,d.default.createElement("code",null,Ve||ie.get("name")),"\xa0(apiKey)",d.default.createElement(qt,{path:["securityDefinitions",Ve]})),Ft&&d.default.createElement("h6",null,"Authorized"),d.default.createElement(et,null,d.default.createElement(It,{source:ie.get("description")})),d.default.createElement(et,null,d.default.createElement("p",null,"Name: ",d.default.createElement("code",null,ie.get("name")))),d.default.createElement(et,null,d.default.createElement("p",null,"In: ",d.default.createElement("code",null,ie.get("in")))),d.default.createElement(et,null,d.default.createElement("label",null,"Value:"),Ft?d.default.createElement("code",null," ****** "):d.default.createElement(Je,null,d.default.createElement(Be,{type:"text",onChange:this.onChange,autoFocus:!0}))),(0,O.default)(J=Wt.valueSeq()).call(J,(Er,Ir)=>d.default.createElement(ot,{error:Er,key:Ir})))}}class ht extends d.default.Component{constructor(V,J){super(V,J),(0,St.default)(this,"onChange",Ve=>{let{onChange:Be}=this.props,{value:et,name:Je}=Ve.target,ot=this.state.value;ot[Je]=et,this.setState({value:ot}),Be(this.state)});let{schema:ie,name:he}=this.props,Ce=this.getValue().username;this.state={name:he,schema:ie,value:Ce?{username:Ce}:{}}}getValue(){let{authorized:V,name:J}=this.props;return V&&V.getIn([J,"value"])||{}}render(){var V,J;let{schema:ie,getComponent:he,name:Ce,errSelectors:Ve}=this.props;const Be=he("Input"),et=he("Row"),Je=he("Col"),ot=he("authError"),It=he("JumpToPath",!0),qt=he("Markdown",!0);let Ft=this.getValue().username,Wt=(0,o.default)(V=Ve.allErrors()).call(V,Er=>Er.get("authId")===Ce);return d.default.createElement("div",null,d.default.createElement("h4",null,"Basic authorization",d.default.createElement(It,{path:["securityDefinitions",Ce]})),Ft&&d.default.createElement("h6",null,"Authorized"),d.default.createElement(et,null,d.default.createElement(qt,{source:ie.get("description")})),d.default.createElement(et,null,d.default.createElement("label",null,"Username:"),Ft?d.default.createElement("code",null," ",Ft," "):d.default.createElement(Je,null,d.default.createElement(Be,{type:"text",required:"required",name:"username",onChange:this.onChange,autoFocus:!0}))),d.default.createElement(et,null,d.default.createElement("label",null,"Password:"),Ft?d.default.createElement("code",null," ****** "):d.default.createElement(Je,null,d.default.createElement(Be,{autoComplete:"new-password",name:"password",type:"password",onChange:this.onChange}))),(0,O.default)(J=Wt.valueSeq()).call(J,(Er,Ir)=>d.default.createElement(ot,{error:Er,key:Ir})))}}function Mt(nt){const{example:V,showValue:J,getComponent:ie,getConfigs:he}=nt,Ce=ie("Markdown",!0),Ve=ie("highlightCode");return V?d.default.createElement("div",{className:"example"},V.get("description")?d.default.createElement("section",{className:"example__section"},d.default.createElement("div",{className:"example__section-header"},"Example Description"),d.default.createElement("p",null,d.default.createElement(Ce,{source:V.get("description")}))):null,J&&V.has("value")?d.default.createElement("section",{className:"example__section"},d.default.createElement("div",{className:"example__section-header"},"Example Value"),d.default.createElement(Ve,{getConfigs:he,value:(0,Se.Pz)(V.get("value"))})):null):null}var xn=Cr(6914);class Bn extends d.default.PureComponent{constructor(){var V;super(...arguments),V=this,(0,St.default)(this,"_onSelect",function(J){let{isSyntheticChange:ie=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"function"==typeof V.props.onSelect&&V.props.onSelect(J,{isSyntheticChange:ie})}),(0,St.default)(this,"_onDomSelect",J=>{if("function"==typeof this.props.onSelect){const ie=J.target.selectedOptions[0].getAttribute("value");this._onSelect(ie,{isSyntheticChange:!1})}}),(0,St.default)(this,"getCurrentExample",()=>{const{examples:J,currentExampleKey:ie}=this.props,he=J.get(ie),Ce=J.keySeq().first(),Ve=J.get(Ce);return he||Ve||(0,xn.default)({})})}componentDidMount(){const{onSelect:V,examples:J}=this.props;if("function"==typeof V){const ie=J.first(),he=J.keyOf(ie);this._onSelect(he,{isSyntheticChange:!0})}}UNSAFE_componentWillReceiveProps(V){const{currentExampleKey:J,examples:ie}=V;if(ie!==this.props.examples&&!ie.has(J)){const he=ie.first(),Ce=ie.keyOf(he);this._onSelect(Ce,{isSyntheticChange:!0})}}render(){const{examples:V,currentExampleKey:J,isValueModified:ie,isModifiedValueAvailable:he,showLabels:Ce}=this.props;return d.default.createElement("div",{className:"examples-select"},Ce?d.default.createElement("span",{className:"examples-select__section-label"},"Examples: "):null,d.default.createElement("select",{className:"examples-select-element",onChange:this._onDomSelect,value:he&&ie?"__MODIFIED__VALUE__":J||""},he?d.default.createElement("option",{value:"__MODIFIED__VALUE__"},"[Modified value]"):null,(0,O.default)(V).call(V,(Ve,Be)=>d.default.createElement("option",{key:Be,value:Be},Ve.get("summary")||Be)).valueSeq()))}}(0,St.default)(Bn,"defaultProps",{examples:L.default.Map({}),onSelect:function(){for(var nt=arguments.length,V=new Array(nt),J=0;JL.List.isList(nt)?nt:(0,Se.Pz)(nt);class Qn extends d.default.PureComponent{constructor(V){var J;super(V),J=this,(0,St.default)(this,"_getStateForCurrentNamespace",()=>{const{currentNamespace:he}=this.props;return(this.state[he]||(0,L.Map)()).toObject()}),(0,St.default)(this,"_setStateForCurrentNamespace",he=>{const{currentNamespace:Ce}=this.props;return this._setStateForNamespace(Ce,he)}),(0,St.default)(this,"_setStateForNamespace",(he,Ce)=>{const Ve=(this.state[he]||(0,L.Map)()).mergeDeep(Ce);return this.setState({[he]:Ve})}),(0,St.default)(this,"_isCurrentUserInputSameAsExampleValue",()=>{const{currentUserInputValue:he}=this.props;return this._getCurrentExampleValue()===he}),(0,St.default)(this,"_getValueForExample",(he,Ce)=>{const{examples:Ve}=Ce||this.props;return xo((Ve||(0,L.Map)({})).getIn([he,"value"]))}),(0,St.default)(this,"_getCurrentExampleValue",he=>{const{currentKey:Ce}=he||this.props;return this._getValueForExample(Ce,he||this.props)}),(0,St.default)(this,"_onExamplesSelect",function(he){let{isSyntheticChange:Ce}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{onSelect:Ve,updateValue:Be,currentUserInputValue:et,userHasEditedBody:Je}=J.props,{lastUserEditedValue:ot}=J._getStateForCurrentNamespace(),It=J._getValueForExample(he);if("__MODIFIED__VALUE__"===he)return Be(xo(ot)),J._setStateForCurrentNamespace({isModifiedValueSelected:!0});if("function"==typeof Ve){for(var qt=arguments.length,Ft=new Array(qt>2?qt-2:0),Wt=2;Wtot.get("value")===J||(0,Se.Pz)(ot.get("value"))===J);if(Je.size){let ot;ot=Je.has(V.currentKey)?V.currentKey:Je.keySeq().first(),he(ot,{isSyntheticChange:!0})}else J!==this.props.currentUserInputValue&&J!==Ve&&J!==Be&&(this.props.setRetainRequestBodyValueFlag(!0),this._setStateForNamespace(V.currentNamespace,{lastUserEditedValue:V.currentUserInputValue,isModifiedValueSelected:Ce||J!==et}))}render(){const{currentUserInputValue:V,examples:J,currentKey:ie,getComponent:he,userHasEditedBody:Ce}=this.props,{lastDownstreamValue:Ve,lastUserEditedValue:Be,isModifiedValueSelected:et}=this._getStateForCurrentNamespace(),Je=he("ExamplesSelect");return d.default.createElement(Je,{examples:J,currentExampleKey:ie,onSelect:this._onExamplesSelect,isModifiedValueAvailable:!!Be&&Be!==Ve,isValueModified:void 0!==V&&et&&V!==this._getCurrentExampleValue()||Ce})}}(0,St.default)(Qn,"defaultProps",{userHasEditedBody:!1,examples:(0,L.Map)({}),currentNamespace:"__DEFAULT__NAMESPACE__",setRetainRequestBodyValueFlag:()=>{},onSelect:function(){for(var nt=arguments.length,V=new Array(nt),J=0;J{Wt.preventDefault();let{authActions:Er}=this.props;Er.showDefinitions(!1)}),(0,St.default)(this,"authorize",()=>{let{authActions:Wt,errActions:Er,getConfigs:Ir,authSelectors:jr,oas3Selectors:yn}=this.props,Un=Ir(),Qr=jr.getConfigs();Er.clear({authId:name,type:"auth",source:"auth"}),function(un){let{auth:Xr,authActions:Fn,errActions:Wr,configs:Yo,authConfigs:cn={},currentServer:Jn}=un,{schema:fo,scopes:Po,name:ii,clientId:So}=Xr,Ci=fo.get("flow"),di=[];switch(Ci){case"password":return void Fn.authorizePassword(Xr);case"application":case"clientCredentials":case"client_credentials":return void Fn.authorizeApplication(Xr);case"accessCode":case"authorizationCode":case"authorization_code":di.push("response_type=code");break;case"implicit":di.push("response_type=token")}"string"==typeof So&&di.push("client_id="+encodeURIComponent(So));let Hi=Yo.oauth2RedirectUrl;if(void 0===Hi)return void Wr.newAuthErr({authId:ii,source:"validation",level:"error",message:"oauth2RedirectUrl configuration is not passed. Oauth2 authorization cannot be performed."});di.push("redirect_uri="+encodeURIComponent(Hi));let Ki=[];(0,I.default)(Po)?Ki=Po:L.default.List.isList(Po)&&(Ki=Po.toArray()),Ki.length>0&&di.push("scope="+encodeURIComponent(Ki.join(cn.scopeSeparator||" ")));let Ss=(0,Se.r3)(new Date);if(di.push("state="+encodeURIComponent(Ss)),void 0!==cn.realm&&di.push("realm="+encodeURIComponent(cn.realm)),("authorizationCode"===Ci||"authorization_code"===Ci||"accessCode"===Ci)&&cn.usePkceWithAuthorizationCodeGrant){const Co=(0,Se.Uj)(),Eo=(0,Se.Xb)(Co);di.push("code_challenge="+Eo),di.push("code_challenge_method=S256"),Xr.codeVerifier=Co}let{additionalQueryStringParams:Ds}=cn;for(let Co in Ds){var _s;void 0!==Ds[Co]&&di.push((0,O.default)(_s=[Co,Ds[Co]]).call(_s,encodeURIComponent).join("="))}const Oa=fo.get("authorizationUrl");let ws;ws=Jn?(0,Li.default)((0,Se.Nm)(Oa),Jn,!0).toString():(0,Se.Nm)(Oa);let el,Pi=[ws,di.join("&")].join(-1===(0,an.default)(Oa).call(Oa,"?")?"?":"&");el="implicit"===Ci?Fn.preAuthorizeImplicit:cn.useBasicAuthenticationWithAccessCodeGrant?Fn.authorizeAccessCodeWithBasicAuthentication:Fn.authorizeAccessCodeWithFormParams,Fn.authPopup(Pi,{auth:Xr,state:Ss,redirectUrl:Hi,callback:el,errCb:Wr.newAuthErr})}({auth:this.state,currentServer:yn.serverEffectiveValue(yn.selectedServer()),authActions:Wt,errActions:Er,configs:Un,authConfigs:Qr})}),(0,St.default)(this,"onScopeChange",Wt=>{var Er,Ir;let{target:jr}=Wt,{checked:yn}=jr,Un=jr.dataset.value;if(yn&&-1===(0,an.default)(Er=this.state.scopes).call(Er,Un)){var Qr;let Xr=(0,M.default)(Qr=this.state.scopes).call(Qr,[Un]);this.setState({scopes:Xr})}else if(!yn&&(0,an.default)(Ir=this.state.scopes).call(Ir,Un)>-1){var un;this.setState({scopes:(0,o.default)(un=this.state.scopes).call(un,Xr=>Xr!==Un)})}}),(0,St.default)(this,"onInputChange",Wt=>{let{target:{dataset:{name:Er},value:Ir}}=Wt;this.setState({[Er]:Ir})}),(0,St.default)(this,"selectScopes",Wt=>{var Er;this.setState(Wt.target.dataset.all?{scopes:(0,Ko.default)((0,Ya.default)(Er=this.props.schema.get("allowedScopes")||this.props.schema.get("scopes")).call(Er))}:{scopes:[]})}),(0,St.default)(this,"logout",Wt=>{Wt.preventDefault();let{authActions:Er,errActions:Ir,name:jr}=this.props;Ir.clear({authId:jr,type:"auth",source:"auth"}),Er.logoutWithPersistOption([jr])});let{name:ie,schema:he,authorized:Ce,authSelectors:Ve}=this.props,Be=Ce&&Ce.get(ie),et=Ve.getConfigs()||{},Je=Be&&Be.get("username")||"",ot=Be&&Be.get("clientId")||et.clientId||"",It=Be&&Be.get("clientSecret")||et.clientSecret||"",qt=Be&&Be.get("passwordType")||"basic",Ft=Be&&Be.get("scopes")||et.scopes||[];"string"==typeof Ft&&(Ft=Ft.split(et.scopeSeparator||" ")),this.state={appName:et.appName,name:ie,schema:he,scopes:Ft,clientId:ot,clientSecret:It,username:Je,password:"",passwordType:qt}}render(){var V,J;let{schema:ie,getComponent:he,authSelectors:Ce,errSelectors:Ve,name:Be,specSelectors:et}=this.props;const Je=he("Input"),ot=he("Row"),It=he("Col"),qt=he("Button"),Ft=he("authError"),Wt=he("JumpToPath",!0),Er=he("Markdown",!0),Ir=he("InitializedInput"),{isOAS3:jr}=et;let yn=jr()?ie.get("openIdConnectUrl"):null;const Un="implicit",Qr="password",un=jr()?yn?"authorization_code":"authorizationCode":"accessCode",Xr=jr()?yn?"client_credentials":"clientCredentials":"application";let Fn=!!(Ce.getConfigs()||{}).usePkceWithAuthorizationCodeGrant,Wr=ie.get("flow"),Yo=Wr===un&&Fn?Wr+" with PKCE":Wr,cn=ie.get("allowedScopes")||ie.get("scopes"),Jn=!!Ce.authorized().get(Be),fo=(0,o.default)(V=Ve.allErrors()).call(V,So=>So.get("authId")===Be),Po=!(0,o.default)(fo).call(fo,So=>"validation"===So.get("source")).size,ii=ie.get("description");return d.default.createElement("div",null,d.default.createElement("h4",null,Be," (OAuth2, ",Yo,") ",d.default.createElement(Wt,{path:["securityDefinitions",Be]})),this.state.appName?d.default.createElement("h5",null,"Application: ",this.state.appName," "):null,ii&&d.default.createElement(Er,{source:ie.get("description")}),Jn&&d.default.createElement("h6",null,"Authorized"),yn&&d.default.createElement("p",null,"OpenID Connect URL: ",d.default.createElement("code",null,yn)),(Wr===Un||Wr===un)&&d.default.createElement("p",null,"Authorization URL: ",d.default.createElement("code",null,ie.get("authorizationUrl"))),(Wr===Qr||Wr===un||Wr===Xr)&&d.default.createElement("p",null,"Token URL:",d.default.createElement("code",null," ",ie.get("tokenUrl"))),d.default.createElement("p",{className:"flow"},"Flow: ",d.default.createElement("code",null,Yo)),Wr!==Qr?null:d.default.createElement(ot,null,d.default.createElement(ot,null,d.default.createElement("label",{htmlFor:"oauth_username"},"username:"),Jn?d.default.createElement("code",null," ",this.state.username," "):d.default.createElement(It,{tablet:10,desktop:10},d.default.createElement("input",{id:"oauth_username",type:"text","data-name":"username",onChange:this.onInputChange,autoFocus:!0}))),d.default.createElement(ot,null,d.default.createElement("label",{htmlFor:"oauth_password"},"password:"),Jn?d.default.createElement("code",null," ****** "):d.default.createElement(It,{tablet:10,desktop:10},d.default.createElement("input",{id:"oauth_password",type:"password","data-name":"password",onChange:this.onInputChange}))),d.default.createElement(ot,null,d.default.createElement("label",{htmlFor:"password_type"},"Client credentials location:"),Jn?d.default.createElement("code",null," ",this.state.passwordType," "):d.default.createElement(It,{tablet:10,desktop:10},d.default.createElement("select",{id:"password_type","data-name":"passwordType",onChange:this.onInputChange},d.default.createElement("option",{value:"basic"},"Authorization header"),d.default.createElement("option",{value:"request-body"},"Request body"))))),(Wr===Xr||Wr===Un||Wr===un||Wr===Qr)&&(!Jn||Jn&&this.state.clientId)&&d.default.createElement(ot,null,d.default.createElement("label",{htmlFor:"client_id"},"client_id:"),Jn?d.default.createElement("code",null," ****** "):d.default.createElement(It,{tablet:10,desktop:10},d.default.createElement(Ir,{id:"client_id",type:"text",required:Wr===Qr,initialValue:this.state.clientId,"data-name":"clientId",onChange:this.onInputChange}))),(Wr===Xr||Wr===un||Wr===Qr)&&d.default.createElement(ot,null,d.default.createElement("label",{htmlFor:"client_secret"},"client_secret:"),Jn?d.default.createElement("code",null," ****** "):d.default.createElement(It,{tablet:10,desktop:10},d.default.createElement(Ir,{id:"client_secret",initialValue:this.state.clientSecret,type:"password","data-name":"clientSecret",onChange:this.onInputChange}))),!Jn&&cn&&cn.size?d.default.createElement("div",{className:"scopes"},d.default.createElement("h2",null,"Scopes:",d.default.createElement("a",{onClick:this.selectScopes,"data-all":!0},"select all"),d.default.createElement("a",{onClick:this.selectScopes},"select none")),(0,O.default)(cn).call(cn,(So,Ci)=>{var di;return d.default.createElement(ot,{key:Ci},d.default.createElement("div",{className:"checkbox"},d.default.createElement(Je,{"data-value":Ci,id:`${Ci}-${Wr}-checkbox-${this.state.name}`,disabled:Jn,checked:(0,bs.default)(di=this.state.scopes).call(di,Ci),type:"checkbox",onChange:this.onScopeChange}),d.default.createElement("label",{htmlFor:`${Ci}-${Wr}-checkbox-${this.state.name}`},d.default.createElement("span",{className:"item"}),d.default.createElement("div",{className:"text"},d.default.createElement("p",{className:"name"},Ci),d.default.createElement("p",{className:"description"},So)))))}).toArray()):null,(0,O.default)(J=fo.valueSeq()).call(J,(So,Ci)=>d.default.createElement(Ft,{error:So,key:Ci})),d.default.createElement("div",{className:"auth-btn-wrapper"},Po&&(Jn?d.default.createElement(qt,{className:"btn modal-btn auth authorize",onClick:this.logout},"Logout"):d.default.createElement(qt,{className:"btn modal-btn auth authorize",onClick:this.authorize},"Authorize")),d.default.createElement(qt,{className:"btn modal-btn auth btn-done",onClick:this.close},"Close")))}}class At extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"onClick",()=>{let{specActions:V,path:J,method:ie}=this.props;V.clearResponse(J,ie),V.clearRequest(J,ie)})}render(){return d.default.createElement("button",{className:"btn btn-clear opblock-control__btn",onClick:this.onClick},"Clear")}}const pr=nt=>{let{headers:V}=nt;return d.default.createElement("div",null,d.default.createElement("h5",null,"Response headers"),d.default.createElement("pre",{className:"microlight"},V))},mn=nt=>{let{duration:V}=nt;return d.default.createElement("div",null,d.default.createElement("h5",null,"Request duration"),d.default.createElement("pre",{className:"microlight"},V," ms"))};class ho extends d.default.Component{shouldComponentUpdate(V){return this.props.response!==V.response||this.props.path!==V.path||this.props.method!==V.method||this.props.displayRequestDuration!==V.displayRequestDuration}render(){const{response:V,getComponent:J,getConfigs:ie,displayRequestDuration:he,specSelectors:Ce,path:Ve,method:Be}=this.props,{showMutatedRequest:et,requestSnippetsEnabled:Je}=ie(),ot=et?Ce.mutatedRequestFor(Ve,Be):Ce.requestFor(Ve,Be),It=V.get("status"),qt=ot.get("url"),Ft=V.get("headers").toJS(),Wt=V.get("notDocumented"),Er=V.get("error"),Ir=V.get("text"),jr=V.get("duration"),yn=(0,i.default)(Ft),Un=Ft["content-type"]||Ft["Content-Type"],Qr=J("responseBody"),un=(0,O.default)(yn).call(yn,cn=>{var Jn=(0,I.default)(Ft[cn])?Ft[cn].join():Ft[cn];return d.default.createElement("span",{className:"headerline",key:cn}," ",cn,": ",Jn," ")}),Xr=0!==un.length,Fn=J("Markdown",!0),Wr=J("RequestSnippets",!0),Yo=J("curl");return d.default.createElement("div",null,ot&&(!0===Je||"true"===Je?d.default.createElement(Wr,{request:ot}):d.default.createElement(Yo,{request:ot,getConfigs:ie})),qt&&d.default.createElement("div",null,d.default.createElement("div",{className:"request-url"},d.default.createElement("h4",null,"Request URL"),d.default.createElement("pre",{className:"microlight"},qt))),d.default.createElement("h4",null,"Server response"),d.default.createElement("table",{className:"responses-table live-responses-table"},d.default.createElement("thead",null,d.default.createElement("tr",{className:"responses-header"},d.default.createElement("td",{className:"col_header response-col_status"},"Code"),d.default.createElement("td",{className:"col_header response-col_description"},"Details"))),d.default.createElement("tbody",null,d.default.createElement("tr",{className:"response"},d.default.createElement("td",{className:"response-col_status"},It,Wt?d.default.createElement("div",{className:"response-undocumented"},d.default.createElement("i",null," Undocumented ")):null),d.default.createElement("td",{className:"response-col_description"},Er?d.default.createElement(Fn,{source:`${""!==V.get("name")?`${V.get("name")}: `:""}${V.get("message")}`}):null,Ir?d.default.createElement(Qr,{content:Ir,contentType:Un,url:qt,headers:Ft,getConfigs:ie,getComponent:J}):null,Xr?d.default.createElement(pr,{headers:un}):null,he&&jr?d.default.createElement(mn,{duration:jr}):null)))))}}var Bo=Cr(5623);const Zo=["get","put","post","delete","options","head","patch"],Et=(0,M.default)(Zo).call(Zo,["trace"]);class Qt extends d.default.Component{constructor(){super(...arguments),(0,St.default)(this,"renderOperationTag",(V,J)=>{const{specSelectors:ie,getComponent:he,oas3Selectors:Ce,layoutSelectors:Ve,layoutActions:Be,getConfigs:et}=this.props,Je=he("OperationContainer",!0),ot=he("OperationTag"),It=V.get("operations");return d.default.createElement(ot,{key:"operation-"+J,tagObj:V,tag:J,oas3Selectors:Ce,layoutSelectors:Ve,layoutActions:Be,getConfigs:et,getComponent:he,specUrl:ie.url()},d.default.createElement("div",{className:"operation-tag-content"},(0,O.default)(It).call(It,qt=>{const Ft=qt.get("path"),Wt=qt.get("method"),Er=L.default.List(["paths",Ft,Wt]),Ir=ie.isOAS3()?Et:Zo;return-1===(0,an.default)(Ir).call(Ir,Wt)?null:d.default.createElement(Je,{key:`${Ft}-${Wt}`,specPath:Er,op:qt,path:Ft,method:Wt,tag:J})}).toArray()))})}render(){let{specSelectors:V}=this.props;const J=V.taggedOperations();return 0===J.size?d.default.createElement("h3",null," No operations defined in spec!"):d.default.createElement("div",null,(0,O.default)(J).call(J,this.renderOperationTag).toArray(),J.size<1?d.default.createElement("h3",null," No operations defined in spec! "):null)}}var hr=Cr(3769);function Br(nt){return nt.match(/^(?:[a-z]+:)?\/\//i)}function In(nt,V){let{selectedServer:J=""}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{return function Sn(nt,V){let{selectedServer:J=""}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!nt)return;if(Br(nt))return nt;const ie=function bn(nt,V){return nt?Br(nt)?(J=nt).match(/^\/\//i)?`${window.location.protocol}${J}`:J:new hr.default(nt,V).href:V;var J}(J,V);return Br(ie)?new hr.default(nt,ie).href:new hr.default(nt,window.location.href).href}(nt,V,{selectedServer:J})}catch{return}}class vi extends d.default.Component{render(){const{tagObj:V,tag:J,children:ie,oas3Selectors:he,layoutSelectors:Ce,layoutActions:Ve,getConfigs:Be,getComponent:et,specUrl:Je}=this.props;let{docExpansion:ot,deepLinking:It}=Be();const qt=It&&"false"!==It,Ft=et("Collapse"),Wt=et("Markdown",!0),Er=et("DeepLink"),Ir=et("Link");let jr,yn=V.getIn(["tagDetails","description"],null),Un=V.getIn(["tagDetails","externalDocs","description"]),Qr=V.getIn(["tagDetails","externalDocs","url"]);jr=(0,Se.Wl)(he)&&(0,Se.Wl)(he.selectedServer)?In(Qr,Je,{selectedServer:he.selectedServer()}):Qr;let un=["operations-tag",J],Xr=Ce.isShown(un,"full"===ot||"list"===ot);return d.default.createElement("div",{className:Xr?"opblock-tag-section is-open":"opblock-tag-section"},d.default.createElement("h3",{onClick:()=>Ve.show(un,!Xr),className:yn?"opblock-tag":"opblock-tag no-desc",id:(0,O.default)(un).call(un,Fn=>(0,Se.J6)(Fn)).join("-"),"data-tag":J,"data-is-open":Xr},d.default.createElement(Er,{enabled:qt,isShown:Xr,path:(0,Se.oJ)(J),text:J}),yn?d.default.createElement("small",null,d.default.createElement(Wt,{source:yn})):d.default.createElement("small",null),jr?d.default.createElement("div",{className:"info__externaldocs"},d.default.createElement("small",null,d.default.createElement(Ir,{href:(0,Se.Nm)(jr),onClick:Fn=>Fn.stopPropagation(),target:"_blank"},Un||jr))):null,d.default.createElement("button",{"aria-expanded":Xr,className:"expand-operation",title:Xr?"Collapse operation":"Expand operation",onClick:()=>Ve.show(un,!Xr)},d.default.createElement("svg",{className:"arrow",width:"20",height:"20","aria-hidden":"true",focusable:"false"},d.default.createElement("use",{href:Xr?"#large-arrow-up":"#large-arrow-down",xlinkHref:Xr?"#large-arrow-up":"#large-arrow-down"})))),d.default.createElement(Ft,{isOpened:Xr},ie))}}(0,St.default)(vi,"defaultProps",{tagObj:L.default.fromJS({}),tag:""});class $e extends d.PureComponent{render(){let{specPath:V,response:J,request:ie,toggleShown:he,onTryoutClick:Ce,onResetClick:Ve,onCancelClick:Be,onExecute:et,fn:Je,getComponent:ot,getConfigs:It,specActions:qt,specSelectors:Ft,authActions:Wt,authSelectors:Er,oas3Actions:Ir,oas3Selectors:jr}=this.props,yn=this.props.operation,{deprecated:Un,isShown:Qr,path:un,method:Xr,op:Fn,tag:Wr,operationId:Yo,allowTryItOut:cn,displayRequestDuration:Jn,tryItOutEnabled:fo,executeInProgress:Po}=yn.toJS(),{description:ii,externalDocs:So,schemes:Ci}=Fn;const di=So?In(So.url,Ft.url(),{selectedServer:jr.selectedServer()}):"";let Hi=yn.getIn(["op"]),Ki=Hi.get("responses"),Ss=(0,Se.gp)(Hi,["parameters"]),Ds=Ft.operationScheme(un,Xr),_s=["operations",Wr,Yo],Oa=(0,Se.nX)(Hi);const ws=ot("responses"),el=ot("parameters"),Pi=ot("execute"),Co=ot("clear"),Eo=ot("Collapse"),Bi=ot("Markdown",!0),xp=ot("schemes"),Sp=ot("OperationServers"),_p=ot("OperationExt"),c4=ot("OperationSummary"),f4=ot("Link"),{showExtensions:d4}=It();if(Ki&&J&&J.size>0){let Pg=!Ki.get(String(J.get("status")))&&!Ki.get("default");J=J.set("notDocumented",Pg)}let p4=[un,Xr];const Rg=Ft.validationErrors([un,Xr]);return d.default.createElement("div",{className:Un?"opblock opblock-deprecated":Qr?`opblock opblock-${Xr} is-open`:`opblock opblock-${Xr}`,id:(0,Se.J6)(_s.join("-"))},d.default.createElement(c4,{operationProps:yn,isShown:Qr,toggleShown:he,getComponent:ot,authActions:Wt,authSelectors:Er,specPath:V}),d.default.createElement(Eo,{isOpened:Qr},d.default.createElement("div",{className:"opblock-body"},Hi&&Hi.size||null===Hi?null:d.default.createElement("img",{height:"32px",width:"32px",src:Cr(2517),className:"opblock-loading-animation"}),Un&&d.default.createElement("h4",{className:"opblock-title_normal"}," Warning: Deprecated"),ii&&d.default.createElement("div",{className:"opblock-description-wrapper"},d.default.createElement("div",{className:"opblock-description"},d.default.createElement(Bi,{source:ii}))),di?d.default.createElement("div",{className:"opblock-external-docs-wrapper"},d.default.createElement("h4",{className:"opblock-title_normal"},"Find more details"),d.default.createElement("div",{className:"opblock-external-docs"},So.description&&d.default.createElement("span",{className:"opblock-external-docs__description"},d.default.createElement(Bi,{source:So.description})),d.default.createElement(f4,{target:"_blank",className:"opblock-external-docs__link",href:(0,Se.Nm)(di)},di))):null,Hi&&Hi.size?d.default.createElement(el,{parameters:Ss,specPath:V.push("parameters"),operation:Hi,onChangeKey:p4,onTryoutClick:Ce,onResetClick:Ve,onCancelClick:Be,tryItOutEnabled:fo,allowTryItOut:cn,fn:Je,getComponent:ot,specActions:qt,specSelectors:Ft,pathMethod:[un,Xr],getConfigs:It,oas3Actions:Ir,oas3Selectors:jr}):null,fo?d.default.createElement(Sp,{getComponent:ot,path:un,method:Xr,operationServers:Hi.get("servers"),pathServers:Ft.paths().getIn([un,"servers"]),getSelectedServer:jr.selectedServer,setSelectedServer:Ir.setSelectedServer,setServerVariableValue:Ir.setServerVariableValue,getServerVariable:jr.serverVariableValue,getEffectiveServerValue:jr.serverEffectiveValue}):null,fo&&cn&&Ci&&Ci.size?d.default.createElement("div",{className:"opblock-schemes"},d.default.createElement(xp,{schemes:Ci,path:un,method:Xr,specActions:qt,currentScheme:Ds})):null,!fo||!cn||Rg.length<=0?null:d.default.createElement("div",{className:"validation-errors errors-wrapper"},"Please correct the following validation errors and try again.",d.default.createElement("ul",null,(0,O.default)(Rg).call(Rg,(Pg,h4)=>d.default.createElement("li",{key:h4}," ",Pg," ")))),d.default.createElement("div",{className:fo&&J&&cn?"btn-group":"execute-wrapper"},fo&&cn?d.default.createElement(Pi,{operation:Hi,specActions:qt,specSelectors:Ft,oas3Selectors:jr,oas3Actions:Ir,path:un,method:Xr,onExecute:et,disabled:Po}):null,fo&&J&&cn?d.default.createElement(Co,{specActions:qt,path:un,method:Xr}):null),Po?d.default.createElement("div",{className:"loading-container"},d.default.createElement("div",{className:"loading"})):null,Ki?d.default.createElement(ws,{responses:Ki,request:ie,tryItOutResponse:J,getComponent:ot,getConfigs:It,specSelectors:Ft,oas3Actions:Ir,oas3Selectors:jr,specActions:qt,produces:Ft.producesOptionsFor([un,Xr]),producesValue:Ft.currentProducesFor([un,Xr]),specPath:V.push("responses"),path:un,method:Xr,displayRequestDuration:Jn,fn:Je}):null,d4&&Oa.size?d.default.createElement(_p,{extensions:Oa,getComponent:ot}):null)))}}(0,St.default)($e,"defaultProps",{operation:null,response:null,request:null,specPath:(0,L.List)(),summary:""});const tr=(nt=>{var V={};return Cr.d(V,nt),V})({default:()=>CO()});class ln extends d.PureComponent{render(){let{isShown:V,toggleShown:J,getComponent:ie,authActions:he,authSelectors:Ce,operationProps:Ve,specPath:Be}=this.props,{summary:et,isAuthorized:Je,method:ot,op:It,showSummary:qt,path:Ft,operationId:Wt,originalOperationId:Er,displayOperationId:Ir}=Ve.toJS(),{summary:jr}=It,yn=Ve.get("security");const Un=ie("authorizeOperationBtn"),Qr=ie("OperationSummaryMethod"),un=ie("OperationSummaryPath"),Xr=ie("JumpToPath",!0),Fn=ie("CopyToClipboardBtn",!0),Wr=yn&&!!yn.count(),Yo=Wr&&1===yn.size&&yn.first().isEmpty(),cn=!Wr||Yo;return d.default.createElement("div",{className:`opblock-summary opblock-summary-${ot}`},d.default.createElement("button",{"aria-label":`${ot} ${Ft.replace(/\//g,"\u200b/")}`,"aria-expanded":V,className:"opblock-summary-control",onClick:J},d.default.createElement(Qr,{method:ot}),d.default.createElement(un,{getComponent:ie,operationProps:Ve,specPath:Be}),qt?d.default.createElement("div",{className:"opblock-summary-description"},(0,tr.default)(jr||et)):null,Ir&&(Er||Wt)?d.default.createElement("span",{className:"opblock-summary-operation-id"},Er||Wt):null,d.default.createElement("svg",{className:"arrow",width:"20",height:"20","aria-hidden":"true",focusable:"false"},d.default.createElement("use",{href:V?"#large-arrow-up":"#large-arrow-down",xlinkHref:V?"#large-arrow-up":"#large-arrow-down"}))),cn?null:d.default.createElement(Un,{isAuthorized:Je,onClick:()=>{const Jn=Ce.definitionsForRequirements(yn);he.showDefinitions(Jn)}}),d.default.createElement(Fn,{textToCopy:`${Be.get(1)}`}),d.default.createElement(Xr,{path:Be}))}}(0,St.default)(ln,"defaultProps",{operationProps:null,specPath:(0,L.List)(),summary:""});class Ur extends d.PureComponent{render(){let{method:V}=this.props;return d.default.createElement("span",{className:"opblock-summary-method"},V.toUpperCase())}}(0,St.default)(Ur,"defaultProps",{operationProps:null});const tn=(nt=>{var V={};return Cr.d(V,nt),V})({default:()=>OO()});class Rr extends d.PureComponent{render(){let{getComponent:V,operationProps:J}=this.props,{deprecated:ie,isShown:he,path:Ce,tag:Ve,operationId:Be,isDeepLinkingEnabled:et}=J.toJS();const Je=Ce.split(/(?=\/)/g);for(let It=1;It{var V;let{extensions:J,getComponent:ie}=nt,he=ie("OperationExtRow");return d.default.createElement("div",{className:"opblock-section"},d.default.createElement("div",{className:"opblock-section-header"},d.default.createElement("h4",null,"Extensions")),d.default.createElement("div",{className:"table-container"},d.default.createElement("table",null,d.default.createElement("thead",null,d.default.createElement("tr",null,d.default.createElement("td",{className:"col_header"},"Field"),d.default.createElement("td",{className:"col_header"},"Value"))),d.default.createElement("tbody",null,(0,O.default)(V=J.entrySeq()).call(V,Ce=>{let[Ve,Be]=Ce;return d.default.createElement(he,{key:`${Ve}-${Be}`,xKey:Ve,xVal:Be})})))))},_i=nt=>{let{xKey:V,xVal:J}=nt;const ie=J?J.toJS?J.toJS():J:null;return d.default.createElement("tr",null,d.default.createElement("td",null,V),d.default.createElement("td",null,(0,s.default)(ie)))};var ea=Cr(29),Io=Cr(8096),Ro=Cr(471),wi=Cr(9908),ou=Cr(7068);const js=(nt=>{var V={};return Cr.d(V,nt),V})({default:()=>IO()});var ad=Cr(9874);const gp=nt=>{let{value:V,fileName:J,className:ie,downloadable:he,getConfigs:Ce,canCopy:Ve,language:Be}=nt;const et=(0,ou.default)(Ce)?Ce():null,Je=!1!==(0,wi.default)(et,"syntaxHighlight")&&(0,wi.default)(et,"syntaxHighlight.activated",!0),ot=(0,d.useRef)(null);(0,d.useEffect)(()=>{var qt;const Ft=(0,o.default)(qt=(0,Ko.default)(ot.current.childNodes)).call(qt,Wt=>!!Wt.nodeType&&Wt.classList.contains("microlight"));return(0,ea.default)(Ft).call(Ft,Wt=>Wt.addEventListener("mousewheel",It,{passive:!1})),()=>{(0,ea.default)(Ft).call(Ft,Wt=>Wt.removeEventListener("mousewheel",It))}},[V,ie,Be]);const It=qt=>{const{target:Ft,deltaY:Wt}=qt,{scrollHeight:Er,offsetHeight:Ir,scrollTop:jr}=Ft;Er>Ir&&(0===jr&&Wt<0||Ir+jr>=Er&&Wt>0)&&qt.preventDefault()};return d.default.createElement("div",{className:"highlight-code",ref:ot},he?d.default.createElement("div",{className:"download-contents",onClick:()=>{(0,js.default)(V,J)}},"Download"):null,Ve&&d.default.createElement("div",{className:"copy-to-clipboard"},d.default.createElement(ad.CopyToClipboard,{text:V},d.default.createElement("button",null))),Je?d.default.createElement(Ro.d3,{language:Be,className:(0,Io.default)(ie,"microlight"),style:(0,Ro.C2)((0,wi.default)(et,"syntaxHighlight.theme","agate"))},V):d.default.createElement("pre",{className:(0,Io.default)(ie,"microlight")},V))};gp.defaultProps={fileName:"response.txt"};const Fh=gp;class qc extends d.default.Component{constructor(){super(...arguments),(0,St.default)(this,"onChangeProducesWrapper",V=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],V)),(0,St.default)(this,"onResponseContentTypeChange",V=>{let{controlsAcceptHeader:J,value:ie}=V;const{oas3Actions:he,path:Ce,method:Ve}=this.props;J&&he.setResponseContentType({value:ie,path:Ce,method:Ve})})}render(){var V;let{responses:J,tryItOutResponse:ie,getComponent:he,getConfigs:Ce,specSelectors:Ve,fn:Be,producesValue:et,displayRequestDuration:Je,specPath:ot,path:It,method:qt,oas3Selectors:Ft,oas3Actions:Wt}=this.props,Er=(0,Se.iQ)(J);const Ir=he("contentType"),jr=he("liveResponse"),yn=he("response");let Un=this.props.produces&&this.props.produces.size?this.props.produces:qc.defaultProps.produces;const Qr=Ve.isOAS3()?(0,Se.QG)(J):null,un=function(Fn){return Fn.replace(/[^\w-]/g,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"_")}(`${qt}${It}_responses`),Xr=`${un}_select`;return d.default.createElement("div",{className:"responses-wrapper"},d.default.createElement("div",{className:"opblock-section-header"},d.default.createElement("h4",null,"Responses"),Ve.isOAS3()?null:d.default.createElement("label",{htmlFor:Xr},d.default.createElement("span",null,"Response content type"),d.default.createElement(Ir,{value:et,ariaControls:un,ariaLabel:"Response content type",className:"execute-content-type",contentTypes:Un,controlId:Xr,onChange:this.onChangeProducesWrapper}))),d.default.createElement("div",{className:"responses-inner"},ie?d.default.createElement("div",null,d.default.createElement(jr,{response:ie,getComponent:he,getConfigs:Ce,specSelectors:Ve,path:this.props.path,method:this.props.method,displayRequestDuration:Je}),d.default.createElement("h4",null,"Responses")):null,d.default.createElement("table",{"aria-live":"polite",className:"responses-table",id:un,role:"region"},d.default.createElement("thead",null,d.default.createElement("tr",{className:"responses-header"},d.default.createElement("td",{className:"col_header response-col_status"},"Code"),d.default.createElement("td",{className:"col_header response-col_description"},"Description"),Ve.isOAS3()?d.default.createElement("td",{className:"col col_header response-col_links"},"Links"):null)),d.default.createElement("tbody",null,(0,O.default)(V=J.entrySeq()).call(V,Fn=>{let[Wr,Yo]=Fn,cn=ie&&ie.get("status")==Wr?"response_current":"";return d.default.createElement(yn,{key:Wr,path:It,method:qt,specPath:ot.push(Wr),isDefault:Er===Wr,fn:Be,className:cn,code:Wr,response:Yo,specSelectors:Ve,controlsAcceptHeader:Yo===Qr,onContentTypeChange:this.onResponseContentTypeChange,contentType:et,getConfigs:Ce,activeExamplesKey:Ft.activeExamplesMember(It,qt,"responses",Wr),oas3Actions:Wt,getComponent:he})}).toArray()))))}}(0,St.default)(qc,"defaultProps",{tryItOutResponse:null,produces:(0,L.fromJS)(["application/json"]),displayRequestDuration:!1});const vp=(nt=>{var V={};return Cr.d(V,nt),V})({default:()=>PO()});var sd=Cr(2518);class Lh extends d.default.Component{constructor(V,J){super(V,J),(0,St.default)(this,"_onContentTypeChange",ie=>{const{onContentTypeChange:he,controlsAcceptHeader:Ce}=this.props;this.setState({responseContentType:ie}),he({value:ie,controlsAcceptHeader:Ce})}),(0,St.default)(this,"getTargetExamplesKey",()=>{const{response:ie,contentType:he,activeExamplesKey:Ce}=this.props,Be=ie.getIn(["content",this.state.responseContentType||he],(0,L.Map)({})).get("examples",null).keySeq().first();return Ce||Be}),this.state={responseContentType:""}}render(){var V,J;let{path:ie,method:he,code:Ce,response:Ve,className:Be,specPath:et,fn:Je,getComponent:ot,getConfigs:It,specSelectors:qt,contentType:Ft,controlsAcceptHeader:Wt,oas3Actions:Er}=this.props,{inferSchema:Ir}=Je,jr=qt.isOAS3();const{showExtensions:yn}=It();let Un=yn?(0,Se.nX)(Ve):null,Qr=Ve.get("headers"),un=Ve.get("links");const Xr=ot("ResponseExtension"),Fn=ot("headers"),Wr=ot("highlightCode"),Yo=ot("modelExample"),cn=ot("Markdown",!0),Jn=ot("operationLink"),fo=ot("contentType"),Po=ot("ExamplesSelect"),ii=ot("Example");var So,Ci;const di=this.state.responseContentType||Ft,Hi=Ve.getIn(["content",di],(0,L.Map)({})),Ki=Hi.get("examples",null);if(jr){const Pi=Hi.get("schema");So=Pi?Ir(Pi.toJS()):null,Ci=Pi?(0,L.List)(["content",this.state.responseContentType,"schema"]):et}else So=Ve.get("schema"),Ci=Ve.has("schema")?et.push("schema"):et;let Ss,Ds,_s=!1,Oa={includeReadOnly:!0};if(jr){var ws;if(Ds=null===(ws=Hi.get("schema"))||void 0===ws?void 0:ws.toJS(),Ki){const Pi=this.getTargetExamplesKey(),Co=Eo=>Eo.get("value");Ss=Co(Ki.get(Pi,(0,L.Map)({}))),void 0===Ss&&(Ss=Co((0,vp.default)(Ki).call(Ki).next().value)),_s=!0}else void 0!==Hi.get("example")&&(Ss=Hi.get("example"),_s=!0)}else{Ds=So,Oa={...Oa,includeWriteOnly:!0};const Pi=Ve.getIn(["examples",di]);Pi&&(Ss=Pi,_s=!0)}let el=((Pi,Co,Eo)=>{if(null!=Pi){let Bi=null;return(0,sd.O)(Pi)&&(Bi="json"),d.default.createElement("div",null,d.default.createElement(Co,{className:"example",getConfigs:Eo,language:Bi,value:(0,Se.Pz)(Pi)}))}return null})((0,Se.xi)(Ds,di,Oa,_s?Ss:void 0),Wr,It);return d.default.createElement("tr",{className:"response "+(Be||""),"data-code":Ce},d.default.createElement("td",{className:"response-col_status"},Ce),d.default.createElement("td",{className:"response-col_description"},d.default.createElement("div",{className:"response-col_description__inner"},d.default.createElement(cn,{source:Ve.get("description")})),yn&&Un.size?(0,O.default)(V=Un.entrySeq()).call(V,Pi=>{let[Co,Eo]=Pi;return d.default.createElement(Xr,{key:`${Co}-${Eo}`,xKey:Co,xVal:Eo})}):null,jr&&Ve.get("content")?d.default.createElement("section",{className:"response-controls"},d.default.createElement("div",{className:(0,Io.default)("response-control-media-type",{"response-control-media-type--accept-controller":Wt})},d.default.createElement("small",{className:"response-control-media-type__title"},"Media type"),d.default.createElement(fo,{value:this.state.responseContentType,contentTypes:Ve.get("content")?Ve.get("content").keySeq():(0,L.Seq)(),onChange:this._onContentTypeChange,ariaLabel:"Media Type"}),Wt?d.default.createElement("small",{className:"response-control-media-type__accept-message"},"Controls ",d.default.createElement("code",null,"Accept")," header."):null),Ki?d.default.createElement("div",{className:"response-control-examples"},d.default.createElement("small",{className:"response-control-examples__title"},"Examples"),d.default.createElement(Po,{examples:Ki,currentExampleKey:this.getTargetExamplesKey(),onSelect:Pi=>Er.setActiveExamplesMember({name:Pi,pathMethod:[ie,he],contextType:"responses",contextName:Ce}),showLabels:!1})):null):null,el||So?d.default.createElement(Yo,{specPath:Ci,getComponent:ot,getConfigs:It,specSelectors:qt,schema:(0,Se.oG)(So),example:el,includeReadOnly:!0}):null,jr&&Ki?d.default.createElement(ii,{example:Ki.get(this.getTargetExamplesKey(),(0,L.Map)({})),getComponent:ot,getConfigs:It,omitValue:!0}):null,Qr?d.default.createElement(Fn,{headers:Qr,getComponent:ot}):null),jr?d.default.createElement("td",{className:"response-col_links"},un?(0,O.default)(J=un.toSeq().entrySeq()).call(J,Pi=>{let[Co,Eo]=Pi;return d.default.createElement(Jn,{key:Co,name:Co,link:Eo,getComponent:ot})}):d.default.createElement("i",null,"No links")):null)}}(0,St.default)(Lh,"defaultProps",{response:(0,L.fromJS)({}),onContentTypeChange:()=>{}});const Bh=nt=>{let{xKey:V,xVal:J}=nt;return d.default.createElement("div",{className:"response__extension"},V,": ",String(J))},Uh=(nt=>{var V={};return Cr.d(V,nt),V})({default:()=>kO()}),yp=(nt=>{var V={};return Cr.d(V,nt),V})({default:()=>jO()});class Sg extends d.default.PureComponent{constructor(){super(...arguments),(0,St.default)(this,"state",{parsedContent:null}),(0,St.default)(this,"updateParsedContent",V=>{const{content:J}=this.props;if(V!==J)if(J&&J instanceof Blob){var ie=new FileReader;ie.onload=()=>{this.setState({parsedContent:ie.result})},ie.readAsText(J)}else this.setState({parsedContent:J.toString()})})}componentDidMount(){this.updateParsedContent(null)}componentDidUpdate(V){this.updateParsedContent(V.content)}render(){let{content:V,contentType:J,url:ie,headers:he={},getConfigs:Ce,getComponent:Ve}=this.props;const{parsedContent:Be}=this.state,et=Ve("highlightCode"),Je="response_"+(new Date).getTime();let ot,It;if(ie=ie||"",/^application\/octet-stream/i.test(J)||he["Content-Disposition"]&&/attachment/i.test(he["Content-Disposition"])||he["content-disposition"]&&/attachment/i.test(he["content-disposition"])||he["Content-Description"]&&/File Transfer/i.test(he["Content-Description"])||he["content-description"]&&/File Transfer/i.test(he["content-description"]))if("Blob"in window){let qt=J||"text/html",Ft=V instanceof Blob?V:new Blob([V],{type:qt}),Wt=hr.default.createObjectURL(Ft),Er=[qt,ie.substr((0,r.default)(ie).call(ie,"/")+1),Wt].join(":"),Ir=he["content-disposition"]||he["Content-Disposition"];if(void 0!==Ir){let jr=(0,Se.DR)(Ir);null!==jr&&(Er=jr)}It=d.default.createElement("div",null,d.default.createElement("a",Ae.Z.navigator&&Ae.Z.navigator.msSaveOrOpenBlob?{href:Wt,onClick:()=>Ae.Z.navigator.msSaveOrOpenBlob(Ft,Er)}:{href:Wt,download:Er},"Download file"))}else It=d.default.createElement("pre",{className:"microlight"},"Download headers detected but your browser does not support downloading binary via XHR (Blob).");else if(/json/i.test(J)){let qt=null;(0,sd.O)(V)&&(qt="json");try{ot=(0,s.default)(JSON.parse(V),null," ")}catch{ot="can't parse JSON. Raw result:\n\n"+V}It=d.default.createElement(et,{language:qt,downloadable:!0,fileName:`${Je}.json`,value:ot,getConfigs:Ce,canCopy:!0})}else/xml/i.test(J)?(ot=(0,Uh.default)(V,{textNodesOnSameLine:!0,indentor:" "}),It=d.default.createElement(et,{downloadable:!0,fileName:`${Je}.xml`,value:ot,getConfigs:Ce,canCopy:!0})):It="text/html"===(0,yp.default)(J)||/text\/plain/.test(J)?d.default.createElement(et,{downloadable:!0,fileName:`${Je}.html`,value:V,getConfigs:Ce,canCopy:!0}):"text/csv"===(0,yp.default)(J)||/text\/csv/.test(J)?d.default.createElement(et,{downloadable:!0,fileName:`${Je}.csv`,value:V,getConfigs:Ce,canCopy:!0}):/^image\//i.test(J)?(0,bs.default)(J).call(J,"svg")?d.default.createElement("div",null," ",V," "):d.default.createElement("img",{src:hr.default.createObjectURL(V)}):/^audio\//i.test(J)?d.default.createElement("pre",{className:"microlight"},d.default.createElement("audio",{controls:!0,key:ie},d.default.createElement("source",{src:ie,type:J}))):"string"==typeof V?d.default.createElement(et,{downloadable:!0,fileName:`${Je}.txt`,value:V,getConfigs:Ce,canCopy:!0}):V.size>0?Be?d.default.createElement("div",null,d.default.createElement("p",{className:"i"},"Unrecognized response type; displaying content as text."),d.default.createElement(et,{downloadable:!0,fileName:`${Je}.txt`,value:Be,getConfigs:Ce,canCopy:!0})):d.default.createElement("p",{className:"i"},"Unrecognized response type; unable to display."):null;return It?d.default.createElement("div",null,d.default.createElement("h5",null,"Response body"),It):null}}var $h=Cr(374);class Yn extends d.Component{constructor(V){super(V),(0,St.default)(this,"onChange",(J,ie,he)=>{let{specActions:{changeParamByIdentity:Ce},onChangeKey:Ve}=this.props;Ce(Ve,J,ie,he)}),(0,St.default)(this,"onChangeConsumesWrapper",J=>{let{specActions:{changeConsumesValue:ie},onChangeKey:he}=this.props;ie(he,J)}),(0,St.default)(this,"toggleTab",J=>"parameters"===J?this.setState({parametersVisible:!0,callbackVisible:!1}):"callbacks"===J?this.setState({callbackVisible:!0,parametersVisible:!1}):void 0),(0,St.default)(this,"onChangeMediaType",J=>{let{value:ie,pathMethod:he}=J,{specActions:Ce,oas3Selectors:Ve,oas3Actions:Be}=this.props;const et=Ve.hasUserEditedBody(...he),Je=Ve.shouldRetainRequestBodyValue(...he);Be.setRequestContentType({value:ie,pathMethod:he}),Be.initRequestBodyValidateError({pathMethod:he}),et||(Je||Be.setRequestBodyValue({value:void 0,pathMethod:he}),Ce.clearResponse(...he),Ce.clearRequest(...he),Ce.clearValidateParams(he))}),this.state={callbackVisible:!1,parametersVisible:!0}}render(){var V;let{onTryoutClick:J,onResetClick:ie,parameters:he,allowTryItOut:Ce,tryItOutEnabled:Ve,specPath:Be,fn:et,getComponent:Je,getConfigs:ot,specSelectors:It,specActions:qt,pathMethod:Ft,oas3Actions:Wt,oas3Selectors:Er,operation:Ir}=this.props;const jr=Je("parameterRow"),yn=Je("TryItOutButton"),Un=Je("contentType"),Qr=Je("Callbacks",!0),un=Je("RequestBody",!0),Xr=Ve&&Ce,Fn=It.isOAS3(),Wr=Ir.get("requestBody"),Yo=(0,P.default)(V=(0,$h.default)((0,P.default)(he).call(he,(cn,Jn)=>{const fo=Jn.get("in");return cn[fo]??(cn[fo]=[]),cn[fo].push(Jn),cn},{}))).call(V,(cn,Jn)=>(0,M.default)(cn).call(cn,Jn),[]);return d.default.createElement("div",{className:"opblock-section"},d.default.createElement("div",{className:"opblock-section-header"},Fn?d.default.createElement("div",{className:"tab-header"},d.default.createElement("div",{onClick:()=>this.toggleTab("parameters"),className:`tab-item ${this.state.parametersVisible&&"active"}`},d.default.createElement("h4",{className:"opblock-title"},d.default.createElement("span",null,"Parameters"))),Ir.get("callbacks")?d.default.createElement("div",{onClick:()=>this.toggleTab("callbacks"),className:`tab-item ${this.state.callbackVisible&&"active"}`},d.default.createElement("h4",{className:"opblock-title"},d.default.createElement("span",null,"Callbacks"))):null):d.default.createElement("div",{className:"tab-header"},d.default.createElement("h4",{className:"opblock-title"},"Parameters")),Ce?d.default.createElement(yn,{isOAS3:It.isOAS3(),hasUserEditedBody:Er.hasUserEditedBody(...Ft),enabled:Ve,onCancelClick:this.props.onCancelClick,onTryoutClick:J,onResetClick:()=>ie(Ft)}):null),this.state.parametersVisible?d.default.createElement("div",{className:"parameters-container"},Yo.length?d.default.createElement("div",{className:"table-container"},d.default.createElement("table",{className:"parameters"},d.default.createElement("thead",null,d.default.createElement("tr",null,d.default.createElement("th",{className:"col_header parameters-col_name"},"Name"),d.default.createElement("th",{className:"col_header parameters-col_description"},"Description"))),d.default.createElement("tbody",null,(0,O.default)(Yo).call(Yo,(cn,Jn)=>d.default.createElement(jr,{fn:et,specPath:Be.push(Jn.toString()),getComponent:Je,getConfigs:ot,rawParam:cn,param:It.parameterWithMetaByIdentity(Ft,cn),key:`${cn.get("in")}.${cn.get("name")}`,onChange:this.onChange,onChangeConsumes:this.onChangeConsumesWrapper,specSelectors:It,specActions:qt,oas3Actions:Wt,oas3Selectors:Er,pathMethod:Ft,isExecute:Xr}))))):d.default.createElement("div",{className:"opblock-description-wrapper"},d.default.createElement("p",null,"No parameters"))):null,this.state.callbackVisible?d.default.createElement("div",{className:"callbacks-container opblock-description-wrapper"},d.default.createElement(Qr,{callbacks:(0,L.Map)(Ir.get("callbacks")),specPath:(0,T.default)(Be).call(Be,0,-1).push("callbacks")})):null,Fn&&Wr&&this.state.parametersVisible&&d.default.createElement("div",{className:"opblock-section opblock-section-request-body"},d.default.createElement("div",{className:"opblock-section-header"},d.default.createElement("h4",{className:`opblock-title parameter__name ${Wr.get("required")&&"required"}`},"Request body"),d.default.createElement("label",null,d.default.createElement(Un,{value:Er.requestContentType(...Ft),contentTypes:Wr.get("content",(0,L.List)()).keySeq(),onChange:cn=>{this.onChangeMediaType({value:cn,pathMethod:Ft})},className:"body-param-content-type",ariaLabel:"Request content type"}))),d.default.createElement("div",{className:"opblock-description-wrapper"},d.default.createElement(un,{setRetainRequestBodyValueFlag:cn=>Wt.setRetainRequestBodyValueFlag({value:cn,pathMethod:Ft}),userHasEditedBody:Er.hasUserEditedBody(...Ft),specPath:(0,T.default)(Be).call(Be,0,-1).push("requestBody"),requestBody:Wr,requestBodyValue:Er.requestBodyValue(...Ft),requestBodyInclusionSetting:Er.requestBodyInclusionSetting(...Ft),requestBodyErrors:Er.requestBodyErrors(...Ft),isExecute:Xr,getConfigs:ot,activeExamplesKey:Er.activeExamplesMember(...Ft,"requestBody","requestBody"),updateActiveExamplesKey:cn=>{this.props.oas3Actions.setActiveExamplesMember({name:cn,pathMethod:this.props.pathMethod,contextType:"requestBody",contextName:"requestBody"})},onChange:(cn,Jn)=>{if(Jn){const fo=Er.requestBodyValue(...Ft),Po=L.Map.isMap(fo)?fo:(0,L.Map)();return Wt.setRequestBodyValue({pathMethod:Ft,value:Po.setIn(Jn,cn)})}Wt.setRequestBodyValue({value:cn,pathMethod:Ft})},onChangeIncludeEmpty:(cn,Jn)=>{Wt.setRequestBodyInclusion({pathMethod:Ft,value:Jn,name:cn})},contentType:Er.requestContentType(...Ft)}))))}}(0,St.default)(Yn,"defaultProps",{onTryoutClick:Function.prototype,onCancelClick:Function.prototype,tryItOutEnabled:!1,allowTryItOut:!0,onChangeKey:[],specPath:[]});const Gn=nt=>{let{xKey:V,xVal:J}=nt;return d.default.createElement("div",{className:"parameter__extension"},V,": ",String(J))};class qs extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"onCheckboxChange",V=>{const{onChange:J}=this.props;J(V.target.checked)})}componentDidMount(){const{isIncludedOptions:V,onChange:J}=this.props,{shouldDispatchInit:ie,defaultValue:he}=V;ie&&J(he)}render(){let{isIncluded:V,isDisabled:J}=this.props;return d.default.createElement("div",null,d.default.createElement("label",{className:(0,Io.default)("parameter__empty_value_toggle",{disabled:J})},d.default.createElement("input",{type:"checkbox",disabled:J,checked:!J&&V,onChange:this.onCheckboxChange}),"Send empty value"))}}(0,St.default)(qs,"defaultProps",{onChange:()=>{},isIncludedOptions:{}});var ef=Cr(9069);class tf extends d.Component{constructor(V,J){var ie;super(V,J),ie=this,(0,St.default)(this,"onChangeWrapper",function(he){let Ce,Ve=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{onChange:Be,rawParam:et}=ie.props;return Ce=""===he||he&&0===he.size?null:he,Be(et,Ce,Ve)}),(0,St.default)(this,"_onExampleSelect",he=>{this.props.oas3Actions.setActiveExamplesMember({name:he,pathMethod:this.props.pathMethod,contextType:"parameters",contextName:this.getParamKey()})}),(0,St.default)(this,"onChangeIncludeEmpty",he=>{let{specActions:Ce,param:Ve,pathMethod:Be}=this.props;const et=Ve.get("name"),Je=Ve.get("in");return Ce.updateEmptyParamInclusion(Be,et,Je,he)}),(0,St.default)(this,"setDefaultValue",()=>{let{specSelectors:he,pathMethod:Ce,rawParam:Ve,oas3Selectors:Be}=this.props;const et=he.parameterWithMetaByIdentity(Ce,Ve)||(0,L.Map)(),{schema:Je}=(0,ef.Z)(et,{isOAS3:he.isOAS3()}),ot=et.get("content",(0,L.Map)()).keySeq().first(),It=Je?(0,Se.xi)(Je.toJS(),ot,{includeWriteOnly:!0}):null;if(et&&void 0===et.get("value")&&"body"!==et.get("in")){let qt;if(he.isSwagger2())qt=void 0!==et.get("x-example")?et.get("x-example"):void 0!==et.getIn(["schema","example"])?et.getIn(["schema","example"]):Je&&Je.getIn(["default"]);else if(he.isOAS3()){const Ft=Be.activeExamplesMember(...Ce,"parameters",this.getParamKey());qt=void 0!==et.getIn(["examples",Ft,"value"])?et.getIn(["examples",Ft,"value"]):void 0!==et.getIn(["content",ot,"example"])?et.getIn(["content",ot,"example"]):void 0!==et.get("example")?et.get("example"):void 0!==(Je&&Je.get("example"))?Je&&Je.get("example"):void 0!==(Je&&Je.get("default"))?Je&&Je.get("default"):et.get("default")}void 0===qt||L.List.isList(qt)||(qt=(0,Se.Pz)(qt)),void 0!==qt?this.onChangeWrapper(qt):Je&&"object"===Je.get("type")&&It&&!et.get("examples")&&this.onChangeWrapper(L.List.isList(It)?It:(0,Se.Pz)(It))}}),this.setDefaultValue()}UNSAFE_componentWillReceiveProps(V){let J,{specSelectors:ie,pathMethod:he,rawParam:Ce}=V,Ve=ie.isOAS3(),Be=ie.parameterWithMetaByIdentity(he,Ce)||new L.Map;if(Be=Be.isEmpty()?Ce:Be,Ve){let{schema:ot}=(0,ef.Z)(Be,{isOAS3:Ve});J=ot?ot.get("enum"):void 0}else J=Be?Be.get("enum"):void 0;let et,Je=Be?Be.get("value"):void 0;void 0!==Je?et=Je:Ce.get("required")&&J&&J.size&&(et=J.first()),void 0!==et&&et!==Je&&this.onChangeWrapper((0,Se.D$)(et)),this.setDefaultValue()}getParamKey(){const{param:V}=this.props;return V?`${V.get("name")}-${V.get("in")}`:null}render(){var V,J;let{param:ie,rawParam:he,getComponent:Ce,getConfigs:Ve,isExecute:Be,fn:et,onChangeConsumes:Je,specSelectors:ot,pathMethod:It,specPath:qt,oas3Selectors:Ft}=this.props,Wt=ot.isOAS3();const{showExtensions:Er,showCommonExtensions:Ir}=Ve();if(ie||(ie=he),!he)return null;const jr=Ce("JsonSchemaForm"),yn=Ce("ParamBody");let Un=ie.get("in"),Qr="body"!==Un?null:d.default.createElement(yn,{getComponent:Ce,getConfigs:Ve,fn:et,param:ie,consumes:ot.consumesOptionsFor(It),consumesValue:ot.contentTypeValues(It).get("requestContentType"),onChange:this.onChangeWrapper,onChangeConsumes:Je,isExecute:Be,specSelectors:ot,pathMethod:It});const un=Ce("modelExample"),Xr=Ce("Markdown",!0),Fn=Ce("ParameterExt"),Wr=Ce("ParameterIncludeEmpty"),Yo=Ce("ExamplesSelectValueRetainer"),cn=Ce("Example");let Jn,fo,Po,ii,{schema:So}=(0,ef.Z)(ie,{isOAS3:Wt}),Ci=ot.parameterWithMetaByIdentity(It,he)||(0,L.Map)(),di=So?So.get("format"):null,Hi=So?So.get("type"):null,Ki=So?So.getIn(["items","type"]):null,Ss="formData"===Un,Ds="FormData"in Ae.Z,_s=ie.get("required"),Oa=Ci?Ci.get("value"):"",ws=Ir?(0,Se.po)(So):null,el=Er?(0,Se.nX)(ie):null,Pi=!1;return void 0!==ie&&So&&(Jn=So.get("items")),void 0!==Jn?(fo=Jn.get("enum"),Po=Jn.get("default")):So&&(fo=So.get("enum")),fo&&fo.size&&fo.size>0&&(Pi=!0),void 0!==ie&&(So&&(Po=So.get("default")),void 0===Po&&(Po=ie.get("default")),ii=ie.get("example"),void 0===ii&&(ii=ie.get("x-example"))),d.default.createElement("tr",{"data-param-name":ie.get("name"),"data-param-in":ie.get("in")},d.default.createElement("td",{className:"parameters-col_name"},d.default.createElement("div",{className:_s?"parameter__name required":"parameter__name"},ie.get("name"),_s?d.default.createElement("span",null,"\xa0*"):null),d.default.createElement("div",{className:"parameter__type"},Hi,Ki&&`[${Ki}]`,di&&d.default.createElement("span",{className:"prop-format"},"($",di,")")),d.default.createElement("div",{className:"parameter__deprecated"},Wt&&ie.get("deprecated")?"deprecated":null),d.default.createElement("div",{className:"parameter__in"},"(",ie.get("in"),")"),Ir&&ws.size?(0,O.default)(V=ws.entrySeq()).call(V,Co=>{let[Eo,Bi]=Co;return d.default.createElement(Fn,{key:`${Eo}-${Bi}`,xKey:Eo,xVal:Bi})}):null,Er&&el.size?(0,O.default)(J=el.entrySeq()).call(J,Co=>{let[Eo,Bi]=Co;return d.default.createElement(Fn,{key:`${Eo}-${Bi}`,xKey:Eo,xVal:Bi})}):null),d.default.createElement("td",{className:"parameters-col_description"},ie.get("description")?d.default.createElement(Xr,{source:ie.get("description")}):null,!Qr&&Be||!Pi?null:d.default.createElement(Xr,{className:"parameter__enum",source:"Available values : "+(0,O.default)(fo).call(fo,function(Co){return Co}).toArray().join(", ")}),!Qr&&Be||void 0===Po?null:d.default.createElement(Xr,{className:"parameter__default",source:"Default value : "+Po}),!Qr&&Be||void 0===ii?null:d.default.createElement(Xr,{source:"Example : "+ii}),Ss&&!Ds&&d.default.createElement("div",null,"Error: your browser does not support FormData"),Wt&&ie.get("examples")?d.default.createElement("section",{className:"parameter-controls"},d.default.createElement(Yo,{examples:ie.get("examples"),onSelect:this._onExampleSelect,updateValue:this.onChangeWrapper,getComponent:Ce,defaultToFirstExample:!0,currentKey:Ft.activeExamplesMember(...It,"parameters",this.getParamKey()),currentUserInputValue:Oa})):null,Qr?null:d.default.createElement(jr,{fn:et,getComponent:Ce,value:Oa,required:_s,disabled:!Be,description:ie.get("name"),onChange:this.onChangeWrapper,errors:Ci.get("errors"),schema:So}),Qr&&So?d.default.createElement(un,{getComponent:Ce,specPath:qt.push("schema"),getConfigs:Ve,isExecute:Be,specSelectors:ot,schema:So,example:Qr,includeWriteOnly:!0}):null,!Qr&&Be&&ie.get("allowEmptyValue")?d.default.createElement(Wr,{onChange:this.onChangeIncludeEmpty,isIncluded:ot.parameterInclusionSettingFor(It,ie.get("name"),ie.get("in")),isDisabled:!(0,Se.O2)(Oa)}):null,Wt&&ie.get("examples")?d.default.createElement(cn,{example:ie.getIn(["examples",Ft.activeExamplesMember(...It,"parameters",this.getParamKey())]),getComponent:Ce,getConfigs:Ve}):null))}}var ld=Cr(6235);class _g extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"handleValidateParameters",()=>{let{specSelectors:V,specActions:J,path:ie,method:he}=this.props;return J.validateParams([ie,he]),V.validateBeforeExecute([ie,he])}),(0,St.default)(this,"handleValidateRequestBody",()=>{let{path:V,method:J,specSelectors:ie,oas3Selectors:he,oas3Actions:Ce}=this.props,Ve={missingBodyValue:!1,missingRequiredKeys:[]};Ce.clearRequestBodyValidateError({path:V,method:J});let Be=ie.getOAS3RequiredRequestBodyContentType([V,J]),et=he.requestBodyValue(V,J),Je=he.validateBeforeExecute([V,J]),ot=he.requestContentType(V,J);if(!Je)return Ve.missingBodyValue=!0,Ce.setRequestBodyValidateError({path:V,method:J,validationErrors:Ve}),!1;if(!Be)return!0;let It=he.validateShallowRequired({oas3RequiredRequestBodyContentType:Be,oas3RequestContentType:ot,oas3RequestBodyValue:et});return!It||It.length<1||((0,ea.default)(It).call(It,qt=>{Ve.missingRequiredKeys.push(qt)}),Ce.setRequestBodyValidateError({path:V,method:J,validationErrors:Ve}),!1)}),(0,St.default)(this,"handleValidationResultPass",()=>{let{specActions:V,operation:J,path:ie,method:he}=this.props;this.props.onExecute&&this.props.onExecute(),V.execute({operation:J,path:ie,method:he})}),(0,St.default)(this,"handleValidationResultFail",()=>{let{specActions:V,path:J,method:ie}=this.props;V.clearValidateParams([J,ie]),(0,ld.default)(()=>{V.validateParams([J,ie])},40)}),(0,St.default)(this,"handleValidationResult",V=>{V?this.handleValidationResultPass():this.handleValidationResultFail()}),(0,St.default)(this,"onClick",()=>{let V=this.handleValidateParameters(),J=this.handleValidateRequestBody();this.handleValidationResult(V&&J)}),(0,St.default)(this,"onChangeProducesWrapper",V=>this.props.specActions.changeProducesValue([this.props.path,this.props.method],V))}render(){const{disabled:V}=this.props;return d.default.createElement("button",{className:"btn execute opblock-control__btn",onClick:this.onClick,disabled:V},"Execute")}}class Ep extends d.default.Component{render(){var V;let{headers:J,getComponent:ie}=this.props;const he=ie("Property"),Ce=ie("Markdown",!0);return J&&J.size?d.default.createElement("div",{className:"headers-wrapper"},d.default.createElement("h4",{className:"headers__title"},"Headers:"),d.default.createElement("table",{className:"headers"},d.default.createElement("thead",null,d.default.createElement("tr",{className:"header-row"},d.default.createElement("th",{className:"header-col"},"Name"),d.default.createElement("th",{className:"header-col"},"Description"),d.default.createElement("th",{className:"header-col"},"Type"))),d.default.createElement("tbody",null,(0,O.default)(V=J.entrySeq()).call(V,Ve=>{let[Be,et]=Ve;if(!L.default.Map.isMap(et))return null;const Je=et.get("description"),ot=et.getIn(["schema"])?et.getIn(["schema","type"]):et.getIn(["type"]),It=et.getIn(["schema","example"]);return d.default.createElement("tr",{key:Be},d.default.createElement("td",{className:"header-col"},Be),d.default.createElement("td",{className:"header-col"},Je?d.default.createElement(Ce,{source:Je}):null),d.default.createElement("td",{className:"header-col"},ot," ",It?d.default.createElement(he,{propKey:"Example",propVal:It,propClass:"header-example"}):null))}).toArray()))):null}}class m5 extends d.default.Component{render(){let{editorActions:V,errSelectors:J,layoutSelectors:ie,layoutActions:he,getComponent:Ce}=this.props;const Ve=Ce("Collapse");if(V&&V.jumpToLine)var Be=V.jumpToLine;let et=J.allErrors(),Je=(0,o.default)(et).call(et,qt=>"thrown"===qt.get("type")||"error"===qt.get("level"));if(!Je||Je.count()<1)return null;let ot=ie.isShown(["errorPane"],!0),It=Je.sortBy(qt=>qt.get("line"));return d.default.createElement("pre",{className:"errors-wrapper"},d.default.createElement("hgroup",{className:"error"},d.default.createElement("h4",{className:"errors__title"},"Errors"),d.default.createElement("button",{className:"btn errors__clear-btn",onClick:()=>he.show(["errorPane"],!ot)},ot?"Hide":"Show")),d.default.createElement(Ve,{isOpened:ot,animated:!0},d.default.createElement("div",{className:"errors"},(0,O.default)(It).call(It,(qt,Ft)=>{let Wt=qt.get("type");return"thrown"===Wt||"auth"===Wt?d.default.createElement(Wy,{key:Ft,error:qt.get("error")||qt,jumpToLine:Be}):"spec"===Wt?d.default.createElement(g5,{key:Ft,error:qt,jumpToLine:Be}):void 0}))))}}const Wy=nt=>{let{error:V,jumpToLine:J}=nt;if(!V)return null;let ie=V.get("line");return d.default.createElement("div",{className:"error-wrapper"},V?d.default.createElement("div",null,d.default.createElement("h4",null,V.get("source")&&V.get("level")?Gy(V.get("source"))+" "+V.get("level"):"",V.get("path")?d.default.createElement("small",null," at ",V.get("path")):null),d.default.createElement("span",{className:"message thrown"},V.get("message")),d.default.createElement("div",{className:"error-line"},ie&&J?d.default.createElement("a",{onClick:(0,m.default)(J).call(J,null,ie)},"Jump to line ",ie):null)):null)},g5=nt=>{let{error:V,jumpToLine:J}=nt,ie=null;return V.get("path")?ie=L.List.isList(V.get("path"))?d.default.createElement("small",null,"at ",V.get("path").join(".")):d.default.createElement("small",null,"at ",V.get("path")):V.get("line")&&!J&&(ie=d.default.createElement("small",null,"on line ",V.get("line"))),d.default.createElement("div",{className:"error-wrapper"},V?d.default.createElement("div",null,d.default.createElement("h4",null,Gy(V.get("source"))+" "+V.get("level"),"\xa0",ie),d.default.createElement("span",{className:"message"},V.get("message")),d.default.createElement("div",{className:"error-line"},J?d.default.createElement("a",{onClick:(0,m.default)(J).call(J,null,V.get("line"))},"Jump to line ",V.get("line")):null)):null)};function Gy(nt){var V;return(0,O.default)(V=(nt||"").split(" ")).call(V,J=>J[0].toUpperCase()+(0,T.default)(J).call(J,1)).join(" ")}Wy.defaultProps={jumpToLine:null};class Ky extends d.default.Component{constructor(){super(...arguments),(0,St.default)(this,"onChangeWrapper",V=>this.props.onChange(V.target.value))}componentDidMount(){this.props.contentTypes&&this.props.onChange(this.props.contentTypes.first())}UNSAFE_componentWillReceiveProps(V){var J;V.contentTypes&&V.contentTypes.size&&((0,bs.default)(J=V.contentTypes).call(J,V.value)||V.onChange(V.contentTypes.first()))}render(){let{ariaControls:V,ariaLabel:J,className:ie,contentTypes:he,controlId:Ce,value:Ve}=this.props;return he&&he.size?d.default.createElement("div",{className:"content-type-wrapper "+(ie||"")},d.default.createElement("select",{"aria-controls":V,"aria-label":J,className:"content-type",id:Ce,onChange:this.onChangeWrapper,value:Ve||""},(0,O.default)(he).call(he,Be=>d.default.createElement("option",{key:Be,value:Be},Be)).toArray())):null}}(0,St.default)(Ky,"defaultProps",{onChange:()=>{},value:null,contentTypes:(0,L.fromJS)(["application/json"])});var xs=Cr(863),v5=Cr(5942);function bp(){for(var nt,V=arguments.length,J=new Array(V),ie=0;ie!!he).join(" ")).call(nt)}class y5 extends d.default.Component{render(){let{fullscreen:V,full:J,...ie}=this.props;return d.default.createElement("section",V?ie:(0,xs.default)({},ie,{className:bp(ie.className,"swagger-container"+(J?"-full":""))}))}}const wg={mobile:"",tablet:"-tablet",desktop:"-desktop",large:"-hd"};class E5 extends d.default.Component{render(){const{hide:V,keepContents:J,mobile:ie,tablet:he,desktop:Ce,large:Ve,...Be}=this.props;if(V&&!J)return d.default.createElement("span",null);let et=[];for(let ot in wg){if(!Object.prototype.hasOwnProperty.call(wg,ot))continue;let It=wg[ot];if(ot in this.props){let qt=this.props[ot];if(qt<1){et.push("none"+It);continue}et.push("block"+It),et.push("col-"+qt+It)}}V&&et.push("hidden");let Je=bp(Be.className,...et);return d.default.createElement("section",(0,xs.default)({},Be,{className:Je}))}}class b5 extends d.default.Component{render(){return d.default.createElement("div",(0,xs.default)({},this.props,{className:bp(this.props.className,"wrapper")}))}}class Yy extends d.default.Component{render(){return d.default.createElement("button",(0,xs.default)({},this.props,{className:bp(this.props.className,"button")}))}}(0,St.default)(Yy,"defaultProps",{className:""});const x5=nt=>d.default.createElement("textarea",nt),S5=nt=>d.default.createElement("input",nt);class Jy extends d.default.Component{constructor(V,J){let ie;super(V,J),(0,St.default)(this,"onChange",he=>{let Ce,{onChange:Ve,multiple:Be}=this.props,et=(0,T.default)([]).call(he.target.options);var Je;Ce=Be?(0,O.default)(Je=(0,o.default)(et).call(et,function(ot){return ot.selected})).call(Je,function(ot){return ot.value}):he.target.value,this.setState({value:Ce}),Ve&&Ve(Ce)}),ie=V.value?V.value:V.multiple?[""]:"",this.state={value:ie}}UNSAFE_componentWillReceiveProps(V){V.value!==this.props.value&&this.setState({value:V.value})}render(){var V,J;let{allowedValues:ie,multiple:he,allowEmptyValue:Ce,disabled:Ve}=this.props,Be=(null===(V=this.state.value)||void 0===V||null===(J=V.toJS)||void 0===J?void 0:J.call(V))||this.state.value;return d.default.createElement("select",{className:this.props.className,multiple:he,value:Be,onChange:this.onChange,disabled:Ve},Ce?d.default.createElement("option",{value:""},"--"):null,(0,O.default)(ie).call(ie,function(et,Je){return d.default.createElement("option",{key:Je,value:String(et)},String(et))}))}}(0,St.default)(Jy,"defaultProps",{multiple:!1,allowEmptyValue:!0});class Xy extends d.default.Component{render(){return d.default.createElement("a",(0,xs.default)({},this.props,{rel:"noopener noreferrer",className:bp(this.props.className,"link")}))}}const Zy=nt=>{let{children:V}=nt;return d.default.createElement("div",{className:"no-margin"}," ",V," ")};class Qy extends d.default.Component{renderNotAnimated(){return this.props.isOpened?d.default.createElement(Zy,null,this.props.children):d.default.createElement("noscript",null)}render(){let{animated:V,isOpened:J,children:ie}=this.props;return V?(ie=J?ie:null,d.default.createElement(Zy,null,ie)):this.renderNotAnimated()}}(0,St.default)(Qy,"defaultProps",{isOpened:!1,animated:!1});class _5 extends d.default.Component{constructor(){var V;super(...arguments),this.setTagShown=(0,m.default)(V=this._setTagShown).call(V,this)}_setTagShown(V,J){this.props.layoutActions.show(V,J)}showOp(V,J){let{layoutActions:ie}=this.props;ie.show(V,J)}render(){let{specSelectors:V,layoutSelectors:J,layoutActions:ie,getComponent:he}=this.props,Ce=V.taggedOperations();const Ve=he("Collapse");return d.default.createElement("div",null,d.default.createElement("h4",{className:"overview-title"},"Overview"),(0,O.default)(Ce).call(Ce,(Be,et)=>{let Je=Be.get("operations"),ot=["overview-tags",et],It=J.isShown(ot,!0);return d.default.createElement("div",{key:"overview-"+et},d.default.createElement("h4",{onClick:()=>ie.show(ot,!It),className:"link overview-tag"}," ",It?"-":"+",et),d.default.createElement(Ve,{isOpened:It,animated:!0},(0,O.default)(Je).call(Je,qt=>{let{path:Ft,method:Wt,id:Er}=qt.toObject(),Ir="operations",jr=Er,yn=J.isShown([Ir,jr]);return d.default.createElement(w5,{key:Er,path:Ft,method:Wt,id:Ft+"-"+Wt,shown:yn,showOpId:jr,showOpIdPrefix:Ir,href:`#operation-${jr}`,onClick:ie.show})}).toArray()))}).toArray(),Ce.size<1&&d.default.createElement("h3",null," No operations defined in spec! "))}}class w5 extends d.default.Component{constructor(V){var J;super(V),this.onClick=(0,m.default)(J=this._onClick).call(J,this)}_onClick(){let{showOpId:V,showOpIdPrefix:J,onClick:ie,shown:he}=this.props;ie([J,V],!he)}render(){let{id:V,method:J,shown:ie,href:he}=this.props;return d.default.createElement(Xy,{href:he,onClick:this.onClick,className:"block opblock-link "+(ie?"shown":"")},d.default.createElement("div",null,d.default.createElement("small",{className:`bold-label-${J}`},J.toUpperCase()),d.default.createElement("span",{className:"bold-label"},V)))}}class C5 extends d.default.Component{componentDidMount(){this.props.initialValue&&(this.inputRef.value=this.props.initialValue)}render(){const{value:V,defaultValue:J,initialValue:ie,...he}=this.props;return d.default.createElement("input",(0,xs.default)({},he,{ref:Ce=>this.inputRef=Ce}))}}class A5 extends d.default.Component{render(){let{host:V,basePath:J}=this.props;return d.default.createElement("pre",{className:"base-url"},"[ Base URL: ",V,J," ]")}}class O5 extends d.default.Component{render(){let{data:V,getComponent:J,selectedServer:ie,url:he}=this.props,Ce=V.get("name")||"the developer",Ve=In(V.get("url"),he,{selectedServer:ie}),Be=V.get("email");const et=J("Link");return d.default.createElement("div",{className:"info__contact"},Ve&&d.default.createElement("div",null,d.default.createElement(et,{href:(0,Se.Nm)(Ve),target:"_blank"},Ce," - Website")),Be&&d.default.createElement(et,{href:(0,Se.Nm)(`mailto:${Be}`)},Ve?`Send email to ${Ce}`:`Contact ${Ce}`))}}class T5 extends d.default.Component{render(){let{license:V,getComponent:J,selectedServer:ie,url:he}=this.props;const Ce=J("Link");let Ve=V.get("name")||"License",Be=In(V.get("url"),he,{selectedServer:ie});return d.default.createElement("div",{className:"info__license"},Be?d.default.createElement(Ce,{target:"_blank",href:(0,Se.Nm)(Be)},Ve):d.default.createElement("span",null,Ve))}}class I5 extends d.default.PureComponent{render(){const{url:V,getComponent:J}=this.props,ie=J("Link");return d.default.createElement(ie,{target:"_blank",href:(0,Se.Nm)(V)},d.default.createElement("span",{className:"url"}," ",V))}}class R5 extends d.default.Component{render(){let{info:V,url:J,host:ie,basePath:he,getComponent:Ce,externalDocs:Ve,selectedServer:Be,url:et}=this.props,Je=V.get("version"),ot=V.get("description"),It=V.get("title"),qt=In(V.get("termsOfService"),et,{selectedServer:Be}),Ft=V.get("contact"),Wt=V.get("license"),Er=In(Ve&&Ve.get("url"),et,{selectedServer:Be}),Ir=Ve&&Ve.get("description");const jr=Ce("Markdown",!0),yn=Ce("Link"),Un=Ce("VersionStamp"),Qr=Ce("InfoUrl"),un=Ce("InfoBasePath");return d.default.createElement("div",{className:"info"},d.default.createElement("hgroup",{className:"main"},d.default.createElement("h2",{className:"title"},It,Je&&d.default.createElement(Un,{version:Je})),ie||he?d.default.createElement(un,{host:ie,basePath:he}):null,J&&d.default.createElement(Qr,{getComponent:Ce,url:J})),d.default.createElement("div",{className:"description"},d.default.createElement(jr,{source:ot})),qt&&d.default.createElement("div",{className:"info__tos"},d.default.createElement(yn,{target:"_blank",href:(0,Se.Nm)(qt)},"Terms of service")),Ft&&Ft.size?d.default.createElement(O5,{getComponent:Ce,data:Ft,selectedServer:Be,url:J}):null,Wt&&Wt.size?d.default.createElement(T5,{getComponent:Ce,license:Wt,selectedServer:Be,url:J}):null,Er?d.default.createElement(yn,{className:"info__extdocs",target:"_blank",href:(0,Se.Nm)(Er)},Ir||Er):null)}}class P5 extends d.default.Component{render(){const{specSelectors:V,getComponent:J,oas3Selectors:ie}=this.props,he=V.info(),Ce=V.url(),Ve=V.basePath(),Be=V.host(),et=V.externalDocs(),Je=ie.selectedServer(),ot=J("info");return d.default.createElement("div",null,he&&he.count()?d.default.createElement(ot,{info:he,url:Ce,host:Be,basePath:Ve,externalDocs:et,getComponent:J,selectedServer:Je}):null)}}class M5 extends d.default.Component{render(){return null}}class k5 extends d.default.Component{render(){return d.default.createElement("div",{className:"view-line-link copy-to-clipboard",title:"Copy to clipboard"},d.default.createElement(ad.CopyToClipboard,{text:this.props.textToCopy},d.default.createElement("svg",{width:"15",height:"16"},d.default.createElement("use",{href:"#copy",xlinkHref:"#copy"}))))}}class N5 extends d.default.Component{render(){return d.default.createElement("div",{className:"footer"})}}class j5 extends d.default.Component{constructor(){super(...arguments),(0,St.default)(this,"onFilterChange",V=>{const{target:{value:J}}=V;this.props.layoutActions.updateFilter(J)})}render(){const{specSelectors:V,layoutSelectors:J,getComponent:ie}=this.props,he=ie("Col"),Ce="loading"===V.loadingStatus(),Ve="failed"===V.loadingStatus(),Be=J.currentFilter(),et=["operation-filter-input"];return Ve&&et.push("failed"),Ce&&et.push("loading"),d.default.createElement("div",null,null===Be||!1===Be||"false"===Be?null:d.default.createElement("div",{className:"filter-container"},d.default.createElement(he,{className:"filter wrapper",mobile:12},d.default.createElement("input",{className:et.join(" "),placeholder:"Filter by tag",type:"text",onChange:this.onFilterChange,value:!0===Be||"true"===Be?"":Be,disabled:Ce}))))}}const Cg=Function.prototype;class zh extends d.PureComponent{constructor(V,J){super(V,J),(0,St.default)(this,"updateValues",ie=>{let{param:he,isExecute:Ce,consumesValue:Ve=""}=ie,Be=/xml/i.test(Ve),et=/json/i.test(Ve),Je=he.get(Be?"value_xml":"value");if(void 0!==Je){let ot=!Je&&et?"{}":Je;this.setState({value:ot}),this.onChange(ot,{isXml:Be,isEditBox:Ce})}else Be?this.onChange(this.sample("xml"),{isXml:Be,isEditBox:Ce}):this.onChange(this.sample(),{isEditBox:Ce})}),(0,St.default)(this,"sample",ie=>{let{param:he,fn:{inferSchema:Ce}}=this.props,Ve=Ce(he.toJS());return(0,Se.xi)(Ve,ie,{includeWriteOnly:!0})}),(0,St.default)(this,"onChange",(ie,he)=>{let{isEditBox:Ce,isXml:Ve}=he;this.setState({value:ie,isEditBox:Ce}),this._onChange(ie,Ve)}),(0,St.default)(this,"_onChange",(ie,he)=>{(this.props.onChange||Cg)(ie,he)}),(0,St.default)(this,"handleOnChange",ie=>{const{consumesValue:he}=this.props,Ce=/xml/i.test(he);this.onChange(ie.target.value,{isXml:Ce,isEditBox:this.state.isEditBox})}),(0,St.default)(this,"toggleIsEditBox",()=>this.setState(ie=>({isEditBox:!ie.isEditBox}))),this.state={isEditBox:!1,value:""}}componentDidMount(){this.updateValues.call(this,this.props)}UNSAFE_componentWillReceiveProps(V){this.updateValues.call(this,V)}render(){let{onChangeConsumes:V,param:J,isExecute:ie,specSelectors:he,pathMethod:Ce,getConfigs:Ve,getComponent:Be}=this.props;const et=Be("Button"),Je=Be("TextArea"),ot=Be("highlightCode"),It=Be("contentType");let qt=(he?he.parameterWithMetaByIdentity(Ce,J):J).get("errors",(0,L.List)()),Ft=he.contentTypeValues(Ce).get("requestContentType"),Wt=this.props.consumes&&this.props.consumes.size?this.props.consumes:zh.defaultProp.consumes,{value:Er,isEditBox:Ir}=this.state,jr=null;return(0,sd.O)(Er)&&(jr="json"),d.default.createElement("div",{className:"body-param","data-param-name":J.get("name"),"data-param-in":J.get("in")},Ir&&ie?d.default.createElement(Je,{className:"body-param__text"+(qt.count()?" invalid":""),value:Er,onChange:this.handleOnChange}):Er&&d.default.createElement(ot,{className:"body-param__example",language:jr,getConfigs:Ve,value:Er}),d.default.createElement("div",{className:"body-param-options"},ie?d.default.createElement("div",{className:"body-param-edit"},d.default.createElement(et,{className:Ir?"btn cancel body-param__example-edit":"btn edit body-param__example-edit",onClick:this.toggleIsEditBox},Ir?"Cancel":"Edit")):null,d.default.createElement("label",{htmlFor:""},d.default.createElement("span",null,"Parameter content type"),d.default.createElement(It,{value:Ft,contentTypes:Wt,onChange:V,className:"body-param-content-type",ariaLabel:"Parameter content type"}))))}}(0,St.default)(zh,"defaultProp",{consumes:(0,L.fromJS)(["application/json"]),param:(0,L.fromJS)({}),onChange:Cg,onChangeConsumes:Cg});var D5=Cr(4624);class F5 extends d.default.Component{render(){let{request:V,getConfigs:J}=this.props,ie=(0,D5.requestSnippetGenerator_curl_bash)(V);const he=J(),Ce=(0,wi.default)(he,"syntaxHighlight.activated")?d.default.createElement(Ro.d3,{language:"bash",className:"curl microlight",style:(0,Ro.C2)((0,wi.default)(he,"syntaxHighlight.theme"))},ie):d.default.createElement("textarea",{readOnly:!0,className:"curl",value:ie});return d.default.createElement("div",{className:"curl-command"},d.default.createElement("h4",null,"Curl"),d.default.createElement("div",{className:"copy-to-clipboard"},d.default.createElement(ad.CopyToClipboard,{text:ie},d.default.createElement("button",null))),d.default.createElement("div",null,Ce))}}class L5 extends d.default.Component{constructor(){super(...arguments),(0,St.default)(this,"onChange",V=>{this.setScheme(V.target.value)}),(0,St.default)(this,"setScheme",V=>{let{path:J,method:ie,specActions:he}=this.props;he.setScheme(V,J,ie)})}UNSAFE_componentWillMount(){let{schemes:V}=this.props;this.setScheme(V.first())}UNSAFE_componentWillReceiveProps(V){var J;this.props.currentScheme&&(0,bs.default)(J=V.schemes).call(J,this.props.currentScheme)||this.setScheme(V.schemes.first())}render(){var V;let{schemes:J,currentScheme:ie}=this.props;return d.default.createElement("label",{htmlFor:"schemes"},d.default.createElement("span",{className:"schemes-title"},"Schemes"),d.default.createElement("select",{onChange:this.onChange,value:ie},(0,O.default)(V=J.valueSeq()).call(V,he=>d.default.createElement("option",{value:he,key:he},he)).toArray()))}}class B5 extends d.default.Component{render(){const{specActions:V,specSelectors:J,getComponent:ie}=this.props,he=J.operationScheme(),Ce=J.schemes(),Ve=ie("schemes");return Ce&&Ce.size?d.default.createElement(Ve,{currentScheme:he,schemes:Ce,specActions:V}):null}}class Hh extends d.Component{constructor(V,J){super(V,J),(0,St.default)(this,"toggleCollapsed",()=>{this.props.onToggle&&this.props.onToggle(this.props.modelName,!this.state.expanded),this.setState({expanded:!this.state.expanded})}),(0,St.default)(this,"onLoad",Ce=>{if(Ce&&this.props.layoutSelectors){const Ve=this.props.layoutSelectors.getScrollToKey();L.default.is(Ve,this.props.specPath)&&this.toggleCollapsed(),this.props.layoutActions.readyToScroll(this.props.specPath,Ce.parentElement)}});let{expanded:ie,collapsedContent:he}=this.props;this.state={expanded:ie,collapsedContent:he||Hh.defaultProps.collapsedContent}}componentDidMount(){const{hideSelfOnExpand:V,expanded:J,modelName:ie}=this.props;V&&J&&this.props.onToggle(ie,J)}UNSAFE_componentWillReceiveProps(V){this.props.expanded!==V.expanded&&this.setState({expanded:V.expanded})}render(){const{title:V,classes:J}=this.props;return this.state.expanded&&this.props.hideSelfOnExpand?d.default.createElement("span",{className:J||""},this.props.children):d.default.createElement("span",{className:J||"",ref:this.onLoad},d.default.createElement("button",{"aria-expanded":this.state.expanded,className:"model-box-control",onClick:this.toggleCollapsed},V&&d.default.createElement("span",{className:"pointer"},V),d.default.createElement("span",{className:"model-toggle"+(this.state.expanded?"":" collapsed")}),!this.state.expanded&&d.default.createElement("span",null,this.state.collapsedContent)),this.state.expanded&&this.props.children)}}(0,St.default)(Hh,"defaultProps",{collapsedContent:"{...}",expanded:!1,title:null,onToggle:()=>{},hideSelfOnExpand:!1,specPath:L.default.List([])});var U5=Cr(1798),Vh=Cr.n(U5);class $5 extends d.default.Component{constructor(V,J){super(V,J),(0,St.default)(this,"activeTab",Be=>{let{target:{dataset:{name:et}}}=Be;this.setState({activeTab:et})});let{getConfigs:ie,isExecute:he}=this.props,{defaultModelRendering:Ce}=ie(),Ve=Ce;"example"!==Ce&&"model"!==Ce&&(Ve="example"),he&&(Ve="example"),this.state={activeTab:Ve}}UNSAFE_componentWillReceiveProps(V){V.isExecute&&!this.props.isExecute&&this.props.example&&this.setState({activeTab:"example"})}render(){let{getComponent:V,specSelectors:J,schema:ie,example:he,isExecute:Ce,getConfigs:Ve,specPath:Be,includeReadOnly:et,includeWriteOnly:Je}=this.props,{defaultModelExpandDepth:ot}=Ve();const It=V("ModelWrapper"),qt=V("highlightCode"),Ft=Vh()(5).toString("base64"),Wt=Vh()(5).toString("base64"),Er=Vh()(5).toString("base64"),Ir=Vh()(5).toString("base64");let jr=J.isOAS3();return d.default.createElement("div",{className:"model-example"},d.default.createElement("ul",{className:"tab",role:"tablist"},d.default.createElement("li",{className:(0,Io.default)("tabitem",{active:"example"===this.state.activeTab}),role:"presentation"},d.default.createElement("button",{"aria-controls":Wt,"aria-selected":"example"===this.state.activeTab,className:"tablinks","data-name":"example",id:Ft,onClick:this.activeTab,role:"tab"},Ce?"Edit Value":"Example Value")),ie&&d.default.createElement("li",{className:(0,Io.default)("tabitem",{active:"model"===this.state.activeTab}),role:"presentation"},d.default.createElement("button",{"aria-controls":Ir,"aria-selected":"model"===this.state.activeTab,className:(0,Io.default)("tablinks",{inactive:Ce}),"data-name":"model",id:Er,onClick:this.activeTab,role:"tab"},jr?"Schema":"Model"))),"example"===this.state.activeTab&&d.default.createElement("div",{"aria-hidden":"example"!==this.state.activeTab,"aria-labelledby":Ft,"data-name":"examplePanel",id:Wt,role:"tabpanel",tabIndex:"0"},he||d.default.createElement(qt,{value:"(no example available)",getConfigs:Ve})),"model"===this.state.activeTab&&d.default.createElement("div",{"aria-hidden":"example"===this.state.activeTab,"aria-labelledby":Er,"data-name":"modelPanel",id:Ir,role:"tabpanel",tabIndex:"0"},d.default.createElement(It,{schema:ie,getComponent:V,getConfigs:Ve,specSelectors:J,expandDepth:ot,specPath:Be,includeReadOnly:et,includeWriteOnly:Je})))}}class z5 extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"onToggle",(V,J)=>{this.props.layoutActions&&this.props.layoutActions.show(this.props.fullPath,J)})}render(){let{getComponent:V,getConfigs:J}=this.props;const ie=V("Model");let he;return this.props.layoutSelectors&&(he=this.props.layoutSelectors.isShown(this.props.fullPath)),d.default.createElement("div",{className:"model-box"},d.default.createElement(ie,(0,xs.default)({},this.props,{getConfigs:J,expanded:he,depth:1,onToggle:this.onToggle,expandDepth:this.props.expandDepth||0})))}}var H5=Cr(1543);class V5 extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"getSchemaBasePath",()=>this.props.specSelectors.isOAS3()?["components","schemas"]:["definitions"]),(0,St.default)(this,"getCollapsedContent",()=>" "),(0,St.default)(this,"handleToggle",(V,J)=>{const{layoutActions:ie}=this.props;ie.show([...this.getSchemaBasePath(),V],J),J&&this.props.specActions.requestResolvedSubtree([...this.getSchemaBasePath(),V])}),(0,St.default)(this,"onLoadModels",V=>{V&&this.props.layoutActions.readyToScroll(this.getSchemaBasePath(),V)}),(0,St.default)(this,"onLoadModel",V=>{if(V){const J=V.getAttribute("data-name");this.props.layoutActions.readyToScroll([...this.getSchemaBasePath(),J],V)}})}render(){var V;let{specSelectors:J,getComponent:ie,layoutSelectors:he,layoutActions:Ce,getConfigs:Ve}=this.props,Be=J.definitions(),{docExpansion:et,defaultModelsExpandDepth:Je}=Ve();if(!Be.size||Je<0)return null;const ot=this.getSchemaBasePath();let It=he.isShown(ot,Je>0&&"none"!==et);const qt=J.isOAS3(),Ft=ie("ModelWrapper"),Wt=ie("Collapse"),Er=ie("ModelCollapse"),Ir=ie("JumpToPath",!0);return d.default.createElement("section",{className:It?"models is-open":"models",ref:this.onLoadModels},d.default.createElement("h4",null,d.default.createElement("button",{"aria-expanded":It,className:"models-control",onClick:()=>Ce.show(ot,!It)},d.default.createElement("span",null,qt?"Schemas":"Models"),d.default.createElement("svg",{width:"20",height:"20","aria-hidden":"true",focusable:"false"},d.default.createElement("use",{xlinkHref:It?"#large-arrow-up":"#large-arrow-down"})))),d.default.createElement(Wt,{isOpened:It},(0,O.default)(V=Be.entrySeq()).call(V,jr=>{let[yn]=jr;const Un=[...ot,yn],Qr=L.default.List(Un),un=J.specResolvedSubtree(Un),Xr=J.specJson().getIn(Un),Fn=L.Map.isMap(un)?un:L.default.Map(),Wr=L.Map.isMap(Xr)?Xr:L.default.Map(),Yo=Fn.get("title")||Wr.get("title")||yn,cn=he.isShown(Un,!1);cn&&0===Fn.size&&Wr.size>0&&this.props.specActions.requestResolvedSubtree(Un);const Jn=d.default.createElement(Ft,{name:yn,expandDepth:Je,schema:Fn||L.default.Map(),displayName:Yo,fullPath:Un,specPath:Qr,getComponent:ie,specSelectors:J,getConfigs:Ve,layoutSelectors:he,layoutActions:Ce,includeReadOnly:!0,includeWriteOnly:!0}),fo=d.default.createElement("span",{className:"model-box"},d.default.createElement("span",{className:"model model-title"},Yo));return d.default.createElement("div",{id:`model-${yn}`,className:"model-container",key:`models-section-${yn}`,"data-name":yn,ref:this.onLoadModel},d.default.createElement("span",{className:"models-jump-to-path"},d.default.createElement(Ir,{specPath:Qr})),d.default.createElement(Er,{classes:"model-box",collapsedContent:this.getCollapsedContent(yn),onToggle:this.handleToggle,title:fo,displayName:Yo,modelName:yn,specPath:Qr,layoutSelectors:he,layoutActions:Ce,hideSelfOnExpand:!0,expanded:Je>0&&cn},Jn))}).toArray()))}}const W5=nt=>{let{value:V,getComponent:J}=nt,ie=J("ModelCollapse"),he=d.default.createElement("span",null,"Array [ ",V.count()," ]");return d.default.createElement("span",{className:"prop-enum"},"Enum:",d.default.createElement("br",null),d.default.createElement(ie,{collapsedContent:he},"[ ",V.join(", ")," ]"))};class G5 extends d.Component{render(){var V,J,ie,he;let{schema:Ce,name:Ve,displayName:Be,isRef:et,getComponent:Je,getConfigs:ot,depth:It,onToggle:qt,expanded:Ft,specPath:Wt,...Er}=this.props,{specSelectors:Ir,expandDepth:jr,includeReadOnly:yn,includeWriteOnly:Un}=Er;const{isOAS3:Qr}=Ir;if(!Ce)return null;const{showExtensions:un}=ot();let Xr=Ce.get("description"),Fn=Ce.get("properties"),Wr=Ce.get("additionalProperties"),Yo=Ce.get("title")||Be||Ve,cn=Ce.get("required"),Jn=(0,o.default)(Ce).call(Ce,(Co,Eo)=>{var Bi;return-1!==(0,an.default)(Bi=["maxProperties","minProperties","nullable","example"]).call(Bi,Eo)}),fo=Ce.get("deprecated"),Po=Ce.getIn(["externalDocs","url"]),ii=Ce.getIn(["externalDocs","description"]);const So=Je("JumpToPath",!0),Ci=Je("Markdown",!0),di=Je("Model"),Hi=Je("ModelCollapse"),Ki=Je("Property"),Ss=Je("Link"),Ds=()=>d.default.createElement("span",{className:"model-jump-to-path"},d.default.createElement(So,{specPath:Wt})),_s=d.default.createElement("span",null,d.default.createElement("span",null,"{"),"...",d.default.createElement("span",null,"}"),et?d.default.createElement(Ds,null):""),Oa=Ir.isOAS3()?Ce.get("anyOf"):null,ws=Ir.isOAS3()?Ce.get("oneOf"):null,el=Ir.isOAS3()?Ce.get("not"):null,Pi=Yo&&d.default.createElement("span",{className:"model-title"},et&&Ce.get("$$ref")&&d.default.createElement("span",{className:"model-hint"},Ce.get("$$ref")),d.default.createElement("span",{className:"model-title__text"},Yo));return d.default.createElement("span",{className:"model"},d.default.createElement(Hi,{modelName:Ve,title:Pi,onToggle:qt,expanded:!!Ft||It<=jr,collapsedContent:_s},d.default.createElement("span",{className:"brace-open object"},"{"),et?d.default.createElement(Ds,null):null,d.default.createElement("span",{className:"inner-object"},d.default.createElement("table",{className:"model"},d.default.createElement("tbody",null,Xr?d.default.createElement("tr",{className:"description"},d.default.createElement("td",null,"description:"),d.default.createElement("td",null,d.default.createElement(Ci,{source:Xr}))):null,Po&&d.default.createElement("tr",{className:"external-docs"},d.default.createElement("td",null,"externalDocs:"),d.default.createElement("td",null,d.default.createElement(Ss,{target:"_blank",href:(0,Se.Nm)(Po)},ii||Po))),fo?d.default.createElement("tr",{className:"property"},d.default.createElement("td",null,"deprecated:"),d.default.createElement("td",null,"true")):null,Fn&&Fn.size?(0,O.default)(V=(0,o.default)(J=Fn.entrySeq()).call(J,Co=>{let[,Eo]=Co;return(!Eo.get("readOnly")||yn)&&(!Eo.get("writeOnly")||Un)})).call(V,Co=>{let[Eo,Bi]=Co,xp=Qr()&&Bi.get("deprecated"),Sp=L.List.isList(cn)&&cn.contains(Eo),_p=["property-row"];return xp&&_p.push("deprecated"),Sp&&_p.push("required"),d.default.createElement("tr",{key:Eo,className:_p.join(" ")},d.default.createElement("td",null,Eo,Sp&&d.default.createElement("span",{className:"star"},"*")),d.default.createElement("td",null,d.default.createElement(di,(0,xs.default)({key:`object-${Ve}-${Eo}_${Bi}`},Er,{required:Sp,getComponent:Je,specPath:Wt.push("properties",Eo),getConfigs:ot,schema:Bi,depth:It+1}))))}).toArray():null,un?d.default.createElement("tr",null,d.default.createElement("td",null,"\xa0")):null,un?(0,O.default)(ie=Ce.entrySeq()).call(ie,Co=>{let[Eo,Bi]=Co;if("x-"!==(0,T.default)(Eo).call(Eo,0,2))return;const xp=Bi?Bi.toJS?Bi.toJS():Bi:null;return d.default.createElement("tr",{key:Eo,className:"extension"},d.default.createElement("td",null,Eo),d.default.createElement("td",null,(0,s.default)(xp)))}).toArray():null,Wr&&Wr.size?d.default.createElement("tr",null,d.default.createElement("td",null,"< * >:"),d.default.createElement("td",null,d.default.createElement(di,(0,xs.default)({},Er,{required:!1,getComponent:Je,specPath:Wt.push("additionalProperties"),getConfigs:ot,schema:Wr,depth:It+1})))):null,Oa?d.default.createElement("tr",null,d.default.createElement("td",null,"anyOf ->"),d.default.createElement("td",null,(0,O.default)(Oa).call(Oa,(Co,Eo)=>d.default.createElement("div",{key:Eo},d.default.createElement(di,(0,xs.default)({},Er,{required:!1,getComponent:Je,specPath:Wt.push("anyOf",Eo),getConfigs:ot,schema:Co,depth:It+1})))))):null,ws?d.default.createElement("tr",null,d.default.createElement("td",null,"oneOf ->"),d.default.createElement("td",null,(0,O.default)(ws).call(ws,(Co,Eo)=>d.default.createElement("div",{key:Eo},d.default.createElement(di,(0,xs.default)({},Er,{required:!1,getComponent:Je,specPath:Wt.push("oneOf",Eo),getConfigs:ot,schema:Co,depth:It+1})))))):null,el?d.default.createElement("tr",null,d.default.createElement("td",null,"not ->"),d.default.createElement("td",null,d.default.createElement("div",null,d.default.createElement(di,(0,xs.default)({},Er,{required:!1,getComponent:Je,specPath:Wt.push("not"),getConfigs:ot,schema:el,depth:It+1}))))):null))),d.default.createElement("span",{className:"brace-close"},"}")),Jn.size?(0,O.default)(he=Jn.entrySeq()).call(he,Co=>{let[Eo,Bi]=Co;return d.default.createElement(Ki,{key:`${Eo}-${Bi}`,propKey:Eo,propVal:Bi,propClass:"property"})}):null)}}class K5 extends d.Component{render(){var V;let{getComponent:J,getConfigs:ie,schema:he,depth:Ce,expandDepth:Ve,name:Be,displayName:et,specPath:Je}=this.props,ot=he.get("description"),It=he.get("items"),qt=he.get("title")||et||Be,Ft=(0,o.default)(he).call(he,(Xr,Fn)=>{var Wr;return-1===(0,an.default)(Wr=["type","items","description","$$ref","externalDocs"]).call(Wr,Fn)}),Wt=he.getIn(["externalDocs","url"]),Er=he.getIn(["externalDocs","description"]);const Ir=J("Markdown",!0),jr=J("ModelCollapse"),yn=J("Model"),Un=J("Property"),Qr=J("Link"),un=qt&&d.default.createElement("span",{className:"model-title"},d.default.createElement("span",{className:"model-title__text"},qt));return d.default.createElement("span",{className:"model"},d.default.createElement(jr,{title:un,expanded:Ce<=Ve,collapsedContent:"[...]"},"[",Ft.size?(0,O.default)(V=Ft.entrySeq()).call(V,Xr=>{let[Fn,Wr]=Xr;return d.default.createElement(Un,{key:`${Fn}-${Wr}`,propKey:Fn,propVal:Wr,propClass:"property"})}):null,ot?d.default.createElement(Ir,{source:ot}):Ft.size?d.default.createElement("div",{className:"markdown"}):null,Wt&&d.default.createElement("div",{className:"external-docs"},d.default.createElement(Qr,{target:"_blank",href:(0,Se.Nm)(Wt)},Er||Wt)),d.default.createElement("span",null,d.default.createElement(yn,(0,xs.default)({},this.props,{getConfigs:ie,specPath:Je.push("items"),name:null,schema:It,required:!1,depth:Ce+1}))),"]"))}}const Wh="property primitive";class Y5 extends d.Component{render(){var V,J,ie;let{schema:he,getComponent:Ce,getConfigs:Ve,name:Be,displayName:et,depth:Je,expandDepth:ot}=this.props;const{showExtensions:It}=Ve();if(!he||!he.get)return d.default.createElement("div",null);let qt=he.get("type"),Ft=he.get("format"),Wt=he.get("xml"),Er=he.get("enum"),Ir=he.get("title")||et||Be,jr=he.get("description"),yn=(0,Se.nX)(he),Un=(0,o.default)(he).call(he,(fo,Po)=>{var ii;return-1===(0,an.default)(ii=["enum","type","format","description","$$ref","externalDocs"]).call(ii,Po)}).filterNot((fo,Po)=>yn.has(Po)),Qr=he.getIn(["externalDocs","url"]),un=he.getIn(["externalDocs","description"]);const Xr=Ce("Markdown",!0),Fn=Ce("EnumModel"),Wr=Ce("Property"),Yo=Ce("ModelCollapse"),cn=Ce("Link"),Jn=Ir&&d.default.createElement("span",{className:"model-title"},d.default.createElement("span",{className:"model-title__text"},Ir));return d.default.createElement("span",{className:"model"},d.default.createElement(Yo,{title:Jn,expanded:Je<=ot,collapsedContent:"[...]",hideSelfOnExpand:ot!==Je},d.default.createElement("span",{className:"prop"},Be&&Je>1&&d.default.createElement("span",{className:"prop-name"},Ir),d.default.createElement("span",{className:"prop-type"},qt),Ft&&d.default.createElement("span",{className:"prop-format"},"($",Ft,")"),Un.size?(0,O.default)(V=Un.entrySeq()).call(V,fo=>{let[Po,ii]=fo;return d.default.createElement(Wr,{key:`${Po}-${ii}`,propKey:Po,propVal:ii,propClass:Wh})}):null,It&&yn.size?(0,O.default)(J=yn.entrySeq()).call(J,fo=>{let[Po,ii]=fo;return d.default.createElement(Wr,{key:`${Po}-${ii}`,propKey:Po,propVal:ii,propClass:Wh})}):null,jr?d.default.createElement(Xr,{source:jr}):null,Qr&&d.default.createElement("div",{className:"external-docs"},d.default.createElement(cn,{target:"_blank",href:(0,Se.Nm)(Qr)},un||Qr)),Wt&&Wt.size?d.default.createElement("span",null,d.default.createElement("br",null),d.default.createElement("span",{className:Wh},"xml:"),(0,O.default)(ie=Wt.entrySeq()).call(ie,fo=>{let[Po,ii]=fo;return d.default.createElement("span",{key:`${Po}-${ii}`,className:Wh},d.default.createElement("br",null),"\xa0\xa0\xa0",Po,": ",String(ii))}).toArray()):null,Er&&d.default.createElement(Fn,{value:Er,getComponent:Ce}))))}}const J5=nt=>{let{propKey:V,propVal:J,propClass:ie}=nt;return d.default.createElement("span",{className:ie},d.default.createElement("br",null),V,": ",String(J))};class qy extends d.default.Component{render(){const{onTryoutClick:V,onCancelClick:J,onResetClick:ie,enabled:he,hasUserEditedBody:Ce,isOAS3:Ve}=this.props,Be=Ve&&Ce;return d.default.createElement("div",{className:Be?"try-out btn-group":"try-out"},he?d.default.createElement("button",{className:"btn try-out__btn cancel",onClick:J},"Cancel"):d.default.createElement("button",{className:"btn try-out__btn",onClick:V},"Try it out "),Be&&d.default.createElement("button",{className:"btn try-out__btn reset",onClick:ie},"Reset"))}}(0,St.default)(qy,"defaultProps",{onTryoutClick:Function.prototype,onCancelClick:Function.prototype,onResetClick:Function.prototype,enabled:!1,hasUserEditedBody:!1,isOAS3:!1});class e1 extends d.default.PureComponent{render(){const{bypass:V,isSwagger2:J,isOAS3:ie,alsoShow:he}=this.props;return V?d.default.createElement("div",null,this.props.children):J&&ie?d.default.createElement("div",{className:"version-pragma"},he,d.default.createElement("div",{className:"version-pragma__message version-pragma__message--ambiguous"},d.default.createElement("div",null,d.default.createElement("h3",null,"Unable to render this definition"),d.default.createElement("p",null,d.default.createElement("code",null,"swagger")," and ",d.default.createElement("code",null,"openapi")," fields cannot be present in the same Swagger or OpenAPI definition. Please remove one of the fields."),d.default.createElement("p",null,"Supported version fields are ",d.default.createElement("code",null,"swagger: ",'"2.0"')," and those that match ",d.default.createElement("code",null,"openapi: 3.0.n")," (for example, ",d.default.createElement("code",null,"openapi: 3.0.0"),").")))):J||ie?d.default.createElement("div",null,this.props.children):d.default.createElement("div",{className:"version-pragma"},he,d.default.createElement("div",{className:"version-pragma__message version-pragma__message--missing"},d.default.createElement("div",null,d.default.createElement("h3",null,"Unable to render this definition"),d.default.createElement("p",null,"The provided definition does not specify a valid version field."),d.default.createElement("p",null,"Please indicate a valid Swagger or OpenAPI version field. Supported version fields are ",d.default.createElement("code",null,"swagger: ",'"2.0"')," and those that match ",d.default.createElement("code",null,"openapi: 3.0.n")," (for example, ",d.default.createElement("code",null,"openapi: 3.0.0"),")."))))}}(0,St.default)(e1,"defaultProps",{alsoShow:null,children:null,bypass:!1});const X5=nt=>{let{version:V}=nt;return d.default.createElement("small",null,d.default.createElement("pre",{className:"version"}," ",V," "))},Z5=nt=>{let{enabled:V,path:J,text:ie}=nt;return d.default.createElement("a",{className:"nostyle",onClick:V?he=>he.preventDefault():null,href:V?`#/${J}`:null},d.default.createElement("span",null,ie))},Q5=()=>d.default.createElement("div",null,d.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",className:"svg-assets"},d.default.createElement("defs",null,d.default.createElement("symbol",{viewBox:"0 0 20 20",id:"unlocked"},d.default.createElement("path",{d:"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V6h2v-.801C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8z"})),d.default.createElement("symbol",{viewBox:"0 0 20 20",id:"locked"},d.default.createElement("path",{d:"M15.8 8H14V5.6C14 2.703 12.665 1 10 1 7.334 1 6 2.703 6 5.6V8H4c-.553 0-1 .646-1 1.199V17c0 .549.428 1.139.951 1.307l1.197.387C5.672 18.861 6.55 19 7.1 19h5.8c.549 0 1.428-.139 1.951-.307l1.196-.387c.524-.167.953-.757.953-1.306V9.199C17 8.646 16.352 8 15.8 8zM12 8H8V5.199C8 3.754 8.797 3 10 3c1.203 0 2 .754 2 2.199V8z"})),d.default.createElement("symbol",{viewBox:"0 0 20 20",id:"close"},d.default.createElement("path",{d:"M14.348 14.849c-.469.469-1.229.469-1.697 0L10 11.819l-2.651 3.029c-.469.469-1.229.469-1.697 0-.469-.469-.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-.469-.469-.469-1.228 0-1.697.469-.469 1.228-.469 1.697 0L10 8.183l2.651-3.031c.469-.469 1.228-.469 1.697 0 .469.469.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c.469.469.469 1.229 0 1.698z"})),d.default.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow"},d.default.createElement("path",{d:"M13.25 10L6.109 2.58c-.268-.27-.268-.707 0-.979.268-.27.701-.27.969 0l7.83 7.908c.268.271.268.709 0 .979l-7.83 7.908c-.268.271-.701.27-.969 0-.268-.269-.268-.707 0-.979L13.25 10z"})),d.default.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow-down"},d.default.createElement("path",{d:"M17.418 6.109c.272-.268.709-.268.979 0s.271.701 0 .969l-7.908 7.83c-.27.268-.707.268-.979 0l-7.908-7.83c-.27-.268-.27-.701 0-.969.271-.268.709-.268.979 0L10 13.25l7.418-7.141z"})),d.default.createElement("symbol",{viewBox:"0 0 20 20",id:"large-arrow-up"},d.default.createElement("path",{d:"M 17.418 14.908 C 17.69 15.176 18.127 15.176 18.397 14.908 C 18.667 14.64 18.668 14.207 18.397 13.939 L 10.489 6.109 C 10.219 5.841 9.782 5.841 9.51 6.109 L 1.602 13.939 C 1.332 14.207 1.332 14.64 1.602 14.908 C 1.873 15.176 2.311 15.176 2.581 14.908 L 10 7.767 L 17.418 14.908 Z"})),d.default.createElement("symbol",{viewBox:"0 0 24 24",id:"jump-to"},d.default.createElement("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"})),d.default.createElement("symbol",{viewBox:"0 0 24 24",id:"expand"},d.default.createElement("path",{d:"M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"})),d.default.createElement("symbol",{viewBox:"0 0 15 16",id:"copy"},d.default.createElement("g",{transform:"translate(2, -1)"},d.default.createElement("path",{fill:"#ffffff",fillRule:"evenodd",d:"M2 13h4v1H2v-1zm5-6H2v1h5V7zm2 3V8l-3 3 3 3v-2h5v-2H9zM4.5 9H2v1h2.5V9zM2 12h2.5v-1H2v1zm9 1h1v2c-.02.28-.11.52-.3.7-.19.18-.42.28-.7.3H1c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c0-1.11.89-2 2-2 1.11 0 2 .89 2 2h3c.55 0 1 .45 1 1v5h-1V6H1v9h10v-2zM2 5h8c0-.55-.45-1-1-1H8c-.55 0-1-.45-1-1s-.45-1-1-1-1 .45-1 1-.45 1-1 1H3c-.55 0-1 .45-1 1z"}))))));var q5=Cr(5466);class e4 extends d.default.Component{render(){let{errSelectors:V,specSelectors:J,getComponent:ie}=this.props,he=ie("SvgAssets"),Ce=ie("InfoContainer",!0),Ve=ie("VersionPragmaFilter"),Be=ie("operations",!0),et=ie("Models",!0),Je=ie("Row"),ot=ie("Col"),It=ie("errors",!0);const qt=ie("ServersContainer",!0),Ft=ie("SchemesContainer",!0),Wt=ie("AuthorizeBtnContainer",!0),Er=ie("FilterContainer",!0);let Ir=J.isSwagger2(),jr=J.isOAS3();const yn=!J.specStr(),Un=J.loadingStatus();let Qr=null;if("loading"===Un&&(Qr=d.default.createElement("div",{className:"info"},d.default.createElement("div",{className:"loading-container"},d.default.createElement("div",{className:"loading"})))),"failed"===Un&&(Qr=d.default.createElement("div",{className:"info"},d.default.createElement("div",{className:"loading-container"},d.default.createElement("h4",{className:"title"},"Failed to load API definition."),d.default.createElement(It,null)))),"failedConfig"===Un){const cn=V.lastError(),Jn=cn?cn.get("message"):"";Qr=d.default.createElement("div",{className:"info failed-config"},d.default.createElement("div",{className:"loading-container"},d.default.createElement("h4",{className:"title"},"Failed to load remote configuration."),d.default.createElement("p",null,Jn)))}if(!Qr&&yn&&(Qr=d.default.createElement("h4",null,"No API definition provided.")),Qr)return d.default.createElement("div",{className:"swagger-ui"},d.default.createElement("div",{className:"loading-container"},Qr));const un=J.servers(),Xr=J.schemes(),Fn=un&&un.size,Wr=Xr&&Xr.size,Yo=!!J.securityDefinitions();return d.default.createElement("div",{className:"swagger-ui"},d.default.createElement(he,null),d.default.createElement(Ve,{isSwagger2:Ir,isOAS3:jr,alsoShow:d.default.createElement(It,null)},d.default.createElement(It,null),d.default.createElement(Je,{className:"information-container"},d.default.createElement(ot,{mobile:12},d.default.createElement(Ce,null))),Fn||Wr||Yo?d.default.createElement("div",{className:"scheme-container"},d.default.createElement(ot,{className:"schemes wrapper",mobile:12},Fn?d.default.createElement(qt,null):null,Wr?d.default.createElement(Ft,null):null,Yo?d.default.createElement(Wt,null):null)):null,d.default.createElement(Er,null),d.default.createElement(Je,null,d.default.createElement(ot,{mobile:12,desktop:12},d.default.createElement(Be,null))),d.default.createElement(Je,null,d.default.createElement(ot,{mobile:12,desktop:12},d.default.createElement(et,null)))))}}const t1=(nt=>{var V={};return Cr.d(V,nt),V})({default:()=>FO()}),rf={value:"",onChange:()=>{},schema:{},keyName:"",required:!1,errors:(0,L.List)()};class r1 extends d.Component{componentDidMount(){const{dispatchInitialValue:V,value:J,onChange:ie}=this.props;V?ie(J):!1===V&&ie("")}render(){let{schema:V,errors:J,value:ie,onChange:he,getComponent:Ce,fn:Ve,disabled:Be}=this.props;const et=V&&V.get?V.get("format"):null,Je=V&&V.get?V.get("type"):null;let It=Je?Ce(et?`JsonSchema_${Je}_${et}`:`JsonSchema_${Je}`,!1,{failSilently:!0}):Ce("JsonSchema_string");return It||(It=Ce("JsonSchema_string")),d.default.createElement(It,(0,xs.default)({},this.props,{errors:J,fn:Ve,getComponent:Ce,value:ie,onChange:he,schema:V,disabled:Be}))}}(0,St.default)(r1,"defaultProps",rf);class n1 extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"onChange",V=>{const J=this.props.schema&&"file"===this.props.schema.get("type")?V.target.files[0]:V.target.value;this.props.onChange(J,this.props.keyName)}),(0,St.default)(this,"onEnumChange",V=>this.props.onChange(V))}render(){let{getComponent:V,value:J,schema:ie,errors:he,required:Ce,description:Ve,disabled:Be}=this.props;const et=ie&&ie.get?ie.get("enum"):null,Je=ie&&ie.get?ie.get("format"):null,ot=ie&&ie.get?ie.get("type"):null,It=ie&&ie.get?ie.get("in"):null;if(J||(J=""),he=he.toJS?he.toJS():[],et){const Wt=V("Select");return d.default.createElement(Wt,{className:he.length?"invalid":"",title:he.length?he:"",allowedValues:[...et],value:J,allowEmptyValue:!Ce,disabled:Be,onChange:this.onEnumChange})}const qt=Be||It&&"formData"===It&&!("FormData"in window),Ft=V("Input");return ot&&"file"===ot?d.default.createElement(Ft,{type:"file",className:he.length?"invalid":"",title:he.length?he:"",onChange:this.onChange,disabled:qt}):d.default.createElement(t1.default,{type:Je&&"password"===Je?"password":"text",className:he.length?"invalid":"",title:he.length?he:"",value:J,minLength:0,debounceTimeout:350,placeholder:Ve,onChange:this.onChange,disabled:qt})}}(0,St.default)(n1,"defaultProps",rf);class o1 extends d.PureComponent{constructor(V,J){super(V,J),(0,St.default)(this,"onChange",()=>{this.props.onChange(this.state.value)}),(0,St.default)(this,"onItemChange",(ie,he)=>{this.setState(Ce=>{let{value:Ve}=Ce;return{value:Ve.set(he,ie)}},this.onChange)}),(0,St.default)(this,"removeItem",ie=>{this.setState(he=>{let{value:Ce}=he;return{value:Ce.delete(ie)}},this.onChange)}),(0,St.default)(this,"addItem",()=>{let ie=Tg(this.state.value);this.setState(()=>({value:ie.push((0,Se.xi)(this.state.schema.get("items"),!1,{includeWriteOnly:!0}))}),this.onChange)}),(0,St.default)(this,"onEnumChange",ie=>{this.setState(()=>({value:ie}),this.onChange)}),this.state={value:Tg(V.value),schema:V.schema}}UNSAFE_componentWillReceiveProps(V){const J=Tg(V.value);J!==this.state.value&&this.setState({value:J}),V.schema!==this.state.schema&&this.setState({schema:V.schema})}render(){var V;let{getComponent:J,required:ie,schema:he,errors:Ce,fn:Ve,disabled:Be}=this.props;Ce=Ce.toJS?Ce.toJS():(0,I.default)(Ce)?Ce:[];const et=(0,o.default)(Ce).call(Ce,Qr=>"string"==typeof Qr),Je=(0,O.default)(V=(0,o.default)(Ce).call(Ce,Qr=>void 0!==Qr.needRemove)).call(V,Qr=>Qr.error),ot=this.state.value,It=!!(ot&&ot.count&&ot.count()>0),qt=he.getIn(["items","enum"]),Ft=he.getIn(["items","type"]),Wt=he.getIn(["items","format"]),Er=he.get("items");let Ir,jr=!1,yn="file"===Ft||"string"===Ft&&"binary"===Wt;if(Ft&&Wt?Ir=J(`JsonSchema_${Ft}_${Wt}`):"boolean"!==Ft&&"array"!==Ft&&"object"!==Ft||(Ir=J(`JsonSchema_${Ft}`)),Ir||yn||(jr=!0),qt){const Qr=J("Select");return d.default.createElement(Qr,{className:Ce.length?"invalid":"",title:Ce.length?Ce:"",multiple:!0,value:ot,disabled:Be,allowedValues:qt,allowEmptyValue:!ie,onChange:this.onEnumChange})}const Un=J("Button");return d.default.createElement("div",{className:"json-schema-array"},It?(0,O.default)(ot).call(ot,(Qr,un)=>{var Xr;const Fn=(0,L.fromJS)([...(0,O.default)(Xr=(0,o.default)(Ce).call(Ce,Wr=>Wr.index===un)).call(Xr,Wr=>Wr.error)]);return d.default.createElement("div",{key:un,className:"json-schema-form-item"},yn?d.default.createElement(Og,{value:Qr,onChange:Wr=>this.onItemChange(Wr,un),disabled:Be,errors:Fn,getComponent:J}):jr?d.default.createElement(Ag,{value:Qr,onChange:Wr=>this.onItemChange(Wr,un),disabled:Be,errors:Fn}):d.default.createElement(Ir,(0,xs.default)({},this.props,{value:Qr,onChange:Wr=>this.onItemChange(Wr,un),disabled:Be,errors:Fn,schema:Er,getComponent:J,fn:Ve})),Be?null:d.default.createElement(Un,{className:`btn btn-sm json-schema-form-item-remove ${Je.length?"invalid":null}`,title:Je.length?Je:"",onClick:()=>this.removeItem(un)}," - "))}):null,Be?null:d.default.createElement(Un,{className:`btn btn-sm json-schema-form-item-add ${et.length?"invalid":null}`,title:et.length?et:"",onClick:this.addItem},"Add ",Ft?`${Ft} `:"","item"))}}(0,St.default)(o1,"defaultProps",rf);class Ag extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"onChange",V=>{this.props.onChange(V.target.value,this.props.keyName)})}render(){let{value:V,errors:J,description:ie,disabled:he}=this.props;return V||(V=""),J=J.toJS?J.toJS():[],d.default.createElement(t1.default,{type:"text",className:J.length?"invalid":"",title:J.length?J:"",value:V,minLength:0,debounceTimeout:350,placeholder:ie,onChange:this.onChange,disabled:he})}}(0,St.default)(Ag,"defaultProps",rf);class Og extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"onFileChange",V=>{this.props.onChange(V.target.files[0],this.props.keyName)})}render(){let{getComponent:V,errors:J,disabled:ie}=this.props;const he=V("Input"),Ce=ie||!("FormData"in window);return d.default.createElement(he,{type:"file",className:J.length?"invalid":"",title:J.length?J:"",onChange:this.onFileChange,disabled:Ce})}}(0,St.default)(Og,"defaultProps",rf);class i1 extends d.Component{constructor(){super(...arguments),(0,St.default)(this,"onEnumChange",V=>this.props.onChange(V))}render(){let{getComponent:V,value:J,errors:ie,schema:he,required:Ce,disabled:Ve}=this.props;ie=ie.toJS?ie.toJS():[];let Be=he&&he.get?he.get("enum"):null,et=!Be||!Ce,Je=!Be&&["true","false"];const ot=V("Select");return d.default.createElement(ot,{className:ie.length?"invalid":"",title:ie.length?ie:"",value:String(J),disabled:Ve,allowedValues:Be?[...Be]:Je,allowEmptyValue:et,onChange:this.onEnumChange})}}(0,St.default)(i1,"defaultProps",rf);class a1 extends d.PureComponent{constructor(){super(),(0,St.default)(this,"onChange",V=>{this.props.onChange(V)}),(0,St.default)(this,"handleOnChange",V=>{this.onChange(V.target.value)})}render(){let{getComponent:V,value:J,errors:ie,disabled:he}=this.props;const Ce=V("TextArea");return ie=ie.toJS?ie.toJS():(0,I.default)(ie)?ie:[],d.default.createElement("div",null,d.default.createElement(Ce,{className:(0,Io.default)({invalid:ie.length}),title:ie.length?(nt=ie,(0,O.default)(nt).call(nt,V=>{let ie="string"==typeof V?V:"string"==typeof V.error?V.error:null;if(!(void 0!==V.propKey?V.propKey:V.index)&&ie)return ie;let he=V.error,Ce=`/${V.propKey}`;for(;"object"==typeof he;){const Ve=void 0!==he.propKey?he.propKey:he.index;if(void 0===Ve||(Ce+=`/${Ve}`,!he.error))break;he=he.error}return`${Ce}: ${he}`})).join(", "):"",value:(0,Se.Pz)(J),disabled:he,onChange:this.handleOnChange}));var nt}}function Tg(nt){return L.List.isList(nt)?nt:(0,I.default)(nt)?(0,L.fromJS)(nt):(0,L.List)()}function r4(){return[pt.default,sr.default,it.default,Xe.default,lt.default,Ht.default,gr.default,Oe.default,{components:{App:zn,authorizationPopup:Wn,authorizeBtn:so,AuthorizeBtnContainer:Hn,authorizeOperationBtn:$,auths:Q,AuthItem:me,authError:ze,oauth2:ir,apiKeyAuth:Ye,basicAuth:ht,clear:At,liveResponse:ho,InitializedInput:C5,info:R5,InfoContainer:P5,JumpToPath:M5,CopyToClipboardBtn:k5,onlineValidatorBadge:Bo.Z,operations:Qt,operation:$e,OperationSummary:ln,OperationSummaryMethod:Ur,OperationSummaryPath:Rr,highlightCode:Fh,responses:qc,response:Lh,ResponseExtension:Bh,responseBody:Sg,parameters:Yn,parameterRow:tf,execute:_g,headers:Ep,errors:m5,contentType:Ky,overview:_5,footer:N5,FilterContainer:j5,ParamBody:zh,curl:F5,schemes:L5,SchemesContainer:B5,modelExample:$5,ModelWrapper:z5,ModelCollapse:Hh,Model:H5.Z,Models:V5,EnumModel:W5,ObjectModel:G5,ArrayModel:K5,PrimitiveModel:Y5,Property:J5,TryItOutButton:qy,Markdown:q5.Z,BaseLayout:e4,VersionPragmaFilter:e1,VersionStamp:X5,OperationExt:wo,OperationExtRow:_i,ParameterExt:Gn,ParameterIncludeEmpty:qs,OperationTag:vi,OperationContainer:Tn,DeepLink:Z5,InfoUrl:I5,InfoBasePath:A5,SvgAssets:Q5,Example:Mt,ExamplesSelect:Bn,ExamplesSelectValueRetainer:Qn}},{components:e},Ke.default,{components:t},Lt.default,yr.default,Me.default,Ne.default,Dt.default,Pe.default,(0,xr.default)()]}(0,St.default)(a1,"defaultProps",rf);var n4=Cr(7451);function s1(){return[r4,n4.default]}var o4=Cr(5308);const{GIT_DIRTY:i4,GIT_COMMIT:a4,PACKAGE_VERSION:s4,BUILD_TIME:l4}={PACKAGE_VERSION:"4.15.5",GIT_COMMIT:"gc858a26",GIT_DIRTY:!0,BUILD_TIME:"Wed, 09 Nov 2022 06:53:00 GMT"};function Ig(nt){var V;Ae.Z.versions=Ae.Z.versions||{},Ae.Z.versions.swaggerUi={version:s4,gitRevision:a4,gitDirty:i4,buildTimestamp:l4};const J={dom_id:null,domNode:null,spec:{},url:"",urls:null,layout:"BaseLayout",docExpansion:"list",maxDisplayedTags:null,filter:null,validatorUrl:"https://validator.swagger.io/validator",oauth2RedirectUrl:`${window.location.protocol}//${window.location.host}${window.location.pathname.substring(0,(0,r.default)(V=window.location.pathname).call(V,"/"))}/oauth2-redirect.html`,persistAuthorization:!1,configs:{},custom:{},displayOperationId:!1,displayRequestDuration:!1,deepLinking:!1,tryItOutEnabled:!1,requestInterceptor:qt=>qt,responseInterceptor:qt=>qt,showMutatedRequest:!0,defaultModelRendering:"example",defaultModelExpandDepth:1,defaultModelsExpandDepth:1,showExtensions:!1,showCommonExtensions:!1,withCredentials:void 0,requestSnippetsEnabled:!1,requestSnippets:{generators:{curl_bash:{title:"cURL (bash)",syntax:"bash"},curl_powershell:{title:"cURL (PowerShell)",syntax:"powershell"},curl_cmd:{title:"cURL (CMD)",syntax:"bash"}},defaultExpanded:!0,languages:null},supportedSubmitMethods:["get","put","post","delete","options","head","patch","trace"],queryConfigEnabled:!1,presets:[s1],plugins:[],pluginsOptions:{pluginLoadType:"legacy"},initialState:{},fn:{},components:{},syntaxHighlight:{activated:!0,theme:"agate"}};let ie=nt.queryConfigEnabled?(0,Se.UG)():{};const he=nt.domNode;delete nt.domNode;const Ce=f()({},J,nt,ie),Ve={system:{configs:Ce.configs},plugins:Ce.presets,pluginsOptions:Ce.pluginsOptions,state:f()({layout:{layout:Ce.layout,filter:(0,o.default)(Ce)},spec:{spec:"",url:Ce.url},requestSnippets:Ce.requestSnippets},Ce.initialState)};if(Ce.initialState)for(var Be in Ce.initialState)Object.prototype.hasOwnProperty.call(Ce.initialState,Be)&&void 0===Ce.initialState[Be]&&delete Ve.state[Be];var et=new Ue(Ve);et.register([Ce.plugins,()=>({fn:Ce.fn,components:Ce.components,state:Ce.state})]);var Je=et.getSystem();const ot=qt=>{let Ft=Je.specSelectors.getLocalConfig?Je.specSelectors.getLocalConfig():{},Wt=f()({},Ft,Ce,qt||{},ie);if(he&&(Wt.domNode=he),et.setConfigs(Wt),Je.configsActions.loaded(),null!==qt&&(!ie.url&&"object"==typeof Wt.spec&&(0,i.default)(Wt.spec).length?(Je.specActions.updateUrl(""),Je.specActions.updateLoadingStatus("success"),Je.specActions.updateSpec((0,s.default)(Wt.spec))):Je.specActions.download&&Wt.url&&!Wt.urls&&(Je.specActions.updateUrl(Wt.url),Je.specActions.download(Wt.url))),Wt.domNode)Je.render(Wt.domNode,"App");else if(Wt.dom_id){let Er=document.querySelector(Wt.dom_id);Je.render(Er,"App")}else null===Wt.dom_id||null===Wt.domNode||console.error("Skipped rendering: no `dom_id` or `domNode` was specified");return Je},It=ie.config||Ce.configUrl;return It&&Je.specActions&&Je.specActions.getConfigByUrl?(Je.specActions.getConfigByUrl({url:It,loadRemoteConfig:!0,requestInterceptor:Ce.requestInterceptor,responseInterceptor:Ce.responseInterceptor},ot),Je):ot()}Ig.presets={apis:s1},Ig.plugins=o4.default;const u4=Ig})();var BO=ky.Z,dc=n(88834),Jc=n(32102),pp=n(99631),hp=n(82798),nd=n(99213),Xc=n(65571),yg=n(3902),Nh=n(14823),Ny=n(30450),od=n(33609),UO=n(63035),$O=n(49894),id=n(91489),nu=n(60177),Es=n(89417),jy=n(14699),zO=n(23294),Dy=n(25558),mp=n(96354),Fy=n(88141),jh=n(99437),Zc=n(21626),HO=n(95753),Dh=n(89642),Qs=n(63532),Qc=n(7673),VO=n(23977),Ly=n(56583),WO=n(13141),GO=n(74243),KO=n(86003),x=n(17705),Eg=n(96850),YO=n(59115),By=n(9183),Uy=n(29487),$y=n(86600);function JO(e,t){if(1&e&&(x.j41(0,"span",38),x.EFF(1),x.k0s()),2&e){const r=x.XpG(2).$implicit,o=x.XpG();x.Y8G("ngClass","m-"+o.method.toLowerCase()),x.BMQ("aria-label",r("methodLabel")),x.R7$(1),x.JRh(o.method)}}function XO(e,t){if(1&e&&(x.j41(0,"mat-option",42),x.EFF(1),x.k0s()),2&e){const r=t.$implicit;x.Y8G("value",r),x.R7$(1),x.SpI(" ",r," ")}}function ZO(e,t){if(1&e){const r=x.RV6();x.j41(0,"mat-form-field",39)(1,"mat-select",40),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG(3);return x.Njj(s.method=i)}),x.DNE(2,XO,2,2,"mat-option",41),x.k0s()()}if(2&e){const r=x.XpG(2).$implicit,o=x.XpG();x.R7$(1),x.Y8G("ngModel",o.method),x.BMQ("aria-label",r("methodLabel")),x.R7$(1),x.Y8G("ngForOf",o.methods)("ngForTrackBy",o.trackByIndex)}}function QO(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",33),x.DNE(1,JO,2,3,"span",34),x.DNE(2,ZO,3,4,"mat-form-field",35),x.j41(3,"mat-form-field",36)(4,"input",37),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG(2);return x.Njj(s.path=i)}),x.k0s()()()}if(2&e){const r=x.XpG().$implicit,o=x.XpG();x.R7$(1),x.Y8G("ngIf",o.lockMethod),x.R7$(1),x.Y8G("ngIf",!o.lockMethod),x.R7$(2),x.Y8G("ngModel",o.path)("placeholder",r("pathPlaceholder"))}}function qO(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",43)(1,"input",44),x.bIt("ngModelChange",function(i){const u=x.eBV(r).$implicit;return x.Njj(u.key=i)}),x.k0s(),x.j41(2,"input",44),x.bIt("ngModelChange",function(i){const u=x.eBV(r).$implicit;return x.Njj(u.value=i)}),x.k0s(),x.j41(3,"button",45),x.bIt("click",function(){const s=x.eBV(r).index,u=x.XpG(2);return x.Njj(u.removeParam(s))}),x.j41(4,"mat-icon"),x.EFF(5,"close"),x.k0s()()()}if(2&e){const r=t.$implicit,o=x.XpG().$implicit;x.R7$(1),x.Y8G("ngModel",r.key)("placeholder",o("key")),x.R7$(1),x.Y8G("ngModel",r.value)("placeholder",o("value")),x.R7$(1),x.BMQ("aria-label",o("removeRow"))}}function eT(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",43)(1,"input",44),x.bIt("ngModelChange",function(i){const u=x.eBV(r).$implicit;return x.Njj(u.key=i)}),x.k0s(),x.j41(2,"input",44),x.bIt("ngModelChange",function(i){const u=x.eBV(r).$implicit;return x.Njj(u.value=i)}),x.k0s(),x.j41(3,"button",45),x.bIt("click",function(){const s=x.eBV(r).index,u=x.XpG(2);return x.Njj(u.removeHeader(s))}),x.j41(4,"mat-icon"),x.EFF(5,"close"),x.k0s()()()}if(2&e){const r=t.$implicit,o=x.XpG().$implicit;x.R7$(1),x.Y8G("ngModel",r.key)("placeholder",o("key")),x.R7$(1),x.Y8G("ngModel",r.value)("placeholder",o("value")),x.R7$(1),x.BMQ("aria-label",o("removeRow"))}}function tT(e,t){if(1&e&&(x.j41(0,"span",49),x.EFF(1),x.k0s()),2&e){const r=x.XpG(2).$implicit;x.R7$(1),x.JRh(r("sessionDefault"))}}function rT(e,t){if(1&e&&(x.j41(0,"span",50),x.EFF(1),x.k0s()),2&e){const r=x.XpG().$implicit;x.R7$(1),x.SpI(" ",r.roleName,"")}}function nT(e,t){if(1&e&&(x.j41(0,"mat-option",42)(1,"span",46),x.EFF(2),x.k0s(),x.DNE(3,tT,2,1,"span",47),x.DNE(4,rT,2,1,"span",48),x.k0s()),2&e){const r=t.$implicit;x.AVh("try-it__identity-option--session","session"===r.type),x.Y8G("value",r.id),x.R7$(2),x.JRh(r.label),x.R7$(1),x.Y8G("ngIf","session"===r.type),x.R7$(1),x.Y8G("ngIf",r.roleName)}}function oT(e,t){if(1&e&&x.nrm(0,"df-badge",51),2&e){const r=x.XpG().$implicit;x.Y8G("label",r("readOnly"))}}function iT(e,t){1&e&&x.nrm(0,"mat-spinner",52)}function aT(e,t){if(1&e&&(x.j41(0,"span"),x.EFF(1),x.k0s()),2&e){const r=x.XpG().$implicit;x.R7$(1),x.JRh(r("send"))}}const sT=function(e,t){return{role:e,method:t}};function lT(e,t){if(1&e&&(x.j41(0,"div",65)(1,"mat-icon",66),x.EFF(2,"block"),x.k0s(),x.j41(3,"div",67),x.nrm(4,"df-badge",68),x.j41(5,"span",69),x.EFF(6),x.k0s()()()),2&e){const r=x.XpG(2).$implicit,o=x.XpG();x.R7$(4),x.Y8G("label",r("deniedTitle")),x.R7$(2),x.JRh(r("deniedBoundary",x.l_i(2,sT,o.deniedIdentityLabel,o.method)))}}function uT(e,t){if(1&e&&(x.j41(0,"span",73),x.EFF(1),x.k0s()),2&e){const r=t.$implicit;x.R7$(1),x.JRh(r)}}function cT(e,t){if(1&e&&(x.j41(0,"div",70)(1,"span",71),x.EFF(2),x.k0s(),x.DNE(3,uT,2,1,"span",72),x.k0s()),2&e){const r=x.XpG(2).$implicit,o=x.XpG();x.R7$(2),x.JRh(r("deniedLabel")),x.R7$(1),x.Y8G("ngForOf",o.deniedFields)("ngForTrackBy",o.trackByField)}}function fT(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",53)(1,"div",54),x.nrm(2,"df-badge",55),x.j41(3,"span",56),x.EFF(4),x.k0s(),x.j41(5,"span",56),x.EFF(6),x.k0s(),x.nrm(7,"span",57),x.j41(8,"mat-button-toggle-group",58),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG(2);return x.Njj(s.viewMode=i)}),x.j41(9,"mat-button-toggle",59),x.EFF(10),x.k0s(),x.j41(11,"mat-button-toggle",60),x.EFF(12),x.k0s()(),x.j41(13,"button",61),x.bIt("click",function(){x.eBV(r);const i=x.XpG(2);return x.Njj(i.copyResponse())}),x.j41(14,"mat-icon"),x.EFF(15,"content_copy"),x.k0s()()(),x.DNE(16,lT,7,5,"div",62),x.DNE(17,cT,4,3,"div",63),x.j41(18,"pre",64)(19,"code"),x.EFF(20),x.k0s()()()}if(2&e){const r=x.XpG().$implicit,o=x.XpG();x.R7$(2),x.Y8G("variant",o.statusVariant)("label",o.response.status+" "+o.response.statusText),x.R7$(2),x.Lme("",o.response.durationMs," ",r("ms"),""),x.R7$(2),x.JRh(o.formatSize(o.response.sizeBytes)),x.R7$(2),x.Y8G("ngModel",o.viewMode),x.R7$(1),x.Y8G("disabled",!o.response.isJson),x.R7$(1),x.JRh(r("pretty")),x.R7$(2),x.JRh(r("raw")),x.R7$(1),x.BMQ("aria-label",r("copyResponse")),x.R7$(3),x.Y8G("ngIf",o.isDenied),x.R7$(1),x.Y8G("ngIf",o.deniedFields.length),x.R7$(3),x.JRh(o.responseBody)}}function dT(e,t){if(1&e&&(x.j41(0,"p",74),x.EFF(1),x.k0s()),2&e){const r=x.XpG(2);x.R7$(1),x.JRh(r.errorMessage)}}function pT(e,t){if(1&e){const r=x.RV6();x.qex(0),x.j41(1,"section",1),x.DNE(2,QO,5,4,"div",2),x.j41(3,"mat-tab-group",3)(4,"mat-tab",4)(5,"div",5),x.DNE(6,qO,6,5,"div",6),x.j41(7,"button",7),x.bIt("click",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.addParam())}),x.j41(8,"mat-icon"),x.EFF(9,"add"),x.k0s(),x.EFF(10),x.k0s()()(),x.j41(11,"mat-tab",4)(12,"div",5),x.DNE(13,eT,6,5,"div",6),x.j41(14,"button",7),x.bIt("click",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.addHeader())}),x.j41(15,"mat-icon"),x.EFF(16,"add"),x.k0s(),x.EFF(17),x.k0s(),x.j41(18,"p",8),x.EFF(19),x.k0s()()(),x.j41(20,"mat-tab",9)(21,"textarea",10),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG();return x.Njj(s.bodyText=i)}),x.k0s()()(),x.j41(22,"div",11)(23,"mat-form-field",12)(24,"mat-label"),x.EFF(25),x.k0s(),x.j41(26,"mat-select",13),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG();return x.Njj(s.selectedIdentityId=i)})("selectionChange",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.onIdentityChange())}),x.DNE(27,nT,5,6,"mat-option",14),x.k0s()(),x.DNE(28,oT,1,1,"df-badge",15),x.nrm(29,"span",16),x.j41(30,"button",17),x.bIt("click",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.send())}),x.DNE(31,iT,1,0,"mat-spinner",18),x.DNE(32,aT,2,1,"span",19),x.k0s()(),x.j41(33,"p",20),x.EFF(34),x.k0s(),x.j41(35,"span",21),x.EFF(36),x.k0s(),x.DNE(37,fT,21,13,"div",22),x.DNE(38,dT,2,1,"p",23),x.j41(39,"div",24)(40,"div",25)(41,"mat-button-toggle-group",26),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG();return x.Njj(s.snippetLang=i)}),x.j41(42,"mat-button-toggle",27),x.EFF(43,"curl"),x.k0s(),x.j41(44,"mat-button-toggle",28),x.EFF(45,"Python"),x.k0s(),x.j41(46,"mat-button-toggle",29),x.EFF(47,"JS"),x.k0s(),x.j41(48,"mat-button-toggle",30),x.EFF(49,"MCP"),x.k0s()(),x.j41(50,"button",31),x.bIt("click",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.copySnippet())}),x.j41(51,"mat-icon"),x.EFF(52,"content_copy"),x.k0s(),x.EFF(53),x.k0s()(),x.j41(54,"pre",32)(55,"code"),x.EFF(56),x.k0s()()()(),x.bVm()}if(2&e){const r=t.$implicit,o=x.XpG();x.R7$(2),x.Y8G("ngIf",!o.hideRequestLine),x.R7$(1),x.Y8G("disableRipple",!0),x.R7$(1),x.Y8G("label",r("tabs.params")),x.R7$(2),x.Y8G("ngForOf",o.params)("ngForTrackBy",o.trackByIndex),x.R7$(4),x.SpI("",r("addParam")," "),x.R7$(1),x.Y8G("label",r("tabs.headers")),x.R7$(2),x.Y8G("ngForOf",o.headers)("ngForTrackBy",o.trackByIndex),x.R7$(4),x.SpI("",r("addHeader")," "),x.R7$(2),x.JRh(r("authNote")),x.R7$(1),x.Y8G("label",r("tabs.body"))("disabled",!o.methodHasBody),x.R7$(1),x.Y8G("ngModel",o.bodyText)("placeholder",r("bodyPlaceholder")),x.R7$(4),x.JRh(r("identityLabel")),x.R7$(1),x.Y8G("ngModel",o.selectedIdentityId),x.R7$(1),x.Y8G("ngForOf",o.identities)("ngForTrackBy",o.trackByIdentity),x.R7$(1),x.Y8G("ngIf",null==o.selectedIdentity?null:o.selectedIdentity.readOnly),x.R7$(2),x.Y8G("disabled",o.loading),x.R7$(1),x.Y8G("ngIf",o.loading),x.R7$(1),x.Y8G("ngIf",!o.loading),x.R7$(1),x.Y8G("title",o.requestUrl),x.R7$(1),x.JRh(o.requestUrl),x.R7$(2),x.JRh(r("identityHint")),x.R7$(1),x.Y8G("ngIf",o.response),x.R7$(1),x.Y8G("ngIf",o.errorMessage),x.R7$(3),x.Y8G("ngModel",o.snippetLang),x.R7$(12),x.SpI("",r("copy")," "),x.R7$(3),x.JRh(o.snippet)}}let zy=(()=>{class e{set body(r){null!=r&&(this.bodyText="string"==typeof r?r:JSON.stringify(r,null,2))}set filter(r){this.filterParam=(r??"").trim()}constructor(r,o,i){this.http=r,this.userData=o,this.zone=i,this.method="GET",this.lockMethod=!1,this.hideRequestLine=!1,this.path="",this.baseUrl="",this.filterParam="",this.sent=new x.bkB,this.methods=["GET","POST","PUT","PATCH","DELETE"],this.params=[{key:"",value:"",enabled:!0}],this.headers=[{key:"",value:"",enabled:!0}],this.bodyText="",this.identities=[],this.selectedIdentityId="session",this.viewMode="pretty",this.snippetLang="curl",this.loading=!1,this.response=null,this.errorMessage=null,this.baselineFields=[],this.deniedFields=[]}ngOnInit(){this.identities=[{id:"session",label:"Session (You)",type:"session"}],this.apiKey&&(this.identities.push({id:this.apiKey,label:"Provided key",type:"key",apiKey:this.apiKey}),this.selectedIdentityId=this.apiKey),this.loadIdentities()}loadIdentities(){const r=this.http.get(`${Qs.C}/system/role`,{params:{fields:"id,name",related:"role_service_access_by_role_id",sort:"name"}}),o=this.http.get(`${Qs.C}/system/app`,{params:{fields:"name,api_key,role_id,is_active"}});r.subscribe({next:i=>{const s=new Map;(i.resource??[]).forEach(u=>{const f=u.roleServiceAccessByRoleId??u.role_service_access_by_role_id??[],m=f.length>0&&f.every(S=>0==(-2&(S.verbMask??S.verb_mask??0)));s.set(u.id,{name:u.name,readOnly:m})}),o.subscribe({next:u=>this.buildIdentities(u.resource??[],s),error:()=>{}})},error:()=>{}})}buildIdentities(r,o){r.forEach(i=>{const s=i.apiKey??i.api_key;if(!s||!(i.isActive??i.is_active??1)||this.identities.some(T=>T.apiKey===s))return;const f=i.roleId??i.role_id,m=null!=f?o.get(f):void 0;this.identities.push({id:s,label:i.name,type:"key",apiKey:s,roleName:m?.name,readOnly:m?.readOnly,requiresSession:null==f})})}get selectedIdentity(){return this.identities.find(r=>r.id===this.selectedIdentityId)??this.identities[0]}onIdentityChange(){this.deniedFields=[]}get effectiveBaseUrl(){return this.baseUrl?this.baseUrl.replace(/\/+$/,""):`${window.location.origin}${Qs.C}${this.serviceName?`/${this.serviceName}`:""}`}buildQuery(){const r=this.params.filter(o=>o.enabled&&o.key.trim()&&"filter"!==o.key.trim()).map(o=>`${encodeURIComponent(o.key.trim())}=${encodeURIComponent(o.value)}`);return this.filterParam&&r.push(`filter=${encodeURIComponent(this.filterParam)}`),r.length?`?${r.join("&")}`:""}get requestUrl(){const r=this.effectiveBaseUrl,o=this.path.startsWith("/")?this.path:`/${this.path}`;return`${r}${this.path?o:""}${this.buildQuery()}`}get requestHeaders(){const r={Accept:"application/json"};this.methodHasBody&&(r["Content-Type"]="application/json");const o=this.selectedIdentity,i=this.userData.token;return"key"===o?.type&&o.apiKey?(r[id.dE]=o.apiKey,o.requiresSession&&i&&(r[id.Zl]=i)):i&&(r[id.Zl]=i),this.headers.filter(s=>s.enabled&&s.key.trim()).forEach(s=>r[s.key.trim()]=s.value),r}get methodHasBody(){return"POST"===this.method||"PUT"===this.method||"PATCH"===this.method}addParam(){this.params.push({key:"",value:"",enabled:!0})}injectParam(r,o="query"){const i=(r??"").trim();if(!i)return;const s="header"===o?this.headers:this.params,u=s.find(m=>m.key.trim()===i);if(u)return void(u.enabled=!0);const f={key:i,value:"",enabled:!0};1!==s.length||s[0].key.trim()?s.push(f):s[0]=f}isInjected(r,o="query"){const i=(r??"").trim();return!!i&&("header"===o?this.headers:this.params).some(u=>u.enabled&&u.key.trim()===i)}removeInjected(r,o="query"){const i=(r??"").trim();if(!i)return;const s="header"===o?this.headers:this.params,u=s.findIndex(f=>f.key.trim()===i);u>=0&&(s.splice(u,1),s.length||s.push({key:"",value:"",enabled:!0}))}removeParam(r){this.params.splice(r,1),this.params.length||this.addParam()}addHeader(){this.headers.push({key:"",value:"",enabled:!0})}removeHeader(r){this.headers.splice(r,1),this.headers.length||this.addHeader()}send(){this.loading=!0,this.errorMessage=null,this.deniedFields=[];const r=this.selectedIdentity,o=performance.now();"key"!==r?.type||!r.apiKey||r.requiresSession?this.sendAsSession(o):this.sendAsKey(o)}sendAsSession(r){const o=this.requestUrl,i=new Zc.Lr(this.requestHeaders),s=this.methodHasBody&&this.bodyText.trim()?this.bodyText:void 0;this.http.request(this.method,o,{headers:i,body:s,observe:"response",responseType:"text"}).subscribe({next:u=>this.applyResult(u.status,u.statusText,!0,u.body??"",r),error:u=>this.handleError(u,r)})}sendAsKey(r){var o=this;return(0,b.A)(function*(){const i=o.requestUrl,s=o.requestHeaders,u=o.methodHasBody&&o.bodyText.trim()?o.bodyText:void 0;try{const f=yield fetch(i,{method:o.method,headers:s,body:u,credentials:"omit"}),m=yield f.text();o.zone.run(()=>o.applyResult(f.status,f.statusText,f.ok,m,r))}catch{o.zone.run(()=>{const f=Math.round(performance.now()-r),m=o.toView(0,"Error",!1,f,"");o.response=m,o.loading=!1,o.errorMessage="Request could not reach the instance.",o.emitResult(m)})}})()}applyResult(r,o,i,s,u){const f=Math.round(performance.now()-u),m=this.toView(r,o,i,f,s);this.response=m,this.loading=!1,this.computeDenied(s),this.emitResult(m)}handleError(r,o){const i=Math.round(performance.now()-o),s="string"==typeof r.error?r.error:null!=r.error?JSON.stringify(r.error):r.message,u=r.status||0,f=this.toView(u,r.statusText||"Error",!1,i,s);this.response=f,this.loading=!1,0===u&&(this.errorMessage="Request could not reach the instance."),this.emitResult(f)}toView(r,o,i,s,u){let f=u,m=!1;try{f=JSON.stringify(JSON.parse(u),null,2),m=!0}catch{m=!1}return{status:r,statusText:o,ok:i&&r>=200&&r<300,durationMs:s,sizeBytes:(new TextEncoder).encode(u).length,isJson:m,bodyPretty:f,bodyRaw:u}}emitResult(r){this.sent.emit({method:this.method,url:this.requestUrl,status:r.status,ok:r.ok,durationMs:r.durationMs,sizeBytes:r.sizeBytes,identity:this.selectedIdentity?.label??"Session"})}computeDenied(r){const o=this.extractFields(r);if("session"===this.selectedIdentity?.type)return this.baselineFields=o,void(this.deniedFields=[]);if(!this.baselineFields.length)return;const i=new Set(o);this.deniedFields=this.baselineFields.filter(s=>!i.has(s))}extractFields(r){try{const o=JSON.parse(r),i=Array.isArray(o)?o:Array.isArray(o?.resource)?o.resource:[o],s=new Set;return i.filter(u=>u&&"object"==typeof u).forEach(u=>Object.keys(u).forEach(f=>s.add(f))),[...s]}catch{return[]}}get snippet(){switch(this.snippetLang){case"python":return this.pythonSnippet();case"js":return this.jsSnippet();case"mcp":return this.mcpSnippet();default:return this.curlSnippet()}}mcpSnippet(){const i=this.serviceName??"service",s=`${window.location.origin}${Qs.C}/${i}/_mcp`;return JSON.stringify({mcpServers:{[`dreamfactory-${i}`]:{url:s,headers:{[id.dE]:this.selectedIdentity?.apiKey||"YOUR_API_KEY"}}}},null,2)}bodyForSnippet(){return this.methodHasBody&&this.bodyText.trim()?this.bodyText.trim():null}curlSnippet(){const r=[`curl -X ${this.method} '${this.requestUrl}'`],o=this.requestHeaders;Object.keys(o).forEach(s=>r.push(` -H '${s}: ${o[s]}'`));const i=this.bodyForSnippet();return i&&r.push(` -d '${i.replace(/'/g,"'\\''")}'`),r.join(" \\\n")}pythonSnippet(){const r=this.requestHeaders,o=Object.keys(r).map(f=>` '${f}': '${r[f]}',`).join("\n"),i=this.bodyForSnippet();return[(i?"import json\n":"")+"import requests","",`url = '${this.requestUrl}'`,`headers = {\n${o}\n}`,`resp = requests.request('${this.method}', url, headers=headers${i?`, data=json.dumps(${i})`:""})`,"print(resp.status_code, resp.text)"].join("\n")}jsSnippet(){const r=this.requestHeaders,o=Object.keys(r).map(u=>` '${u}': '${r[u]}',`).join("\n"),i=this.bodyForSnippet();return[`const resp = await fetch('${this.requestUrl}', {`,` method: '${this.method}',`,` headers: {\n${o}\n },${i?`\n body: JSON.stringify(${i}),`:""}`,"});","console.log(resp.status, await resp.text());"].join("\n")}copySnippet(){navigator.clipboard?.writeText(this.snippet)}copyResponse(){this.response&&navigator.clipboard?.writeText("pretty"===this.viewMode?this.response.bodyPretty:this.response.bodyRaw)}get responseBody(){return this.response?"pretty"===this.viewMode?this.response.bodyPretty:this.response.bodyRaw:""}get isDenied(){const r=this.response?.status??0;return"key"===this.selectedIdentity?.type&&(401===r||403===r)}get deniedIdentityLabel(){const r=this.selectedIdentity;return r?.roleName??r?.label??""}get statusVariant(){const r=this.response?.status??0;return r?r>=200&&r<300?"success":401===r||403===r||r>=500?"danger":"warning":"danger"}formatSize(r){return r<1024?`${r} B`:`${(r/1024).toFixed(1)} KB`}trackByIndex(r){return r}trackByIdentity(r,o){return o.id}trackByField(r,o){return o}static{this.\u0275fac=function(o){return new(o||e)(x.rXU(Zc.Qq),x.rXU(Uy.T),x.rXU(x.SKi))}}static{this.\u0275cmp=x.VBU({type:e,selectors:[["df-try-it"]],inputs:{method:"method",lockMethod:"lockMethod",hideRequestLine:"hideRequestLine",path:"path",baseUrl:"baseUrl",apiKey:"apiKey",serviceName:"serviceName",body:"body",filter:"filter"},outputs:{sent:"sent"},standalone:!0,features:[x.aNF],decls:1,vars:1,consts:[[4,"transloco","translocoRead"],["data-testid","df-try-it",1,"try-it"],["class","try-it__request-line",4,"ngIf"],["animationDuration","0ms",1,"try-it__tabs",3,"disableRipple"],[3,"label"],[1,"try-it__kv"],["class","try-it__kv-row",4,"ngFor","ngForOf","ngForTrackBy"],["mat-button","","type","button",1,"try-it__kv-add",3,"click"],[1,"try-it__kv-note"],[3,"label","disabled"],["spellcheck","false","rows","8",1,"try-it__body",3,"ngModel","placeholder","ngModelChange"],[1,"try-it__send-area"],["appearance","outline",1,"try-it__identity-select"],["data-testid","try-it-identity",3,"ngModel","ngModelChange","selectionChange"],[3,"value","try-it__identity-option--session",4,"ngFor","ngForOf","ngForTrackBy"],["variant","neutral",3,"label",4,"ngIf"],[1,"try-it__send-spacer"],["mat-flat-button","","color","primary","type","button","data-testid","try-it-send",1,"try-it__send",3,"disabled","click"],["diameter","16",4,"ngIf"],[4,"ngIf"],[1,"try-it__url","df-numeric",3,"title"],[1,"try-it__identity-hint"],["class","try-it__response",4,"ngIf"],["class","try-it__error",4,"ngIf"],[1,"try-it__snippet"],[1,"try-it__snippet-bar"],[1,"try-it__snippet-lang",3,"ngModel","ngModelChange"],["value","curl"],["value","python"],["value","js"],["value","mcp",1,"try-it__snippet-lang-mcp"],["mat-button","","type","button",1,"try-it__copy",3,"click"],[1,"try-it__code"],[1,"try-it__request-line"],["class","try-it__method-chip",3,"ngClass",4,"ngIf"],["appearance","outline","class","try-it__method",4,"ngIf"],["appearance","outline",1,"try-it__path"],["matInput","","spellcheck","false","autocapitalize","off","autocomplete","off",3,"ngModel","placeholder","ngModelChange"],[1,"try-it__method-chip",3,"ngClass"],["appearance","outline",1,"try-it__method"],["panelClass","try-it__method-panel",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],[1,"try-it__kv-row"],["spellcheck","false",1,"try-it__kv-input",3,"ngModel","placeholder","ngModelChange"],["mat-icon-button","","type","button",1,"try-it__kv-remove",3,"click"],[1,"try-it__identity-name"],["class","try-it__identity-default",4,"ngIf"],["class","try-it__identity-meta",4,"ngIf"],[1,"try-it__identity-default"],[1,"try-it__identity-meta"],["variant","neutral",3,"label"],["diameter","16"],[1,"try-it__response"],[1,"try-it__response-meta"],[3,"variant","label"],[1,"try-it__meta-item","df-numeric"],[1,"try-it__response-spacer"],[1,"try-it__view-toggle",3,"ngModel","ngModelChange"],["value","pretty",3,"disabled"],["value","raw"],["mat-icon-button","","type","button",3,"click"],["class","try-it__denied-banner","data-testid","try-it-denied",4,"ngIf"],["class","try-it__denied",4,"ngIf"],[1,"try-it__code","try-it__response-body"],["data-testid","try-it-denied",1,"try-it__denied-banner"],[1,"try-it__denied-icon"],[1,"try-it__denied-body"],["variant","danger",3,"label"],[1,"try-it__denied-copy"],[1,"try-it__denied"],[1,"try-it__denied-label"],["class","try-it__denied-field",4,"ngFor","ngForOf","ngForTrackBy"],[1,"try-it__denied-field"],[1,"try-it__error"]],template:function(o,i){1&o&&x.DNE(0,pT,57,31,"ng-container",0),2&o&&x.Y8G("translocoRead","tryIt")},dependencies:[nu.MD,nu.YU,nu.Sq,nu.bT,Es.YN,Es.me,Es.BC,Es.vS,Jc.RG,Jc.rl,Jc.nJ,pp.fS,pp.fg,hp.Ve,hp.VO,$y.wT,dc.Hl,dc.$z,dc.iY,nd.m_,nd.An,Eg.RI,Eg.mq,Eg.T8,YO.Cn,Xc.Vg,Xc.ec,Xc.pc,By.D6,By.LG,od.Q8,od.bA,Ly.v],styles:[".try-it[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-4);padding:var(--df-space-4);background:var(--df-surface);border:1px solid var(--df-border);border-radius:var(--df-radius);font-size:var(--df-font-size-sm);color:var(--df-text)}.try-it__request-line[_ngcontent-%COMP%]{display:flex;gap:var(--df-space-2);align-items:flex-start}.try-it__method[_ngcontent-%COMP%]{flex:0 0 auto;width:11rem}.try-it__method-chip[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;height:var(--df-field-height);padding:0 var(--df-space-3);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);background:var(--df-surface-2);font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);font-weight:var(--df-font-weight-heading);text-transform:uppercase;color:var(--df-text)}.try-it__method-chip.m-get[_ngcontent-%COMP%]{border-color:var(--df-tint-data-fg);color:var(--df-tint-data-fg)}.try-it__method-chip.m-post[_ngcontent-%COMP%]{border-color:var(--df-tint-security-fg);color:var(--df-tint-security-fg)}.try-it__method-chip.m-put[_ngcontent-%COMP%]{border-color:var(--df-tint-system-fg);color:var(--df-tint-system-fg)}.try-it__method-chip.m-patch[_ngcontent-%COMP%]{border-color:var(--df-tint-docs-fg);color:var(--df-tint-docs-fg)}.try-it__method-chip.m-delete[_ngcontent-%COMP%]{border-color:var(--df-danger);color:var(--df-danger)}.try-it__path[_ngcontent-%COMP%]{flex:1 1 auto}.try-it__send[_ngcontent-%COMP%]{flex:0 0 auto;min-height:var(--df-field-height);display:inline-flex;align-items:center;justify-content:center;gap:var(--df-space-2)}.try-it__url[_ngcontent-%COMP%]{margin:0;padding:var(--df-space-2) var(--df-space-3);background:var(--df-code-bg);border-radius:var(--df-radius-sm);font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-code-text);overflow-x:auto;white-space:nowrap}.try-it__send-area[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);flex-wrap:wrap}.try-it__send-spacer[_ngcontent-%COMP%]{flex:1 1 auto}.try-it__identity[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);flex-wrap:wrap}.try-it__identity-select[_ngcontent-%COMP%]{flex:0 1 28rem;min-width:20rem}.try-it__identity-name[_ngcontent-%COMP%]{font-weight:var(--df-font-weight-medium)}.try-it__identity-default[_ngcontent-%COMP%]{margin-left:var(--df-space-2);padding:0 var(--df-space-2);border-radius:var(--df-radius-pill, var(--df-radius-sm));background:var(--df-accent-soft, var(--df-hover));color:var(--df-accent);font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-medium);text-transform:uppercase;letter-spacing:var(--df-tracking-eyebrow)}.try-it__identity-meta[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:var(--df-font-size-xs);margin-left:var(--df-space-2)}.try-it__identity-hint[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:var(--df-font-size-xs);line-height:var(--df-lh-base)}.try-it__kv[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);padding-top:var(--df-space-3)}.try-it__kv-row[_ngcontent-%COMP%]{display:flex;gap:var(--df-space-2);align-items:center}.try-it__kv-input[_ngcontent-%COMP%]{flex:1 1 0;min-width:0;height:var(--df-field-height);padding:0 var(--df-space-3);background:var(--df-surface-2);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);color:var(--df-text);font:inherit;font-size:var(--df-font-size-sm)}.try-it__kv-input[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:var(--df-focus-ring);border-color:var(--df-accent)}.try-it__kv-remove[_ngcontent-%COMP%]{flex:0 0 auto;color:var(--df-text-muted)}.try-it__kv-add[_ngcontent-%COMP%]{align-self:flex-start;color:var(--df-accent);font-size:var(--df-font-size-sm)}.try-it__kv-note[_ngcontent-%COMP%]{margin:0;color:var(--df-text-muted);font-size:var(--df-font-size-xs);line-height:var(--df-lh-base)}.try-it__body[_ngcontent-%COMP%]{width:100%;margin-top:var(--df-space-3);padding:var(--df-space-3);background:var(--df-code-bg);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);color:var(--df-code-text);font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);line-height:var(--df-lh-base);resize:vertical}.try-it__body[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:var(--df-focus-ring);border-color:var(--df-accent)}.try-it__snippet[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2)}.try-it__snippet-bar[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--df-space-2)}.try-it__snippet-lang[_ngcontent-%COMP%]{flex-wrap:wrap}.try-it__snippet-lang[_ngcontent-%COMP%] .try-it__snippet-lang-mcp.mat-button-toggle-checked[_ngcontent-%COMP%]{color:var(--df-accent)}.try-it__copy[_ngcontent-%COMP%]{color:var(--df-text-2);font-size:var(--df-font-size-sm)}.try-it__code[_ngcontent-%COMP%]{margin:0;padding:var(--df-space-3);background:var(--df-code-bg);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);color:var(--df-code-text);font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);line-height:var(--df-lh-base);overflow-x:auto;white-space:pre}.try-it__response[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-3);padding-top:var(--df-space-3);border-top:1px solid var(--df-border-2)}.try-it__response-meta[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3);flex-wrap:wrap}.try-it__meta-item[_ngcontent-%COMP%]{color:var(--df-text-2);font-size:var(--df-font-size-xs)}.try-it__response-spacer[_ngcontent-%COMP%]{flex:1 1 auto}.try-it__response-body[_ngcontent-%COMP%]{max-height:40rem;overflow:auto}.try-it__denied-banner[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:var(--df-space-3);padding:var(--df-space-3);background:var(--df-danger-soft);border:1px solid var(--df-danger-border);border-radius:var(--df-radius-sm)}.try-it__denied-icon[_ngcontent-%COMP%]{color:var(--df-danger);flex:0 0 auto}.try-it__denied-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2);align-items:flex-start}.try-it__denied-copy[_ngcontent-%COMP%]{color:var(--df-text-2);font-size:var(--df-font-size-sm);line-height:var(--df-line-height-normal)}.try-it__denied[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2);flex-wrap:wrap;padding:var(--df-space-2) var(--df-space-3);background:var(--df-warning-soft);border:1px solid var(--df-warning-border);border-radius:var(--df-radius-sm);font-size:var(--df-font-size-xs)}.try-it__denied-label[_ngcontent-%COMP%]{color:var(--df-warning);font-weight:var(--df-font-weight-medium)}.try-it__denied-field[_ngcontent-%COMP%]{color:var(--df-text-muted);font-family:var(--df-font-mono);text-decoration:line-through}.try-it__error[_ngcontent-%COMP%]{margin:0;color:var(--df-danger);font-size:var(--df-font-size-sm)}"]})}}return e})();function mT(e,t){if(1&e){const r=x.RV6();x.j41(0,"span",24)(1,"mat-button-toggle-group",25),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG(3);return x.Njj(s.conjunction=i)})("change",function(){x.eBV(r);const i=x.XpG(3);return x.Njj(i.emit())}),x.nI1(2,"transloco"),x.j41(3,"mat-button-toggle",26),x.EFF(4),x.nI1(5,"transloco"),x.k0s(),x.j41(6,"mat-button-toggle",27),x.EFF(7),x.nI1(8,"transloco"),x.k0s()()()}if(2&e){const r=x.XpG(3);x.R7$(1),x.Y8G("ngModel",r.conjunction),x.BMQ("aria-label",x.bMT(2,4,"filterBuilder.conj.aria")),x.R7$(3),x.SpI(" ",x.bMT(5,6,"filterBuilder.conj.and")," "),x.R7$(3),x.SpI(" ",x.bMT(8,8,"filterBuilder.conj.or")," ")}}function gT(e,t){1&e&&x.nrm(0,"span",28)}function vT(e,t){if(1&e&&(x.j41(0,"mat-option",30),x.EFF(1),x.k0s()),2&e){const r=t.$implicit;x.Y8G("value",r),x.R7$(1),x.SpI(" ",r," ")}}function yT(e,t){if(1&e){const r=x.RV6();x.j41(0,"mat-form-field",29)(1,"mat-label"),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"mat-select",19),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG().$implicit;return x.Njj(s.field=i)})("selectionChange",function(){x.eBV(r);const i=x.XpG(3);return x.Njj(i.emit())}),x.DNE(5,vT,2,2,"mat-option",20),x.k0s()()}if(2&e){const r=x.XpG().$implicit,o=x.XpG(2);x.R7$(2),x.JRh(x.bMT(3,4,"filterBuilder.field")),x.R7$(2),x.Y8G("ngModel",r.field),x.R7$(1),x.Y8G("ngForOf",o.fields)("ngForTrackBy",o.trackByIndex)}}function ET(e,t){if(1&e){const r=x.RV6();x.j41(0,"mat-form-field",29)(1,"mat-label"),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"input",31),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG().$implicit;return x.Njj(s.field=i)})("ngModelChange",function(){x.eBV(r);const i=x.XpG(3);return x.Njj(i.emit())}),x.k0s()()}if(2&e){const r=x.XpG().$implicit;x.R7$(2),x.JRh(x.bMT(3,2,"filterBuilder.field")),x.R7$(2),x.Y8G("ngModel",r.field)}}function bT(e,t){if(1&e&&(x.j41(0,"mat-option",30),x.EFF(1),x.nI1(2,"transloco"),x.k0s()),2&e){const r=t.$implicit;x.Y8G("value",r.value),x.R7$(1),x.SpI(" ",x.bMT(2,2,"filterBuilder.op."+r.labelKey)," ")}}function xT(e,t){if(1&e){const r=x.RV6();x.j41(0,"mat-form-field",32)(1,"mat-label"),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"input",31),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG().$implicit;return x.Njj(s.value=i)})("ngModelChange",function(){x.eBV(r);const i=x.XpG(3);return x.Njj(i.emit())}),x.k0s()()}if(2&e){const r=x.XpG().$implicit,o=x.XpG(2);x.R7$(2),x.JRh(x.bMT(3,2,"list"===o.arityOf(r.operator)?"filterBuilder.valueList":"filterBuilder.value")),x.R7$(2),x.Y8G("ngModel",r.value)}}function ST(e,t){1&e&&x.nrm(0,"span",33)}function _T(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",13),x.DNE(1,mT,9,10,"span",14),x.DNE(2,gT,1,0,"span",15),x.DNE(3,yT,6,6,"mat-form-field",16),x.DNE(4,ET,5,4,"ng-template",null,17,x.C5r),x.j41(6,"mat-form-field",18)(7,"mat-label"),x.EFF(8),x.nI1(9,"transloco"),x.k0s(),x.j41(10,"mat-select",19),x.bIt("ngModelChange",function(i){const u=x.eBV(r).$implicit;return x.Njj(u.operator=i)})("selectionChange",function(){x.eBV(r);const i=x.XpG(2);return x.Njj(i.emit())}),x.DNE(11,bT,3,4,"mat-option",20),x.k0s()(),x.DNE(12,xT,5,4,"mat-form-field",21),x.DNE(13,ST,1,0,"span",22),x.j41(14,"button",23),x.bIt("click",function(){const s=x.eBV(r).index,u=x.XpG(2);return x.Njj(u.removeCondition(s))}),x.nI1(15,"transloco"),x.j41(16,"mat-icon"),x.EFF(17,"close"),x.k0s()()()}if(2&e){const r=t.$implicit,o=t.index,i=x.sdS(5),s=x.XpG(2);x.R7$(1),x.Y8G("ngIf",o>0),x.R7$(1),x.Y8G("ngIf",0===o),x.R7$(1),x.Y8G("ngIf",s.fields.length)("ngIfElse",i),x.R7$(5),x.JRh(x.bMT(9,11,"filterBuilder.operator")),x.R7$(2),x.Y8G("ngModel",r.operator),x.R7$(1),x.Y8G("ngForOf",s.operators)("ngForTrackBy",s.trackByIndex),x.R7$(1),x.Y8G("ngIf","unary"!==s.arityOf(r.operator)),x.R7$(1),x.Y8G("ngIf","unary"===s.arityOf(r.operator)),x.R7$(1),x.Y8G("matTooltip",x.bMT(15,13,"filterBuilder.removeRow"))}}function wT(e,t){if(1&e){const r=x.RV6();x.qex(0),x.j41(1,"div",8),x.DNE(2,_T,18,15,"div",9),x.k0s(),x.j41(3,"div",10)(4,"button",11),x.bIt("click",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.addCondition())}),x.j41(5,"mat-icon"),x.EFF(6,"add"),x.k0s(),x.EFF(7),x.nI1(8,"transloco"),x.k0s(),x.j41(9,"button",12),x.bIt("click",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.clear())}),x.EFF(10),x.nI1(11,"transloco"),x.k0s()(),x.bVm()}if(2&e){const r=x.XpG();x.R7$(2),x.Y8G("ngForOf",r.conditions)("ngForTrackBy",r.trackByIndex),x.R7$(5),x.SpI(" ",x.bMT(8,4,"filterBuilder.addCondition")," "),x.R7$(3),x.SpI(" ",x.bMT(11,6,"filterBuilder.clear")," ")}}function CT(e,t){if(1&e){const r=x.RV6();x.qex(0),x.j41(1,"mat-form-field",34)(2,"mat-label"),x.EFF(3),x.nI1(4,"transloco"),x.k0s(),x.j41(5,"textarea",35),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG();return x.Njj(s.rawFilter=i)})("ngModelChange",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.emit())}),x.nI1(6,"transloco"),x.k0s()(),x.bVm()}if(2&e){const r=x.XpG();x.R7$(3),x.JRh(x.bMT(4,3,"filterBuilder.rawLabel")),x.R7$(2),x.Y8G("ngModel",r.rawFilter)("placeholder",x.bMT(6,5,"filterBuilder.rawPlaceholder"))}}function AT(e,t){if(1&e&&(x.j41(0,"div",36)(1,"span",37),x.EFF(2,"filter="),x.k0s(),x.j41(3,"code",38),x.EFF(4),x.k0s()()),2&e){const r=x.XpG();x.R7$(4),x.JRh(r.currentFilter)}}const OT=/^-?\d+(\.\d+)?$/,TT=/^(true|false)$/i;let IT=(()=>{class e{constructor(){this.fields=[],this.filterChange=new x.bkB,this.mode="visual",this.conjunction="and",this.conditions=[this.blankCondition()],this.rawFilter="",this._lastEmitted="",this.operators=[{value:"=",labelKey:"eq",arity:"binary"},{value:"!=",labelKey:"neq",arity:"binary"},{value:">",labelKey:"gt",arity:"binary"},{value:">=",labelKey:"gte",arity:"binary"},{value:"<",labelKey:"lt",arity:"binary"},{value:"<=",labelKey:"lte",arity:"binary"},{value:"like",labelKey:"like",arity:"binary"},{value:"contains",labelKey:"contains",arity:"binary",wrap:"both"},{value:"starts with",labelKey:"startsWith",arity:"binary",wrap:"start"},{value:"ends with",labelKey:"endsWith",arity:"binary",wrap:"end"},{value:"in",labelKey:"in",arity:"list"},{value:"not in",labelKey:"notIn",arity:"list"},{value:"is null",labelKey:"isNull",arity:"unary"},{value:"is not null",labelKey:"isNotNull",arity:"unary"}]}set filter(r){const o=r??"";o!==this._lastEmitted&&(this.rawFilter=o)}onModeChange(r){"raw"===r&&!this.rawFilter.trim()&&(this.rawFilter=this.compile()),this.mode=r,this.emit()}arityOf(r){return this.operators.find(o=>o.value===r)?.arity??"binary"}addCondition(){this.conditions.push(this.blankCondition())}removeCondition(r){this.conditions.splice(r,1),this.conditions.length||this.conditions.push(this.blankCondition()),this.emit()}clear(){this.conditions=[this.blankCondition()],this.rawFilter="",this.emit()}blankCondition(){return{field:"",operator:"=",value:""}}get currentFilter(){return"raw"===this.mode?this.rawFilter.trim():this.compile()}compile(){const r=this.conditions.map(o=>this.compileCondition(o)).filter(o=>null!==o);return r.length?r.join("or"===this.conjunction?" or ":" and "):""}compileCondition(r){const o=r.field?.trim();if(!o||!r.operator)return null;const i=this.operators.find(f=>f.value===r.operator),s=r.operator;if("unary"===i?.arity)return`(${o} ${s})`;const u=(r.value??"").trim();if(!u)return null;if("list"===i?.arity){const f=u.split(",").map(m=>m.trim()).filter(m=>m.length).map(m=>this.quote(m)).join(", ");return f?`(${o} ${s} (${f}))`:null}return i?.wrap?`(${o} like ${this.quote("both"===i.wrap?`%${u}%`:"start"===i.wrap?`${u}%`:`%${u}`)})`:`(${o} ${s} ${this.quote(u)})`}quote(r){return OT.test(r)||TT.test(r)?r:`'${r.replace(/'/g,"''")}'`}emit(){const r=this.currentFilter;this._lastEmitted=r,this.filterChange.emit(r)}trackByIndex(r){return r}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=x.VBU({type:e,selectors:[["df-filter-builder"]],inputs:{fields:"fields",filter:"filter"},outputs:{filterChange:"filterChange"},standalone:!0,features:[x.aNF],decls:16,vars:16,consts:[[1,"filter-builder"],[1,"filter-builder__head"],[1,"df-eyebrow","filter-builder__label"],[1,"filter-builder__mode",3,"value","change"],["value","visual"],["value","raw"],[4,"ngIf"],["class","filter-builder__preview",4,"ngIf"],[1,"filter-builder__rows"],["class","filter-row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"filter-builder__actions"],["mat-stroked-button","","type","button",3,"click"],["mat-button","","type","button",3,"click"],[1,"filter-row"],["class","filter-row__join",4,"ngIf"],["class","filter-row__spacer",4,"ngIf"],["appearance","outline","class","filter-row__field",4,"ngIf","ngIfElse"],["fieldText",""],["appearance","outline",1,"filter-row__op"],[3,"ngModel","ngModelChange","selectionChange"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],["appearance","outline","class","filter-row__value",4,"ngIf"],["class","filter-row__value filter-row__value--empty",4,"ngIf"],["mat-icon-button","","type","button",1,"filter-row__remove",3,"matTooltip","click"],[1,"filter-row__join"],[1,"filter-row__conj",3,"ngModel","ngModelChange","change"],["value","and"],["value","or"],[1,"filter-row__spacer"],["appearance","outline",1,"filter-row__field"],[3,"value"],["matInput","","autocomplete","off",3,"ngModel","ngModelChange"],["appearance","outline",1,"filter-row__value"],[1,"filter-row__value","filter-row__value--empty"],["appearance","outline",1,"filter-builder__raw"],["matInput","","rows","2","autocomplete","off","spellcheck","false",3,"ngModel","placeholder","ngModelChange"],[1,"filter-builder__preview"],[1,"filter-builder__preview-key"],[1,"filter-builder__preview-value"]],template:function(o,i){1&o&&(x.j41(0,"div",0)(1,"div",1)(2,"p",2),x.EFF(3),x.nI1(4,"transloco"),x.k0s(),x.j41(5,"mat-button-toggle-group",3),x.bIt("change",function(u){return i.onModeChange(u.value)}),x.nI1(6,"transloco"),x.j41(7,"mat-button-toggle",4),x.EFF(8),x.nI1(9,"transloco"),x.k0s(),x.j41(10,"mat-button-toggle",5),x.EFF(11),x.nI1(12,"transloco"),x.k0s()()(),x.DNE(13,wT,12,8,"ng-container",6),x.DNE(14,CT,7,7,"ng-container",6),x.DNE(15,AT,5,1,"div",7),x.k0s()),2&o&&(x.R7$(3),x.SpI(" ",x.bMT(4,8,"filterBuilder.title")," "),x.R7$(2),x.Y8G("value",i.mode),x.BMQ("aria-label",x.bMT(6,10,"filterBuilder.mode.aria")),x.R7$(3),x.SpI(" ",x.bMT(9,12,"filterBuilder.mode.visual")," "),x.R7$(3),x.SpI(" ",x.bMT(12,14,"filterBuilder.mode.raw")," "),x.R7$(2),x.Y8G("ngIf","visual"===i.mode),x.R7$(1),x.Y8G("ngIf","raw"===i.mode),x.R7$(1),x.Y8G("ngIf",i.currentFilter))},dependencies:[nu.MD,nu.Sq,nu.bT,Es.YN,Es.me,Es.BC,Es.vS,Jc.RG,Jc.rl,Jc.nJ,pp.fS,pp.fg,hp.Ve,hp.VO,$y.wT,dc.Hl,dc.$z,dc.iY,Xc.Vg,Xc.ec,Xc.pc,nd.m_,nd.An,Nh.uc,Nh.oV,od.Q8,od.Kj],styles:[".filter-builder[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-3);font-size:var(--df-font-size-sm);color:var(--df-text);container-type:inline-size}.filter-builder__head[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:var(--df-space-3);flex-wrap:wrap}.filter-builder__label[_ngcontent-%COMP%]{margin:0}.filter-builder__rows[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-2)}.filter-builder__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2)}.filter-builder__raw[_ngcontent-%COMP%]{width:100%}.filter-builder__raw[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{font-family:var(--df-font-mono);font-size:var(--df-font-size-xs)}.filter-builder__preview[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:var(--df-space-1);padding:var(--df-space-2) var(--df-space-3);background:var(--df-code-bg);border-radius:var(--df-radius-sm);overflow-x:auto}.filter-builder__preview-key[_ngcontent-%COMP%]{flex:0 0 auto;font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-text-muted)}.filter-builder__preview-value[_ngcontent-%COMP%]{font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-code-text);white-space:nowrap}.filter-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:var(--df-space-2);flex-wrap:wrap}.filter-row__join[_ngcontent-%COMP%], .filter-row__spacer[_ngcontent-%COMP%]{flex:0 0 auto;width:9rem;display:flex;align-items:center;min-height:var(--df-field-height)}.filter-row__conj[_ngcontent-%COMP%]{width:100%}.filter-row__field[_ngcontent-%COMP%]{flex:1 1 12rem;min-width:0}.filter-row__op[_ngcontent-%COMP%]{flex:1 1 8rem;min-width:0}.filter-row__value[_ngcontent-%COMP%]{flex:1 1 10rem;min-width:0}.filter-row__value--empty[_ngcontent-%COMP%]{align-self:stretch}.filter-row__remove[_ngcontent-%COMP%]{flex:0 0 auto;align-self:center}@container (max-width: 34rem){.filter-row[_ngcontent-%COMP%]{flex-wrap:wrap}.filter-row__join[_ngcontent-%COMP%], .filter-row__spacer[_ngcontent-%COMP%]{width:100%}}"]})}}return e})();var Hy=n(95245),RT=n(84412),PT=n(27468);let MT=(()=>{class e{constructor(r){this.http=r,this.serviceApiKeysCache=new Map,this.currentServiceKeys=new RT.t([])}getApiKeysForService(r){if(-1===r)return(0,Qc.of)([]);if(this.serviceApiKeysCache.has(r)){const o=this.serviceApiKeysCache.get(r);if(o)return this.currentServiceKeys.next(o.keys),(0,Qc.of)(o.keys)}return this.http.get(`${Qs.t.ROLES}?related=role_service_access_by_role_id`).pipe((0,Dy.n)(o=>{const i=o.resource.filter(u=>!!u.roleServiceAccessByRoleId&&u.roleServiceAccessByRoleId.some(f=>f.serviceId===r));if(!i.length)return(0,Qc.of)([]);const s=i.map(u=>this.http.get(`${Qs.t.APP}`,{params:{filter:`role_id=${u.id}`,fields:"*"}}));return(0,PT.p)(s).pipe((0,mp.T)(u=>{const f=u.flatMap(m=>m.resource).filter(m=>!!m&&!!m.apiKey).map(m=>({name:m.name,apiKey:m.apiKey}));return this.serviceApiKeysCache.set(r,{serviceId:r,keys:f}),this.currentServiceKeys.next(f),f}))}))}clearCache(){this.serviceApiKeysCache.clear(),this.currentServiceKeys.next([])}static{this.\u0275fac=function(o){return new(o||e)(x.KVO(Zc.Qq))}}static{this.\u0275prov=x.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var kT=n(83801),NT=n(95416),jT=n(70402);const DT=["apiDocumentation"];function FT(e,t){if(1&e&&(x.j41(0,"pre",13),x.EFF(1),x.k0s()),2&e){const r=x.XpG(2);x.R7$(1),x.JRh(r.healthError)}}function LT(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",10)(1,"button",11),x.bIt("click",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.toggleUnhealthyErrorDetails())}),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.DNE(4,FT,2,1,"pre",12),x.k0s()}if(2&e){const r=x.XpG();x.R7$(2),x.SpI(" ",x.bMT(3,2,r.showUnhealthyErrorDetails?"apiHealthBanner.hideDetails":"apiHealthBanner.viewDetails")," "),x.R7$(2),x.Y8G("ngIf",r.showUnhealthyErrorDetails)}}function BT(e,t){1&e&&(x.j41(0,"div",14)(1,"div",15),x.nrm(2,"df-skeleton",16),x.k0s(),x.j41(3,"div",17),x.nrm(4,"df-skeleton",18)(5,"df-skeleton",19)(6,"df-skeleton",18),x.k0s()()),2&e&&(x.R7$(2),x.Y8G("count",8),x.R7$(2),x.Y8G("count",1),x.R7$(1),x.Y8G("count",6),x.R7$(1),x.Y8G("count",1))}function UT(e,t){if(1&e){const r=x.RV6();x.j41(0,"df-empty-state",20),x.bIt("action",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.toggleAdvanced())}),x.nI1(1,"transloco"),x.nI1(2,"transloco"),x.nI1(3,"transloco"),x.k0s()}2&e&&x.Y8G("title",x.bMT(1,3,"apiDocs.empty.title"))("description",x.bMT(2,5,"apiDocs.empty.description"))("actionLabel",x.bMT(3,7,"apiDocs.rawSpec.open"))}function $T(e,t){if(1&e){const r=x.RV6();x.j41(0,"a",28),x.bIt("click",function(){const s=x.eBV(r).$implicit,u=x.XpG(3);return x.Njj(u.selectOperation(s))}),x.j41(1,"span",29),x.EFF(2),x.k0s(),x.j41(3,"span",30),x.EFF(4),x.k0s()()}if(2&e){const r=t.$implicit,o=x.XpG(3);x.AVh("is-active",o.isSelected(r)),x.Y8G("ngClass",o.methodClass(r.method)),x.R7$(2),x.JRh(r.method),x.R7$(2),x.JRh(r.path)}}function zT(e,t){if(1&e&&(x.qex(0),x.j41(1,"p",25),x.EFF(2),x.k0s(),x.j41(3,"mat-nav-list",26),x.DNE(4,$T,5,5,"a",27),x.k0s(),x.bVm()),2&e){const r=t.$implicit,o=x.XpG(2);x.R7$(2),x.JRh(r.tag),x.R7$(2),x.Y8G("ngForOf",r.operations)("ngForTrackBy",o.trackByOperation)}}function HT(e,t){if(1&e&&(x.j41(0,"span",46),x.EFF(1),x.k0s()),2&e){const r=x.XpG().$implicit;x.R7$(1),x.JRh(r.text)}}function VT(e,t){if(1&e&&(x.j41(0,"option",52),x.EFF(1),x.k0s()),2&e){const r=t.$implicit;x.Y8G("value",r),x.R7$(1),x.SpI(" ",r," ")}}function WT(e,t){if(1&e){const r=x.RV6();x.j41(0,"select",49),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG().ngIf,u=x.XpG(4);return x.Njj(u.onTokenSelected(s,i))}),x.nI1(1,"transloco"),x.j41(2,"option",50),x.EFF(3),x.nI1(4,"transloco"),x.k0s(),x.DNE(5,VT,2,2,"option",51),x.k0s()}if(2&e){const r=x.XpG().ngIf,o=x.XpG(4);x.AVh("rb-token--empty",!o.tokenValues[r.token]),x.Y8G("ngModel",o.tokenValues[r.token]||""),x.BMQ("aria-label",r.labelKey?x.bMT(1,7,r.labelKey):o.humanizeToken(r.token)),x.R7$(3),x.SpI(" ",r.labelKey?x.bMT(4,9,r.labelKey):o.humanizeToken(r.token)," "),x.R7$(2),x.Y8G("ngForOf",o.tokenOptions[r.token])("ngForTrackBy",o.trackByOption)}}function GT(e,t){if(1&e){const r=x.RV6();x.j41(0,"input",53),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG().ngIf,u=x.XpG(4);return x.Njj(u.onTokenSelected(s,i))}),x.k0s()}if(2&e){const r=x.XpG().ngIf,o=x.XpG(4);x.AVh("rb-token--empty",!o.tokenValues[r.token]),x.Y8G("ngModel",o.tokenValues[r.token]||"")("placeholder",o.humanizeToken(r.token))}}function KT(e,t){if(1&e&&(x.qex(0),x.DNE(1,WT,6,11,"select",47),x.DNE(2,GT,1,4,"ng-template",null,48,x.C5r),x.bVm()),2&e){const r=t.ngIf,o=x.sdS(3),i=x.XpG(4);x.R7$(1),x.Y8G("ngIf",i.usePicker(r))("ngIfElse",o)}}function YT(e,t){if(1&e&&(x.qex(0),x.DNE(1,HT,2,1,"span",45),x.DNE(2,KT,4,2,"ng-container",41),x.bVm()),2&e){const r=t.$implicit;x.R7$(1),x.Y8G("ngIf",!r.token),x.R7$(1),x.Y8G("ngIf",r.token)}}function JT(e,t){1&e&&(x.j41(0,"p",54),x.EFF(1),x.nI1(2,"transloco"),x.k0s()),2&e&&(x.R7$(1),x.SpI(" ",x.bMT(2,1,"apiDocs.token.hint")," "))}function XT(e,t){if(1&e&&(x.j41(0,"p",55),x.EFF(1),x.k0s()),2&e){const r=x.XpG().ngIf;x.R7$(1),x.JRh(r.summary)}}function ZT(e,t){1&e&&(x.j41(0,"span",65),x.EFF(1),x.nI1(2,"transloco"),x.k0s()),2&e&&(x.R7$(1),x.JRh(x.bMT(2,1,"apiDocs.param.headerTag")))}function QT(e,t){1&e&&(x.nrm(0,"df-badge",66),x.nI1(1,"transloco")),2&e&&x.Y8G("label",x.bMT(1,1,"apiDocs.param.requiredLabel"))}function qT(e,t){if(1&e&&(x.j41(0,"button",67)(1,"mat-icon"),x.EFF(2,"info_outline"),x.k0s()()),2&e){const r=x.XpG().$implicit;x.Y8G("matTooltip",r.description),x.BMQ("aria-label",r.description)}}function e5(e,t){if(1&e){const r=x.RV6();x.j41(0,"li",58)(1,"button",59),x.bIt("click",function(){const s=x.eBV(r).$implicit,u=x.XpG(4);return x.Njj(u.toggleParam(s))}),x.nI1(2,"transloco"),x.j41(3,"mat-icon"),x.EFF(4),x.k0s(),x.j41(5,"span"),x.EFF(6),x.nI1(7,"transloco"),x.k0s()(),x.j41(8,"span",60),x.EFF(9),x.k0s(),x.j41(10,"span",61),x.EFF(11),x.k0s(),x.DNE(12,ZT,3,3,"span",62),x.DNE(13,QT,2,3,"df-badge",63),x.DNE(14,qT,3,2,"button",64),x.k0s()}if(2&e){const r=t.$implicit,o=x.XpG(4);x.AVh("is-added",o.isParamAdded(r)),x.R7$(1),x.AVh("is-added",o.isParamAdded(r)),x.Y8G("matTooltip",x.bMT(2,12,o.isParamAdded(r)?"apiDocs.param.removeFromCall":"apiDocs.param.addToCall")),x.R7$(3),x.JRh(o.isParamAdded(r)?"check":"add"),x.R7$(2),x.JRh(x.bMT(7,14,o.isParamAdded(r)?"apiDocs.param.added":"apiDocs.param.add")),x.R7$(3),x.JRh(r.name),x.R7$(2),x.JRh(r.type),x.R7$(1),x.Y8G("ngIf","header"===r.location),x.R7$(1),x.Y8G("ngIf",r.required),x.R7$(1),x.Y8G("ngIf",r.description)}}function t5(e,t){if(1&e&&(x.qex(0),x.j41(1,"p",32),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"ul",56),x.DNE(5,e5,15,16,"li",57),x.k0s(),x.bVm()),2&e){const r=x.XpG(3);x.R7$(2),x.SpI(" ",x.bMT(3,3,"apiDocs.section.parameters")," "),x.R7$(3),x.Y8G("ngForOf",r.addableParams)("ngForTrackBy",r.trackByParam)}}function r5(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",68)(1,"df-filter-builder",69),x.bIt("filterChange",function(i){x.eBV(r);const s=x.XpG(3);return x.Njj(s.onFilterChange(i))}),x.k0s()()}if(2&e){const r=x.XpG(3);x.R7$(1),x.Y8G("fields",r.tableFields)("filter",r.currentFilter)}}function n5(e,t){if(1&e&&(x.j41(0,"p",74),x.EFF(1),x.k0s()),2&e){const r=x.XpG(2).ngIf;x.R7$(1),x.SpI(" ",r.description," ")}}function o5(e,t){if(1&e&&(x.j41(0,"tr")(1,"td",77),x.EFF(2),x.k0s(),x.j41(3,"td",78),x.EFF(4),x.k0s(),x.j41(5,"td"),x.EFF(6),x.k0s()()),2&e){const r=t.$implicit;x.R7$(2),x.JRh(r.name),x.R7$(2),x.JRh(r.type),x.R7$(2),x.JRh(r.description)}}function i5(e,t){if(1&e&&(x.qex(0),x.j41(1,"p",75),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"table",76)(5,"thead")(6,"tr")(7,"th"),x.EFF(8),x.nI1(9,"transloco"),x.k0s(),x.j41(10,"th"),x.EFF(11),x.nI1(12,"transloco"),x.k0s(),x.j41(13,"th"),x.EFF(14),x.nI1(15,"transloco"),x.k0s()()(),x.j41(16,"tbody"),x.DNE(17,o5,7,3,"tr",23),x.k0s()(),x.bVm()),2&e){const r=x.XpG(4);x.R7$(2),x.SpI(" ",x.bMT(3,6,"apiDocs.builder.pathParams")," "),x.R7$(6),x.JRh(x.bMT(9,8,"apiDocs.param.name")),x.R7$(3),x.JRh(x.bMT(12,10,"apiDocs.param.type")),x.R7$(3),x.JRh(x.bMT(15,12,"apiDocs.param.description")),x.R7$(3),x.Y8G("ngForOf",r.pathParams)("ngForTrackBy",r.trackByParam)}}function a5(e,t){if(1&e&&(x.qex(0),x.j41(1,"p",75),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"pre",79),x.EFF(5),x.k0s(),x.bVm()),2&e){const r=x.XpG(2).ngIf;x.R7$(2),x.SpI(" ",x.bMT(3,2,"apiDocs.section.requestBody")," "),x.R7$(3),x.JRh(r.requestBodySchema)}}function s5(e,t){if(1&e&&(x.j41(0,"tr")(1,"td",78),x.EFF(2),x.k0s(),x.j41(3,"td"),x.EFF(4),x.k0s()()),2&e){const r=t.$implicit;x.R7$(2),x.JRh(r.code),x.R7$(2),x.JRh(r.description)}}function l5(e,t){if(1&e&&(x.qex(0),x.j41(1,"p",75),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"table",76)(5,"thead")(6,"tr")(7,"th"),x.EFF(8),x.nI1(9,"transloco"),x.k0s(),x.j41(10,"th"),x.EFF(11),x.nI1(12,"transloco"),x.k0s()()(),x.j41(13,"tbody"),x.DNE(14,s5,5,2,"tr",23),x.k0s()(),x.bVm()),2&e){const r=x.XpG(2).ngIf,o=x.XpG(2);x.R7$(2),x.SpI(" ",x.bMT(3,5,"apiDocs.section.responses")," "),x.R7$(6),x.JRh(x.bMT(9,7,"apiDocs.response.code")),x.R7$(3),x.JRh(x.bMT(12,9,"apiDocs.response.description")),x.R7$(3),x.Y8G("ngForOf",r.responses)("ngForTrackBy",o.trackByResponse)}}function u5(e,t){if(1&e&&(x.j41(0,"details",70)(1,"summary",71),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"div",72),x.DNE(5,n5,2,1,"p",73),x.DNE(6,i5,18,14,"ng-container",41),x.DNE(7,a5,6,4,"ng-container",41),x.DNE(8,l5,15,11,"ng-container",41),x.k0s()()),2&e){const r=x.XpG().ngIf,o=x.XpG(2);x.R7$(2),x.SpI(" ",x.bMT(3,5,"apiDocs.builder.reference")," "),x.R7$(3),x.Y8G("ngIf",r.description),x.R7$(1),x.Y8G("ngIf",o.pathParams.length),x.R7$(1),x.Y8G("ngIf",r.requestBodySchema),x.R7$(1),x.Y8G("ngIf",r.responses.length)}}function c5(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",17)(1,"section",31)(2,"p",32),x.EFF(3),x.nI1(4,"transloco"),x.k0s(),x.j41(5,"div",33)(6,"span",34),x.EFF(7),x.k0s(),x.j41(8,"div",35),x.DNE(9,YT,3,2,"ng-container",23),x.k0s()(),x.j41(10,"p",36)(11,"span",37),x.EFF(12),x.k0s(),x.j41(13,"span",38),x.EFF(14),x.k0s()(),x.DNE(15,JT,3,3,"p",39),x.DNE(16,XT,2,1,"p",40),x.DNE(17,t5,6,5,"ng-container",41),x.DNE(18,r5,2,2,"div",42),x.j41(19,"df-try-it",43),x.bIt("sent",function(i){x.eBV(r);const s=x.XpG(2);return x.Njj(s.onTryItSent(i))}),x.k0s(),x.DNE(20,u5,9,7,"details",44),x.k0s()()}if(2&e){const r=t.ngIf,o=x.XpG(2);x.R7$(3),x.SpI(" ",x.bMT(4,20,"apiDocs.builder.request")," "),x.R7$(3),x.Y8G("ngClass",o.methodClass(r.method)),x.R7$(1),x.JRh(r.method),x.R7$(2),x.Y8G("ngForOf",o.pathSegments)("ngForTrackBy",o.trackBySegment),x.R7$(3),x.JRh(o.serviceBaseUrl),x.R7$(2),x.JRh(o.effectivePath),x.R7$(1),x.Y8G("ngIf",o.hasUnresolvedToken),x.R7$(1),x.Y8G("ngIf",r.summary),x.R7$(1),x.Y8G("ngIf",o.addableParams.length),x.R7$(1),x.Y8G("ngIf",o.showFilterBuilder),x.R7$(1),x.Y8G("method",r.method)("lockMethod",!0)("hideRequestLine",!0)("baseUrl",o.serviceBaseUrl)("path",o.effectivePath)("serviceName",o.serviceName||void 0)("filter",o.currentFilter)("body",o.sampleBody),x.R7$(1),x.Y8G("ngIf",o.hasReference)}}function f5(e,t){if(1&e&&(x.j41(0,"div",21)(1,"nav",22),x.DNE(2,zT,5,3,"ng-container",23),x.k0s(),x.DNE(3,c5,21,22,"div",24),x.k0s()),2&e){const r=x.XpG();x.R7$(2),x.Y8G("ngForOf",r.groups)("ngForTrackBy",r.trackByGroup),x.R7$(1),x.Y8G("ngIf",r.selectedOp)}}function d5(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",87)(1,"mat-slide-toggle",88),x.bIt("ngModelChange",function(i){x.eBV(r);const s=x.XpG(3);return x.Njj(s.expandSchema=i)})("ngModelChange",function(){x.eBV(r);const i=x.XpG(3);return x.Njj(i.reloadApiDocs())}),x.EFF(2),x.nI1(3,"transloco"),x.k0s(),x.j41(4,"div",89),x.EFF(5),x.nI1(6,"transloco"),x.k0s()()}if(2&e){const r=x.XpG(3);x.R7$(1),x.Y8G("ngModel",r.expandSchema),x.R7$(1),x.SpI(" ",x.bMT(3,3,"apiDocs.rawSpec.expandSchema")," "),x.R7$(3),x.SpI(" ",x.bMT(6,5,"apiDocs.rawSpec.expandSchemaHint")," ")}}function p5(e,t){if(1&e&&(x.j41(0,"div",83),x.DNE(1,d5,7,7,"div",84),x.nrm(2,"div",85,86),x.k0s()),2&e){const r=x.XpG(2);x.R7$(1),x.Y8G("ngIf","Database"===(null==r.apiDocJson||null==r.apiDocJson.info?null:r.apiDocJson.info.group))}}function h5(e,t){if(1&e){const r=x.RV6();x.j41(0,"div",80)(1,"button",81),x.bIt("click",function(){x.eBV(r);const i=x.XpG();return x.Njj(i.toggleAdvanced())}),x.j41(2,"mat-icon"),x.EFF(3),x.k0s(),x.EFF(4),x.nI1(5,"transloco"),x.k0s(),x.DNE(6,p5,4,1,"div",82),x.k0s()}if(2&e){const r=x.XpG();x.R7$(3),x.JRh(r.showAdvanced?"expand_less":"expand_more"),x.R7$(1),x.SpI(" ",x.bMT(5,3,r.showAdvanced?"apiDocs.rawSpec.hide":"apiDocs.rawSpec.show")," "),x.R7$(2),x.Y8G("ngIf",r.showAdvanced)}}const bg=["GET","POST","PUT","PATCH","DELETE"];let xg=class Mg{constructor(t,r,o,i,s,u,f,m,S){this.activatedRoute=t,this.router=r,this.userDataService=o,this.apiKeysService=i,this.clipboard=s,this.snackBar=u,this.currentServiceService=f,this.http=m,this.httpBackend=S,this.apiKeys=[],this.pathTokens=[],this.tokenValues={},this.tokenOptions={},this.tableColumns=[],this.tableSeq=0,this.loading=!0,this.groups=[],this.selectedOp=null,this.pathSegments=[],this.addableParams=[],this.pathParams=[],this.currentFilter="",this.tableFields=[],this.showAdvanced=!1,this.swaggerRendered=!1,this.expandSchema=!1,this.subscriptions=[],this.healthStatus="loading",this.healthError=null,this.serviceName=null,this.showUnhealthyErrorDetails=!1,this.trackByApiKey=(T,I)=>I.apiKey,this.trackBySegment=T=>T,this.trackByToken=(T,I)=>I.token,this.trackByOption=(T,I)=>I,this.trackByGroup=(T,I)=>I.tag,this.trackByOperation=(T,I)=>I.id,this.trackByParam=(T,I)=>`${I.location}:${I.name}`,this.trackByResponse=(T,I)=>I.code,this.rawHttp=new Zc.Qq(S)}ngOnInit(){this.subscriptions.push(this.activatedRoute.data.subscribe(({data:t})=>{this.serviceName=this.activatedRoute.snapshot.params.name,this.resolveServiceId(),t&&(this.apiDocJson=t,this.buildOperations(),this.checkApiHealth())})),this.subscriptions.push(this.currentServiceService.getCurrentServiceId().pipe((0,zO.F)(),(0,Dy.n)(t=>this.apiKeysService.getApiKeysForService(t))).subscribe(t=>{this.apiKeys=t}))}ngOnDestroy(){this.subscriptions.forEach(t=>t.unsubscribe())}resolveServiceId(){this.serviceName&&this.subscriptions.push(this.http.get(`${Qs.C}/system/service?filter=name=${this.serviceName}`).pipe((0,mp.T)(t=>t?.resource?.[0]?.id||-1),(0,Fy.M)(t=>{-1!==t&&this.currentServiceService.setCurrentServiceId(t)})).subscribe())}buildOperations(){this.loading=!0;const t=new Map,r=this.apiDocJson?.paths??{};Object.keys(r).forEach(i=>{const s=r[i]??{};Object.keys(s).forEach(u=>{const f=u.toUpperCase();if(!bg.includes(f))return;const m=s[u],S=m?.tags?.[0]||this.serviceName||"default",T={id:`${f} ${i}`,method:f,path:i,operationId:m?.operationId||"",summary:m?.summary||"",description:m?.description||"",tag:S,parameters:this.buildParameters(m?.parameters),requestBodySchema:this.buildRequestBody(m?.requestBody),responses:this.buildResponses(m?.responses)},I=t.get(S)??[];I.push(T),t.set(S,I)})}),this.groups=[...t.entries()].map(([i,s])=>({tag:i,operations:s.sort((u,f)=>u.path.localeCompare(f.path)||bg.indexOf(u.method)-bg.indexOf(f.method))})).sort((i,s)=>i.tag.localeCompare(s.tag));const o=this.groups[0]?.operations[0]??null;o?this.selectOperation(o):this.selectedOp=null,this.loading=!1}buildParameters(t){return Array.isArray(t)?t.map(r=>({name:r?.name||"",location:r?.in||"",required:!!r?.required,type:r?.schema?.type||r?.type||r?.schema?.items?.type||"",description:r?.description||""})):[]}buildRequestBody(t){const r=t?.content?.["application/json"]?.schema;if(!r)return null;try{return JSON.stringify(r,null,2)}catch{return null}}buildResponses(t){return t&&"object"==typeof t?Object.keys(t).map(r=>({code:r,description:t[r]?.description||""})):[]}get hasOperations(){return this.groups.length>0}selectOperation(t){if(this.selectedOp=t,this.currentFilter="",this.tableFields=[],this.tableColumns=[],this.pathTokens=this.parsePathTokens(t.path),this.tokenValues={},this.tokenOptions={},this.pathSegments=this.buildPathSegments(t),this.addableParams=t.parameters.filter(r=>this.isAddableParam(r)),this.pathParams=t.parameters.filter(r=>!this.isAddableParam(r)),this.pathTokens.length)this.pathTokens.forEach(r=>this.resolveToken(r));else{const r=this.tableFromPath(t.path);r&&this.loadTableSchema(r)}}parsePathTokens(t){const r=[],o=new Set,i=/\{([^}]+)\}/g;let s;for(;null!==(s=i.exec(t));){const u=s[1];o.has(u)||(o.add(u),r.push({token:u,kind:this.tokenKind(u),labelKey:this.tokenLabelKey(u)}))}return r}buildPathSegments(t){const r=[],o=/\{([^}]+)\}/g;let s,i=0;for(;null!==(s=o.exec(t.path));){s.index>i&&r.push({text:t.path.slice(i,s.index),token:null});const u=this.pathTokens.find(f=>f.token===s[1])??{token:s[1],kind:"text",labelKey:null};r.push({text:"",token:u}),i=o.lastIndex}return i0}humanizeToken(t){return t.replace(/_/g," ")}resolveToken(t){switch(t.kind){case"table":this.loadTableOptions(t);break;case"proc":this.loadResourceOptions("_proc",t);break;case"func":this.loadResourceOptions("_func",t);break;case"field":{const r=this.tableFromPath(this.effectivePath);r&&this.loadTableSchema(r);break}}}get showTokenPickers(){return!!this.selectedOp&&this.pathTokens.length>0}get hasUnresolvedToken(){return this.pathTokens.some(t=>this.isEnumerableToken(t)&&!this.tokenValues[t.token])}get effectivePath(){const t=this.selectedOp;if(!t)return"";let r=t.path;return this.pathTokens.forEach(o=>{const i=this.tokenValues[o.token];i&&(r=r.replace(`{${o.token}}`,i))}),r}get showFilterBuilder(){const t=this.selectedOp;return!!t&&"GET"===t.method&&/_table\//.test(this.effectivePath)}onTokenSelected(t,r){if(this.tokenValues[t.token]=r,"table"===t.kind){this.currentFilter="",this.tableFields=[],this.tableColumns=[];const o=this.pathTokens.find(i=>"field"===i.kind);o&&(this.tokenValues[o.token]="",this.tokenOptions[o.token]=[]),this.loadTableSchema(r)}}tableFromPath(t){const r=t.match(/_table\/([^/{}]+)(?:\/|$)/);return r?r[1]:null}loadTableOptions(t){this.serviceName&&this.subscriptions.push(this.http.get(`${Qs.C}/${this.serviceName}/_table`,{params:{fields:"name"},context:(0,Dh.PH)()}).pipe((0,mp.T)(r=>(r.resource??[]).map(o=>o.name).filter(Boolean)),(0,jh.W)(()=>(0,Qc.of)([]))).subscribe(r=>this.tokenOptions[t.token]=r))}loadResourceOptions(t,r){this.serviceName&&this.subscriptions.push(this.http.get(`${Qs.C}/${this.serviceName}/${t}`,{context:(0,Dh.PH)()}).pipe((0,mp.T)(o=>(o.resource??[]).map(i=>"string"==typeof i?i:i?.name).filter(i=>!!i)),(0,jh.W)(()=>(0,Qc.of)([]))).subscribe(o=>this.tokenOptions[r.token]=o))}loadTableSchema(t){if(!this.serviceName)return;const r=++this.tableSeq;this.subscriptions.push(this.http.get(`${Qs.C}/${this.serviceName}/_schema/${t}`,{params:{fields:"name,type"},context:(0,Dh.PH)()}).pipe((0,mp.T)(o=>o.field??[]),(0,jh.W)(()=>(0,Qc.of)([]))).subscribe(o=>{if(r!==this.tableSeq)return;this.tableColumns=o.map(s=>({name:s.name,type:s.type??""})),this.tableFields=this.tableColumns.map(s=>s.name);const i=this.pathTokens.find(s=>"field"===s.kind);i&&(this.tokenOptions[i.token]=this.tableFields)}))}onFilterChange(t){this.currentFilter=t}methodTakesBody(t){return"POST"===t||"PUT"===t||"PATCH"===t}get sampleBody(){const t=this.selectedOp;if(t&&this.methodTakesBody(t.method)){if(this.tableColumns.length){const r={};return this.tableColumns.filter(o=>!/^id$/i.test(o.name)).slice(0,10).forEach(o=>r[o.name]=this.sampleForType(o.type)),JSON.stringify({resource:[r]},null,2)}return this.sampleFromSchemaJson(t.requestBodySchema)}}sampleForType(t){switch((t||"").toLowerCase()){case"integer":case"int":case"id":case"reference":case"number":case"float":case"double":case"decimal":return 0;case"boolean":case"bool":return!1;case"timestamp":case"datetime":case"datetime_on_create":case"datetime_on_update":return"2025-01-01T00:00:00Z";case"date":return"2025-01-01";case"time":return"00:00:00";default:return"string"}}sampleFromSchemaJson(t){if(t)try{const r=this.sampleFromSchema(JSON.parse(t),0);if(void 0===r)return;const o=JSON.stringify(r,null,2);return"{}"===o||"[]"===o?void 0:o}catch{return}}sampleFromSchema(t,r){if(t&&!(r>6)){if(void 0!==t.example)return t.example;if(void 0!==t.default)return t.default;if("object"===t.type||t.properties){const o={},i=t.properties??{};return Object.keys(i).forEach(s=>{const u=this.sampleFromSchema(i[s],r+1);void 0!==u&&(o[s]=u)}),o}if("array"===t.type||t.items){const o=this.sampleFromSchema(t.items,r+1);return void 0===o?[]:[o]}return this.sampleForType(t.type)}}isAddableParam(t){return"query"===t.location||"header"===t.location}paramLocation(t){return"header"===t.location?"header":"query"}isParamAdded(t){return this.tryIt?.isInjected(t.name,this.paramLocation(t))??!1}toggleParam(t){if(!this.isAddableParam(t))return;const r=this.paramLocation(t);this.tryIt?.isInjected(t.name,r)?this.tryIt.removeInjected(t.name,r):this.tryIt?.injectParam(t.name,r)}get hasReference(){const t=this.selectedOp;return!!t&&(!!t.description||!!t.requestBodySchema||t.responses.length>0||this.pathParams.length>0)}isSelected(t){return this.selectedOp?.id===t.id}methodClass(t){return`m-${(t||"").toLowerCase()}`}get serviceBaseUrl(){return`${window.location.origin}${Qs.C}/${this.serviceName??""}`}onTryItSent(t){}get healthVariant(){switch(this.healthStatus){case"healthy":return"success";case"unhealthy":return"danger";case"warning":return"warning";default:return"neutral"}}checkApiHealth(){const t=VO.F[this.apiDocJson.info.group];this.serviceName&&t?this.performHealthCheck(t[0].endpoint):this.setHealthState("warning")}setHealthState(t,r=null){this.healthStatus=t,this.healthError=r}performHealthCheck(t){this.healthStatus="loading",this.healthError=null,this.subscriptions.push(this.http.get(`${Qs.C}/${this.serviceName}${t}`,{responseType:"text",context:(0,Dh.PH)()}).pipe((0,Fy.M)(()=>this.setHealthState("healthy")),(0,jh.W)(r=>(this.setHealthState("unhealthy",`${t}: ${(0,HO.cQ)(r).message}`),(0,Qc.of)(null)))).subscribe())}toggleUnhealthyErrorDetails(){this.showUnhealthyErrorDetails=!this.showUnhealthyErrorDetails}goBackToList(){this.currentServiceService.clearCurrentServiceId(),this.router.navigate(["../"],{relativeTo:this.activatedRoute})}downloadApiDoc(){(0,UO.ik)(JSON.stringify(this.apiDocJson,void 0,2),"api-spec.json","json")}copyApiKey(t){this.clipboard.copy(t),this.snackBar.open("API Key copied to clipboard","Close",{duration:2e3})}toggleAdvanced(){this.showAdvanced=!this.showAdvanced,this.showAdvanced&&!this.swaggerRendered&&setTimeout(()=>this.renderSwagger())}reloadApiDocs(){if(!this.serviceName)return;const t=this.expandSchema?"?expand_schema=true":"",r=new Zc.Lr({"X-DreamFactory-API-Key":jy.c.dfApiDocsApiKey,"X-DreamFactory-Session-Token":this.userDataService.token||""});this.rawHttp.get(`${Qs.C}/api_docs/${this.serviceName}${t}`,{headers:r}).subscribe(o=>{o&&(this.apiDocJson=o,this.buildOperations()),this.swaggerRendered=!1,this.showAdvanced&&setTimeout(()=>this.renderSwagger())})}renderSwagger(){this.apiDocElement?.nativeElement&&(this.swaggerRendered=!0,BO({spec:Vy(this.apiDocJson),domNode:this.apiDocElement.nativeElement,requestInterceptor:t=>{t.headers[id.Zl]=this.userDataService.token,t.headers[id.dE]=jy.c.dfApiDocsApiKey;const r=new URL(t.url),o=new URLSearchParams(r.search);return o.forEach((i,s)=>{o.set(s,decodeURIComponent(i))}),r.search=o.toString(),t.url=r.toString(),t},showMutatedRequest:!0}))}static{this.\u0275fac=function(r){return new(r||Mg)(x.rXU(Hy.nX),x.rXU(Hy.Ix),x.rXU(Uy.T),x.rXU(MT),x.rXU(kT.B0),x.rXU(NT.UG),x.rXU(jT.M),x.rXU(Zc.Qq),x.rXU(Zc.JV))}}static{this.\u0275cmp=x.VBU({type:Mg,selectors:[["df-api-docs"]],viewQuery:function(r,o){if(1&r&&(x.GBs(DT,5),x.GBs(zy,5)),2&r){let i;x.mGM(i=x.lsd())&&(o.apiDocElement=i.first),x.mGM(i=x.lsd())&&(o.tryIt=i.first)}},standalone:!0,features:[x.aNF],decls:16,vars:19,consts:[[3,"title","description"],["pageHeaderActions","",1,"docs-header-actions"],[3,"variant","label"],["mat-stroked-button","",3,"click"],["mat-flat-button","","color","primary",3,"click"],["class","health-detail",4,"ngIf"],["class","docs-two-col docs-loading",4,"ngIf"],["icon","description",3,"title","description","actionLabel","action",4,"ngIf"],["class","docs-two-col",4,"ngIf"],["class","raw-spec",4,"ngIf"],[1,"health-detail"],["mat-button","",1,"view-details-button",3,"click"],["class","unhealthy-error-details",4,"ngIf"],[1,"unhealthy-error-details"],[1,"docs-two-col","docs-loading"],[1,"docs-nav"],["variant","table-row",3,"count"],[1,"docs-right"],["variant","card",3,"count"],["variant","line",3,"count"],["icon","description",3,"title","description","actionLabel","action"],[1,"docs-two-col"],["aria-label","API operations",1,"docs-nav"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","docs-right",4,"ngIf"],[1,"docs-nav__group","df-eyebrow"],["dense",""],["mat-list-item","","class","docs-op",3,"is-active","ngClass","click",4,"ngFor","ngForOf","ngForTrackBy"],["mat-list-item","",1,"docs-op",3,"ngClass","click"],[1,"docs-op__method"],[1,"docs-op__path"],[1,"rb"],[1,"df-eyebrow","rb__label"],[1,"rb-line"],[1,"rb-line__method",3,"ngClass"],[1,"rb-line__path"],[1,"rb-resolved"],[1,"rb-resolved__base"],[1,"rb-resolved__path"],["class","rb-hint",4,"ngIf"],["class","rb-summary",4,"ngIf"],[4,"ngIf"],["class","console-card console-card--filter",4,"ngIf"],[3,"method","lockMethod","hideRequestLine","baseUrl","path","serviceName","filter","body","sent"],["class","rb-ref",4,"ngIf"],["class","rb-seg",4,"ngIf"],[1,"rb-seg"],["class","rb-token",3,"rb-token--empty","ngModel","ngModelChange",4,"ngIf","ngIfElse"],["segText",""],[1,"rb-token",3,"ngModel","ngModelChange"],["value","","disabled",""],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[3,"value"],["spellcheck","false","autocomplete","off",1,"rb-token","rb-token--text",3,"ngModel","placeholder","ngModelChange"],[1,"rb-hint"],[1,"rb-summary"],[1,"rb-params"],["class","rb-param",3,"is-added",4,"ngFor","ngForOf","ngForTrackBy"],[1,"rb-param"],["type","button",1,"rb-param__add",3,"matTooltip","click"],[1,"rb-param__name"],[1,"rb-param__type"],["class","rb-param__loc",4,"ngIf"],["variant","danger",3,"label",4,"ngIf"],["type","button","class","rb-param__info",3,"matTooltip",4,"ngIf"],[1,"rb-param__loc"],["variant","danger",3,"label"],["type","button",1,"rb-param__info",3,"matTooltip"],[1,"console-card","console-card--filter"],[3,"fields","filter","filterChange"],[1,"rb-ref"],[1,"rb-ref__summary"],[1,"rb-ref__body"],["class","rb-ref__prose",4,"ngIf"],[1,"rb-ref__prose"],[1,"df-eyebrow","docs-section-label"],[1,"docs-table"],[1,"docs-table__name"],[1,"docs-table__type"],[1,"docs-schema"],[1,"raw-spec"],["mat-button","",1,"raw-spec__toggle",3,"click"],["class","raw-spec__body",4,"ngIf"],[1,"raw-spec__body"],["class","expand-schema-row",4,"ngIf"],[1,"swagger-ui"],["apiDocumentation",""],[1,"expand-schema-row"],[3,"ngModel","ngModelChange"],[1,"expand-schema-hint"]],template:function(r,o){1&r&&(x.j41(0,"df-page-header",0),x.nI1(1,"transloco"),x.j41(2,"div",1),x.nrm(3,"df-badge",2),x.nI1(4,"transloco"),x.j41(5,"button",3),x.bIt("click",function(){return o.goBackToList()}),x.EFF(6),x.nI1(7,"transloco"),x.k0s(),x.j41(8,"button",4),x.bIt("click",function(){return o.downloadApiDoc()}),x.EFF(9),x.nI1(10,"transloco"),x.k0s()()(),x.DNE(11,LT,5,4,"div",5),x.DNE(12,BT,7,4,"div",6),x.DNE(13,UT,4,9,"df-empty-state",7),x.DNE(14,f5,4,3,"div",8),x.DNE(15,h5,7,5,"div",9)),2&r&&(x.Y8G("title",(null==o.apiDocJson||null==o.apiDocJson.info?null:o.apiDocJson.info.title)||o.serviceName||"")("description",(null==o.apiDocJson||null==o.apiDocJson.info?null:o.apiDocJson.info.description)||x.bMT(1,11,"apiDocs.subtitle")),x.R7$(3),x.Y8G("variant",o.healthVariant)("label",x.bMT(4,13,"loading"===o.healthStatus?"apiHealthBanner.loading":"healthy"===o.healthStatus?"apiHealthBanner.healthy":"unhealthy"===o.healthStatus?"apiHealthBanner.unhealthyBase":"apiHealthBanner.warningDefault")),x.R7$(3),x.SpI(" ",x.bMT(7,15,"goBack")," "),x.R7$(3),x.SpI(" ",x.bMT(10,17,"apiDocs.downloadApiDoc")," "),x.R7$(2),x.Y8G("ngIf","unhealthy"===o.healthStatus),x.R7$(1),x.Y8G("ngIf",o.loading),x.R7$(1),x.Y8G("ngIf",!o.loading&&!o.hasOperations),x.R7$(1),x.Y8G("ngIf",!o.loading&&o.hasOperations),x.R7$(1),x.Y8G("ngIf",!o.loading))},dependencies:[dc.Hl,dc.$z,Jc.RG,pp.fS,hp.Ve,nd.m_,nd.An,Xc.Vg,yg.Fg,yg._L,yg.YE,Nh.uc,Nh.oV,Ny.mV,Ny.sG,od.Q8,od.Kj,Es.YN,Es.xH,Es.y7,Es.me,Es.wz,Es.BC,Es.vS,nu.bT,nu.pM,nu.YU,Ly.v,WO.d,GO.M,KO.K,zy,IT],styles:['@charset "UTF-8";[_nghost-%COMP%]{display:block}.docs-header-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-3)}.health-detail[_ngcontent-%COMP%]{margin:var(--df-space-2) 0 0}.health-detail[_ngcontent-%COMP%] .view-details-button[_ngcontent-%COMP%]{color:var(--df-danger);font-size:var(--df-font-size-xs);padding:2px var(--df-space-2);min-width:auto}.health-detail[_ngcontent-%COMP%] .unhealthy-error-details[_ngcontent-%COMP%]{margin-top:var(--df-space-2);padding:var(--df-space-2) var(--df-space-3);background-color:var(--df-code-bg);border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);white-space:pre-wrap;word-break:break-word;font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-code-text)}.docs-two-col[_ngcontent-%COMP%]{display:grid;grid-template-columns:minmax(280px,360px) minmax(0,1fr);gap:var(--df-space-5);align-items:start;margin-top:var(--df-space-5)}.docs-nav[_ngcontent-%COMP%]{position:sticky;top:var(--df-space-4);align-self:start;max-height:calc(100vh - var(--df-space-8));overflow-y:auto}.docs-nav__group[_ngcontent-%COMP%]{margin:var(--df-space-3) 0 var(--df-space-1);padding:0 var(--df-space-2)}.docs-nav[_ngcontent-%COMP%] mat-nav-list[_ngcontent-%COMP%]{padding-top:0}.docs-op[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:var(--df-space-2);min-height:var(--df-row-height);height:auto;padding-top:var(--df-space-1);padding-bottom:var(--df-space-1);border-left:3px solid transparent;border-radius:0 var(--df-radius-sm) var(--df-radius-sm) 0}.docs-op__method[_ngcontent-%COMP%]{flex:0 0 auto;width:3.6em;padding-top:.2em;font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-medium);text-transform:uppercase}.docs-op__path[_ngcontent-%COMP%]{flex:1 1 auto;min-width:0;overflow-wrap:anywhere;word-break:break-word;white-space:normal;line-height:var(--df-lh-tight);font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-text-2)}.docs-op.is-active[_ngcontent-%COMP%]{background-color:var(--df-hover);font-weight:var(--df-font-weight-medium)}.docs-op.mat-mdc-list-item[_ngcontent-%COMP%]{height:auto}.docs-op.mat-mdc-list-item[_ngcontent-%COMP%] .mdc-list-item__content{display:flex;align-items:flex-start;gap:var(--df-space-2);white-space:normal}.docs-op.mat-mdc-list-item[_ngcontent-%COMP%] .mat-mdc-list-item-unscoped-content{white-space:normal;overflow:visible;text-overflow:clip}.docs-right[_ngcontent-%COMP%]{position:sticky;top:var(--df-space-4);align-self:start;display:flex;flex-direction:column;gap:var(--df-space-4);min-width:0;max-height:calc(100vh - var(--df-space-8));overflow-y:auto}.rb[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-3);min-width:0;padding-right:var(--df-space-2)}.rb__label[_ngcontent-%COMP%]{margin:0}.rb-line[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:var(--df-space-2);padding:var(--df-space-2) var(--df-space-3);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);background-color:var(--df-surface-2)}.rb-line__method[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;height:var(--df-field-height);padding:0 var(--df-space-3);border:1px solid var(--df-border);border-radius:var(--df-radius-sm);background:var(--df-surface);font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);font-weight:var(--df-font-weight-heading);text-transform:uppercase;color:var(--df-text)}.rb-line__method.m-get[_ngcontent-%COMP%]{color:var(--df-tint-data-fg);border-color:var(--df-tint-data-fg)}.rb-line__method.m-post[_ngcontent-%COMP%]{color:var(--df-tint-security-fg);border-color:var(--df-tint-security-fg)}.rb-line__method.m-put[_ngcontent-%COMP%]{color:var(--df-tint-system-fg);border-color:var(--df-tint-system-fg)}.rb-line__method.m-patch[_ngcontent-%COMP%]{color:var(--df-tint-docs-fg);border-color:var(--df-tint-docs-fg)}.rb-line__method.m-delete[_ngcontent-%COMP%]{color:var(--df-danger);border-color:var(--df-danger)}.rb-line__path[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:2px;min-width:0;font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);color:var(--df-text-2)}.rb-seg[_ngcontent-%COMP%]{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--df-text-2)}.rb-token[_ngcontent-%COMP%]{font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);color:var(--df-accent);background:var(--df-accent-soft, var(--df-hover));border:1px solid var(--df-accent);border-radius:var(--df-radius-sm);padding:2px var(--df-space-2);max-width:100%}.rb-token[_ngcontent-%COMP%]:focus-visible{outline:none;box-shadow:var(--df-focus-ring)}.rb-token--empty[_ngcontent-%COMP%]{border-style:dashed}.rb-token--text[_ngcontent-%COMP%]{width:12rem;max-width:100%}.rb-resolved[_ngcontent-%COMP%]{margin:0;padding:var(--df-space-2) var(--df-space-3);background:var(--df-code-bg);border-radius:var(--df-radius-sm);font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);overflow-x:auto;white-space:nowrap}.rb-resolved__base[_ngcontent-%COMP%]{color:var(--df-text-muted)}.rb-resolved__path[_ngcontent-%COMP%]{color:var(--df-code-text)}.rb-hint[_ngcontent-%COMP%]{margin:0;color:var(--df-text-muted);font-size:var(--df-font-size-xs);line-height:var(--df-lh-base)}.rb-summary[_ngcontent-%COMP%]{margin:0;font-size:var(--df-font-size-sm);color:var(--df-text-2);line-height:var(--df-lh-base)}.rb-params[_ngcontent-%COMP%]{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);overflow:hidden}.rb-param[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-2);padding:var(--df-space-1) var(--df-space-2);border-bottom:1px solid var(--df-border-2)}.rb-param[_ngcontent-%COMP%]:last-child{border-bottom:none}.rb-param.is-added[_ngcontent-%COMP%]{background:var(--df-tint-data-bg, var(--df-hover))}.rb-param__add[_ngcontent-%COMP%]{flex:0 0 auto;display:inline-flex;align-items:center;gap:var(--df-space-1);padding:2px var(--df-space-2);border:1px solid var(--df-accent);border-radius:var(--df-radius-sm);background:none;color:var(--df-accent);cursor:pointer;font-size:var(--df-font-size-xs);text-transform:uppercase;letter-spacing:var(--df-tracking-eyebrow)}.rb-param__add[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.4rem;width:1.4rem;height:1.4rem}.rb-param__add[_ngcontent-%COMP%]:hover, .rb-param__add[_ngcontent-%COMP%]:focus-visible{background:var(--df-accent-soft, var(--df-hover));outline:none}.rb-param__add.is-added[_ngcontent-%COMP%]{background:var(--df-accent);border-color:var(--df-accent);color:var(--df-on-accent, var(--df-surface))}.rb-param__name[_ngcontent-%COMP%]{font-family:var(--df-font-mono);font-size:var(--df-font-size-sm);color:var(--df-text)}.rb-param__type[_ngcontent-%COMP%]{font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);color:var(--df-accent)}.rb-param__loc[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);color:var(--df-text-muted);text-transform:uppercase;letter-spacing:var(--df-tracking-eyebrow)}.rb-param__info[_ngcontent-%COMP%]{margin-left:auto;display:inline-flex;align-items:center;border:none;background:none;padding:0;color:var(--df-text-muted);cursor:help}.rb-param__info[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.5rem;width:1.5rem;height:1.5rem}.rb-ref[_ngcontent-%COMP%]{border:1px solid var(--df-border-2);border-radius:var(--df-radius-sm);padding:var(--df-space-2) var(--df-space-3)}.rb-ref__summary[_ngcontent-%COMP%]{cursor:pointer;font-size:var(--df-font-size-sm);color:var(--df-text-muted)}.rb-ref__body[_ngcontent-%COMP%]{margin-top:var(--df-space-3)}.rb-ref__prose[_ngcontent-%COMP%]{margin:0 0 var(--df-space-3);font-size:var(--df-font-size-sm);line-height:var(--df-lh-base);color:var(--df-text-2)}.docs-section-label[_ngcontent-%COMP%]{margin:var(--df-space-5) 0 var(--df-space-2)}.docs-table[_ngcontent-%COMP%]{width:100%;border-collapse:collapse;font-size:var(--df-font-size-sm)}.docs-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left;padding:var(--df-space-2) var(--df-space-3);font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-medium);text-transform:uppercase;letter-spacing:var(--df-tracking-eyebrow);color:var(--df-text-muted);border-bottom:1px solid var(--df-border)}.docs-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:var(--df-space-2) var(--df-space-3);border-bottom:1px solid var(--df-border-2);vertical-align:top;color:var(--df-text-2)}.docs-table__name[_ngcontent-%COMP%]{font-family:var(--df-font-mono);color:var(--df-text)!important}.docs-table__type[_ngcontent-%COMP%]{font-family:var(--df-font-mono);color:var(--df-accent)!important}.docs-schema[_ngcontent-%COMP%]{margin:0;padding:var(--df-space-3) var(--df-space-4);background-color:var(--df-code-bg);color:var(--df-code-text);border-radius:var(--df-radius-sm);font-family:var(--df-font-mono);font-size:var(--df-font-size-xs);overflow-x:auto}.console-card[_ngcontent-%COMP%]{border:1px solid var(--df-border);border-radius:var(--df-radius);background-color:var(--df-surface);padding:var(--df-space-3)}.m-get[_ngcontent-%COMP%]{border-left-color:var(--df-tint-data-fg)}.m-get.docs-op[_ngcontent-%COMP%]:hover{background-color:var(--df-tint-data-bg)}.m-get[_ngcontent-%COMP%] .docs-op__method[_ngcontent-%COMP%]{color:var(--df-tint-data-fg)}.m-post[_ngcontent-%COMP%]{border-left-color:var(--df-tint-security-fg)}.m-post.docs-op[_ngcontent-%COMP%]:hover{background-color:var(--df-tint-security-bg)}.m-post[_ngcontent-%COMP%] .docs-op__method[_ngcontent-%COMP%]{color:var(--df-tint-security-fg)}.m-put[_ngcontent-%COMP%]{border-left-color:var(--df-tint-system-fg)}.m-put.docs-op[_ngcontent-%COMP%]:hover{background-color:var(--df-tint-system-bg)}.m-put[_ngcontent-%COMP%] .docs-op__method[_ngcontent-%COMP%]{color:var(--df-tint-system-fg)}.m-patch[_ngcontent-%COMP%]{border-left-color:var(--df-tint-docs-fg)}.m-patch.docs-op[_ngcontent-%COMP%]:hover{background-color:var(--df-tint-docs-bg)}.m-patch[_ngcontent-%COMP%] .docs-op__method[_ngcontent-%COMP%]{color:var(--df-tint-docs-fg)}.m-delete[_ngcontent-%COMP%]{border-left-color:var(--df-danger)}.m-delete.docs-op[_ngcontent-%COMP%]:hover{background-color:var(--df-danger-soft)}.m-delete[_ngcontent-%COMP%] .docs-op__method[_ngcontent-%COMP%]{color:var(--df-danger)}.raw-spec[_ngcontent-%COMP%]{margin-top:var(--df-space-6);border-top:1px solid var(--df-border-2);padding-top:var(--df-space-4)}.raw-spec__toggle[_ngcontent-%COMP%]{color:var(--df-text-muted);font-size:var(--df-font-size-sm)}.raw-spec__body[_ngcontent-%COMP%]{margin-top:var(--df-space-3)}.expand-schema-row[_ngcontent-%COMP%]{margin:var(--df-space-4) 0 var(--df-space-2)}.expand-schema-hint[_ngcontent-%COMP%]{font-size:var(--df-font-size-xs);color:var(--df-text-muted);margin-left:var(--df-space-8)}.swagger-ui[_ngcontent-%COMP%]{margin-top:var(--df-space-4)}@media (max-width: 1100px){.docs-two-col[_ngcontent-%COMP%]{grid-template-columns:1fr}.docs-nav[_ngcontent-%COMP%], .docs-right[_ngcontent-%COMP%]{position:static;max-height:none;overflow:visible}}']})}};function Vy(e){return Array.isArray(e?.servers)?{...e,servers:e.servers.map(t=>"string"==typeof t?.url&&t.url.startsWith("/")?{...t,url:`${window.location.origin}${t.url}`}:t)}:e}xg=(0,E.Cg)([(0,$O.d)({checkProperties:!0})],xg)},56583:(v,A,n)=>{"use strict";n.d(A,{v:()=>E});var c=n(60177),p=n(17705);function y(b,w){1&b&&p.nrm(0,"span",3)}let E=(()=>{class b{constructor(){this.variant="neutral",this.label="",this.dot=!0}get variantClass(){return`df-badge--${this.variant}`}static{this.\u0275fac=function(F){return new(F||b)}}static{this.\u0275cmp=p.VBU({type:b,selectors:[["df-badge"]],inputs:{variant:"variant",label:"label",dot:"dot"},standalone:!0,features:[p.aNF],decls:4,vars:4,consts:[[1,"df-badge"],["class","df-badge__dot","aria-hidden","true",4,"ngIf"],[1,"df-badge__label"],["aria-hidden","true",1,"df-badge__dot"]],template:function(F,U){1&F&&(p.j41(0,"span",0),p.DNE(1,y,1,0,"span",1),p.j41(2,"span",2),p.EFF(3),p.k0s()()),2&F&&(p.HbH(U.variantClass),p.R7$(1),p.Y8G("ngIf",U.dot),p.R7$(2),p.JRh(U.label))},dependencies:[c.bT],styles:[".df-badge[_ngcontent-%COMP%]{--_badge-bg: var(--df-hover);--_badge-fg: var(--df-text-muted);display:inline-flex;align-items:center;gap:var(--df-space-1);padding:var(--df-space-1) var(--df-space-2);border-radius:var(--df-radius-sm);background-color:var(--_badge-bg);color:var(--_badge-fg);font-size:var(--df-font-size-xs);font-weight:var(--df-font-weight-medium);line-height:var(--df-lh-tight);white-space:nowrap;vertical-align:middle}.df-badge__dot[_ngcontent-%COMP%]{flex:0 0 auto;width:var(--df-space-2);height:var(--df-space-2);border-radius:50%;background-color:var(--_badge-fg)}.df-badge--neutral[_ngcontent-%COMP%]{--_badge-bg: var(--df-hover);--_badge-fg: var(--df-text-muted)}.df-badge--success[_ngcontent-%COMP%]{--_badge-bg: var(--df-success-soft);--_badge-fg: var(--df-success)}.df-badge--warning[_ngcontent-%COMP%]{--_badge-bg: var(--df-warning-soft);--_badge-fg: var(--df-warning)}.df-badge--danger[_ngcontent-%COMP%]{--_badge-bg: var(--df-danger-soft);--_badge-fg: var(--df-danger)}.df-badge--accent[_ngcontent-%COMP%]{--_badge-bg: var(--df-accent-soft);--_badge-fg: var(--df-accent-strong)}.df-badge--build[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-build-bg);--_badge-fg: var(--df-tint-build-fg)}.df-badge--data[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-data-bg);--_badge-fg: var(--df-tint-data-fg)}.df-badge--security[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-security-bg);--_badge-fg: var(--df-tint-security-fg)}.df-badge--system[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-system-bg);--_badge-fg: var(--df-tint-system-fg)}.df-badge--admin[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-admin-bg);--_badge-fg: var(--df-tint-admin-fg)}.df-badge--ai[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-ai-bg);--_badge-fg: var(--df-tint-ai-fg)}.df-badge--docs[_ngcontent-%COMP%]{--_badge-bg: var(--df-tint-docs-bg);--_badge-fg: var(--df-tint-docs-fg)}"]})}}return b})()},74243:(v,A,n)=>{"use strict";n.d(A,{M:()=>X});var c=n(17705),p=n(60177),y=n(88834),E=n(99213);function b(te,ue){if(1&te&&(c.j41(0,"div",5)(1,"mat-icon"),c.EFF(2),c.k0s()()),2&te){const se=c.XpG();c.R7$(2),c.JRh(se.icon)}}function w(te,ue){if(1&te&&(c.j41(0,"p",6),c.EFF(1),c.k0s()),2&te){const se=c.XpG();c.R7$(1),c.JRh(se.description)}}function R(te,ue){if(1&te&&(c.j41(0,"mat-icon"),c.EFF(1),c.k0s()),2&te){const se=c.XpG(3);c.R7$(1),c.JRh(se.actionIcon)}}function F(te,ue){if(1&te){const se=c.RV6();c.j41(0,"button",10),c.bIt("click",function(){c.eBV(se);const le=c.XpG(2);return c.Njj(le.action.emit())}),c.DNE(1,R,2,1,"mat-icon",11),c.EFF(2),c.k0s()}if(2&te){const se=c.XpG(2);c.R7$(1),c.Y8G("ngIf",se.actionIcon),c.R7$(1),c.SpI(" ",se.actionLabel," ")}}function U(te,ue){if(1&te){const se=c.RV6();c.j41(0,"button",12),c.bIt("click",function(){c.eBV(se);const le=c.XpG(2);return c.Njj(le.secondaryAction.emit())}),c.EFF(1),c.k0s()}if(2&te){const se=c.XpG(2);c.R7$(1),c.SpI(" ",se.secondaryLabel," ")}}function W(te,ue){if(1&te&&(c.j41(0,"div",7),c.DNE(1,F,3,2,"button",8),c.DNE(2,U,2,1,"button",9),c.k0s()),2&te){const se=c.XpG();c.R7$(1),c.Y8G("ngIf",se.actionLabel),c.R7$(1),c.Y8G("ngIf",se.secondaryLabel)}}const H=[[["","emptyStateIcon",""]],[["","emptyStateSnippet",""]]],ee=["[emptyStateIcon]","[emptyStateSnippet]"];let X=(()=>{class te{constructor(){this.title="",this.action=new c.bkB,this.secondaryAction=new c.bkB}static{this.\u0275fac=function(ge){return new(ge||te)}}static{this.\u0275cmp=c.VBU({type:te,selectors:[["df-empty-state"]],inputs:{icon:"icon",title:"title",description:"description",actionLabel:"actionLabel",actionIcon:"actionIcon",secondaryLabel:"secondaryLabel"},outputs:{action:"action",secondaryAction:"secondaryAction"},standalone:!0,features:[c.aNF],ngContentSelectors:ee,decls:8,vars:4,consts:[["role","status",1,"empty-state"],["class","empty-state__icon","aria-hidden","true",4,"ngIf"],[1,"empty-state__title"],["class","empty-state__description",4,"ngIf"],["class","empty-state__actions",4,"ngIf"],["aria-hidden","true",1,"empty-state__icon"],[1,"empty-state__description"],[1,"empty-state__actions"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-action",3,"click",4,"ngIf"],["mat-stroked-button","","type","button","data-testid","empty-state-secondary",3,"click",4,"ngIf"],["mat-flat-button","","color","primary","type","button","data-testid","empty-state-action",3,"click"],[4,"ngIf"],["mat-stroked-button","","type","button","data-testid","empty-state-secondary",3,"click"]],template:function(ge,le){1&ge&&(c.NAR(H),c.j41(0,"div",0),c.DNE(1,b,3,1,"div",1),c.SdG(2),c.j41(3,"h3",2),c.EFF(4),c.k0s(),c.DNE(5,w,2,1,"p",3),c.DNE(6,W,3,2,"div",4),c.SdG(7,1),c.k0s()),2&ge&&(c.R7$(1),c.Y8G("ngIf",le.icon),c.R7$(3),c.JRh(le.title),c.R7$(1),c.Y8G("ngIf",le.description),c.R7$(1),c.Y8G("ngIf",le.actionLabel||le.secondaryLabel))},dependencies:[p.bT,y.Hl,y.$z,E.m_,E.An],styles:[".empty-state[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:column;gap:var(--df-space-3);margin:0 auto;max-width:44ch;padding:var(--df-space-8) var(--df-space-5);text-align:center}.empty-state__icon[_ngcontent-%COMP%]{align-items:center;background:var(--df-accent-soft);border-radius:var(--df-radius);color:var(--df-accent);display:inline-flex;height:var(--df-space-8);justify-content:center;width:var(--df-space-8)}.empty-state__icon[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:var(--df-font-size-2xl);height:var(--df-font-size-2xl);line-height:1;width:var(--df-font-size-2xl)}.empty-state__title[_ngcontent-%COMP%]{color:var(--df-text);font-size:var(--df-font-size-lg);font-weight:var(--df-font-weight-heading);letter-spacing:var(--df-tracking-tight);line-height:var(--df-lh-tight);margin:0}.empty-state__description[_ngcontent-%COMP%]{color:var(--df-text-2);font-size:var(--df-font-size-sm);line-height:var(--df-lh-base);margin:0}.empty-state__actions[_ngcontent-%COMP%]{align-items:center;display:flex;flex-wrap:wrap;gap:var(--df-space-2);justify-content:center;margin-top:var(--df-space-1)}"],changeDetection:0})}}return te})()},13141:(v,A,n)=>{"use strict";n.d(A,{d:()=>W});var c=n(60177),p=n(33609),y=n(17705);function E(H,ee){1&H&&(y.j41(0,"div",8),y.nrm(1,"span",9),y.k0s())}function b(H,ee){1&H&&(y.j41(0,"div",10),y.nrm(1,"span",11),y.k0s())}function w(H,ee){1&H&&(y.j41(0,"div",12),y.nrm(1,"span",13)(2,"span",14)(3,"span",14)(4,"span",15),y.k0s())}function R(H,ee){1&H&&(y.j41(0,"div",16),y.nrm(1,"span",17)(2,"span",9)(3,"span",18)(4,"span",19),y.k0s())}function F(H,ee){1&H&&(y.j41(0,"div",8),y.nrm(1,"span",9),y.k0s())}function U(H,ee){if(1&H&&(y.qex(0,2),y.DNE(1,E,2,0,"div",3),y.DNE(2,b,2,0,"div",4),y.DNE(3,w,5,0,"div",5),y.DNE(4,R,5,0,"div",6),y.DNE(5,F,2,0,"div",7),y.bVm()),2&H){const X=y.XpG();y.Y8G("ngSwitch",X.variant),y.R7$(1),y.Y8G("ngSwitchCase","line"),y.R7$(1),y.Y8G("ngSwitchCase","block"),y.R7$(1),y.Y8G("ngSwitchCase","table-row"),y.R7$(1),y.Y8G("ngSwitchCase","card")}}let W=(()=>{class H{constructor(){this.variant="line",this.count=1}get items(){const X=this.count>0?Math.floor(this.count):1;return Array.from({length:X},(te,ue)=>ue)}trackByIndex(X){return X}static{this.\u0275fac=function(te){return new(te||H)}}static{this.\u0275cmp=y.VBU({type:H,selectors:[["df-skeleton"]],inputs:{variant:"variant",count:"count"},standalone:!0,features:[y.aNF],decls:3,vars:5,consts:[["role","status","aria-live","polite","aria-busy","true",1,"df-skeleton"],[3,"ngSwitch",4,"ngFor","ngForOf","ngForTrackBy"],[3,"ngSwitch"],["class","df-skeleton__unit df-skeleton__unit--line",4,"ngSwitchCase"],["class","df-skeleton__unit df-skeleton__unit--block",4,"ngSwitchCase"],["class","df-skeleton__unit df-skeleton__unit--row",4,"ngSwitchCase"],["class","df-skeleton__unit df-skeleton__unit--card",4,"ngSwitchCase"],["class","df-skeleton__unit df-skeleton__unit--line",4,"ngSwitchDefault"],[1,"df-skeleton__unit","df-skeleton__unit--line"],[1,"df-skeleton__bar","df-skeleton__bar--line"],[1,"df-skeleton__unit","df-skeleton__unit--block"],[1,"df-skeleton__bar","df-skeleton__bar--block"],[1,"df-skeleton__unit","df-skeleton__unit--row"],[1,"df-skeleton__bar","df-skeleton__bar--cell","df-skeleton__bar--wide"],[1,"df-skeleton__bar","df-skeleton__bar--cell"],[1,"df-skeleton__bar","df-skeleton__bar--cell","df-skeleton__bar--narrow"],[1,"df-skeleton__unit","df-skeleton__unit--card"],[1,"df-skeleton__bar","df-skeleton__bar--title"],[1,"df-skeleton__bar","df-skeleton__bar--line","df-skeleton__bar--short"],[1,"df-skeleton__bar","df-skeleton__bar--action"]],template:function(te,ue){1&te&&(y.j41(0,"div",0),y.nI1(1,"transloco"),y.DNE(2,U,6,5,"ng-container",1),y.k0s()),2&te&&(y.BMQ("aria-label",y.bMT(1,3,"skeleton.loading")),y.R7$(2),y.Y8G("ngForOf",ue.items)("ngForTrackBy",ue.trackByIndex))},dependencies:[c.pM,c.ux,c.e1,c.fG,p.Kj],styles:['[_nghost-%COMP%]{display:block;width:100%}.df-skeleton[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-3);width:100%}.df-skeleton__bar[_ngcontent-%COMP%]{position:relative;display:block;overflow:hidden;border-radius:var(--df-radius-sm);background-color:var(--df-skeleton-bg, var(--df-hover))}.df-skeleton__bar[_ngcontent-%COMP%]:after{content:"";position:absolute;inset:0;transform:translate(-100%);background-image:linear-gradient(90deg,transparent 0%,var(--df-skeleton-shine, var(--df-border)) 50%,transparent 100%);animation:_ngcontent-%COMP%_df-skeleton-shimmer calc(var(--df-duration-standard, .2s) * 8) var(--df-ease-standard, ease) infinite;will-change:transform}@keyframes _ngcontent-%COMP%_df-skeleton-shimmer{to{transform:translate(100%)}}.df-skeleton__bar--line[_ngcontent-%COMP%]{height:var(--df-font-size-sm, 1.3rem);width:100%}.df-skeleton__bar--short[_ngcontent-%COMP%]{width:60%}.df-skeleton__bar--title[_ngcontent-%COMP%]{height:var(--df-font-size-lg, 1.6rem);width:40%}.df-skeleton__bar--block[_ngcontent-%COMP%]{height:12rem;width:100%}.df-skeleton__bar--action[_ngcontent-%COMP%]{height:var(--df-field-height, 4rem);width:33%;border-radius:var(--df-radius)}.df-skeleton__unit--line[_ngcontent-%COMP%], .df-skeleton__unit--block[_ngcontent-%COMP%]{display:block}.df-skeleton__unit--row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:var(--df-space-4);min-height:var(--df-row-height, 3.8rem);padding:0 var(--df-space-2);border-bottom:1px solid var(--df-border-2, var(--df-border))}.df-skeleton__unit--row[_ngcontent-%COMP%] .df-skeleton__bar--cell[_ngcontent-%COMP%]{height:var(--df-font-size-sm, 1.3rem);flex:1}.df-skeleton__unit--row[_ngcontent-%COMP%] .df-skeleton__bar--wide[_ngcontent-%COMP%]{flex:2}.df-skeleton__unit--row[_ngcontent-%COMP%] .df-skeleton__bar--narrow[_ngcontent-%COMP%]{flex:0 0 15%}.df-skeleton__unit--card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--df-space-3);padding:var(--df-space-4);border:1px solid var(--df-border);border-radius:var(--df-radius);background-color:var(--df-surface)}@media (prefers-reduced-motion: reduce){.df-skeleton__bar[_ngcontent-%COMP%]:after{animation:none}}']})}}return H})()},13981:(v,A)=>{"use strict";A.byteLength=function R(X){var te=w(X),se=te[1];return 3*(te[0]+se)/4-se},A.toByteArray=function U(X){var te,ce,ue=w(X),se=ue[0],ge=ue[1],le=new p(function F(X,te,ue){return 3*(te+ue)/4-ue}(0,se,ge)),oe=0,ve=ge>0?se-4:se;for(ce=0;ce>16&255,le[oe++]=te>>8&255,le[oe++]=255&te;return 2===ge&&(te=c[X.charCodeAt(ce)]<<2|c[X.charCodeAt(ce+1)]>>4,le[oe++]=255&te),1===ge&&(te=c[X.charCodeAt(ce)]<<10|c[X.charCodeAt(ce+1)]<<4|c[X.charCodeAt(ce+2)]>>2,le[oe++]=te>>8&255,le[oe++]=255&te),le},A.fromByteArray=function ee(X){for(var te,ue=X.length,se=ue%3,ge=[],oe=0,ve=ue-se;oeve?ve:oe+16383));return 1===se?ge.push(n[(te=X[ue-1])>>2]+n[te<<4&63]+"=="):2===se&&ge.push(n[(te=(X[ue-2]<<8)+X[ue-1])>>10]+n[te>>4&63]+n[te<<2&63]+"="),ge.join("")};for(var n=[],c=[],p=typeof Uint8Array<"u"?Uint8Array:Array,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=0;E<64;++E)n[E]=y[E],c[y.charCodeAt(E)]=E;function w(X){var te=X.length;if(te%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ue=X.indexOf("=");return-1===ue&&(ue=te),[ue,ue===te?0:4-ue%4]}function W(X){return n[X>>18&63]+n[X>>12&63]+n[X>>6&63]+n[63&X]}function H(X,te,ue){for(var ge=[],le=te;le{"use strict";var c=n(3579),p={"text/plain":"Text","text/html":"Url",default:"Text"};v.exports=function b(w,R){var F,U,W,H,ee,X,te=!1;R||(R={}),F=R.debug||!1;try{if(W=c(),H=document.createRange(),ee=document.getSelection(),(X=document.createElement("span")).textContent=w,X.ariaHidden="true",X.style.all="unset",X.style.position="fixed",X.style.top=0,X.style.clip="rect(0, 0, 0, 0)",X.style.whiteSpace="pre",X.style.webkitUserSelect="text",X.style.MozUserSelect="text",X.style.msUserSelect="text",X.style.userSelect="text",X.addEventListener("copy",function(se){se.stopPropagation(),R.format&&(se.preventDefault(),typeof se.clipboardData>"u"?(F&&console.warn("unable to use e.clipboardData"),F&&console.warn("trying IE specific stuff"),window.clipboardData.clearData(),window.clipboardData.setData(p[R.format]||p.default,w)):(se.clipboardData.clearData(),se.clipboardData.setData(R.format,w))),R.onCopy&&(se.preventDefault(),R.onCopy(se.clipboardData))}),document.body.appendChild(X),H.selectNodeContents(X),ee.addRange(H),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");te=!0}catch(se){F&&console.error("unable to copy using execCommand: ",se),F&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(R.format||"text",w),R.onCopy&&R.onCopy(window.clipboardData),te=!0}catch(ge){F&&console.error("unable to copy using clipboardData: ",ge),F&&console.error("falling back to prompt"),U=function E(w){var R=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return w.replace(/#{\s*key\s*}/g,R)}("message"in R?R.message:"Copy to clipboard: #{key}, Enter"),window.prompt(U,w)}}finally{ee&&("function"==typeof ee.removeRange?ee.removeRange(H):ee.removeAllRanges()),X&&document.body.removeChild(X),W()}return te}},13306:function(v){var A;A=typeof global<"u"?global:this,v.exports=function(A){if(A.CSS&&A.CSS.escape)return A.CSS.escape;var n=function(c){if(0==arguments.length)throw new TypeError("`CSS.escape` requires an argument.");for(var b,p=String(c),y=p.length,E=-1,w="",R=p.charCodeAt(0);++E=1&&b<=31||127==b||0==E&&b>=48&&b<=57||1==E&&b>=48&&b<=57&&45==R?"\\"+b.toString(16)+" ":0==E&&1==y&&45==b||!(b>=128||45==b||95==b||b>=48&&b<=57||b>=65&&b<=90||b>=97&&b<=122)?"\\"+p.charAt(E):p.charAt(E):w+="\ufffd";return w};return A.CSS||(A.CSS={}),A.CSS.escape=n,n}(A)},58813:v=>{"use strict";var A=function(ge){return function n(se){return!!se&&"object"==typeof se}(ge)&&!function c(se){var ge=Object.prototype.toString.call(se);return"[object RegExp]"===ge||"[object Date]"===ge||function E(se){return se.$$typeof===y}(se)}(ge)},y="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function w(se,ge){return!1!==ge.clone&&ge.isMergeableObject(se)?te(function b(se){return Array.isArray(se)?[]:{}}(se),se,ge):se}function R(se,ge,le){return se.concat(ge).map(function(oe){return w(oe,le)})}function W(se){return Object.keys(se).concat(function U(se){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(se).filter(function(ge){return Object.propertyIsEnumerable.call(se,ge)}):[]}(se))}function H(se,ge){try{return ge in se}catch{return!1}}function te(se,ge,le){(le=le||{}).arrayMerge=le.arrayMerge||R,le.isMergeableObject=le.isMergeableObject||A,le.cloneUnlessOtherwiseSpecified=w;var oe=Array.isArray(ge);return oe===Array.isArray(se)?oe?le.arrayMerge(se,ge,le):function X(se,ge,le){var oe={};return le.isMergeableObject(se)&&W(se).forEach(function(ve){oe[ve]=w(se[ve],le)}),W(ge).forEach(function(ve){(function ee(se,ge){return H(se,ge)&&!(Object.hasOwnProperty.call(se,ge)&&Object.propertyIsEnumerable.call(se,ge))})(se,ve)||(oe[ve]=H(se,ve)&&le.isMergeableObject(ge[ve])?function F(se,ge){if(!ge.customMerge)return te;var le=ge.customMerge(se);return"function"==typeof le?le:te}(ve,le)(se[ve],ge[ve],le):w(ge[ve],le))}),oe}(se,ge,le):w(ge,le)}te.all=function(ge,le){if(!Array.isArray(ge))throw new Error("first argument should be an array");return ge.reduce(function(oe,ve){return te(oe,ve,le)},{})},v.exports=te},91973:function(v){v.exports=function(){"use strict";function A(dr){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(rr){return typeof rr}:function(rr){return rr&&"function"==typeof Symbol&&rr.constructor===Symbol&&rr!==Symbol.prototype?"symbol":typeof rr})(dr)}function n(dr,rr){return(n=Object.setPrototypeOf||function(Rt,Sr){return Rt.__proto__=Sr,Rt})(dr,rr)}function p(dr,rr,Or){return(p=function c(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(Sr,En,rn){var nn=[null];nn.push.apply(nn,En);var to=new(Function.bind.apply(Sr,nn));return rn&&n(to,rn.prototype),to}).apply(null,arguments)}function y(dr){return function E(dr){if(Array.isArray(dr))return R(dr)}(dr)||function b(dr){if(typeof Symbol<"u"&&null!=dr[Symbol.iterator]||null!=dr["@@iterator"])return Array.from(dr)}(dr)||function w(dr,rr){if(dr){if("string"==typeof dr)return R(dr,rr);var Or=Object.prototype.toString.call(dr).slice(8,-1);if("Object"===Or&&dr.constructor&&(Or=dr.constructor.name),"Map"===Or||"Set"===Or)return Array.from(dr);if("Arguments"===Or||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Or))return R(dr,rr)}}(dr)||function F(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(dr,rr){(null==rr||rr>dr.length)&&(rr=dr.length);for(var Or=0,Rt=new Array(rr);Or1?Or-1:0),Sr=1;Sr/gm),Pn=ue(/^data-[\-\w.\u00B7-\uFFFF]/),Dn=ue(/^aria-[\-\w]+$/),Ao=ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Mo=ue(/^(?:\w+script|data):/i),Mr=ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),mo=ue(/^html$/i);return function Uo(){var dr=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window,rr=function(st){return Uo(st)};if(rr.version="2.3.10",rr.removed=[],!dr||!dr.document||9!==dr.document.nodeType)return rr.isSupported=!1,rr;var Or=dr.document,Rt=dr.document,Sr=dr.DocumentFragment,En=dr.HTMLTemplateElement,rn=dr.Node,nn=dr.Element,po=dr.NodeFilter,to=dr.NamedNodeMap,Nr=void 0===to?dr.NamedNodeMap||dr.MozNamedAttrMap:to,wr=dr.HTMLFormElement,Ar=dr.DOMParser,$r=dr.trustedTypes,kn=nn.prototype,He=Fe(kn,"cloneNode"),$t=Fe(kn,"nextSibling"),vt=Fe(kn,"childNodes"),Kt=Fe(kn,"parentNode");if("function"==typeof En){var nr=Rt.createElement("template");nr.content&&nr.content.ownerDocument&&(Rt=nr.content.ownerDocument)}var ur=function(rr,Or){if("object"!==A(rr)||"function"!=typeof rr.createPolicy)return null;var Rt=null,Sr="data-tt-policy-suffix";Or.currentScript&&Or.currentScript.hasAttribute(Sr)&&(Rt=Or.currentScript.getAttribute(Sr));var En="dompurify"+(Rt?"#"+Rt:"");try{return rr.createPolicy(En,{createHTML:function(nn){return nn},createScriptURL:function(nn){return nn}})}catch{return console.warn("TrustedTypes policy "+En+" could not be created."),null}}($r,Or),Dr=ur?ur.createHTML(""):"",cr=Rt.implementation,zr=Rt.createNodeIterator,Kr=Rt.createDocumentFragment,An=Rt.getElementsByTagName,Jo=Or.importNode,Mi={};try{Mi=kt(Rt).documentMode?Rt.documentMode:{}}catch{}var xi={};rr.isSupported="function"==typeof Kt&&cr&&typeof cr.createHTMLDocument<"u"&&9!==Mi;var ua,ri,Yi=Rn,ki=lo,ha=Pn,la=Dn,ei=Mo,Ni=Mr,pi=Ao,$o=null,Do=Qe({},[].concat(y(gt),y(tt),y(bt),y(Nt),y(Gt))),Yr=null,Vi=Qe({},[].concat(y(Jt),y(lr),y(Cn),y(Ln))),Oo=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),qr=null,Xo=null,Ji=!0,ta=!0,yt=!1,Xt=!1,Tt=!1,ft=!1,or=!1,fn=!1,Fr=!1,ro=!1,Yt=!0,_r=!0,hn=!1,Vt={},Lr=null,si=Qe({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),zo=null,go=Qe({},["audio","video","img","source","image","track"]),Vo=null,ti=Qe({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ai="http://www.w3.org/1998/Math/MathML",ma="http://www.w3.org/2000/svg",Wo="http://www.w3.org/1999/xhtml",Ba=Wo,Ta=!1,Si=["application/xhtml+xml","text/html"],kr=null,ba=Rt.createElement("form"),hi=function(st){return st instanceof RegExp||st instanceof Function},$n=function(st){kr&&kr===st||((!st||"object"!==A(st))&&(st={}),st=kt(st),ua=ua=-1===Si.indexOf(st.PARSER_MEDIA_TYPE)?"text/html":st.PARSER_MEDIA_TYPE,ri="application/xhtml+xml"===ua?function(mr){return mr}:Ee,$o="ALLOWED_TAGS"in st?Qe({},st.ALLOWED_TAGS,ri):Do,Yr="ALLOWED_ATTR"in st?Qe({},st.ALLOWED_ATTR,ri):Vi,Vo="ADD_URI_SAFE_ATTR"in st?Qe(kt(ti),st.ADD_URI_SAFE_ATTR,ri):ti,zo="ADD_DATA_URI_TAGS"in st?Qe(kt(go),st.ADD_DATA_URI_TAGS,ri):go,Lr="FORBID_CONTENTS"in st?Qe({},st.FORBID_CONTENTS,ri):si,qr="FORBID_TAGS"in st?Qe({},st.FORBID_TAGS,ri):{},Xo="FORBID_ATTR"in st?Qe({},st.FORBID_ATTR,ri):{},Vt="USE_PROFILES"in st&&st.USE_PROFILES,Ji=!1!==st.ALLOW_ARIA_ATTR,ta=!1!==st.ALLOW_DATA_ATTR,yt=st.ALLOW_UNKNOWN_PROTOCOLS||!1,Xt=st.SAFE_FOR_TEMPLATES||!1,Tt=st.WHOLE_DOCUMENT||!1,fn=st.RETURN_DOM||!1,Fr=st.RETURN_DOM_FRAGMENT||!1,ro=st.RETURN_TRUSTED_TYPE||!1,or=st.FORCE_BODY||!1,Yt=!1!==st.SANITIZE_DOM,_r=!1!==st.KEEP_CONTENT,hn=st.IN_PLACE||!1,pi=st.ALLOWED_URI_REGEXP||pi,Ba=st.NAMESPACE||Wo,st.CUSTOM_ELEMENT_HANDLING&&hi(st.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Oo.tagNameCheck=st.CUSTOM_ELEMENT_HANDLING.tagNameCheck),st.CUSTOM_ELEMENT_HANDLING&&hi(st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Oo.attributeNameCheck=st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),st.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Oo.allowCustomizedBuiltInElements=st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Xt&&(ta=!1),Fr&&(fn=!0),Vt&&($o=Qe({},y(Gt)),Yr=[],!0===Vt.html&&(Qe($o,gt),Qe(Yr,Jt)),!0===Vt.svg&&(Qe($o,tt),Qe(Yr,lr),Qe(Yr,Ln)),!0===Vt.svgFilters&&(Qe($o,bt),Qe(Yr,lr),Qe(Yr,Ln)),!0===Vt.mathMl&&(Qe($o,Nt),Qe(Yr,Cn),Qe(Yr,Ln))),st.ADD_TAGS&&($o===Do&&($o=kt($o)),Qe($o,st.ADD_TAGS,ri)),st.ADD_ATTR&&(Yr===Vi&&(Yr=kt(Yr)),Qe(Yr,st.ADD_ATTR,ri)),st.ADD_URI_SAFE_ATTR&&Qe(Vo,st.ADD_URI_SAFE_ATTR,ri),st.FORBID_CONTENTS&&(Lr===si&&(Lr=kt(Lr)),Qe(Lr,st.FORBID_CONTENTS,ri)),_r&&($o["#text"]=!0),Tt&&Qe($o,["html","head","body"]),$o.table&&(Qe($o,["tbody"]),delete qr.tbody),te&&te(st),kr=st)},Ui=Qe({},["mi","mo","mn","ms","mtext"]),li=Qe({},["foreignobject","desc","title","annotation-xml"]),ga=Qe({},["title","style","font","a","script"]),Wi=Qe({},tt);Qe(Wi,bt),Qe(Wi,mt);var Zr=Qe({},Nt);Qe(Zr,Bt);var On=function(st){q(rr.removed,{element:st});try{st.parentNode.removeChild(st)}catch{try{st.outerHTML=Dr}catch{st.remove()}}},no=function(st,mr){try{q(rr.removed,{attribute:mr.getAttributeNode(st),from:mr})}catch{q(rr.removed,{attribute:null,from:mr})}if(mr.removeAttribute(st),"is"===st&&!Yr[st])if(fn||Fr)try{On(mr)}catch{}else try{mr.setAttribute(st,"")}catch{}},Qo=function(st){var mr,Pr;if(or)st=""+st;else{var Xn=ye(st,/^[\r\n\t ]+/);Pr=Xn&&Xn[0]}"application/xhtml+xml"===ua&&(st=''+st+"");var yi=ur?ur.createHTML(st):st;if(Ba===Wo)try{mr=(new Ar).parseFromString(yi,ua)}catch{}if(!mr||!mr.documentElement){mr=cr.createDocument(Ba,"template",null);try{mr.documentElement.innerHTML=Ta?"":yi}catch{}}var ui=mr.body||mr.documentElement;return st&&Pr&&ui.insertBefore(Rt.createTextNode(Pr),ui.childNodes[0]||null),Ba===Wo?An.call(mr,Tt?"html":"body")[0]:Tt?mr.documentElement:ui},xa=function(st){return zr.call(st.ownerDocument||st,st,po.SHOW_ELEMENT|po.SHOW_COMMENT|po.SHOW_TEXT,null,!1)},fa=function(st){return"object"===A(rn)?st instanceof rn:st&&"object"===A(st)&&"number"==typeof st.nodeType&&"string"==typeof st.nodeName},ko=function(st,mr,Pr){xi[st]&&ve(xi[st],function(Xn){Xn.call(rr,mr,Pr,kr)})},qo=function(st){var mr;if(ko("beforeSanitizeElements",st,null),function(st){return st instanceof wr&&("string"!=typeof st.nodeName||"string"!=typeof st.textContent||"function"!=typeof st.removeChild||!(st.attributes instanceof Nr)||"function"!=typeof st.removeAttribute||"function"!=typeof st.setAttribute||"string"!=typeof st.namespaceURI||"function"!=typeof st.insertBefore)}(st)||je(/[\u0080-\uFFFF]/,st.nodeName))return On(st),!0;var Pr=ri(st.nodeName);if(ko("uponSanitizeElement",st,{tagName:Pr,allowedTags:$o}),st.hasChildNodes()&&!fa(st.firstElementChild)&&(!fa(st.content)||!fa(st.content.firstElementChild))&&je(/<[/\w]/g,st.innerHTML)&&je(/<[/\w]/g,st.textContent)||"select"===Pr&&je(/