@seed-ship/mcp-ui-solid 2.13.0 → 2.15.0

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.
@@ -3,9 +3,9 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const web = require("solid-js/web");
4
4
  const solidJs = require("solid-js");
5
5
  const FormFieldRenderer = require("./FormFieldRenderer.cjs");
6
- var _tmpl$ = /* @__PURE__ */ web.template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M19 9l-7 7-7-7">`), _tmpl$2 = /* @__PURE__ */ web.template(`<button class="p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"aria-label=Close><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12">`), _tmpl$3 = /* @__PURE__ */ web.template(`<div class="px-4 py-2 border-b border-gray-100 dark:border-gray-700 flex flex-wrap items-center gap-1.5">`), _tmpl$4 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700 space-y-2">`), _tmpl$5 = /* @__PURE__ */ web.template(`<div class="flex flex-col items-center gap-2 py-4 text-center"><span class=text-2xl>&#128269;</span><p class="text-sm text-gray-500 dark:text-gray-400">No results for these filters</p><button type=button class="px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors">Modify filters`), _tmpl$6 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700">`), _tmpl$7 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-0.5">Code: <!$><!/>`), _tmpl$8 = /* @__PURE__ */ web.template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 transition-colors flex items-center gap-1">&#128260; Retry`), _tmpl$9 = /* @__PURE__ */ web.template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">Close`), _tmpl$0 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-red-100 dark:border-red-900/30 bg-red-50 dark:bg-red-900/10"><div class="flex items-start gap-2 text-sm text-red-700 dark:text-red-400"><span class="flex-shrink-0 mt-0.5">⚠️</span><div class=flex-1><p class=font-medium></p><!$><!/></div></div><div class="flex gap-2 mt-2"><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700"><button type=button class="w-full px-4 py-2.5 text-sm font-semibold rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors flex items-center justify-center gap-2"><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>Search`), _tmpl$10 = /* @__PURE__ */ web.template(`<div style=overflow-y:auto><!$><!/><div class="divide-y divide-gray-100 dark:divide-gray-700"></div><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$11 = /* @__PURE__ */ web.template(`<div style="animation:scratchpad-slide-down 0.2s ease-out"><div><div class="flex items-center gap-2"><span class=text-base>&#128221;</span><h3 class="text-sm font-semibold text-gray-900 dark:text-white"></h3><!$><!/></div><div class="flex items-center gap-2"><span></span><!$><!/></div></div><!$><!/><style>
6
+ var _tmpl$ = /* @__PURE__ */ web.template(`<svg fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M19 9l-7 7-7-7">`), _tmpl$2 = /* @__PURE__ */ web.template(`<button class="p-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors"aria-label=Close><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M6 18L18 6M6 6l12 12">`), _tmpl$3 = /* @__PURE__ */ web.template(`<div class="px-4 py-2 border-b border-gray-100 dark:border-gray-700 flex flex-wrap items-center gap-1.5">`), _tmpl$4 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700 space-y-2">`), _tmpl$5 = /* @__PURE__ */ web.template(`<div class="flex flex-col items-center gap-2 py-4 text-center"><span class=text-2xl>&#128269;</span><p class="text-sm text-gray-500 dark:text-gray-400">No results for these filters</p><button type=button class="px-3 py-1.5 text-xs font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors">Modify filters`), _tmpl$6 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700">`), _tmpl$7 = /* @__PURE__ */ web.template(`<p class="text-xs text-red-500 dark:text-red-500 mt-0.5">Code: <!$><!/>`), _tmpl$8 = /* @__PURE__ */ web.template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg bg-red-600 text-white hover:bg-red-700 transition-colors flex items-center gap-1">&#128260; Retry`), _tmpl$9 = /* @__PURE__ */ web.template(`<button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors">Close`), _tmpl$0 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-red-100 dark:border-red-900/30 bg-red-50 dark:bg-red-900/10"><div class="flex items-start gap-2 text-sm text-red-700 dark:text-red-400"><span class="flex-shrink-0 mt-0.5">⚠️</span><div class=flex-1><p class=font-medium></p><!$><!/></div></div><div class="flex gap-2 mt-2"><!$><!/><!$><!/>`), _tmpl$1 = /* @__PURE__ */ web.template(`<div class="px-4 py-3 border-t border-gray-100 dark:border-gray-700"><button type=button class="w-full px-4 py-2.5 text-sm font-semibold rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors flex items-center justify-center gap-2"><svg class="w-4 h-4"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg>Search`), _tmpl$10 = /* @__PURE__ */ web.template(`<div style=overflow-y:auto><!$><!/><div class="divide-y divide-gray-100 dark:divide-gray-700"></div><!$><!/><!$><!/><!$><!/><!$><!/>`), _tmpl$11 = /* @__PURE__ */ web.template(`<div class="absolute bottom-1 right-1 px-2 py-1 text-[9px] font-mono bg-black/80 text-green-400 rounded z-50 pointer-events-none"><!$><!/> | ev:<!$><!/> | sec:<!$><!/> | <!$><!/> | last:<!$><!/>`), _tmpl$12 = /* @__PURE__ */ web.template(`<div style="animation:scratchpad-slide-down 0.2s ease-out"><div><div class="flex items-center gap-2"><span class=text-base>&#128221;</span><h3 class="text-sm font-semibold text-gray-900 dark:text-white"></h3><!$><!/></div><div class="flex items-center gap-2"><span></span><!$><!/></div></div><!$><!/><style>
7
7
  @keyframes scratchpad-slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
8
- `), _tmpl$12 = /* @__PURE__ */ web.template(`<svg class="w-3 h-3 text-gray-300 dark:text-gray-600 flex-shrink-0"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$13 = /* @__PURE__ */ web.template(`<span class="ml-1 font-normal opacity-75">— <!$><!/>`), _tmpl$14 = /* @__PURE__ */ web.template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$15 = /* @__PURE__ */ web.template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$16 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Preview</span><span class="px-1.5 py-0.5 text-xs font-bold bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded">`), _tmpl$17 = /* @__PURE__ */ web.template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$18 = /* @__PURE__ */ web.template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$19 = /* @__PURE__ */ web.template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$20 = /* @__PURE__ */ web.template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$21 = /* @__PURE__ */ web.template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$22 = /* @__PURE__ */ web.template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$23 = /* @__PURE__ */ web.template(`<div class="px-4 py-3"><h4 class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"></h4><!$><!/>`), _tmpl$24 = /* @__PURE__ */ web.template(`<div class=space-y-1>`), _tmpl$25 = /* @__PURE__ */ web.template(`<div class="flex gap-2 text-xs"><span class="text-gray-500 dark:text-gray-400 font-mono min-w-[120px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$26 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-400 italic">No filters`), _tmpl$27 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$28 = /* @__PURE__ */ web.template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">&times;`), _tmpl$29 = /* @__PURE__ */ web.template(`<span class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full"><button type=button class=hover:underline><span class="text-blue-500 dark:text-blue-400"><!$><!/>:</span> <!$><!/></button><!$><!/>`), _tmpl$30 = /* @__PURE__ */ web.template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$31 = /* @__PURE__ */ web.template(`<button type=button class="mt-1 w-full px-2 py-1 text-xs text-gray-500 hover:text-gray-700 text-center">Cancel`), _tmpl$32 = /* @__PURE__ */ web.template(`<div class="absolute z-50 mt-1 left-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg p-2 min-w-[200px]">`), _tmpl$33 = /* @__PURE__ */ web.template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$34 = /* @__PURE__ */ web.template(`<button type=button class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium border border-dashed border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 rounded-full hover:border-blue-400 hover:text-blue-500 transition-colors">+ <!$><!/>`), _tmpl$35 = /* @__PURE__ */ web.template(`<form class="flex gap-1"><input type=text autofocus class="flex-1 px-2 py-1 text-sm border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=submit class="px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700">OK</button><button type=button class="px-2 py-1 text-xs text-gray-500 hover:text-gray-700">Cancel`), _tmpl$36 = /* @__PURE__ */ web.template(`<span class=ml-1>✓`), _tmpl$37 = /* @__PURE__ */ web.template(`<button type=button><!$><!/><!$><!/>`), _tmpl$38 = /* @__PURE__ */ web.template(`<form class="flex flex-col gap-3"><!$><!/><div class="flex justify-end"><button type=submit class="px-4 py-2 text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors">`), _tmpl$39 = /* @__PURE__ */ web.template(`<div class="flex justify-end"><button type=button class="px-3 py-1.5 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors flex items-center gap-1">Next <svg class="w-3.5 h-3.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$40 = /* @__PURE__ */ web.template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$41 = /* @__PURE__ */ web.template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$42 = /* @__PURE__ */ web.template(`<div class="mt-2 ml-6">`), _tmpl$43 = /* @__PURE__ */ web.template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$44 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-2">`), _tmpl$45 = /* @__PURE__ */ web.template(`<span class=mr-1>`), _tmpl$46 = /* @__PURE__ */ web.template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$47 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$48 = /* @__PURE__ */ web.template(`<div class="flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400"><span class=flex-shrink-0>⚠️</span><span>`), _tmpl$49 = /* @__PURE__ */ web.template(`<div class="flex gap-1"><input type=text class="flex-1 px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=button class="px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700">Send`), _tmpl$50 = /* @__PURE__ */ web.template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><div class="flex flex-wrap gap-2"></div><!$><!/>`), _tmpl$51 = /* @__PURE__ */ web.template(`<span>`), _tmpl$52 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$53 = /* @__PURE__ */ web.template(`<div class="mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/10 rounded-lg text-sm text-blue-700 dark:text-blue-300"><span class=font-medium>Plan:</span> <!$><!/>`), _tmpl$54 = /* @__PURE__ */ web.template(`<button type=button class="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1">&#9998; Modify`), _tmpl$55 = /* @__PURE__ */ web.template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$56 = /* @__PURE__ */ web.template(`<div class="flex gap-2 text-sm"><span class="text-gray-500 dark:text-gray-400 font-medium min-w-[80px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$57 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-1 flex-wrap">`), _tmpl$58 = /* @__PURE__ */ web.template(`<div class=space-y-2>`), _tmpl$59 = /* @__PURE__ */ web.template(`<span class="ml-1 text-xs text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$60 = /* @__PURE__ */ web.template(`<span class="ml-1 text-xs text-gray-400">(<!$><!/>ms)`), _tmpl$61 = /* @__PURE__ */ web.template(`<div><span class=flex-shrink-0></span><div><span></span><!$><!/><!$><!/>`), _tmpl$62 = /* @__PURE__ */ web.template(`<span class="text-[10px] opacity-75">`), _tmpl$63 = /* @__PURE__ */ web.template(`<div><span></span><span></span><!$><!/>`);
8
+ </style><!$><!/>`), _tmpl$13 = /* @__PURE__ */ web.template(`<svg class="w-3 h-3 text-gray-300 dark:text-gray-600 flex-shrink-0"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$14 = /* @__PURE__ */ web.template(`<span class="ml-1 font-normal opacity-75">— <!$><!/>`), _tmpl$15 = /* @__PURE__ */ web.template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$16 = /* @__PURE__ */ web.template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$17 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 mb-2"><span class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide">Preview</span><span class="px-1.5 py-0.5 text-xs font-bold bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded">`), _tmpl$18 = /* @__PURE__ */ web.template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$19 = /* @__PURE__ */ web.template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$20 = /* @__PURE__ */ web.template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$21 = /* @__PURE__ */ web.template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$22 = /* @__PURE__ */ web.template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$23 = /* @__PURE__ */ web.template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$24 = /* @__PURE__ */ web.template(`<div class="px-4 py-3"><h4 class="text-xs font-medium text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2"></h4><!$><!/>`), _tmpl$25 = /* @__PURE__ */ web.template(`<div class=space-y-1>`), _tmpl$26 = /* @__PURE__ */ web.template(`<div class="flex gap-2 text-xs"><span class="text-gray-500 dark:text-gray-400 font-mono min-w-[120px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$27 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-400 italic">No filters`), _tmpl$28 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$29 = /* @__PURE__ */ web.template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">&times;`), _tmpl$30 = /* @__PURE__ */ web.template(`<span class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-300 rounded-full"><button type=button class=hover:underline><span class="text-blue-500 dark:text-blue-400"><!$><!/>:</span> <!$><!/></button><!$><!/>`), _tmpl$31 = /* @__PURE__ */ web.template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$32 = /* @__PURE__ */ web.template(`<button type=button class="mt-1 w-full px-2 py-1 text-xs text-gray-500 hover:text-gray-700 text-center">Cancel`), _tmpl$33 = /* @__PURE__ */ web.template(`<div class="absolute z-50 mt-1 left-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg p-2 min-w-[200px]">`), _tmpl$34 = /* @__PURE__ */ web.template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$35 = /* @__PURE__ */ web.template(`<button type=button class="inline-flex items-center gap-1 px-2.5 py-1 text-xs font-medium border border-dashed border-gray-300 dark:border-gray-600 text-gray-500 dark:text-gray-400 rounded-full hover:border-blue-400 hover:text-blue-500 transition-colors">+ <!$><!/>`), _tmpl$36 = /* @__PURE__ */ web.template(`<form class="flex gap-1"><input type=text autofocus class="flex-1 px-2 py-1 text-sm border border-gray-200 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=submit class="px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700">OK</button><button type=button class="px-2 py-1 text-xs text-gray-500 hover:text-gray-700">Cancel`), _tmpl$37 = /* @__PURE__ */ web.template(`<span class=ml-1>✓`), _tmpl$38 = /* @__PURE__ */ web.template(`<button type=button><!$><!/><!$><!/>`), _tmpl$39 = /* @__PURE__ */ web.template(`<form class="flex flex-col gap-3"><!$><!/><div class="flex justify-end"><button type=submit class="px-4 py-2 text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 transition-colors">`), _tmpl$40 = /* @__PURE__ */ web.template(`<div class="flex justify-end"><button type=button class="px-3 py-1.5 text-sm font-medium text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/20 rounded-lg transition-colors flex items-center gap-1">Next <svg class="w-3.5 h-3.5"fill=none viewBox="0 0 24 24"stroke=currentColor><path stroke-linecap=round stroke-linejoin=round stroke-width=2 d="M9 5l7 7-7 7">`), _tmpl$41 = /* @__PURE__ */ web.template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$42 = /* @__PURE__ */ web.template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$43 = /* @__PURE__ */ web.template(`<div class="mt-2 ml-6">`), _tmpl$44 = /* @__PURE__ */ web.template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$45 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-2">`), _tmpl$46 = /* @__PURE__ */ web.template(`<span class=mr-1>`), _tmpl$47 = /* @__PURE__ */ web.template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$48 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$49 = /* @__PURE__ */ web.template(`<div class="flex items-start gap-1.5 text-xs text-amber-600 dark:text-amber-400"><span class=flex-shrink-0>⚠️</span><span>`), _tmpl$50 = /* @__PURE__ */ web.template(`<div class="flex gap-1"><input type=text class="flex-1 px-3 py-2 text-sm border border-gray-200 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white focus:border-blue-400 outline-none"><button type=button class="px-3 py-2 text-sm bg-blue-600 text-white rounded-lg hover:bg-blue-700">Send`), _tmpl$51 = /* @__PURE__ */ web.template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><div class="flex flex-wrap gap-2"></div><!$><!/>`), _tmpl$52 = /* @__PURE__ */ web.template(`<span>`), _tmpl$53 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$54 = /* @__PURE__ */ web.template(`<div class="mt-2 px-3 py-2 bg-blue-50 dark:bg-blue-900/10 rounded-lg text-sm text-blue-700 dark:text-blue-300"><span class=font-medium>Plan:</span> <!$><!/>`), _tmpl$55 = /* @__PURE__ */ web.template(`<button type=button class="text-xs text-blue-600 dark:text-blue-400 hover:underline flex items-center gap-1">&#9998; Modify`), _tmpl$56 = /* @__PURE__ */ web.template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$57 = /* @__PURE__ */ web.template(`<div class="flex gap-2 text-sm"><span class="text-gray-500 dark:text-gray-400 font-medium min-w-[80px]"><!$><!/>:</span><span class="text-gray-900 dark:text-white">`), _tmpl$58 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-1 flex-wrap">`), _tmpl$59 = /* @__PURE__ */ web.template(`<div class=space-y-2>`), _tmpl$60 = /* @__PURE__ */ web.template(`<span class="ml-1 text-xs text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$61 = /* @__PURE__ */ web.template(`<span class="ml-1 text-xs text-gray-400">(<!$><!/>ms)`), _tmpl$62 = /* @__PURE__ */ web.template(`<div><span class=flex-shrink-0></span><div><span></span><!$><!/><!$><!/>`), _tmpl$63 = /* @__PURE__ */ web.template(`<span class="text-[10px] opacity-75">`), _tmpl$64 = /* @__PURE__ */ web.template(`<div><span></span><span></span><!$><!/>`), _tmpl$65 = /* @__PURE__ */ web.template(`<button type=button>&#128260; <!$><!/>`), _tmpl$66 = /* @__PURE__ */ web.template(`<button type=button class="px-2 py-1 text-xs opacity-70 hover:opacity-100">&#9654; Details`), _tmpl$67 = /* @__PURE__ */ web.template(`<pre class="mt-2 text-xs opacity-70 overflow-x-auto">`), _tmpl$68 = /* @__PURE__ */ web.template(`<div><div class="flex items-start gap-2"><span class=flex-shrink-0></span><div class=flex-1><p></p><div class="flex gap-2 mt-2"><!$><!/><!$><!/></div><!$><!/>`), _tmpl$69 = /* @__PURE__ */ web.template(`<span class="text-xs font-bold text-blue-600 dark:text-blue-400"><!$><!/> results`), _tmpl$70 = /* @__PURE__ */ web.template(`<p class="text-[10px] text-gray-400">`), _tmpl$71 = /* @__PURE__ */ web.template(`<div class="rounded-lg border border-gray-200 dark:border-gray-700 px-3 py-2"><div class="flex items-center justify-between mb-1.5"><span class="text-sm font-medium text-gray-900 dark:text-white"><!$><!/> <!$><!/></span><!$><!/></div><div class="flex flex-wrap gap-1.5 mb-1"></div><!$><!/>`), _tmpl$72 = /* @__PURE__ */ web.template(`<span><!$><!/> <!$><!/>`), _tmpl$73 = /* @__PURE__ */ web.template(`<div class=overflow-x-auto><table class="min-w-full text-xs"><thead><tr><th class="px-2 py-1 text-left text-gray-500 dark:text-gray-400"></th><th class="px-2 py-1 text-left font-medium text-blue-600 dark:text-blue-400"></th><th class="px-2 py-1 text-left font-medium text-purple-600 dark:text-purple-400"></th></tr></thead><tbody>`), _tmpl$74 = /* @__PURE__ */ web.template(`<tr><td class="px-2 py-1 font-mono text-gray-500 dark:text-gray-400"></td><td class="px-2 py-1 text-gray-900 dark:text-white"></td><td class="px-2 py-1 text-gray-900 dark:text-white">`);
9
9
  const STATUS_BADGES = {
10
10
  loading: {
11
11
  label: "Loading...",
@@ -35,28 +35,57 @@ const STATUS_BADGES = {
35
35
  const ScratchpadPanel = (props) => {
36
36
  const [collapsed, setCollapsed] = solidJs.createSignal(false);
37
37
  const [localPreview, setLocalPreview] = solidJs.createSignal(void 0);
38
+ const [loadingAction, setLoadingAction] = solidJs.createSignal(null);
38
39
  let previewTimer = null;
39
40
  const badge = () => STATUS_BADGES[props.state.status] || STATUS_BADGES.loading;
40
41
  const isClosable = () => props.closable !== false;
41
42
  const isCollapsible = () => props.collapsible !== false;
42
43
  const preview = () => localPreview() || props.state.preview;
43
44
  const hasFilters = () => Object.keys(props.state.filters || {}).length > 0;
45
+ const [eventCount, setEventCount] = solidJs.createSignal(0);
46
+ const [lastEvent, setLastEvent] = solidJs.createSignal("");
47
+ const debugLog = (event, data) => {
48
+ if (!props.debug) return;
49
+ setEventCount((c) => c + 1);
50
+ setLastEvent(event);
51
+ console.log(`[ScratchpadPanel:${props.state.id}] ${event}`, data || "");
52
+ };
44
53
  const CLOSE_ALIASES = /* @__PURE__ */ new Set(["done", "close", "dismiss", "validate", "cancel", "sufficient"]);
45
54
  const handleAction = (action, data) => {
46
55
  var _a;
56
+ debugLog("onAction", {
57
+ action,
58
+ asyncAction: props.asyncAction,
59
+ data
60
+ });
61
+ if (props.asyncAction && !CLOSE_ALIASES.has(action)) {
62
+ setLoadingAction(action);
63
+ }
47
64
  (_a = props.onAction) == null ? void 0 : _a.call(props, action, data);
48
65
  if (CLOSE_ALIASES.has(action) && props.onClose) {
49
66
  props.onClose();
50
67
  }
51
68
  };
52
69
  solidJs.createEffect(() => {
53
- if (props.state.status === "complete" && props.autoCloseDelay) {
70
+ var _a;
71
+ debugLog("state", {
72
+ status: props.state.status,
73
+ sections: (_a = props.state.sections) == null ? void 0 : _a.length,
74
+ filters: Object.keys(props.state.filters || {}),
75
+ turn: props.state.turn
76
+ });
77
+ });
78
+ solidJs.createEffect(() => {
79
+ if (props.state.status === "complete" && props.autoCloseDelay && !props.pinned) {
54
80
  const timer = setTimeout(() => {
55
81
  var _a;
56
82
  return (_a = props.onClose) == null ? void 0 : _a.call(props);
57
83
  }, props.autoCloseDelay);
58
84
  solidJs.onCleanup(() => clearTimeout(timer));
59
85
  }
86
+ if (props.state.status !== "processing" && loadingAction()) {
87
+ setLoadingAction(null);
88
+ }
60
89
  });
61
90
  solidJs.createEffect(() => {
62
91
  const endpoint = props.state.previewEndpoint;
@@ -86,8 +115,7 @@ const ScratchpadPanel = (props) => {
86
115
  if (previewTimer) clearTimeout(previewTimer);
87
116
  });
88
117
  return (() => {
89
- var _el$ = web.getNextElement(_tmpl$11), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling, [_el$8, _co$] = web.getNextMarker(_el$7.nextSibling), _el$9 = _el$3.nextSibling, _el$0 = _el$9.firstChild, _el$10 = _el$0.nextSibling, [_el$11, _co$2] = web.getNextMarker(_el$10.nextSibling), _el$52 = _el$2.nextSibling, [_el$53, _co$10] = web.getNextMarker(_el$52.nextSibling);
90
- _el$53.nextSibling;
118
+ var _el$ = web.getNextElement(_tmpl$12), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.nextSibling, _el$7 = _el$5.nextSibling, [_el$8, _co$] = web.getNextMarker(_el$7.nextSibling), _el$9 = _el$3.nextSibling, _el$0 = _el$9.firstChild, _el$10 = _el$0.nextSibling, [_el$11, _co$2] = web.getNextMarker(_el$10.nextSibling), _el$67 = _el$2.nextSibling, [_el$68, _co$15] = web.getNextMarker(_el$67.nextSibling), _el$51 = _el$68.nextSibling, _el$69 = _el$51.nextSibling, [_el$70, _co$16] = web.getNextMarker(_el$69.nextSibling);
91
119
  _el$2.$$click = () => isCollapsible() && setCollapsed(!collapsed());
92
120
  web.insert(_el$5, () => props.state.title);
93
121
  web.insert(_el$3, web.createComponent(solidJs.Show, {
@@ -137,27 +165,27 @@ const ScratchpadPanel = (props) => {
137
165
  return i() > 0;
138
166
  },
139
167
  get children() {
140
- return web.getNextElement(_tmpl$12);
168
+ return web.getNextElement(_tmpl$13);
141
169
  }
142
170
  }), (() => {
143
- var _el$55 = web.getNextElement(_tmpl$14), _el$61 = _el$55.firstChild, [_el$62, _co$12] = web.getNextMarker(_el$61.nextSibling), _el$56 = _el$62.nextSibling, _el$63 = _el$56.nextSibling, [_el$64, _co$13] = web.getNextMarker(_el$63.nextSibling), _el$65 = _el$64.nextSibling, [_el$66, _co$14] = web.getNextMarker(_el$65.nextSibling);
144
- web.insert(_el$55, (() => {
171
+ var _el$72 = web.getNextElement(_tmpl$15), _el$78 = _el$72.firstChild, [_el$79, _co$18] = web.getNextMarker(_el$78.nextSibling), _el$73 = _el$79.nextSibling, _el$80 = _el$73.nextSibling, [_el$81, _co$19] = web.getNextMarker(_el$80.nextSibling), _el$82 = _el$81.nextSibling, [_el$83, _co$20] = web.getNextMarker(_el$82.nextSibling);
172
+ web.insert(_el$72, (() => {
145
173
  var _c$ = web.memo(() => turn.status === "done");
146
174
  return () => _c$() ? "✅" : turn.status === "active" ? "●" : "○";
147
- })(), _el$62, _co$12);
148
- web.insert(_el$55, () => turn.label, _el$64, _co$13);
149
- web.insert(_el$55, web.createComponent(solidJs.Show, {
175
+ })(), _el$79, _co$18);
176
+ web.insert(_el$72, () => turn.label, _el$81, _co$19);
177
+ web.insert(_el$72, web.createComponent(solidJs.Show, {
150
178
  get when() {
151
179
  return turn.summary;
152
180
  },
153
181
  get children() {
154
- var _el$57 = web.getNextElement(_tmpl$13), _el$58 = _el$57.firstChild, _el$59 = _el$58.nextSibling, [_el$60, _co$11] = web.getNextMarker(_el$59.nextSibling);
155
- web.insert(_el$57, () => turn.summary, _el$60, _co$11);
156
- return _el$57;
182
+ var _el$74 = web.getNextElement(_tmpl$14), _el$75 = _el$74.firstChild, _el$76 = _el$75.nextSibling, [_el$77, _co$17] = web.getNextMarker(_el$76.nextSibling);
183
+ web.insert(_el$74, () => turn.summary, _el$77, _co$17);
184
+ return _el$74;
157
185
  }
158
- }), _el$66, _co$14);
159
- web.effect(() => web.className(_el$55, `text-xs font-medium px-2 py-0.5 rounded-full ${turn.status === "done" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : turn.status === "active" ? "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400" : turn.status === "skipped" ? "bg-gray-100 dark:bg-gray-700 text-gray-400 line-through" : "bg-gray-100 dark:bg-gray-700 text-gray-400"}`));
160
- return _el$55;
186
+ }), _el$83, _co$20);
187
+ web.effect(() => web.className(_el$72, `text-xs font-medium px-2 py-0.5 rounded-full ${turn.status === "done" ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : turn.status === "active" ? "bg-blue-100 dark:bg-blue-900/30 text-blue-700 dark:text-blue-400" : turn.status === "skipped" ? "bg-gray-100 dark:bg-gray-700 text-gray-400 line-through" : "bg-gray-100 dark:bg-gray-700 text-gray-400"}`));
188
+ return _el$72;
161
189
  })()]
162
190
  }));
163
191
  return _el$13;
@@ -195,14 +223,14 @@ const ScratchpadPanel = (props) => {
195
223
  return props.state.agentMessages;
196
224
  },
197
225
  children: (msg) => (() => {
198
- var _el$67 = web.getNextElement(_tmpl$15), _el$68 = _el$67.firstChild, _el$69 = _el$68.nextSibling;
199
- web.insert(_el$68, (() => {
226
+ var _el$84 = web.getNextElement(_tmpl$16), _el$85 = _el$84.firstChild, _el$86 = _el$85.nextSibling;
227
+ web.insert(_el$85, (() => {
200
228
  var _c$2 = web.memo(() => msg.type === "warning");
201
229
  return () => _c$2() ? "⚠️" : msg.type === "question" ? "❓" : "ℹ️";
202
230
  })());
203
- web.insert(_el$69, () => msg.text);
204
- web.effect(() => web.className(_el$67, `flex items-start gap-2 text-sm rounded-lg px-3 py-2 ${msg.type === "warning" ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400" : msg.type === "question" ? "bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-400 border border-blue-200 dark:border-blue-800" : "bg-gray-50 dark:bg-gray-700/50 text-gray-600 dark:text-gray-400"}`));
205
- return _el$67;
231
+ web.insert(_el$86, () => msg.text);
232
+ web.effect(() => web.className(_el$84, `flex items-start gap-2 text-sm rounded-lg px-3 py-2 ${msg.type === "warning" ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400" : msg.type === "question" ? "bg-blue-50 dark:bg-blue-900/10 text-blue-700 dark:text-blue-400 border border-blue-200 dark:border-blue-800" : "bg-gray-50 dark:bg-gray-700/50 text-gray-600 dark:text-gray-400"}`));
233
+ return _el$84;
206
234
  })()
207
235
  }));
208
236
  return _el$15;
@@ -220,49 +248,49 @@ const ScratchpadPanel = (props) => {
220
248
  },
221
249
  get fallback() {
222
250
  return [(() => {
223
- var _el$70 = web.getNextElement(_tmpl$16), _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling;
224
- web.insert(_el$72, () => preview().count.toLocaleString());
225
- return _el$70;
251
+ var _el$87 = web.getNextElement(_tmpl$17), _el$88 = _el$87.firstChild, _el$89 = _el$88.nextSibling;
252
+ web.insert(_el$89, () => preview().count.toLocaleString());
253
+ return _el$87;
226
254
  })(), (() => {
227
- var _el$73 = web.getNextElement(_tmpl$17);
228
- web.insert(_el$73, () => preview().summary);
229
- return _el$73;
255
+ var _el$90 = web.getNextElement(_tmpl$18);
256
+ web.insert(_el$90, () => preview().summary);
257
+ return _el$90;
230
258
  })(), web.createComponent(solidJs.Show, {
231
259
  get when() {
232
260
  return web.memo(() => !!preview().rows)() && preview().rows.length > 0;
233
261
  },
234
262
  get children() {
235
- var _el$74 = web.getNextElement(_tmpl$18), _el$75 = _el$74.firstChild, _el$76 = _el$75.firstChild, _el$77 = _el$76.firstChild, _el$78 = _el$76.nextSibling;
236
- web.insert(_el$77, web.createComponent(solidJs.For, {
263
+ var _el$91 = web.getNextElement(_tmpl$19), _el$92 = _el$91.firstChild, _el$93 = _el$92.firstChild, _el$94 = _el$93.firstChild, _el$95 = _el$93.nextSibling;
264
+ web.insert(_el$94, web.createComponent(solidJs.For, {
237
265
  get each() {
238
266
  return Object.keys(preview().rows[0]);
239
267
  },
240
268
  children: (k) => (() => {
241
- var _el$79 = web.getNextElement(_tmpl$19);
242
- web.insert(_el$79, k);
243
- return _el$79;
269
+ var _el$96 = web.getNextElement(_tmpl$20);
270
+ web.insert(_el$96, k);
271
+ return _el$96;
244
272
  })()
245
273
  }));
246
- web.insert(_el$78, web.createComponent(solidJs.For, {
274
+ web.insert(_el$95, web.createComponent(solidJs.For, {
247
275
  get each() {
248
276
  return preview().rows.slice(0, 5);
249
277
  },
250
278
  children: (row) => (() => {
251
- var _el$80 = web.getNextElement(_tmpl$20);
252
- web.insert(_el$80, web.createComponent(solidJs.For, {
279
+ var _el$97 = web.getNextElement(_tmpl$21);
280
+ web.insert(_el$97, web.createComponent(solidJs.For, {
253
281
  get each() {
254
282
  return Object.values(row);
255
283
  },
256
284
  children: (v) => (() => {
257
- var _el$81 = web.getNextElement(_tmpl$21);
258
- web.insert(_el$81, () => String(v));
259
- return _el$81;
285
+ var _el$98 = web.getNextElement(_tmpl$22);
286
+ web.insert(_el$98, () => String(v));
287
+ return _el$98;
260
288
  })()
261
289
  }));
262
- return _el$80;
290
+ return _el$97;
263
291
  })()
264
292
  }));
265
- return _el$74;
293
+ return _el$91;
266
294
  }
267
295
  })];
268
296
  },
@@ -343,7 +371,24 @@ const ScratchpadPanel = (props) => {
343
371
  web.effect((_$p) => web.setStyleProperty(_el$12, "max-height", props.maxHeight || "500px"));
344
372
  return _el$12;
345
373
  }
346
- }), _el$53, _co$10);
374
+ }), _el$68, _co$15);
375
+ web.insert(_el$, web.createComponent(solidJs.Show, {
376
+ get when() {
377
+ return props.debugOverlay;
378
+ },
379
+ get children() {
380
+ var _el$52 = web.getNextElement(_tmpl$11), _el$57 = _el$52.firstChild, [_el$58, _co$10] = web.getNextMarker(_el$57.nextSibling), _el$53 = _el$58.nextSibling, _el$59 = _el$53.nextSibling, [_el$60, _co$11] = web.getNextMarker(_el$59.nextSibling), _el$54 = _el$60.nextSibling, _el$61 = _el$54.nextSibling, [_el$62, _co$12] = web.getNextMarker(_el$61.nextSibling), _el$55 = _el$62.nextSibling, _el$63 = _el$55.nextSibling, [_el$64, _co$13] = web.getNextMarker(_el$63.nextSibling), _el$56 = _el$64.nextSibling, _el$65 = _el$56.nextSibling, [_el$66, _co$14] = web.getNextMarker(_el$65.nextSibling);
381
+ web.insert(_el$52, () => props.state.id, _el$58, _co$10);
382
+ web.insert(_el$52, eventCount, _el$60, _co$11);
383
+ web.insert(_el$52, () => {
384
+ var _a;
385
+ return ((_a = props.state.sections) == null ? void 0 : _a.length) || 0;
386
+ }, _el$62, _co$12);
387
+ web.insert(_el$52, () => props.state.status, _el$64, _co$13);
388
+ web.insert(_el$52, lastEvent, _el$66, _co$14);
389
+ return _el$52;
390
+ }
391
+ }), _el$70, _co$16);
347
392
  web.effect((_p$) => {
348
393
  var _v$ = `w-full bg-white dark:bg-gray-800 rounded-xl border shadow-lg overflow-visible ${props.state.status === "waiting_human" ? "border-blue-300 dark:border-blue-600" : "border-gray-200 dark:border-gray-700"}`, _v$2 = `flex items-center justify-between px-4 py-3 border-b border-gray-100 dark:border-gray-700 ${isCollapsible() ? "cursor-pointer select-none hover:bg-gray-50 dark:hover:bg-gray-750" : ""}`, _v$3 = `px-2 py-0.5 text-xs font-medium rounded-full ${badge().class}`;
349
394
  _v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
@@ -361,9 +406,9 @@ const ScratchpadPanel = (props) => {
361
406
  };
362
407
  const SectionRenderer = (props) => {
363
408
  return (() => {
364
- var _el$82 = web.getNextElement(_tmpl$23), _el$83 = _el$82.firstChild, _el$86 = _el$83.nextSibling, [_el$87, _co$15] = web.getNextMarker(_el$86.nextSibling);
365
- web.insert(_el$83, () => props.section.title);
366
- web.insert(_el$82, web.createComponent(solidJs.Switch, {
409
+ var _el$99 = web.getNextElement(_tmpl$24), _el$100 = _el$99.firstChild, _el$103 = _el$100.nextSibling, [_el$104, _co$21] = web.getNextMarker(_el$103.nextSibling);
410
+ web.insert(_el$100, () => props.section.title);
411
+ web.insert(_el$99, web.createComponent(solidJs.Switch, {
367
412
  get children() {
368
413
  return [web.createComponent(solidJs.Match, {
369
414
  get when() {
@@ -398,9 +443,9 @@ const SectionRenderer = (props) => {
398
443
  return props.section.type === "message";
399
444
  },
400
445
  get children() {
401
- var _el$84 = web.getNextElement(_tmpl$17);
402
- web.insert(_el$84, () => String(props.section.content));
403
- return _el$84;
446
+ var _el$101 = web.getNextElement(_tmpl$18);
447
+ web.insert(_el$101, () => String(props.section.content));
448
+ return _el$101;
404
449
  }
405
450
  }), web.createComponent(solidJs.Match, {
406
451
  get when() {
@@ -503,40 +548,76 @@ const SectionRenderer = (props) => {
503
548
  }
504
549
  });
505
550
  }
551
+ }), web.createComponent(solidJs.Match, {
552
+ get when() {
553
+ return props.section.type === "error";
554
+ },
555
+ get children() {
556
+ return web.createComponent(ErrorSectionRenderer, {
557
+ get content() {
558
+ return props.section.content;
559
+ },
560
+ get onAction() {
561
+ return props.onAction;
562
+ }
563
+ });
564
+ }
565
+ }), web.createComponent(solidJs.Match, {
566
+ get when() {
567
+ return props.section.type === "source_card";
568
+ },
569
+ get children() {
570
+ return web.createComponent(SourceCardSection, {
571
+ get content() {
572
+ return props.section.content;
573
+ }
574
+ });
575
+ }
576
+ }), web.createComponent(solidJs.Match, {
577
+ get when() {
578
+ return props.section.type === "diff";
579
+ },
580
+ get children() {
581
+ return web.createComponent(DiffSection, {
582
+ get content() {
583
+ return props.section.content;
584
+ }
585
+ });
586
+ }
506
587
  }), web.createComponent(solidJs.Match, {
507
588
  when: true,
508
589
  get children() {
509
- var _el$85 = web.getNextElement(_tmpl$22);
510
- web.insert(_el$85, () => JSON.stringify(props.section.content, null, 2));
511
- return _el$85;
590
+ var _el$102 = web.getNextElement(_tmpl$23);
591
+ web.insert(_el$102, () => JSON.stringify(props.section.content, null, 2));
592
+ return _el$102;
512
593
  }
513
594
  })];
514
595
  }
515
- }), _el$87, _co$15);
516
- return _el$82;
596
+ }), _el$104, _co$21);
597
+ return _el$99;
517
598
  })();
518
599
  };
519
600
  const DataSection = (props) => {
520
601
  const entries = () => typeof props.content === "object" && props.content ? Object.entries(props.content) : [];
521
602
  return (() => {
522
- var _el$88 = web.getNextElement(_tmpl$24);
523
- web.insert(_el$88, web.createComponent(solidJs.For, {
603
+ var _el$105 = web.getNextElement(_tmpl$25);
604
+ web.insert(_el$105, web.createComponent(solidJs.For, {
524
605
  get each() {
525
606
  return entries();
526
607
  },
527
608
  children: ([k, v]) => (() => {
528
- var _el$89 = web.getNextElement(_tmpl$25), _el$90 = _el$89.firstChild, _el$92 = _el$90.firstChild, [_el$93, _co$16] = web.getNextMarker(_el$92.nextSibling);
529
- _el$93.nextSibling;
530
- var _el$94 = _el$90.nextSibling;
531
- web.insert(_el$90, k, _el$93, _co$16);
532
- web.insert(_el$94, (() => {
609
+ var _el$106 = web.getNextElement(_tmpl$26), _el$107 = _el$106.firstChild, _el$109 = _el$107.firstChild, [_el$110, _co$22] = web.getNextMarker(_el$109.nextSibling);
610
+ _el$110.nextSibling;
611
+ var _el$111 = _el$107.nextSibling;
612
+ web.insert(_el$107, k, _el$110, _co$22);
613
+ web.insert(_el$111, (() => {
533
614
  var _c$3 = web.memo(() => !!Array.isArray(v));
534
615
  return () => _c$3() ? v.join(", ") : String(v);
535
616
  })());
536
- return _el$89;
617
+ return _el$106;
537
618
  })()
538
619
  }));
539
- return _el$88;
620
+ return _el$105;
540
621
  })();
541
622
  };
542
623
  const InteractiveFilterSection = (props) => {
@@ -570,8 +651,8 @@ const InteractiveFilterSection = (props) => {
570
651
  };
571
652
  const getDef = (key) => filterDefs()[key] || {};
572
653
  return (() => {
573
- var _el$95 = web.getNextElement(_tmpl$27), _el$97 = _el$95.firstChild, [_el$98, _co$17] = web.getNextMarker(_el$97.nextSibling), _el$99 = _el$98.nextSibling, [_el$100, _co$18] = web.getNextMarker(_el$99.nextSibling);
574
- web.insert(_el$95, web.createComponent(solidJs.For, {
654
+ var _el$112 = web.getNextElement(_tmpl$28), _el$114 = _el$112.firstChild, [_el$115, _co$23] = web.getNextMarker(_el$114.nextSibling), _el$116 = _el$115.nextSibling, [_el$117, _co$24] = web.getNextMarker(_el$116.nextSibling);
655
+ web.insert(_el$112, web.createComponent(solidJs.For, {
575
656
  get each() {
576
657
  return allKeys();
577
658
  },
@@ -580,136 +661,136 @@ const InteractiveFilterSection = (props) => {
580
661
  const value = () => props.filters[key];
581
662
  const hasValue = () => value() !== void 0 && value() !== "";
582
663
  return (() => {
583
- var _el$101 = web.getNextElement(_tmpl$33), _el$117 = _el$101.firstChild, [_el$118, _co$22] = web.getNextMarker(_el$117.nextSibling), _el$119 = _el$118.nextSibling, [_el$120, _co$23] = web.getNextMarker(_el$119.nextSibling);
584
- web.insert(_el$101, web.createComponent(solidJs.Show, {
664
+ var _el$118 = web.getNextElement(_tmpl$34), _el$134 = _el$118.firstChild, [_el$135, _co$28] = web.getNextMarker(_el$134.nextSibling), _el$136 = _el$135.nextSibling, [_el$137, _co$29] = web.getNextMarker(_el$136.nextSibling);
665
+ web.insert(_el$118, web.createComponent(solidJs.Show, {
585
666
  get when() {
586
667
  return hasValue();
587
668
  },
588
669
  get fallback() {
589
670
  return (() => {
590
- var _el$121 = web.getNextElement(_tmpl$34), _el$122 = _el$121.firstChild, _el$123 = _el$122.nextSibling, [_el$124, _co$24] = web.getNextMarker(_el$123.nextSibling);
591
- _el$121.$$click = () => {
671
+ var _el$138 = web.getNextElement(_tmpl$35), _el$139 = _el$138.firstChild, _el$140 = _el$139.nextSibling, [_el$141, _co$30] = web.getNextMarker(_el$140.nextSibling);
672
+ _el$138.$$click = () => {
592
673
  setEditingKey(key);
593
674
  setEditValue("");
594
675
  };
595
- web.insert(_el$121, () => {
676
+ web.insert(_el$138, () => {
596
677
  var _a;
597
678
  return ((_a = def()) == null ? void 0 : _a.label) || key;
598
- }, _el$124, _co$24);
679
+ }, _el$141, _co$30);
599
680
  web.runHydrationEvents();
600
- return _el$121;
681
+ return _el$138;
601
682
  })();
602
683
  },
603
684
  get children() {
604
- var _el$102 = web.getNextElement(_tmpl$29), _el$103 = _el$102.firstChild, _el$104 = _el$103.firstChild, _el$106 = _el$104.firstChild, [_el$107, _co$19] = web.getNextMarker(_el$106.nextSibling);
605
- _el$107.nextSibling;
606
- var _el$108 = _el$104.nextSibling, _el$109 = _el$108.nextSibling, [_el$110, _co$20] = web.getNextMarker(_el$109.nextSibling), _el$112 = _el$103.nextSibling, [_el$113, _co$21] = web.getNextMarker(_el$112.nextSibling);
607
- _el$103.$$click = () => {
685
+ var _el$119 = web.getNextElement(_tmpl$30), _el$120 = _el$119.firstChild, _el$121 = _el$120.firstChild, _el$123 = _el$121.firstChild, [_el$124, _co$25] = web.getNextMarker(_el$123.nextSibling);
686
+ _el$124.nextSibling;
687
+ var _el$125 = _el$121.nextSibling, _el$126 = _el$125.nextSibling, [_el$127, _co$26] = web.getNextMarker(_el$126.nextSibling), _el$129 = _el$120.nextSibling, [_el$130, _co$27] = web.getNextMarker(_el$129.nextSibling);
688
+ _el$120.$$click = () => {
608
689
  setEditingKey(key);
609
690
  setEditValue(String(value() || ""));
610
691
  };
611
- web.insert(_el$104, () => {
692
+ web.insert(_el$121, () => {
612
693
  var _a;
613
694
  return ((_a = def()) == null ? void 0 : _a.label) || key;
614
- }, _el$107, _co$19);
615
- web.insert(_el$103, (() => {
695
+ }, _el$124, _co$25);
696
+ web.insert(_el$120, (() => {
616
697
  var _c$4 = web.memo(() => !!Array.isArray(value()));
617
698
  return () => _c$4() ? value().join(", ") : String(value());
618
- })(), _el$110, _co$20);
619
- web.insert(_el$102, web.createComponent(solidJs.Show, {
699
+ })(), _el$127, _co$26);
700
+ web.insert(_el$119, web.createComponent(solidJs.Show, {
620
701
  get when() {
621
702
  return props.onFilterChange;
622
703
  },
623
704
  get children() {
624
- var _el$111 = web.getNextElement(_tmpl$28);
625
- _el$111.$$click = () => removeFilter(key);
626
- web.setAttribute(_el$111, "aria-label", `Remove ${key}`);
705
+ var _el$128 = web.getNextElement(_tmpl$29);
706
+ _el$128.$$click = () => removeFilter(key);
707
+ web.setAttribute(_el$128, "aria-label", `Remove ${key}`);
627
708
  web.runHydrationEvents();
628
- return _el$111;
709
+ return _el$128;
629
710
  }
630
- }), _el$113, _co$21);
711
+ }), _el$130, _co$27);
631
712
  web.runHydrationEvents();
632
- return _el$102;
713
+ return _el$119;
633
714
  }
634
- }), _el$118, _co$22);
635
- web.insert(_el$101, web.createComponent(solidJs.Show, {
715
+ }), _el$135, _co$28);
716
+ web.insert(_el$118, web.createComponent(solidJs.Show, {
636
717
  get when() {
637
718
  return editingKey() === key;
638
719
  },
639
720
  get children() {
640
- var _el$114 = web.getNextElement(_tmpl$32);
641
- web.insert(_el$114, web.createComponent(solidJs.Show, {
721
+ var _el$131 = web.getNextElement(_tmpl$33);
722
+ web.insert(_el$131, web.createComponent(solidJs.Show, {
642
723
  get when() {
643
724
  var _a;
644
725
  return (_a = def()) == null ? void 0 : _a.options;
645
726
  },
646
727
  get fallback() {
647
728
  return (() => {
648
- var _el$125 = web.getNextElement(_tmpl$35), _el$126 = _el$125.firstChild, _el$127 = _el$126.nextSibling, _el$128 = _el$127.nextSibling;
649
- _el$125.addEventListener("submit", (e) => {
729
+ var _el$142 = web.getNextElement(_tmpl$36), _el$143 = _el$142.firstChild, _el$144 = _el$143.nextSibling, _el$145 = _el$144.nextSibling;
730
+ _el$142.addEventListener("submit", (e) => {
650
731
  e.preventDefault();
651
732
  setFilter(key, editValue());
652
733
  });
653
- _el$126.$$input = (e) => setEditValue(e.currentTarget.value);
654
- _el$128.$$click = () => setEditingKey(null);
734
+ _el$143.$$input = (e) => setEditValue(e.currentTarget.value);
735
+ _el$145.$$click = () => setEditingKey(null);
655
736
  web.effect(() => {
656
737
  var _a;
657
- return web.setAttribute(_el$126, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
738
+ return web.setAttribute(_el$143, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
658
739
  });
659
- web.effect(() => web.setProperty(_el$126, "value", editValue()));
740
+ web.effect(() => web.setProperty(_el$143, "value", editValue()));
660
741
  web.runHydrationEvents();
661
- return _el$125;
742
+ return _el$142;
662
743
  })();
663
744
  },
664
745
  get children() {
665
746
  return [(() => {
666
- var _el$115 = web.getNextElement(_tmpl$30);
667
- web.insert(_el$115, web.createComponent(solidJs.For, {
747
+ var _el$132 = web.getNextElement(_tmpl$31);
748
+ web.insert(_el$132, web.createComponent(solidJs.For, {
668
749
  get each() {
669
750
  return def().options;
670
751
  },
671
752
  children: (opt) => (() => {
672
- var _el$129 = web.getNextElement(_tmpl$37), _el$131 = _el$129.firstChild, [_el$132, _co$25] = web.getNextMarker(_el$131.nextSibling), _el$133 = _el$132.nextSibling, [_el$134, _co$26] = web.getNextMarker(_el$133.nextSibling);
673
- _el$129.$$click = () => setFilter(key, opt.value);
674
- web.insert(_el$129, () => opt.label, _el$132, _co$25);
675
- web.insert(_el$129, web.createComponent(solidJs.Show, {
753
+ var _el$146 = web.getNextElement(_tmpl$38), _el$148 = _el$146.firstChild, [_el$149, _co$31] = web.getNextMarker(_el$148.nextSibling), _el$150 = _el$149.nextSibling, [_el$151, _co$32] = web.getNextMarker(_el$150.nextSibling);
754
+ _el$146.$$click = () => setFilter(key, opt.value);
755
+ web.insert(_el$146, () => opt.label, _el$149, _co$31);
756
+ web.insert(_el$146, web.createComponent(solidJs.Show, {
676
757
  get when() {
677
758
  return String(value()) === opt.value;
678
759
  },
679
760
  get children() {
680
- return web.getNextElement(_tmpl$36);
761
+ return web.getNextElement(_tmpl$37);
681
762
  }
682
- }), _el$134, _co$26);
683
- web.effect(() => web.className(_el$129, `w-full text-left px-2 py-1.5 text-sm rounded hover:bg-blue-50 dark:hover:bg-blue-900/20 ${String(value()) === opt.value ? "text-blue-600 dark:text-blue-400 bg-blue-50/50 dark:bg-blue-900/10" : "text-gray-900 dark:text-white"}`));
763
+ }), _el$151, _co$32);
764
+ web.effect(() => web.className(_el$146, `w-full text-left px-2 py-1.5 text-sm rounded hover:bg-blue-50 dark:hover:bg-blue-900/20 ${String(value()) === opt.value ? "text-blue-600 dark:text-blue-400 bg-blue-50/50 dark:bg-blue-900/10" : "text-gray-900 dark:text-white"}`));
684
765
  web.runHydrationEvents();
685
- return _el$129;
766
+ return _el$146;
686
767
  })()
687
768
  }));
688
- return _el$115;
769
+ return _el$132;
689
770
  })(), (() => {
690
- var _el$116 = web.getNextElement(_tmpl$31);
691
- _el$116.$$click = () => setEditingKey(null);
771
+ var _el$133 = web.getNextElement(_tmpl$32);
772
+ _el$133.$$click = () => setEditingKey(null);
692
773
  web.runHydrationEvents();
693
- return _el$116;
774
+ return _el$133;
694
775
  })()];
695
776
  }
696
777
  }));
697
- return _el$114;
778
+ return _el$131;
698
779
  }
699
- }), _el$120, _co$23);
700
- return _el$101;
780
+ }), _el$137, _co$29);
781
+ return _el$118;
701
782
  })();
702
783
  }
703
- }), _el$98, _co$17);
704
- web.insert(_el$95, web.createComponent(solidJs.Show, {
784
+ }), _el$115, _co$23);
785
+ web.insert(_el$112, web.createComponent(solidJs.Show, {
705
786
  get when() {
706
787
  return allKeys().length === 0;
707
788
  },
708
789
  get children() {
709
- return web.getNextElement(_tmpl$26);
790
+ return web.getNextElement(_tmpl$27);
710
791
  }
711
- }), _el$100, _co$18);
712
- return _el$95;
792
+ }), _el$117, _co$24);
793
+ return _el$112;
713
794
  })();
714
795
  };
715
796
  const EmbeddedFormSection = (props) => {
@@ -775,9 +856,9 @@ const EmbeddedFormSection = (props) => {
775
856
  }
776
857
  };
777
858
  return (() => {
778
- var _el$135 = web.getNextElement(_tmpl$38), _el$138 = _el$135.firstChild, [_el$139, _co$27] = web.getNextMarker(_el$138.nextSibling), _el$136 = _el$139.nextSibling, _el$137 = _el$136.firstChild;
779
- _el$135.addEventListener("submit", handleSubmit);
780
- web.insert(_el$135, web.createComponent(solidJs.For, {
859
+ var _el$152 = web.getNextElement(_tmpl$39), _el$155 = _el$152.firstChild, [_el$156, _co$33] = web.getNextMarker(_el$155.nextSibling), _el$153 = _el$156.nextSibling, _el$154 = _el$153.firstChild;
860
+ _el$152.addEventListener("submit", handleSubmit);
861
+ web.insert(_el$152, web.createComponent(solidJs.For, {
781
862
  get each() {
782
863
  return config().fields;
783
864
  },
@@ -791,9 +872,9 @@ const EmbeddedFormSection = (props) => {
791
872
  onChange: (val) => updateField(field.name, val),
792
873
  formData
793
874
  })
794
- }), _el$139, _co$27);
795
- web.insert(_el$137, () => config().submitLabel);
796
- return _el$135;
875
+ }), _el$156, _co$33);
876
+ web.insert(_el$154, () => config().submitLabel);
877
+ return _el$152;
797
878
  })();
798
879
  };
799
880
  const EnrichedStepsSection = (props) => {
@@ -805,35 +886,35 @@ const EnrichedStepsSection = (props) => {
805
886
  };
806
887
  };
807
888
  return (() => {
808
- var _el$140 = web.getNextElement(_tmpl$40), _el$143 = _el$140.firstChild, [_el$144, _co$28] = web.getNextMarker(_el$143.nextSibling), _el$145 = _el$144.nextSibling, [_el$146, _co$29] = web.getNextMarker(_el$145.nextSibling);
809
- web.insert(_el$140, web.createComponent(solidJs.For, {
889
+ var _el$157 = web.getNextElement(_tmpl$41), _el$160 = _el$157.firstChild, [_el$161, _co$34] = web.getNextMarker(_el$160.nextSibling), _el$162 = _el$161.nextSibling, [_el$163, _co$35] = web.getNextMarker(_el$162.nextSibling);
890
+ web.insert(_el$157, web.createComponent(solidJs.For, {
810
891
  get each() {
811
892
  return stepsData().steps;
812
893
  },
813
894
  children: (step) => (() => {
814
- var _el$147 = web.getNextElement(_tmpl$43), _el$148 = _el$147.firstChild, _el$149 = _el$148.firstChild, _el$154 = _el$149.nextSibling, [_el$155, _co$31] = web.getNextMarker(_el$154.nextSibling), _el$156 = _el$155.nextSibling, [_el$157, _co$32] = web.getNextMarker(_el$156.nextSibling), _el$159 = _el$148.nextSibling, [_el$160, _co$33] = web.getNextMarker(_el$159.nextSibling);
815
- web.insert(_el$149, (() => {
895
+ var _el$164 = web.getNextElement(_tmpl$44), _el$165 = _el$164.firstChild, _el$166 = _el$165.firstChild, _el$171 = _el$166.nextSibling, [_el$172, _co$37] = web.getNextMarker(_el$171.nextSibling), _el$173 = _el$172.nextSibling, [_el$174, _co$38] = web.getNextMarker(_el$173.nextSibling), _el$176 = _el$165.nextSibling, [_el$177, _co$39] = web.getNextMarker(_el$176.nextSibling);
896
+ web.insert(_el$166, (() => {
816
897
  var _c$5 = web.memo(() => step.status === "done");
817
898
  return () => _c$5() ? "✅" : step.status === "active" ? "●" : "○";
818
899
  })());
819
- web.insert(_el$148, () => step.label, _el$155, _co$31);
820
- web.insert(_el$148, web.createComponent(solidJs.Show, {
900
+ web.insert(_el$165, () => step.label, _el$172, _co$37);
901
+ web.insert(_el$165, web.createComponent(solidJs.Show, {
821
902
  get when() {
822
903
  return web.memo(() => !!step.description)() && step.status === "active";
823
904
  },
824
905
  get children() {
825
- var _el$150 = web.getNextElement(_tmpl$41), _el$151 = _el$150.firstChild, _el$152 = _el$151.nextSibling, [_el$153, _co$30] = web.getNextMarker(_el$152.nextSibling);
826
- web.insert(_el$150, () => step.description, _el$153, _co$30);
827
- return _el$150;
906
+ var _el$167 = web.getNextElement(_tmpl$42), _el$168 = _el$167.firstChild, _el$169 = _el$168.nextSibling, [_el$170, _co$36] = web.getNextMarker(_el$169.nextSibling);
907
+ web.insert(_el$167, () => step.description, _el$170, _co$36);
908
+ return _el$167;
828
909
  }
829
- }), _el$157, _co$32);
830
- web.insert(_el$147, web.createComponent(solidJs.Show, {
910
+ }), _el$174, _co$38);
911
+ web.insert(_el$164, web.createComponent(solidJs.Show, {
831
912
  get when() {
832
913
  return web.memo(() => step.status === "active")() && step.content;
833
914
  },
834
915
  get children() {
835
- var _el$158 = web.getNextElement(_tmpl$42);
836
- web.insert(_el$158, web.createComponent(SectionRenderer, {
916
+ var _el$175 = web.getNextElement(_tmpl$43);
917
+ web.insert(_el$175, web.createComponent(SectionRenderer, {
837
918
  get section() {
838
919
  return step.content;
839
920
  },
@@ -845,71 +926,71 @@ const EnrichedStepsSection = (props) => {
845
926
  return props.onAction;
846
927
  }
847
928
  }));
848
- return _el$158;
929
+ return _el$175;
849
930
  }
850
- }), _el$160, _co$33);
931
+ }), _el$177, _co$39);
851
932
  web.effect((_p$) => {
852
933
  var _v$4 = `rounded-lg ${step.status === "active" ? "bg-blue-50/50 dark:bg-blue-900/10 border border-blue-200 dark:border-blue-800 p-3" : "px-1"}`, _v$5 = `flex items-center gap-2 text-sm font-medium ${step.status === "done" ? "text-green-600 dark:text-green-400" : step.status === "active" ? "text-blue-600 dark:text-blue-400" : "text-gray-400"}`;
853
- _v$4 !== _p$.e && web.className(_el$147, _p$.e = _v$4);
854
- _v$5 !== _p$.t && web.className(_el$148, _p$.t = _v$5);
934
+ _v$4 !== _p$.e && web.className(_el$164, _p$.e = _v$4);
935
+ _v$5 !== _p$.t && web.className(_el$165, _p$.t = _v$5);
855
936
  return _p$;
856
937
  }, {
857
938
  e: void 0,
858
939
  t: void 0
859
940
  });
860
- return _el$147;
941
+ return _el$164;
861
942
  })()
862
- }), _el$144, _co$28);
863
- web.insert(_el$140, web.createComponent(solidJs.Show, {
943
+ }), _el$161, _co$34);
944
+ web.insert(_el$157, web.createComponent(solidJs.Show, {
864
945
  get when() {
865
946
  return stepsData().steps.some((s) => s.status === "active");
866
947
  },
867
948
  get children() {
868
- var _el$141 = web.getNextElement(_tmpl$39), _el$142 = _el$141.firstChild;
869
- _el$142.$$click = () => {
949
+ var _el$158 = web.getNextElement(_tmpl$40), _el$159 = _el$158.firstChild;
950
+ _el$159.$$click = () => {
870
951
  var _a;
871
952
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "next_step", {
872
953
  step: stepsData().currentStep
873
954
  });
874
955
  };
875
956
  web.runHydrationEvents();
876
- return _el$141;
957
+ return _el$158;
877
958
  }
878
- }), _el$146, _co$29);
879
- return _el$140;
959
+ }), _el$163, _co$35);
960
+ return _el$157;
880
961
  })();
881
962
  };
882
963
  const ActionSection = (props) => {
883
964
  const actions = () => Array.isArray(props.content) ? props.content : [];
884
965
  return (() => {
885
- var _el$161 = web.getNextElement(_tmpl$44);
886
- web.insert(_el$161, web.createComponent(solidJs.For, {
966
+ var _el$178 = web.getNextElement(_tmpl$45);
967
+ web.insert(_el$178, web.createComponent(solidJs.For, {
887
968
  get each() {
888
969
  return actions();
889
970
  },
890
971
  children: (item) => (() => {
891
- var _el$162 = web.getNextElement(_tmpl$37), _el$164 = _el$162.firstChild, [_el$165, _co$34] = web.getNextMarker(_el$164.nextSibling), _el$166 = _el$165.nextSibling, [_el$167, _co$35] = web.getNextMarker(_el$166.nextSibling);
892
- _el$162.$$click = () => {
972
+ var _el$179 = web.getNextElement(_tmpl$38), _el$181 = _el$179.firstChild, [_el$182, _co$40] = web.getNextMarker(_el$181.nextSibling), _el$183 = _el$182.nextSibling, [_el$184, _co$41] = web.getNextMarker(_el$183.nextSibling);
973
+ _el$179.$$click = () => {
893
974
  var _a;
894
975
  return (_a = props.onAction) == null ? void 0 : _a.call(props, item.value || item.action || item.label, item);
895
976
  };
896
- web.insert(_el$162, web.createComponent(solidJs.Show, {
977
+ web.insert(_el$179, web.createComponent(solidJs.Show, {
897
978
  get when() {
898
979
  return item.icon;
899
980
  },
900
981
  get children() {
901
- var _el$163 = web.getNextElement(_tmpl$45);
902
- web.insert(_el$163, () => item.icon);
903
- return _el$163;
982
+ var _el$180 = web.getNextElement(_tmpl$46);
983
+ web.insert(_el$180, () => item.icon);
984
+ return _el$180;
904
985
  }
905
- }), _el$165, _co$34);
906
- web.insert(_el$162, () => item.label, _el$167, _co$35);
907
- web.effect(() => web.className(_el$162, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${item.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : item.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
986
+ }), _el$182, _co$40);
987
+ web.insert(_el$179, () => item.label, _el$184, _co$41);
988
+ web.effect(() => web.className(_el$179, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors ${item.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : item.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
908
989
  web.runHydrationEvents();
909
- return _el$162;
990
+ return _el$179;
910
991
  })()
911
992
  }));
912
- return _el$161;
993
+ return _el$178;
913
994
  })();
914
995
  };
915
996
  const UnderstandingSection = (props) => {
@@ -933,39 +1014,39 @@ const UnderstandingSection = (props) => {
933
1014
  }
934
1015
  };
935
1016
  return (() => {
936
- var _el$168 = web.getNextElement(_tmpl$46), _el$169 = _el$168.firstChild, _el$171 = _el$169.nextSibling, [_el$172, _co$36] = web.getNextMarker(_el$171.nextSibling);
937
- web.insert(_el$169, web.createComponent(solidJs.For, {
1017
+ var _el$185 = web.getNextElement(_tmpl$47), _el$186 = _el$185.firstChild, _el$188 = _el$186.nextSibling, [_el$189, _co$42] = web.getNextMarker(_el$188.nextSibling);
1018
+ web.insert(_el$186, web.createComponent(solidJs.For, {
938
1019
  get each() {
939
1020
  return data().detections;
940
1021
  },
941
1022
  children: (det) => (() => {
942
- var _el$173 = web.getNextElement(_tmpl$47), _el$174 = _el$173.firstChild, _el$175 = _el$174.nextSibling;
943
- web.insert(_el$174, () => det.label);
944
- web.insert(_el$175, () => det.value);
945
- web.effect(() => web.className(_el$174, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
946
- return _el$173;
1023
+ var _el$190 = web.getNextElement(_tmpl$48), _el$191 = _el$190.firstChild, _el$192 = _el$191.nextSibling;
1024
+ web.insert(_el$191, () => det.label);
1025
+ web.insert(_el$192, () => det.value);
1026
+ web.effect(() => web.className(_el$191, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
1027
+ return _el$190;
947
1028
  })()
948
1029
  }));
949
- web.insert(_el$168, web.createComponent(solidJs.Show, {
1030
+ web.insert(_el$185, web.createComponent(solidJs.Show, {
950
1031
  get when() {
951
1032
  return data().warnings.length > 0;
952
1033
  },
953
1034
  get children() {
954
- var _el$170 = web.getNextElement(_tmpl$24);
955
- web.insert(_el$170, web.createComponent(solidJs.For, {
1035
+ var _el$187 = web.getNextElement(_tmpl$25);
1036
+ web.insert(_el$187, web.createComponent(solidJs.For, {
956
1037
  get each() {
957
1038
  return data().warnings;
958
1039
  },
959
1040
  children: (w) => (() => {
960
- var _el$176 = web.getNextElement(_tmpl$48), _el$177 = _el$176.firstChild, _el$178 = _el$177.nextSibling;
961
- web.insert(_el$178, w);
962
- return _el$176;
1041
+ var _el$193 = web.getNextElement(_tmpl$49), _el$194 = _el$193.firstChild, _el$195 = _el$194.nextSibling;
1042
+ web.insert(_el$195, w);
1043
+ return _el$193;
963
1044
  })()
964
1045
  }));
965
- return _el$170;
1046
+ return _el$187;
966
1047
  }
967
- }), _el$172, _co$36);
968
- return _el$168;
1048
+ }), _el$189, _co$42);
1049
+ return _el$185;
969
1050
  })();
970
1051
  };
971
1052
  const FeedbackSection = (props) => {
@@ -1003,39 +1084,39 @@ const FeedbackSection = (props) => {
1003
1084
  });
1004
1085
  };
1005
1086
  return (() => {
1006
- var _el$179 = web.getNextElement(_tmpl$50), _el$180 = _el$179.firstChild, _el$181 = _el$180.nextSibling, _el$185 = _el$181.nextSibling, [_el$186, _co$37] = web.getNextMarker(_el$185.nextSibling);
1007
- web.insert(_el$180, () => data().question);
1008
- web.insert(_el$181, web.createComponent(solidJs.For, {
1087
+ var _el$196 = web.getNextElement(_tmpl$51), _el$197 = _el$196.firstChild, _el$198 = _el$197.nextSibling, _el$202 = _el$198.nextSibling, [_el$203, _co$43] = web.getNextMarker(_el$202.nextSibling);
1088
+ web.insert(_el$197, () => data().question);
1089
+ web.insert(_el$198, web.createComponent(solidJs.For, {
1009
1090
  get each() {
1010
1091
  return data().options;
1011
1092
  },
1012
1093
  children: (option) => (() => {
1013
- var _el$187 = web.getNextElement(_tmpl$37), _el$189 = _el$187.firstChild, [_el$190, _co$38] = web.getNextMarker(_el$189.nextSibling), _el$191 = _el$190.nextSibling, [_el$192, _co$39] = web.getNextMarker(_el$191.nextSibling);
1014
- _el$187.$$click = () => handleOption(option);
1015
- web.insert(_el$187, web.createComponent(solidJs.Show, {
1094
+ var _el$204 = web.getNextElement(_tmpl$38), _el$206 = _el$204.firstChild, [_el$207, _co$44] = web.getNextMarker(_el$206.nextSibling), _el$208 = _el$207.nextSibling, [_el$209, _co$45] = web.getNextMarker(_el$208.nextSibling);
1095
+ _el$204.$$click = () => handleOption(option);
1096
+ web.insert(_el$204, web.createComponent(solidJs.Show, {
1016
1097
  get when() {
1017
1098
  return option.icon;
1018
1099
  },
1019
1100
  get children() {
1020
- var _el$188 = web.getNextElement(_tmpl$51);
1021
- web.insert(_el$188, () => option.icon);
1022
- return _el$188;
1101
+ var _el$205 = web.getNextElement(_tmpl$52);
1102
+ web.insert(_el$205, () => option.icon);
1103
+ return _el$205;
1023
1104
  }
1024
- }), _el$190, _co$38);
1025
- web.insert(_el$187, () => option.label, _el$192, _co$39);
1026
- web.effect(() => web.className(_el$187, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors flex items-center gap-1 ${option.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : option.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
1105
+ }), _el$207, _co$44);
1106
+ web.insert(_el$204, () => option.label, _el$209, _co$45);
1107
+ web.effect(() => web.className(_el$204, `px-3 py-1.5 text-sm font-medium rounded-lg transition-colors flex items-center gap-1 ${option.variant === "primary" ? "bg-blue-600 text-white hover:bg-blue-700" : option.variant === "danger" ? "bg-red-600 text-white hover:bg-red-700" : "border border-gray-200 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-gray-700"}`));
1027
1108
  web.runHydrationEvents();
1028
- return _el$187;
1109
+ return _el$204;
1029
1110
  })()
1030
1111
  }));
1031
- web.insert(_el$179, web.createComponent(solidJs.Show, {
1112
+ web.insert(_el$196, web.createComponent(solidJs.Show, {
1032
1113
  get when() {
1033
1114
  return data().allowFreeText || showComment();
1034
1115
  },
1035
1116
  get children() {
1036
- var _el$182 = web.getNextElement(_tmpl$49), _el$183 = _el$182.firstChild, _el$184 = _el$183.nextSibling;
1037
- _el$183.$$input = (e) => setComment(e.currentTarget.value);
1038
- _el$184.$$click = () => {
1117
+ var _el$199 = web.getNextElement(_tmpl$50), _el$200 = _el$199.firstChild, _el$201 = _el$200.nextSibling;
1118
+ _el$200.$$input = (e) => setComment(e.currentTarget.value);
1119
+ _el$201.$$click = () => {
1039
1120
  var _a;
1040
1121
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", {
1041
1122
  option: "comment",
@@ -1044,19 +1125,19 @@ const FeedbackSection = (props) => {
1044
1125
  };
1045
1126
  web.effect((_p$) => {
1046
1127
  var _v$6 = data().placeholder, _v$7 = showComment();
1047
- _v$6 !== _p$.e && web.setAttribute(_el$183, "placeholder", _p$.e = _v$6);
1048
- _v$7 !== _p$.t && web.setProperty(_el$183, "autofocus", _p$.t = _v$7);
1128
+ _v$6 !== _p$.e && web.setAttribute(_el$200, "placeholder", _p$.e = _v$6);
1129
+ _v$7 !== _p$.t && web.setProperty(_el$200, "autofocus", _p$.t = _v$7);
1049
1130
  return _p$;
1050
1131
  }, {
1051
1132
  e: void 0,
1052
1133
  t: void 0
1053
1134
  });
1054
- web.effect(() => web.setProperty(_el$183, "value", comment()));
1135
+ web.effect(() => web.setProperty(_el$200, "value", comment()));
1055
1136
  web.runHydrationEvents();
1056
- return _el$182;
1137
+ return _el$199;
1057
1138
  }
1058
- }), _el$186, _co$37);
1059
- return _el$179;
1139
+ }), _el$203, _co$43);
1140
+ return _el$196;
1060
1141
  })();
1061
1142
  };
1062
1143
  const PromptSection = (props) => {
@@ -1071,56 +1152,56 @@ const PromptSection = (props) => {
1071
1152
  };
1072
1153
  };
1073
1154
  return (() => {
1074
- var _el$193 = web.getNextElement(_tmpl$55), _el$206 = _el$193.firstChild, [_el$207, _co$42] = web.getNextMarker(_el$206.nextSibling), _el$199 = _el$207.nextSibling, _el$208 = _el$199.nextSibling, [_el$209, _co$43] = web.getNextMarker(_el$208.nextSibling), _el$210 = _el$209.nextSibling, [_el$211, _co$44] = web.getNextMarker(_el$210.nextSibling);
1075
- web.insert(_el$193, web.createComponent(solidJs.Show, {
1155
+ var _el$210 = web.getNextElement(_tmpl$56), _el$223 = _el$210.firstChild, [_el$224, _co$48] = web.getNextMarker(_el$223.nextSibling), _el$216 = _el$224.nextSibling, _el$225 = _el$216.nextSibling, [_el$226, _co$49] = web.getNextMarker(_el$225.nextSibling), _el$227 = _el$226.nextSibling, [_el$228, _co$50] = web.getNextMarker(_el$227.nextSibling);
1156
+ web.insert(_el$210, web.createComponent(solidJs.Show, {
1076
1157
  get when() {
1077
1158
  return data().originalQuery;
1078
1159
  },
1079
1160
  get children() {
1080
- var _el$194 = web.getNextElement(_tmpl$52), _el$195 = _el$194.firstChild, _el$197 = _el$195.nextSibling, [_el$198, _co$40] = web.getNextMarker(_el$197.nextSibling);
1081
- _el$198.nextSibling;
1082
- web.insert(_el$194, () => data().originalQuery, _el$198, _co$40);
1083
- return _el$194;
1161
+ var _el$211 = web.getNextElement(_tmpl$53), _el$212 = _el$211.firstChild, _el$214 = _el$212.nextSibling, [_el$215, _co$46] = web.getNextMarker(_el$214.nextSibling);
1162
+ _el$215.nextSibling;
1163
+ web.insert(_el$211, () => data().originalQuery, _el$215, _co$46);
1164
+ return _el$211;
1084
1165
  }
1085
- }), _el$207, _co$42);
1086
- web.insert(_el$199, web.createComponent(solidJs.For, {
1166
+ }), _el$224, _co$48);
1167
+ web.insert(_el$216, web.createComponent(solidJs.For, {
1087
1168
  get each() {
1088
1169
  return Object.entries(data().extracted);
1089
1170
  },
1090
1171
  children: ([key, value]) => (() => {
1091
- var _el$212 = web.getNextElement(_tmpl$56), _el$213 = _el$212.firstChild, _el$215 = _el$213.firstChild, [_el$216, _co$45] = web.getNextMarker(_el$215.nextSibling);
1092
- _el$216.nextSibling;
1093
- var _el$217 = _el$213.nextSibling;
1094
- web.insert(_el$213, key, _el$216, _co$45);
1095
- web.insert(_el$217, () => String(value));
1096
- return _el$212;
1172
+ var _el$229 = web.getNextElement(_tmpl$57), _el$230 = _el$229.firstChild, _el$232 = _el$230.firstChild, [_el$233, _co$51] = web.getNextMarker(_el$232.nextSibling);
1173
+ _el$233.nextSibling;
1174
+ var _el$234 = _el$230.nextSibling;
1175
+ web.insert(_el$230, key, _el$233, _co$51);
1176
+ web.insert(_el$234, () => String(value));
1177
+ return _el$229;
1097
1178
  })()
1098
1179
  }));
1099
- web.insert(_el$193, web.createComponent(solidJs.Show, {
1180
+ web.insert(_el$210, web.createComponent(solidJs.Show, {
1100
1181
  get when() {
1101
1182
  return data().plan;
1102
1183
  },
1103
1184
  get children() {
1104
- var _el$200 = web.getNextElement(_tmpl$53), _el$201 = _el$200.firstChild, _el$202 = _el$201.nextSibling, _el$203 = _el$202.nextSibling, [_el$204, _co$41] = web.getNextMarker(_el$203.nextSibling);
1105
- web.insert(_el$200, () => data().plan, _el$204, _co$41);
1106
- return _el$200;
1185
+ var _el$217 = web.getNextElement(_tmpl$54), _el$218 = _el$217.firstChild, _el$219 = _el$218.nextSibling, _el$220 = _el$219.nextSibling, [_el$221, _co$47] = web.getNextMarker(_el$220.nextSibling);
1186
+ web.insert(_el$217, () => data().plan, _el$221, _co$47);
1187
+ return _el$217;
1107
1188
  }
1108
- }), _el$209, _co$43);
1109
- web.insert(_el$193, web.createComponent(solidJs.Show, {
1189
+ }), _el$226, _co$49);
1190
+ web.insert(_el$210, web.createComponent(solidJs.Show, {
1110
1191
  get when() {
1111
1192
  return data().editable;
1112
1193
  },
1113
1194
  get children() {
1114
- var _el$205 = web.getNextElement(_tmpl$54);
1115
- _el$205.$$click = () => {
1195
+ var _el$222 = web.getNextElement(_tmpl$55);
1196
+ _el$222.$$click = () => {
1116
1197
  var _a;
1117
1198
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "edit_prompt", data());
1118
1199
  };
1119
1200
  web.runHydrationEvents();
1120
- return _el$205;
1201
+ return _el$222;
1121
1202
  }
1122
- }), _el$211, _co$44);
1123
- return _el$193;
1203
+ }), _el$228, _co$50);
1204
+ return _el$210;
1124
1205
  })();
1125
1206
  };
1126
1207
  const StepperProgressSection = (props) => {
@@ -1150,46 +1231,46 @@ const StepperProgressSection = (props) => {
1150
1231
  },
1151
1232
  get fallback() {
1152
1233
  return (() => {
1153
- var _el$219 = web.getNextElement(_tmpl$58);
1154
- web.insert(_el$219, web.createComponent(solidJs.For, {
1234
+ var _el$236 = web.getNextElement(_tmpl$59);
1235
+ web.insert(_el$236, web.createComponent(solidJs.For, {
1155
1236
  get each() {
1156
1237
  return data().steps;
1157
1238
  },
1158
1239
  children: (step) => (() => {
1159
- var _el$220 = web.getNextElement(_tmpl$61), _el$221 = _el$220.firstChild, _el$222 = _el$221.nextSibling, _el$223 = _el$222.firstChild, _el$233 = _el$223.nextSibling, [_el$234, _co$48] = web.getNextMarker(_el$233.nextSibling), _el$235 = _el$234.nextSibling, [_el$236, _co$49] = web.getNextMarker(_el$235.nextSibling);
1160
- web.insert(_el$221, () => statusIcon(step.status));
1161
- web.insert(_el$223, () => step.label);
1162
- web.insert(_el$222, web.createComponent(solidJs.Show, {
1240
+ var _el$237 = web.getNextElement(_tmpl$62), _el$238 = _el$237.firstChild, _el$239 = _el$238.nextSibling, _el$240 = _el$239.firstChild, _el$250 = _el$240.nextSibling, [_el$251, _co$54] = web.getNextMarker(_el$250.nextSibling), _el$252 = _el$251.nextSibling, [_el$253, _co$55] = web.getNextMarker(_el$252.nextSibling);
1241
+ web.insert(_el$238, () => statusIcon(step.status));
1242
+ web.insert(_el$240, () => step.label);
1243
+ web.insert(_el$239, web.createComponent(solidJs.Show, {
1163
1244
  get when() {
1164
1245
  return step.summary;
1165
1246
  },
1166
1247
  get children() {
1167
- var _el$224 = web.getNextElement(_tmpl$59), _el$225 = _el$224.firstChild, _el$226 = _el$225.nextSibling, [_el$227, _co$46] = web.getNextMarker(_el$226.nextSibling);
1168
- web.insert(_el$224, () => step.summary, _el$227, _co$46);
1169
- return _el$224;
1248
+ var _el$241 = web.getNextElement(_tmpl$60), _el$242 = _el$241.firstChild, _el$243 = _el$242.nextSibling, [_el$244, _co$52] = web.getNextMarker(_el$243.nextSibling);
1249
+ web.insert(_el$241, () => step.summary, _el$244, _co$52);
1250
+ return _el$241;
1170
1251
  }
1171
- }), _el$234, _co$48);
1172
- web.insert(_el$222, web.createComponent(solidJs.Show, {
1252
+ }), _el$251, _co$54);
1253
+ web.insert(_el$239, web.createComponent(solidJs.Show, {
1173
1254
  get when() {
1174
1255
  return step.duration_ms;
1175
1256
  },
1176
1257
  get children() {
1177
- var _el$228 = web.getNextElement(_tmpl$60), _el$229 = _el$228.firstChild, _el$231 = _el$229.nextSibling, [_el$232, _co$47] = web.getNextMarker(_el$231.nextSibling);
1178
- _el$232.nextSibling;
1179
- web.insert(_el$228, () => step.duration_ms, _el$232, _co$47);
1180
- return _el$228;
1258
+ var _el$245 = web.getNextElement(_tmpl$61), _el$246 = _el$245.firstChild, _el$248 = _el$246.nextSibling, [_el$249, _co$53] = web.getNextMarker(_el$248.nextSibling);
1259
+ _el$249.nextSibling;
1260
+ web.insert(_el$245, () => step.duration_ms, _el$249, _co$53);
1261
+ return _el$245;
1181
1262
  }
1182
- }), _el$236, _co$49);
1183
- web.effect(() => web.className(_el$220, `flex items-start gap-2 text-sm ${step.status === "active" ? "font-medium" : ""} ${step.status === "pending" ? "text-gray-400" : "text-gray-700 dark:text-gray-300"}`));
1184
- return _el$220;
1263
+ }), _el$253, _co$55);
1264
+ web.effect(() => web.className(_el$237, `flex items-start gap-2 text-sm ${step.status === "active" ? "font-medium" : ""} ${step.status === "pending" ? "text-gray-400" : "text-gray-700 dark:text-gray-300"}`));
1265
+ return _el$237;
1185
1266
  })()
1186
1267
  }));
1187
- return _el$219;
1268
+ return _el$236;
1188
1269
  })();
1189
1270
  },
1190
1271
  get children() {
1191
- var _el$218 = web.getNextElement(_tmpl$57);
1192
- web.insert(_el$218, web.createComponent(solidJs.For, {
1272
+ var _el$235 = web.getNextElement(_tmpl$58);
1273
+ web.insert(_el$235, web.createComponent(solidJs.For, {
1193
1274
  get each() {
1194
1275
  return data().steps;
1195
1276
  },
@@ -1198,30 +1279,206 @@ const StepperProgressSection = (props) => {
1198
1279
  return i() > 0;
1199
1280
  },
1200
1281
  get children() {
1201
- return web.getNextElement(_tmpl$12);
1282
+ return web.getNextElement(_tmpl$13);
1202
1283
  }
1203
1284
  }), (() => {
1204
- var _el$238 = web.getNextElement(_tmpl$63), _el$239 = _el$238.firstChild, _el$240 = _el$239.nextSibling, _el$242 = _el$240.nextSibling, [_el$243, _co$50] = web.getNextMarker(_el$242.nextSibling);
1205
- web.insert(_el$239, () => statusIcon(step.status));
1206
- web.insert(_el$240, () => step.label);
1207
- web.insert(_el$238, web.createComponent(solidJs.Show, {
1285
+ var _el$255 = web.getNextElement(_tmpl$64), _el$256 = _el$255.firstChild, _el$257 = _el$256.nextSibling, _el$259 = _el$257.nextSibling, [_el$260, _co$56] = web.getNextMarker(_el$259.nextSibling);
1286
+ web.insert(_el$256, () => statusIcon(step.status));
1287
+ web.insert(_el$257, () => step.label);
1288
+ web.insert(_el$255, web.createComponent(solidJs.Show, {
1208
1289
  get when() {
1209
1290
  return step.summary;
1210
1291
  },
1211
1292
  get children() {
1212
- var _el$241 = web.getNextElement(_tmpl$62);
1213
- web.insert(_el$241, () => step.summary);
1214
- return _el$241;
1293
+ var _el$258 = web.getNextElement(_tmpl$63);
1294
+ web.insert(_el$258, () => step.summary);
1295
+ return _el$258;
1215
1296
  }
1216
- }), _el$243, _co$50);
1217
- web.effect(() => web.className(_el$238, `flex items-center gap-1 px-2 py-1 rounded text-xs ${step.status === "done" ? "bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400" : step.status === "active" ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 font-medium" : step.status === "error" ? "bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400" : "text-gray-400"}`));
1218
- return _el$238;
1297
+ }), _el$260, _co$56);
1298
+ web.effect(() => web.className(_el$255, `flex items-center gap-1 px-2 py-1 rounded text-xs ${step.status === "done" ? "bg-green-50 dark:bg-green-900/20 text-green-700 dark:text-green-400" : step.status === "active" ? "bg-blue-50 dark:bg-blue-900/20 text-blue-700 dark:text-blue-400 font-medium" : step.status === "error" ? "bg-red-50 dark:bg-red-900/20 text-red-700 dark:text-red-400" : "text-gray-400"}`));
1299
+ return _el$255;
1219
1300
  })()]
1220
1301
  }));
1221
- return _el$218;
1302
+ return _el$235;
1222
1303
  }
1223
1304
  });
1224
1305
  };
1306
+ const ErrorSectionRenderer = (props) => {
1307
+ const [showDetails, setShowDetails] = solidJs.createSignal(false);
1308
+ const data = () => {
1309
+ const c = props.content;
1310
+ return {
1311
+ message: (c == null ? void 0 : c.message) || "Error",
1312
+ severity: (c == null ? void 0 : c.severity) || "error",
1313
+ retryAction: c == null ? void 0 : c.retryAction,
1314
+ retryLabel: (c == null ? void 0 : c.retryLabel) || "Retry",
1315
+ details: c == null ? void 0 : c.details,
1316
+ timestamp: c == null ? void 0 : c.timestamp
1317
+ };
1318
+ };
1319
+ const isWarning = () => data().severity === "warning";
1320
+ return (() => {
1321
+ var _el$261 = web.getNextElement(_tmpl$68), _el$262 = _el$261.firstChild, _el$263 = _el$262.firstChild, _el$264 = _el$263.nextSibling, _el$265 = _el$264.firstChild, _el$266 = _el$265.nextSibling, _el$272 = _el$266.firstChild, [_el$273, _co$58] = web.getNextMarker(_el$272.nextSibling), _el$274 = _el$273.nextSibling, [_el$275, _co$59] = web.getNextMarker(_el$274.nextSibling), _el$277 = _el$266.nextSibling, [_el$278, _co$60] = web.getNextMarker(_el$277.nextSibling);
1322
+ web.insert(_el$263, () => isWarning() ? "⚠️" : "❌");
1323
+ web.insert(_el$265, () => data().message);
1324
+ web.insert(_el$266, web.createComponent(solidJs.Show, {
1325
+ get when() {
1326
+ return data().retryAction;
1327
+ },
1328
+ get children() {
1329
+ var _el$267 = web.getNextElement(_tmpl$65), _el$268 = _el$267.firstChild, _el$269 = _el$268.nextSibling, [_el$270, _co$57] = web.getNextMarker(_el$269.nextSibling);
1330
+ _el$267.$$click = () => {
1331
+ var _a;
1332
+ return (_a = props.onAction) == null ? void 0 : _a.call(props, data().retryAction);
1333
+ };
1334
+ web.insert(_el$267, () => data().retryLabel, _el$270, _co$57);
1335
+ web.effect(() => web.className(_el$267, `px-2 py-1 text-xs font-medium rounded ${isWarning() ? "bg-amber-600 text-white hover:bg-amber-700" : "bg-red-600 text-white hover:bg-red-700"} transition-colors`));
1336
+ web.runHydrationEvents();
1337
+ return _el$267;
1338
+ }
1339
+ }), _el$273, _co$58);
1340
+ web.insert(_el$266, web.createComponent(solidJs.Show, {
1341
+ get when() {
1342
+ return data().details;
1343
+ },
1344
+ get children() {
1345
+ var _el$271 = web.getNextElement(_tmpl$66);
1346
+ _el$271.$$click = () => setShowDetails(!showDetails());
1347
+ web.runHydrationEvents();
1348
+ return _el$271;
1349
+ }
1350
+ }), _el$275, _co$59);
1351
+ web.insert(_el$264, web.createComponent(solidJs.Show, {
1352
+ get when() {
1353
+ return web.memo(() => !!showDetails())() && data().details;
1354
+ },
1355
+ get children() {
1356
+ var _el$276 = web.getNextElement(_tmpl$67);
1357
+ web.insert(_el$276, () => data().details);
1358
+ return _el$276;
1359
+ }
1360
+ }), _el$278, _co$60);
1361
+ web.effect(() => web.className(_el$261, `rounded-lg px-3 py-2 text-sm ${isWarning() ? "bg-amber-50 dark:bg-amber-900/10 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-800" : "bg-red-50 dark:bg-red-900/10 text-red-700 dark:text-red-400 border border-red-200 dark:border-red-800"}`));
1362
+ return _el$261;
1363
+ })();
1364
+ };
1365
+ const SourceCardSection = (props) => {
1366
+ const data = () => {
1367
+ const c = props.content;
1368
+ return {
1369
+ name: (c == null ? void 0 : c.name) || "Source",
1370
+ status: (c == null ? void 0 : c.status) || "available",
1371
+ capabilities: (c == null ? void 0 : c.capabilities) || [],
1372
+ latency_ms: c == null ? void 0 : c.latency_ms,
1373
+ freshness: c == null ? void 0 : c.freshness,
1374
+ row_count: c == null ? void 0 : c.row_count
1375
+ };
1376
+ };
1377
+ const statusIcon = () => ({
1378
+ queried: "✅",
1379
+ available: "📦",
1380
+ error: "❌"
1381
+ })[data().status] || "📦";
1382
+ return (() => {
1383
+ var _el$279 = web.getNextElement(_tmpl$71), _el$280 = _el$279.firstChild, _el$281 = _el$280.firstChild, _el$283 = _el$281.firstChild, [_el$284, _co$61] = web.getNextMarker(_el$283.nextSibling), _el$282 = _el$284.nextSibling, _el$285 = _el$282.nextSibling, [_el$286, _co$62] = web.getNextMarker(_el$285.nextSibling), _el$291 = _el$281.nextSibling, [_el$292, _co$64] = web.getNextMarker(_el$291.nextSibling), _el$293 = _el$280.nextSibling, _el$295 = _el$293.nextSibling, [_el$296, _co$65] = web.getNextMarker(_el$295.nextSibling);
1384
+ web.insert(_el$281, statusIcon, _el$284, _co$61);
1385
+ web.insert(_el$281, () => data().name, _el$286, _co$62);
1386
+ web.insert(_el$280, web.createComponent(solidJs.Show, {
1387
+ get when() {
1388
+ return data().row_count !== void 0;
1389
+ },
1390
+ get children() {
1391
+ var _el$287 = web.getNextElement(_tmpl$69), _el$289 = _el$287.firstChild, [_el$290, _co$63] = web.getNextMarker(_el$289.nextSibling);
1392
+ _el$290.nextSibling;
1393
+ web.insert(_el$287, () => {
1394
+ var _a;
1395
+ return (_a = data().row_count) == null ? void 0 : _a.toLocaleString();
1396
+ }, _el$290, _co$63);
1397
+ return _el$287;
1398
+ }
1399
+ }), _el$292, _co$64);
1400
+ web.insert(_el$293, web.createComponent(solidJs.For, {
1401
+ get each() {
1402
+ return data().capabilities;
1403
+ },
1404
+ children: (cap) => (() => {
1405
+ var _el$297 = web.getNextElement(_tmpl$72), _el$299 = _el$297.firstChild, [_el$300, _co$66] = web.getNextMarker(_el$299.nextSibling), _el$298 = _el$300.nextSibling, _el$301 = _el$298.nextSibling, [_el$302, _co$67] = web.getNextMarker(_el$301.nextSibling);
1406
+ web.insert(_el$297, () => cap.supported ? "✅" : "❌", _el$300, _co$66);
1407
+ web.insert(_el$297, () => cap.label, _el$302, _co$67);
1408
+ web.effect(() => web.className(_el$297, `text-[10px] px-1.5 py-0.5 rounded ${cap.supported ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400" : "bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400"}`));
1409
+ return _el$297;
1410
+ })()
1411
+ }));
1412
+ web.insert(_el$279, web.createComponent(solidJs.Show, {
1413
+ get when() {
1414
+ return data().freshness || data().latency_ms;
1415
+ },
1416
+ get children() {
1417
+ var _el$294 = web.getNextElement(_tmpl$70);
1418
+ web.insert(_el$294, () => [data().freshness, data().latency_ms ? `${data().latency_ms}ms` : ""].filter(Boolean).join(" · "));
1419
+ return _el$294;
1420
+ }
1421
+ }), _el$296, _co$65);
1422
+ return _el$279;
1423
+ })();
1424
+ };
1425
+ const DiffSection = (props) => {
1426
+ const data = () => {
1427
+ const c = props.content;
1428
+ return {
1429
+ left: (c == null ? void 0 : c.left) || {
1430
+ label: "A",
1431
+ rows: []
1432
+ },
1433
+ right: (c == null ? void 0 : c.right) || {
1434
+ label: "B",
1435
+ rows: []
1436
+ },
1437
+ highlight: (c == null ? void 0 : c.highlight_columns) || []
1438
+ };
1439
+ };
1440
+ const allKeys = () => {
1441
+ const l = data().left.rows[0] || {};
1442
+ const r = data().right.rows[0] || {};
1443
+ return [.../* @__PURE__ */ new Set([...Object.keys(l), ...Object.keys(r)])];
1444
+ };
1445
+ return (() => {
1446
+ var _el$303 = web.getNextElement(_tmpl$73), _el$304 = _el$303.firstChild, _el$305 = _el$304.firstChild, _el$306 = _el$305.firstChild, _el$307 = _el$306.firstChild, _el$308 = _el$307.nextSibling, _el$309 = _el$308.nextSibling, _el$310 = _el$305.nextSibling;
1447
+ web.insert(_el$308, () => data().left.label);
1448
+ web.insert(_el$309, () => data().right.label);
1449
+ web.insert(_el$310, web.createComponent(solidJs.For, {
1450
+ get each() {
1451
+ return allKeys();
1452
+ },
1453
+ children: (key) => {
1454
+ const lVal = () => {
1455
+ var _a;
1456
+ return (_a = data().left.rows[0]) == null ? void 0 : _a[key];
1457
+ };
1458
+ const rVal = () => {
1459
+ var _a;
1460
+ return (_a = data().right.rows[0]) == null ? void 0 : _a[key];
1461
+ };
1462
+ const isDiff = () => String(lVal()) !== String(rVal()) && data().highlight.includes(key);
1463
+ return (() => {
1464
+ var _el$311 = web.getNextElement(_tmpl$74), _el$312 = _el$311.firstChild, _el$313 = _el$312.nextSibling, _el$314 = _el$313.nextSibling;
1465
+ web.insert(_el$312, key);
1466
+ web.insert(_el$313, (() => {
1467
+ var _c$6 = web.memo(() => lVal() !== void 0);
1468
+ return () => _c$6() ? String(lVal()) : "—";
1469
+ })());
1470
+ web.insert(_el$314, (() => {
1471
+ var _c$7 = web.memo(() => rVal() !== void 0);
1472
+ return () => _c$7() ? String(rVal()) : "—";
1473
+ })());
1474
+ web.effect(() => web.className(_el$311, `border-t border-gray-100 dark:border-gray-700 ${isDiff() ? "bg-yellow-50 dark:bg-yellow-900/10" : ""}`));
1475
+ return _el$311;
1476
+ })();
1477
+ }
1478
+ }));
1479
+ return _el$303;
1480
+ })();
1481
+ };
1225
1482
  web.delegateEvents(["click", "input"]);
1226
1483
  exports.ScratchpadPanel = ScratchpadPanel;
1227
1484
  //# sourceMappingURL=ScratchpadPanel.cjs.map