@seed-ship/mcp-ui-solid 2.10.3 → 2.12.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(`<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$8 = /* @__PURE__ */ web.template(`<div style=overflow-y:auto><!$><!/><div class="divide-y divide-gray-100 dark:divide-gray-700"></div><!$><!/><!$><!/><!$><!/>`), _tmpl$9 = /* @__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 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$0 = /* @__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$1 = /* @__PURE__ */ web.template(`<span class="ml-1 font-normal opacity-75">— <!$><!/>`), _tmpl$10 = /* @__PURE__ */ web.template(`<span><!$><!/> <!$><!/><!$><!/>`), _tmpl$11 = /* @__PURE__ */ web.template(`<div><span class="flex-shrink-0 mt-0.5"></span><p>`), _tmpl$12 = /* @__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$13 = /* @__PURE__ */ web.template(`<p class="text-sm text-gray-700 dark:text-gray-300">`), _tmpl$14 = /* @__PURE__ */ web.template(`<div class="mt-2 overflow-x-auto"><table class="min-w-full text-xs"><thead><tr></tr></thead><tbody>`), _tmpl$15 = /* @__PURE__ */ web.template(`<th class="px-2 py-1 text-left font-medium text-gray-500 dark:text-gray-400">`), _tmpl$16 = /* @__PURE__ */ web.template(`<tr class="border-t border-gray-100 dark:border-gray-700">`), _tmpl$17 = /* @__PURE__ */ web.template(`<td class="px-2 py-1 text-gray-700 dark:text-gray-300">`), _tmpl$18 = /* @__PURE__ */ web.template(`<pre class="text-xs text-gray-500 overflow-auto">`), _tmpl$19 = /* @__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$20 = /* @__PURE__ */ web.template(`<div class=space-y-1>`), _tmpl$21 = /* @__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$22 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-400 italic">No filters`), _tmpl$23 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-1.5"><!$><!/><!$><!/>`), _tmpl$24 = /* @__PURE__ */ web.template(`<button type=button class="ml-0.5 hover:text-blue-900 dark:hover:text-blue-100">&times;`), _tmpl$25 = /* @__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$26 = /* @__PURE__ */ web.template(`<div class="max-h-48 overflow-y-auto">`), _tmpl$27 = /* @__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$28 = /* @__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$29 = /* @__PURE__ */ web.template(`<div class=relative><!$><!/><!$><!/>`), _tmpl$30 = /* @__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$31 = /* @__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$32 = /* @__PURE__ */ web.template(`<span class=ml-1>✓`), _tmpl$33 = /* @__PURE__ */ web.template(`<button type=button><!$><!/><!$><!/>`), _tmpl$34 = /* @__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$35 = /* @__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$36 = /* @__PURE__ */ web.template(`<div class=space-y-3><!$><!/><!$><!/>`), _tmpl$37 = /* @__PURE__ */ web.template(`<span class="text-xs font-normal text-gray-500 dark:text-gray-400">— <!$><!/>`), _tmpl$38 = /* @__PURE__ */ web.template(`<div class="mt-2 ml-6">`), _tmpl$39 = /* @__PURE__ */ web.template(`<div><div><span></span><!$><!/><!$><!/></div><!$><!/>`), _tmpl$40 = /* @__PURE__ */ web.template(`<div class="flex flex-wrap gap-2">`), _tmpl$41 = /* @__PURE__ */ web.template(`<span class=mr-1>`), _tmpl$42 = /* @__PURE__ */ web.template(`<div class=space-y-2><div class=space-y-1.5></div><!$><!/>`), _tmpl$43 = /* @__PURE__ */ web.template(`<div class="flex items-center gap-2 text-sm"><span></span><span class="text-gray-900 dark:text-white">`), _tmpl$44 = /* @__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$45 = /* @__PURE__ */ web.template(`<input type=text class="w-full 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">`), _tmpl$46 = /* @__PURE__ */ web.template(`<div class=space-y-3><p class="text-sm text-gray-700 dark:text-gray-300"></p><div class="flex gap-2"><button type=button class="px-3 py-1.5 text-sm font-medium rounded-lg bg-green-600 text-white hover:bg-green-700 transition-colors flex items-center gap-1">&#128077; <!$><!/></button><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 flex items-center gap-1">&#128078; <!$><!/></button></div><!$><!/>`), _tmpl$47 = /* @__PURE__ */ web.template(`<p class="text-xs text-gray-500 dark:text-gray-400 italic">"<!$><!/>"`), _tmpl$48 = /* @__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$49 = /* @__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$50 = /* @__PURE__ */ web.template(`<div class=space-y-2><!$><!/><div class=space-y-1></div><!$><!/><!$><!/>`), _tmpl$51 = /* @__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">`);
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">`);
9
9
  const STATUS_BADGES = {
10
10
  loading: {
11
11
  label: "Loading...",
@@ -26,6 +26,10 @@ const STATUS_BADGES = {
26
26
  complete: {
27
27
  label: "Complete",
28
28
  class: "bg-green-100 text-green-600 dark:bg-green-900/30 dark:text-green-400"
29
+ },
30
+ error: {
31
+ label: "Error",
32
+ class: "bg-red-100 text-red-600 dark:bg-red-900/30 dark:text-red-400"
29
33
  }
30
34
  };
31
35
  const ScratchpadPanel = (props) => {
@@ -55,9 +59,10 @@ const ScratchpadPanel = (props) => {
55
59
  previewTimer = setTimeout(async () => {
56
60
  try {
57
61
  const res = await fetch(endpoint, {
58
- method: "POST",
62
+ method: props.state.previewMethod || "POST",
59
63
  headers: {
60
- "Content-Type": "application/json"
64
+ "Content-Type": "application/json",
65
+ ...props.state.previewHeaders
61
66
  },
62
67
  credentials: "include",
63
68
  body: JSON.stringify({
@@ -73,8 +78,8 @@ const ScratchpadPanel = (props) => {
73
78
  if (previewTimer) clearTimeout(previewTimer);
74
79
  });
75
80
  return (() => {
76
- var _el$ = web.getNextElement(_tmpl$9), _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$32 = _el$2.nextSibling, [_el$33, _co$7] = web.getNextMarker(_el$32.nextSibling);
77
- _el$33.nextSibling;
81
+ 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);
82
+ _el$53.nextSibling;
78
83
  _el$2.$$click = () => isCollapsible() && setCollapsed(!collapsed());
79
84
  web.insert(_el$5, () => props.state.title);
80
85
  web.insert(_el$3, web.createComponent(solidJs.Show, {
@@ -108,7 +113,7 @@ const ScratchpadPanel = (props) => {
108
113
  return !collapsed();
109
114
  },
110
115
  get children() {
111
- var _el$12 = web.getNextElement(_tmpl$8), _el$23 = _el$12.firstChild, [_el$24, _co$3] = web.getNextMarker(_el$23.nextSibling), _el$14 = _el$24.nextSibling, _el$25 = _el$14.nextSibling, [_el$26, _co$4] = web.getNextMarker(_el$25.nextSibling), _el$27 = _el$26.nextSibling, [_el$28, _co$5] = web.getNextMarker(_el$27.nextSibling), _el$29 = _el$28.nextSibling, [_el$30, _co$6] = web.getNextMarker(_el$29.nextSibling);
116
+ var _el$12 = web.getNextElement(_tmpl$10), _el$41 = _el$12.firstChild, [_el$42, _co$7] = web.getNextMarker(_el$41.nextSibling), _el$14 = _el$42.nextSibling, _el$43 = _el$14.nextSibling, [_el$44, _co$8] = web.getNextMarker(_el$43.nextSibling), _el$45 = _el$44.nextSibling, [_el$46, _co$9] = web.getNextMarker(_el$45.nextSibling), _el$47 = _el$46.nextSibling, [_el$48, _co$0] = web.getNextMarker(_el$47.nextSibling), _el$49 = _el$48.nextSibling, [_el$50, _co$1] = web.getNextMarker(_el$49.nextSibling);
112
117
  web.insert(_el$12, web.createComponent(solidJs.Show, {
113
118
  get when() {
114
119
  return web.memo(() => !!props.state.turnHistory)() && props.state.turnHistory.length > 0;
@@ -124,32 +129,32 @@ const ScratchpadPanel = (props) => {
124
129
  return i() > 0;
125
130
  },
126
131
  get children() {
127
- return web.getNextElement(_tmpl$0);
132
+ return web.getNextElement(_tmpl$12);
128
133
  }
129
134
  }), (() => {
130
- var _el$35 = web.getNextElement(_tmpl$10), _el$41 = _el$35.firstChild, [_el$42, _co$9] = web.getNextMarker(_el$41.nextSibling), _el$36 = _el$42.nextSibling, _el$43 = _el$36.nextSibling, [_el$44, _co$0] = web.getNextMarker(_el$43.nextSibling), _el$45 = _el$44.nextSibling, [_el$46, _co$1] = web.getNextMarker(_el$45.nextSibling);
131
- web.insert(_el$35, (() => {
135
+ 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);
136
+ web.insert(_el$55, (() => {
132
137
  var _c$ = web.memo(() => turn.status === "done");
133
138
  return () => _c$() ? "✅" : turn.status === "active" ? "●" : "○";
134
- })(), _el$42, _co$9);
135
- web.insert(_el$35, () => turn.label, _el$44, _co$0);
136
- web.insert(_el$35, web.createComponent(solidJs.Show, {
139
+ })(), _el$62, _co$12);
140
+ web.insert(_el$55, () => turn.label, _el$64, _co$13);
141
+ web.insert(_el$55, web.createComponent(solidJs.Show, {
137
142
  get when() {
138
143
  return turn.summary;
139
144
  },
140
145
  get children() {
141
- var _el$37 = web.getNextElement(_tmpl$1), _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling, [_el$40, _co$8] = web.getNextMarker(_el$39.nextSibling);
142
- web.insert(_el$37, () => turn.summary, _el$40, _co$8);
143
- return _el$37;
146
+ 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);
147
+ web.insert(_el$57, () => turn.summary, _el$60, _co$11);
148
+ return _el$57;
144
149
  }
145
- }), _el$46, _co$1);
146
- web.effect(() => web.className(_el$35, `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"}`));
147
- return _el$35;
150
+ }), _el$66, _co$14);
151
+ 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"}`));
152
+ return _el$55;
148
153
  })()]
149
154
  }));
150
155
  return _el$13;
151
156
  }
152
- }), _el$24, _co$3);
157
+ }), _el$42, _co$7);
153
158
  web.insert(_el$14, web.createComponent(solidJs.For, {
154
159
  get each() {
155
160
  return props.state.sections;
@@ -167,6 +172,9 @@ const ScratchpadPanel = (props) => {
167
172
  },
168
173
  get onSectionEdit() {
169
174
  return props.onSectionEdit;
175
+ },
176
+ get onSubmit() {
177
+ return props.onSubmit;
170
178
  }
171
179
  })
172
180
  }));
@@ -181,19 +189,19 @@ const ScratchpadPanel = (props) => {
181
189
  return props.state.agentMessages;
182
190
  },
183
191
  children: (msg) => (() => {
184
- var _el$47 = web.getNextElement(_tmpl$11), _el$48 = _el$47.firstChild, _el$49 = _el$48.nextSibling;
185
- web.insert(_el$48, (() => {
192
+ var _el$67 = web.getNextElement(_tmpl$15), _el$68 = _el$67.firstChild, _el$69 = _el$68.nextSibling;
193
+ web.insert(_el$68, (() => {
186
194
  var _c$2 = web.memo(() => msg.type === "warning");
187
195
  return () => _c$2() ? "⚠️" : msg.type === "question" ? "❓" : "ℹ️";
188
196
  })());
189
- web.insert(_el$49, () => msg.text);
190
- web.effect(() => web.className(_el$47, `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"}`));
191
- return _el$47;
197
+ web.insert(_el$69, () => msg.text);
198
+ 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"}`));
199
+ return _el$67;
192
200
  })()
193
201
  }));
194
202
  return _el$15;
195
203
  }
196
- }), _el$26, _co$4);
204
+ }), _el$44, _co$8);
197
205
  web.insert(_el$12, web.createComponent(solidJs.Show, {
198
206
  get when() {
199
207
  return preview();
@@ -206,49 +214,49 @@ const ScratchpadPanel = (props) => {
206
214
  },
207
215
  get fallback() {
208
216
  return [(() => {
209
- var _el$50 = web.getNextElement(_tmpl$12), _el$51 = _el$50.firstChild, _el$52 = _el$51.nextSibling;
210
- web.insert(_el$52, () => preview().count.toLocaleString());
211
- return _el$50;
217
+ var _el$70 = web.getNextElement(_tmpl$16), _el$71 = _el$70.firstChild, _el$72 = _el$71.nextSibling;
218
+ web.insert(_el$72, () => preview().count.toLocaleString());
219
+ return _el$70;
212
220
  })(), (() => {
213
- var _el$53 = web.getNextElement(_tmpl$13);
214
- web.insert(_el$53, () => preview().summary);
215
- return _el$53;
221
+ var _el$73 = web.getNextElement(_tmpl$17);
222
+ web.insert(_el$73, () => preview().summary);
223
+ return _el$73;
216
224
  })(), web.createComponent(solidJs.Show, {
217
225
  get when() {
218
226
  return web.memo(() => !!preview().rows)() && preview().rows.length > 0;
219
227
  },
220
228
  get children() {
221
- var _el$54 = web.getNextElement(_tmpl$14), _el$55 = _el$54.firstChild, _el$56 = _el$55.firstChild, _el$57 = _el$56.firstChild, _el$58 = _el$56.nextSibling;
222
- web.insert(_el$57, web.createComponent(solidJs.For, {
229
+ 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;
230
+ web.insert(_el$77, web.createComponent(solidJs.For, {
223
231
  get each() {
224
232
  return Object.keys(preview().rows[0]);
225
233
  },
226
234
  children: (k) => (() => {
227
- var _el$59 = web.getNextElement(_tmpl$15);
228
- web.insert(_el$59, k);
229
- return _el$59;
235
+ var _el$79 = web.getNextElement(_tmpl$19);
236
+ web.insert(_el$79, k);
237
+ return _el$79;
230
238
  })()
231
239
  }));
232
- web.insert(_el$58, web.createComponent(solidJs.For, {
240
+ web.insert(_el$78, web.createComponent(solidJs.For, {
233
241
  get each() {
234
242
  return preview().rows.slice(0, 5);
235
243
  },
236
244
  children: (row) => (() => {
237
- var _el$60 = web.getNextElement(_tmpl$16);
238
- web.insert(_el$60, web.createComponent(solidJs.For, {
245
+ var _el$80 = web.getNextElement(_tmpl$20);
246
+ web.insert(_el$80, web.createComponent(solidJs.For, {
239
247
  get each() {
240
248
  return Object.values(row);
241
249
  },
242
250
  children: (v) => (() => {
243
- var _el$61 = web.getNextElement(_tmpl$17);
244
- web.insert(_el$61, () => String(v));
245
- return _el$61;
251
+ var _el$81 = web.getNextElement(_tmpl$21);
252
+ web.insert(_el$81, () => String(v));
253
+ return _el$81;
246
254
  })()
247
255
  }));
248
- return _el$60;
256
+ return _el$80;
249
257
  })()
250
258
  }));
251
- return _el$54;
259
+ return _el$74;
252
260
  }
253
261
  })];
254
262
  },
@@ -264,27 +272,75 @@ const ScratchpadPanel = (props) => {
264
272
  }));
265
273
  return _el$16;
266
274
  }
267
- }), _el$28, _co$5);
275
+ }), _el$46, _co$9);
276
+ web.insert(_el$12, web.createComponent(solidJs.Show, {
277
+ get when() {
278
+ return web.memo(() => props.state.status === "error")() && props.state.error;
279
+ },
280
+ get children() {
281
+ var _el$21 = web.getNextElement(_tmpl$0), _el$22 = _el$21.firstChild, _el$23 = _el$22.firstChild, _el$24 = _el$23.nextSibling, _el$25 = _el$24.firstChild, _el$30 = _el$25.nextSibling, [_el$31, _co$4] = web.getNextMarker(_el$30.nextSibling), _el$32 = _el$22.nextSibling, _el$35 = _el$32.firstChild, [_el$36, _co$5] = web.getNextMarker(_el$35.nextSibling), _el$37 = _el$36.nextSibling, [_el$38, _co$6] = web.getNextMarker(_el$37.nextSibling);
282
+ web.insert(_el$25, () => props.state.error.message);
283
+ web.insert(_el$24, web.createComponent(solidJs.Show, {
284
+ get when() {
285
+ return props.state.error.code;
286
+ },
287
+ get children() {
288
+ var _el$26 = web.getNextElement(_tmpl$7), _el$27 = _el$26.firstChild, _el$28 = _el$27.nextSibling, [_el$29, _co$3] = web.getNextMarker(_el$28.nextSibling);
289
+ web.insert(_el$26, () => props.state.error.code, _el$29, _co$3);
290
+ return _el$26;
291
+ }
292
+ }), _el$31, _co$4);
293
+ web.insert(_el$32, web.createComponent(solidJs.Show, {
294
+ get when() {
295
+ return props.state.error.retryable !== false;
296
+ },
297
+ get children() {
298
+ var _el$33 = web.getNextElement(_tmpl$8);
299
+ _el$33.$$click = () => {
300
+ var _a;
301
+ return (_a = props.onRetry) == null ? void 0 : _a.call(props);
302
+ };
303
+ web.runHydrationEvents();
304
+ return _el$33;
305
+ }
306
+ }), _el$36, _co$5);
307
+ web.insert(_el$32, web.createComponent(solidJs.Show, {
308
+ get when() {
309
+ return props.onClose;
310
+ },
311
+ get children() {
312
+ var _el$34 = web.getNextElement(_tmpl$9);
313
+ _el$34.$$click = () => {
314
+ var _a;
315
+ return (_a = props.onClose) == null ? void 0 : _a.call(props);
316
+ };
317
+ web.runHydrationEvents();
318
+ return _el$34;
319
+ }
320
+ }), _el$38, _co$6);
321
+ return _el$21;
322
+ }
323
+ }), _el$48, _co$0);
268
324
  web.insert(_el$12, web.createComponent(solidJs.Show, {
269
325
  get when() {
270
326
  return web.memo(() => props.state.status === "waiting_human")() && hasFilters();
271
327
  },
272
328
  get children() {
273
- var _el$21 = web.getNextElement(_tmpl$7), _el$22 = _el$21.firstChild;
274
- _el$22.$$click = () => {
329
+ var _el$39 = web.getNextElement(_tmpl$1), _el$40 = _el$39.firstChild;
330
+ _el$40.$$click = () => {
275
331
  var _a;
276
332
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "search", {
277
333
  filters: props.state.filters
278
334
  });
279
335
  };
280
336
  web.runHydrationEvents();
281
- return _el$21;
337
+ return _el$39;
282
338
  }
283
- }), _el$30, _co$6);
339
+ }), _el$50, _co$1);
284
340
  web.effect((_$p) => web.setStyleProperty(_el$12, "max-height", props.maxHeight || "500px"));
285
341
  return _el$12;
286
342
  }
287
- }), _el$33, _co$7);
343
+ }), _el$53, _co$10);
288
344
  web.effect((_p$) => {
289
345
  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}`;
290
346
  _v$ !== _p$.e && web.className(_el$, _p$.e = _v$);
@@ -302,9 +358,9 @@ const ScratchpadPanel = (props) => {
302
358
  };
303
359
  const SectionRenderer = (props) => {
304
360
  return (() => {
305
- var _el$62 = web.getNextElement(_tmpl$19), _el$63 = _el$62.firstChild, _el$66 = _el$63.nextSibling, [_el$67, _co$10] = web.getNextMarker(_el$66.nextSibling);
306
- web.insert(_el$63, () => props.section.title);
307
- web.insert(_el$62, web.createComponent(solidJs.Switch, {
361
+ 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);
362
+ web.insert(_el$83, () => props.section.title);
363
+ web.insert(_el$82, web.createComponent(solidJs.Switch, {
308
364
  get children() {
309
365
  return [web.createComponent(solidJs.Match, {
310
366
  get when() {
@@ -339,9 +395,9 @@ const SectionRenderer = (props) => {
339
395
  return props.section.type === "message";
340
396
  },
341
397
  get children() {
342
- var _el$64 = web.getNextElement(_tmpl$13);
343
- web.insert(_el$64, () => String(props.section.content));
344
- return _el$64;
398
+ var _el$84 = web.getNextElement(_tmpl$17);
399
+ web.insert(_el$84, () => String(props.section.content));
400
+ return _el$84;
345
401
  }
346
402
  }), web.createComponent(solidJs.Match, {
347
403
  get when() {
@@ -388,6 +444,9 @@ const SectionRenderer = (props) => {
388
444
  },
389
445
  get onAction() {
390
446
  return props.onAction;
447
+ },
448
+ get onSubmit() {
449
+ return props.onSubmit;
391
450
  }
392
451
  });
393
452
  }
@@ -433,37 +492,37 @@ const SectionRenderer = (props) => {
433
492
  }), web.createComponent(solidJs.Match, {
434
493
  when: true,
435
494
  get children() {
436
- var _el$65 = web.getNextElement(_tmpl$18);
437
- web.insert(_el$65, () => JSON.stringify(props.section.content, null, 2));
438
- return _el$65;
495
+ var _el$85 = web.getNextElement(_tmpl$22);
496
+ web.insert(_el$85, () => JSON.stringify(props.section.content, null, 2));
497
+ return _el$85;
439
498
  }
440
499
  })];
441
500
  }
442
- }), _el$67, _co$10);
443
- return _el$62;
501
+ }), _el$87, _co$15);
502
+ return _el$82;
444
503
  })();
445
504
  };
446
505
  const DataSection = (props) => {
447
506
  const entries = () => typeof props.content === "object" && props.content ? Object.entries(props.content) : [];
448
507
  return (() => {
449
- var _el$68 = web.getNextElement(_tmpl$20);
450
- web.insert(_el$68, web.createComponent(solidJs.For, {
508
+ var _el$88 = web.getNextElement(_tmpl$24);
509
+ web.insert(_el$88, web.createComponent(solidJs.For, {
451
510
  get each() {
452
511
  return entries();
453
512
  },
454
513
  children: ([k, v]) => (() => {
455
- var _el$69 = web.getNextElement(_tmpl$21), _el$70 = _el$69.firstChild, _el$72 = _el$70.firstChild, [_el$73, _co$11] = web.getNextMarker(_el$72.nextSibling);
456
- _el$73.nextSibling;
457
- var _el$74 = _el$70.nextSibling;
458
- web.insert(_el$70, k, _el$73, _co$11);
459
- web.insert(_el$74, (() => {
514
+ 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);
515
+ _el$93.nextSibling;
516
+ var _el$94 = _el$90.nextSibling;
517
+ web.insert(_el$90, k, _el$93, _co$16);
518
+ web.insert(_el$94, (() => {
460
519
  var _c$3 = web.memo(() => !!Array.isArray(v));
461
520
  return () => _c$3() ? v.join(", ") : String(v);
462
521
  })());
463
- return _el$69;
522
+ return _el$89;
464
523
  })()
465
524
  }));
466
- return _el$68;
525
+ return _el$88;
467
526
  })();
468
527
  };
469
528
  const InteractiveFilterSection = (props) => {
@@ -497,8 +556,8 @@ const InteractiveFilterSection = (props) => {
497
556
  };
498
557
  const getDef = (key) => filterDefs()[key] || {};
499
558
  return (() => {
500
- var _el$75 = web.getNextElement(_tmpl$23), _el$77 = _el$75.firstChild, [_el$78, _co$12] = web.getNextMarker(_el$77.nextSibling), _el$79 = _el$78.nextSibling, [_el$80, _co$13] = web.getNextMarker(_el$79.nextSibling);
501
- web.insert(_el$75, web.createComponent(solidJs.For, {
559
+ 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);
560
+ web.insert(_el$95, web.createComponent(solidJs.For, {
502
561
  get each() {
503
562
  return allKeys();
504
563
  },
@@ -507,136 +566,136 @@ const InteractiveFilterSection = (props) => {
507
566
  const value = () => props.filters[key];
508
567
  const hasValue = () => value() !== void 0 && value() !== "";
509
568
  return (() => {
510
- var _el$81 = web.getNextElement(_tmpl$29), _el$97 = _el$81.firstChild, [_el$98, _co$17] = web.getNextMarker(_el$97.nextSibling), _el$99 = _el$98.nextSibling, [_el$100, _co$18] = web.getNextMarker(_el$99.nextSibling);
511
- web.insert(_el$81, web.createComponent(solidJs.Show, {
569
+ 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);
570
+ web.insert(_el$101, web.createComponent(solidJs.Show, {
512
571
  get when() {
513
572
  return hasValue();
514
573
  },
515
574
  get fallback() {
516
575
  return (() => {
517
- var _el$101 = web.getNextElement(_tmpl$30), _el$102 = _el$101.firstChild, _el$103 = _el$102.nextSibling, [_el$104, _co$19] = web.getNextMarker(_el$103.nextSibling);
518
- _el$101.$$click = () => {
576
+ 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);
577
+ _el$121.$$click = () => {
519
578
  setEditingKey(key);
520
579
  setEditValue("");
521
580
  };
522
- web.insert(_el$101, () => {
581
+ web.insert(_el$121, () => {
523
582
  var _a;
524
583
  return ((_a = def()) == null ? void 0 : _a.label) || key;
525
- }, _el$104, _co$19);
584
+ }, _el$124, _co$24);
526
585
  web.runHydrationEvents();
527
- return _el$101;
586
+ return _el$121;
528
587
  })();
529
588
  },
530
589
  get children() {
531
- var _el$82 = web.getNextElement(_tmpl$25), _el$83 = _el$82.firstChild, _el$84 = _el$83.firstChild, _el$86 = _el$84.firstChild, [_el$87, _co$14] = web.getNextMarker(_el$86.nextSibling);
532
- _el$87.nextSibling;
533
- var _el$88 = _el$84.nextSibling, _el$89 = _el$88.nextSibling, [_el$90, _co$15] = web.getNextMarker(_el$89.nextSibling), _el$92 = _el$83.nextSibling, [_el$93, _co$16] = web.getNextMarker(_el$92.nextSibling);
534
- _el$83.$$click = () => {
590
+ 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);
591
+ _el$107.nextSibling;
592
+ 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);
593
+ _el$103.$$click = () => {
535
594
  setEditingKey(key);
536
595
  setEditValue(String(value() || ""));
537
596
  };
538
- web.insert(_el$84, () => {
597
+ web.insert(_el$104, () => {
539
598
  var _a;
540
599
  return ((_a = def()) == null ? void 0 : _a.label) || key;
541
- }, _el$87, _co$14);
542
- web.insert(_el$83, (() => {
600
+ }, _el$107, _co$19);
601
+ web.insert(_el$103, (() => {
543
602
  var _c$4 = web.memo(() => !!Array.isArray(value()));
544
603
  return () => _c$4() ? value().join(", ") : String(value());
545
- })(), _el$90, _co$15);
546
- web.insert(_el$82, web.createComponent(solidJs.Show, {
604
+ })(), _el$110, _co$20);
605
+ web.insert(_el$102, web.createComponent(solidJs.Show, {
547
606
  get when() {
548
607
  return props.onFilterChange;
549
608
  },
550
609
  get children() {
551
- var _el$91 = web.getNextElement(_tmpl$24);
552
- _el$91.$$click = () => removeFilter(key);
553
- web.setAttribute(_el$91, "aria-label", `Remove ${key}`);
610
+ var _el$111 = web.getNextElement(_tmpl$28);
611
+ _el$111.$$click = () => removeFilter(key);
612
+ web.setAttribute(_el$111, "aria-label", `Remove ${key}`);
554
613
  web.runHydrationEvents();
555
- return _el$91;
614
+ return _el$111;
556
615
  }
557
- }), _el$93, _co$16);
616
+ }), _el$113, _co$21);
558
617
  web.runHydrationEvents();
559
- return _el$82;
618
+ return _el$102;
560
619
  }
561
- }), _el$98, _co$17);
562
- web.insert(_el$81, web.createComponent(solidJs.Show, {
620
+ }), _el$118, _co$22);
621
+ web.insert(_el$101, web.createComponent(solidJs.Show, {
563
622
  get when() {
564
623
  return editingKey() === key;
565
624
  },
566
625
  get children() {
567
- var _el$94 = web.getNextElement(_tmpl$28);
568
- web.insert(_el$94, web.createComponent(solidJs.Show, {
626
+ var _el$114 = web.getNextElement(_tmpl$32);
627
+ web.insert(_el$114, web.createComponent(solidJs.Show, {
569
628
  get when() {
570
629
  var _a;
571
630
  return (_a = def()) == null ? void 0 : _a.options;
572
631
  },
573
632
  get fallback() {
574
633
  return (() => {
575
- var _el$105 = web.getNextElement(_tmpl$31), _el$106 = _el$105.firstChild, _el$107 = _el$106.nextSibling, _el$108 = _el$107.nextSibling;
576
- _el$105.addEventListener("submit", (e) => {
634
+ var _el$125 = web.getNextElement(_tmpl$35), _el$126 = _el$125.firstChild, _el$127 = _el$126.nextSibling, _el$128 = _el$127.nextSibling;
635
+ _el$125.addEventListener("submit", (e) => {
577
636
  e.preventDefault();
578
637
  setFilter(key, editValue());
579
638
  });
580
- _el$106.$$input = (e) => setEditValue(e.currentTarget.value);
581
- _el$108.$$click = () => setEditingKey(null);
639
+ _el$126.$$input = (e) => setEditValue(e.currentTarget.value);
640
+ _el$128.$$click = () => setEditingKey(null);
582
641
  web.effect(() => {
583
642
  var _a;
584
- return web.setAttribute(_el$106, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
643
+ return web.setAttribute(_el$126, "placeholder", ((_a = def()) == null ? void 0 : _a.placeholder) || key);
585
644
  });
586
- web.effect(() => web.setProperty(_el$106, "value", editValue()));
645
+ web.effect(() => web.setProperty(_el$126, "value", editValue()));
587
646
  web.runHydrationEvents();
588
- return _el$105;
647
+ return _el$125;
589
648
  })();
590
649
  },
591
650
  get children() {
592
651
  return [(() => {
593
- var _el$95 = web.getNextElement(_tmpl$26);
594
- web.insert(_el$95, web.createComponent(solidJs.For, {
652
+ var _el$115 = web.getNextElement(_tmpl$30);
653
+ web.insert(_el$115, web.createComponent(solidJs.For, {
595
654
  get each() {
596
655
  return def().options;
597
656
  },
598
657
  children: (opt) => (() => {
599
- var _el$109 = web.getNextElement(_tmpl$33), _el$111 = _el$109.firstChild, [_el$112, _co$20] = web.getNextMarker(_el$111.nextSibling), _el$113 = _el$112.nextSibling, [_el$114, _co$21] = web.getNextMarker(_el$113.nextSibling);
600
- _el$109.$$click = () => setFilter(key, opt.value);
601
- web.insert(_el$109, () => opt.label, _el$112, _co$20);
602
- web.insert(_el$109, web.createComponent(solidJs.Show, {
658
+ 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);
659
+ _el$129.$$click = () => setFilter(key, opt.value);
660
+ web.insert(_el$129, () => opt.label, _el$132, _co$25);
661
+ web.insert(_el$129, web.createComponent(solidJs.Show, {
603
662
  get when() {
604
663
  return String(value()) === opt.value;
605
664
  },
606
665
  get children() {
607
- return web.getNextElement(_tmpl$32);
666
+ return web.getNextElement(_tmpl$36);
608
667
  }
609
- }), _el$114, _co$21);
610
- web.effect(() => web.className(_el$109, `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"}`));
668
+ }), _el$134, _co$26);
669
+ 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"}`));
611
670
  web.runHydrationEvents();
612
- return _el$109;
671
+ return _el$129;
613
672
  })()
614
673
  }));
615
- return _el$95;
674
+ return _el$115;
616
675
  })(), (() => {
617
- var _el$96 = web.getNextElement(_tmpl$27);
618
- _el$96.$$click = () => setEditingKey(null);
676
+ var _el$116 = web.getNextElement(_tmpl$31);
677
+ _el$116.$$click = () => setEditingKey(null);
619
678
  web.runHydrationEvents();
620
- return _el$96;
679
+ return _el$116;
621
680
  })()];
622
681
  }
623
682
  }));
624
- return _el$94;
683
+ return _el$114;
625
684
  }
626
- }), _el$100, _co$18);
627
- return _el$81;
685
+ }), _el$120, _co$23);
686
+ return _el$101;
628
687
  })();
629
688
  }
630
- }), _el$78, _co$12);
631
- web.insert(_el$75, web.createComponent(solidJs.Show, {
689
+ }), _el$98, _co$17);
690
+ web.insert(_el$95, web.createComponent(solidJs.Show, {
632
691
  get when() {
633
692
  return allKeys().length === 0;
634
693
  },
635
694
  get children() {
636
- return web.getNextElement(_tmpl$22);
695
+ return web.getNextElement(_tmpl$26);
637
696
  }
638
- }), _el$80, _co$13);
639
- return _el$75;
697
+ }), _el$100, _co$18);
698
+ return _el$95;
640
699
  })();
641
700
  };
642
701
  const EmbeddedFormSection = (props) => {
@@ -688,15 +747,23 @@ const EmbeddedFormSection = (props) => {
688
747
  const handleSubmit = (e) => {
689
748
  var _a;
690
749
  e.preventDefault();
691
- (_a = props.onAction) == null ? void 0 : _a.call(props, "submit_form", {
692
- sectionId: props.sectionId,
693
- values: formData()
694
- });
750
+ const values = Object.fromEntries(Object.entries(formData()).filter(([key]) => {
751
+ const field = config().fields.find((f) => f.name === key);
752
+ return (field == null ? void 0 : field.fieldStatus) !== "unsupported";
753
+ }).filter(([, v]) => v !== void 0 && v !== "" && !(Array.isArray(v) && v.length === 0)));
754
+ if (props.onSubmit) {
755
+ props.onSubmit(props.sectionId, values);
756
+ } else {
757
+ (_a = props.onAction) == null ? void 0 : _a.call(props, "submit_form", {
758
+ sectionId: props.sectionId,
759
+ values
760
+ });
761
+ }
695
762
  };
696
763
  return (() => {
697
- var _el$115 = web.getNextElement(_tmpl$34), _el$118 = _el$115.firstChild, [_el$119, _co$22] = web.getNextMarker(_el$118.nextSibling), _el$116 = _el$119.nextSibling, _el$117 = _el$116.firstChild;
698
- _el$115.addEventListener("submit", handleSubmit);
699
- web.insert(_el$115, web.createComponent(solidJs.For, {
764
+ 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;
765
+ _el$135.addEventListener("submit", handleSubmit);
766
+ web.insert(_el$135, web.createComponent(solidJs.For, {
700
767
  get each() {
701
768
  return config().fields;
702
769
  },
@@ -710,9 +777,9 @@ const EmbeddedFormSection = (props) => {
710
777
  onChange: (val) => updateField(field.name, val),
711
778
  formData
712
779
  })
713
- }), _el$119, _co$22);
714
- web.insert(_el$117, () => config().submitLabel);
715
- return _el$115;
780
+ }), _el$139, _co$27);
781
+ web.insert(_el$137, () => config().submitLabel);
782
+ return _el$135;
716
783
  })();
717
784
  };
718
785
  const EnrichedStepsSection = (props) => {
@@ -724,35 +791,35 @@ const EnrichedStepsSection = (props) => {
724
791
  };
725
792
  };
726
793
  return (() => {
727
- var _el$120 = web.getNextElement(_tmpl$36), _el$123 = _el$120.firstChild, [_el$124, _co$23] = web.getNextMarker(_el$123.nextSibling), _el$125 = _el$124.nextSibling, [_el$126, _co$24] = web.getNextMarker(_el$125.nextSibling);
728
- web.insert(_el$120, web.createComponent(solidJs.For, {
794
+ 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);
795
+ web.insert(_el$140, web.createComponent(solidJs.For, {
729
796
  get each() {
730
797
  return stepsData().steps;
731
798
  },
732
799
  children: (step) => (() => {
733
- var _el$127 = web.getNextElement(_tmpl$39), _el$128 = _el$127.firstChild, _el$129 = _el$128.firstChild, _el$134 = _el$129.nextSibling, [_el$135, _co$26] = web.getNextMarker(_el$134.nextSibling), _el$136 = _el$135.nextSibling, [_el$137, _co$27] = web.getNextMarker(_el$136.nextSibling), _el$139 = _el$128.nextSibling, [_el$140, _co$28] = web.getNextMarker(_el$139.nextSibling);
734
- web.insert(_el$129, (() => {
800
+ 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);
801
+ web.insert(_el$149, (() => {
735
802
  var _c$5 = web.memo(() => step.status === "done");
736
803
  return () => _c$5() ? "✅" : step.status === "active" ? "●" : "○";
737
804
  })());
738
- web.insert(_el$128, () => step.label, _el$135, _co$26);
739
- web.insert(_el$128, web.createComponent(solidJs.Show, {
805
+ web.insert(_el$148, () => step.label, _el$155, _co$31);
806
+ web.insert(_el$148, web.createComponent(solidJs.Show, {
740
807
  get when() {
741
808
  return web.memo(() => !!step.description)() && step.status === "active";
742
809
  },
743
810
  get children() {
744
- var _el$130 = web.getNextElement(_tmpl$37), _el$131 = _el$130.firstChild, _el$132 = _el$131.nextSibling, [_el$133, _co$25] = web.getNextMarker(_el$132.nextSibling);
745
- web.insert(_el$130, () => step.description, _el$133, _co$25);
746
- return _el$130;
811
+ 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);
812
+ web.insert(_el$150, () => step.description, _el$153, _co$30);
813
+ return _el$150;
747
814
  }
748
- }), _el$137, _co$27);
749
- web.insert(_el$127, web.createComponent(solidJs.Show, {
815
+ }), _el$157, _co$32);
816
+ web.insert(_el$147, web.createComponent(solidJs.Show, {
750
817
  get when() {
751
818
  return web.memo(() => step.status === "active")() && step.content;
752
819
  },
753
820
  get children() {
754
- var _el$138 = web.getNextElement(_tmpl$38);
755
- web.insert(_el$138, web.createComponent(SectionRenderer, {
821
+ var _el$158 = web.getNextElement(_tmpl$42);
822
+ web.insert(_el$158, web.createComponent(SectionRenderer, {
756
823
  get section() {
757
824
  return step.content;
758
825
  },
@@ -764,71 +831,71 @@ const EnrichedStepsSection = (props) => {
764
831
  return props.onAction;
765
832
  }
766
833
  }));
767
- return _el$138;
834
+ return _el$158;
768
835
  }
769
- }), _el$140, _co$28);
836
+ }), _el$160, _co$33);
770
837
  web.effect((_p$) => {
771
838
  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"}`;
772
- _v$4 !== _p$.e && web.className(_el$127, _p$.e = _v$4);
773
- _v$5 !== _p$.t && web.className(_el$128, _p$.t = _v$5);
839
+ _v$4 !== _p$.e && web.className(_el$147, _p$.e = _v$4);
840
+ _v$5 !== _p$.t && web.className(_el$148, _p$.t = _v$5);
774
841
  return _p$;
775
842
  }, {
776
843
  e: void 0,
777
844
  t: void 0
778
845
  });
779
- return _el$127;
846
+ return _el$147;
780
847
  })()
781
- }), _el$124, _co$23);
782
- web.insert(_el$120, web.createComponent(solidJs.Show, {
848
+ }), _el$144, _co$28);
849
+ web.insert(_el$140, web.createComponent(solidJs.Show, {
783
850
  get when() {
784
851
  return stepsData().steps.some((s) => s.status === "active");
785
852
  },
786
853
  get children() {
787
- var _el$121 = web.getNextElement(_tmpl$35), _el$122 = _el$121.firstChild;
788
- _el$122.$$click = () => {
854
+ var _el$141 = web.getNextElement(_tmpl$39), _el$142 = _el$141.firstChild;
855
+ _el$142.$$click = () => {
789
856
  var _a;
790
857
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "next_step", {
791
858
  step: stepsData().currentStep
792
859
  });
793
860
  };
794
861
  web.runHydrationEvents();
795
- return _el$121;
862
+ return _el$141;
796
863
  }
797
- }), _el$126, _co$24);
798
- return _el$120;
864
+ }), _el$146, _co$29);
865
+ return _el$140;
799
866
  })();
800
867
  };
801
868
  const ActionSection = (props) => {
802
869
  const actions = () => Array.isArray(props.content) ? props.content : [];
803
870
  return (() => {
804
- var _el$141 = web.getNextElement(_tmpl$40);
805
- web.insert(_el$141, web.createComponent(solidJs.For, {
871
+ var _el$161 = web.getNextElement(_tmpl$44);
872
+ web.insert(_el$161, web.createComponent(solidJs.For, {
806
873
  get each() {
807
874
  return actions();
808
875
  },
809
876
  children: (item) => (() => {
810
- var _el$142 = web.getNextElement(_tmpl$33), _el$144 = _el$142.firstChild, [_el$145, _co$29] = web.getNextMarker(_el$144.nextSibling), _el$146 = _el$145.nextSibling, [_el$147, _co$30] = web.getNextMarker(_el$146.nextSibling);
811
- _el$142.$$click = () => {
877
+ 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);
878
+ _el$162.$$click = () => {
812
879
  var _a;
813
880
  return (_a = props.onAction) == null ? void 0 : _a.call(props, item.value || item.action || item.label, item);
814
881
  };
815
- web.insert(_el$142, web.createComponent(solidJs.Show, {
882
+ web.insert(_el$162, web.createComponent(solidJs.Show, {
816
883
  get when() {
817
884
  return item.icon;
818
885
  },
819
886
  get children() {
820
- var _el$143 = web.getNextElement(_tmpl$41);
821
- web.insert(_el$143, () => item.icon);
822
- return _el$143;
887
+ var _el$163 = web.getNextElement(_tmpl$45);
888
+ web.insert(_el$163, () => item.icon);
889
+ return _el$163;
823
890
  }
824
- }), _el$145, _co$29);
825
- web.insert(_el$142, () => item.label, _el$147, _co$30);
826
- web.effect(() => web.className(_el$142, `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"}`));
891
+ }), _el$165, _co$34);
892
+ web.insert(_el$162, () => item.label, _el$167, _co$35);
893
+ 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"}`));
827
894
  web.runHydrationEvents();
828
- return _el$142;
895
+ return _el$162;
829
896
  })()
830
897
  }));
831
- return _el$141;
898
+ return _el$161;
832
899
  })();
833
900
  };
834
901
  const UnderstandingSection = (props) => {
@@ -852,90 +919,130 @@ const UnderstandingSection = (props) => {
852
919
  }
853
920
  };
854
921
  return (() => {
855
- var _el$148 = web.getNextElement(_tmpl$42), _el$149 = _el$148.firstChild, _el$151 = _el$149.nextSibling, [_el$152, _co$31] = web.getNextMarker(_el$151.nextSibling);
856
- web.insert(_el$149, web.createComponent(solidJs.For, {
922
+ 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);
923
+ web.insert(_el$169, web.createComponent(solidJs.For, {
857
924
  get each() {
858
925
  return data().detections;
859
926
  },
860
927
  children: (det) => (() => {
861
- var _el$153 = web.getNextElement(_tmpl$43), _el$154 = _el$153.firstChild, _el$155 = _el$154.nextSibling;
862
- web.insert(_el$154, () => det.label);
863
- web.insert(_el$155, () => det.value);
864
- web.effect(() => web.className(_el$154, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
865
- return _el$153;
928
+ var _el$173 = web.getNextElement(_tmpl$47), _el$174 = _el$173.firstChild, _el$175 = _el$174.nextSibling;
929
+ web.insert(_el$174, () => det.label);
930
+ web.insert(_el$175, () => det.value);
931
+ web.effect(() => web.className(_el$174, `px-1.5 py-0.5 text-xs font-medium rounded ${confidenceClass(det.confidence)}`));
932
+ return _el$173;
866
933
  })()
867
934
  }));
868
- web.insert(_el$148, web.createComponent(solidJs.Show, {
935
+ web.insert(_el$168, web.createComponent(solidJs.Show, {
869
936
  get when() {
870
937
  return data().warnings.length > 0;
871
938
  },
872
939
  get children() {
873
- var _el$150 = web.getNextElement(_tmpl$20);
874
- web.insert(_el$150, web.createComponent(solidJs.For, {
940
+ var _el$170 = web.getNextElement(_tmpl$24);
941
+ web.insert(_el$170, web.createComponent(solidJs.For, {
875
942
  get each() {
876
943
  return data().warnings;
877
944
  },
878
945
  children: (w) => (() => {
879
- var _el$156 = web.getNextElement(_tmpl$44), _el$157 = _el$156.firstChild, _el$158 = _el$157.nextSibling;
880
- web.insert(_el$158, w);
881
- return _el$156;
946
+ var _el$176 = web.getNextElement(_tmpl$48), _el$177 = _el$176.firstChild, _el$178 = _el$177.nextSibling;
947
+ web.insert(_el$178, w);
948
+ return _el$176;
882
949
  })()
883
950
  }));
884
- return _el$150;
951
+ return _el$170;
885
952
  }
886
- }), _el$152, _co$31);
887
- return _el$148;
953
+ }), _el$172, _co$36);
954
+ return _el$168;
888
955
  })();
889
956
  };
890
957
  const FeedbackSection = (props) => {
891
958
  const [comment, setComment] = solidJs.createSignal("");
959
+ const [showComment, setShowComment] = solidJs.createSignal(false);
892
960
  const data = () => {
961
+ var _a, _b, _c, _d;
893
962
  const c = props.content;
963
+ const options = (c == null ? void 0 : c.options) || [{
964
+ value: ((_a = c == null ? void 0 : c.approve) == null ? void 0 : _a.value) || "approve",
965
+ label: ((_b = c == null ? void 0 : c.approve) == null ? void 0 : _b.label) || "Yes",
966
+ icon: "👍",
967
+ variant: "primary"
968
+ }, {
969
+ value: ((_c = c == null ? void 0 : c.reject) == null ? void 0 : _c.value) || "reject",
970
+ label: ((_d = c == null ? void 0 : c.reject) == null ? void 0 : _d.label) || "No",
971
+ icon: "👎"
972
+ }];
894
973
  return {
895
974
  question: (c == null ? void 0 : c.question) || "",
896
- approve: (c == null ? void 0 : c.approve) || {
897
- label: "Yes",
898
- value: "approve"
899
- },
900
- reject: (c == null ? void 0 : c.reject) || {
901
- label: "No",
902
- value: "reject"
903
- },
904
- allowComment: (c == null ? void 0 : c.allowComment) ?? false,
905
- commentPlaceholder: (c == null ? void 0 : c.commentPlaceholder) || "Add a comment..."
975
+ options,
976
+ allowFreeText: (c == null ? void 0 : c.allowFreeText) ?? (c == null ? void 0 : c.allowComment) ?? false,
977
+ placeholder: (c == null ? void 0 : c.placeholder) || (c == null ? void 0 : c.commentPlaceholder) || "Add a comment..."
906
978
  };
907
979
  };
908
- const handleFeedback = (approved) => {
980
+ const handleOption = (option) => {
909
981
  var _a;
910
- const d = data();
982
+ if (option.needsComment) {
983
+ setShowComment(true);
984
+ return;
985
+ }
911
986
  (_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", {
912
- approved,
913
- value: approved ? d.approve.value : d.reject.value,
987
+ option: option.value,
914
988
  comment: comment()
915
989
  });
916
990
  };
917
991
  return (() => {
918
- var _el$159 = web.getNextElement(_tmpl$46), _el$160 = _el$159.firstChild, _el$161 = _el$160.nextSibling, _el$162 = _el$161.firstChild, _el$163 = _el$162.firstChild, _el$164 = _el$163.nextSibling, [_el$165, _co$32] = web.getNextMarker(_el$164.nextSibling), _el$166 = _el$162.nextSibling, _el$167 = _el$166.firstChild, _el$168 = _el$167.nextSibling, [_el$169, _co$33] = web.getNextMarker(_el$168.nextSibling), _el$171 = _el$161.nextSibling, [_el$172, _co$34] = web.getNextMarker(_el$171.nextSibling);
919
- web.insert(_el$160, () => data().question);
920
- _el$162.$$click = () => handleFeedback(true);
921
- web.insert(_el$162, () => data().approve.label, _el$165, _co$32);
922
- _el$166.$$click = () => handleFeedback(false);
923
- web.insert(_el$166, () => data().reject.label, _el$169, _co$33);
924
- web.insert(_el$159, web.createComponent(solidJs.Show, {
992
+ 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);
993
+ web.insert(_el$180, () => data().question);
994
+ web.insert(_el$181, web.createComponent(solidJs.For, {
995
+ get each() {
996
+ return data().options;
997
+ },
998
+ children: (option) => (() => {
999
+ 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);
1000
+ _el$187.$$click = () => handleOption(option);
1001
+ web.insert(_el$187, web.createComponent(solidJs.Show, {
1002
+ get when() {
1003
+ return option.icon;
1004
+ },
1005
+ get children() {
1006
+ var _el$188 = web.getNextElement(_tmpl$51);
1007
+ web.insert(_el$188, () => option.icon);
1008
+ return _el$188;
1009
+ }
1010
+ }), _el$190, _co$38);
1011
+ web.insert(_el$187, () => option.label, _el$192, _co$39);
1012
+ 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"}`));
1013
+ web.runHydrationEvents();
1014
+ return _el$187;
1015
+ })()
1016
+ }));
1017
+ web.insert(_el$179, web.createComponent(solidJs.Show, {
925
1018
  get when() {
926
- return data().allowComment;
1019
+ return data().allowFreeText || showComment();
927
1020
  },
928
1021
  get children() {
929
- var _el$170 = web.getNextElement(_tmpl$45);
930
- _el$170.$$input = (e) => setComment(e.currentTarget.value);
931
- web.effect(() => web.setAttribute(_el$170, "placeholder", data().commentPlaceholder));
932
- web.effect(() => web.setProperty(_el$170, "value", comment()));
1022
+ var _el$182 = web.getNextElement(_tmpl$49), _el$183 = _el$182.firstChild, _el$184 = _el$183.nextSibling;
1023
+ _el$183.$$input = (e) => setComment(e.currentTarget.value);
1024
+ _el$184.$$click = () => {
1025
+ var _a;
1026
+ return (_a = props.onAction) == null ? void 0 : _a.call(props, "feedback", {
1027
+ option: "comment",
1028
+ comment: comment()
1029
+ });
1030
+ };
1031
+ web.effect((_p$) => {
1032
+ var _v$6 = data().placeholder, _v$7 = showComment();
1033
+ _v$6 !== _p$.e && web.setAttribute(_el$183, "placeholder", _p$.e = _v$6);
1034
+ _v$7 !== _p$.t && web.setProperty(_el$183, "autofocus", _p$.t = _v$7);
1035
+ return _p$;
1036
+ }, {
1037
+ e: void 0,
1038
+ t: void 0
1039
+ });
1040
+ web.effect(() => web.setProperty(_el$183, "value", comment()));
933
1041
  web.runHydrationEvents();
934
- return _el$170;
1042
+ return _el$182;
935
1043
  }
936
- }), _el$172, _co$34);
937
- web.runHydrationEvents();
938
- return _el$159;
1044
+ }), _el$186, _co$37);
1045
+ return _el$179;
939
1046
  })();
940
1047
  };
941
1048
  const PromptSection = (props) => {
@@ -950,56 +1057,56 @@ const PromptSection = (props) => {
950
1057
  };
951
1058
  };
952
1059
  return (() => {
953
- var _el$173 = web.getNextElement(_tmpl$50), _el$186 = _el$173.firstChild, [_el$187, _co$37] = web.getNextMarker(_el$186.nextSibling), _el$179 = _el$187.nextSibling, _el$188 = _el$179.nextSibling, [_el$189, _co$38] = web.getNextMarker(_el$188.nextSibling), _el$190 = _el$189.nextSibling, [_el$191, _co$39] = web.getNextMarker(_el$190.nextSibling);
954
- web.insert(_el$173, web.createComponent(solidJs.Show, {
1060
+ 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);
1061
+ web.insert(_el$193, web.createComponent(solidJs.Show, {
955
1062
  get when() {
956
1063
  return data().originalQuery;
957
1064
  },
958
1065
  get children() {
959
- var _el$174 = web.getNextElement(_tmpl$47), _el$175 = _el$174.firstChild, _el$177 = _el$175.nextSibling, [_el$178, _co$35] = web.getNextMarker(_el$177.nextSibling);
960
- _el$178.nextSibling;
961
- web.insert(_el$174, () => data().originalQuery, _el$178, _co$35);
962
- return _el$174;
1066
+ 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);
1067
+ _el$198.nextSibling;
1068
+ web.insert(_el$194, () => data().originalQuery, _el$198, _co$40);
1069
+ return _el$194;
963
1070
  }
964
- }), _el$187, _co$37);
965
- web.insert(_el$179, web.createComponent(solidJs.For, {
1071
+ }), _el$207, _co$42);
1072
+ web.insert(_el$199, web.createComponent(solidJs.For, {
966
1073
  get each() {
967
1074
  return Object.entries(data().extracted);
968
1075
  },
969
1076
  children: ([key, value]) => (() => {
970
- var _el$192 = web.getNextElement(_tmpl$51), _el$193 = _el$192.firstChild, _el$195 = _el$193.firstChild, [_el$196, _co$40] = web.getNextMarker(_el$195.nextSibling);
971
- _el$196.nextSibling;
972
- var _el$197 = _el$193.nextSibling;
973
- web.insert(_el$193, key, _el$196, _co$40);
974
- web.insert(_el$197, () => String(value));
975
- return _el$192;
1077
+ 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);
1078
+ _el$216.nextSibling;
1079
+ var _el$217 = _el$213.nextSibling;
1080
+ web.insert(_el$213, key, _el$216, _co$45);
1081
+ web.insert(_el$217, () => String(value));
1082
+ return _el$212;
976
1083
  })()
977
1084
  }));
978
- web.insert(_el$173, web.createComponent(solidJs.Show, {
1085
+ web.insert(_el$193, web.createComponent(solidJs.Show, {
979
1086
  get when() {
980
1087
  return data().plan;
981
1088
  },
982
1089
  get children() {
983
- var _el$180 = web.getNextElement(_tmpl$48), _el$181 = _el$180.firstChild, _el$182 = _el$181.nextSibling, _el$183 = _el$182.nextSibling, [_el$184, _co$36] = web.getNextMarker(_el$183.nextSibling);
984
- web.insert(_el$180, () => data().plan, _el$184, _co$36);
985
- return _el$180;
1090
+ 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);
1091
+ web.insert(_el$200, () => data().plan, _el$204, _co$41);
1092
+ return _el$200;
986
1093
  }
987
- }), _el$189, _co$38);
988
- web.insert(_el$173, web.createComponent(solidJs.Show, {
1094
+ }), _el$209, _co$43);
1095
+ web.insert(_el$193, web.createComponent(solidJs.Show, {
989
1096
  get when() {
990
1097
  return data().editable;
991
1098
  },
992
1099
  get children() {
993
- var _el$185 = web.getNextElement(_tmpl$49);
994
- _el$185.$$click = () => {
1100
+ var _el$205 = web.getNextElement(_tmpl$54);
1101
+ _el$205.$$click = () => {
995
1102
  var _a;
996
1103
  return (_a = props.onAction) == null ? void 0 : _a.call(props, "edit_prompt", data());
997
1104
  };
998
1105
  web.runHydrationEvents();
999
- return _el$185;
1106
+ return _el$205;
1000
1107
  }
1001
- }), _el$191, _co$39);
1002
- return _el$173;
1108
+ }), _el$211, _co$44);
1109
+ return _el$193;
1003
1110
  })();
1004
1111
  };
1005
1112
  web.delegateEvents(["click", "input"]);