@@ -8154,11 +8171,11 @@ let Tabs = (() => {
titleString = title$1.literal;
} else if (title$1 && "path" in title$1 && title$1.path) {
if (!this.processor || !this.component) {
- return x`(no model)`;
+ return b`(no model)`;
}
const textValue = this.processor.getData(this.component, title$1.path, this.surfaceId ?? A2uiMessageProcessor.DEFAULT_SURFACE_ID);
if (typeof textValue !== "string") {
- return x`(invalid)`;
+ return b`(invalid)`;
}
titleString = textValue;
}
@@ -8168,7 +8185,7 @@ let Tabs = (() => {
} else {
classes = { ...this.theme.components.Tabs.controls.all };
}
- return x`
`;
}
#renderSlot() {
- return x`
- ${label && label !== "" ? x`` : E}
+ >` : A}
{
if (!(evt.target instanceof HTMLInputElement)) {
return;
@@ -8427,15 +8444,15 @@ let TextField = (() => {
* SPDX-License-Identifier: BSD-3-Clause
*/ var e = class extends i$5 {
constructor(i$10) {
- if (super(i$10), this.it = E, i$10.type !== t$4.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
+ if (super(i$10), this.it = A, i$10.type !== t$4.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
}
- render(r$11) {
- if (r$11 === E || null == r$11) return this._t = void 0, this.it = r$11;
- if (r$11 === T) return r$11;
- if ("string" != typeof r$11) throw Error(this.constructor.directiveName + "() called with a non-string value");
- if (r$11 === this.it) return this._t;
- this.it = r$11;
- const s$9 = [r$11];
+ render(r$12) {
+ if (r$12 === A || null == r$12) return this._t = void 0, this.it = r$12;
+ if (r$12 === E) return r$12;
+ if ("string" != typeof r$12) throw Error(this.constructor.directiveName + "() called with a non-string value");
+ if (r$12 === this.it) return this._t;
+ this.it = r$12;
+ const s$9 = [r$12];
return s$9.raw = s$9, this._t = {
_$litType$: this.constructor.resultType,
strings: s$9,
@@ -8752,11 +8769,11 @@ Url.prototype.parse = function(url, slashesDenoteHost) {
}
if (!part.match(hostnamePartPattern)) {
let newpart = "";
- for (let j$1 = 0, k$1 = part.length; j$1 < k$1; j$1++) {
- if (part.charCodeAt(j$1) > 127) {
+ for (let j$2 = 0, k$1 = part.length; j$2 < k$1; j$2++) {
+ if (part.charCodeAt(j$2) > 127) {
newpart += "x";
} else {
- newpart += part[j$1];
+ newpart += part[j$2];
}
}
if (!newpart.match(hostnamePartPattern)) {
@@ -8816,7 +8833,7 @@ Url.prototype.parseHost = function(host) {
};
var parse_default = urlParse;
-var mdurl_exports = /* @__PURE__ */ __export({
+var mdurl_exports = /* @__PURE__ */ __exportAll({
decode: () => decode_default,
encode: () => encode_default,
format: () => format,
@@ -8835,7 +8852,7 @@ var regex_default$1 = /[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\
var regex_default = /[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
-var uc_exports = /* @__PURE__ */ __export({
+var uc_exports = /* @__PURE__ */ __exportAll({
Any: () => regex_default$5,
Cc: () => regex_default$4,
Cf: () => regex_default$3,
@@ -11298,7 +11315,7 @@ function encode$1(data, options = EntityLevel.XML) {
return encodeXML(data);
}
-var utils_exports = /* @__PURE__ */ __export({
+var utils_exports = /* @__PURE__ */ __exportAll({
arrayReplaceAt: () => arrayReplaceAt,
assign: () => assign$1,
escapeHtml: () => escapeHtml,
@@ -11669,7 +11686,7 @@ function parseLinkTitle(str, start, max, prev_state) {
return state;
}
-var helpers_exports = /* @__PURE__ */ __export({
+var helpers_exports = /* @__PURE__ */ __exportAll({
parseLinkDestination: () => parseLinkDestination,
parseLinkLabel: () => parseLinkLabel,
parseLinkTitle: () => parseLinkTitle
@@ -12441,11 +12458,11 @@ function linkify$1(state) {
if (!state.md.options.linkify) {
return;
}
- for (let j$1 = 0, l$5 = blockTokens.length; j$1 < l$5; j$1++) {
- if (blockTokens[j$1].type !== "inline" || !state.md.linkify.pretest(blockTokens[j$1].content)) {
+ for (let j$2 = 0, l$5 = blockTokens.length; j$2 < l$5; j$2++) {
+ if (blockTokens[j$2].type !== "inline" || !state.md.linkify.pretest(blockTokens[j$2].content)) {
continue;
}
- let tokens = blockTokens[j$1].children;
+ let tokens = blockTokens[j$2].children;
let htmlLinkLevel = 0;
for (let i$10 = tokens.length - 1; i$10 >= 0; i$10--) {
const currentToken = tokens[i$10];
@@ -12520,7 +12537,7 @@ function linkify$1(state) {
token.level = level;
nodes.push(token);
}
- blockTokens[j$1].children = tokens = arrayReplaceAt(tokens, i$10, nodes);
+ blockTokens[j$2].children = tokens = arrayReplaceAt(tokens, i$10, nodes);
}
}
}
@@ -12594,17 +12611,17 @@ function replaceAt(str, index, ch) {
return str.slice(0, index) + ch + str.slice(index + 1);
}
function process_inlines(tokens, state) {
- let j$1;
+ let j$2;
const stack = [];
for (let i$10 = 0; i$10 < tokens.length; i$10++) {
const token = tokens[i$10];
const thisLevel = tokens[i$10].level;
- for (j$1 = stack.length - 1; j$1 >= 0; j$1--) {
- if (stack[j$1].level <= thisLevel) {
+ for (j$2 = stack.length - 1; j$2 >= 0; j$2--) {
+ if (stack[j$2].level <= thisLevel) {
break;
}
}
- stack.length = j$1 + 1;
+ stack.length = j$2 + 1;
if (token.type !== "text") {
continue;
}
@@ -12625,10 +12642,10 @@ function process_inlines(tokens, state) {
if (t$7.index - 1 >= 0) {
lastChar = text$1.charCodeAt(t$7.index - 1);
} else {
- for (j$1 = i$10 - 1; j$1 >= 0; j$1--) {
- if (tokens[j$1].type === "softbreak" || tokens[j$1].type === "hardbreak") break;
- if (!tokens[j$1].content) continue;
- lastChar = tokens[j$1].content.charCodeAt(tokens[j$1].content.length - 1);
+ for (j$2 = i$10 - 1; j$2 >= 0; j$2--) {
+ if (tokens[j$2].type === "softbreak" || tokens[j$2].type === "hardbreak") break;
+ if (!tokens[j$2].content) continue;
+ lastChar = tokens[j$2].content.charCodeAt(tokens[j$2].content.length - 1);
break;
}
}
@@ -12636,10 +12653,10 @@ function process_inlines(tokens, state) {
if (pos < max) {
nextChar = text$1.charCodeAt(pos);
} else {
- for (j$1 = i$10 + 1; j$1 < tokens.length; j$1++) {
- if (tokens[j$1].type === "softbreak" || tokens[j$1].type === "hardbreak") break;
- if (!tokens[j$1].content) continue;
- nextChar = tokens[j$1].content.charCodeAt(0);
+ for (j$2 = i$10 + 1; j$2 < tokens.length; j$2++) {
+ if (tokens[j$2].type === "softbreak" || tokens[j$2].type === "hardbreak") break;
+ if (!tokens[j$2].content) continue;
+ nextChar = tokens[j$2].content.charCodeAt(0);
break;
}
}
@@ -12677,13 +12694,13 @@ function process_inlines(tokens, state) {
continue;
}
if (canClose) {
- for (j$1 = stack.length - 1; j$1 >= 0; j$1--) {
- let item = stack[j$1];
- if (stack[j$1].level < thisLevel) {
+ for (j$2 = stack.length - 1; j$2 >= 0; j$2--) {
+ let item = stack[j$2];
+ if (stack[j$2].level < thisLevel) {
break;
}
- if (item.single === isSingle && stack[j$1].level === thisLevel) {
- item = stack[j$1];
+ if (item.single === isSingle && stack[j$2].level === thisLevel) {
+ item = stack[j$2];
let openQuote;
let closeQuote;
if (isSingle) {
@@ -12701,7 +12718,7 @@ function process_inlines(tokens, state) {
}
text$1 = token.content;
max = text$1.length;
- stack.length = j$1;
+ stack.length = j$2;
continue OUTER;
}
}
@@ -12735,9 +12752,9 @@ function text_join(state) {
let curr, last;
const blockTokens = state.tokens;
const l$5 = blockTokens.length;
- for (let j$1 = 0; j$1 < l$5; j$1++) {
- if (blockTokens[j$1].type !== "inline") continue;
- const tokens = blockTokens[j$1].children;
+ for (let j$2 = 0; j$2 < l$5; j$2++) {
+ if (blockTokens[j$2].type !== "inline") continue;
+ const tokens = blockTokens[j$2].children;
const max = tokens.length;
for (curr = 0; curr < max; curr++) {
if (tokens[curr].type === "text_special") {
@@ -14589,14 +14606,14 @@ function postProcess$1(state, delimiters) {
}
while (loneMarkers.length) {
const i$10 = loneMarkers.pop();
- let j$1 = i$10 + 1;
- while (j$1 < state.tokens.length && state.tokens[j$1].type === "s_close") {
- j$1++;
+ let j$2 = i$10 + 1;
+ while (j$2 < state.tokens.length && state.tokens[j$2].type === "s_close") {
+ j$2++;
}
- j$1--;
- if (i$10 !== j$1) {
- token = state.tokens[j$1];
- state.tokens[j$1] = state.tokens[i$10];
+ j$2--;
+ if (i$10 !== j$2) {
+ token = state.tokens[j$2];
+ state.tokens[j$2] = state.tokens[i$10];
state.tokens[i$10] = token;
}
}
@@ -15960,17 +15977,17 @@ const decode = function(input) {
const output = [];
const inputLength = input.length;
let i$10 = 0;
- let n$11 = initialN;
+ let n$13 = initialN;
let bias = initialBias;
let basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
- for (let j$1 = 0; j$1 < basic; ++j$1) {
- if (input.charCodeAt(j$1) >= 128) {
+ for (let j$2 = 0; j$2 < basic; ++j$2) {
+ if (input.charCodeAt(j$2) >= 128) {
error("not-basic");
}
- output.push(input.charCodeAt(j$1));
+ output.push(input.charCodeAt(j$2));
}
for (let index = basic > 0 ? basic + 1 : 0; index < inputLength;) {
const oldi = i$10;
@@ -15998,12 +16015,12 @@ const decode = function(input) {
}
const out = output.length + 1;
bias = adapt(i$10 - oldi, out, oldi == 0);
- if (floor(i$10 / out) > maxInt - n$11) {
+ if (floor(i$10 / out) > maxInt - n$13) {
error("overflow");
}
- n$11 += floor(i$10 / out);
+ n$13 += floor(i$10 / out);
i$10 %= out;
- output.splice(i$10++, 0, n$11);
+ output.splice(i$10++, 0, n$13);
}
return String.fromCodePoint(...output);
};
@@ -16018,7 +16035,7 @@ const encode = function(input) {
const output = [];
input = ucs2decode(input);
const inputLength = input.length;
- let n$11 = initialN;
+ let n$13 = initialN;
let delta = 0;
let bias = initialBias;
for (const currentValue of input) {
@@ -16034,21 +16051,21 @@ const encode = function(input) {
while (handledCPCount < inputLength) {
let m$3 = maxInt;
for (const currentValue of input) {
- if (currentValue >= n$11 && currentValue < m$3) {
+ if (currentValue >= n$13 && currentValue < m$3) {
m$3 = currentValue;
}
}
const handledCPCountPlusOne = handledCPCount + 1;
- if (m$3 - n$11 > floor((maxInt - delta) / handledCPCountPlusOne)) {
+ if (m$3 - n$13 > floor((maxInt - delta) / handledCPCountPlusOne)) {
error("overflow");
}
- delta += (m$3 - n$11) * handledCPCountPlusOne;
- n$11 = m$3;
+ delta += (m$3 - n$13) * handledCPCountPlusOne;
+ n$13 = m$3;
for (const currentValue of input) {
- if (currentValue < n$11 && ++delta > maxInt) {
+ if (currentValue < n$13 && ++delta > maxInt) {
error("overflow");
}
- if (currentValue === n$11) {
+ if (currentValue === n$13) {
let q = delta;
for (let k$1 = base;; k$1 += base) {
const t$7 = k$1 <= bias ? tMin : k$1 >= bias + tMax ? tMax : k$1 - bias;
@@ -16067,7 +16084,7 @@ const encode = function(input) {
}
}
++delta;
- ++n$11;
+ ++n$13;
}
return output.join("");
};
@@ -16721,7 +16738,7 @@ var lib_default = MarkdownIt;
*/
function escapeNodeText(str) {
const frag = document.createElement("div");
- B(x`${str}`, frag);
+ D(b`${str}`, frag);
return frag.innerHTML.replaceAll(//gim, "");
}
function unescapeNodeText(str) {
@@ -16750,7 +16767,7 @@ var MarkdownDirective = class extends i$5 {
#lastTagClassMap = null;
update(_part, [value, tagClassMap]) {
if (this.#lastValue === value && JSON.stringify(tagClassMap) === this.#lastTagClassMap) {
- return T;
+ return E;
}
this.#lastValue = value;
this.#lastTagClassMap = JSON.stringify(tagClassMap);
@@ -16893,8 +16910,8 @@ let Text = (() => {
}
static {
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
- _text_decorators = [n$4()];
- _usageHint_decorators = [n$4({
+ _text_decorators = [n$6()];
+ _usageHint_decorators = [n$6({
reflect: true,
attribute: "usage-hint"
})];
@@ -16979,7 +16996,7 @@ let Text = (() => {
textValue = this.text.literal;
} else if (this.text && "path" in this.text && this.text.path) {
if (!this.processor || !this.component) {
- return x`(no model)`;
+ return b`(no model)`;
}
const value = this.processor.getData(this.component, this.text.path, this.surfaceId ?? A2uiMessageProcessor.DEFAULT_SURFACE_ID);
if (value !== null && value !== undefined) {
@@ -16988,7 +17005,7 @@ let Text = (() => {
}
}
if (textValue === null || textValue === undefined) {
- return x`(empty)`;
+ return b`(empty)`;
}
let markdownText = textValue;
switch (this.usageHint) {
@@ -17012,7 +17029,7 @@ let Text = (() => {
break;
default: break;
}
- return x`${markdown(markdownText, appendToAll(this.theme.markdown, [
+ return b`${markdown(markdownText, appendToAll(this.theme.markdown, [
"ol",
"ul",
"li"
@@ -17048,9 +17065,9 @@ let Text = (() => {
}
render() {
const classes = merge(this.theme.components.Text.all, this.usageHint ? this.theme.components.Text[this.usageHint] : {});
- return x``;
@@ -17123,7 +17140,7 @@ let Video = (() => {
}
static {
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
- _url_decorators = [n$4()];
+ _url_decorators = [n$6()];
__esDecorate(this, null, _url_decorators, {
kind: "accessor",
name: "url",
@@ -17179,33 +17196,33 @@ let Video = (() => {
}
#renderVideo() {
if (!this.url) {
- return E;
+ return A;
}
if (this.url && typeof this.url === "object") {
if ("literalString" in this.url) {
- return x``;
+ return b``;
} else if ("literal" in this.url) {
- return x``;
+ return b``;
} else if (this.url && "path" in this.url && this.url.path) {
if (!this.processor || !this.component) {
- return x`(no processor)`;
+ return b`(no processor)`;
}
const videoUrl = this.processor.getData(this.component, this.url.path, this.surfaceId ?? A2uiMessageProcessor.DEFAULT_SURFACE_ID);
if (!videoUrl) {
- return x`Invalid video URL`;
+ return b`Invalid video URL`;
}
if (typeof videoUrl !== "string") {
- return x`Invalid video URL`;
+ return b`Invalid video URL`;
}
- return x``;
+ return b``;
}
}
- return x`(empty)`;
+ return b`(empty)`;
}
render() {
- return x``;
@@ -17485,9 +17502,9 @@ var ClawdisA2UIHost = class extends i$6 {
color: rgba(255, 255, 255, 0.92);
font: 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
pointer-events: none;
- backdrop-filter: blur(${r$10(statusBlur)});
- -webkit-backdrop-filter: blur(${r$10(statusBlur)});
- box-shadow: ${r$10(statusShadow)};
+ backdrop-filter: blur(${r$11(statusBlur)});
+ -webkit-backdrop-filter: blur(${r$11(statusBlur)});
+ box-shadow: ${r$11(statusShadow)};
z-index: 5;
}
@@ -17506,9 +17523,9 @@ var ClawdisA2UIHost = class extends i$6 {
color: rgba(255, 255, 255, 0.92);
font: 13px/1.2 system-ui, -apple-system, BlinkMacSystemFont, "Roboto", sans-serif;
pointer-events: none;
- backdrop-filter: blur(${r$10(statusBlur)});
- -webkit-backdrop-filter: blur(${r$10(statusBlur)});
- box-shadow: ${r$10(statusShadow)};
+ backdrop-filter: blur(${r$11(statusBlur)});
+ -webkit-backdrop-filter: blur(${r$11(statusBlur)});
+ box-shadow: ${r$11(statusShadow)};
z-index: 5;
}
@@ -17730,17 +17747,17 @@ var ClawdisA2UIHost = class extends i$6 {
}
render() {
if (this.surfaces.length === 0) {
- return x`
+ return b`
Canvas (A2UI)
Waiting for A2UI messages…
`;
}
const statusText = this.pendingAction?.phase === "sent" ? `Working: ${this.pendingAction.name}` : this.pendingAction?.phase === "sending" ? `Sending: ${this.pendingAction.name}` : this.pendingAction?.phase === "error" ? `Failed: ${this.pendingAction.name}` : "";
- return x`
- ${this.pendingAction && this.pendingAction.phase !== "error" ? x`
` : ""}
- ${this.toast ? x`
${this.toast.text}
` : ""}
+ return b`
+ ${this.pendingAction && this.pendingAction.phase !== "error" ? b`
` : ""}
+ ${this.toast ? b`
${this.toast.text}
` : ""}
- ${c$2(this.surfaces, ([surfaceId]) => surfaceId, ([surfaceId, surface]) => x` surfaceId, ([surfaceId, surface]) => b`