@m6d/cortex-angular 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -10
- package/fesm2022/m6d-cortex-angular.mjs +1613 -1175
- package/package.json +1 -1
- package/types/m6d-cortex-angular.d.ts +137 -56
|
@@ -24,7 +24,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
24
24
|
|
|
25
25
|
// dist/fesm2022/m6d-cortex-angular.mjs
|
|
26
26
|
import * as i0 from "@angular/core";
|
|
27
|
-
import { ChangeDetectionStrategy as ChangeDetectionStrategy2, Component, DestroyRef, Directive, EnvironmentInjector, Injectable, InjectionToken, Injector, NgZone, Pipe, TemplateRef, ViewEncapsulation as ViewEncapsulation2, afterNextRender, afterRenderEffect, computed,
|
|
27
|
+
import { ChangeDetectionStrategy as ChangeDetectionStrategy2, Component, DestroyRef, Directive, ElementRef, EnvironmentInjector, Injectable, InjectionToken, Injector, NgZone, Pipe, TemplateRef, ViewEncapsulation as ViewEncapsulation2, afterNextRender, afterRenderEffect, computed, contentChildren, createEnvironmentInjector, effect, inject, input, output, runInInjectionContext, signal, untracked, viewChild } from "@angular/core";
|
|
28
28
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
29
29
|
|
|
30
30
|
// src/internal/wire/index.ts
|
|
@@ -169,55 +169,13 @@ function createCortexApiClient(getTransport) {
|
|
|
169
169
|
resolveUrl
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
|
-
// src/internal/client
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
function parseClientToolHandshake(data, origin, embedOrigin) {
|
|
177
|
-
if (origin !== embedOrigin)
|
|
178
|
-
return null;
|
|
179
|
-
if (typeof data !== "object" || data === null)
|
|
180
|
-
return null;
|
|
181
|
-
const message = data;
|
|
182
|
-
if (message["type"] !== CLIENT_TOOL_MESSAGE_TYPE)
|
|
183
|
-
return null;
|
|
184
|
-
const status = CLIENT_TOOL_STATUSES.find((known) => known === message["status"]);
|
|
185
|
-
if (!status)
|
|
186
|
-
return null;
|
|
187
|
-
const reference = message["reference"];
|
|
188
|
-
return {
|
|
189
|
-
type: CLIENT_TOOL_MESSAGE_TYPE,
|
|
190
|
-
status,
|
|
191
|
-
...typeof reference === "string" ? { reference } : {},
|
|
192
|
-
...message["result"] !== undefined ? { result: message["result"] } : {}
|
|
193
|
-
};
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
// src/internal/client/src/chat/pending-tool-calls.ts
|
|
197
|
-
var SETTLED_STATES = new Set(["complete", "error"]);
|
|
198
|
-
function isSettledToolState(state) {
|
|
199
|
-
return SETTLED_STATES.has(state);
|
|
200
|
-
}
|
|
201
|
-
function unansweredToolCalls(messages) {
|
|
202
|
-
const parts = newestAssistantMessage(messages)?.parts ?? [];
|
|
203
|
-
return parts.filter((part) => part.type === "tool-call" && !isSettledToolState(part.state));
|
|
204
|
-
}
|
|
205
|
-
function streamingMessage(messages) {
|
|
206
|
-
const tail = messages.at(-1);
|
|
207
|
-
if (tail?.role !== "assistant")
|
|
208
|
-
return;
|
|
209
|
-
const last = tail.parts.at(-1);
|
|
210
|
-
const endsInCall = last?.type === "tool-call" || last?.type === "tool-result";
|
|
211
|
-
const allSettled = tail.parts.every((part) => part.type !== "tool-call" || isSettledToolState(part.state));
|
|
212
|
-
return endsInCall && allSettled ? undefined : tail;
|
|
213
|
-
}
|
|
214
|
-
function newestAssistantMessage(messages) {
|
|
215
|
-
for (let index = messages.length - 1;index >= 0; index -= 1) {
|
|
216
|
-
const message = messages[index];
|
|
217
|
-
if (message?.role === "assistant")
|
|
218
|
-
return message;
|
|
172
|
+
// src/internal/client/src/format/localized.ts
|
|
173
|
+
function localized(value, locale) {
|
|
174
|
+
if (value === undefined || typeof value === "string" || Array.isArray(value)) {
|
|
175
|
+
return value;
|
|
219
176
|
}
|
|
220
|
-
|
|
177
|
+
const byLocale = value;
|
|
178
|
+
return byLocale[locale] ?? byLocale.en ?? Object.values(byLocale)[0];
|
|
221
179
|
}
|
|
222
180
|
// src/internal/client/src/i18n/ar.json
|
|
223
181
|
var ar_default = {
|
|
@@ -361,17 +319,21 @@ var ar_default = {
|
|
|
361
319
|
translate_media_failed: "تعذر عرض هذا المقطع.",
|
|
362
320
|
translate_media_source: "المصدر",
|
|
363
321
|
translate_media_pending: "جارٍ الرسم",
|
|
322
|
+
translate_media_mermaid: "مخطط",
|
|
323
|
+
translate_media_vega_lite: "رسم بياني",
|
|
324
|
+
translate_media_map: "خريطة",
|
|
325
|
+
translate_media: "معاينة",
|
|
364
326
|
translate_image_unavailable: "الصورة غير متاحة",
|
|
365
327
|
translate_image_unavailable_alt: "الصورة غير متاحة: {{alt}}",
|
|
328
|
+
translate_image: "صورة",
|
|
366
329
|
translate_send: "إرسال",
|
|
367
|
-
|
|
330
|
+
translate_table: "جدول",
|
|
331
|
+
translate_expand: "توسيع {{name}}",
|
|
368
332
|
translate_table_export: "تصدير إلى Excel",
|
|
369
333
|
translate_close: "إغلاق",
|
|
370
334
|
translate_approval_needed: "بحاجة إلى موافقتك",
|
|
371
335
|
translate_approval_action: "تنفيذ {{tool}}",
|
|
372
|
-
translate_details: "التفاصيل",
|
|
373
336
|
translate_approved_failed: "تمت الموافقة لكنه فشل",
|
|
374
|
-
translate_empty_value: "(فارغ)",
|
|
375
337
|
translate_approval_cancelled: "لم يُتخذ قرار"
|
|
376
338
|
};
|
|
377
339
|
// src/internal/client/src/i18n/en.json
|
|
@@ -516,17 +478,21 @@ var en_default = {
|
|
|
516
478
|
translate_media_failed: "Could not render this block.",
|
|
517
479
|
translate_media_source: "Source",
|
|
518
480
|
translate_media_pending: "Drawing",
|
|
481
|
+
translate_media_mermaid: "Diagram",
|
|
482
|
+
translate_media_vega_lite: "Chart",
|
|
483
|
+
translate_media_map: "Map",
|
|
484
|
+
translate_media: "Preview",
|
|
519
485
|
translate_image_unavailable: "Image unavailable",
|
|
520
486
|
translate_image_unavailable_alt: "Image unavailable: {{alt}}",
|
|
487
|
+
translate_image: "Image",
|
|
521
488
|
translate_send: "Send",
|
|
522
|
-
|
|
489
|
+
translate_table: "Table",
|
|
490
|
+
translate_expand: "Expand {{name}}",
|
|
523
491
|
translate_table_export: "Export to Excel",
|
|
524
492
|
translate_close: "Close",
|
|
525
493
|
translate_approval_needed: "Needs your approval",
|
|
526
494
|
translate_approval_action: "Run {{tool}}",
|
|
527
|
-
translate_details: "Details",
|
|
528
495
|
translate_approved_failed: "Approved, but it failed",
|
|
529
|
-
translate_empty_value: "(empty)",
|
|
530
496
|
translate_approval_cancelled: "Not decided"
|
|
531
497
|
};
|
|
532
498
|
|
|
@@ -545,6 +511,69 @@ function pluralKey(count, one, other) {
|
|
|
545
511
|
return count === 1 ? one : other;
|
|
546
512
|
}
|
|
547
513
|
|
|
514
|
+
// src/internal/client/src/slots.ts
|
|
515
|
+
function landingFromHandshake(capabilities, locale, send) {
|
|
516
|
+
const takesMessages = capabilities !== undefined && capabilities.messages !== false;
|
|
517
|
+
return {
|
|
518
|
+
greeting: localized(capabilities?.greeting, locale) || translate(locale, "translate_greeting"),
|
|
519
|
+
suggestions: takesMessages && localized(capabilities.suggestions, locale) || [],
|
|
520
|
+
send: (prompt) => {
|
|
521
|
+
if (takesMessages)
|
|
522
|
+
send(prompt);
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
// src/internal/client-tools/index.ts
|
|
527
|
+
var CLIENT_TOOL_MESSAGE_TYPE = "cortex:client-tool";
|
|
528
|
+
var CLIENT_TOOL_STATUSES = ["completed", "cancelled", "failed"];
|
|
529
|
+
var REQUEST_LOCATION_TOOL = "requestLocation";
|
|
530
|
+
function parseClientToolHandshake(data, origin, embedOrigin) {
|
|
531
|
+
if (origin !== embedOrigin)
|
|
532
|
+
return null;
|
|
533
|
+
if (typeof data !== "object" || data === null)
|
|
534
|
+
return null;
|
|
535
|
+
const message = data;
|
|
536
|
+
if (message["type"] !== CLIENT_TOOL_MESSAGE_TYPE)
|
|
537
|
+
return null;
|
|
538
|
+
const status = CLIENT_TOOL_STATUSES.find((known) => known === message["status"]);
|
|
539
|
+
if (!status)
|
|
540
|
+
return null;
|
|
541
|
+
const reference = message["reference"];
|
|
542
|
+
return {
|
|
543
|
+
type: CLIENT_TOOL_MESSAGE_TYPE,
|
|
544
|
+
status,
|
|
545
|
+
...typeof reference === "string" ? { reference } : {},
|
|
546
|
+
...message["result"] !== undefined ? { result: message["result"] } : {}
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
// src/internal/client/src/chat/pending-tool-calls.ts
|
|
551
|
+
var SETTLED_STATES = new Set(["complete", "error"]);
|
|
552
|
+
function isSettledToolState(state) {
|
|
553
|
+
return SETTLED_STATES.has(state);
|
|
554
|
+
}
|
|
555
|
+
function unansweredToolCalls(messages) {
|
|
556
|
+
const parts = newestAssistantMessage(messages)?.parts ?? [];
|
|
557
|
+
return parts.filter((part) => part.type === "tool-call" && !isSettledToolState(part.state));
|
|
558
|
+
}
|
|
559
|
+
function streamingMessage(messages) {
|
|
560
|
+
const tail = messages.at(-1);
|
|
561
|
+
if (tail?.role !== "assistant")
|
|
562
|
+
return;
|
|
563
|
+
const last = tail.parts.at(-1);
|
|
564
|
+
const endsInCall = last?.type === "tool-call" || last?.type === "tool-result";
|
|
565
|
+
const allSettled = tail.parts.every((part) => part.type !== "tool-call" || isSettledToolState(part.state));
|
|
566
|
+
return endsInCall && allSettled ? undefined : tail;
|
|
567
|
+
}
|
|
568
|
+
function newestAssistantMessage(messages) {
|
|
569
|
+
for (let index = messages.length - 1;index >= 0; index -= 1) {
|
|
570
|
+
const message = messages[index];
|
|
571
|
+
if (message?.role === "assistant")
|
|
572
|
+
return message;
|
|
573
|
+
}
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
|
|
548
577
|
// src/internal/client/src/tools/tool-call-view.ts
|
|
549
578
|
var STATE_MODIFIERS = {
|
|
550
579
|
complete: "success",
|
|
@@ -682,7 +711,6 @@ function approvalCard(part, locale) {
|
|
|
682
711
|
const decision = approved === undefined ? part.state === "approval-requested" ? "pending" : "cancelled" : !approved ? "declined" : state === "error" ? "failed" : "approved";
|
|
683
712
|
return {
|
|
684
713
|
sentence: approvalPrompt(part, locale) ?? translate(locale, "translate_approval_action", { tool: wordsOf(part.name) }),
|
|
685
|
-
rows: inputRows(part.input, locale),
|
|
686
714
|
decision,
|
|
687
715
|
decisionKey: DECISION_KEYS[decision]
|
|
688
716
|
};
|
|
@@ -698,15 +726,6 @@ function wordsOf(name) {
|
|
|
698
726
|
const words = name.replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/[_\-.]+/g, " ").trim().toLowerCase();
|
|
699
727
|
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
700
728
|
}
|
|
701
|
-
function inputRows(input, locale) {
|
|
702
|
-
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
703
|
-
return [];
|
|
704
|
-
return Object.entries(input).filter(([, value]) => value !== undefined).map(([key, value]) => ({
|
|
705
|
-
key,
|
|
706
|
-
label: wordsOf(key),
|
|
707
|
-
value: value === null || value === "" ? translate(locale, "translate_empty_value") : typeof value === "string" ? value : typeof value === "number" || typeof value === "boolean" ? String(value) : JSON.stringify(value)
|
|
708
|
-
}));
|
|
709
|
-
}
|
|
710
729
|
function activityLabelKeys(activity) {
|
|
711
730
|
return Array.from({ length: STATUS_COUNT }, (_, index) => `translate_${activity}_${index}`);
|
|
712
731
|
}
|
|
@@ -2047,21 +2066,69 @@ ${source}`;
|
|
|
2047
2066
|
const violation = chartSpecViolation(spec);
|
|
2048
2067
|
if (violation)
|
|
2049
2068
|
throw new Error(violation);
|
|
2069
|
+
if (!spec || typeof spec !== "object" || Array.isArray(spec)) {
|
|
2070
|
+
throw new Error("A chart needs a JSON object.");
|
|
2071
|
+
}
|
|
2072
|
+
const chart = spec;
|
|
2050
2073
|
const [{ default: embed }, vega] = await Promise.all([import("vega-embed"), import("vega")]);
|
|
2051
2074
|
const refuse = () => Promise.reject(new Error("Charts may only use inline data."));
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2075
|
+
async function draw(width) {
|
|
2076
|
+
const drawing = document.createElement("div");
|
|
2077
|
+
const result = await embed(drawing, fitChart(chart, width), {
|
|
2078
|
+
actions: false,
|
|
2079
|
+
renderer: "svg",
|
|
2080
|
+
mode: "vega-lite",
|
|
2081
|
+
loader: { ...vega.loader(), load: refuse, sanitize: refuse },
|
|
2082
|
+
ast: true,
|
|
2083
|
+
...scheme === "dark" ? { theme: "dark" } : {},
|
|
2084
|
+
config: { background: "transparent" }
|
|
2085
|
+
});
|
|
2086
|
+
stripExternalResources(drawing);
|
|
2087
|
+
return { drawing, result, width };
|
|
2088
|
+
}
|
|
2089
|
+
let shown = await draw(host.clientWidth);
|
|
2090
|
+
host.replaceChildren(shown.drawing);
|
|
2091
|
+
let disposed = false;
|
|
2092
|
+
let refitting;
|
|
2093
|
+
let failedWidth = 0;
|
|
2094
|
+
function refit() {
|
|
2095
|
+
refitting ??= (async () => {
|
|
2096
|
+
let width = host.clientWidth;
|
|
2097
|
+
while (!disposed && width > 0 && width !== shown.width && width !== failedWidth) {
|
|
2098
|
+
try {
|
|
2099
|
+
const next = await draw(width);
|
|
2100
|
+
if (disposed) {
|
|
2101
|
+
next.result.finalize();
|
|
2102
|
+
return;
|
|
2103
|
+
}
|
|
2104
|
+
shown.result.finalize();
|
|
2105
|
+
shown = next;
|
|
2106
|
+
host.replaceChildren(next.drawing);
|
|
2107
|
+
} catch {
|
|
2108
|
+
failedWidth = width;
|
|
2109
|
+
}
|
|
2110
|
+
width = host.clientWidth;
|
|
2111
|
+
}
|
|
2112
|
+
})().finally(() => {
|
|
2113
|
+
refitting = undefined;
|
|
2114
|
+
});
|
|
2115
|
+
}
|
|
2116
|
+
const resize = new ResizeObserver(refit);
|
|
2117
|
+
if (fillsBox(chart))
|
|
2118
|
+
resize.observe(host);
|
|
2119
|
+
function liftTooltip() {
|
|
2120
|
+
const tooltip = document.getElementById(CHART_TOOLTIP_ID);
|
|
2121
|
+
const layer = host.closest("dialog") ?? document.body;
|
|
2122
|
+
if (tooltip && tooltip.parentElement !== layer)
|
|
2123
|
+
layer.append(tooltip);
|
|
2124
|
+
}
|
|
2125
|
+
host.addEventListener("pointermove", liftTooltip);
|
|
2126
|
+
return () => {
|
|
2127
|
+
disposed = true;
|
|
2128
|
+
resize.disconnect();
|
|
2129
|
+
host.removeEventListener("pointermove", liftTooltip);
|
|
2130
|
+
shown.result.finalize();
|
|
2131
|
+
};
|
|
2065
2132
|
},
|
|
2066
2133
|
async map(host, source) {
|
|
2067
2134
|
const spec = parseMapSpec(JSON.parse(source));
|
|
@@ -2077,13 +2144,16 @@ ${source}`;
|
|
|
2077
2144
|
return dispose;
|
|
2078
2145
|
}
|
|
2079
2146
|
};
|
|
2080
|
-
var
|
|
2081
|
-
mermaid: "translate_media_pending_mermaid",
|
|
2082
|
-
"vega-lite": "translate_media_pending_vega_lite",
|
|
2083
|
-
map: "translate_media_pending_map"
|
|
2147
|
+
var LABELS = {
|
|
2148
|
+
mermaid: { title: "translate_media_mermaid", pending: "translate_media_pending_mermaid" },
|
|
2149
|
+
"vega-lite": { title: "translate_media_vega_lite", pending: "translate_media_pending_vega_lite" },
|
|
2150
|
+
map: { title: "translate_media_map", pending: "translate_media_pending_map" }
|
|
2084
2151
|
};
|
|
2085
|
-
function
|
|
2086
|
-
return
|
|
2152
|
+
function mediaLabels(language) {
|
|
2153
|
+
return LABELS[language] ?? {
|
|
2154
|
+
title: "translate_media",
|
|
2155
|
+
pending: "translate_media_pending"
|
|
2156
|
+
};
|
|
2087
2157
|
}
|
|
2088
2158
|
function mediaLanguages(overrides) {
|
|
2089
2159
|
return Object.keys({ ...builtIn, ...overrides });
|
|
@@ -2116,6 +2186,35 @@ function diagramType(source) {
|
|
|
2116
2186
|
`).find((candidate) => /\S/.test(candidate) && !/^\s*%%/.test(candidate));
|
|
2117
2187
|
return /^\s*(\S+)/.exec(line ?? "")?.[1] ?? "";
|
|
2118
2188
|
}
|
|
2189
|
+
function unsized(value) {
|
|
2190
|
+
return value === undefined || value === "container";
|
|
2191
|
+
}
|
|
2192
|
+
var FACET_CHANNELS = ["row", "column", "facet"];
|
|
2193
|
+
function fillsBox(chart) {
|
|
2194
|
+
const encoding = chart["encoding"];
|
|
2195
|
+
const faceted = typeof encoding === "object" && encoding !== null && FACET_CHANNELS.some((channel) => (channel in encoding));
|
|
2196
|
+
return (("mark" in chart) || ("layer" in chart)) && unsized(chart["width"]) && !faceted;
|
|
2197
|
+
}
|
|
2198
|
+
function withoutContainerSizes(chart) {
|
|
2199
|
+
const own = { ...chart };
|
|
2200
|
+
if (unsized(own["width"]))
|
|
2201
|
+
delete own["width"];
|
|
2202
|
+
if (unsized(own["height"]))
|
|
2203
|
+
delete own["height"];
|
|
2204
|
+
return own;
|
|
2205
|
+
}
|
|
2206
|
+
function fitChart(chart, width) {
|
|
2207
|
+
const own = withoutContainerSizes(chart);
|
|
2208
|
+
if (width <= 0 || !fillsBox(chart))
|
|
2209
|
+
return own;
|
|
2210
|
+
return {
|
|
2211
|
+
...own,
|
|
2212
|
+
width,
|
|
2213
|
+
height: own["height"] ?? Math.round(Math.min(480, Math.max(200, width / 2))),
|
|
2214
|
+
autosize: own["autosize"] ?? { type: "fit", contains: "padding" }
|
|
2215
|
+
};
|
|
2216
|
+
}
|
|
2217
|
+
var CHART_TOOLTIP_ID = "vg-tooltip-element";
|
|
2119
2218
|
var mermaidQueue = Promise.resolve();
|
|
2120
2219
|
var mermaidReady = false;
|
|
2121
2220
|
var counter = 0;
|
|
@@ -2306,14 +2405,6 @@ function prettyJsonText(value) {
|
|
|
2306
2405
|
return value;
|
|
2307
2406
|
}
|
|
2308
2407
|
}
|
|
2309
|
-
// src/internal/client/src/format/localized.ts
|
|
2310
|
-
function localized(value, locale) {
|
|
2311
|
-
if (value === undefined || typeof value === "string" || Array.isArray(value)) {
|
|
2312
|
-
return value;
|
|
2313
|
-
}
|
|
2314
|
-
const byLocale = value;
|
|
2315
|
-
return byLocale[locale] ?? byLocale.en ?? Object.values(byLocale)[0];
|
|
2316
|
-
}
|
|
2317
2408
|
// src/internal/client/src/format/time-label.ts
|
|
2318
2409
|
function timeLabel(iso, locale, now = Date.now()) {
|
|
2319
2410
|
const at = new Date(iso);
|
|
@@ -3700,15 +3791,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3700
3791
|
}] }
|
|
3701
3792
|
});
|
|
3702
3793
|
var ChatHeaderComponent = class ChatHeaderComponent2 {
|
|
3703
|
-
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
newChat = output();
|
|
3708
|
-
config = inject(CORTEX_CONFIG);
|
|
3709
|
-
chatService = inject(CortexChatService);
|
|
3710
|
-
locale = inject(CORTEX_LOCALE);
|
|
3711
|
-
agentName = computed(() => localized(this.config().agentName, this.locale()), ...ngDevMode ? [{ debugName: "agentName" }] : []);
|
|
3794
|
+
context = input.required(...ngDevMode ? [{ debugName: "context" }] : []);
|
|
3795
|
+
countKey(count2) {
|
|
3796
|
+
return pluralKey(count2, "translate_one_conversation", "translate_n_conversations");
|
|
3797
|
+
}
|
|
3712
3798
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
3713
3799
|
minVersion: "12.0.0",
|
|
3714
3800
|
version: "22.2.0",
|
|
@@ -3723,82 +3809,131 @@ var ChatHeaderComponent = class ChatHeaderComponent2 {
|
|
|
3723
3809
|
type: ChatHeaderComponent2,
|
|
3724
3810
|
isStandalone: true,
|
|
3725
3811
|
selector: "cortex-chat-header",
|
|
3726
|
-
inputs: {
|
|
3727
|
-
classPropertyName: "
|
|
3728
|
-
publicName: "
|
|
3812
|
+
inputs: { context: {
|
|
3813
|
+
classPropertyName: "context",
|
|
3814
|
+
publicName: "context",
|
|
3729
3815
|
isSignal: true,
|
|
3730
3816
|
isRequired: true,
|
|
3731
3817
|
transformFunction: null
|
|
3732
3818
|
} },
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
newChat: "newChat"
|
|
3738
|
-
},
|
|
3739
|
-
host: { classAttribute: "cortex-widget__chat-header" },
|
|
3819
|
+
host: { properties: {
|
|
3820
|
+
"class.cortex-widget__chat-header": "context().screen === 'chat'",
|
|
3821
|
+
"class.cortex-widget__threads-header": "context().screen === 'threads'"
|
|
3822
|
+
} },
|
|
3740
3823
|
ngImport: i0,
|
|
3741
|
-
template:
|
|
3742
|
-
<button (click)="toggleSidebar.emit()" class="cortex-widget__sidebar-toggle-btn">
|
|
3743
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
3744
|
-
<path
|
|
3745
|
-
d="M2.5 4h11M2.5 8h11M2.5 12h11"
|
|
3746
|
-
stroke="currentColor"
|
|
3747
|
-
stroke-width="1.4"
|
|
3748
|
-
stroke-linecap="round"
|
|
3749
|
-
/>
|
|
3750
|
-
</svg>
|
|
3751
|
-
</button>
|
|
3824
|
+
template: `@let header = context();
|
|
3752
3825
|
|
|
3753
|
-
<
|
|
3754
|
-
<
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3826
|
+
<ng-template #newChatButton>
|
|
3827
|
+
<button
|
|
3828
|
+
type="button"
|
|
3829
|
+
(click)="header.newChat()"
|
|
3830
|
+
[attr.aria-label]="'translate_new_chat' | translate"
|
|
3831
|
+
[title]="'translate_new_chat' | translate"
|
|
3832
|
+
class="cortex-widget__header-btn cortex-widget__new-btn"
|
|
3833
|
+
>
|
|
3834
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
3835
|
+
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
|
3836
|
+
</svg>
|
|
3837
|
+
</button>
|
|
3838
|
+
</ng-template>
|
|
3758
3839
|
|
|
3759
|
-
@if (
|
|
3840
|
+
@if (header.screen === 'threads') {
|
|
3841
|
+
<!-- Back to chat (helper mode; full mode hides it, the sidebar is always visible) -->
|
|
3760
3842
|
<button
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
[
|
|
3764
|
-
|
|
3843
|
+
type="button"
|
|
3844
|
+
(click)="header.closeHistory()"
|
|
3845
|
+
[attr.aria-label]="'translate_back' | translate"
|
|
3846
|
+
class="cortex-widget__header-btn cortex-widget__back-btn"
|
|
3765
3847
|
>
|
|
3766
|
-
|
|
3848
|
+
<svg
|
|
3849
|
+
width="14"
|
|
3850
|
+
height="14"
|
|
3851
|
+
viewBox="0 0 16 16"
|
|
3852
|
+
fill="none"
|
|
3853
|
+
aria-hidden="true"
|
|
3854
|
+
class="cortex-widget__back-icon"
|
|
3855
|
+
>
|
|
3856
|
+
<path
|
|
3857
|
+
d="M10 3L5 8l5 5"
|
|
3858
|
+
stroke="currentColor"
|
|
3859
|
+
stroke-width="1.5"
|
|
3860
|
+
stroke-linecap="round"
|
|
3861
|
+
stroke-linejoin="round"
|
|
3862
|
+
/>
|
|
3863
|
+
</svg>
|
|
3767
3864
|
</button>
|
|
3768
|
-
}
|
|
3769
3865
|
|
|
3770
|
-
<
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
>
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3866
|
+
<div>
|
|
3867
|
+
<h2 class="cortex-widget__threads-title">
|
|
3868
|
+
{{ 'translate_history' | translate }}
|
|
3869
|
+
</h2>
|
|
3870
|
+
<p class="cortex-widget__threads-count">
|
|
3871
|
+
{{ countKey(header.threadCount) | translate: { count: header.threadCount } }}
|
|
3872
|
+
</p>
|
|
3873
|
+
</div>
|
|
3874
|
+
<ng-container *ngTemplateOutlet="newChatButton" />
|
|
3875
|
+
} @else {
|
|
3876
|
+
<!-- Sidebar toggle (full mode, small screens) -->
|
|
3877
|
+
<button (click)="header.openHistory()" class="cortex-widget__sidebar-toggle-btn">
|
|
3878
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
3879
|
+
<path
|
|
3880
|
+
d="M2.5 4h11M2.5 8h11M2.5 12h11"
|
|
3881
|
+
stroke="currentColor"
|
|
3882
|
+
stroke-width="1.4"
|
|
3883
|
+
stroke-linecap="round"
|
|
3884
|
+
/>
|
|
3885
|
+
</svg>
|
|
3886
|
+
</button>
|
|
3781
3887
|
|
|
3782
|
-
<
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3888
|
+
<div class="cortex-widget__chat-title-wrap">
|
|
3889
|
+
<p class="cortex-widget__chat-title">
|
|
3890
|
+
{{ header.title ?? header.agentName ?? ('translate_new_chat' | translate) }}
|
|
3891
|
+
</p>
|
|
3892
|
+
</div>
|
|
3893
|
+
|
|
3894
|
+
@if (header.debug.shown) {
|
|
3895
|
+
<button
|
|
3896
|
+
(click)="header.toggleDebug()"
|
|
3897
|
+
class="cortex-widget__debug-btn"
|
|
3898
|
+
[class.cortex-widget__debug-btn--on]="header.debug.on"
|
|
3899
|
+
[class.cortex-widget__debug-btn--off]="!header.debug.on"
|
|
3900
|
+
>
|
|
3901
|
+
{{ header.debug.on ? ('translate_debug' | translate) : ('translate_normal' | translate) }}
|
|
3902
|
+
</button>
|
|
3903
|
+
}
|
|
3904
|
+
|
|
3905
|
+
<ng-container *ngTemplateOutlet="newChatButton" />
|
|
3906
|
+
|
|
3907
|
+
<button
|
|
3908
|
+
type="button"
|
|
3909
|
+
(click)="header.openHistory()"
|
|
3910
|
+
[attr.aria-label]="'translate_history' | translate"
|
|
3911
|
+
[title]="'translate_history' | translate"
|
|
3912
|
+
class="cortex-widget__header-btn cortex-widget__history-btn"
|
|
3913
|
+
>
|
|
3914
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
3915
|
+
<circle cx="8" cy="8" r="5.75" stroke="currentColor" stroke-width="1.3" />
|
|
3916
|
+
<path
|
|
3917
|
+
d="M8 5v3l2 1.5"
|
|
3918
|
+
stroke="currentColor"
|
|
3919
|
+
stroke-width="1.3"
|
|
3920
|
+
stroke-linecap="round"
|
|
3921
|
+
stroke-linejoin="round"
|
|
3922
|
+
/>
|
|
3923
|
+
</svg>
|
|
3924
|
+
</button>
|
|
3925
|
+
}
|
|
3800
3926
|
`,
|
|
3801
3927
|
dependencies: [{
|
|
3928
|
+
kind: "directive",
|
|
3929
|
+
type: NgTemplateOutlet,
|
|
3930
|
+
selector: "[ngTemplateOutlet]",
|
|
3931
|
+
inputs: [
|
|
3932
|
+
"ngTemplateOutletContext",
|
|
3933
|
+
"ngTemplateOutlet",
|
|
3934
|
+
"ngTemplateOutletInjector"
|
|
3935
|
+
]
|
|
3936
|
+
}, {
|
|
3802
3937
|
kind: "pipe",
|
|
3803
3938
|
type: TranslatePipe,
|
|
3804
3939
|
name: "translate"
|
|
@@ -3816,111 +3951,130 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
3816
3951
|
type: Component,
|
|
3817
3952
|
args: [{
|
|
3818
3953
|
selector: "cortex-chat-header",
|
|
3819
|
-
imports: [TranslatePipe],
|
|
3954
|
+
imports: [NgTemplateOutlet, TranslatePipe],
|
|
3820
3955
|
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
3821
3956
|
encapsulation: ViewEncapsulation2.None,
|
|
3822
|
-
host: {
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
d="M2.5 4h11M2.5 8h11M2.5 12h11"
|
|
3828
|
-
stroke="currentColor"
|
|
3829
|
-
stroke-width="1.4"
|
|
3830
|
-
stroke-linecap="round"
|
|
3831
|
-
/>
|
|
3832
|
-
</svg>
|
|
3833
|
-
</button>
|
|
3834
|
-
|
|
3835
|
-
<div class="cortex-widget__chat-title-wrap">
|
|
3836
|
-
<p class="cortex-widget__chat-title">
|
|
3837
|
-
{{ chatService.selectedThread()?.title ?? agentName() ?? ('translate_new_chat' | translate) }}
|
|
3838
|
-
</p>
|
|
3839
|
-
</div>
|
|
3957
|
+
host: {
|
|
3958
|
+
"[class.cortex-widget__chat-header]": "context().screen === 'chat'",
|
|
3959
|
+
"[class.cortex-widget__threads-header]": "context().screen === 'threads'"
|
|
3960
|
+
},
|
|
3961
|
+
template: `@let header = context();
|
|
3840
3962
|
|
|
3841
|
-
|
|
3963
|
+
<ng-template #newChatButton>
|
|
3842
3964
|
<button
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
[
|
|
3846
|
-
[
|
|
3965
|
+
type="button"
|
|
3966
|
+
(click)="header.newChat()"
|
|
3967
|
+
[attr.aria-label]="'translate_new_chat' | translate"
|
|
3968
|
+
[title]="'translate_new_chat' | translate"
|
|
3969
|
+
class="cortex-widget__header-btn cortex-widget__new-btn"
|
|
3847
3970
|
>
|
|
3848
|
-
|
|
3971
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
3972
|
+
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
|
3973
|
+
</svg>
|
|
3849
3974
|
</button>
|
|
3850
|
-
|
|
3975
|
+
</ng-template>
|
|
3851
3976
|
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
<
|
|
3861
|
-
|
|
3862
|
-
|
|
3977
|
+
@if (header.screen === 'threads') {
|
|
3978
|
+
<!-- Back to chat (helper mode; full mode hides it, the sidebar is always visible) -->
|
|
3979
|
+
<button
|
|
3980
|
+
type="button"
|
|
3981
|
+
(click)="header.closeHistory()"
|
|
3982
|
+
[attr.aria-label]="'translate_back' | translate"
|
|
3983
|
+
class="cortex-widget__header-btn cortex-widget__back-btn"
|
|
3984
|
+
>
|
|
3985
|
+
<svg
|
|
3986
|
+
width="14"
|
|
3987
|
+
height="14"
|
|
3988
|
+
viewBox="0 0 16 16"
|
|
3989
|
+
fill="none"
|
|
3990
|
+
aria-hidden="true"
|
|
3991
|
+
class="cortex-widget__back-icon"
|
|
3992
|
+
>
|
|
3993
|
+
<path
|
|
3994
|
+
d="M10 3L5 8l5 5"
|
|
3995
|
+
stroke="currentColor"
|
|
3996
|
+
stroke-width="1.5"
|
|
3997
|
+
stroke-linecap="round"
|
|
3998
|
+
stroke-linejoin="round"
|
|
3999
|
+
/>
|
|
4000
|
+
</svg>
|
|
4001
|
+
</button>
|
|
3863
4002
|
|
|
3864
|
-
<
|
|
3865
|
-
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
>
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3875
|
-
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
3881
|
-
|
|
4003
|
+
<div>
|
|
4004
|
+
<h2 class="cortex-widget__threads-title">
|
|
4005
|
+
{{ 'translate_history' | translate }}
|
|
4006
|
+
</h2>
|
|
4007
|
+
<p class="cortex-widget__threads-count">
|
|
4008
|
+
{{ countKey(header.threadCount) | translate: { count: header.threadCount } }}
|
|
4009
|
+
</p>
|
|
4010
|
+
</div>
|
|
4011
|
+
<ng-container *ngTemplateOutlet="newChatButton" />
|
|
4012
|
+
} @else {
|
|
4013
|
+
<!-- Sidebar toggle (full mode, small screens) -->
|
|
4014
|
+
<button (click)="header.openHistory()" class="cortex-widget__sidebar-toggle-btn">
|
|
4015
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none">
|
|
4016
|
+
<path
|
|
4017
|
+
d="M2.5 4h11M2.5 8h11M2.5 12h11"
|
|
4018
|
+
stroke="currentColor"
|
|
4019
|
+
stroke-width="1.4"
|
|
4020
|
+
stroke-linecap="round"
|
|
4021
|
+
/>
|
|
4022
|
+
</svg>
|
|
4023
|
+
</button>
|
|
4024
|
+
|
|
4025
|
+
<div class="cortex-widget__chat-title-wrap">
|
|
4026
|
+
<p class="cortex-widget__chat-title">
|
|
4027
|
+
{{ header.title ?? header.agentName ?? ('translate_new_chat' | translate) }}
|
|
4028
|
+
</p>
|
|
4029
|
+
</div>
|
|
4030
|
+
|
|
4031
|
+
@if (header.debug.shown) {
|
|
4032
|
+
<button
|
|
4033
|
+
(click)="header.toggleDebug()"
|
|
4034
|
+
class="cortex-widget__debug-btn"
|
|
4035
|
+
[class.cortex-widget__debug-btn--on]="header.debug.on"
|
|
4036
|
+
[class.cortex-widget__debug-btn--off]="!header.debug.on"
|
|
4037
|
+
>
|
|
4038
|
+
{{ header.debug.on ? ('translate_debug' | translate) : ('translate_normal' | translate) }}
|
|
4039
|
+
</button>
|
|
4040
|
+
}
|
|
4041
|
+
|
|
4042
|
+
<ng-container *ngTemplateOutlet="newChatButton" />
|
|
4043
|
+
|
|
4044
|
+
<button
|
|
4045
|
+
type="button"
|
|
4046
|
+
(click)="header.openHistory()"
|
|
4047
|
+
[attr.aria-label]="'translate_history' | translate"
|
|
4048
|
+
[title]="'translate_history' | translate"
|
|
4049
|
+
class="cortex-widget__header-btn cortex-widget__history-btn"
|
|
4050
|
+
>
|
|
4051
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
4052
|
+
<circle cx="8" cy="8" r="5.75" stroke="currentColor" stroke-width="1.3" />
|
|
4053
|
+
<path
|
|
4054
|
+
d="M8 5v3l2 1.5"
|
|
4055
|
+
stroke="currentColor"
|
|
4056
|
+
stroke-width="1.3"
|
|
4057
|
+
stroke-linecap="round"
|
|
4058
|
+
stroke-linejoin="round"
|
|
4059
|
+
/>
|
|
4060
|
+
</svg>
|
|
4061
|
+
</button>
|
|
4062
|
+
}
|
|
3882
4063
|
`
|
|
3883
4064
|
}]
|
|
3884
4065
|
}],
|
|
3885
|
-
propDecorators: {
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
required: true
|
|
3892
|
-
}]
|
|
3893
|
-
}],
|
|
3894
|
-
toggleSidebar: [{
|
|
3895
|
-
type: i0.Output,
|
|
3896
|
-
args: ["toggleSidebar"]
|
|
3897
|
-
}],
|
|
3898
|
-
toggleDebug: [{
|
|
3899
|
-
type: i0.Output,
|
|
3900
|
-
args: ["toggleDebug"]
|
|
3901
|
-
}],
|
|
3902
|
-
openHistory: [{
|
|
3903
|
-
type: i0.Output,
|
|
3904
|
-
args: ["openHistory"]
|
|
3905
|
-
}],
|
|
3906
|
-
newChat: [{
|
|
3907
|
-
type: i0.Output,
|
|
3908
|
-
args: ["newChat"]
|
|
4066
|
+
propDecorators: { context: [{
|
|
4067
|
+
type: i0.Input,
|
|
4068
|
+
args: [{
|
|
4069
|
+
isSignal: true,
|
|
4070
|
+
alias: "context",
|
|
4071
|
+
required: true
|
|
3909
4072
|
}]
|
|
3910
|
-
}
|
|
4073
|
+
}] }
|
|
3911
4074
|
});
|
|
3912
4075
|
var ChatLandingComponent = class ChatLandingComponent2 {
|
|
3913
|
-
|
|
3914
|
-
chatService = inject(CortexChatService);
|
|
3915
|
-
threadService = inject(CortexThreadService);
|
|
4076
|
+
context = input.required(...ngDevMode ? [{ debugName: "context" }] : []);
|
|
3916
4077
|
locale = inject(CORTEX_LOCALE);
|
|
3917
|
-
greeting = computed(() => localized(this.chatService.capabilities()?.greeting, this.locale()) || null, ...ngDevMode ? [{ debugName: "greeting" }] : []);
|
|
3918
|
-
suggestions = computed(() => localized(this.chatService.capabilities()?.suggestions, this.locale()), ...ngDevMode ? [{ debugName: "suggestions" }] : []);
|
|
3919
|
-
ready = computed(() => this.chatService.capabilities() !== undefined, ...ngDevMode ? [{ debugName: "ready" }] : []);
|
|
3920
|
-
headless = computed(() => this.chatService.capabilities()?.messages === false, ...ngDevMode ? [{ debugName: "headless" }] : []);
|
|
3921
|
-
sendSuggestion(suggestion) {
|
|
3922
|
-
this.chatService.send(suggestion.prompt).subscribe();
|
|
3923
|
-
}
|
|
3924
4078
|
relativeTime(iso) {
|
|
3925
4079
|
return timeLabel(iso, this.locale());
|
|
3926
4080
|
}
|
|
@@ -3938,10 +4092,18 @@ var ChatLandingComponent = class ChatLandingComponent2 {
|
|
|
3938
4092
|
type: ChatLandingComponent2,
|
|
3939
4093
|
isStandalone: true,
|
|
3940
4094
|
selector: "cortex-chat-landing",
|
|
3941
|
-
|
|
4095
|
+
inputs: { context: {
|
|
4096
|
+
classPropertyName: "context",
|
|
4097
|
+
publicName: "context",
|
|
4098
|
+
isSignal: true,
|
|
4099
|
+
isRequired: true,
|
|
4100
|
+
transformFunction: null
|
|
4101
|
+
} },
|
|
3942
4102
|
host: { classAttribute: "cortex-widget__landing" },
|
|
3943
4103
|
ngImport: i0,
|
|
3944
|
-
template:
|
|
4104
|
+
template: `@let landing = context();
|
|
4105
|
+
|
|
4106
|
+
<div class="cortex-widget__landing-icon">
|
|
3945
4107
|
<svg width="18" height="18" viewBox="0 0 16 16" fill="none">
|
|
3946
4108
|
<!-- Rounded speech bubble with a tail, on the shared 16x16 icon grid. -->
|
|
3947
4109
|
<path
|
|
@@ -3954,16 +4116,14 @@ var ChatLandingComponent = class ChatLandingComponent2 {
|
|
|
3954
4116
|
</svg>
|
|
3955
4117
|
</div>
|
|
3956
4118
|
|
|
3957
|
-
<p class="cortex-widget__landing-greeting">
|
|
3958
|
-
{{ greeting() ?? ('translate_greeting' | translate) }}
|
|
3959
|
-
</p>
|
|
4119
|
+
<p class="cortex-widget__landing-greeting">{{ landing.greeting }}</p>
|
|
3960
4120
|
|
|
3961
|
-
@if (
|
|
4121
|
+
@if (landing.suggestions.length) {
|
|
3962
4122
|
<div class="cortex-widget__landing-chips">
|
|
3963
|
-
@for (suggestion of suggestions
|
|
4123
|
+
@for (suggestion of landing.suggestions; track $index) {
|
|
3964
4124
|
<button
|
|
3965
4125
|
type="button"
|
|
3966
|
-
(click)="
|
|
4126
|
+
(click)="landing.send(suggestion.prompt)"
|
|
3967
4127
|
class="cortex-widget__landing-chip"
|
|
3968
4128
|
>
|
|
3969
4129
|
{{ suggestion.title }}
|
|
@@ -3972,19 +4132,15 @@ var ChatLandingComponent = class ChatLandingComponent2 {
|
|
|
3972
4132
|
</div>
|
|
3973
4133
|
}
|
|
3974
4134
|
|
|
3975
|
-
|
|
3976
|
-
<p class="cortex-widget__messages-disabled">{{ 'translate_messages_disabled' | translate }}</p>
|
|
3977
|
-
} @else if (ready()) {
|
|
3978
|
-
<cortex-chat-composer />
|
|
3979
|
-
}
|
|
4135
|
+
<ng-container *ngTemplateOutlet="landing.composer" />
|
|
3980
4136
|
|
|
3981
|
-
@let recentThreads =
|
|
4137
|
+
@let recentThreads = landing.threads?.slice(0, 2);
|
|
3982
4138
|
@if (recentThreads?.length) {
|
|
3983
4139
|
<div class="cortex-widget__landing-recent">
|
|
3984
4140
|
@for (thread of recentThreads; track thread.id) {
|
|
3985
4141
|
<button
|
|
3986
4142
|
type="button"
|
|
3987
|
-
(click)="
|
|
4143
|
+
(click)="landing.openThread(thread)"
|
|
3988
4144
|
class="cortex-widget__landing-recent-item"
|
|
3989
4145
|
>
|
|
3990
4146
|
<p class="cortex-widget__landing-recent-title">
|
|
@@ -4000,9 +4156,14 @@ var ChatLandingComponent = class ChatLandingComponent2 {
|
|
|
4000
4156
|
}
|
|
4001
4157
|
`,
|
|
4002
4158
|
dependencies: [{
|
|
4003
|
-
kind: "
|
|
4004
|
-
type:
|
|
4005
|
-
selector: "
|
|
4159
|
+
kind: "directive",
|
|
4160
|
+
type: NgTemplateOutlet,
|
|
4161
|
+
selector: "[ngTemplateOutlet]",
|
|
4162
|
+
inputs: [
|
|
4163
|
+
"ngTemplateOutletContext",
|
|
4164
|
+
"ngTemplateOutlet",
|
|
4165
|
+
"ngTemplateOutletInjector"
|
|
4166
|
+
]
|
|
4006
4167
|
}, {
|
|
4007
4168
|
kind: "pipe",
|
|
4008
4169
|
type: TranslatePipe,
|
|
@@ -4021,11 +4182,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4021
4182
|
type: Component,
|
|
4022
4183
|
args: [{
|
|
4023
4184
|
selector: "cortex-chat-landing",
|
|
4024
|
-
imports: [
|
|
4185
|
+
imports: [NgTemplateOutlet, TranslatePipe],
|
|
4025
4186
|
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
4026
4187
|
encapsulation: ViewEncapsulation2.None,
|
|
4027
4188
|
host: { class: "cortex-widget__landing" },
|
|
4028
|
-
template:
|
|
4189
|
+
template: `@let landing = context();
|
|
4190
|
+
|
|
4191
|
+
<div class="cortex-widget__landing-icon">
|
|
4029
4192
|
<svg width="18" height="18" viewBox="0 0 16 16" fill="none">
|
|
4030
4193
|
<!-- Rounded speech bubble with a tail, on the shared 16x16 icon grid. -->
|
|
4031
4194
|
<path
|
|
@@ -4038,16 +4201,14 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4038
4201
|
</svg>
|
|
4039
4202
|
</div>
|
|
4040
4203
|
|
|
4041
|
-
<p class="cortex-widget__landing-greeting">
|
|
4042
|
-
{{ greeting() ?? ('translate_greeting' | translate) }}
|
|
4043
|
-
</p>
|
|
4204
|
+
<p class="cortex-widget__landing-greeting">{{ landing.greeting }}</p>
|
|
4044
4205
|
|
|
4045
|
-
@if (
|
|
4206
|
+
@if (landing.suggestions.length) {
|
|
4046
4207
|
<div class="cortex-widget__landing-chips">
|
|
4047
|
-
@for (suggestion of suggestions
|
|
4208
|
+
@for (suggestion of landing.suggestions; track $index) {
|
|
4048
4209
|
<button
|
|
4049
4210
|
type="button"
|
|
4050
|
-
(click)="
|
|
4211
|
+
(click)="landing.send(suggestion.prompt)"
|
|
4051
4212
|
class="cortex-widget__landing-chip"
|
|
4052
4213
|
>
|
|
4053
4214
|
{{ suggestion.title }}
|
|
@@ -4056,19 +4217,15 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4056
4217
|
</div>
|
|
4057
4218
|
}
|
|
4058
4219
|
|
|
4059
|
-
|
|
4060
|
-
<p class="cortex-widget__messages-disabled">{{ 'translate_messages_disabled' | translate }}</p>
|
|
4061
|
-
} @else if (ready()) {
|
|
4062
|
-
<cortex-chat-composer />
|
|
4063
|
-
}
|
|
4220
|
+
<ng-container *ngTemplateOutlet="landing.composer" />
|
|
4064
4221
|
|
|
4065
|
-
@let recentThreads =
|
|
4222
|
+
@let recentThreads = landing.threads?.slice(0, 2);
|
|
4066
4223
|
@if (recentThreads?.length) {
|
|
4067
4224
|
<div class="cortex-widget__landing-recent">
|
|
4068
4225
|
@for (thread of recentThreads; track thread.id) {
|
|
4069
4226
|
<button
|
|
4070
4227
|
type="button"
|
|
4071
|
-
(click)="
|
|
4228
|
+
(click)="landing.openThread(thread)"
|
|
4072
4229
|
class="cortex-widget__landing-recent-item"
|
|
4073
4230
|
>
|
|
4074
4231
|
<p class="cortex-widget__landing-recent-title">
|
|
@@ -4085,9 +4242,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
4085
4242
|
`
|
|
4086
4243
|
}]
|
|
4087
4244
|
}],
|
|
4088
|
-
propDecorators: {
|
|
4089
|
-
type: i0.
|
|
4090
|
-
args: [
|
|
4245
|
+
propDecorators: { context: [{
|
|
4246
|
+
type: i0.Input,
|
|
4247
|
+
args: [{
|
|
4248
|
+
isSignal: true,
|
|
4249
|
+
alias: "context",
|
|
4250
|
+
required: true
|
|
4251
|
+
}]
|
|
4091
4252
|
}] }
|
|
4092
4253
|
});
|
|
4093
4254
|
var CopyButtonComponent = class CopyButtonComponent2 {
|
|
@@ -5270,95 +5431,141 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5270
5431
|
args: [{ name: "marked" }]
|
|
5271
5432
|
}]
|
|
5272
5433
|
});
|
|
5273
|
-
var
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
this.url.set(undefined);
|
|
5287
|
-
this.failed.set(false);
|
|
5288
|
-
});
|
|
5289
|
-
this.api.downloadAttachment(id).then(({ blob }) => {
|
|
5290
|
-
if (cancelled)
|
|
5291
|
-
return;
|
|
5292
|
-
objectUrl = URL.createObjectURL(blob);
|
|
5293
|
-
this.url.set(objectUrl);
|
|
5294
|
-
}, () => {
|
|
5295
|
-
if (!cancelled)
|
|
5296
|
-
this.failed.set(true);
|
|
5297
|
-
});
|
|
5298
|
-
onCleanup(() => {
|
|
5299
|
-
cancelled = true;
|
|
5300
|
-
if (objectUrl)
|
|
5301
|
-
URL.revokeObjectURL(objectUrl);
|
|
5302
|
-
});
|
|
5303
|
-
});
|
|
5434
|
+
var ExpandableComponent = class ExpandableComponent2 {
|
|
5435
|
+
label = input.required(...ngDevMode ? [{ debugName: "label" }] : []);
|
|
5436
|
+
ready = input(true, ...ngDevMode ? [{ debugName: "ready" }] : []);
|
|
5437
|
+
actions = input(...ngDevMode ? [undefined, { debugName: "actions" }] : []);
|
|
5438
|
+
expanded = input.required(...ngDevMode ? [{ debugName: "expanded" }] : []);
|
|
5439
|
+
open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : []);
|
|
5440
|
+
dialog = viewChild.required("dialog", ...ngDevMode ? [{ debugName: "dialog" }] : []);
|
|
5441
|
+
expand() {
|
|
5442
|
+
this.open.set(true);
|
|
5443
|
+
this.dialog().nativeElement.showModal();
|
|
5444
|
+
}
|
|
5445
|
+
close() {
|
|
5446
|
+
this.dialog().nativeElement.close();
|
|
5304
5447
|
}
|
|
5305
5448
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5306
5449
|
minVersion: "12.0.0",
|
|
5307
5450
|
version: "22.2.0",
|
|
5308
5451
|
ngImport: i0,
|
|
5309
|
-
type:
|
|
5452
|
+
type: ExpandableComponent2,
|
|
5310
5453
|
deps: [],
|
|
5311
5454
|
target: i0.ɵɵFactoryTarget.Component
|
|
5312
5455
|
});
|
|
5313
5456
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5314
5457
|
minVersion: "17.0.0",
|
|
5315
5458
|
version: "22.2.0",
|
|
5316
|
-
type:
|
|
5459
|
+
type: ExpandableComponent2,
|
|
5317
5460
|
isStandalone: true,
|
|
5318
|
-
selector: "cortex-
|
|
5461
|
+
selector: "cortex-expandable",
|
|
5319
5462
|
inputs: {
|
|
5320
|
-
|
|
5321
|
-
classPropertyName: "
|
|
5322
|
-
publicName: "
|
|
5463
|
+
label: {
|
|
5464
|
+
classPropertyName: "label",
|
|
5465
|
+
publicName: "label",
|
|
5323
5466
|
isSignal: true,
|
|
5324
5467
|
isRequired: true,
|
|
5325
5468
|
transformFunction: null
|
|
5326
5469
|
},
|
|
5327
|
-
|
|
5328
|
-
classPropertyName: "
|
|
5329
|
-
publicName: "
|
|
5470
|
+
ready: {
|
|
5471
|
+
classPropertyName: "ready",
|
|
5472
|
+
publicName: "ready",
|
|
5330
5473
|
isSignal: true,
|
|
5331
|
-
isRequired:
|
|
5474
|
+
isRequired: false,
|
|
5332
5475
|
transformFunction: null
|
|
5333
5476
|
},
|
|
5334
|
-
|
|
5335
|
-
classPropertyName: "
|
|
5336
|
-
publicName: "
|
|
5477
|
+
actions: {
|
|
5478
|
+
classPropertyName: "actions",
|
|
5479
|
+
publicName: "actions",
|
|
5337
5480
|
isSignal: true,
|
|
5338
5481
|
isRequired: false,
|
|
5339
5482
|
transformFunction: null
|
|
5483
|
+
},
|
|
5484
|
+
expanded: {
|
|
5485
|
+
classPropertyName: "expanded",
|
|
5486
|
+
publicName: "expanded",
|
|
5487
|
+
isSignal: true,
|
|
5488
|
+
isRequired: true,
|
|
5489
|
+
transformFunction: null
|
|
5340
5490
|
}
|
|
5341
5491
|
},
|
|
5492
|
+
host: { classAttribute: "cortex-expandable" },
|
|
5493
|
+
viewQueries: [{
|
|
5494
|
+
propertyName: "dialog",
|
|
5495
|
+
first: true,
|
|
5496
|
+
predicate: ["dialog"],
|
|
5497
|
+
descendants: true,
|
|
5498
|
+
isSignal: true
|
|
5499
|
+
}],
|
|
5342
5500
|
ngImport: i0,
|
|
5343
|
-
template:
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5501
|
+
template: `@if (ready()) {
|
|
5502
|
+
<div class="cortex-expandable__toolbar" role="group" [attr.aria-label]="label()">
|
|
5503
|
+
<ng-container [ngTemplateOutlet]="actions() ?? null" />
|
|
5504
|
+
<button
|
|
5505
|
+
type="button"
|
|
5506
|
+
class="cortex-expandable__action"
|
|
5507
|
+
[attr.aria-label]="'translate_expand' | translate: { name: label() }"
|
|
5508
|
+
[title]="'translate_expand' | translate: { name: label() }"
|
|
5509
|
+
(click)="expand()"
|
|
5510
|
+
>
|
|
5511
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
5512
|
+
<path
|
|
5513
|
+
d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5 9 7M2.5 13.5 7 9"
|
|
5514
|
+
stroke="currentColor"
|
|
5515
|
+
stroke-width="1.3"
|
|
5516
|
+
stroke-linecap="round"
|
|
5517
|
+
stroke-linejoin="round"
|
|
5518
|
+
/>
|
|
5519
|
+
</svg>
|
|
5520
|
+
</button>
|
|
5521
|
+
</div>
|
|
5359
5522
|
}
|
|
5523
|
+
<div class="cortex-expandable__content"><ng-content /></div>
|
|
5524
|
+
<!-- Escape closes it natively, and so does a click outside where the browser supports closedby. -->
|
|
5525
|
+
<dialog
|
|
5526
|
+
#dialog
|
|
5527
|
+
class="cortex-expandable__dialog"
|
|
5528
|
+
closedby="any"
|
|
5529
|
+
[attr.aria-label]="label()"
|
|
5530
|
+
(close)="open.set(false)"
|
|
5531
|
+
>
|
|
5532
|
+
<div class="cortex-expandable__head">
|
|
5533
|
+
<span class="cortex-expandable__title">{{ label() }}</span>
|
|
5534
|
+
<ng-container [ngTemplateOutlet]="actions() ?? null" />
|
|
5535
|
+
<button
|
|
5536
|
+
type="button"
|
|
5537
|
+
class="cortex-expandable__action"
|
|
5538
|
+
[attr.aria-label]="'translate_close' | translate"
|
|
5539
|
+
[title]="'translate_close' | translate"
|
|
5540
|
+
(click)="close()"
|
|
5541
|
+
>
|
|
5542
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
5543
|
+
<path
|
|
5544
|
+
d="M4 4l8 8M12 4l-8 8"
|
|
5545
|
+
stroke="currentColor"
|
|
5546
|
+
stroke-width="1.4"
|
|
5547
|
+
stroke-linecap="round"
|
|
5548
|
+
/>
|
|
5549
|
+
</svg>
|
|
5550
|
+
</button>
|
|
5551
|
+
</div>
|
|
5552
|
+
@if (open()) {
|
|
5553
|
+
<div class="cortex-expandable__body">
|
|
5554
|
+
<ng-container [ngTemplateOutlet]="expanded()" />
|
|
5555
|
+
</div>
|
|
5556
|
+
}
|
|
5557
|
+
</dialog>
|
|
5360
5558
|
`,
|
|
5361
5559
|
dependencies: [{
|
|
5560
|
+
kind: "directive",
|
|
5561
|
+
type: NgTemplateOutlet,
|
|
5562
|
+
selector: "[ngTemplateOutlet]",
|
|
5563
|
+
inputs: [
|
|
5564
|
+
"ngTemplateOutletContext",
|
|
5565
|
+
"ngTemplateOutlet",
|
|
5566
|
+
"ngTemplateOutletInjector"
|
|
5567
|
+
]
|
|
5568
|
+
}, {
|
|
5362
5569
|
kind: "pipe",
|
|
5363
5570
|
type: TranslatePipe,
|
|
5364
5571
|
name: "translate"
|
|
@@ -5371,42 +5578,277 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5371
5578
|
minVersion: "12.0.0",
|
|
5372
5579
|
version: "22.2.0",
|
|
5373
5580
|
ngImport: i0,
|
|
5374
|
-
type:
|
|
5581
|
+
type: ExpandableComponent,
|
|
5375
5582
|
decorators: [{
|
|
5376
5583
|
type: Component,
|
|
5377
5584
|
args: [{
|
|
5378
|
-
selector: "cortex-
|
|
5585
|
+
selector: "cortex-expandable",
|
|
5379
5586
|
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
5380
5587
|
encapsulation: ViewEncapsulation2.None,
|
|
5381
|
-
imports: [TranslatePipe],
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
<
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5588
|
+
imports: [NgTemplateOutlet, TranslatePipe],
|
|
5589
|
+
host: { class: "cortex-expandable" },
|
|
5590
|
+
template: `@if (ready()) {
|
|
5591
|
+
<div class="cortex-expandable__toolbar" role="group" [attr.aria-label]="label()">
|
|
5592
|
+
<ng-container [ngTemplateOutlet]="actions() ?? null" />
|
|
5593
|
+
<button
|
|
5594
|
+
type="button"
|
|
5595
|
+
class="cortex-expandable__action"
|
|
5596
|
+
[attr.aria-label]="'translate_expand' | translate: { name: label() }"
|
|
5597
|
+
[title]="'translate_expand' | translate: { name: label() }"
|
|
5598
|
+
(click)="expand()"
|
|
5599
|
+
>
|
|
5600
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
5601
|
+
<path
|
|
5602
|
+
d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5 9 7M2.5 13.5 7 9"
|
|
5603
|
+
stroke="currentColor"
|
|
5604
|
+
stroke-width="1.3"
|
|
5605
|
+
stroke-linecap="round"
|
|
5606
|
+
stroke-linejoin="round"
|
|
5607
|
+
/>
|
|
5608
|
+
</svg>
|
|
5609
|
+
</button>
|
|
5610
|
+
</div>
|
|
5398
5611
|
}
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5612
|
+
<div class="cortex-expandable__content"><ng-content /></div>
|
|
5613
|
+
<!-- Escape closes it natively, and so does a click outside where the browser supports closedby. -->
|
|
5614
|
+
<dialog
|
|
5615
|
+
#dialog
|
|
5616
|
+
class="cortex-expandable__dialog"
|
|
5617
|
+
closedby="any"
|
|
5618
|
+
[attr.aria-label]="label()"
|
|
5619
|
+
(close)="open.set(false)"
|
|
5620
|
+
>
|
|
5621
|
+
<div class="cortex-expandable__head">
|
|
5622
|
+
<span class="cortex-expandable__title">{{ label() }}</span>
|
|
5623
|
+
<ng-container [ngTemplateOutlet]="actions() ?? null" />
|
|
5624
|
+
<button
|
|
5625
|
+
type="button"
|
|
5626
|
+
class="cortex-expandable__action"
|
|
5627
|
+
[attr.aria-label]="'translate_close' | translate"
|
|
5628
|
+
[title]="'translate_close' | translate"
|
|
5629
|
+
(click)="close()"
|
|
5630
|
+
>
|
|
5631
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
5632
|
+
<path
|
|
5633
|
+
d="M4 4l8 8M12 4l-8 8"
|
|
5634
|
+
stroke="currentColor"
|
|
5635
|
+
stroke-width="1.4"
|
|
5636
|
+
stroke-linecap="round"
|
|
5637
|
+
/>
|
|
5638
|
+
</svg>
|
|
5639
|
+
</button>
|
|
5640
|
+
</div>
|
|
5641
|
+
@if (open()) {
|
|
5642
|
+
<div class="cortex-expandable__body">
|
|
5643
|
+
<ng-container [ngTemplateOutlet]="expanded()" />
|
|
5644
|
+
</div>
|
|
5645
|
+
}
|
|
5646
|
+
</dialog>
|
|
5647
|
+
`
|
|
5648
|
+
}]
|
|
5649
|
+
}],
|
|
5650
|
+
propDecorators: {
|
|
5651
|
+
label: [{
|
|
5652
|
+
type: i0.Input,
|
|
5653
|
+
args: [{
|
|
5654
|
+
isSignal: true,
|
|
5655
|
+
alias: "label",
|
|
5656
|
+
required: true
|
|
5657
|
+
}]
|
|
5658
|
+
}],
|
|
5659
|
+
ready: [{
|
|
5660
|
+
type: i0.Input,
|
|
5661
|
+
args: [{
|
|
5662
|
+
isSignal: true,
|
|
5663
|
+
alias: "ready",
|
|
5664
|
+
required: false
|
|
5665
|
+
}]
|
|
5666
|
+
}],
|
|
5667
|
+
actions: [{
|
|
5668
|
+
type: i0.Input,
|
|
5669
|
+
args: [{
|
|
5670
|
+
isSignal: true,
|
|
5671
|
+
alias: "actions",
|
|
5672
|
+
required: false
|
|
5673
|
+
}]
|
|
5674
|
+
}],
|
|
5675
|
+
expanded: [{
|
|
5676
|
+
type: i0.Input,
|
|
5677
|
+
args: [{
|
|
5678
|
+
isSignal: true,
|
|
5679
|
+
alias: "expanded",
|
|
5680
|
+
required: true
|
|
5681
|
+
}]
|
|
5682
|
+
}],
|
|
5683
|
+
dialog: [{
|
|
5684
|
+
type: i0.ViewChild,
|
|
5685
|
+
args: ["dialog", { isSignal: true }]
|
|
5686
|
+
}]
|
|
5687
|
+
}
|
|
5688
|
+
});
|
|
5689
|
+
var AttachmentImageComponent = class AttachmentImageComponent2 {
|
|
5690
|
+
id = input.required(...ngDevMode ? [{ debugName: "id" }] : []);
|
|
5691
|
+
alt = input.required(...ngDevMode ? [{ debugName: "alt" }] : []);
|
|
5692
|
+
attachment = input(...ngDevMode ? [undefined, { debugName: "attachment" }] : []);
|
|
5693
|
+
url = signal(undefined, ...ngDevMode ? [{ debugName: "url" }] : []);
|
|
5694
|
+
failed = signal(false, ...ngDevMode ? [{ debugName: "failed" }] : []);
|
|
5695
|
+
api = inject(CORTEX_API);
|
|
5696
|
+
constructor() {
|
|
5697
|
+
effect((onCleanup) => {
|
|
5698
|
+
const id = this.id();
|
|
5699
|
+
let objectUrl;
|
|
5700
|
+
let cancelled = false;
|
|
5701
|
+
untracked(() => {
|
|
5702
|
+
this.url.set(undefined);
|
|
5703
|
+
this.failed.set(false);
|
|
5704
|
+
});
|
|
5705
|
+
this.api.downloadAttachment(id).then(({ blob }) => {
|
|
5706
|
+
if (cancelled)
|
|
5707
|
+
return;
|
|
5708
|
+
objectUrl = URL.createObjectURL(blob);
|
|
5709
|
+
this.url.set(objectUrl);
|
|
5710
|
+
}, () => {
|
|
5711
|
+
if (!cancelled)
|
|
5712
|
+
this.failed.set(true);
|
|
5713
|
+
});
|
|
5714
|
+
onCleanup(() => {
|
|
5715
|
+
cancelled = true;
|
|
5716
|
+
if (objectUrl)
|
|
5717
|
+
URL.revokeObjectURL(objectUrl);
|
|
5718
|
+
});
|
|
5719
|
+
});
|
|
5720
|
+
}
|
|
5721
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5722
|
+
minVersion: "12.0.0",
|
|
5723
|
+
version: "22.2.0",
|
|
5724
|
+
ngImport: i0,
|
|
5725
|
+
type: AttachmentImageComponent2,
|
|
5726
|
+
deps: [],
|
|
5727
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
5728
|
+
});
|
|
5729
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5730
|
+
minVersion: "17.0.0",
|
|
5731
|
+
version: "22.2.0",
|
|
5732
|
+
type: AttachmentImageComponent2,
|
|
5733
|
+
isStandalone: true,
|
|
5734
|
+
selector: "cortex-attachment-image",
|
|
5735
|
+
inputs: {
|
|
5736
|
+
id: {
|
|
5737
|
+
classPropertyName: "id",
|
|
5738
|
+
publicName: "id",
|
|
5739
|
+
isSignal: true,
|
|
5740
|
+
isRequired: true,
|
|
5741
|
+
transformFunction: null
|
|
5742
|
+
},
|
|
5743
|
+
alt: {
|
|
5744
|
+
classPropertyName: "alt",
|
|
5745
|
+
publicName: "alt",
|
|
5746
|
+
isSignal: true,
|
|
5747
|
+
isRequired: true,
|
|
5748
|
+
transformFunction: null
|
|
5749
|
+
},
|
|
5750
|
+
attachment: {
|
|
5751
|
+
classPropertyName: "attachment",
|
|
5752
|
+
publicName: "attachment",
|
|
5753
|
+
isSignal: true,
|
|
5754
|
+
isRequired: false,
|
|
5755
|
+
transformFunction: null
|
|
5756
|
+
}
|
|
5757
|
+
},
|
|
5758
|
+
ngImport: i0,
|
|
5759
|
+
template: `<!-- A failed download keeps the alt text on screen, so the reply still reads. -->
|
|
5760
|
+
@if (failed()) {
|
|
5761
|
+
<p class="cortex-attachment-image__caption">
|
|
5762
|
+
{{
|
|
5763
|
+
alt()
|
|
5764
|
+
? ('translate_image_unavailable_alt' | translate: { alt: alt() })
|
|
5765
|
+
: ('translate_image_unavailable' | translate)
|
|
5766
|
+
}}
|
|
5767
|
+
</p>
|
|
5768
|
+
} @else if (url(); as src) {
|
|
5769
|
+
<figure class="cortex-attachment-image">
|
|
5770
|
+
<cortex-expandable
|
|
5771
|
+
[label]="attachment()?.filename || alt() || ('translate_image' | translate)"
|
|
5772
|
+
[expanded]="expandedImage"
|
|
5773
|
+
>
|
|
5774
|
+
<img [src]="src" [alt]="alt()" />
|
|
5775
|
+
</cortex-expandable>
|
|
5776
|
+
<ng-template #expandedImage>
|
|
5777
|
+
<img class="cortex-attachment-image__expanded" [src]="src" [alt]="alt()" />
|
|
5778
|
+
</ng-template>
|
|
5779
|
+
@if (attachment(); as file) {
|
|
5780
|
+
<figcaption class="cortex-attachment-image__caption">{{ file.filename }}</figcaption>
|
|
5781
|
+
}
|
|
5782
|
+
</figure>
|
|
5783
|
+
}
|
|
5784
|
+
`,
|
|
5785
|
+
dependencies: [{
|
|
5786
|
+
kind: "component",
|
|
5787
|
+
type: ExpandableComponent,
|
|
5788
|
+
selector: "cortex-expandable",
|
|
5789
|
+
inputs: [
|
|
5790
|
+
"label",
|
|
5791
|
+
"ready",
|
|
5792
|
+
"actions",
|
|
5793
|
+
"expanded"
|
|
5794
|
+
]
|
|
5795
|
+
}, {
|
|
5796
|
+
kind: "pipe",
|
|
5797
|
+
type: TranslatePipe,
|
|
5798
|
+
name: "translate"
|
|
5799
|
+
}],
|
|
5800
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5801
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
5802
|
+
});
|
|
5803
|
+
};
|
|
5804
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
5805
|
+
minVersion: "12.0.0",
|
|
5806
|
+
version: "22.2.0",
|
|
5807
|
+
ngImport: i0,
|
|
5808
|
+
type: AttachmentImageComponent,
|
|
5809
|
+
decorators: [{
|
|
5810
|
+
type: Component,
|
|
5811
|
+
args: [{
|
|
5812
|
+
selector: "cortex-attachment-image",
|
|
5813
|
+
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
5814
|
+
encapsulation: ViewEncapsulation2.None,
|
|
5815
|
+
imports: [ExpandableComponent, TranslatePipe],
|
|
5816
|
+
template: `<!-- A failed download keeps the alt text on screen, so the reply still reads. -->
|
|
5817
|
+
@if (failed()) {
|
|
5818
|
+
<p class="cortex-attachment-image__caption">
|
|
5819
|
+
{{
|
|
5820
|
+
alt()
|
|
5821
|
+
? ('translate_image_unavailable_alt' | translate: { alt: alt() })
|
|
5822
|
+
: ('translate_image_unavailable' | translate)
|
|
5823
|
+
}}
|
|
5824
|
+
</p>
|
|
5825
|
+
} @else if (url(); as src) {
|
|
5826
|
+
<figure class="cortex-attachment-image">
|
|
5827
|
+
<cortex-expandable
|
|
5828
|
+
[label]="attachment()?.filename || alt() || ('translate_image' | translate)"
|
|
5829
|
+
[expanded]="expandedImage"
|
|
5830
|
+
>
|
|
5831
|
+
<img [src]="src" [alt]="alt()" />
|
|
5832
|
+
</cortex-expandable>
|
|
5833
|
+
<ng-template #expandedImage>
|
|
5834
|
+
<img class="cortex-attachment-image__expanded" [src]="src" [alt]="alt()" />
|
|
5835
|
+
</ng-template>
|
|
5836
|
+
@if (attachment(); as file) {
|
|
5837
|
+
<figcaption class="cortex-attachment-image__caption">{{ file.filename }}</figcaption>
|
|
5838
|
+
}
|
|
5839
|
+
</figure>
|
|
5840
|
+
}
|
|
5841
|
+
`
|
|
5842
|
+
}]
|
|
5843
|
+
}],
|
|
5844
|
+
ctorParameters: () => [],
|
|
5845
|
+
propDecorators: {
|
|
5846
|
+
id: [{
|
|
5847
|
+
type: i0.Input,
|
|
5848
|
+
args: [{
|
|
5849
|
+
isSignal: true,
|
|
5850
|
+
alias: "id",
|
|
5851
|
+
required: true
|
|
5410
5852
|
}]
|
|
5411
5853
|
}],
|
|
5412
5854
|
alt: [{
|
|
@@ -5436,7 +5878,7 @@ var MediaBlockHeadComponent = class MediaBlockHeadComponent2 {
|
|
|
5436
5878
|
sourceShown = input.required(...ngDevMode ? [{ debugName: "sourceShown" }] : []);
|
|
5437
5879
|
canToggleSource = input.required(...ngDevMode ? [{ debugName: "canToggleSource" }] : []);
|
|
5438
5880
|
toggleSource = output();
|
|
5439
|
-
pendingLabel = computed(() =>
|
|
5881
|
+
pendingLabel = computed(() => mediaLabels(this.language()).pending, ...ngDevMode ? [{ debugName: "pendingLabel" }] : []);
|
|
5440
5882
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
5441
5883
|
minVersion: "12.0.0",
|
|
5442
5884
|
version: "22.2.0",
|
|
@@ -5647,39 +6089,144 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5647
6089
|
}]
|
|
5648
6090
|
}
|
|
5649
6091
|
});
|
|
5650
|
-
var
|
|
6092
|
+
var MediaDrawingComponent = class MediaDrawingComponent2 {
|
|
5651
6093
|
language = input.required(...ngDevMode ? [{ debugName: "language" }] : []);
|
|
5652
6094
|
source = input.required(...ngDevMode ? [{ debugName: "source" }] : []);
|
|
5653
6095
|
closed = input.required(...ngDevMode ? [{ debugName: "closed" }] : []);
|
|
5654
|
-
|
|
5655
|
-
debugMode = input(false, ...ngDevMode ? [{ debugName: "debugMode" }] : []);
|
|
5656
|
-
error = signal(undefined, ...ngDevMode ? [{ debugName: "error" }] : []);
|
|
5657
|
-
showSource = signal(false, ...ngDevMode ? [{ debugName: "showSource" }] : []);
|
|
5658
|
-
pending = computed(() => !this.closed() && this.streaming(), ...ngDevMode ? [{ debugName: "pending" }] : []);
|
|
5659
|
-
cutOff = computed(() => !this.closed() && !this.streaming(), ...ngDevMode ? [{ debugName: "cutOff" }] : []);
|
|
5660
|
-
failure = computed(() => this.cutOff() || Boolean(this.error()), ...ngDevMode ? [{ debugName: "failure" }] : []);
|
|
6096
|
+
failed = output();
|
|
5661
6097
|
config = inject(CORTEX_CONFIG);
|
|
5662
|
-
host =
|
|
6098
|
+
host = inject(ElementRef);
|
|
5663
6099
|
scheme = inject(CORTEX_SCHEME);
|
|
5664
6100
|
constructor() {
|
|
5665
6101
|
effect((onCleanup) => {
|
|
5666
|
-
const host = this.host()?.nativeElement;
|
|
5667
6102
|
const scheme = this.scheme();
|
|
5668
6103
|
const language = this.language();
|
|
5669
6104
|
const source = this.source();
|
|
5670
6105
|
const overrides = this.config().mediaRenderers;
|
|
5671
|
-
untracked(() => this.
|
|
5672
|
-
if (!this.closed() || !scheme
|
|
6106
|
+
untracked(() => this.failed.emit(undefined));
|
|
6107
|
+
if (!this.closed() || !scheme)
|
|
5673
6108
|
return;
|
|
5674
|
-
onCleanup(drawMediaBlock(host, {
|
|
6109
|
+
onCleanup(drawMediaBlock(this.host.nativeElement, {
|
|
5675
6110
|
language,
|
|
5676
6111
|
source,
|
|
5677
6112
|
context: { scheme },
|
|
5678
6113
|
overrides,
|
|
5679
|
-
onError: (message) => this.
|
|
6114
|
+
onError: (message) => this.failed.emit(message)
|
|
5680
6115
|
}));
|
|
5681
6116
|
});
|
|
5682
6117
|
}
|
|
6118
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
6119
|
+
minVersion: "12.0.0",
|
|
6120
|
+
version: "22.2.0",
|
|
6121
|
+
ngImport: i0,
|
|
6122
|
+
type: MediaDrawingComponent2,
|
|
6123
|
+
deps: [],
|
|
6124
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
6125
|
+
});
|
|
6126
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
6127
|
+
minVersion: "17.1.0",
|
|
6128
|
+
version: "22.2.0",
|
|
6129
|
+
type: MediaDrawingComponent2,
|
|
6130
|
+
isStandalone: true,
|
|
6131
|
+
selector: "cortex-media-drawing",
|
|
6132
|
+
inputs: {
|
|
6133
|
+
language: {
|
|
6134
|
+
classPropertyName: "language",
|
|
6135
|
+
publicName: "language",
|
|
6136
|
+
isSignal: true,
|
|
6137
|
+
isRequired: true,
|
|
6138
|
+
transformFunction: null
|
|
6139
|
+
},
|
|
6140
|
+
source: {
|
|
6141
|
+
classPropertyName: "source",
|
|
6142
|
+
publicName: "source",
|
|
6143
|
+
isSignal: true,
|
|
6144
|
+
isRequired: true,
|
|
6145
|
+
transformFunction: null
|
|
6146
|
+
},
|
|
6147
|
+
closed: {
|
|
6148
|
+
classPropertyName: "closed",
|
|
6149
|
+
publicName: "closed",
|
|
6150
|
+
isSignal: true,
|
|
6151
|
+
isRequired: true,
|
|
6152
|
+
transformFunction: null
|
|
6153
|
+
}
|
|
6154
|
+
},
|
|
6155
|
+
outputs: { failed: "failed" },
|
|
6156
|
+
host: {
|
|
6157
|
+
properties: { class: "'cortex-media-block__body--' + language()" },
|
|
6158
|
+
classAttribute: "cortex-media-block__body"
|
|
6159
|
+
},
|
|
6160
|
+
ngImport: i0,
|
|
6161
|
+
template: "",
|
|
6162
|
+
isInline: true,
|
|
6163
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6164
|
+
encapsulation: i0.ViewEncapsulation.None
|
|
6165
|
+
});
|
|
6166
|
+
};
|
|
6167
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
6168
|
+
minVersion: "12.0.0",
|
|
6169
|
+
version: "22.2.0",
|
|
6170
|
+
ngImport: i0,
|
|
6171
|
+
type: MediaDrawingComponent,
|
|
6172
|
+
decorators: [{
|
|
6173
|
+
type: Component,
|
|
6174
|
+
args: [{
|
|
6175
|
+
selector: "cortex-media-drawing",
|
|
6176
|
+
template: "",
|
|
6177
|
+
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
6178
|
+
encapsulation: ViewEncapsulation2.None,
|
|
6179
|
+
host: {
|
|
6180
|
+
class: "cortex-media-block__body",
|
|
6181
|
+
"[class]": "'cortex-media-block__body--' + language()"
|
|
6182
|
+
}
|
|
6183
|
+
}]
|
|
6184
|
+
}],
|
|
6185
|
+
ctorParameters: () => [],
|
|
6186
|
+
propDecorators: {
|
|
6187
|
+
language: [{
|
|
6188
|
+
type: i0.Input,
|
|
6189
|
+
args: [{
|
|
6190
|
+
isSignal: true,
|
|
6191
|
+
alias: "language",
|
|
6192
|
+
required: true
|
|
6193
|
+
}]
|
|
6194
|
+
}],
|
|
6195
|
+
source: [{
|
|
6196
|
+
type: i0.Input,
|
|
6197
|
+
args: [{
|
|
6198
|
+
isSignal: true,
|
|
6199
|
+
alias: "source",
|
|
6200
|
+
required: true
|
|
6201
|
+
}]
|
|
6202
|
+
}],
|
|
6203
|
+
closed: [{
|
|
6204
|
+
type: i0.Input,
|
|
6205
|
+
args: [{
|
|
6206
|
+
isSignal: true,
|
|
6207
|
+
alias: "closed",
|
|
6208
|
+
required: true
|
|
6209
|
+
}]
|
|
6210
|
+
}],
|
|
6211
|
+
failed: [{
|
|
6212
|
+
type: i0.Output,
|
|
6213
|
+
args: ["failed"]
|
|
6214
|
+
}]
|
|
6215
|
+
}
|
|
6216
|
+
});
|
|
6217
|
+
var MediaBlockComponent = class MediaBlockComponent2 {
|
|
6218
|
+
language = input.required(...ngDevMode ? [{ debugName: "language" }] : []);
|
|
6219
|
+
source = input.required(...ngDevMode ? [{ debugName: "source" }] : []);
|
|
6220
|
+
closed = input.required(...ngDevMode ? [{ debugName: "closed" }] : []);
|
|
6221
|
+
streaming = input.required(...ngDevMode ? [{ debugName: "streaming" }] : []);
|
|
6222
|
+
debugMode = input(false, ...ngDevMode ? [{ debugName: "debugMode" }] : []);
|
|
6223
|
+
error = signal(undefined, ...ngDevMode ? [{ debugName: "error" }] : []);
|
|
6224
|
+
expandedError = signal(undefined, ...ngDevMode ? [{ debugName: "expandedError" }] : []);
|
|
6225
|
+
showSource = signal(false, ...ngDevMode ? [{ debugName: "showSource" }] : []);
|
|
6226
|
+
pending = computed(() => !this.closed() && this.streaming(), ...ngDevMode ? [{ debugName: "pending" }] : []);
|
|
6227
|
+
cutOff = computed(() => !this.closed() && !this.streaming(), ...ngDevMode ? [{ debugName: "cutOff" }] : []);
|
|
6228
|
+
failure = computed(() => this.cutOff() || Boolean(this.error()), ...ngDevMode ? [{ debugName: "failure" }] : []);
|
|
6229
|
+
title = computed(() => mediaLabels(this.language()).title, ...ngDevMode ? [{ debugName: "title" }] : []);
|
|
5683
6230
|
toggleSource() {
|
|
5684
6231
|
this.showSource.update((open) => !open);
|
|
5685
6232
|
}
|
|
@@ -5735,13 +6282,6 @@ var MediaBlockComponent = class MediaBlockComponent2 {
|
|
|
5735
6282
|
}
|
|
5736
6283
|
},
|
|
5737
6284
|
host: { classAttribute: "cortex-media-block" },
|
|
5738
|
-
viewQueries: [{
|
|
5739
|
-
propertyName: "host",
|
|
5740
|
-
first: true,
|
|
5741
|
-
predicate: ["host"],
|
|
5742
|
-
descendants: true,
|
|
5743
|
-
isSignal: true
|
|
5744
|
-
}],
|
|
5745
6285
|
ngImport: i0,
|
|
5746
6286
|
template: `<!-- The tag, the source and its copy control are for whoever is debugging the
|
|
5747
6287
|
agent; a user sees the media, a short pending line, or a short error. -->
|
|
@@ -5770,36 +6310,88 @@ var MediaBlockComponent = class MediaBlockComponent2 {
|
|
|
5770
6310
|
</p>
|
|
5771
6311
|
</div>
|
|
5772
6312
|
}
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
6313
|
+
<cortex-expandable
|
|
6314
|
+
[label]="title() | translate"
|
|
6315
|
+
[ready]="closed() && !failure()"
|
|
6316
|
+
[expanded]="expandedDrawing"
|
|
6317
|
+
>
|
|
6318
|
+
<!-- The host stays mounted through an error so a retry has somewhere to draw. -->
|
|
6319
|
+
<cortex-media-drawing
|
|
6320
|
+
[language]="language()"
|
|
6321
|
+
[source]="source()"
|
|
6322
|
+
[closed]="closed()"
|
|
6323
|
+
[hidden]="failure()"
|
|
6324
|
+
(failed)="error.set($event)"
|
|
6325
|
+
/>
|
|
6326
|
+
</cortex-expandable>
|
|
6327
|
+
<!-- The expanded copy is a drawing of its own, so it shows its own failure line. -->
|
|
6328
|
+
<ng-template #expandedDrawing>
|
|
6329
|
+
@if (expandedError(); as reason) {
|
|
6330
|
+
<div class="cortex-media-block__body">
|
|
6331
|
+
<p class="cortex-media-block__error">
|
|
6332
|
+
{{ 'translate_media_failed' | translate }}
|
|
6333
|
+
@if (debugMode()) {
|
|
6334
|
+
{{ reason }}
|
|
6335
|
+
}
|
|
6336
|
+
</p>
|
|
6337
|
+
</div>
|
|
6338
|
+
}
|
|
6339
|
+
<cortex-media-drawing
|
|
6340
|
+
[language]="language()"
|
|
6341
|
+
[source]="source()"
|
|
6342
|
+
[closed]="true"
|
|
6343
|
+
[hidden]="!!expandedError()"
|
|
6344
|
+
(failed)="expandedError.set($event)"
|
|
6345
|
+
/>
|
|
6346
|
+
</ng-template>
|
|
5780
6347
|
@if (debugMode() && (failure() || showSource())) {
|
|
5781
6348
|
<pre class="cortex-media-block__source">{{ source() }}</pre>
|
|
5782
6349
|
}
|
|
5783
6350
|
`,
|
|
5784
|
-
dependencies: [
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5802
|
-
|
|
6351
|
+
dependencies: [
|
|
6352
|
+
{
|
|
6353
|
+
kind: "component",
|
|
6354
|
+
type: ExpandableComponent,
|
|
6355
|
+
selector: "cortex-expandable",
|
|
6356
|
+
inputs: [
|
|
6357
|
+
"label",
|
|
6358
|
+
"ready",
|
|
6359
|
+
"actions",
|
|
6360
|
+
"expanded"
|
|
6361
|
+
]
|
|
6362
|
+
},
|
|
6363
|
+
{
|
|
6364
|
+
kind: "component",
|
|
6365
|
+
type: MediaBlockHeadComponent,
|
|
6366
|
+
selector: "cortex-media-block-head",
|
|
6367
|
+
inputs: [
|
|
6368
|
+
"language",
|
|
6369
|
+
"source",
|
|
6370
|
+
"pending",
|
|
6371
|
+
"closed",
|
|
6372
|
+
"debugMode",
|
|
6373
|
+
"sourceShown",
|
|
6374
|
+
"canToggleSource"
|
|
6375
|
+
],
|
|
6376
|
+
outputs: ["toggleSource"]
|
|
6377
|
+
},
|
|
6378
|
+
{
|
|
6379
|
+
kind: "component",
|
|
6380
|
+
type: MediaDrawingComponent,
|
|
6381
|
+
selector: "cortex-media-drawing",
|
|
6382
|
+
inputs: [
|
|
6383
|
+
"language",
|
|
6384
|
+
"source",
|
|
6385
|
+
"closed"
|
|
6386
|
+
],
|
|
6387
|
+
outputs: ["failed"]
|
|
6388
|
+
},
|
|
6389
|
+
{
|
|
6390
|
+
kind: "pipe",
|
|
6391
|
+
type: TranslatePipe,
|
|
6392
|
+
name: "translate"
|
|
6393
|
+
}
|
|
6394
|
+
],
|
|
5803
6395
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
5804
6396
|
encapsulation: i0.ViewEncapsulation.None
|
|
5805
6397
|
});
|
|
@@ -5815,7 +6407,12 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5815
6407
|
selector: "cortex-media-block",
|
|
5816
6408
|
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
5817
6409
|
encapsulation: ViewEncapsulation2.None,
|
|
5818
|
-
imports: [
|
|
6410
|
+
imports: [
|
|
6411
|
+
ExpandableComponent,
|
|
6412
|
+
MediaBlockHeadComponent,
|
|
6413
|
+
MediaDrawingComponent,
|
|
6414
|
+
TranslatePipe
|
|
6415
|
+
],
|
|
5819
6416
|
host: { class: "cortex-media-block" },
|
|
5820
6417
|
template: `<!-- The tag, the source and its copy control are for whoever is debugging the
|
|
5821
6418
|
agent; a user sees the media, a short pending line, or a short error. -->
|
|
@@ -5844,20 +6441,46 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5844
6441
|
</p>
|
|
5845
6442
|
</div>
|
|
5846
6443
|
}
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
6444
|
+
<cortex-expandable
|
|
6445
|
+
[label]="title() | translate"
|
|
6446
|
+
[ready]="closed() && !failure()"
|
|
6447
|
+
[expanded]="expandedDrawing"
|
|
6448
|
+
>
|
|
6449
|
+
<!-- The host stays mounted through an error so a retry has somewhere to draw. -->
|
|
6450
|
+
<cortex-media-drawing
|
|
6451
|
+
[language]="language()"
|
|
6452
|
+
[source]="source()"
|
|
6453
|
+
[closed]="closed()"
|
|
6454
|
+
[hidden]="failure()"
|
|
6455
|
+
(failed)="error.set($event)"
|
|
6456
|
+
/>
|
|
6457
|
+
</cortex-expandable>
|
|
6458
|
+
<!-- The expanded copy is a drawing of its own, so it shows its own failure line. -->
|
|
6459
|
+
<ng-template #expandedDrawing>
|
|
6460
|
+
@if (expandedError(); as reason) {
|
|
6461
|
+
<div class="cortex-media-block__body">
|
|
6462
|
+
<p class="cortex-media-block__error">
|
|
6463
|
+
{{ 'translate_media_failed' | translate }}
|
|
6464
|
+
@if (debugMode()) {
|
|
6465
|
+
{{ reason }}
|
|
6466
|
+
}
|
|
6467
|
+
</p>
|
|
6468
|
+
</div>
|
|
6469
|
+
}
|
|
6470
|
+
<cortex-media-drawing
|
|
6471
|
+
[language]="language()"
|
|
6472
|
+
[source]="source()"
|
|
6473
|
+
[closed]="true"
|
|
6474
|
+
[hidden]="!!expandedError()"
|
|
6475
|
+
(failed)="expandedError.set($event)"
|
|
6476
|
+
/>
|
|
6477
|
+
</ng-template>
|
|
5854
6478
|
@if (debugMode() && (failure() || showSource())) {
|
|
5855
6479
|
<pre class="cortex-media-block__source">{{ source() }}</pre>
|
|
5856
6480
|
}
|
|
5857
6481
|
`
|
|
5858
6482
|
}]
|
|
5859
6483
|
}],
|
|
5860
|
-
ctorParameters: () => [],
|
|
5861
6484
|
propDecorators: {
|
|
5862
6485
|
language: [{
|
|
5863
6486
|
type: i0.Input,
|
|
@@ -5898,26 +6521,13 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5898
6521
|
alias: "debugMode",
|
|
5899
6522
|
required: false
|
|
5900
6523
|
}]
|
|
5901
|
-
}],
|
|
5902
|
-
host: [{
|
|
5903
|
-
type: i0.ViewChild,
|
|
5904
|
-
args: ["host", { isSignal: true }]
|
|
5905
6524
|
}]
|
|
5906
6525
|
}
|
|
5907
6526
|
});
|
|
5908
6527
|
var TableBlockComponent = class TableBlockComponent2 {
|
|
5909
6528
|
markdown = input.required(...ngDevMode ? [{ debugName: "markdown" }] : []);
|
|
5910
6529
|
closed = input.required(...ngDevMode ? [{ debugName: "closed" }] : []);
|
|
5911
|
-
expanded = signal(false, ...ngDevMode ? [{ debugName: "expanded" }] : []);
|
|
5912
6530
|
frame = viewChild.required("frame", ...ngDevMode ? [{ debugName: "frame" }] : []);
|
|
5913
|
-
dialog = viewChild.required("dialog", ...ngDevMode ? [{ debugName: "dialog" }] : []);
|
|
5914
|
-
expand() {
|
|
5915
|
-
this.expanded.set(true);
|
|
5916
|
-
this.dialog().nativeElement.showModal();
|
|
5917
|
-
}
|
|
5918
|
-
close() {
|
|
5919
|
-
this.dialog().nativeElement.close();
|
|
5920
|
-
}
|
|
5921
6531
|
export() {
|
|
5922
6532
|
const table = this.frame().nativeElement.querySelector("table");
|
|
5923
6533
|
if (table)
|
|
@@ -5932,137 +6542,90 @@ var TableBlockComponent = class TableBlockComponent2 {
|
|
|
5932
6542
|
target: i0.ɵɵFactoryTarget.Component
|
|
5933
6543
|
});
|
|
5934
6544
|
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
5935
|
-
minVersion: "17.
|
|
6545
|
+
minVersion: "17.2.0",
|
|
5936
6546
|
version: "22.2.0",
|
|
5937
6547
|
type: TableBlockComponent2,
|
|
5938
|
-
isStandalone: true,
|
|
5939
|
-
selector: "cortex-table-block",
|
|
5940
|
-
inputs: {
|
|
5941
|
-
markdown: {
|
|
5942
|
-
classPropertyName: "markdown",
|
|
5943
|
-
publicName: "markdown",
|
|
5944
|
-
isSignal: true,
|
|
5945
|
-
isRequired: true,
|
|
5946
|
-
transformFunction: null
|
|
5947
|
-
},
|
|
5948
|
-
closed: {
|
|
5949
|
-
classPropertyName: "closed",
|
|
5950
|
-
publicName: "closed",
|
|
5951
|
-
isSignal: true,
|
|
5952
|
-
isRequired: true,
|
|
5953
|
-
transformFunction: null
|
|
5954
|
-
}
|
|
5955
|
-
},
|
|
5956
|
-
host: { classAttribute: "cortex-table-block" },
|
|
5957
|
-
viewQueries: [{
|
|
5958
|
-
propertyName: "frame",
|
|
5959
|
-
first: true,
|
|
5960
|
-
predicate: ["frame"],
|
|
5961
|
-
descendants: true,
|
|
5962
|
-
isSignal: true
|
|
5963
|
-
}, {
|
|
5964
|
-
propertyName: "dialog",
|
|
5965
|
-
first: true,
|
|
5966
|
-
predicate: ["dialog"],
|
|
5967
|
-
descendants: true,
|
|
5968
|
-
isSignal: true
|
|
5969
|
-
}],
|
|
5970
|
-
ngImport: i0,
|
|
5971
|
-
template: `<div class="cortex-table-block__actions">
|
|
5972
|
-
@if (closed()) {
|
|
5973
|
-
<button
|
|
5974
|
-
type="button"
|
|
5975
|
-
class="cortex-table-block__action"
|
|
5976
|
-
[attr.aria-label]="'translate_table_expand' | translate"
|
|
5977
|
-
[title]="'translate_table_expand' | translate"
|
|
5978
|
-
(click)="expand()"
|
|
5979
|
-
>
|
|
5980
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
5981
|
-
<path
|
|
5982
|
-
d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5 9 7M2.5 13.5 7 9"
|
|
5983
|
-
stroke="currentColor"
|
|
5984
|
-
stroke-width="1.3"
|
|
5985
|
-
stroke-linecap="round"
|
|
5986
|
-
stroke-linejoin="round"
|
|
5987
|
-
/>
|
|
5988
|
-
</svg>
|
|
5989
|
-
</button>
|
|
5990
|
-
<button
|
|
5991
|
-
type="button"
|
|
5992
|
-
class="cortex-table-block__action"
|
|
5993
|
-
[attr.aria-label]="'translate_table_export' | translate"
|
|
5994
|
-
[title]="'translate_table_export' | translate"
|
|
5995
|
-
(click)="export()"
|
|
5996
|
-
>
|
|
5997
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
5998
|
-
<path
|
|
5999
|
-
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6000
|
-
stroke="currentColor"
|
|
6001
|
-
stroke-width="1.3"
|
|
6002
|
-
stroke-linecap="round"
|
|
6003
|
-
stroke-linejoin="round"
|
|
6004
|
-
/>
|
|
6005
|
-
</svg>
|
|
6006
|
-
</button>
|
|
6007
|
-
}
|
|
6008
|
-
</div>
|
|
6009
|
-
<div #frame [innerHTML]="markdown() | marked"></div>
|
|
6010
|
-
<!-- The dialog closes itself on Escape. -->
|
|
6011
|
-
<dialog
|
|
6012
|
-
#dialog
|
|
6013
|
-
class="cortex-table-block__dialog"
|
|
6014
|
-
[attr.aria-label]="'translate_table_expand' | translate"
|
|
6015
|
-
(close)="expanded.set(false)"
|
|
6016
|
-
>
|
|
6017
|
-
<div class="cortex-table-block__dialog-head">
|
|
6018
|
-
<button
|
|
6019
|
-
type="button"
|
|
6020
|
-
class="cortex-table-block__action"
|
|
6021
|
-
[attr.aria-label]="'translate_table_export' | translate"
|
|
6022
|
-
[title]="'translate_table_export' | translate"
|
|
6023
|
-
(click)="export()"
|
|
6024
|
-
>
|
|
6025
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6026
|
-
<path
|
|
6027
|
-
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6028
|
-
stroke="currentColor"
|
|
6029
|
-
stroke-width="1.3"
|
|
6030
|
-
stroke-linecap="round"
|
|
6031
|
-
stroke-linejoin="round"
|
|
6032
|
-
/>
|
|
6033
|
-
</svg>
|
|
6034
|
-
</button>
|
|
6035
|
-
<button
|
|
6036
|
-
type="button"
|
|
6037
|
-
class="cortex-table-block__action"
|
|
6038
|
-
[attr.aria-label]="'translate_close' | translate"
|
|
6039
|
-
[title]="'translate_close' | translate"
|
|
6040
|
-
(click)="close()"
|
|
6041
|
-
>
|
|
6042
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6043
|
-
<path
|
|
6044
|
-
d="M4 4l8 8M12 4l-8 8"
|
|
6045
|
-
stroke="currentColor"
|
|
6046
|
-
stroke-width="1.4"
|
|
6047
|
-
stroke-linecap="round"
|
|
6048
|
-
/>
|
|
6049
|
-
</svg>
|
|
6050
|
-
</button>
|
|
6051
|
-
</div>
|
|
6052
|
-
@if (expanded()) {
|
|
6053
|
-
<div class="cortex-table-block__dialog-body" [innerHTML]="markdown() | marked"></div>
|
|
6054
|
-
}
|
|
6055
|
-
</dialog>
|
|
6056
|
-
`,
|
|
6057
|
-
dependencies: [{
|
|
6058
|
-
kind: "pipe",
|
|
6059
|
-
type: MarkedPipe,
|
|
6060
|
-
name: "marked"
|
|
6061
|
-
}, {
|
|
6062
|
-
kind: "pipe",
|
|
6063
|
-
type: TranslatePipe,
|
|
6064
|
-
name: "translate"
|
|
6548
|
+
isStandalone: true,
|
|
6549
|
+
selector: "cortex-table-block",
|
|
6550
|
+
inputs: {
|
|
6551
|
+
markdown: {
|
|
6552
|
+
classPropertyName: "markdown",
|
|
6553
|
+
publicName: "markdown",
|
|
6554
|
+
isSignal: true,
|
|
6555
|
+
isRequired: true,
|
|
6556
|
+
transformFunction: null
|
|
6557
|
+
},
|
|
6558
|
+
closed: {
|
|
6559
|
+
classPropertyName: "closed",
|
|
6560
|
+
publicName: "closed",
|
|
6561
|
+
isSignal: true,
|
|
6562
|
+
isRequired: true,
|
|
6563
|
+
transformFunction: null
|
|
6564
|
+
}
|
|
6565
|
+
},
|
|
6566
|
+
host: { classAttribute: "cortex-table-block" },
|
|
6567
|
+
viewQueries: [{
|
|
6568
|
+
propertyName: "frame",
|
|
6569
|
+
first: true,
|
|
6570
|
+
predicate: ["frame"],
|
|
6571
|
+
descendants: true,
|
|
6572
|
+
isSignal: true
|
|
6065
6573
|
}],
|
|
6574
|
+
ngImport: i0,
|
|
6575
|
+
template: `<cortex-expandable
|
|
6576
|
+
[label]="'translate_table' | translate"
|
|
6577
|
+
[ready]="closed()"
|
|
6578
|
+
[actions]="exportAction"
|
|
6579
|
+
[expanded]="expandedTable"
|
|
6580
|
+
>
|
|
6581
|
+
<div #frame [innerHTML]="markdown() | marked"></div>
|
|
6582
|
+
</cortex-expandable>
|
|
6583
|
+
<ng-template #exportAction>
|
|
6584
|
+
<button
|
|
6585
|
+
type="button"
|
|
6586
|
+
class="cortex-expandable__action"
|
|
6587
|
+
[attr.aria-label]="'translate_table_export' | translate"
|
|
6588
|
+
[title]="'translate_table_export' | translate"
|
|
6589
|
+
(click)="export()"
|
|
6590
|
+
>
|
|
6591
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6592
|
+
<path
|
|
6593
|
+
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6594
|
+
stroke="currentColor"
|
|
6595
|
+
stroke-width="1.3"
|
|
6596
|
+
stroke-linecap="round"
|
|
6597
|
+
stroke-linejoin="round"
|
|
6598
|
+
/>
|
|
6599
|
+
</svg>
|
|
6600
|
+
</button>
|
|
6601
|
+
</ng-template>
|
|
6602
|
+
<ng-template #expandedTable>
|
|
6603
|
+
<div class="cortex-table-block__expanded" [innerHTML]="markdown() | marked"></div>
|
|
6604
|
+
</ng-template>
|
|
6605
|
+
`,
|
|
6606
|
+
dependencies: [
|
|
6607
|
+
{
|
|
6608
|
+
kind: "component",
|
|
6609
|
+
type: ExpandableComponent,
|
|
6610
|
+
selector: "cortex-expandable",
|
|
6611
|
+
inputs: [
|
|
6612
|
+
"label",
|
|
6613
|
+
"ready",
|
|
6614
|
+
"actions",
|
|
6615
|
+
"expanded"
|
|
6616
|
+
]
|
|
6617
|
+
},
|
|
6618
|
+
{
|
|
6619
|
+
kind: "pipe",
|
|
6620
|
+
type: MarkedPipe,
|
|
6621
|
+
name: "marked"
|
|
6622
|
+
},
|
|
6623
|
+
{
|
|
6624
|
+
kind: "pipe",
|
|
6625
|
+
type: TranslatePipe,
|
|
6626
|
+
name: "translate"
|
|
6627
|
+
}
|
|
6628
|
+
],
|
|
6066
6629
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
6067
6630
|
encapsulation: i0.ViewEncapsulation.None
|
|
6068
6631
|
});
|
|
@@ -6078,93 +6641,42 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6078
6641
|
selector: "cortex-table-block",
|
|
6079
6642
|
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
6080
6643
|
encapsulation: ViewEncapsulation2.None,
|
|
6081
|
-
imports: [
|
|
6644
|
+
imports: [
|
|
6645
|
+
ExpandableComponent,
|
|
6646
|
+
MarkedPipe,
|
|
6647
|
+
TranslatePipe
|
|
6648
|
+
],
|
|
6082
6649
|
host: { class: "cortex-table-block" },
|
|
6083
|
-
template: `<
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
[attr.aria-label]="'translate_table_expand' | translate"
|
|
6089
|
-
[title]="'translate_table_expand' | translate"
|
|
6090
|
-
(click)="expand()"
|
|
6091
|
-
>
|
|
6092
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6093
|
-
<path
|
|
6094
|
-
d="M9.5 2.5h4v4M6.5 13.5h-4v-4M13.5 2.5 9 7M2.5 13.5 7 9"
|
|
6095
|
-
stroke="currentColor"
|
|
6096
|
-
stroke-width="1.3"
|
|
6097
|
-
stroke-linecap="round"
|
|
6098
|
-
stroke-linejoin="round"
|
|
6099
|
-
/>
|
|
6100
|
-
</svg>
|
|
6101
|
-
</button>
|
|
6102
|
-
<button
|
|
6103
|
-
type="button"
|
|
6104
|
-
class="cortex-table-block__action"
|
|
6105
|
-
[attr.aria-label]="'translate_table_export' | translate"
|
|
6106
|
-
[title]="'translate_table_export' | translate"
|
|
6107
|
-
(click)="export()"
|
|
6108
|
-
>
|
|
6109
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6110
|
-
<path
|
|
6111
|
-
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6112
|
-
stroke="currentColor"
|
|
6113
|
-
stroke-width="1.3"
|
|
6114
|
-
stroke-linecap="round"
|
|
6115
|
-
stroke-linejoin="round"
|
|
6116
|
-
/>
|
|
6117
|
-
</svg>
|
|
6118
|
-
</button>
|
|
6119
|
-
}
|
|
6120
|
-
</div>
|
|
6121
|
-
<div #frame [innerHTML]="markdown() | marked"></div>
|
|
6122
|
-
<!-- The dialog closes itself on Escape. -->
|
|
6123
|
-
<dialog
|
|
6124
|
-
#dialog
|
|
6125
|
-
class="cortex-table-block__dialog"
|
|
6126
|
-
[attr.aria-label]="'translate_table_expand' | translate"
|
|
6127
|
-
(close)="expanded.set(false)"
|
|
6650
|
+
template: `<cortex-expandable
|
|
6651
|
+
[label]="'translate_table' | translate"
|
|
6652
|
+
[ready]="closed()"
|
|
6653
|
+
[actions]="exportAction"
|
|
6654
|
+
[expanded]="expandedTable"
|
|
6128
6655
|
>
|
|
6129
|
-
<div
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
>
|
|
6154
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6155
|
-
<path
|
|
6156
|
-
d="M4 4l8 8M12 4l-8 8"
|
|
6157
|
-
stroke="currentColor"
|
|
6158
|
-
stroke-width="1.4"
|
|
6159
|
-
stroke-linecap="round"
|
|
6160
|
-
/>
|
|
6161
|
-
</svg>
|
|
6162
|
-
</button>
|
|
6163
|
-
</div>
|
|
6164
|
-
@if (expanded()) {
|
|
6165
|
-
<div class="cortex-table-block__dialog-body" [innerHTML]="markdown() | marked"></div>
|
|
6166
|
-
}
|
|
6167
|
-
</dialog>
|
|
6656
|
+
<div #frame [innerHTML]="markdown() | marked"></div>
|
|
6657
|
+
</cortex-expandable>
|
|
6658
|
+
<ng-template #exportAction>
|
|
6659
|
+
<button
|
|
6660
|
+
type="button"
|
|
6661
|
+
class="cortex-expandable__action"
|
|
6662
|
+
[attr.aria-label]="'translate_table_export' | translate"
|
|
6663
|
+
[title]="'translate_table_export' | translate"
|
|
6664
|
+
(click)="export()"
|
|
6665
|
+
>
|
|
6666
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
6667
|
+
<path
|
|
6668
|
+
d="M8 2.5v7.5M5 7l3 3 3-3M2.75 11v1.25a1.25 1.25 0 0 0 1.25 1.25h8a1.25 1.25 0 0 0 1.25-1.25V11"
|
|
6669
|
+
stroke="currentColor"
|
|
6670
|
+
stroke-width="1.3"
|
|
6671
|
+
stroke-linecap="round"
|
|
6672
|
+
stroke-linejoin="round"
|
|
6673
|
+
/>
|
|
6674
|
+
</svg>
|
|
6675
|
+
</button>
|
|
6676
|
+
</ng-template>
|
|
6677
|
+
<ng-template #expandedTable>
|
|
6678
|
+
<div class="cortex-table-block__expanded" [innerHTML]="markdown() | marked"></div>
|
|
6679
|
+
</ng-template>
|
|
6168
6680
|
`
|
|
6169
6681
|
}]
|
|
6170
6682
|
}],
|
|
@@ -6188,10 +6700,6 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6188
6700
|
frame: [{
|
|
6189
6701
|
type: i0.ViewChild,
|
|
6190
6702
|
args: ["frame", { isSignal: true }]
|
|
6191
|
-
}],
|
|
6192
|
-
dialog: [{
|
|
6193
|
-
type: i0.ViewChild,
|
|
6194
|
-
args: ["dialog", { isSignal: true }]
|
|
6195
6703
|
}]
|
|
6196
6704
|
}
|
|
6197
6705
|
});
|
|
@@ -7388,7 +7896,6 @@ var ApprovalCardComponent = class ApprovalCardComponent2 {
|
|
|
7388
7896
|
card = computed(() => approvalCard(this.toolCallPart(), this.locale()), ...ngDevMode ? [{ debugName: "card" }] : []);
|
|
7389
7897
|
outcome = computed(() => toolCallAnimation(this.toolCallPart()), ...ngDevMode ? [{ debugName: "outcome" }] : []);
|
|
7390
7898
|
sentenceId = computed(() => `cortex-approval-${this.toolCallPart().id}`, ...ngDevMode ? [{ debugName: "sentenceId" }] : []);
|
|
7391
|
-
detailsOpen = signal(false, ...ngDevMode ? [{ debugName: "detailsOpen" }] : []);
|
|
7392
7899
|
respond(approved) {
|
|
7393
7900
|
this.chatService.respondToApproval(approvalIdOf(this.toolCallPart()), approved);
|
|
7394
7901
|
}
|
|
@@ -7479,29 +7986,7 @@ var ApprovalCardComponent = class ApprovalCardComponent2 {
|
|
|
7479
7986
|
<span class="cortex-approval-card__decision">{{ key | translate }}</span>
|
|
7480
7987
|
}
|
|
7481
7988
|
<span class="cortex-approval-card__summary">{{ view.sentence }}</span>
|
|
7482
|
-
<button
|
|
7483
|
-
type="button"
|
|
7484
|
-
class="cortex-approval-card__details"
|
|
7485
|
-
[attr.aria-expanded]="detailsOpen()"
|
|
7486
|
-
(click)="detailsOpen.set(!detailsOpen())"
|
|
7487
|
-
>
|
|
7488
|
-
{{ 'translate_details' | translate }}
|
|
7489
|
-
</button>
|
|
7490
7989
|
</div>
|
|
7491
|
-
<!-- The line cuts a long action short; Details shows all of it. -->
|
|
7492
|
-
@if (detailsOpen()) {
|
|
7493
|
-
<p class="cortex-approval-card__sentence cortex-approval-card__sentence--full">
|
|
7494
|
-
{{ view.sentence }}
|
|
7495
|
-
</p>
|
|
7496
|
-
}
|
|
7497
|
-
}
|
|
7498
|
-
@if (view.rows.length && (pending || detailsOpen())) {
|
|
7499
|
-
<dl class="cortex-approval-card__rows">
|
|
7500
|
-
@for (row of view.rows; track row.key) {
|
|
7501
|
-
<dt>{{ row.label }}</dt>
|
|
7502
|
-
<dd>{{ row.value }}</dd>
|
|
7503
|
-
}
|
|
7504
|
-
</dl>
|
|
7505
7990
|
}
|
|
7506
7991
|
@if (pending && asking()) {
|
|
7507
7992
|
<div class="cortex-approval-card__foot">
|
|
@@ -7602,29 +8087,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
7602
8087
|
<span class="cortex-approval-card__decision">{{ key | translate }}</span>
|
|
7603
8088
|
}
|
|
7604
8089
|
<span class="cortex-approval-card__summary">{{ view.sentence }}</span>
|
|
7605
|
-
<button
|
|
7606
|
-
type="button"
|
|
7607
|
-
class="cortex-approval-card__details"
|
|
7608
|
-
[attr.aria-expanded]="detailsOpen()"
|
|
7609
|
-
(click)="detailsOpen.set(!detailsOpen())"
|
|
7610
|
-
>
|
|
7611
|
-
{{ 'translate_details' | translate }}
|
|
7612
|
-
</button>
|
|
7613
8090
|
</div>
|
|
7614
|
-
<!-- The line cuts a long action short; Details shows all of it. -->
|
|
7615
|
-
@if (detailsOpen()) {
|
|
7616
|
-
<p class="cortex-approval-card__sentence cortex-approval-card__sentence--full">
|
|
7617
|
-
{{ view.sentence }}
|
|
7618
|
-
</p>
|
|
7619
|
-
}
|
|
7620
|
-
}
|
|
7621
|
-
@if (view.rows.length && (pending || detailsOpen())) {
|
|
7622
|
-
<dl class="cortex-approval-card__rows">
|
|
7623
|
-
@for (row of view.rows; track row.key) {
|
|
7624
|
-
<dt>{{ row.label }}</dt>
|
|
7625
|
-
<dd>{{ row.value }}</dd>
|
|
7626
|
-
}
|
|
7627
|
-
</dl>
|
|
7628
8091
|
}
|
|
7629
8092
|
@if (pending && asking()) {
|
|
7630
8093
|
<div class="cortex-approval-card__foot">
|
|
@@ -10579,19 +11042,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10579
11042
|
}]
|
|
10580
11043
|
});
|
|
10581
11044
|
var ThreadListComponent = class ThreadListComponent2 {
|
|
10582
|
-
|
|
10583
|
-
threadSelected = output();
|
|
10584
|
-
newChatRequested = output();
|
|
10585
|
-
backRequested = output();
|
|
10586
|
-
threadService = inject(CortexThreadService);
|
|
10587
|
-
chatService = inject(CortexChatService);
|
|
11045
|
+
context = input.required(...ngDevMode ? [{ debugName: "context" }] : []);
|
|
10588
11046
|
locale = inject(CORTEX_LOCALE);
|
|
10589
11047
|
deleteThread(event, threadId) {
|
|
10590
11048
|
event.stopPropagation();
|
|
10591
|
-
this.
|
|
10592
|
-
}
|
|
10593
|
-
countKey(count2) {
|
|
10594
|
-
return pluralKey(count2, "translate_one_conversation", "translate_n_conversations");
|
|
11049
|
+
this.context().deleteThread(threadId);
|
|
10595
11050
|
}
|
|
10596
11051
|
relativeTime(iso) {
|
|
10597
11052
|
return timeLabel(iso, this.locale());
|
|
@@ -10610,204 +11065,147 @@ var ThreadListComponent = class ThreadListComponent2 {
|
|
|
10610
11065
|
type: ThreadListComponent2,
|
|
10611
11066
|
isStandalone: true,
|
|
10612
11067
|
selector: "cortex-thread-list",
|
|
10613
|
-
inputs: {
|
|
10614
|
-
classPropertyName: "
|
|
10615
|
-
publicName: "
|
|
11068
|
+
inputs: { context: {
|
|
11069
|
+
classPropertyName: "context",
|
|
11070
|
+
publicName: "context",
|
|
10616
11071
|
isSignal: true,
|
|
10617
|
-
isRequired:
|
|
11072
|
+
isRequired: true,
|
|
10618
11073
|
transformFunction: null
|
|
10619
11074
|
} },
|
|
10620
|
-
|
|
10621
|
-
threadSelected: "threadSelected",
|
|
10622
|
-
newChatRequested: "newChatRequested",
|
|
10623
|
-
backRequested: "backRequested"
|
|
10624
|
-
},
|
|
11075
|
+
host: { classAttribute: "cortex-widget__threads-list" },
|
|
10625
11076
|
ngImport: i0,
|
|
10626
|
-
template: `@let
|
|
10627
|
-
@let
|
|
10628
|
-
|
|
10629
|
-
<!--
|
|
10630
|
-
|
|
10631
|
-
@if (
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10647
|
-
|
|
11077
|
+
template: `@let list = context();
|
|
11078
|
+
@let threads = list.threads;
|
|
11079
|
+
|
|
11080
|
+
<!-- The loading, listed and empty states are siblings rather than an if/else
|
|
11081
|
+
ladder, so the row markup sits one level shallower. -->
|
|
11082
|
+
@if (threads === undefined) {
|
|
11083
|
+
@for (i of [1, 2, 3, 4]; track i) {
|
|
11084
|
+
<div class="cortex-widget__thread-skeleton">
|
|
11085
|
+
<div class="cortex-skeleton cortex-widget__thread-skeleton-icon"></div>
|
|
11086
|
+
<div class="cortex-widget__thread-skeleton-lines">
|
|
11087
|
+
<div
|
|
11088
|
+
class="cortex-skeleton cortex-widget__thread-skeleton-line"
|
|
11089
|
+
[style.width]="40 + i * 12 + '%'"
|
|
11090
|
+
></div>
|
|
11091
|
+
</div>
|
|
11092
|
+
</div>
|
|
11093
|
+
}
|
|
11094
|
+
}
|
|
11095
|
+
|
|
11096
|
+
@for (thread of threads ?? []; track thread.id) {
|
|
11097
|
+
@let isActive = thread.id === list.selectedThreadId;
|
|
11098
|
+
<button
|
|
11099
|
+
(click)="list.openThread(thread)"
|
|
11100
|
+
class="cortex-widget__thread-item"
|
|
11101
|
+
[class.cortex-widget__thread-item--active]="isActive"
|
|
11102
|
+
>
|
|
11103
|
+
<div class="cortex-widget__thread-icon" [class.cortex-widget__thread-icon--active]="isActive">
|
|
11104
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none">
|
|
11105
|
+
<!-- Rounded speech bubble with a tail, on the shared 16x16 icon grid. -->
|
|
10648
11106
|
<path
|
|
10649
|
-
d="
|
|
11107
|
+
d="M13.5 7.6c0 2.4-2.5 4.4-5.5 4.4-.6 0-1.2-.08-1.7-.23L3 13l.8-2.3C3 9.8 2.5 8.7 2.5 7.6 2.5 5.2 5 3.2 8 3.2s5.5 2 5.5 4.4Z"
|
|
10650
11108
|
stroke="currentColor"
|
|
10651
|
-
stroke-width="1.
|
|
11109
|
+
stroke-width="1.3"
|
|
10652
11110
|
stroke-linecap="round"
|
|
10653
11111
|
stroke-linejoin="round"
|
|
10654
11112
|
/>
|
|
10655
11113
|
</svg>
|
|
10656
|
-
</button>
|
|
10657
|
-
|
|
10658
|
-
<div>
|
|
10659
|
-
<h2 class="cortex-widget__threads-title">
|
|
10660
|
-
{{ 'translate_history' | translate }}
|
|
10661
|
-
</h2>
|
|
10662
|
-
<p class="cortex-widget__threads-count">
|
|
10663
|
-
{{ countKey(threadCount) | translate: { count: threadCount } }}
|
|
10664
|
-
</p>
|
|
10665
11114
|
</div>
|
|
10666
|
-
<button
|
|
10667
|
-
type="button"
|
|
10668
|
-
(click)="newChatRequested.emit()"
|
|
10669
|
-
[attr.aria-label]="'translate_new_chat' | translate"
|
|
10670
|
-
[title]="'translate_new_chat' | translate"
|
|
10671
|
-
class="cortex-widget__header-btn cortex-widget__new-btn"
|
|
10672
|
-
>
|
|
10673
|
-
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
10674
|
-
<path d="M8 3v10M3 8h10" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" />
|
|
10675
|
-
</svg>
|
|
10676
|
-
</button>
|
|
10677
|
-
</div>
|
|
10678
|
-
}
|
|
10679
|
-
|
|
10680
|
-
<div class="cortex-widget__threads-list">
|
|
10681
|
-
<!-- The loading, listed and empty states are siblings rather than an if/else
|
|
10682
|
-
ladder, so the row markup sits one level shallower. -->
|
|
10683
|
-
@if (threads === undefined) {
|
|
10684
|
-
@for (i of [1, 2, 3, 4]; track i) {
|
|
10685
|
-
<div class="cortex-widget__thread-skeleton">
|
|
10686
|
-
<div class="cortex-skeleton cortex-widget__thread-skeleton-icon"></div>
|
|
10687
|
-
<div class="cortex-widget__thread-skeleton-lines">
|
|
10688
|
-
<div
|
|
10689
|
-
class="cortex-skeleton cortex-widget__thread-skeleton-line"
|
|
10690
|
-
[style.width]="40 + i * 12 + '%'"
|
|
10691
|
-
></div>
|
|
10692
|
-
</div>
|
|
10693
|
-
</div>
|
|
10694
|
-
}
|
|
10695
|
-
}
|
|
10696
11115
|
|
|
10697
|
-
|
|
10698
|
-
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
<svg width="14" height="14" viewBox="0 0 16 16" fill="none">
|
|
10706
|
-
<!-- Rounded speech bubble with a tail, on the shared 16x16 icon grid. -->
|
|
10707
|
-
<path
|
|
10708
|
-
d="M13.5 7.6c0 2.4-2.5 4.4-5.5 4.4-.6 0-1.2-.08-1.7-.23L3 13l.8-2.3C3 9.8 2.5 8.7 2.5 7.6 2.5 5.2 5 3.2 8 3.2s5.5 2 5.5 4.4Z"
|
|
10709
|
-
stroke="currentColor"
|
|
10710
|
-
stroke-width="1.3"
|
|
10711
|
-
stroke-linecap="round"
|
|
10712
|
-
stroke-linejoin="round"
|
|
10713
|
-
/>
|
|
10714
|
-
</svg>
|
|
10715
|
-
</div>
|
|
11116
|
+
<div class="cortex-widget__thread-info">
|
|
11117
|
+
<div class="cortex-widget__thread-title-row">
|
|
11118
|
+
<p
|
|
11119
|
+
class="cortex-widget__thread-title"
|
|
11120
|
+
[class.cortex-widget__thread-title--active]="isActive"
|
|
11121
|
+
>
|
|
11122
|
+
{{ thread.title ?? ('translate_untitled' | translate) }}
|
|
11123
|
+
</p>
|
|
10716
11124
|
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
class
|
|
10721
|
-
[class.cortex-widget__thread-title--active]="isActive"
|
|
11125
|
+
@if (thread.isRunning) {
|
|
11126
|
+
<span
|
|
11127
|
+
class="cortex-widget__thread-running"
|
|
11128
|
+
[class.cortex-widget__thread-running--active]="isActive"
|
|
10722
11129
|
>
|
|
10723
|
-
|
|
10724
|
-
|
|
10725
|
-
|
|
10726
|
-
@if (thread.isRunning) {
|
|
10727
|
-
<span
|
|
10728
|
-
class="cortex-widget__thread-running"
|
|
10729
|
-
[class.cortex-widget__thread-running--active]="isActive"
|
|
10730
|
-
>
|
|
10731
|
-
<span class="cortex-widget__thread-running-dot"></span>
|
|
10732
|
-
{{ 'translate_running' | translate }}
|
|
10733
|
-
</span>
|
|
10734
|
-
}
|
|
10735
|
-
</div>
|
|
10736
|
-
|
|
10737
|
-
@let time = relativeTime(thread.updatedAt);
|
|
10738
|
-
@if (time) {
|
|
10739
|
-
<p class="cortex-widget__thread-time">{{ time }}</p>
|
|
11130
|
+
<span class="cortex-widget__thread-running-dot"></span>
|
|
11131
|
+
{{ 'translate_running' | translate }}
|
|
11132
|
+
</span>
|
|
10740
11133
|
}
|
|
10741
11134
|
</div>
|
|
10742
11135
|
|
|
10743
|
-
|
|
10744
|
-
|
|
10745
|
-
class="cortex-widget__thread-
|
|
10746
|
-
|
|
10747
|
-
|
|
10748
|
-
<svg width="12" height="12" viewBox="0 0 16 16" fill="none">
|
|
10749
|
-
<path
|
|
10750
|
-
d="M4 4l8 8M12 4l-8 8"
|
|
10751
|
-
stroke="currentColor"
|
|
10752
|
-
stroke-width="1.3"
|
|
10753
|
-
stroke-linecap="round"
|
|
10754
|
-
/>
|
|
10755
|
-
</svg>
|
|
10756
|
-
</button>
|
|
11136
|
+
@let time = relativeTime(thread.updatedAt);
|
|
11137
|
+
@if (time) {
|
|
11138
|
+
<p class="cortex-widget__thread-time">{{ time }}</p>
|
|
11139
|
+
}
|
|
11140
|
+
</div>
|
|
10757
11141
|
|
|
10758
|
-
|
|
10759
|
-
|
|
10760
|
-
|
|
10761
|
-
|
|
10762
|
-
|
|
10763
|
-
|
|
10764
|
-
fill="none"
|
|
10765
|
-
>
|
|
11142
|
+
<button
|
|
11143
|
+
(click)="deleteThread($event, thread.id)"
|
|
11144
|
+
class="cortex-widget__thread-delete"
|
|
11145
|
+
[class.cortex-widget__thread-delete--active]="isActive"
|
|
11146
|
+
>
|
|
11147
|
+
<svg width="12" height="12" viewBox="0 0 16 16" fill="none">
|
|
10766
11148
|
<path
|
|
10767
|
-
d="
|
|
11149
|
+
d="M4 4l8 8M12 4l-8 8"
|
|
10768
11150
|
stroke="currentColor"
|
|
10769
|
-
stroke-width="1.
|
|
11151
|
+
stroke-width="1.3"
|
|
10770
11152
|
stroke-linecap="round"
|
|
10771
|
-
stroke-linejoin="round"
|
|
10772
11153
|
/>
|
|
10773
11154
|
</svg>
|
|
10774
11155
|
</button>
|
|
10775
|
-
}
|
|
10776
11156
|
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
|
|
10785
|
-
|
|
10786
|
-
|
|
10787
|
-
|
|
10788
|
-
|
|
10789
|
-
|
|
10790
|
-
|
|
10791
|
-
|
|
10792
|
-
|
|
10793
|
-
|
|
10794
|
-
|
|
10795
|
-
|
|
10796
|
-
|
|
10797
|
-
|
|
10798
|
-
|
|
10799
|
-
<
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
|
|
10803
|
-
|
|
10804
|
-
class="cortex-
|
|
11157
|
+
<svg
|
|
11158
|
+
class="cortex-widget__thread-arrow"
|
|
11159
|
+
[class.cortex-widget__thread-arrow--active]="isActive"
|
|
11160
|
+
width="10"
|
|
11161
|
+
height="10"
|
|
11162
|
+
viewBox="0 0 16 16"
|
|
11163
|
+
fill="none"
|
|
11164
|
+
>
|
|
11165
|
+
<path
|
|
11166
|
+
d="M6 4l4 4-4 4"
|
|
11167
|
+
stroke="currentColor"
|
|
11168
|
+
stroke-width="1.5"
|
|
11169
|
+
stroke-linecap="round"
|
|
11170
|
+
stroke-linejoin="round"
|
|
11171
|
+
/>
|
|
11172
|
+
</svg>
|
|
11173
|
+
</button>
|
|
11174
|
+
}
|
|
11175
|
+
|
|
11176
|
+
@if (threads?.length === 0) {
|
|
11177
|
+
<div class="cortex-widget__threads-empty">
|
|
11178
|
+
<div class="cortex-widget__threads-empty-icon">
|
|
11179
|
+
<svg
|
|
11180
|
+
width="18"
|
|
11181
|
+
height="18"
|
|
11182
|
+
viewBox="0 0 16 16"
|
|
11183
|
+
fill="none"
|
|
11184
|
+
class="cortex-widget__threads-empty-svg"
|
|
10805
11185
|
>
|
|
10806
|
-
|
|
10807
|
-
|
|
11186
|
+
<path
|
|
11187
|
+
d="M13.5 7.6c0 2.4-2.5 4.4-5.5 4.4-.6 0-1.2-.08-1.7-.23L3 13l.8-2.3C3 9.8 2.5 8.7 2.5 7.6 2.5 5.2 5 3.2 8 3.2s5.5 2 5.5 4.4Z"
|
|
11188
|
+
stroke="currentColor"
|
|
11189
|
+
stroke-width="1.3"
|
|
11190
|
+
stroke-linecap="round"
|
|
11191
|
+
stroke-linejoin="round"
|
|
11192
|
+
/>
|
|
11193
|
+
</svg>
|
|
10808
11194
|
</div>
|
|
10809
|
-
|
|
10810
|
-
|
|
11195
|
+
<p class="cortex-widget__threads-empty-title">
|
|
11196
|
+
{{ 'translate_no_threads_yet' | translate }}
|
|
11197
|
+
</p>
|
|
11198
|
+
<p class="cortex-widget__threads-empty-subtitle">
|
|
11199
|
+
{{ 'translate_start_a_new_conversation' | translate }}
|
|
11200
|
+
</p>
|
|
11201
|
+
<button
|
|
11202
|
+
(click)="list.newChat()"
|
|
11203
|
+
class="cortex-widget__new-chat-btn cortex-widget__new-chat-btn--empty-state"
|
|
11204
|
+
>
|
|
11205
|
+
{{ 'translate_new_chat' | translate }}
|
|
11206
|
+
</button>
|
|
11207
|
+
</div>
|
|
11208
|
+
}
|
|
10811
11209
|
`,
|
|
10812
11210
|
dependencies: [{
|
|
10813
11211
|
kind: "pipe",
|
|
@@ -10830,219 +11228,160 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
10830
11228
|
imports: [TranslatePipe],
|
|
10831
11229
|
changeDetection: ChangeDetectionStrategy2.OnPush,
|
|
10832
11230
|
encapsulation: ViewEncapsulation2.None,
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
|
|
10837
|
-
|
|
10838
|
-
|
|
10839
|
-
|
|
10840
|
-
|
|
10841
|
-
<
|
|
10842
|
-
|
|
10843
|
-
|
|
10844
|
-
|
|
10845
|
-
|
|
10846
|
-
|
|
10847
|
-
|
|
10848
|
-
|
|
10849
|
-
|
|
10850
|
-
|
|
10851
|
-
|
|
10852
|
-
|
|
10853
|
-
|
|
10854
|
-
|
|
11231
|
+
host: { class: "cortex-widget__threads-list" },
|
|
11232
|
+
template: `@let list = context();
|
|
11233
|
+
@let threads = list.threads;
|
|
11234
|
+
|
|
11235
|
+
<!-- The loading, listed and empty states are siblings rather than an if/else
|
|
11236
|
+
ladder, so the row markup sits one level shallower. -->
|
|
11237
|
+
@if (threads === undefined) {
|
|
11238
|
+
@for (i of [1, 2, 3, 4]; track i) {
|
|
11239
|
+
<div class="cortex-widget__thread-skeleton">
|
|
11240
|
+
<div class="cortex-skeleton cortex-widget__thread-skeleton-icon"></div>
|
|
11241
|
+
<div class="cortex-widget__thread-skeleton-lines">
|
|
11242
|
+
<div
|
|
11243
|
+
class="cortex-skeleton cortex-widget__thread-skeleton-line"
|
|
11244
|
+
[style.width]="40 + i * 12 + '%'"
|
|
11245
|
+
></div>
|
|
11246
|
+
</div>
|
|
11247
|
+
</div>
|
|
11248
|
+
}
|
|
11249
|
+
}
|
|
11250
|
+
|
|
11251
|
+
@for (thread of threads ?? []; track thread.id) {
|
|
11252
|
+
@let isActive = thread.id === list.selectedThreadId;
|
|
11253
|
+
<button
|
|
11254
|
+
(click)="list.openThread(thread)"
|
|
11255
|
+
class="cortex-widget__thread-item"
|
|
11256
|
+
[class.cortex-widget__thread-item--active]="isActive"
|
|
11257
|
+
>
|
|
11258
|
+
<div class="cortex-widget__thread-icon" [class.cortex-widget__thread-icon--active]="isActive">
|
|
11259
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="none">
|
|
11260
|
+
<!-- Rounded speech bubble with a tail, on the shared 16x16 icon grid. -->
|
|
10855
11261
|
<path
|
|
10856
|
-
d="
|
|
11262
|
+
d="M13.5 7.6c0 2.4-2.5 4.4-5.5 4.4-.6 0-1.2-.08-1.7-.23L3 13l.8-2.3C3 9.8 2.5 8.7 2.5 7.6 2.5 5.2 5 3.2 8 3.2s5.5 2 5.5 4.4Z"
|
|
10857
11263
|
stroke="currentColor"
|
|
10858
|
-
stroke-width="1.
|
|
11264
|
+
stroke-width="1.3"
|
|
10859
11265
|
stroke-linecap="round"
|
|
10860
11266
|
stroke-linejoin="round"
|
|
10861
11267
|
/>
|
|
10862
11268
|
</svg>
|
|
10863
|
-
</
|
|
11269
|
+
</div>
|
|
10864
11270
|
|
|
10865
|
-
<div>
|
|
10866
|
-
<
|
|
10867
|
-
|
|
10868
|
-
|
|
10869
|
-
|
|
10870
|
-
|
|
10871
|
-
|
|
11271
|
+
<div class="cortex-widget__thread-info">
|
|
11272
|
+
<div class="cortex-widget__thread-title-row">
|
|
11273
|
+
<p
|
|
11274
|
+
class="cortex-widget__thread-title"
|
|
11275
|
+
[class.cortex-widget__thread-title--active]="isActive"
|
|
11276
|
+
>
|
|
11277
|
+
{{ thread.title ?? ('translate_untitled' | translate) }}
|
|
11278
|
+
</p>
|
|
11279
|
+
|
|
11280
|
+
@if (thread.isRunning) {
|
|
11281
|
+
<span
|
|
11282
|
+
class="cortex-widget__thread-running"
|
|
11283
|
+
[class.cortex-widget__thread-running--active]="isActive"
|
|
11284
|
+
>
|
|
11285
|
+
<span class="cortex-widget__thread-running-dot"></span>
|
|
11286
|
+
{{ 'translate_running' | translate }}
|
|
11287
|
+
</span>
|
|
11288
|
+
}
|
|
11289
|
+
</div>
|
|
11290
|
+
|
|
11291
|
+
@let time = relativeTime(thread.updatedAt);
|
|
11292
|
+
@if (time) {
|
|
11293
|
+
<p class="cortex-widget__thread-time">{{ time }}</p>
|
|
11294
|
+
}
|
|
10872
11295
|
</div>
|
|
11296
|
+
|
|
10873
11297
|
<button
|
|
10874
|
-
|
|
10875
|
-
|
|
10876
|
-
[
|
|
10877
|
-
[title]="'translate_new_chat' | translate"
|
|
10878
|
-
class="cortex-widget__header-btn cortex-widget__new-btn"
|
|
11298
|
+
(click)="deleteThread($event, thread.id)"
|
|
11299
|
+
class="cortex-widget__thread-delete"
|
|
11300
|
+
[class.cortex-widget__thread-delete--active]="isActive"
|
|
10879
11301
|
>
|
|
10880
|
-
<svg width="
|
|
10881
|
-
<path
|
|
11302
|
+
<svg width="12" height="12" viewBox="0 0 16 16" fill="none">
|
|
11303
|
+
<path
|
|
11304
|
+
d="M4 4l8 8M12 4l-8 8"
|
|
11305
|
+
stroke="currentColor"
|
|
11306
|
+
stroke-width="1.3"
|
|
11307
|
+
stroke-linecap="round"
|
|
11308
|
+
/>
|
|
10882
11309
|
</svg>
|
|
10883
11310
|
</button>
|
|
10884
|
-
</div>
|
|
10885
|
-
}
|
|
10886
|
-
|
|
10887
|
-
<div class="cortex-widget__threads-list">
|
|
10888
|
-
<!-- The loading, listed and empty states are siblings rather than an if/else
|
|
10889
|
-
ladder, so the row markup sits one level shallower. -->
|
|
10890
|
-
@if (threads === undefined) {
|
|
10891
|
-
@for (i of [1, 2, 3, 4]; track i) {
|
|
10892
|
-
<div class="cortex-widget__thread-skeleton">
|
|
10893
|
-
<div class="cortex-skeleton cortex-widget__thread-skeleton-icon"></div>
|
|
10894
|
-
<div class="cortex-widget__thread-skeleton-lines">
|
|
10895
|
-
<div
|
|
10896
|
-
class="cortex-skeleton cortex-widget__thread-skeleton-line"
|
|
10897
|
-
[style.width]="40 + i * 12 + '%'"
|
|
10898
|
-
></div>
|
|
10899
|
-
</div>
|
|
10900
|
-
</div>
|
|
10901
|
-
}
|
|
10902
|
-
}
|
|
10903
11311
|
|
|
10904
|
-
|
|
10905
|
-
|
|
10906
|
-
|
|
10907
|
-
|
|
10908
|
-
|
|
10909
|
-
|
|
11312
|
+
<svg
|
|
11313
|
+
class="cortex-widget__thread-arrow"
|
|
11314
|
+
[class.cortex-widget__thread-arrow--active]="isActive"
|
|
11315
|
+
width="10"
|
|
11316
|
+
height="10"
|
|
11317
|
+
viewBox="0 0 16 16"
|
|
11318
|
+
fill="none"
|
|
10910
11319
|
>
|
|
10911
|
-
<
|
|
10912
|
-
|
|
10913
|
-
|
|
10914
|
-
|
|
10915
|
-
|
|
10916
|
-
|
|
10917
|
-
|
|
10918
|
-
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
</svg>
|
|
10922
|
-
</div>
|
|
10923
|
-
|
|
10924
|
-
<div class="cortex-widget__thread-info">
|
|
10925
|
-
<div class="cortex-widget__thread-title-row">
|
|
10926
|
-
<p
|
|
10927
|
-
class="cortex-widget__thread-title"
|
|
10928
|
-
[class.cortex-widget__thread-title--active]="isActive"
|
|
10929
|
-
>
|
|
10930
|
-
{{ thread.title ?? ('translate_untitled' | translate) }}
|
|
10931
|
-
</p>
|
|
10932
|
-
|
|
10933
|
-
@if (thread.isRunning) {
|
|
10934
|
-
<span
|
|
10935
|
-
class="cortex-widget__thread-running"
|
|
10936
|
-
[class.cortex-widget__thread-running--active]="isActive"
|
|
10937
|
-
>
|
|
10938
|
-
<span class="cortex-widget__thread-running-dot"></span>
|
|
10939
|
-
{{ 'translate_running' | translate }}
|
|
10940
|
-
</span>
|
|
10941
|
-
}
|
|
10942
|
-
</div>
|
|
10943
|
-
|
|
10944
|
-
@let time = relativeTime(thread.updatedAt);
|
|
10945
|
-
@if (time) {
|
|
10946
|
-
<p class="cortex-widget__thread-time">{{ time }}</p>
|
|
10947
|
-
}
|
|
10948
|
-
</div>
|
|
10949
|
-
|
|
10950
|
-
<button
|
|
10951
|
-
(click)="deleteThread($event, thread.id)"
|
|
10952
|
-
class="cortex-widget__thread-delete"
|
|
10953
|
-
[class.cortex-widget__thread-delete--active]="isActive"
|
|
10954
|
-
>
|
|
10955
|
-
<svg width="12" height="12" viewBox="0 0 16 16" fill="none">
|
|
10956
|
-
<path
|
|
10957
|
-
d="M4 4l8 8M12 4l-8 8"
|
|
10958
|
-
stroke="currentColor"
|
|
10959
|
-
stroke-width="1.3"
|
|
10960
|
-
stroke-linecap="round"
|
|
10961
|
-
/>
|
|
10962
|
-
</svg>
|
|
10963
|
-
</button>
|
|
11320
|
+
<path
|
|
11321
|
+
d="M6 4l4 4-4 4"
|
|
11322
|
+
stroke="currentColor"
|
|
11323
|
+
stroke-width="1.5"
|
|
11324
|
+
stroke-linecap="round"
|
|
11325
|
+
stroke-linejoin="round"
|
|
11326
|
+
/>
|
|
11327
|
+
</svg>
|
|
11328
|
+
</button>
|
|
11329
|
+
}
|
|
10964
11330
|
|
|
11331
|
+
@if (threads?.length === 0) {
|
|
11332
|
+
<div class="cortex-widget__threads-empty">
|
|
11333
|
+
<div class="cortex-widget__threads-empty-icon">
|
|
10965
11334
|
<svg
|
|
10966
|
-
|
|
10967
|
-
|
|
10968
|
-
width="10"
|
|
10969
|
-
height="10"
|
|
11335
|
+
width="18"
|
|
11336
|
+
height="18"
|
|
10970
11337
|
viewBox="0 0 16 16"
|
|
10971
11338
|
fill="none"
|
|
11339
|
+
class="cortex-widget__threads-empty-svg"
|
|
10972
11340
|
>
|
|
10973
11341
|
<path
|
|
10974
|
-
d="
|
|
11342
|
+
d="M13.5 7.6c0 2.4-2.5 4.4-5.5 4.4-.6 0-1.2-.08-1.7-.23L3 13l.8-2.3C3 9.8 2.5 8.7 2.5 7.6 2.5 5.2 5 3.2 8 3.2s5.5 2 5.5 4.4Z"
|
|
10975
11343
|
stroke="currentColor"
|
|
10976
|
-
stroke-width="1.
|
|
11344
|
+
stroke-width="1.3"
|
|
10977
11345
|
stroke-linecap="round"
|
|
10978
11346
|
stroke-linejoin="round"
|
|
10979
11347
|
/>
|
|
10980
11348
|
</svg>
|
|
10981
|
-
</button>
|
|
10982
|
-
}
|
|
10983
|
-
|
|
10984
|
-
@if (threads?.length === 0) {
|
|
10985
|
-
<div class="cortex-widget__threads-empty">
|
|
10986
|
-
<div class="cortex-widget__threads-empty-icon">
|
|
10987
|
-
<svg
|
|
10988
|
-
width="18"
|
|
10989
|
-
height="18"
|
|
10990
|
-
viewBox="0 0 16 16"
|
|
10991
|
-
fill="none"
|
|
10992
|
-
class="cortex-widget__threads-empty-svg"
|
|
10993
|
-
>
|
|
10994
|
-
<path
|
|
10995
|
-
d="M13.5 7.6c0 2.4-2.5 4.4-5.5 4.4-.6 0-1.2-.08-1.7-.23L3 13l.8-2.3C3 9.8 2.5 8.7 2.5 7.6 2.5 5.2 5 3.2 8 3.2s5.5 2 5.5 4.4Z"
|
|
10996
|
-
stroke="currentColor"
|
|
10997
|
-
stroke-width="1.3"
|
|
10998
|
-
stroke-linecap="round"
|
|
10999
|
-
stroke-linejoin="round"
|
|
11000
|
-
/>
|
|
11001
|
-
</svg>
|
|
11002
|
-
</div>
|
|
11003
|
-
<p class="cortex-widget__threads-empty-title">
|
|
11004
|
-
{{ 'translate_no_threads_yet' | translate }}
|
|
11005
|
-
</p>
|
|
11006
|
-
<p class="cortex-widget__threads-empty-subtitle">
|
|
11007
|
-
{{ 'translate_start_a_new_conversation' | translate }}
|
|
11008
|
-
</p>
|
|
11009
|
-
<button
|
|
11010
|
-
(click)="newChatRequested.emit()"
|
|
11011
|
-
class="cortex-widget__new-chat-btn cortex-widget__new-chat-btn--empty-state"
|
|
11012
|
-
>
|
|
11013
|
-
{{ 'translate_new_chat' | translate }}
|
|
11014
|
-
</button>
|
|
11015
11349
|
</div>
|
|
11016
|
-
|
|
11017
|
-
|
|
11350
|
+
<p class="cortex-widget__threads-empty-title">
|
|
11351
|
+
{{ 'translate_no_threads_yet' | translate }}
|
|
11352
|
+
</p>
|
|
11353
|
+
<p class="cortex-widget__threads-empty-subtitle">
|
|
11354
|
+
{{ 'translate_start_a_new_conversation' | translate }}
|
|
11355
|
+
</p>
|
|
11356
|
+
<button
|
|
11357
|
+
(click)="list.newChat()"
|
|
11358
|
+
class="cortex-widget__new-chat-btn cortex-widget__new-chat-btn--empty-state"
|
|
11359
|
+
>
|
|
11360
|
+
{{ 'translate_new_chat' | translate }}
|
|
11361
|
+
</button>
|
|
11362
|
+
</div>
|
|
11363
|
+
}
|
|
11018
11364
|
`
|
|
11019
11365
|
}]
|
|
11020
11366
|
}],
|
|
11021
|
-
propDecorators: {
|
|
11022
|
-
|
|
11023
|
-
|
|
11024
|
-
|
|
11025
|
-
|
|
11026
|
-
|
|
11027
|
-
required: false
|
|
11028
|
-
}]
|
|
11029
|
-
}],
|
|
11030
|
-
threadSelected: [{
|
|
11031
|
-
type: i0.Output,
|
|
11032
|
-
args: ["threadSelected"]
|
|
11033
|
-
}],
|
|
11034
|
-
newChatRequested: [{
|
|
11035
|
-
type: i0.Output,
|
|
11036
|
-
args: ["newChatRequested"]
|
|
11037
|
-
}],
|
|
11038
|
-
backRequested: [{
|
|
11039
|
-
type: i0.Output,
|
|
11040
|
-
args: ["backRequested"]
|
|
11367
|
+
propDecorators: { context: [{
|
|
11368
|
+
type: i0.Input,
|
|
11369
|
+
args: [{
|
|
11370
|
+
isSignal: true,
|
|
11371
|
+
alias: "context",
|
|
11372
|
+
required: true
|
|
11041
11373
|
}]
|
|
11042
|
-
}
|
|
11374
|
+
}] }
|
|
11043
11375
|
});
|
|
11044
|
-
var
|
|
11376
|
+
var CortexSlotDirective = class CortexSlotDirective2 {
|
|
11377
|
+
slot = input.required({
|
|
11378
|
+
...ngDevMode ? { debugName: "slot" } : {},
|
|
11379
|
+
alias: "cortexSlot"
|
|
11380
|
+
});
|
|
11045
11381
|
template = inject(TemplateRef);
|
|
11382
|
+
entry() {
|
|
11383
|
+
return [this.slot(), this.template];
|
|
11384
|
+
}
|
|
11046
11385
|
static ngTemplateContextGuard(_directive, _context) {
|
|
11047
11386
|
return true;
|
|
11048
11387
|
}
|
|
@@ -11050,16 +11389,23 @@ var CortexHeaderDirective = class CortexHeaderDirective2 {
|
|
|
11050
11389
|
minVersion: "12.0.0",
|
|
11051
11390
|
version: "22.2.0",
|
|
11052
11391
|
ngImport: i0,
|
|
11053
|
-
type:
|
|
11392
|
+
type: CortexSlotDirective2,
|
|
11054
11393
|
deps: [],
|
|
11055
11394
|
target: i0.ɵɵFactoryTarget.Directive
|
|
11056
11395
|
});
|
|
11057
11396
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
11058
|
-
minVersion: "
|
|
11397
|
+
minVersion: "17.1.0",
|
|
11059
11398
|
version: "22.2.0",
|
|
11060
|
-
type:
|
|
11399
|
+
type: CortexSlotDirective2,
|
|
11061
11400
|
isStandalone: true,
|
|
11062
|
-
selector: "ng-template[
|
|
11401
|
+
selector: "ng-template[cortexSlot]",
|
|
11402
|
+
inputs: { slot: {
|
|
11403
|
+
classPropertyName: "slot",
|
|
11404
|
+
publicName: "cortexSlot",
|
|
11405
|
+
isSignal: true,
|
|
11406
|
+
isRequired: true,
|
|
11407
|
+
transformFunction: null
|
|
11408
|
+
} },
|
|
11063
11409
|
ngImport: i0
|
|
11064
11410
|
});
|
|
11065
11411
|
};
|
|
@@ -11067,11 +11413,19 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11067
11413
|
minVersion: "12.0.0",
|
|
11068
11414
|
version: "22.2.0",
|
|
11069
11415
|
ngImport: i0,
|
|
11070
|
-
type:
|
|
11416
|
+
type: CortexSlotDirective,
|
|
11071
11417
|
decorators: [{
|
|
11072
11418
|
type: Directive,
|
|
11073
|
-
args: [{ selector: "ng-template[
|
|
11074
|
-
}]
|
|
11419
|
+
args: [{ selector: "ng-template[cortexSlot]" }]
|
|
11420
|
+
}],
|
|
11421
|
+
propDecorators: { slot: [{
|
|
11422
|
+
type: i0.Input,
|
|
11423
|
+
args: [{
|
|
11424
|
+
isSignal: true,
|
|
11425
|
+
alias: "cortexSlot",
|
|
11426
|
+
required: true
|
|
11427
|
+
}]
|
|
11428
|
+
}] }
|
|
11075
11429
|
});
|
|
11076
11430
|
var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
11077
11431
|
config = input.required(...ngDevMode ? [{ debugName: "config" }] : []);
|
|
@@ -11080,16 +11434,36 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
11080
11434
|
sidebarOpen = signal(false, ...ngDevMode ? [{ debugName: "sidebarOpen" }] : []);
|
|
11081
11435
|
viewMode = computed(() => this.config().viewMode ?? "helper", ...ngDevMode ? [{ debugName: "viewMode" }] : []);
|
|
11082
11436
|
composer = viewChild(ChatComposerComponent, ...ngDevMode ? [{ debugName: "composer" }] : []);
|
|
11083
|
-
|
|
11437
|
+
landingComposer = viewChild.required("landingComposer", ...ngDevMode ? [{ debugName: "landingComposer" }] : []);
|
|
11438
|
+
slotDirectives = contentChildren(CortexSlotDirective, {
|
|
11439
|
+
...ngDevMode ? { debugName: "slotDirectives" } : {},
|
|
11440
|
+
descendants: true
|
|
11441
|
+
});
|
|
11442
|
+
slots = computed(() => new Map(this.slotDirectives().map((directive) => directive.entry())), ...ngDevMode ? [{ debugName: "slots" }] : []);
|
|
11084
11443
|
chatHeader = computed(() => this.headerContext("chat"), ...ngDevMode ? [{ debugName: "chatHeader" }] : []);
|
|
11085
11444
|
threadsHeader = computed(() => this.headerContext("threads"), ...ngDevMode ? [{ debugName: "threadsHeader" }] : []);
|
|
11445
|
+
landing = computed(() => ({
|
|
11446
|
+
...landingFromHandshake(this.chatService.capabilities(), this.injector.get(CORTEX_LOCALE)(), (prompt) => this.chatService.send(prompt).subscribe()),
|
|
11447
|
+
threads: this.threadService.threads(),
|
|
11448
|
+
composer: this.landingComposer(),
|
|
11449
|
+
openThread: (thread) => this.selectThread(thread)
|
|
11450
|
+
}), ...ngDevMode ? [{ debugName: "landing" }] : []);
|
|
11451
|
+
threadList = computed(() => ({
|
|
11452
|
+
threads: this.threadService.threads(),
|
|
11453
|
+
selectedThreadId: this.chatService.selectedThread()?.id,
|
|
11454
|
+
openThread: (thread) => this.selectThread(thread),
|
|
11455
|
+
deleteThread: (threadId) => this.chatService.deleteThread(threadId).subscribe(),
|
|
11456
|
+
newChat: () => this.newChat()
|
|
11457
|
+
}), ...ngDevMode ? [{ debugName: "threadList" }] : []);
|
|
11086
11458
|
chatService;
|
|
11087
11459
|
queue;
|
|
11460
|
+
threadService;
|
|
11088
11461
|
injector = inject(Injector);
|
|
11089
11462
|
destroyRef = inject(DestroyRef);
|
|
11090
11463
|
ngOnInit() {
|
|
11091
11464
|
this.chatService = this.injector.get(CortexChatService);
|
|
11092
11465
|
this.queue = this.injector.get(AttachmentQueueService);
|
|
11466
|
+
this.threadService = this.injector.get(CortexThreadService);
|
|
11093
11467
|
this.chatService.start();
|
|
11094
11468
|
let selectedThreadId = this.chatService.selectedThread()?.id;
|
|
11095
11469
|
effect(() => {
|
|
@@ -11118,6 +11492,7 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
11118
11492
|
viewMode: this.viewMode(),
|
|
11119
11493
|
title: this.chatService.selectedThread()?.title ?? null,
|
|
11120
11494
|
agentName: localized(this.config().agentName, this.injector.get(CORTEX_LOCALE)()),
|
|
11495
|
+
threadCount: this.threadService.threads()?.length ?? 0,
|
|
11121
11496
|
isWorking: this.chatService.isAgentWorking(),
|
|
11122
11497
|
debug: {
|
|
11123
11498
|
shown: Boolean(this.config().showDebugButton),
|
|
@@ -11129,9 +11504,6 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
11129
11504
|
toggleDebug: () => this.toggleDebugMode()
|
|
11130
11505
|
};
|
|
11131
11506
|
}
|
|
11132
|
-
toggleSidebar() {
|
|
11133
|
-
this.sidebarOpen.update((v) => !v);
|
|
11134
|
-
}
|
|
11135
11507
|
closeSidebar() {
|
|
11136
11508
|
this.sidebarOpen.set(false);
|
|
11137
11509
|
}
|
|
@@ -11203,9 +11575,8 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
11203
11575
|
AttachmentQueueService
|
|
11204
11576
|
],
|
|
11205
11577
|
queries: [{
|
|
11206
|
-
propertyName: "
|
|
11207
|
-
|
|
11208
|
-
predicate: CortexHeaderDirective,
|
|
11578
|
+
propertyName: "slotDirectives",
|
|
11579
|
+
predicate: CortexSlotDirective,
|
|
11209
11580
|
descendants: true,
|
|
11210
11581
|
isSignal: true
|
|
11211
11582
|
}],
|
|
@@ -11215,6 +11586,12 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
11215
11586
|
predicate: ChatComposerComponent,
|
|
11216
11587
|
descendants: true,
|
|
11217
11588
|
isSignal: true
|
|
11589
|
+
}, {
|
|
11590
|
+
propertyName: "landingComposer",
|
|
11591
|
+
first: true,
|
|
11592
|
+
predicate: ["landingComposer"],
|
|
11593
|
+
descendants: true,
|
|
11594
|
+
isSignal: true
|
|
11218
11595
|
}],
|
|
11219
11596
|
ngImport: i0,
|
|
11220
11597
|
template: `<div
|
|
@@ -11224,68 +11601,97 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
11224
11601
|
(dragover)="onWidgetDragOver($event)"
|
|
11225
11602
|
(drop)="onWidgetDrop($event)"
|
|
11226
11603
|
>
|
|
11227
|
-
|
|
11604
|
+
<!-- The history screen. The sliding-panel layout styles the screen element
|
|
11605
|
+
itself, so its header and list sit right inside it. -->
|
|
11606
|
+
<div
|
|
11228
11607
|
class="cortex-widget__screen"
|
|
11229
11608
|
[class.cortex-widget__screen--active]="screen() === 'threads'"
|
|
11230
11609
|
[class.cortex-widget__screen--left]="screen() !== 'threads'"
|
|
11231
|
-
(threadSelected)="selectThread($event)"
|
|
11232
|
-
(newChatRequested)="newChat()"
|
|
11233
|
-
(backRequested)="closeHistory()"
|
|
11234
|
-
[showHeader]="!customHeader()"
|
|
11235
11610
|
>
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11611
|
+
<ng-container
|
|
11612
|
+
*ngTemplateOutlet="
|
|
11613
|
+
slots().get('header') ?? defaultHeader;
|
|
11614
|
+
context: { $implicit: threadsHeader() }
|
|
11615
|
+
"
|
|
11616
|
+
/>
|
|
11617
|
+
<ng-container
|
|
11618
|
+
*ngTemplateOutlet="
|
|
11619
|
+
slots().get('threadList') ?? defaultThreadList;
|
|
11620
|
+
context: { $implicit: threadList() }
|
|
11621
|
+
"
|
|
11622
|
+
/>
|
|
11623
|
+
</div>
|
|
11240
11624
|
|
|
11241
11625
|
<div
|
|
11242
11626
|
class="cortex-widget__screen"
|
|
11243
11627
|
[class.cortex-widget__screen--active]="screen() === 'chat'"
|
|
11244
11628
|
[class.cortex-widget__screen--right]="screen() !== 'chat'"
|
|
11245
11629
|
>
|
|
11246
|
-
|
|
11247
|
-
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
|
|
11252
|
-
(toggleDebug)="toggleDebugMode()"
|
|
11253
|
-
(openHistory)="openHistory()"
|
|
11254
|
-
(newChat)="newChat()"
|
|
11255
|
-
/>
|
|
11256
|
-
}
|
|
11630
|
+
<ng-container
|
|
11631
|
+
*ngTemplateOutlet="
|
|
11632
|
+
slots().get('header') ?? defaultHeader;
|
|
11633
|
+
context: { $implicit: chatHeader() }
|
|
11634
|
+
"
|
|
11635
|
+
/>
|
|
11257
11636
|
|
|
11258
11637
|
<!-- Blank-chat landing; the first send creates the thread, which swaps
|
|
11259
11638
|
this for the message list. -->
|
|
11260
11639
|
@if (!chatService.selectedThread()) {
|
|
11261
|
-
<
|
|
11640
|
+
<ng-container
|
|
11641
|
+
*ngTemplateOutlet="
|
|
11642
|
+
slots().get('landing') ?? defaultLanding;
|
|
11643
|
+
context: { $implicit: landing() }
|
|
11644
|
+
"
|
|
11645
|
+
/>
|
|
11262
11646
|
} @else if (chatService.isLoadingMessages() && !chatService.isAgentWorking()) {
|
|
11263
11647
|
<cortex-messages-skeleton />
|
|
11264
11648
|
} @else {
|
|
11265
11649
|
<cortex-message-list class="cortex-widget__messages" [debugMode]="debugMode()" />
|
|
11266
11650
|
}
|
|
11267
11651
|
|
|
11268
|
-
<!-- Chat input (
|
|
11269
|
-
@if (
|
|
11270
|
-
|
|
11271
|
-
!chatService.hasPendingToolCalls() &&
|
|
11272
|
-
chatService.capabilities() !== undefined
|
|
11273
|
-
) {
|
|
11274
|
-
@if (chatService.capabilities()?.messages === false) {
|
|
11275
|
-
<p class="cortex-widget__messages-disabled">
|
|
11276
|
-
{{ 'translate_messages_disabled' | translate }}
|
|
11277
|
-
</p>
|
|
11278
|
-
} @else {
|
|
11279
|
-
<cortex-chat-composer />
|
|
11280
|
-
}
|
|
11652
|
+
<!-- Chat input under an open thread (the landing places its own; hidden during pending tool calls) -->
|
|
11653
|
+
@if (chatService.selectedThread() && !chatService.hasPendingToolCalls()) {
|
|
11654
|
+
<ng-container *ngTemplateOutlet="composer" />
|
|
11281
11655
|
}
|
|
11282
11656
|
</div>
|
|
11283
11657
|
|
|
11284
11658
|
<!-- Sidebar overlay backdrop (full mode, small screens) -->
|
|
11285
11659
|
<div class="cortex-widget__sidebar-backdrop" (click)="closeSidebar()"></div>
|
|
11286
11660
|
</div>
|
|
11661
|
+
|
|
11662
|
+
<!-- The widget's own parts, each standing in for a slot the host left empty.
|
|
11663
|
+
Marked like a host's slot so each default's context is typed the same way. -->
|
|
11664
|
+
<ng-template cortexSlot="header" #defaultHeader let-header>
|
|
11665
|
+
<cortex-chat-header [context]="header" />
|
|
11666
|
+
</ng-template>
|
|
11667
|
+
<ng-template cortexSlot="landing" #defaultLanding let-landing>
|
|
11668
|
+
<cortex-chat-landing [context]="landing" />
|
|
11669
|
+
</ng-template>
|
|
11670
|
+
<ng-template cortexSlot="threadList" #defaultThreadList let-list>
|
|
11671
|
+
<cortex-thread-list [context]="list" />
|
|
11672
|
+
</ng-template>
|
|
11673
|
+
|
|
11674
|
+
<!-- The composer the landing places mid-panel, without the bottom-bar chrome. -->
|
|
11675
|
+
<ng-template #landingComposer>
|
|
11676
|
+
<div class="cortex-widget__landing-composer">
|
|
11677
|
+
<ng-container *ngTemplateOutlet="composer" />
|
|
11678
|
+
</div>
|
|
11679
|
+
</ng-template>
|
|
11680
|
+
|
|
11681
|
+
<!-- The composer, or the notice an agent that takes no messages shows instead.
|
|
11682
|
+
Nothing until the handshake answers: a first send before it could open a
|
|
11683
|
+
thread /chat refuses. -->
|
|
11684
|
+
<ng-template #composer>
|
|
11685
|
+
@if (chatService.capabilities()?.messages === false) {
|
|
11686
|
+
<p class="cortex-widget__messages-disabled">
|
|
11687
|
+
{{ 'translate_messages_disabled' | translate }}
|
|
11688
|
+
</p>
|
|
11689
|
+
} @else if (chatService.capabilities() !== undefined) {
|
|
11690
|
+
<cortex-chat-composer />
|
|
11691
|
+
}
|
|
11692
|
+
</ng-template>
|
|
11287
11693
|
`,
|
|
11288
|
-
styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-code-surface: light-dark(#e8edf3, #111111);--cortex-color-code-text: light-dark(#334155, #e5e5e5);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}@media(min-width:769px){.cortex-widget__container--full>.cortex-widget__screen:nth-child(2) .cortex-widget__new-btn{display:none}}.cortex-widget__container--full .cortex-widget__chat-title{font-size:var(--cortex-font-size-header, .875rem)}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__header-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__header-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, var(--cortex-font-size));font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}cortex-chat-composer,cortex-message-tool-call-outcome,cortex-llm-usage-chips{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface));transition:border-color .15s,background-color .15s}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea,.cortex-widget__textarea:focus,.cortex-widget__textarea:focus-visible,.cortex-widget__textarea:disabled{background:transparent;border:0;outline:none;box-shadow:none}.cortex-widget__textarea{flex:1;resize:none;font-size:var(--cortex-font-size-message, var(--cortex-font-size));padding:.375rem .5rem;min-height:28px;max-height:calc(5.5 * var(--cortex-font-size-message, var(--cortex-font-size)) + .75rem);overflow-y:auto;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-send-empty, transparent);color:var(--cortex-color-send-empty-text, var(--cortex-color-text-muted))}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, .9375rem);font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem}.cortex-message-list__content{position:relative;display:flex;flex-direction:column;gap:.5rem}.cortex-message-list__content--settling{animation:cortex-content-settle .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-content-settle{0%{translate:0 var(--cortex-slide)}}.cortex-widget__screen>.cortex-send-flight{position:absolute;z-index:2;margin:0;max-width:none;pointer-events:none;animation:cortex-send-fade 80ms linear both,cortex-send-fly .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-send-fade{0%{opacity:0}}@keyframes cortex-send-fly{0%{translate:var(--cortex-fly-x) var(--cortex-fly-y)}}.cortex-working-thinking{padding-inline-start:2rem;--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-working-thinking{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}.cortex-working-avatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground);translate:0 var(--cortex-avatar-y, 0);visibility:hidden;pointer-events:none}.cortex-working-avatar svg{width:.875rem;height:.875rem}.cortex-working-avatar--shown{visibility:visible;transition:translate .42s cubic-bezier(.76,0,.24,1);animation:cortex-avatar-in .7s cubic-bezier(.16,1,.3,1) both}.cortex-working-avatar--leaving{animation:cortex-avatar-out .36s cubic-bezier(.5,0,.75,0) .12s both}.cortex-working-avatar__ring{position:absolute;inset:-.25rem;border-radius:9999px;border:1.5px solid color-mix(in oklab,var(--cortex-color-accent) 18%,transparent);border-top-color:var(--cortex-color-accent);border-right-color:color-mix(in oklab,var(--cortex-color-accent) 45%,transparent)}.cortex-working-avatar--shown .cortex-working-avatar__ring{animation:cortex-tool-spin 1s linear infinite}.cortex-working-avatar--leaving .cortex-working-avatar__ring{animation:cortex-avatar-ring-out .22s ease-out both}@keyframes cortex-avatar-in{0%{opacity:0;transform:translateY(2.5rem) scale(.7)}}@keyframes cortex-avatar-out{to{opacity:0;transform:scale(.4)}}@keyframes cortex-avatar-ring-out{to{opacity:0}}.cortex-message{min-width:0;transition:margin-block-start .42s cubic-bezier(.76,0,.24,1)}.cortex-message:empty{display:none}.cortex-message:has(.cortex-message-part--folded):not(:has(.cortex-message-part:not(.cortex-message-part--folded))){margin-block-start:-.5rem;transition-delay:.6s}.cortex-text-bubble--assistant,.cortex-subtle-activity,.cortex-tool-pill,.cortex-tool-pill .cortex-tool-pill__icon{transition:translate .42s cubic-bezier(.76,0,.24,1) .16s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity,.cortex-message--working-turn .cortex-tool-pill,.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{transition-delay:0s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity{translate:2rem}[dir=rtl] .cortex-message--working-turn .cortex-text-bubble--assistant,[dir=rtl] .cortex-message--working-turn .cortex-subtle-activity{translate:-2rem}.cortex-message--working-turn .cortex-tool-pill{translate:.875rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill{translate:-.875rem}.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:-.5rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:.5rem}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-actions{display:flex;align-items:center;gap:.375rem;margin-top:-.25rem}.cortex-message-actions--user{justify-content:flex-end}.cortex-message-actions__time{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:0;transition:opacity .15s ease}.cortex-message-actions:not(:has(.cortex-copy-btn)) .cortex-message-actions__time{opacity:1}.cortex-message:hover .cortex-message-actions .cortex-copy-btn__button,.cortex-message:hover .cortex-message-actions .cortex-message-actions__time,.cortex-message-actions:focus-within .cortex-copy-btn__button,.cortex-message-actions:focus-within .cortex-message-actions__time{opacity:1}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;min-width:0;transition:grid-template-rows .42s cubic-bezier(.76,0,.24,1),margin-block-end .42s cubic-bezier(.76,0,.24,1),opacity .3s ease,visibility 0s,overflow 0s .42s allow-discrete}.cortex-message-part>*{min-height:0}.cortex-message-part:empty{display:none}.cortex-message-part--folded{grid-template-rows:0fr;margin-block-end:-.5rem;opacity:0;overflow:clip;visibility:hidden;transition-delay:.6s,.6s,.6s,1.02s,0s}[data-cortex-frontier] .cortex-tool-pill__spinner{visibility:hidden}[data-cortex-frontier] .cortex-subtle-activity__dots{display:none}.cortex-message-part--animated{--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-message-part--animated{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}@keyframes cortex-part-reveal{0%{opacity:0;transform:translate(var(--cortex-reveal-from));filter:blur(5px);-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-start) 0;mask-position:var(--cortex-reveal-start) 0}40%{opacity:1}to{transform:none;filter:none;-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-end) 0;mask-position:var(--cortex-reveal-end) 0}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;min-width:0;overflow-wrap:anywhere;font-size:var(--cortex-font-size-message, var(--cortex-font-size));line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-code-surface);border-radius:var(--cortex-radius);max-width:100%;overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-code-text)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-stream-fade{animation:cortex-stream-fade .3s ease-out}@keyframes cortex-stream-fade{0%{opacity:0}}.cortex-media-block{margin:.75em 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-media-block__head{display:flex}.cortex-media-block__head[hidden]{display:none}.cortex-media-block__head{align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem .25rem .75rem;background:var(--cortex-color-surface-subtle);border-bottom:1px solid var(--cortex-color-border);font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-media-block__lang{font-family:var(--cortex-font-mono)}.cortex-media-block__pending{display:inline-flex;align-items:center;gap:.375rem}.cortex-media-block__pending:before{content:"";width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-media-block__actions{display:inline-flex;align-items:center;gap:.125rem}.cortex-media-block__action{background:transparent;border:0;padding:.125rem .375rem;border-radius:calc(var(--cortex-radius) * .5);font:inherit;color:inherit;cursor:pointer}.cortex-media-block__action:hover,.cortex-media-block__action[aria-pressed=true]{background:var(--cortex-color-hover);color:var(--cortex-color-text-strong)}.cortex-media-block__body{padding:.75rem}.cortex-media-block__body[hidden]{display:none}.cortex-media-block__body{min-height:6rem;overflow-x:auto}.cortex-media-block__body svg{display:block;max-width:100%;height:auto}.cortex-media-block__body--map{padding:0;height:18rem}.cortex-media-block__body--map>div{height:100%}.cortex-media-block__error{margin:0;font-size:.8125rem;color:var(--cortex-color-danger)}.cortex-media-block .cortex-media-block__source{margin:0;padding:.75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.5;white-space:pre;overflow-x:auto;color:var(--cortex-color-text)}.cortex-attachment-image{margin:.75em 0}.cortex-attachment-image img{display:block;max-width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border)}.cortex-attachment-image__caption{margin:.25rem 0 0;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block{display:block;margin:.5em 0 .75em}.cortex-table-block th{white-space:nowrap}.cortex-table-block td{max-width:20rem}.cortex-table-block table{margin:0}.cortex-table-block__actions{display:flex;justify-content:flex-end;gap:.125rem;min-height:1.75rem;margin-bottom:.25rem;opacity:0;transition:opacity .15s}.cortex-table-block:hover .cortex-table-block__actions,.cortex-table-block:focus-within .cortex-table-block__actions{opacity:1}@media(hover:none){.cortex-table-block__actions{opacity:1}}.cortex-table-block__action{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;width:1.75rem;height:1.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block__action:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-table-block__dialog{width:min(72rem,100vw - 2rem);max-width:none;max-height:calc(100vh - 2rem);margin:auto;padding:0;border:1px solid var(--cortex-color-border);border-radius:calc(var(--cortex-radius) * 1.5);background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 20px 50px #0003}.cortex-table-block__dialog[open]{display:flex;flex-direction:column}.cortex-table-block__dialog::backdrop{background:#0006}.cortex-table-block__dialog-head{display:flex;justify-content:flex-end;gap:.125rem;padding:.375rem;border-bottom:1px solid var(--cortex-color-border)}.cortex-table-block__dialog-body{overflow:auto;padding:0 1rem}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;gap:.375rem}.cortex-message-attachments--user{justify-content:flex-end}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-debug-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-debug-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.cortex-debug-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.cortex-debug-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.cortex-debug-tool[data-state=awaiting-input],.cortex-debug-tool[data-state=input-streaming],.cortex-debug-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.cortex-debug-tool[data-state=approval-requested],.cortex-debug-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.cortex-debug-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.cortex-debug-tool__summary::-webkit-details-marker{display:none}.cortex-debug-tool__header{display:flex;align-items:flex-start;gap:.75rem}.cortex-debug-tool__meta{flex:1;min-width:0}.cortex-debug-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-debug-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.cortex-debug-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.cortex-debug-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.cortex-debug-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.cortex-debug-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.cortex-debug-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.cortex-debug-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.cortex-debug-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.cortex-debug-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.cortex-debug-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .cortex-debug-tool__chevron{transform:rotate(180deg)}.cortex-debug-tool__body{padding:0 .875rem .75rem 1.125rem}.cortex-debug-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.cortex-debug-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-debug-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__section-label--success{color:var(--cortex-color-success)}.cortex-debug-tool__section-label--error{color:var(--cortex-color-danger)}.cortex-debug-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.cortex-debug-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.cortex-debug-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.cortex-debug-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.cortex-debug-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.cortex-debug-tool__section--success .cortex-debug-tool__tree{background:light-dark(#f0fdf4,#052e16)}.cortex-debug-tool__section--error .cortex-debug-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--cortex-color-text-muted)}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title--pending{color:var(--cortex-color-text-muted);opacity:.6}.cortex-tool-pill__meta{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:.8;white-space:nowrap;font-variant-numeric:tabular-nums}.cortex-approval-card{display:block;max-width:min(100%,28rem);margin:.25rem 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-approval-card--asking{border-color:color-mix(in oklab,var(--cortex-color-accent) 45%,var(--cortex-color-border));box-shadow:0 0 0 3px color-mix(in oklab,var(--cortex-color-accent) 10%,transparent)}.cortex-approval-card__head{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem 0;font-size:.75rem;font-weight:600;color:var(--cortex-color-accent)}.cortex-approval-card__sentence{margin:0;padding:.375rem .75rem .5rem;font-weight:600;color:var(--cortex-color-text-heading)}.cortex-approval-card__sentence--full{padding-top:0;font-weight:400;color:var(--cortex-color-text-strong)}.cortex-approval-card__rows{display:grid;grid-template-columns:fit-content(40%) minmax(0,1fr);gap:.1875rem .75rem;margin:0;padding:0 .75rem .75rem;font-size:.78125rem}.cortex-approval-card__rows dt{color:var(--cortex-color-text-secondary);overflow-wrap:anywhere}.cortex-approval-card__rows dd{max-height:6rem;margin:0;overflow-y:auto;white-space:pre-wrap;color:var(--cortex-color-text-strong);overflow-wrap:anywhere}.cortex-approval-card__foot{display:flex;gap:.5rem;padding:.625rem .75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-approval-card__button{border:1px solid var(--cortex-color-border-strong);border-radius:calc(var(--cortex-radius) * .75);background:var(--cortex-color-surface);padding:.375rem .875rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--cortex-color-text-strong);cursor:pointer}.cortex-approval-card__button--approve{border-color:var(--cortex-color-accent);background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground)}.cortex-approval-card__line{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.8125rem;color:var(--cortex-color-text-secondary)}.cortex-approval-card__line .cortex-tool-pill__icon{flex-shrink:0}.cortex-approval-card__decision{font-weight:600;color:var(--cortex-color-text-strong)}.cortex-approval-card__summary{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-approval-card__details{flex-shrink:0;border:0;background:none;padding:0;font:inherit;font-size:.75rem;color:var(--cortex-color-text-secondary);text-decoration:underline;text-underline-offset:2px;cursor:pointer}.cortex-tool-fold{display:block;align-self:flex-start;text-align:start;border:0;background:none;padding:0 0 .25rem;margin-block-start:-.625rem;margin-inline-start:1.125rem;font:inherit;font-size:.75rem;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-tool-fold:hover,.cortex-tool-fold:focus-visible{color:var(--cortex-color-text-secondary)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-location-input{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-location-input--settled{display:flex;gap:10px;border-color:var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-location-input__map{position:relative;block-size:11rem;background:var(--cortex-color-surface-muted)}.cortex-location-input__map--still{flex:none;inline-size:120px;block-size:84px}.cortex-location-input__canvas{block-size:100%}.cortex-location-input__still-failed{display:flex;align-items:center;justify-content:center;block-size:100%;padding:0 8px;font-size:11px;text-align:center;color:var(--cortex-color-text-muted)}.cortex-location-input__locate{position:absolute;inset-inline-end:10px;inset-block-start:10px;z-index:1001;display:inline-flex;align-items:center;justify-content:center;inline-size:30px;block-size:30px;border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 1px 3px #0003;cursor:pointer}.cortex-location-input__locate svg{inline-size:15px;block-size:15px}.cortex-location-input__locate:disabled{opacity:.45;cursor:default}.cortex-location-input__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-block-start:1px solid var(--cortex-color-border-strong);font-size:12px}.cortex-location-input__hint{display:inline-flex;align-items:center;gap:6px;min-inline-size:0;color:var(--cortex-color-text-muted)}.cortex-location-input__hint--failed{color:var(--cortex-color-danger)}.cortex-location-input__spinner{inline-size:.625rem;block-size:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-location-input__coords{font-family:var(--cortex-font-mono);font-size:.75rem;color:var(--cortex-color-text-secondary);direction:ltr;unicode-bidi:isolate}.cortex-location-input__actions{display:flex;align-items:center;gap:8px}.cortex-location-input__skip{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-location-input__skip:hover{color:var(--cortex-color-danger)}.cortex-location-input__skip:disabled{opacity:.45;cursor:default}.cortex-location-input__send{border:1px solid var(--cortex-color-primary);border-radius:8px;background:var(--cortex-color-primary);padding:4px 10px;font:inherit;font-size:12px;color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-location-input__send:disabled{opacity:.45;cursor:default}.cortex-location-input__body{display:flex;flex-direction:column;justify-content:center;gap:2px;min-inline-size:0;padding-block:8px;padding-inline-end:12px}.cortex-location-input__title{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--cortex-color-text-strong)}.cortex-location-input__title svg{inline-size:13px;block-size:13px;color:var(--cortex-color-success)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__summary{flex-wrap:wrap;max-width:100%;text-align:start}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.cortex-json-tree__indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.cortex-json-tree__line{position:relative}.cortex-json-tree__toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.cortex-json-tree__toggle:hover .cortex-json-tree__arrow{color:var(--cortex-color-text)}.cortex-json-tree__arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.cortex-json-tree__arrow--collapsed{transform:rotate(-90deg)}.cortex-json-tree__bracket{color:var(--cortex-color-text-secondary)}.cortex-json-tree__key{color:light-dark(#6366f1,#818cf8)}.cortex-json-tree__colon{color:var(--cortex-color-text-secondary)}.cortex-json-tree__comma{color:var(--cortex-color-text-muted)}.cortex-json-tree__string{color:var(--cortex-color-success)}.cortex-json-tree__number{color:light-dark(#2563eb,#60a5fa)}.cortex-json-tree__boolean{color:light-dark(#d97706,#fbbf24)}.cortex-json-tree__null{color:var(--cortex-color-text-muted);font-style:italic}.cortex-json-tree__collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.cortex-json-tree__collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}}\n'],
|
|
11694
|
+
styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-code-surface: light-dark(#e8edf3, #111111);--cortex-color-code-text: light-dark(#334155, #e5e5e5);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer base.cortex{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}@media(min-width:769px){.cortex-widget__container--full>.cortex-widget__screen:nth-child(2) .cortex-widget__new-btn{display:none}}.cortex-widget__container--full .cortex-widget__chat-title{font-size:var(--cortex-font-size-header, .875rem)}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__header-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__header-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, var(--cortex-font-size));font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__landing-composer{max-width:26rem}.cortex-widget__landing-composer{width:100%}.cortex-widget__landing-composer .cortex-widget__input-area{padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}cortex-chat-composer,cortex-message-tool-call-outcome,cortex-llm-usage-chips{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface));transition:border-color .15s,background-color .15s}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea,.cortex-widget__textarea:focus,.cortex-widget__textarea:focus-visible,.cortex-widget__textarea:disabled{background:transparent;border:0;outline:none;box-shadow:none}.cortex-widget__textarea{flex:1;resize:none;font-size:var(--cortex-font-size-message, var(--cortex-font-size));padding:.375rem .5rem;min-height:28px;max-height:calc(5.5 * var(--cortex-font-size-message, var(--cortex-font-size)) + .75rem);overflow-y:auto;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-send-empty, transparent);color:var(--cortex-color-send-empty-text, var(--cortex-color-text-muted))}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, .9375rem);font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem}.cortex-message-list__content{position:relative;display:flex;flex-direction:column;gap:.5rem}.cortex-message-list__content--settling{animation:cortex-content-settle .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-content-settle{0%{translate:0 var(--cortex-slide)}}.cortex-widget__screen>.cortex-send-flight{position:absolute;z-index:2;margin:0;max-width:none;pointer-events:none;animation:cortex-send-fade 80ms linear both,cortex-send-fly .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-send-fade{0%{opacity:0}}@keyframes cortex-send-fly{0%{translate:var(--cortex-fly-x) var(--cortex-fly-y)}}.cortex-working-thinking{padding-inline-start:2rem;--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-working-thinking{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}.cortex-working-avatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground);translate:0 var(--cortex-avatar-y, 0);visibility:hidden;pointer-events:none}.cortex-working-avatar svg{width:.875rem;height:.875rem}.cortex-working-avatar--shown{visibility:visible;transition:translate .42s cubic-bezier(.76,0,.24,1);animation:cortex-avatar-in .7s cubic-bezier(.16,1,.3,1) both}.cortex-working-avatar--leaving{animation:cortex-avatar-out .36s cubic-bezier(.5,0,.75,0) .12s both}.cortex-working-avatar__ring{position:absolute;inset:-.25rem;border-radius:9999px;border:1.5px solid color-mix(in oklab,var(--cortex-color-accent) 18%,transparent);border-top-color:var(--cortex-color-accent);border-right-color:color-mix(in oklab,var(--cortex-color-accent) 45%,transparent)}.cortex-working-avatar--shown .cortex-working-avatar__ring{animation:cortex-tool-spin 1s linear infinite}.cortex-working-avatar--leaving .cortex-working-avatar__ring{animation:cortex-avatar-ring-out .22s ease-out both}@keyframes cortex-avatar-in{0%{opacity:0;transform:translateY(2.5rem) scale(.7)}}@keyframes cortex-avatar-out{to{opacity:0;transform:scale(.4)}}@keyframes cortex-avatar-ring-out{to{opacity:0}}.cortex-message{min-width:0;transition:margin-block-start .42s cubic-bezier(.76,0,.24,1)}.cortex-message:empty{display:none}.cortex-message:has(.cortex-message-part--folded):not(:has(.cortex-message-part:not(.cortex-message-part--folded))){margin-block-start:-.5rem;transition-delay:.6s}.cortex-text-bubble--assistant,.cortex-subtle-activity,.cortex-tool-pill,.cortex-tool-pill .cortex-tool-pill__icon{transition:translate .42s cubic-bezier(.76,0,.24,1) .16s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity,.cortex-message--working-turn .cortex-tool-pill,.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{transition-delay:0s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity{translate:2rem}[dir=rtl] .cortex-message--working-turn .cortex-text-bubble--assistant,[dir=rtl] .cortex-message--working-turn .cortex-subtle-activity{translate:-2rem}.cortex-message--working-turn .cortex-tool-pill{translate:.875rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill{translate:-.875rem}.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:-.5rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:.5rem}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-actions{display:flex;align-items:center;gap:.375rem;margin-top:-.25rem}.cortex-message-actions--user{justify-content:flex-end}.cortex-message-actions__time{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:0;transition:opacity .15s ease}.cortex-message-actions:not(:has(.cortex-copy-btn)) .cortex-message-actions__time{opacity:1}.cortex-message:hover .cortex-message-actions .cortex-copy-btn__button,.cortex-message:hover .cortex-message-actions .cortex-message-actions__time,.cortex-message-actions:focus-within .cortex-copy-btn__button,.cortex-message-actions:focus-within .cortex-message-actions__time{opacity:1}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;min-width:0;transition:grid-template-rows .42s cubic-bezier(.76,0,.24,1),margin-block-end .42s cubic-bezier(.76,0,.24,1),opacity .3s ease,visibility 0s,overflow 0s .42s allow-discrete}.cortex-message-part>*{min-height:0}.cortex-message-part:empty{display:none}.cortex-message-part--folded{grid-template-rows:0fr;margin-block-end:-.5rem;opacity:0;overflow:clip;visibility:hidden;transition-delay:.6s,.6s,.6s,1.02s,0s}[data-cortex-frontier] .cortex-tool-pill__spinner{visibility:hidden}[data-cortex-frontier] .cortex-subtle-activity__dots{display:none}.cortex-message-part--animated{--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-message-part--animated{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}@keyframes cortex-part-reveal{0%{opacity:0;transform:translate(var(--cortex-reveal-from));filter:blur(5px);-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-start) 0;mask-position:var(--cortex-reveal-start) 0}40%{opacity:1}to{transform:none;filter:none;-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-end) 0;mask-position:var(--cortex-reveal-end) 0}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;min-width:0;overflow-wrap:anywhere;font-size:var(--cortex-font-size-message, var(--cortex-font-size));line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-code-surface);border-radius:var(--cortex-radius);max-width:100%;overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-code-text)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-stream-fade{animation:cortex-stream-fade .3s ease-out}@keyframes cortex-stream-fade{0%{opacity:0}}.cortex-expandable{display:block;position:relative}.cortex-expandable__content{isolation:isolate}.cortex-expandable__toolbar{position:absolute;top:.375rem;inset-inline-end:.375rem;z-index:1;display:flex;gap:.125rem;padding:.125rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);box-shadow:0 1px 3px #00000014;opacity:0;transition:opacity .15s}.cortex-expandable:hover>.cortex-expandable__toolbar,.cortex-expandable__toolbar:has(:focus-visible){opacity:1}@media(hover:none){.cortex-expandable__toolbar{position:static;width:fit-content;margin:0 0 .25rem;margin-inline-start:auto;opacity:1}}.cortex-expandable__action{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;width:1.75rem;height:1.75rem;color:var(--cortex-color-text-muted)}.cortex-expandable__action:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-expandable__dialog{width:fit-content;min-width:min(24rem,100vw - 2rem);max-width:calc(100vw - 2rem);max-height:calc(100dvh - 2rem);margin:auto;padding:0;overflow:hidden;border:1px solid var(--cortex-color-border);border-radius:calc(var(--cortex-radius) * 1.5);background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 24px 64px #0000003d}.cortex-expandable__dialog[open]{display:flex;flex-direction:column;animation:cortex-expandable-in .18s ease-out}.cortex-expandable__dialog::backdrop{background:#00000073;animation:cortex-expandable-backdrop-in .18s ease-out}.cortex-expandable__head{display:flex;align-items:center;gap:.125rem;padding-block:.375rem;padding-inline:1rem .375rem;border-bottom:1px solid var(--cortex-color-border)}.cortex-expandable__title{flex:1;min-width:0;margin-inline-end:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:600;color:var(--cortex-color-text-heading)}.cortex-expandable__body{min-height:0;overflow:auto;overscroll-behavior:contain}@keyframes cortex-expandable-in{0%{opacity:0;transform:translateY(.5rem) scale(.98)}}@keyframes cortex-expandable-backdrop-in{0%{opacity:0}}.cortex-media-block{display:block;width:40rem;max-width:100%;margin:.75em 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-media-block__head{display:flex}.cortex-media-block__head[hidden]{display:none}.cortex-media-block__head{align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem .25rem .75rem;background:var(--cortex-color-surface-subtle);border-bottom:1px solid var(--cortex-color-border);font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-media-block__lang{font-family:var(--cortex-font-mono)}.cortex-media-block__pending{display:inline-flex;align-items:center;gap:.375rem}.cortex-media-block__pending:before{content:"";width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-media-block__actions{display:inline-flex;align-items:center;gap:.125rem}.cortex-media-block__action{background:transparent;border:0;padding:.125rem .375rem;border-radius:calc(var(--cortex-radius) * .5);font:inherit;color:inherit;cursor:pointer}.cortex-media-block__action:hover,.cortex-media-block__action[aria-pressed=true]{background:var(--cortex-color-hover);color:var(--cortex-color-text-strong)}.cortex-media-block__body{display:block;padding:.75rem}.cortex-media-block__body[hidden]{display:none}.cortex-media-block__body{min-height:6rem;overflow-x:auto}.cortex-media-block__body svg{display:block;max-width:100%;height:auto}.cortex-media-block__body>div>svg{margin-inline:auto}.cortex-media-block__body--map{padding:0;height:18rem}.cortex-media-block__body--map>div{height:100%}.cortex-expandable__body .cortex-media-block__body{width:min(72rem,100vw - 2rem - 2px)}.cortex-expandable__body .cortex-media-block__body:not(.cortex-media-block__body--map)>div{display:grid}.cortex-expandable__body .cortex-media-block__body:not(.cortex-media-block__body--map) svg{width:100%;max-width:none!important;max-height:calc(100dvh - 6.5rem)}.cortex-expandable__body .cortex-media-block__body--map{height:min(48rem,100dvh - 5rem)}.cortex-expandable:has(>.cortex-expandable__content>.cortex-media-block__body--map)>.cortex-expandable__toolbar{right:.375rem;left:auto}.cortex-media-block__error{margin:0;font-size:.8125rem;color:var(--cortex-color-danger)}.cortex-media-block .cortex-media-block__source{margin:0;padding:.75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.5;white-space:pre;overflow-x:auto;color:var(--cortex-color-text)}.cortex-attachment-image{margin:.75em 0}.cortex-attachment-image .cortex-expandable{width:fit-content;max-width:100%}.cortex-attachment-image .cortex-expandable__content img{display:block;max-width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border)}.cortex-expandable__body .cortex-attachment-image__expanded{display:block;max-width:calc(100vw - 2rem - 2px);max-height:calc(100dvh - 5rem);margin:auto;border-radius:0}.cortex-attachment-image__caption{margin:.25rem 0 0;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block{display:block;margin:.75em 0}.cortex-table-block th{white-space:nowrap}.cortex-table-block td{max-width:20rem}.cortex-table-block table{margin:0}.cortex-table-block .cortex-expandable{width:fit-content;max-width:100%}.cortex-table-block__expanded{padding:1rem}.cortex-table-block__expanded td{max-width:40rem}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;gap:.375rem}.cortex-message-attachments--user{justify-content:flex-end}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-debug-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-debug-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.cortex-debug-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.cortex-debug-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.cortex-debug-tool[data-state=awaiting-input],.cortex-debug-tool[data-state=input-streaming],.cortex-debug-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.cortex-debug-tool[data-state=approval-requested],.cortex-debug-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.cortex-debug-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.cortex-debug-tool__summary::-webkit-details-marker{display:none}.cortex-debug-tool__header{display:flex;align-items:flex-start;gap:.75rem}.cortex-debug-tool__meta{flex:1;min-width:0}.cortex-debug-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-debug-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.cortex-debug-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.cortex-debug-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.cortex-debug-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.cortex-debug-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.cortex-debug-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.cortex-debug-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.cortex-debug-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.cortex-debug-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.cortex-debug-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .cortex-debug-tool__chevron{transform:rotate(180deg)}.cortex-debug-tool__body{padding:0 .875rem .75rem 1.125rem}.cortex-debug-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.cortex-debug-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-debug-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__section-label--success{color:var(--cortex-color-success)}.cortex-debug-tool__section-label--error{color:var(--cortex-color-danger)}.cortex-debug-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.cortex-debug-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.cortex-debug-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.cortex-debug-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.cortex-debug-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.cortex-debug-tool__section--success .cortex-debug-tool__tree{background:light-dark(#f0fdf4,#052e16)}.cortex-debug-tool__section--error .cortex-debug-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--cortex-color-text-muted)}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title--pending{color:var(--cortex-color-text-muted);opacity:.6}.cortex-tool-pill__meta{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:.8;white-space:nowrap;font-variant-numeric:tabular-nums}.cortex-approval-card{display:block;max-width:min(100%,28rem);margin:.25rem 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-approval-card--asking{border-color:color-mix(in oklab,var(--cortex-color-accent) 45%,var(--cortex-color-border));box-shadow:0 0 0 3px color-mix(in oklab,var(--cortex-color-accent) 10%,transparent)}.cortex-approval-card__head{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem 0;font-size:.75rem;font-weight:600;color:var(--cortex-color-accent)}.cortex-approval-card__sentence{margin:0;padding:.375rem .75rem .5rem;font-weight:600;color:var(--cortex-color-text-heading)}.cortex-approval-card__foot{display:flex;gap:.5rem;padding:.625rem .75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-approval-card__button{border:1px solid var(--cortex-color-border-strong);border-radius:calc(var(--cortex-radius) * .75);background:var(--cortex-color-surface);padding:.375rem .875rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--cortex-color-text-strong);cursor:pointer}.cortex-approval-card__button--approve{border-color:var(--cortex-color-accent);background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground)}.cortex-approval-card__line{display:flex;align-items:baseline;gap:.5rem;padding:.5rem .75rem;font-size:.8125rem;color:var(--cortex-color-text-secondary)}.cortex-approval-card__line .cortex-tool-pill__icon{flex-shrink:0}.cortex-approval-card__decision{font-weight:600;color:var(--cortex-color-text-strong)}.cortex-approval-card__summary{min-width:0;flex:1}.cortex-tool-fold{display:block;align-self:flex-start;text-align:start;border:0;background:none;padding:0 0 .25rem;margin-block-start:-.625rem;margin-inline-start:1.125rem;font:inherit;font-size:.75rem;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-tool-fold:hover,.cortex-tool-fold:focus-visible{color:var(--cortex-color-text-secondary)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-location-input{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-location-input--settled{display:flex;gap:10px;border-color:var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-location-input__map{position:relative;block-size:11rem;background:var(--cortex-color-surface-muted)}.cortex-location-input__map--still{flex:none;inline-size:120px;block-size:84px}.cortex-location-input__canvas{block-size:100%}.cortex-location-input__still-failed{display:flex;align-items:center;justify-content:center;block-size:100%;padding:0 8px;font-size:11px;text-align:center;color:var(--cortex-color-text-muted)}.cortex-location-input__locate{position:absolute;inset-inline-end:10px;inset-block-start:10px;z-index:1001;display:inline-flex;align-items:center;justify-content:center;inline-size:30px;block-size:30px;border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 1px 3px #0003;cursor:pointer}.cortex-location-input__locate svg{inline-size:15px;block-size:15px}.cortex-location-input__locate:disabled{opacity:.45;cursor:default}.cortex-location-input__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-block-start:1px solid var(--cortex-color-border-strong);font-size:12px}.cortex-location-input__hint{display:inline-flex;align-items:center;gap:6px;min-inline-size:0;color:var(--cortex-color-text-muted)}.cortex-location-input__hint--failed{color:var(--cortex-color-danger)}.cortex-location-input__spinner{inline-size:.625rem;block-size:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-location-input__coords{font-family:var(--cortex-font-mono);font-size:.75rem;color:var(--cortex-color-text-secondary);direction:ltr;unicode-bidi:isolate}.cortex-location-input__actions{display:flex;align-items:center;gap:8px}.cortex-location-input__skip{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-location-input__skip:hover{color:var(--cortex-color-danger)}.cortex-location-input__skip:disabled{opacity:.45;cursor:default}.cortex-location-input__send{border:1px solid var(--cortex-color-primary);border-radius:8px;background:var(--cortex-color-primary);padding:4px 10px;font:inherit;font-size:12px;color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-location-input__send:disabled{opacity:.45;cursor:default}.cortex-location-input__body{display:flex;flex-direction:column;justify-content:center;gap:2px;min-inline-size:0;padding-block:8px;padding-inline-end:12px}.cortex-location-input__title{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--cortex-color-text-strong)}.cortex-location-input__title svg{inline-size:13px;block-size:13px;color:var(--cortex-color-success)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__summary{flex-wrap:wrap;max-width:100%;text-align:start}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.cortex-json-tree__indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.cortex-json-tree__line{position:relative}.cortex-json-tree__toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.cortex-json-tree__toggle:hover .cortex-json-tree__arrow{color:var(--cortex-color-text)}.cortex-json-tree__arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.cortex-json-tree__arrow--collapsed{transform:rotate(-90deg)}.cortex-json-tree__bracket{color:var(--cortex-color-text-secondary)}.cortex-json-tree__key{color:light-dark(#6366f1,#818cf8)}.cortex-json-tree__colon{color:var(--cortex-color-text-secondary)}.cortex-json-tree__comma{color:var(--cortex-color-text-muted)}.cortex-json-tree__string{color:var(--cortex-color-success)}.cortex-json-tree__number{color:light-dark(#2563eb,#60a5fa)}.cortex-json-tree__boolean{color:light-dark(#d97706,#fbbf24)}.cortex-json-tree__null{color:var(--cortex-color-text-muted);font-style:italic}.cortex-json-tree__collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.cortex-json-tree__collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after,.cortex-widget *::backdrop{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}}\n'],
|
|
11289
11695
|
dependencies: [
|
|
11290
11696
|
{
|
|
11291
11697
|
kind: "component",
|
|
@@ -11296,19 +11702,19 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
11296
11702
|
kind: "component",
|
|
11297
11703
|
type: ChatHeaderComponent,
|
|
11298
11704
|
selector: "cortex-chat-header",
|
|
11299
|
-
inputs: ["
|
|
11300
|
-
outputs: [
|
|
11301
|
-
"toggleSidebar",
|
|
11302
|
-
"toggleDebug",
|
|
11303
|
-
"openHistory",
|
|
11304
|
-
"newChat"
|
|
11305
|
-
]
|
|
11705
|
+
inputs: ["context"]
|
|
11306
11706
|
},
|
|
11307
11707
|
{
|
|
11308
11708
|
kind: "component",
|
|
11309
11709
|
type: ChatLandingComponent,
|
|
11310
11710
|
selector: "cortex-chat-landing",
|
|
11311
|
-
|
|
11711
|
+
inputs: ["context"]
|
|
11712
|
+
},
|
|
11713
|
+
{
|
|
11714
|
+
kind: "directive",
|
|
11715
|
+
type: CortexSlotDirective,
|
|
11716
|
+
selector: "ng-template[cortexSlot]",
|
|
11717
|
+
inputs: ["cortexSlot"]
|
|
11312
11718
|
},
|
|
11313
11719
|
{
|
|
11314
11720
|
kind: "component",
|
|
@@ -11335,12 +11741,7 @@ var CortexChatWidgetComponent = class CortexChatWidgetComponent2 {
|
|
|
11335
11741
|
kind: "component",
|
|
11336
11742
|
type: ThreadListComponent,
|
|
11337
11743
|
selector: "cortex-thread-list",
|
|
11338
|
-
inputs: ["
|
|
11339
|
-
outputs: [
|
|
11340
|
-
"threadSelected",
|
|
11341
|
-
"newChatRequested",
|
|
11342
|
-
"backRequested"
|
|
11343
|
-
]
|
|
11744
|
+
inputs: ["context"]
|
|
11344
11745
|
},
|
|
11345
11746
|
{
|
|
11346
11747
|
kind: "pipe",
|
|
@@ -11365,6 +11766,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11365
11766
|
ChatComposerComponent,
|
|
11366
11767
|
ChatHeaderComponent,
|
|
11367
11768
|
ChatLandingComponent,
|
|
11769
|
+
CortexSlotDirective,
|
|
11368
11770
|
MessageListComponent,
|
|
11369
11771
|
MessagesSkeletonComponent,
|
|
11370
11772
|
NgTemplateOutlet,
|
|
@@ -11395,68 +11797,97 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11395
11797
|
(dragover)="onWidgetDragOver($event)"
|
|
11396
11798
|
(drop)="onWidgetDrop($event)"
|
|
11397
11799
|
>
|
|
11398
|
-
|
|
11800
|
+
<!-- The history screen. The sliding-panel layout styles the screen element
|
|
11801
|
+
itself, so its header and list sit right inside it. -->
|
|
11802
|
+
<div
|
|
11399
11803
|
class="cortex-widget__screen"
|
|
11400
11804
|
[class.cortex-widget__screen--active]="screen() === 'threads'"
|
|
11401
11805
|
[class.cortex-widget__screen--left]="screen() !== 'threads'"
|
|
11402
|
-
(threadSelected)="selectThread($event)"
|
|
11403
|
-
(newChatRequested)="newChat()"
|
|
11404
|
-
(backRequested)="closeHistory()"
|
|
11405
|
-
[showHeader]="!customHeader()"
|
|
11406
11806
|
>
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
|
|
11807
|
+
<ng-container
|
|
11808
|
+
*ngTemplateOutlet="
|
|
11809
|
+
slots().get('header') ?? defaultHeader;
|
|
11810
|
+
context: { $implicit: threadsHeader() }
|
|
11811
|
+
"
|
|
11812
|
+
/>
|
|
11813
|
+
<ng-container
|
|
11814
|
+
*ngTemplateOutlet="
|
|
11815
|
+
slots().get('threadList') ?? defaultThreadList;
|
|
11816
|
+
context: { $implicit: threadList() }
|
|
11817
|
+
"
|
|
11818
|
+
/>
|
|
11819
|
+
</div>
|
|
11411
11820
|
|
|
11412
11821
|
<div
|
|
11413
11822
|
class="cortex-widget__screen"
|
|
11414
11823
|
[class.cortex-widget__screen--active]="screen() === 'chat'"
|
|
11415
11824
|
[class.cortex-widget__screen--right]="screen() !== 'chat'"
|
|
11416
11825
|
>
|
|
11417
|
-
|
|
11418
|
-
|
|
11419
|
-
|
|
11420
|
-
|
|
11421
|
-
|
|
11422
|
-
|
|
11423
|
-
(toggleDebug)="toggleDebugMode()"
|
|
11424
|
-
(openHistory)="openHistory()"
|
|
11425
|
-
(newChat)="newChat()"
|
|
11426
|
-
/>
|
|
11427
|
-
}
|
|
11826
|
+
<ng-container
|
|
11827
|
+
*ngTemplateOutlet="
|
|
11828
|
+
slots().get('header') ?? defaultHeader;
|
|
11829
|
+
context: { $implicit: chatHeader() }
|
|
11830
|
+
"
|
|
11831
|
+
/>
|
|
11428
11832
|
|
|
11429
11833
|
<!-- Blank-chat landing; the first send creates the thread, which swaps
|
|
11430
11834
|
this for the message list. -->
|
|
11431
11835
|
@if (!chatService.selectedThread()) {
|
|
11432
|
-
<
|
|
11836
|
+
<ng-container
|
|
11837
|
+
*ngTemplateOutlet="
|
|
11838
|
+
slots().get('landing') ?? defaultLanding;
|
|
11839
|
+
context: { $implicit: landing() }
|
|
11840
|
+
"
|
|
11841
|
+
/>
|
|
11433
11842
|
} @else if (chatService.isLoadingMessages() && !chatService.isAgentWorking()) {
|
|
11434
11843
|
<cortex-messages-skeleton />
|
|
11435
11844
|
} @else {
|
|
11436
11845
|
<cortex-message-list class="cortex-widget__messages" [debugMode]="debugMode()" />
|
|
11437
11846
|
}
|
|
11438
11847
|
|
|
11439
|
-
<!-- Chat input (
|
|
11440
|
-
@if (
|
|
11441
|
-
|
|
11442
|
-
!chatService.hasPendingToolCalls() &&
|
|
11443
|
-
chatService.capabilities() !== undefined
|
|
11444
|
-
) {
|
|
11445
|
-
@if (chatService.capabilities()?.messages === false) {
|
|
11446
|
-
<p class="cortex-widget__messages-disabled">
|
|
11447
|
-
{{ 'translate_messages_disabled' | translate }}
|
|
11448
|
-
</p>
|
|
11449
|
-
} @else {
|
|
11450
|
-
<cortex-chat-composer />
|
|
11451
|
-
}
|
|
11848
|
+
<!-- Chat input under an open thread (the landing places its own; hidden during pending tool calls) -->
|
|
11849
|
+
@if (chatService.selectedThread() && !chatService.hasPendingToolCalls()) {
|
|
11850
|
+
<ng-container *ngTemplateOutlet="composer" />
|
|
11452
11851
|
}
|
|
11453
11852
|
</div>
|
|
11454
11853
|
|
|
11455
11854
|
<!-- Sidebar overlay backdrop (full mode, small screens) -->
|
|
11456
11855
|
<div class="cortex-widget__sidebar-backdrop" (click)="closeSidebar()"></div>
|
|
11457
11856
|
</div>
|
|
11857
|
+
|
|
11858
|
+
<!-- The widget's own parts, each standing in for a slot the host left empty.
|
|
11859
|
+
Marked like a host's slot so each default's context is typed the same way. -->
|
|
11860
|
+
<ng-template cortexSlot="header" #defaultHeader let-header>
|
|
11861
|
+
<cortex-chat-header [context]="header" />
|
|
11862
|
+
</ng-template>
|
|
11863
|
+
<ng-template cortexSlot="landing" #defaultLanding let-landing>
|
|
11864
|
+
<cortex-chat-landing [context]="landing" />
|
|
11865
|
+
</ng-template>
|
|
11866
|
+
<ng-template cortexSlot="threadList" #defaultThreadList let-list>
|
|
11867
|
+
<cortex-thread-list [context]="list" />
|
|
11868
|
+
</ng-template>
|
|
11869
|
+
|
|
11870
|
+
<!-- The composer the landing places mid-panel, without the bottom-bar chrome. -->
|
|
11871
|
+
<ng-template #landingComposer>
|
|
11872
|
+
<div class="cortex-widget__landing-composer">
|
|
11873
|
+
<ng-container *ngTemplateOutlet="composer" />
|
|
11874
|
+
</div>
|
|
11875
|
+
</ng-template>
|
|
11876
|
+
|
|
11877
|
+
<!-- The composer, or the notice an agent that takes no messages shows instead.
|
|
11878
|
+
Nothing until the handshake answers: a first send before it could open a
|
|
11879
|
+
thread /chat refuses. -->
|
|
11880
|
+
<ng-template #composer>
|
|
11881
|
+
@if (chatService.capabilities()?.messages === false) {
|
|
11882
|
+
<p class="cortex-widget__messages-disabled">
|
|
11883
|
+
{{ 'translate_messages_disabled' | translate }}
|
|
11884
|
+
</p>
|
|
11885
|
+
} @else if (chatService.capabilities() !== undefined) {
|
|
11886
|
+
<cortex-chat-composer />
|
|
11887
|
+
}
|
|
11888
|
+
</ng-template>
|
|
11458
11889
|
`,
|
|
11459
|
-
styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-code-surface: light-dark(#e8edf3, #111111);--cortex-color-code-text: light-dark(#334155, #e5e5e5);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer cortex-preflight{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}@media(min-width:769px){.cortex-widget__container--full>.cortex-widget__screen:nth-child(2) .cortex-widget__new-btn{display:none}}.cortex-widget__container--full .cortex-widget__chat-title{font-size:var(--cortex-font-size-header, .875rem)}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__header-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__header-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, var(--cortex-font-size));font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__input-area{width:100%;max-width:26rem;padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}cortex-chat-composer,cortex-message-tool-call-outcome,cortex-llm-usage-chips{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface));transition:border-color .15s,background-color .15s}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea,.cortex-widget__textarea:focus,.cortex-widget__textarea:focus-visible,.cortex-widget__textarea:disabled{background:transparent;border:0;outline:none;box-shadow:none}.cortex-widget__textarea{flex:1;resize:none;font-size:var(--cortex-font-size-message, var(--cortex-font-size));padding:.375rem .5rem;min-height:28px;max-height:calc(5.5 * var(--cortex-font-size-message, var(--cortex-font-size)) + .75rem);overflow-y:auto;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-send-empty, transparent);color:var(--cortex-color-send-empty-text, var(--cortex-color-text-muted))}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, .9375rem);font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem}.cortex-message-list__content{position:relative;display:flex;flex-direction:column;gap:.5rem}.cortex-message-list__content--settling{animation:cortex-content-settle .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-content-settle{0%{translate:0 var(--cortex-slide)}}.cortex-widget__screen>.cortex-send-flight{position:absolute;z-index:2;margin:0;max-width:none;pointer-events:none;animation:cortex-send-fade 80ms linear both,cortex-send-fly .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-send-fade{0%{opacity:0}}@keyframes cortex-send-fly{0%{translate:var(--cortex-fly-x) var(--cortex-fly-y)}}.cortex-working-thinking{padding-inline-start:2rem;--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-working-thinking{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}.cortex-working-avatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground);translate:0 var(--cortex-avatar-y, 0);visibility:hidden;pointer-events:none}.cortex-working-avatar svg{width:.875rem;height:.875rem}.cortex-working-avatar--shown{visibility:visible;transition:translate .42s cubic-bezier(.76,0,.24,1);animation:cortex-avatar-in .7s cubic-bezier(.16,1,.3,1) both}.cortex-working-avatar--leaving{animation:cortex-avatar-out .36s cubic-bezier(.5,0,.75,0) .12s both}.cortex-working-avatar__ring{position:absolute;inset:-.25rem;border-radius:9999px;border:1.5px solid color-mix(in oklab,var(--cortex-color-accent) 18%,transparent);border-top-color:var(--cortex-color-accent);border-right-color:color-mix(in oklab,var(--cortex-color-accent) 45%,transparent)}.cortex-working-avatar--shown .cortex-working-avatar__ring{animation:cortex-tool-spin 1s linear infinite}.cortex-working-avatar--leaving .cortex-working-avatar__ring{animation:cortex-avatar-ring-out .22s ease-out both}@keyframes cortex-avatar-in{0%{opacity:0;transform:translateY(2.5rem) scale(.7)}}@keyframes cortex-avatar-out{to{opacity:0;transform:scale(.4)}}@keyframes cortex-avatar-ring-out{to{opacity:0}}.cortex-message{min-width:0;transition:margin-block-start .42s cubic-bezier(.76,0,.24,1)}.cortex-message:empty{display:none}.cortex-message:has(.cortex-message-part--folded):not(:has(.cortex-message-part:not(.cortex-message-part--folded))){margin-block-start:-.5rem;transition-delay:.6s}.cortex-text-bubble--assistant,.cortex-subtle-activity,.cortex-tool-pill,.cortex-tool-pill .cortex-tool-pill__icon{transition:translate .42s cubic-bezier(.76,0,.24,1) .16s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity,.cortex-message--working-turn .cortex-tool-pill,.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{transition-delay:0s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity{translate:2rem}[dir=rtl] .cortex-message--working-turn .cortex-text-bubble--assistant,[dir=rtl] .cortex-message--working-turn .cortex-subtle-activity{translate:-2rem}.cortex-message--working-turn .cortex-tool-pill{translate:.875rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill{translate:-.875rem}.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:-.5rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:.5rem}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-actions{display:flex;align-items:center;gap:.375rem;margin-top:-.25rem}.cortex-message-actions--user{justify-content:flex-end}.cortex-message-actions__time{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:0;transition:opacity .15s ease}.cortex-message-actions:not(:has(.cortex-copy-btn)) .cortex-message-actions__time{opacity:1}.cortex-message:hover .cortex-message-actions .cortex-copy-btn__button,.cortex-message:hover .cortex-message-actions .cortex-message-actions__time,.cortex-message-actions:focus-within .cortex-copy-btn__button,.cortex-message-actions:focus-within .cortex-message-actions__time{opacity:1}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;min-width:0;transition:grid-template-rows .42s cubic-bezier(.76,0,.24,1),margin-block-end .42s cubic-bezier(.76,0,.24,1),opacity .3s ease,visibility 0s,overflow 0s .42s allow-discrete}.cortex-message-part>*{min-height:0}.cortex-message-part:empty{display:none}.cortex-message-part--folded{grid-template-rows:0fr;margin-block-end:-.5rem;opacity:0;overflow:clip;visibility:hidden;transition-delay:.6s,.6s,.6s,1.02s,0s}[data-cortex-frontier] .cortex-tool-pill__spinner{visibility:hidden}[data-cortex-frontier] .cortex-subtle-activity__dots{display:none}.cortex-message-part--animated{--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-message-part--animated{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}@keyframes cortex-part-reveal{0%{opacity:0;transform:translate(var(--cortex-reveal-from));filter:blur(5px);-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-start) 0;mask-position:var(--cortex-reveal-start) 0}40%{opacity:1}to{transform:none;filter:none;-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-end) 0;mask-position:var(--cortex-reveal-end) 0}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;min-width:0;overflow-wrap:anywhere;font-size:var(--cortex-font-size-message, var(--cortex-font-size));line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-code-surface);border-radius:var(--cortex-radius);max-width:100%;overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-code-text)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-stream-fade{animation:cortex-stream-fade .3s ease-out}@keyframes cortex-stream-fade{0%{opacity:0}}.cortex-media-block{margin:.75em 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-media-block__head{display:flex}.cortex-media-block__head[hidden]{display:none}.cortex-media-block__head{align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem .25rem .75rem;background:var(--cortex-color-surface-subtle);border-bottom:1px solid var(--cortex-color-border);font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-media-block__lang{font-family:var(--cortex-font-mono)}.cortex-media-block__pending{display:inline-flex;align-items:center;gap:.375rem}.cortex-media-block__pending:before{content:"";width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-media-block__actions{display:inline-flex;align-items:center;gap:.125rem}.cortex-media-block__action{background:transparent;border:0;padding:.125rem .375rem;border-radius:calc(var(--cortex-radius) * .5);font:inherit;color:inherit;cursor:pointer}.cortex-media-block__action:hover,.cortex-media-block__action[aria-pressed=true]{background:var(--cortex-color-hover);color:var(--cortex-color-text-strong)}.cortex-media-block__body{padding:.75rem}.cortex-media-block__body[hidden]{display:none}.cortex-media-block__body{min-height:6rem;overflow-x:auto}.cortex-media-block__body svg{display:block;max-width:100%;height:auto}.cortex-media-block__body--map{padding:0;height:18rem}.cortex-media-block__body--map>div{height:100%}.cortex-media-block__error{margin:0;font-size:.8125rem;color:var(--cortex-color-danger)}.cortex-media-block .cortex-media-block__source{margin:0;padding:.75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.5;white-space:pre;overflow-x:auto;color:var(--cortex-color-text)}.cortex-attachment-image{margin:.75em 0}.cortex-attachment-image img{display:block;max-width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border)}.cortex-attachment-image__caption{margin:.25rem 0 0;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block{display:block;margin:.5em 0 .75em}.cortex-table-block th{white-space:nowrap}.cortex-table-block td{max-width:20rem}.cortex-table-block table{margin:0}.cortex-table-block__actions{display:flex;justify-content:flex-end;gap:.125rem;min-height:1.75rem;margin-bottom:.25rem;opacity:0;transition:opacity .15s}.cortex-table-block:hover .cortex-table-block__actions,.cortex-table-block:focus-within .cortex-table-block__actions{opacity:1}@media(hover:none){.cortex-table-block__actions{opacity:1}}.cortex-table-block__action{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;width:1.75rem;height:1.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block__action:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-table-block__dialog{width:min(72rem,100vw - 2rem);max-width:none;max-height:calc(100vh - 2rem);margin:auto;padding:0;border:1px solid var(--cortex-color-border);border-radius:calc(var(--cortex-radius) * 1.5);background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 20px 50px #0003}.cortex-table-block__dialog[open]{display:flex;flex-direction:column}.cortex-table-block__dialog::backdrop{background:#0006}.cortex-table-block__dialog-head{display:flex;justify-content:flex-end;gap:.125rem;padding:.375rem;border-bottom:1px solid var(--cortex-color-border)}.cortex-table-block__dialog-body{overflow:auto;padding:0 1rem}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;gap:.375rem}.cortex-message-attachments--user{justify-content:flex-end}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-debug-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-debug-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.cortex-debug-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.cortex-debug-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.cortex-debug-tool[data-state=awaiting-input],.cortex-debug-tool[data-state=input-streaming],.cortex-debug-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.cortex-debug-tool[data-state=approval-requested],.cortex-debug-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.cortex-debug-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.cortex-debug-tool__summary::-webkit-details-marker{display:none}.cortex-debug-tool__header{display:flex;align-items:flex-start;gap:.75rem}.cortex-debug-tool__meta{flex:1;min-width:0}.cortex-debug-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-debug-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.cortex-debug-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.cortex-debug-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.cortex-debug-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.cortex-debug-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.cortex-debug-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.cortex-debug-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.cortex-debug-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.cortex-debug-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.cortex-debug-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .cortex-debug-tool__chevron{transform:rotate(180deg)}.cortex-debug-tool__body{padding:0 .875rem .75rem 1.125rem}.cortex-debug-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.cortex-debug-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-debug-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__section-label--success{color:var(--cortex-color-success)}.cortex-debug-tool__section-label--error{color:var(--cortex-color-danger)}.cortex-debug-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.cortex-debug-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.cortex-debug-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.cortex-debug-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.cortex-debug-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.cortex-debug-tool__section--success .cortex-debug-tool__tree{background:light-dark(#f0fdf4,#052e16)}.cortex-debug-tool__section--error .cortex-debug-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--cortex-color-text-muted)}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title--pending{color:var(--cortex-color-text-muted);opacity:.6}.cortex-tool-pill__meta{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:.8;white-space:nowrap;font-variant-numeric:tabular-nums}.cortex-approval-card{display:block;max-width:min(100%,28rem);margin:.25rem 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-approval-card--asking{border-color:color-mix(in oklab,var(--cortex-color-accent) 45%,var(--cortex-color-border));box-shadow:0 0 0 3px color-mix(in oklab,var(--cortex-color-accent) 10%,transparent)}.cortex-approval-card__head{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem 0;font-size:.75rem;font-weight:600;color:var(--cortex-color-accent)}.cortex-approval-card__sentence{margin:0;padding:.375rem .75rem .5rem;font-weight:600;color:var(--cortex-color-text-heading)}.cortex-approval-card__sentence--full{padding-top:0;font-weight:400;color:var(--cortex-color-text-strong)}.cortex-approval-card__rows{display:grid;grid-template-columns:fit-content(40%) minmax(0,1fr);gap:.1875rem .75rem;margin:0;padding:0 .75rem .75rem;font-size:.78125rem}.cortex-approval-card__rows dt{color:var(--cortex-color-text-secondary);overflow-wrap:anywhere}.cortex-approval-card__rows dd{max-height:6rem;margin:0;overflow-y:auto;white-space:pre-wrap;color:var(--cortex-color-text-strong);overflow-wrap:anywhere}.cortex-approval-card__foot{display:flex;gap:.5rem;padding:.625rem .75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-approval-card__button{border:1px solid var(--cortex-color-border-strong);border-radius:calc(var(--cortex-radius) * .75);background:var(--cortex-color-surface);padding:.375rem .875rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--cortex-color-text-strong);cursor:pointer}.cortex-approval-card__button--approve{border-color:var(--cortex-color-accent);background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground)}.cortex-approval-card__line{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;font-size:.8125rem;color:var(--cortex-color-text-secondary)}.cortex-approval-card__line .cortex-tool-pill__icon{flex-shrink:0}.cortex-approval-card__decision{font-weight:600;color:var(--cortex-color-text-strong)}.cortex-approval-card__summary{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-approval-card__details{flex-shrink:0;border:0;background:none;padding:0;font:inherit;font-size:.75rem;color:var(--cortex-color-text-secondary);text-decoration:underline;text-underline-offset:2px;cursor:pointer}.cortex-tool-fold{display:block;align-self:flex-start;text-align:start;border:0;background:none;padding:0 0 .25rem;margin-block-start:-.625rem;margin-inline-start:1.125rem;font:inherit;font-size:.75rem;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-tool-fold:hover,.cortex-tool-fold:focus-visible{color:var(--cortex-color-text-secondary)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-location-input{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-location-input--settled{display:flex;gap:10px;border-color:var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-location-input__map{position:relative;block-size:11rem;background:var(--cortex-color-surface-muted)}.cortex-location-input__map--still{flex:none;inline-size:120px;block-size:84px}.cortex-location-input__canvas{block-size:100%}.cortex-location-input__still-failed{display:flex;align-items:center;justify-content:center;block-size:100%;padding:0 8px;font-size:11px;text-align:center;color:var(--cortex-color-text-muted)}.cortex-location-input__locate{position:absolute;inset-inline-end:10px;inset-block-start:10px;z-index:1001;display:inline-flex;align-items:center;justify-content:center;inline-size:30px;block-size:30px;border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 1px 3px #0003;cursor:pointer}.cortex-location-input__locate svg{inline-size:15px;block-size:15px}.cortex-location-input__locate:disabled{opacity:.45;cursor:default}.cortex-location-input__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-block-start:1px solid var(--cortex-color-border-strong);font-size:12px}.cortex-location-input__hint{display:inline-flex;align-items:center;gap:6px;min-inline-size:0;color:var(--cortex-color-text-muted)}.cortex-location-input__hint--failed{color:var(--cortex-color-danger)}.cortex-location-input__spinner{inline-size:.625rem;block-size:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-location-input__coords{font-family:var(--cortex-font-mono);font-size:.75rem;color:var(--cortex-color-text-secondary);direction:ltr;unicode-bidi:isolate}.cortex-location-input__actions{display:flex;align-items:center;gap:8px}.cortex-location-input__skip{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-location-input__skip:hover{color:var(--cortex-color-danger)}.cortex-location-input__skip:disabled{opacity:.45;cursor:default}.cortex-location-input__send{border:1px solid var(--cortex-color-primary);border-radius:8px;background:var(--cortex-color-primary);padding:4px 10px;font:inherit;font-size:12px;color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-location-input__send:disabled{opacity:.45;cursor:default}.cortex-location-input__body{display:flex;flex-direction:column;justify-content:center;gap:2px;min-inline-size:0;padding-block:8px;padding-inline-end:12px}.cortex-location-input__title{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--cortex-color-text-strong)}.cortex-location-input__title svg{inline-size:13px;block-size:13px;color:var(--cortex-color-success)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__summary{flex-wrap:wrap;max-width:100%;text-align:start}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.cortex-json-tree__indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.cortex-json-tree__line{position:relative}.cortex-json-tree__toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.cortex-json-tree__toggle:hover .cortex-json-tree__arrow{color:var(--cortex-color-text)}.cortex-json-tree__arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.cortex-json-tree__arrow--collapsed{transform:rotate(-90deg)}.cortex-json-tree__bracket{color:var(--cortex-color-text-secondary)}.cortex-json-tree__key{color:light-dark(#6366f1,#818cf8)}.cortex-json-tree__colon{color:var(--cortex-color-text-secondary)}.cortex-json-tree__comma{color:var(--cortex-color-text-muted)}.cortex-json-tree__string{color:var(--cortex-color-success)}.cortex-json-tree__number{color:light-dark(#2563eb,#60a5fa)}.cortex-json-tree__boolean{color:light-dark(#d97706,#fbbf24)}.cortex-json-tree__null{color:var(--cortex-color-text-muted);font-style:italic}.cortex-json-tree__collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.cortex-json-tree__collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}}\n']
|
|
11890
|
+
styles: ['@charset "UTF-8";:root{--cortex-color-surface: light-dark(#ffffff, #0a0a0a);--cortex-color-surface-subtle: light-dark(#f8fafc, #141414);--cortex-color-surface-muted: light-dark(#f1f5f9, #1f1f1f);--cortex-color-border: light-dark(#e2e8f0, #2e2e2e);--cortex-color-border-strong: light-dark(#cbd5e1, #444444);--cortex-color-text-heading: light-dark(#1e293b, #fafafa);--cortex-color-text-strong: light-dark(#334155, #e5e5e5);--cortex-color-text: light-dark(#475569, #d4d4d4);--cortex-color-text-secondary: light-dark(#64748b, #a3a3a3);--cortex-color-text-muted: light-dark(#94a3b8, #737373);--cortex-color-primary: light-dark(#1e293b, #fafafa);--cortex-color-primary-foreground: light-dark(#ffffff, #0a0a0a);--cortex-color-accent: light-dark(#4f46e5, #818cf8);--cortex-color-accent-surface: light-dark(#e0e7ff, #312e81);--cortex-color-link: light-dark(#2563eb, #60a5fa);--cortex-color-hover: light-dark(rgba(0, 0, 0, .05), rgba(255, 255, 255, .06));--cortex-color-user-surface: var(--cortex-color-surface-subtle);--cortex-color-user-border: var(--cortex-color-border);--cortex-color-code-surface: light-dark(#e8edf3, #111111);--cortex-color-code-text: light-dark(#334155, #e5e5e5);--cortex-color-success: light-dark(#059669, #34d399);--cortex-color-success-surface: light-dark(#ecfdf5, #064e3b);--cortex-color-success-border: light-dark(#d1fae5, #065f46);--cortex-color-danger: light-dark(#dc2626, #f87171);--cortex-color-danger-surface: light-dark(#fef2f2, #450a0a);--cortex-color-danger-border: light-dark(#fecaca, #7f1d1d);--cortex-radius: .5rem;--cortex-font-mono: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace );--cortex-font-size: .8125rem}.cortex-widget{color-scheme:light}.cortex-widget[data-cortex-theme=dark]{color-scheme:dark}.cortex-widget[data-cortex-theme=system]{color-scheme:light dark}@layer base.cortex{:where(.cortex-widget),:where(.cortex-widget) *,:where(.cortex-widget) :before,:where(.cortex-widget) :after{box-sizing:border-box;margin:0;padding:0;border:0 solid}:where(.cortex-widget){tab-size:4}:where(.cortex-widget) hr{height:0;color:inherit;border-top-width:1px}:where(.cortex-widget) :is(h1,h2,h3,h4,h5,h6){font-size:inherit;font-weight:inherit}:where(.cortex-widget) a{color:inherit;text-decoration:inherit}:where(.cortex-widget) :is(b,strong){font-weight:bolder}:where(.cortex-widget) :is(code,kbd,samp,pre){font-family:var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings, normal);font-variation-settings:var(--default-mono-font-variation-settings, normal);font-size:1em}:where(.cortex-widget) small{font-size:80%}:where(.cortex-widget) :is(sub,sup){font-size:75%;line-height:0;position:relative;vertical-align:baseline}:where(.cortex-widget) sub{bottom:-.25em}:where(.cortex-widget) sup{top:-.5em}:where(.cortex-widget) table{text-indent:0;border-color:inherit;border-collapse:collapse}:where(.cortex-widget) :is(ol,ul,menu){list-style:none}:where(.cortex-widget) :is(img,svg,video,canvas,audio,iframe,embed,object){display:block;vertical-align:middle}:where(.cortex-widget) :is(img,video){max-width:100%;height:auto}:where(.cortex-widget) :is(button,input,select,optgroup,textarea){font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(.cortex-widget) ::placeholder{opacity:1;color:color-mix(in oklab,currentcolor 50%,transparent)}:where(.cortex-widget) textarea{resize:vertical}}.cortex-widget .hljs{color:light-dark(#24292e,#c9d1d9);background:transparent}.cortex-widget .hljs-doctag,.cortex-widget .hljs-keyword,.cortex-widget .hljs-meta .hljs-keyword,.cortex-widget .hljs-template-tag,.cortex-widget .hljs-template-variable,.cortex-widget .hljs-type,.cortex-widget .hljs-variable.language_{color:light-dark(#d73a49,#ff7b72)}.cortex-widget .hljs-title,.cortex-widget .hljs-title.class_,.cortex-widget .hljs-title.class_.inherited__,.cortex-widget .hljs-title.function_{color:light-dark(#6f42c1,#d2a8ff)}.cortex-widget .hljs-attr,.cortex-widget .hljs-attribute,.cortex-widget .hljs-literal,.cortex-widget .hljs-meta,.cortex-widget .hljs-number,.cortex-widget .hljs-operator,.cortex-widget .hljs-selector-attr,.cortex-widget .hljs-selector-class,.cortex-widget .hljs-selector-id,.cortex-widget .hljs-variable{color:light-dark(#005cc5,#79c0ff)}.cortex-widget .hljs-meta .hljs-string,.cortex-widget .hljs-regexp,.cortex-widget .hljs-string{color:light-dark(#032f62,#a5d6ff)}.cortex-widget .hljs-built_in,.cortex-widget .hljs-symbol{color:light-dark(#e36209,#ffa657)}.cortex-widget .hljs-code,.cortex-widget .hljs-comment,.cortex-widget .hljs-formula{color:light-dark(#6a737d,#8b949e)}.cortex-widget .hljs-name,.cortex-widget .hljs-quote,.cortex-widget .hljs-selector-pseudo,.cortex-widget .hljs-selector-tag{color:light-dark(#22863a,#7ee787)}.cortex-widget .hljs-subst{color:light-dark(#24292e,#c9d1d9)}.cortex-widget .hljs-section{color:light-dark(#005cc5,#1f6feb);font-weight:700}.cortex-widget .hljs-bullet{color:light-dark(#735c0f,#f2cc60)}.cortex-widget .hljs-emphasis{font-style:italic}.cortex-widget .hljs-strong{font-weight:700}.cortex-widget .hljs-addition{color:light-dark(#22863a,#aff5b4);background-color:light-dark(#f0fff4,#033a16)}.cortex-widget .hljs-deletion{color:light-dark(#b31d28,#ffdcd7);background-color:light-dark(#ffeef0,#67060c)}.cortex-widget{display:block}.cortex-widget__container{width:100%;height:100%;position:relative;overflow:hidden}.cortex-widget__screen{position:absolute;inset:0;display:flex;flex-direction:column;transition:transform .3s ease-out}.cortex-widget__screen--active{transform:translate(0)}.cortex-widget__screen--left{transform:translate(-100%)}[dir=rtl] .cortex-widget__screen--left,.cortex-widget__screen--right{transform:translate(100%)}[dir=rtl] .cortex-widget__screen--right{transform:translate(-100%)}@keyframes cortex-skeleton-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}.cortex-skeleton{background:linear-gradient(90deg,var(--cortex-color-border) 0%,var(--cortex-color-surface-muted) 40%,var(--cortex-color-border) 80%);background-size:200% 100%;animation:cortex-skeleton-shimmer 1.8s ease-in-out infinite;border-radius:6px}.cortex-widget__messages-skeleton{flex:1;overflow:hidden;padding:1rem;display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel{width:100%;display:flex;flex-direction:column}.cortex-widget__msg-skel--user{align-items:flex-end}.cortex-widget__msg-skel--assistant{align-items:flex-start}.cortex-widget__msg-skel-bubble{max-width:80%;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);display:flex;flex-direction:column;gap:.5rem}.cortex-widget__msg-skel-bubble--user{background:var(--cortex-color-surface-subtle);border-bottom-right-radius:0}.cortex-widget__msg-skel-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}.cortex-widget__msg-skel-line{height:.75rem;max-width:100%}.cortex-widget__messages{flex:1;overflow:hidden}.cortex-widget__container--full{display:flex;flex-direction:row}.cortex-widget__container--full>.cortex-widget__screen{position:relative;inset:auto;transition:none}.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--active,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--left,.cortex-widget__container--full>.cortex-widget__screen.cortex-widget__screen--right{transform:none}.cortex-widget__container--full>.cortex-widget__screen:first-child{width:280px;min-width:280px;flex-shrink:0;border-right:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{border-right:0;border-left:1px solid var(--cortex-color-border)}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__back-btn,.cortex-widget__container--full .cortex-widget__history-btn{display:none}@media(min-width:769px){.cortex-widget__container--full>.cortex-widget__screen:nth-child(2) .cortex-widget__new-btn{display:none}}.cortex-widget__container--full .cortex-widget__chat-title{font-size:var(--cortex-font-size-header, .875rem)}.cortex-widget__container--full .cortex-widget__chat-header{background:var(--cortex-color-surface)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1.5rem 2rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem 2rem 1.25rem}@media(max-width:768px){.cortex-widget__container--full>.cortex-widget__screen:first-child{position:fixed;inset:0;width:280px;min-width:280px;z-index:110;transform:translate(-100%);transition:transform .28s cubic-bezier(.4,0,.2,1)}[dir=rtl] .cortex-widget__container--full>.cortex-widget__screen:first-child{transform:translate(100%);border-left:1px solid var(--cortex-color-border);border-right:0}.cortex-widget__container--full>.cortex-widget__screen:nth-child(2){flex:1;min-width:0}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-secondary)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:hover{color:var(--cortex-color-text-strong);background:var(--cortex-color-surface-muted)}.cortex-widget__container--full .cortex-widget__sidebar-toggle-btn:active{background:var(--cortex-color-border)}.cortex-widget__container--full .cortex-message-list,.cortex-widget__container--full .cortex-widget__messages-skeleton{padding:1rem}.cortex-widget__container--full .cortex-widget__input-area{padding:.75rem}}@media(max-width:768px){.cortex-widget__container--full.cortex-widget__container--sidebar-open>.cortex-widget__screen:first-child{transform:translate(0)}.cortex-widget__container--full.cortex-widget__container--sidebar-open .cortex-widget__sidebar-backdrop{display:block;position:fixed;inset:0;z-index:100;background:#0f172a59;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);animation:cortex-sidebar-backdrop-in .2s ease-out both}}@keyframes cortex-sidebar-backdrop-in{0%{opacity:0}to{opacity:1}}.cortex-widget__chat-header{flex-shrink:0;height:3rem;padding:0 1rem;display:flex;align-items:center;gap:.75rem;border-bottom:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__header-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__header-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-surface-muted)}[dir=rtl] .cortex-widget__back-icon{transform:rotate(180deg)}.cortex-widget__chat-title-wrap{min-width:0;flex:1}.cortex-widget__chat-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, var(--cortex-font-size));font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__debug-btn{flex-shrink:0;font-size:.6875rem;font-weight:500;padding:.25rem .625rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__debug-btn--on{background:light-dark(#fef3c7,#78350f);color:light-dark(#d97706,#fbbf24)}.cortex-widget__debug-btn--on:hover{background:light-dark(#fde68a,#92400e)}.cortex-widget__debug-btn--off{background:var(--cortex-color-surface-muted);color:var(--cortex-color-text-muted)}.cortex-widget__debug-btn--off:hover{background:var(--cortex-color-border)}.cortex-widget__landing{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:1.25rem;text-align:center}.cortex-widget__landing .cortex-widget__landing-composer{max-width:26rem}.cortex-widget__landing-composer{width:100%}.cortex-widget__landing-composer .cortex-widget__input-area{padding:1rem 0 0;border-top:0;background:transparent}.cortex-widget__landing-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent);display:flex;align-items:center;justify-content:center;margin-bottom:.875rem}[dir=rtl] .cortex-widget__landing-icon{transform:scaleX(-1)}.cortex-widget__landing-greeting{font-family:var(--cortex-font-display, inherit);font-size:1.0625rem;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading);margin:0}.cortex-widget__landing-chips{display:flex;flex-wrap:wrap;justify-content:center;gap:.5rem;margin-top:.875rem}.cortex-widget__landing-chip{border:1px solid var(--cortex-color-border);border-radius:999px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);font-size:.75rem;font-weight:500;padding:.375rem .75rem;cursor:pointer;transition:border-color .15s,color .15s}.cortex-widget__landing-chip:hover{border-color:var(--cortex-color-accent);color:var(--cortex-color-accent)}.cortex-widget__landing-recent{width:100%;max-width:26rem;margin-top:1rem;display:flex;flex-direction:column}.cortex-widget__landing-recent-item{display:flex;align-items:center;gap:.75rem;padding:.4375rem .625rem;border:0;border-radius:calc(var(--cortex-radius) * .75);background:transparent;cursor:pointer;transition:background-color .15s}.cortex-widget__landing-recent-item:hover{background:var(--cortex-color-hover)}.cortex-widget__landing-recent-title{flex:1;min-width:0;text-align:start;font-size:var(--cortex-font-size);font-weight:500;color:var(--cortex-color-text-strong);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}.cortex-widget__landing-recent-time{flex-shrink:0;font-size:.6875rem;color:var(--cortex-color-text-muted);margin:0}cortex-chat-composer,cortex-message-tool-call-outcome,cortex-llm-usage-chips{display:contents}.cortex-widget__input-area{flex-shrink:0;padding:.75rem;background:var(--cortex-color-surface);border-top:1px solid var(--cortex-color-border)}.cortex-widget__input-box{display:flex;align-items:flex-end;gap:.5rem;border-radius:calc(var(--cortex-radius) * 1.5);border:1px solid var(--cortex-color-border);padding:.375rem;background:color-mix(in oklab,var(--cortex-color-surface-subtle) 45%,var(--cortex-color-surface));transition:border-color .15s,background-color .15s}.cortex-widget__input-box--enabled:focus-within{border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface)}.cortex-widget__input-box--dragging{border-color:var(--cortex-color-text-heading);border-style:dashed;background:var(--cortex-color-surface-muted)}.cortex-widget__textarea,.cortex-widget__textarea:focus,.cortex-widget__textarea:focus-visible,.cortex-widget__textarea:disabled{background:transparent;border:0;outline:none;box-shadow:none}.cortex-widget__textarea{flex:1;resize:none;font-size:var(--cortex-font-size-message, var(--cortex-font-size));padding:.375rem .5rem;min-height:28px;max-height:calc(5.5 * var(--cortex-font-size-message, var(--cortex-font-size)) + .75rem);overflow-y:auto;line-height:1.375;color:var(--cortex-color-text-strong)}.cortex-widget__textarea::placeholder{color:var(--cortex-color-text-muted)}.cortex-widget__textarea--disabled{color:var(--cortex-color-text-muted);cursor:not-allowed}.cortex-widget__textarea:disabled{cursor:not-allowed}.cortex-widget__input-actions{flex-shrink:0;display:flex;align-items:center;gap:.375rem}@keyframes cortex-stop-pulse-ring{0%{opacity:.45;transform:scale(1)}50%{opacity:.15;transform:scale(1.12)}to{opacity:.45;transform:scale(1)}}@keyframes cortex-stop-fade-in{0%{opacity:0;transform:scale(.7)}to{opacity:1;transform:scale(1)}}.cortex-stop-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;background:var(--cortex-color-danger);color:#fff;border:0;animation:cortex-stop-fade-in .2s ease-out both;transition:background .15s ease}.cortex-stop-btn:hover{background:color-mix(in oklab,var(--cortex-color-danger) 85%,black)}.cortex-stop-btn:active{transform:scale(.92)}.cortex-stop-btn__ring{position:absolute;inset:0;border-radius:var(--cortex-radius);background:var(--cortex-color-danger);animation:cortex-stop-pulse-ring 2s ease-in-out infinite;pointer-events:none}.cortex-stop-btn__icon{position:relative;z-index:1}.cortex-widget__attach-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;color:var(--cortex-color-text-muted)}.cortex-widget__attach-btn:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-widget__file-input{display:none}.cortex-widget__send-btn{flex-shrink:0;width:2rem;height:2rem;border-radius:var(--cortex-radius);display:flex;align-items:center;justify-content:center;border:0;transition:background-color .15s;cursor:default}.cortex-widget__send-btn--empty{background:var(--cortex-color-send-empty, transparent);color:var(--cortex-color-send-empty-text, var(--cortex-color-text-muted))}.cortex-widget__send-btn--ready{background:var(--cortex-color-primary);color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-widget__send-btn--ready:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}[dir=rtl] .cortex-widget__send-icon{transform:rotate(180deg)}.cortex-widget__threads-header{flex-shrink:0;padding:1.25rem 1.25rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-widget__threads-header .cortex-widget__new-btn{margin-inline-start:auto}.cortex-widget__threads-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size-header, .9375rem);font-weight:600;color:var(--cortex-color-text-heading);letter-spacing:-.01em;margin:0}.cortex-widget__threads-count{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0}.cortex-widget__new-chat-btn{display:inline-flex;align-items:center;gap:.375rem;font-size:.75rem;font-weight:500;color:var(--cortex-color-primary-foreground);background:var(--cortex-color-primary);padding:.375rem .75rem;border-radius:calc(var(--cortex-radius) * .75);border:0;cursor:pointer;transition:background-color .15s}.cortex-widget__new-chat-btn:hover{background:color-mix(in oklab,var(--cortex-color-primary) 85%,var(--cortex-color-primary-foreground))}.cortex-widget__new-chat-btn:active{background:var(--cortex-color-primary)}.cortex-widget__new-chat-btn--empty-state{margin-top:.75rem}.cortex-widget__threads-list{flex:1;overflow-y:auto;padding:0 .75rem .75rem}.cortex-widget__thread-skeleton{display:flex;align-items:center;gap:.75rem;padding:.75rem;margin-bottom:.375rem;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface)}.cortex-widget__thread-skeleton-icon{flex-shrink:0;width:2rem;height:2rem}.cortex-widget__thread-skeleton-lines{flex:1;display:flex;flex-direction:column;gap:.375rem}.cortex-widget__thread-skeleton-line{height:.875rem}.cortex-widget__thread-item{width:100%;text-align:start;padding:.75rem;border-radius:var(--cortex-radius);display:flex;align-items:center;gap:.75rem;transition:background-color .15s,border-color .15s;cursor:pointer;margin-bottom:.375rem;border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface);color:var(--cortex-color-text)}.cortex-widget__thread-item:hover{background:var(--cortex-color-surface-muted);border-color:var(--cortex-color-border-strong)}.cortex-widget__thread-item:active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border))}.cortex-widget__thread-item--active{background:color-mix(in oklab,var(--cortex-color-surface-muted) 50%,var(--cortex-color-border));border-color:var(--cortex-color-border-strong);color:var(--cortex-color-text-heading)}.cortex-widget__thread-item--active:hover{background:var(--cortex-color-border)}.cortex-widget__thread-item--active:active{background:color-mix(in oklab,var(--cortex-color-border) 50%,var(--cortex-color-border-strong))}.cortex-widget__thread-icon{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;font-size:.6875rem;font-weight:600;background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}[dir=rtl] .cortex-widget__thread-icon{transform:scaleX(-1)}.cortex-widget__thread-icon--active{background:color-mix(in oklab,var(--cortex-color-accent-surface) 85%,var(--cortex-color-accent))}.cortex-widget__thread-info{min-width:0;flex:1}.cortex-widget__thread-title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-widget__thread-title{font-size:var(--cortex-font-size);font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.25;margin:0;color:var(--cortex-color-text-strong)}.cortex-widget__thread-title--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-widget__thread-time{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.125rem;margin-bottom:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-widget__thread-running{flex-shrink:0;display:inline-flex;align-items:center;gap:.3125rem;padding:.2rem .45rem;border-radius:999px;background:var(--cortex-color-success-surface);color:var(--cortex-color-success);font-size:.625rem;font-weight:700;letter-spacing:.02em;text-transform:uppercase}.cortex-widget__thread-running-dot{width:.375rem;height:.375rem;border-radius:999px;background:currentColor;box-shadow:0 0 .45rem currentColor;animation:cortex-thread-running-pulse 1.4s ease-in-out infinite}@keyframes cortex-thread-running-pulse{0%,to{opacity:.45;transform:scale(.9)}50%{opacity:1;transform:scale(1)}}.cortex-widget__thread-delete{flex-shrink:0;opacity:0;width:1.75rem;height:1.75rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;cursor:pointer;transition:opacity .15s;background:transparent;border:0;color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-delete{opacity:1}.cortex-widget__thread-delete:hover{background:var(--cortex-color-border)}.cortex-widget__thread-delete--active{color:var(--cortex-color-text-secondary)}.cortex-widget__thread-delete--active:hover{color:var(--cortex-color-text)}.cortex-widget__thread-arrow{flex-shrink:0;transition:color .15s;color:var(--cortex-color-border-strong)}[dir=rtl] .cortex-widget__thread-arrow{transform:rotate(180deg)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow{color:var(--cortex-color-text-muted)}.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-muted)}.cortex-widget__thread-item:hover>.cortex-widget__thread-arrow--active{color:var(--cortex-color-text-secondary)}.cortex-widget__threads-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:4rem 0;text-align:center}.cortex-widget__threads-empty-icon{width:2.5rem;height:2.5rem;border-radius:var(--cortex-radius);background:var(--cortex-color-accent-surface);display:flex;align-items:center;justify-content:center;margin-bottom:.75rem}.cortex-widget__threads-empty-svg{color:var(--cortex-color-accent)}.cortex-widget__threads-empty-title{font-family:var(--cortex-font-display, inherit);font-size:var(--cortex-font-size);color:var(--cortex-color-text-muted);font-weight:500;margin:0}.cortex-widget__threads-empty-subtitle{font-size:.6875rem;color:var(--cortex-color-text-muted);margin-top:.25rem;margin-bottom:0}.cortex-widget__sidebar-toggle-btn,.cortex-widget__sidebar-backdrop{display:none}.cortex-message-list{height:100%;overflow-y:auto;overflow-x:hidden;width:100%;padding:1rem}.cortex-message-list__content{position:relative;display:flex;flex-direction:column;gap:.5rem}.cortex-message-list__content--settling{animation:cortex-content-settle .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-content-settle{0%{translate:0 var(--cortex-slide)}}.cortex-widget__screen>.cortex-send-flight{position:absolute;z-index:2;margin:0;max-width:none;pointer-events:none;animation:cortex-send-fade 80ms linear both,cortex-send-fly .42s cubic-bezier(.76,0,.24,1) both}@keyframes cortex-send-fade{0%{opacity:0}}@keyframes cortex-send-fly{0%{translate:var(--cortex-fly-x) var(--cortex-fly-y)}}.cortex-working-thinking{padding-inline-start:2rem;--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-working-thinking{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}.cortex-working-avatar{position:absolute;top:0;inset-inline-start:0;z-index:1;width:1.5rem;height:1.5rem;display:flex;align-items:center;justify-content:center;border-radius:9999px;background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground);translate:0 var(--cortex-avatar-y, 0);visibility:hidden;pointer-events:none}.cortex-working-avatar svg{width:.875rem;height:.875rem}.cortex-working-avatar--shown{visibility:visible;transition:translate .42s cubic-bezier(.76,0,.24,1);animation:cortex-avatar-in .7s cubic-bezier(.16,1,.3,1) both}.cortex-working-avatar--leaving{animation:cortex-avatar-out .36s cubic-bezier(.5,0,.75,0) .12s both}.cortex-working-avatar__ring{position:absolute;inset:-.25rem;border-radius:9999px;border:1.5px solid color-mix(in oklab,var(--cortex-color-accent) 18%,transparent);border-top-color:var(--cortex-color-accent);border-right-color:color-mix(in oklab,var(--cortex-color-accent) 45%,transparent)}.cortex-working-avatar--shown .cortex-working-avatar__ring{animation:cortex-tool-spin 1s linear infinite}.cortex-working-avatar--leaving .cortex-working-avatar__ring{animation:cortex-avatar-ring-out .22s ease-out both}@keyframes cortex-avatar-in{0%{opacity:0;transform:translateY(2.5rem) scale(.7)}}@keyframes cortex-avatar-out{to{opacity:0;transform:scale(.4)}}@keyframes cortex-avatar-ring-out{to{opacity:0}}.cortex-message{min-width:0;transition:margin-block-start .42s cubic-bezier(.76,0,.24,1)}.cortex-message:empty{display:none}.cortex-message:has(.cortex-message-part--folded):not(:has(.cortex-message-part:not(.cortex-message-part--folded))){margin-block-start:-.5rem;transition-delay:.6s}.cortex-text-bubble--assistant,.cortex-subtle-activity,.cortex-tool-pill,.cortex-tool-pill .cortex-tool-pill__icon{transition:translate .42s cubic-bezier(.76,0,.24,1) .16s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity,.cortex-message--working-turn .cortex-tool-pill,.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{transition-delay:0s}.cortex-message--working-turn .cortex-text-bubble--assistant,.cortex-message--working-turn .cortex-subtle-activity{translate:2rem}[dir=rtl] .cortex-message--working-turn .cortex-text-bubble--assistant,[dir=rtl] .cortex-message--working-turn .cortex-subtle-activity{translate:-2rem}.cortex-message--working-turn .cortex-tool-pill{translate:.875rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill{translate:-.875rem}.cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:-.5rem}[dir=rtl] .cortex-message--working-turn .cortex-tool-pill .cortex-tool-pill__icon{translate:.5rem}.cortex-message-parts{width:100%;display:flex;flex-direction:column;gap:.5rem}.cortex-message-actions{display:flex;align-items:center;gap:.375rem;margin-top:-.25rem}.cortex-message-actions--user{justify-content:flex-end}.cortex-message-actions__time{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:0;transition:opacity .15s ease}.cortex-message-actions:not(:has(.cortex-copy-btn)) .cortex-message-actions__time{opacity:1}.cortex-message:hover .cortex-message-actions .cortex-copy-btn__button,.cortex-message:hover .cortex-message-actions .cortex-message-actions__time,.cortex-message-actions:focus-within .cortex-copy-btn__button,.cortex-message-actions:focus-within .cortex-message-actions__time{opacity:1}.cortex-message-debug-zone{display:flex;flex-direction:column;gap:.25rem;padding-top:.375rem;margin-top:.125rem;border-top:1px dashed var(--cortex-color-border)}.cortex-message-part{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr;min-width:0;transition:grid-template-rows .42s cubic-bezier(.76,0,.24,1),margin-block-end .42s cubic-bezier(.76,0,.24,1),opacity .3s ease,visibility 0s,overflow 0s .42s allow-discrete}.cortex-message-part>*{min-height:0}.cortex-message-part:empty{display:none}.cortex-message-part--folded{grid-template-rows:0fr;margin-block-end:-.5rem;opacity:0;overflow:clip;visibility:hidden;transition-delay:.6s,.6s,.6s,1.02s,0s}[data-cortex-frontier] .cortex-tool-pill__spinner{visibility:hidden}[data-cortex-frontier] .cortex-subtle-activity__dots{display:none}.cortex-message-part--animated{--cortex-reveal-from: -1rem;--cortex-reveal-mask: linear-gradient(to right, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 100%;--cortex-reveal-end: 0%;animation:cortex-part-reveal .7s cubic-bezier(.22,1,.36,1) backwards}[dir=rtl] .cortex-message-part--animated{--cortex-reveal-from: 1rem;--cortex-reveal-mask: linear-gradient(to left, #000 40%, rgb(0 0 0 / .35) 60%);--cortex-reveal-start: 0%;--cortex-reveal-end: 100%}@keyframes cortex-part-reveal{0%{opacity:0;transform:translate(var(--cortex-reveal-from));filter:blur(5px);-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-start) 0;mask-position:var(--cortex-reveal-start) 0}40%{opacity:1}to{transform:none;filter:none;-webkit-mask-image:var(--cortex-reveal-mask);mask-image:var(--cortex-reveal-mask);-webkit-mask-size:300% 100%;mask-size:300% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:var(--cortex-reveal-end) 0;mask-position:var(--cortex-reveal-end) 0}}.cortex-unhandled-type{text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-text-part{width:100%;display:flex;flex-direction:column}.cortex-text-part--assistant{align-items:flex-start}.cortex-text-part--user{align-items:flex-end}[dir=rtl] .cortex-text-part--assistant{align-items:flex-start}[dir=rtl] .cortex-text-part--user{align-items:flex-end}.cortex-text-bubble{max-width:80%;min-width:0;overflow-wrap:anywhere;font-size:var(--cortex-font-size-message, var(--cortex-font-size));line-height:1.625;padding:1rem;border-radius:calc(var(--cortex-radius) * 2);border:1px solid var(--cortex-color-border);color:var(--cortex-color-text-strong)}.cortex-text-bubble--assistant{background:var(--cortex-color-surface-muted);border-bottom-left-radius:0}[dir=rtl] .cortex-text-bubble--assistant{border-bottom-left-radius:calc(var(--cortex-radius) * 2);border-bottom-right-radius:0}.cortex-text-bubble--user{background:var(--cortex-color-user-surface);border-color:var(--cortex-color-user-border);border-bottom-right-radius:0}[dir=rtl] .cortex-text-bubble--user{border-bottom-right-radius:calc(var(--cortex-radius) * 2);border-bottom-left-radius:0}.cortex-text-bubble h1,.cortex-text-bubble h2,.cortex-text-bubble h3,.cortex-text-bubble h4,.cortex-text-bubble h5,.cortex-text-bubble h6{margin-top:1.25em;margin-bottom:.5em;font-weight:600;line-height:1.3;color:var(--cortex-color-text-heading)}.cortex-text-bubble h1:first-child,.cortex-text-bubble h2:first-child,.cortex-text-bubble h3:first-child,.cortex-text-bubble h4:first-child,.cortex-text-bubble h5:first-child,.cortex-text-bubble h6:first-child{margin-top:0}.cortex-text-bubble h1{font-size:1.25em}.cortex-text-bubble h2{font-size:1.125em}.cortex-text-bubble h3{font-size:1em}.cortex-text-bubble p{margin-top:.75em;margin-bottom:.75em}.cortex-text-bubble p:first-child{margin-top:0}.cortex-text-bubble p:last-child{margin-bottom:0}.cortex-text-bubble ul,.cortex-text-bubble ol{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1.5em}.cortex-text-bubble ul{list-style-type:disc}.cortex-text-bubble ol{list-style-type:decimal}.cortex-text-bubble li{margin-top:.25em;margin-bottom:.25em}.cortex-text-bubble code{font-family:var(--cortex-font-mono);font-size:.875em;background:var(--cortex-color-border);padding:.125em .375em;border-radius:calc(var(--cortex-radius) * .5)}.cortex-text-bubble pre{margin-top:.75em;margin-bottom:.75em;padding:.75em 1em;background:var(--cortex-color-code-surface);border-radius:var(--cortex-radius);max-width:100%;overflow-x:auto;font-size:.8125em;line-height:1.6}.cortex-text-bubble pre code{background:transparent;padding:0;color:var(--cortex-color-code-text)}.cortex-text-bubble blockquote{margin-top:.75em;margin-bottom:.75em;padding-inline-start:1em;border-inline-start:3px solid var(--cortex-color-border-strong);color:var(--cortex-color-text-secondary);font-style:italic}.cortex-text-bubble a{color:var(--cortex-color-link);text-decoration:underline}.cortex-text-bubble a:hover{color:color-mix(in oklab,var(--cortex-color-link) 80%,var(--cortex-color-text-heading))}.cortex-text-bubble table{width:100%;border-collapse:collapse;margin-top:.75em;margin-bottom:.75em;font-size:.875em}.cortex-text-bubble th,.cortex-text-bubble td{border:1px solid var(--cortex-color-border);padding:.375em .75em;text-align:start}.cortex-text-bubble th{background:var(--cortex-color-surface-subtle);font-weight:600}.cortex-text-bubble hr{margin-top:1.5em;margin-bottom:1.5em;border:none;border-top:1px solid var(--cortex-color-border)}.cortex-text-bubble img{max-width:100%;height:auto;border-radius:calc(var(--cortex-radius) * .75)}.cortex-stream-fade{animation:cortex-stream-fade .3s ease-out}@keyframes cortex-stream-fade{0%{opacity:0}}.cortex-expandable{display:block;position:relative}.cortex-expandable__content{isolation:isolate}.cortex-expandable__toolbar{position:absolute;top:.375rem;inset-inline-end:.375rem;z-index:1;display:flex;gap:.125rem;padding:.125rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);box-shadow:0 1px 3px #00000014;opacity:0;transition:opacity .15s}.cortex-expandable:hover>.cortex-expandable__toolbar,.cortex-expandable__toolbar:has(:focus-visible){opacity:1}@media(hover:none){.cortex-expandable__toolbar{position:static;width:fit-content;margin:0 0 .25rem;margin-inline-start:auto;opacity:1}}.cortex-expandable__action{flex-shrink:0;width:2rem;height:2rem;border-radius:calc(var(--cortex-radius) * .75);display:flex;align-items:center;justify-content:center;background:transparent;border:0;cursor:pointer;transition:color .15s,background-color .15s;width:1.75rem;height:1.75rem;color:var(--cortex-color-text-muted)}.cortex-expandable__action:hover{color:var(--cortex-color-text);background:var(--cortex-color-hover)}.cortex-expandable__dialog{width:fit-content;min-width:min(24rem,100vw - 2rem);max-width:calc(100vw - 2rem);max-height:calc(100dvh - 2rem);margin:auto;padding:0;overflow:hidden;border:1px solid var(--cortex-color-border);border-radius:calc(var(--cortex-radius) * 1.5);background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 24px 64px #0000003d}.cortex-expandable__dialog[open]{display:flex;flex-direction:column;animation:cortex-expandable-in .18s ease-out}.cortex-expandable__dialog::backdrop{background:#00000073;animation:cortex-expandable-backdrop-in .18s ease-out}.cortex-expandable__head{display:flex;align-items:center;gap:.125rem;padding-block:.375rem;padding-inline:1rem .375rem;border-bottom:1px solid var(--cortex-color-border)}.cortex-expandable__title{flex:1;min-width:0;margin-inline-end:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.875rem;font-weight:600;color:var(--cortex-color-text-heading)}.cortex-expandable__body{min-height:0;overflow:auto;overscroll-behavior:contain}@keyframes cortex-expandable-in{0%{opacity:0;transform:translateY(.5rem) scale(.98)}}@keyframes cortex-expandable-backdrop-in{0%{opacity:0}}.cortex-media-block{display:block;width:40rem;max-width:100%;margin:.75em 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-media-block__head{display:flex}.cortex-media-block__head[hidden]{display:none}.cortex-media-block__head{align-items:center;justify-content:space-between;gap:.5rem;padding:.25rem .5rem .25rem .75rem;background:var(--cortex-color-surface-subtle);border-bottom:1px solid var(--cortex-color-border);font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-media-block__lang{font-family:var(--cortex-font-mono)}.cortex-media-block__pending{display:inline-flex;align-items:center;gap:.375rem}.cortex-media-block__pending:before{content:"";width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-media-block__actions{display:inline-flex;align-items:center;gap:.125rem}.cortex-media-block__action{background:transparent;border:0;padding:.125rem .375rem;border-radius:calc(var(--cortex-radius) * .5);font:inherit;color:inherit;cursor:pointer}.cortex-media-block__action:hover,.cortex-media-block__action[aria-pressed=true]{background:var(--cortex-color-hover);color:var(--cortex-color-text-strong)}.cortex-media-block__body{display:block;padding:.75rem}.cortex-media-block__body[hidden]{display:none}.cortex-media-block__body{min-height:6rem;overflow-x:auto}.cortex-media-block__body svg{display:block;max-width:100%;height:auto}.cortex-media-block__body>div>svg{margin-inline:auto}.cortex-media-block__body--map{padding:0;height:18rem}.cortex-media-block__body--map>div{height:100%}.cortex-expandable__body .cortex-media-block__body{width:min(72rem,100vw - 2rem - 2px)}.cortex-expandable__body .cortex-media-block__body:not(.cortex-media-block__body--map)>div{display:grid}.cortex-expandable__body .cortex-media-block__body:not(.cortex-media-block__body--map) svg{width:100%;max-width:none!important;max-height:calc(100dvh - 6.5rem)}.cortex-expandable__body .cortex-media-block__body--map{height:min(48rem,100dvh - 5rem)}.cortex-expandable:has(>.cortex-expandable__content>.cortex-media-block__body--map)>.cortex-expandable__toolbar{right:.375rem;left:auto}.cortex-media-block__error{margin:0;font-size:.8125rem;color:var(--cortex-color-danger)}.cortex-media-block .cortex-media-block__source{margin:0;padding:.75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.5;white-space:pre;overflow-x:auto;color:var(--cortex-color-text)}.cortex-attachment-image{margin:.75em 0}.cortex-attachment-image .cortex-expandable{width:fit-content;max-width:100%}.cortex-attachment-image .cortex-expandable__content img{display:block;max-width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border)}.cortex-expandable__body .cortex-attachment-image__expanded{display:block;max-width:calc(100vw - 2rem - 2px);max-height:calc(100dvh - 5rem);margin:auto;border-radius:0}.cortex-attachment-image__caption{margin:.25rem 0 0;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-table-block{display:block;margin:.75em 0}.cortex-table-block th{white-space:nowrap}.cortex-table-block td{max-width:20rem}.cortex-table-block table{margin:0}.cortex-table-block .cortex-expandable{width:fit-content;max-width:100%}.cortex-table-block__expanded{padding:1rem}.cortex-table-block__expanded td{max-width:40rem}.cortex-reasoning-details{width:100%;border-radius:var(--cortex-radius);border:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-reasoning-details__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.75rem 1rem;display:flex;align-items:center;gap:.75rem}.cortex-reasoning-details__summary::-webkit-details-marker{display:none}.cortex-reasoning-details__header{display:flex;align-items:center;gap:.5rem;min-width:0;flex:1}.cortex-reasoning-details__icon{display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-accent-surface);color:var(--cortex-color-accent)}.cortex-reasoning-details__title-group{min-width:0}.cortex-reasoning-details__title-row{display:flex;align-items:center;gap:.5rem}.cortex-reasoning-details__title{font-weight:500;color:var(--cortex-color-text-strong);font-size:.875rem}.cortex-reasoning-details__badge{display:inline-flex;align-items:center;border-radius:calc(var(--cortex-radius) * .5);padding:.125rem .375rem;font-size:.6875rem;font-weight:500}.cortex-reasoning-details__badge--streaming{background:light-dark(#fef3c7,#78350f);color:light-dark(#b45309,#fcd34d)}.cortex-reasoning-details__badge--done{background:var(--cortex-color-success-border);color:var(--cortex-color-success)}.cortex-reasoning-details__chevron{margin-inline-start:auto;display:inline-flex;height:1.5rem;width:1.5rem;align-items:center;justify-content:center;border-radius:calc(var(--cortex-radius) * .5);color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary>.cortex-reasoning-details__chevron{transform:rotate(180deg)}.cortex-reasoning-details__body{padding:0 1rem 1rem}.cortex-reasoning-details__content{margin-top:.25rem;border-radius:calc(var(--cortex-radius) * .5);background:var(--cortex-color-surface);border:1px solid var(--cortex-color-border);padding:.75rem}.cortex-reasoning-details__pre{margin:0;white-space:pre-wrap;overflow-wrap:break-word;font-family:var(--cortex-font-mono);font-size:.75rem;line-height:1.625;color:var(--cortex-color-text-strong)}@keyframes cortex-aborted-fade-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}.cortex-aborted-flag{display:flex;align-items:center;gap:.625rem;padding:.25rem 0;animation:cortex-aborted-fade-in .3s ease-out both;-webkit-user-select:none;user-select:none}.cortex-aborted-flag__line{flex:1;height:1px;background:repeating-linear-gradient(90deg,#e2a36f 0px,#e2a36f 4px,transparent 4px,transparent 8px);opacity:.5}.cortex-aborted-flag__label{display:inline-flex;align-items:center;gap:.3125rem;font-family:var(--cortex-font-mono);font-size:.625rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:light-dark(#c2824a,#e2a36f)}.cortex-aborted-flag__icon{color:light-dark(#c2824a,#e2a36f);flex-shrink:0}.cortex-trigger-block{display:inline-flex;width:fit-content;padding:.375rem .75rem;border-radius:999px;background:var(--cortex-color-accent-surface);color:var(--cortex-color-text-strong);font-size:.75rem}.cortex-trigger-block__head{display:flex;align-items:center;gap:.5rem}.cortex-trigger-block__icon{flex-shrink:0;color:var(--cortex-color-accent)}.cortex-trigger-block__name{font-family:var(--cortex-font-mono);font-weight:600}.cortex-trigger-block__time{color:var(--cortex-color-text-secondary);font-size:.6875rem}.cortex-trigger-block--debug{display:flex;flex-direction:column;width:auto;gap:.375rem;padding:.5rem .75rem;border:1px dashed var(--cortex-color-border-strong);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.6875rem}.cortex-trigger-block--debug .cortex-trigger-block__head{font-family:var(--cortex-font-mono);letter-spacing:.04em;text-transform:uppercase;color:var(--cortex-color-text-secondary)}.cortex-trigger-block--debug .cortex-trigger-block__name{color:var(--cortex-color-text-strong)}.cortex-trigger-block--debug .cortex-trigger-block__time{margin-inline-start:auto;font-size:inherit;text-transform:none;letter-spacing:0}.cortex-trigger-block__payload{font-size:.75rem}.cortex-trigger-block__payload>summary{cursor:pointer;color:var(--cortex-color-text-secondary);-webkit-user-select:none;user-select:none}.cortex-trigger-block__payload[open]>summary{margin-bottom:.25rem}.cortex-widget__messages-disabled{padding:.75rem 1rem;text-align:center;font-size:.75rem;color:var(--cortex-color-text-muted)}.cortex-message-attachments{display:flex;flex-wrap:wrap;gap:.375rem}.cortex-message-attachments--user{justify-content:flex-end}.cortex-message-attachment{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding:.25rem .5rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong);cursor:pointer;transition:background .15s}.cortex-message-attachment:hover{background:var(--cortex-color-surface-muted)}.cortex-message-attachment__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-message-attachment__icon,.cortex-message-attachment__dl-icon{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-debug-tool{--_accent: var(--cortex-color-border-strong);position:relative;width:100%;border-radius:10px;background:var(--cortex-color-surface-subtle);overflow:hidden}.cortex-debug-tool:before{content:"";position:absolute;inset-block:0;inset-inline-start:0;width:3px;background:var(--_accent);z-index:1;transition:background .2s}.cortex-debug-tool[data-state=complete]{--_accent: var(--cortex-color-success)}.cortex-debug-tool[data-state=error]{--_accent: var(--cortex-color-danger)}.cortex-debug-tool[data-state=awaiting-input],.cortex-debug-tool[data-state=input-streaming],.cortex-debug-tool[data-state=input-complete]{--_accent: light-dark(#d97706, #fbbf24)}.cortex-debug-tool[data-state=approval-requested],.cortex-debug-tool[data-state=approval-responded]{--_accent: light-dark(#7c3aed, #a78bfa)}.cortex-debug-tool__summary{list-style:none;cursor:pointer;-webkit-user-select:none;user-select:none;padding:.625rem .875rem .625rem 1.125rem}.cortex-debug-tool__summary::-webkit-details-marker{display:none}.cortex-debug-tool__header{display:flex;align-items:flex-start;gap:.75rem}.cortex-debug-tool__meta{flex:1;min-width:0}.cortex-debug-tool__title-row{display:flex;align-items:center;gap:.5rem;min-width:0}.cortex-debug-tool__name{font-weight:600;font-size:.8125rem;color:var(--cortex-color-text-heading);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;letter-spacing:-.01em}.cortex-debug-tool__id-row{margin-top:2px;font-size:.625rem;color:var(--cortex-color-text-muted);font-family:ui-monospace,SF Mono,Cascadia Code,monospace;word-break:break-all}.cortex-debug-tool__actions{display:flex;align-items:center;gap:.375rem;flex-shrink:0}.cortex-debug-tool__state{display:inline-flex;align-items:center;gap:5px;font-size:.6875rem;font-weight:500;padding:2px 8px;border-radius:4px;white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__state--success{color:var(--cortex-color-success);background:var(--cortex-color-success-surface)}.cortex-debug-tool__state--error{color:var(--cortex-color-danger);background:light-dark(#fef2f2,#450a0a)}.cortex-debug-tool__state--approval{color:light-dark(#7c3aed,#a78bfa);background:light-dark(#f5f3ff,#2e1065)}.cortex-debug-tool__state--pending{color:light-dark(#b45309,#fcd34d);background:light-dark(#fffbeb,#451a03)}.cortex-debug-tool__pulse{width:6px;height:6px;border-radius:50%;background:light-dark(#d97706,#fbbf24);animation:dbg-pulse 2s ease-in-out infinite}.cortex-debug-tool__pulse--violet{background:#8b5cf6}@keyframes dbg-pulse{0%,to{opacity:1}50%{opacity:.3}}.cortex-debug-tool__chevron{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;color:var(--cortex-color-text-muted);transition:transform .2s}details[open]>summary .cortex-debug-tool__chevron{transform:rotate(180deg)}.cortex-debug-tool__body{padding:0 .875rem .75rem 1.125rem}.cortex-debug-tool__section:not(:first-child){border-top:1px solid var(--cortex-color-border);padding-top:.625rem;margin-top:.625rem}.cortex-debug-tool__section-bar{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-debug-tool__section-label{font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-muted);font-family:system-ui,-apple-system,sans-serif}.cortex-debug-tool__section-label--success{color:var(--cortex-color-success)}.cortex-debug-tool__section-label--error{color:var(--cortex-color-danger)}.cortex-debug-tool__section-label--approval{color:light-dark(#7c3aed,#a78bfa)}.cortex-debug-tool__section-lang{font-size:.5625rem;color:var(--cortex-color-border-strong);font-family:ui-monospace,SF Mono,monospace;text-transform:lowercase}.cortex-debug-tool__pre{margin:0;max-height:20rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre;overflow-wrap:break-word}.cortex-debug-tool__tree{max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__error-pre{margin:0;max-height:16rem;overflow:auto;padding:.625rem .75rem;border-radius:6px;background:light-dark(#fef2f2,#450a0a);color:light-dark(#991b1b,#fca5a5);font-size:.75rem;line-height:1.3rem;font-family:ui-monospace,SF Mono,Cascadia Code,monospace;white-space:pre-wrap;word-break:break-word}.cortex-debug-tool__message{padding:.5rem .75rem;font-size:.75rem;color:var(--cortex-color-text-secondary);border-radius:6px;background:var(--cortex-color-surface)}.cortex-debug-tool__message--approval{color:light-dark(#5b21b6,#c4b5fd);background:light-dark(#faf5ff,#3b0764)}.cortex-debug-tool__section--success .cortex-debug-tool__tree{background:light-dark(#f0fdf4,#052e16)}.cortex-debug-tool__section--error .cortex-debug-tool__tree{background:light-dark(#fef2f2,#450a0a)}.cortex-tool-call-animated{display:block}.cortex-tool-pill{display:inline-flex;align-items:center;gap:.375rem;padding:.25rem 0;max-width:100%}.cortex-tool-pill__icon{position:relative;width:.75rem;height:.75rem;display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--cortex-color-text-muted)}.cortex-tool-pill__spinner{position:absolute;width:.625rem;height:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;opacity:0;transition:opacity .2s}.cortex-tool-pill__spinner--visible{opacity:1;animation:cortex-tool-spin .8s linear infinite}@keyframes cortex-tool-spin{to{transform:rotate(360deg)}}.cortex-tool-pill__svg{position:absolute;width:.75rem;height:.75rem;opacity:0;transform:scale(.6);transition:opacity .2s,transform .2s}.cortex-tool-pill__svg--visible{opacity:1;transform:scale(1)}.cortex-tool-pill__svg--check{color:var(--cortex-color-success)}.cortex-tool-pill__svg--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title{font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:color .3s}.cortex-tool-pill__title--error{color:var(--cortex-color-danger)}.cortex-tool-pill__title--pending{color:var(--cortex-color-text-muted);opacity:.6}.cortex-tool-pill__meta{font-size:.6875rem;color:var(--cortex-color-text-muted);opacity:.8;white-space:nowrap;font-variant-numeric:tabular-nums}.cortex-approval-card{display:block;max-width:min(100%,28rem);margin:.25rem 0;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface);overflow:hidden}.cortex-approval-card--asking{border-color:color-mix(in oklab,var(--cortex-color-accent) 45%,var(--cortex-color-border));box-shadow:0 0 0 3px color-mix(in oklab,var(--cortex-color-accent) 10%,transparent)}.cortex-approval-card__head{display:flex;align-items:center;gap:.5rem;padding:.625rem .75rem 0;font-size:.75rem;font-weight:600;color:var(--cortex-color-accent)}.cortex-approval-card__sentence{margin:0;padding:.375rem .75rem .5rem;font-weight:600;color:var(--cortex-color-text-heading)}.cortex-approval-card__foot{display:flex;gap:.5rem;padding:.625rem .75rem;border-top:1px solid var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-approval-card__button{border:1px solid var(--cortex-color-border-strong);border-radius:calc(var(--cortex-radius) * .75);background:var(--cortex-color-surface);padding:.375rem .875rem;font:inherit;font-size:.8125rem;font-weight:500;color:var(--cortex-color-text-strong);cursor:pointer}.cortex-approval-card__button--approve{border-color:var(--cortex-color-accent);background:var(--cortex-color-accent);color:var(--cortex-color-primary-foreground)}.cortex-approval-card__line{display:flex;align-items:baseline;gap:.5rem;padding:.5rem .75rem;font-size:.8125rem;color:var(--cortex-color-text-secondary)}.cortex-approval-card__line .cortex-tool-pill__icon{flex-shrink:0}.cortex-approval-card__decision{font-weight:600;color:var(--cortex-color-text-strong)}.cortex-approval-card__summary{min-width:0;flex:1}.cortex-tool-fold{display:block;align-self:flex-start;text-align:start;border:0;background:none;padding:0 0 .25rem;margin-block-start:-.625rem;margin-inline-start:1.125rem;font:inherit;font-size:.75rem;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-tool-fold:hover,.cortex-tool-fold:focus-visible{color:var(--cortex-color-text-secondary)}.cortex-client-tool-embed{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-client-tool-embed__bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 12px;border-block-end:1px solid var(--cortex-color-border-strong);font-size:12px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__cancel{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-client-tool-embed__cancel:hover{color:var(--cortex-color-danger)}.cortex-client-tool-embed__frame{display:block;inline-size:100%;block-size:420px;border:0;background:var(--cortex-color-surface)}.cortex-client-tool-embed__status{display:flex;align-items:center;gap:8px;padding:20px 16px;font-size:13px;color:var(--cortex-color-text-muted)}.cortex-client-tool-embed__retry{border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:none;padding:4px 10px;font:inherit;font-size:12px;color:inherit;cursor:pointer}.cortex-client-tool-embed-dialog{border:0;padding:0;background:none;inline-size:min(560px,100vw - 48px);max-inline-size:none}.cortex-client-tool-embed-dialog::backdrop{background:#00000073}.cortex-client-tool-embed-dialog .cortex-client-tool-embed{inline-size:100%;max-inline-size:none;box-shadow:0 24px 64px #0000004d}.cortex-client-tool-embed-dialog .cortex-client-tool-embed__frame{block-size:min(70dvh,560px)}.cortex-location-input{border:1px solid var(--cortex-color-border-strong);border-radius:12px;background:var(--cortex-color-surface);overflow:hidden;max-inline-size:480px}.cortex-location-input--settled{display:flex;gap:10px;border-color:var(--cortex-color-border);background:var(--cortex-color-surface-subtle)}.cortex-location-input__map{position:relative;block-size:11rem;background:var(--cortex-color-surface-muted)}.cortex-location-input__map--still{flex:none;inline-size:120px;block-size:84px}.cortex-location-input__canvas{block-size:100%}.cortex-location-input__still-failed{display:flex;align-items:center;justify-content:center;block-size:100%;padding:0 8px;font-size:11px;text-align:center;color:var(--cortex-color-text-muted)}.cortex-location-input__locate{position:absolute;inset-inline-end:10px;inset-block-start:10px;z-index:1001;display:inline-flex;align-items:center;justify-content:center;inline-size:30px;block-size:30px;border:1px solid var(--cortex-color-border-strong);border-radius:8px;background:var(--cortex-color-surface);color:var(--cortex-color-text-strong);box-shadow:0 1px 3px #0003;cursor:pointer}.cortex-location-input__locate svg{inline-size:15px;block-size:15px}.cortex-location-input__locate:disabled{opacity:.45;cursor:default}.cortex-location-input__foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-block-start:1px solid var(--cortex-color-border-strong);font-size:12px}.cortex-location-input__hint{display:inline-flex;align-items:center;gap:6px;min-inline-size:0;color:var(--cortex-color-text-muted)}.cortex-location-input__hint--failed{color:var(--cortex-color-danger)}.cortex-location-input__spinner{inline-size:.625rem;block-size:.625rem;border:1.5px solid var(--cortex-color-border-strong);border-top-color:var(--cortex-color-text-muted);border-radius:9999px;animation:cortex-tool-spin .8s linear infinite}.cortex-location-input__coords{font-family:var(--cortex-font-mono);font-size:.75rem;color:var(--cortex-color-text-secondary);direction:ltr;unicode-bidi:isolate}.cortex-location-input__actions{display:flex;align-items:center;gap:8px}.cortex-location-input__skip{border:0;background:none;padding:2px 4px;font:inherit;color:var(--cortex-color-text-muted);cursor:pointer}.cortex-location-input__skip:hover{color:var(--cortex-color-danger)}.cortex-location-input__skip:disabled{opacity:.45;cursor:default}.cortex-location-input__send{border:1px solid var(--cortex-color-primary);border-radius:8px;background:var(--cortex-color-primary);padding:4px 10px;font:inherit;font-size:12px;color:var(--cortex-color-primary-foreground);cursor:pointer}.cortex-location-input__send:disabled{opacity:.45;cursor:default}.cortex-location-input__body{display:flex;flex-direction:column;justify-content:center;gap:2px;min-inline-size:0;padding-block:8px;padding-inline-end:12px}.cortex-location-input__title{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--cortex-color-text-strong)}.cortex-location-input__title svg{inline-size:13px;block-size:13px;color:var(--cortex-color-success)}.cortex-reasoning-animated{display:block}.cortex-subtle-activity{display:flex;align-items:center;gap:.375rem;padding:.25rem 0;width:fit-content}.cortex-subtle-activity__dots{display:flex;align-items:center;gap:3px}.cortex-subtle-activity__dot{width:3px;height:3px;border-radius:9999px;background:var(--cortex-color-accent);animation:cortex-subtle-dot-pulse 1.4s ease-in-out infinite}.cortex-subtle-activity__dot--d1{animation-delay:.2s}.cortex-subtle-activity__dot--d2{animation-delay:.4s}@keyframes cortex-subtle-dot-pulse{0%,to{opacity:.3;transform:scale(.8)}40%{opacity:1;transform:scale(1.3)}}.cortex-subtle-activity__label-mask{overflow:hidden;position:relative;height:1.1em}.cortex-subtle-activity__label{display:block;font-size:.75rem;color:var(--cortex-color-text-muted);white-space:nowrap;line-height:1.1em}.cortex-subtle-activity__label--idle,.cortex-subtle-activity__label--entering{opacity:1;transform:translateY(0);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--exiting{opacity:0;transform:translateY(-6px);transition:opacity .3s ease,transform .3s ease}.cortex-subtle-activity__label--enter-start{opacity:0;transform:translateY(6px);transition:none}.cortex-attachment-queue{display:flex;flex-wrap:wrap;gap:.375rem;margin-bottom:.5rem}.cortex-attachment-chip{display:inline-flex;align-items:center;gap:.375rem;max-width:14rem;padding-block:.25rem;padding-inline:.5rem .375rem;border:1px solid var(--cortex-color-border);border-radius:var(--cortex-radius);background:var(--cortex-color-surface-subtle);font-size:.75rem;color:var(--cortex-color-text-strong)}.cortex-attachment-chip--error{border-color:var(--cortex-color-danger-border);background:var(--cortex-color-danger-surface);color:var(--cortex-color-danger)}.cortex-attachment-chip__icon,.cortex-attachment-chip__spinner{flex-shrink:0;width:.875rem;height:.875rem;color:var(--cortex-color-text-muted)}.cortex-attachment-chip__spinner{animation:cortex-attachment-spin .8s linear infinite}.cortex-attachment-chip__spinner-track{opacity:.25}@keyframes cortex-attachment-spin{to{transform:rotate(360deg)}}.cortex-attachment-chip__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-attachment-chip__remove{flex-shrink:0;display:flex;align-items:center;justify-content:center;width:1rem;height:1rem;padding:0;border:0;border-radius:3px;background:transparent;color:currentColor;opacity:.6;cursor:pointer}.cortex-attachment-chip__remove:hover{opacity:1;background:var(--cortex-color-hover)}.cortex-attachment-chip__remove svg{width:.75rem;height:.75rem}.cortex-token-usage{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-token-usage__summary{align-self:end}html[dir=ltr] .cortex-token-usage__summary{align-self:start}.cortex-token-usage__summary{display:inline-flex;align-items:center;gap:.625rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-token-usage__summary:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-token-usage__summary{flex-wrap:wrap;max-width:100%;text-align:start}.cortex-token-usage__total-number{font-weight:600;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__total-label{margin-inline-start:3px;color:var(--cortex-color-text-muted);font-weight:400;letter-spacing:.03em}.cortex-token-usage__model{color:var(--cortex-color-border-strong);font-weight:400;font-size:.5625rem;letter-spacing:.02em;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cortex-token-usage__pills{display:inline-flex;align-items:center;gap:.5rem}.cortex-token-usage__pill{display:inline-flex;align-items:center;gap:4px;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-muted)}.cortex-token-usage__dot{width:6px;height:6px;border-radius:50%;flex-shrink:0}.cortex-token-usage__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 2px #ea580c1a}.cortex-token-usage__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 2px #4f46e51a}.cortex-token-usage__cache-badge{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 6px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-token-usage--expanded .cortex-token-usage__chevron{transform:rotate(180deg)}.cortex-token-usage__details{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-token-usage__details-inner{overflow:hidden}.cortex-token-usage--expanded .cortex-token-usage__details{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-token-usage__columns{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:var(--cortex-color-border);border-radius:8px;overflow:hidden}.cortex-token-usage__col{background:var(--cortex-color-surface-subtle);padding:.5rem .625rem}.cortex-token-usage__col-header{display:flex;align-items:center;gap:.375rem;margin-bottom:.375rem}.cortex-token-usage__col-label{font-weight:600;font-size:.5625rem;text-transform:uppercase;letter-spacing:.06em;color:var(--cortex-color-text-secondary);font-family:system-ui,-apple-system,sans-serif}.cortex-token-usage__col-total{margin-inline-start:auto;font-weight:700;font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary)}.cortex-token-usage__rows{display:flex;flex-direction:column;gap:1px}.cortex-token-usage__row{display:flex;align-items:baseline;justify-content:space-between;padding:2px 0;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__row-label{color:var(--cortex-color-text-muted);font-size:.625rem}.cortex-token-usage__row-value{font-variant-numeric:tabular-nums;color:var(--cortex-color-text-secondary);font-weight:500}.cortex-token-usage__cache-bar-row{display:flex;align-items:center;gap:.5rem;margin-top:.5rem;padding-inline-start:calc(6px + .375rem)}.cortex-token-usage__cache-bar{flex:1;height:3px;border-radius:2px;background:var(--cortex-color-border);overflow:hidden}.cortex-token-usage__cache-fill{height:100%;border-radius:2px;background:linear-gradient(90deg,#10b981,var(--cortex-color-success));transition:width .4s cubic-bezier(.4,0,.2,1)}.cortex-token-usage__cache-label{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector{direction:ltr;display:flex;flex-direction:column;margin-top:.375rem;font-family:var(--cortex-font-mono);font-size:.6875rem;line-height:1.4;color:var(--cortex-color-text-muted);-webkit-user-select:none;user-select:none}html[dir=rtl] .cortex-llm-inspector__trigger{align-self:end}html[dir=ltr] .cortex-llm-inspector__trigger{align-self:start}.cortex-llm-inspector__trigger{display:inline-flex;align-items:center;gap:.5rem;padding:.3125rem .625rem;border:1px solid transparent;border-radius:6px;background:transparent;cursor:pointer;transition:background .15s ease,border-color .15s ease;font:inherit;color:inherit;letter-spacing:.01em}.cortex-llm-inspector__trigger:hover{background:var(--cortex-color-surface-subtle);border-color:var(--cortex-color-border)}.cortex-llm-inspector__icon{color:var(--cortex-color-text-muted);flex-shrink:0}.cortex-llm-inspector__loading{color:var(--cortex-color-border-strong);font-style:italic}.cortex-llm-inspector__badge{display:inline-flex;align-items:center;justify-content:center;min-width:1.25rem;height:1.25rem;padding:0 .35rem;border-radius:9999px;background:var(--cortex-color-border);color:var(--cortex-color-text-secondary);font-size:.5625rem;font-weight:700}.cortex-llm-inspector__chevron{color:var(--cortex-color-border-strong);transition:transform .25s cubic-bezier(.4,0,.2,1);flex-shrink:0}.cortex-llm-inspector--open .cortex-llm-inspector__chevron{transform:rotate(180deg)}.cortex-llm-inspector__panel-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease,margin .2s ease;opacity:0;margin-top:0}.cortex-llm-inspector__panel-inner{overflow:hidden}.cortex-llm-inspector--open .cortex-llm-inspector__panel-wrapper{grid-template-rows:1fr;opacity:1;margin-top:.375rem}.cortex-llm-inspector__panel{display:flex;flex-direction:column;gap:.375rem}.cortex-llm-inspector__empty{padding:.625rem;color:var(--cortex-color-text-muted);font-style:italic}.cortex-llm-inspector__step{border-radius:8px;background:var(--cortex-color-surface-subtle);overflow:hidden;transition:box-shadow .2s ease}.cortex-llm-inspector__step--expanded{box-shadow:0 0 0 1px var(--cortex-color-border)}.cortex-llm-inspector__step-header{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .625rem;border:none;background:transparent;cursor:pointer;font:inherit;color:inherit;text-align:start;transition:background .15s ease}.cortex-llm-inspector__step-header:hover{background:#00000005}.cortex-llm-inspector__step-label{font-weight:600;color:var(--cortex-color-text-secondary);white-space:nowrap;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-metrics{display:inline-flex;align-items:center;gap:.625rem;margin-inline-start:auto;font-variant-numeric:tabular-nums}.cortex-llm-inspector__metric{display:inline-flex;align-items:center;gap:3px}.cortex-llm-inspector__dot{width:5px;height:5px;border-radius:50%;flex-shrink:0}.cortex-llm-inspector__dot--input{background:light-dark(#ea580c,#fb923c);box-shadow:0 0 0 1.5px #ea580c1f}.cortex-llm-inspector__dot--output{background:light-dark(#4f46e5,#818cf8);box-shadow:0 0 0 1.5px #4f46e51f}.cortex-llm-inspector__cache-pct{font-size:.5625rem;font-weight:600;color:var(--cortex-color-success);background:var(--cortex-color-success-surface);padding:1px 5px;border-radius:3px;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__step-chevron{color:var(--cortex-color-border-strong);transition:transform .2s ease;flex-shrink:0}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-chevron{transform:rotate(180deg)}.cortex-llm-inspector__step-body-wrapper{display:grid;grid-template-rows:0fr;transition:grid-template-rows .25s cubic-bezier(.4,0,.2,1),opacity .2s ease;opacity:0}.cortex-llm-inspector__step-body-inner{overflow:hidden}.cortex-llm-inspector__step--expanded .cortex-llm-inspector__step-body-wrapper{grid-template-rows:1fr;opacity:1}.cortex-llm-inspector__step-body{padding:0 .625rem .625rem;display:flex;flex-direction:column;gap:.5rem}.cortex-llm-inspector__usage-rows{display:flex;flex-direction:column;border-radius:6px;overflow:hidden;background:var(--cortex-color-border);gap:1px}.cortex-llm-inspector__usage-row{display:flex;align-items:baseline;gap:.5rem;padding:.375rem .625rem;background:var(--cortex-color-surface);flex-wrap:wrap}.cortex-llm-inspector__usage-row--total{background:light-dark(#fafbfc,#141414)}.cortex-llm-inspector__usage-lbl{font-size:.5625rem;text-transform:uppercase;letter-spacing:.05em;color:var(--cortex-color-text-muted);font-weight:600;width:3.25rem;flex-shrink:0;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__usage-val{font-variant-numeric:tabular-nums;font-weight:600;color:var(--cortex-color-text-secondary);min-width:3rem}.cortex-llm-inspector__usage-row--total .cortex-llm-inspector__usage-val{font-weight:700;color:var(--cortex-color-text-heading)}.cortex-llm-inspector__usage-detail{color:var(--cortex-color-border-strong);font-size:.5625rem;margin-inline-start:auto}.cortex-llm-inspector__tabs{display:flex;gap:0;border-bottom:1px solid var(--cortex-color-border)}.cortex-llm-inspector__tab{padding:.375rem .75rem;border:none;background:transparent;cursor:pointer;font:inherit;color:var(--cortex-color-text-muted);font-weight:500;position:relative;transition:color .15s ease;font-family:system-ui,-apple-system,sans-serif}.cortex-llm-inspector__tab:hover{color:var(--cortex-color-text-secondary)}.cortex-llm-inspector__tab--active{color:var(--cortex-color-text-heading);font-weight:600}.cortex-llm-inspector__tab--active:after{content:"";position:absolute;inset-inline:0;bottom:-1px;height:2px;background:var(--cortex-color-text-heading);border-radius:1px 1px 0 0}.cortex-llm-inspector__json-pane{position:relative;max-height:24rem;overflow:auto;padding:.625rem;background:var(--cortex-color-surface);border-radius:6px}.cortex-llm-inspector__json-copy{position:sticky;top:0;float:inline-end;z-index:1}.cortex-json-tree{display:block;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:.75rem;line-height:1.25rem;-webkit-user-select:text;user-select:text;white-space:pre-wrap;word-break:break-word}.cortex-json-tree__indent{padding-inline-start:1.25em;border-inline-start:1px solid var(--cortex-color-border);margin-inline-start:.3em}.cortex-json-tree__line{position:relative}.cortex-json-tree__toggle{cursor:pointer;-webkit-user-select:none;user-select:none}.cortex-json-tree__toggle:hover .cortex-json-tree__arrow{color:var(--cortex-color-text)}.cortex-json-tree__arrow{display:inline-block;width:1em;text-align:center;color:var(--cortex-color-text-muted);font-size:.525rem;transition:transform .15s ease;vertical-align:middle}.cortex-json-tree__arrow--collapsed{transform:rotate(-90deg)}.cortex-json-tree__bracket{color:var(--cortex-color-text-secondary)}.cortex-json-tree__key{color:light-dark(#6366f1,#818cf8)}.cortex-json-tree__colon{color:var(--cortex-color-text-secondary)}.cortex-json-tree__comma{color:var(--cortex-color-text-muted)}.cortex-json-tree__string{color:var(--cortex-color-success)}.cortex-json-tree__number{color:light-dark(#2563eb,#60a5fa)}.cortex-json-tree__boolean{color:light-dark(#d97706,#fbbf24)}.cortex-json-tree__null{color:var(--cortex-color-text-muted);font-style:italic}.cortex-json-tree__collapsed-hint{display:inline-block;padding:0 .4em;margin:0 .15em;font-size:.625rem;line-height:1.5;color:var(--cortex-color-text-muted);background:var(--cortex-color-surface-subtle);border:1px solid var(--cortex-color-border);border-radius:3px;font-style:italic;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle}.cortex-json-tree__collapsed-hint:hover{color:var(--cortex-color-text-secondary);border-color:var(--cortex-color-border-strong);background:var(--cortex-color-surface-muted)}.cortex-copy-btn{display:inline-flex;align-items:center}.cortex-copy-btn__button{display:inline-flex;align-items:center;justify-content:center;width:1.375rem;height:1.375rem;padding:0;border:none;border-radius:3px;background:transparent;color:var(--cortex-color-text-muted);cursor:pointer;opacity:0;transition:opacity .15s ease,color .15s ease,background .15s ease}:hover>cortex-copy-button .cortex-copy-btn__button,:hover>.cortex-copy-btn .cortex-copy-btn__button,.cortex-copy-btn__button:hover,.cortex-copy-btn__button:focus-visible{opacity:1}.cortex-copy-btn__button:hover{background:var(--cortex-color-hover);color:var(--cortex-color-text)}.cortex-copy-btn__button--copied{opacity:1;color:var(--cortex-color-success);pointer-events:none}.cortex-copy-btn__button--copied:hover{color:var(--cortex-color-success);background:transparent}.cortex-copy-btn__icon{flex-shrink:0}.cortex-copy-btn__icon--check{animation:cortex-copy-pop .25s cubic-bezier(.34,1.56,.64,1) forwards}@keyframes cortex-copy-pop{0%{transform:scale(.6);opacity:0}to{transform:scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cortex-widget *,.cortex-widget *:before,.cortex-widget *:after,.cortex-widget *::backdrop{animation-duration:.01ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.01ms!important;transition-delay:0s!important}}\n']
|
|
11460
11891
|
}]
|
|
11461
11892
|
}],
|
|
11462
11893
|
propDecorators: {
|
|
@@ -11472,13 +11903,20 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
11472
11903
|
type: i0.ViewChild,
|
|
11473
11904
|
args: [i0.forwardRef(() => ChatComposerComponent), { isSignal: true }]
|
|
11474
11905
|
}],
|
|
11475
|
-
|
|
11476
|
-
type: i0.
|
|
11477
|
-
args: [
|
|
11906
|
+
landingComposer: [{
|
|
11907
|
+
type: i0.ViewChild,
|
|
11908
|
+
args: ["landingComposer", { isSignal: true }]
|
|
11909
|
+
}],
|
|
11910
|
+
slotDirectives: [{
|
|
11911
|
+
type: i0.ContentChildren,
|
|
11912
|
+
args: [i0.forwardRef(() => CortexSlotDirective), {
|
|
11913
|
+
descendants: true,
|
|
11914
|
+
isSignal: true
|
|
11915
|
+
}]
|
|
11478
11916
|
}]
|
|
11479
11917
|
}
|
|
11480
11918
|
});
|
|
11481
11919
|
export {
|
|
11482
|
-
|
|
11920
|
+
CortexSlotDirective,
|
|
11483
11921
|
CortexChatWidgetComponent
|
|
11484
11922
|
};
|