|
import { c as create_ssr_component, a as subscribe, v as validate_component, d as add_attribute, e as escape, h as each, l as compute_rest_props, f as spread, n as escape_attribute_value, g as escape_object, p as add_styles, s as setContext, j as getContext, q as compute_slots } from './ssr-6MZFlfLu.js'; |
|
import { w as writable } from './index2-f61NAEsz.js'; |
|
import 'exceljs'; |
|
import './ProgressBar.svelte_svelte_type_style_lang-H22V2Yrx.js'; |
|
import { L as LlmSelector } from './LlmSelector-fG0hpxMx.js'; |
|
import { S as SearchTypeSelector } from './SearchTypeSelector-iwYUZlnB.js'; |
|
import 'docx'; |
|
import 'file-saver'; |
|
import './stores-0qksNY90.js'; |
|
|
|
const cBase$2 = "textarea relative flex justify-center items-center"; |
|
const cInput = "w-full absolute top-0 left-0 right-0 bottom-0 z-[1] opacity-0 disabled:!opacity-0 cursor-pointer"; |
|
const cInterface$1 = "flex justify-center items-center text-center"; |
|
const FileDropzone = create_ssr_component(($$result, $$props, $$bindings, slots) => { |
|
let classesBase; |
|
let classesInput; |
|
let classesInterface; |
|
let $$restProps = compute_rest_props($$props, [ |
|
"files", |
|
"fileInput", |
|
"name", |
|
"border", |
|
"padding", |
|
"rounded", |
|
"regionInterface", |
|
"regionInterfaceText", |
|
"slotLead", |
|
"slotMessage", |
|
"slotMeta" |
|
]); |
|
let $$slots = compute_slots(slots); |
|
let { files = void 0 } = $$props; |
|
let { fileInput = void 0 } = $$props; |
|
let { name } = $$props; |
|
let { border = "border-2 border-dashed" } = $$props; |
|
let { padding = "p-4 py-8" } = $$props; |
|
let { rounded = "rounded-container-token" } = $$props; |
|
let { regionInterface = "" } = $$props; |
|
let { regionInterfaceText = "" } = $$props; |
|
let { slotLead = "mb-4" } = $$props; |
|
let { slotMessage = "" } = $$props; |
|
let { slotMeta = "opacity-75" } = $$props; |
|
function prunedRestProps() { |
|
delete $$restProps.class; |
|
return $$restProps; |
|
} |
|
if ($$props.files === void 0 && $$bindings.files && files !== void 0) |
|
$$bindings.files(files); |
|
if ($$props.fileInput === void 0 && $$bindings.fileInput && fileInput !== void 0) |
|
$$bindings.fileInput(fileInput); |
|
if ($$props.name === void 0 && $$bindings.name && name !== void 0) |
|
$$bindings.name(name); |
|
if ($$props.border === void 0 && $$bindings.border && border !== void 0) |
|
$$bindings.border(border); |
|
if ($$props.padding === void 0 && $$bindings.padding && padding !== void 0) |
|
$$bindings.padding(padding); |
|
if ($$props.rounded === void 0 && $$bindings.rounded && rounded !== void 0) |
|
$$bindings.rounded(rounded); |
|
if ($$props.regionInterface === void 0 && $$bindings.regionInterface && regionInterface !== void 0) |
|
$$bindings.regionInterface(regionInterface); |
|
if ($$props.regionInterfaceText === void 0 && $$bindings.regionInterfaceText && regionInterfaceText !== void 0) |
|
$$bindings.regionInterfaceText(regionInterfaceText); |
|
if ($$props.slotLead === void 0 && $$bindings.slotLead && slotLead !== void 0) |
|
$$bindings.slotLead(slotLead); |
|
if ($$props.slotMessage === void 0 && $$bindings.slotMessage && slotMessage !== void 0) |
|
$$bindings.slotMessage(slotMessage); |
|
if ($$props.slotMeta === void 0 && $$bindings.slotMeta && slotMeta !== void 0) |
|
$$bindings.slotMeta(slotMeta); |
|
classesBase = `${cBase$2} ${border} ${padding} ${rounded} ${$$props.class ?? ""}`; |
|
classesInput = `${cInput}`; |
|
classesInterface = `${cInterface$1}`; |
|
return `<div class="${[ |
|
"dropzone " + escape(classesBase, true), |
|
$$restProps.disabled ? "opacity-50" : "" |
|
].join(" ").trim()}" data-testid="file-dropzone"> <input${spread( |
|
[ |
|
{ type: "file" }, |
|
{ name: escape_attribute_value(name) }, |
|
{ |
|
class: "dropzone-input " + escape(classesInput, true) |
|
}, |
|
escape_object(prunedRestProps()) |
|
], |
|
{} |
|
)}> <div class="${"dropzone-interface " + escape(classesInterface, true) + " " + escape(regionInterface, true)}"><div class="${"dropzone-interface-text " + escape(regionInterfaceText, true)}"> ${$$slots.lead ? `<div class="${"dropzone-lead " + escape(slotLead, true)}">${slots.lead ? slots.lead({}) : ``}</div>` : ``} <div class="${"dropzone-message " + escape(slotMessage, true)}">${slots.message ? slots.message({}) : `<strong data-svelte-h="svelte-13uz6lq">Upload a file</strong> or drag and drop`}</div> ${$$slots.meta ? `<small class="${"dropzone-meta " + escape(slotMeta, true)}">${slots.meta ? slots.meta({}) : ``}</small>` : ``}</div></div></div>`; |
|
}); |
|
const css = { |
|
code: ".anim-indeterminate.svelte-12wvf64{transform-origin:0% 50%;animation:svelte-12wvf64-anim-indeterminate 2s infinite linear}@keyframes svelte-12wvf64-anim-indeterminate{0%{transform:translateX(0) scaleX(0)}40%{transform:translateX(0) scaleX(0.4)}100%{transform:translateX(100%) scaleX(0.5)}}", |
|
map: null |
|
}; |
|
const cTrack = "w-full overflow-hidden"; |
|
const cMeter = "h-full"; |
|
const ProgressBar = create_ssr_component(($$result, $$props, $$bindings, slots) => { |
|
let fillPercent; |
|
let indeterminate; |
|
let classesIndeterminate; |
|
let classesTrack; |
|
let classesMeter; |
|
let { value = void 0 } = $$props; |
|
let { min = 0 } = $$props; |
|
let { max = 100 } = $$props; |
|
let { height = "h-2" } = $$props; |
|
let { rounded = "rounded-token" } = $$props; |
|
let { transition = "transition-[width]" } = $$props; |
|
let { animIndeterminate = "anim-indeterminate" } = $$props; |
|
let { meter = "bg-surface-900-50-token" } = $$props; |
|
let { track = "bg-surface-200-700-token" } = $$props; |
|
let { labelledby = "" } = $$props; |
|
if ($$props.value === void 0 && $$bindings.value && value !== void 0) |
|
$$bindings.value(value); |
|
if ($$props.min === void 0 && $$bindings.min && min !== void 0) |
|
$$bindings.min(min); |
|
if ($$props.max === void 0 && $$bindings.max && max !== void 0) |
|
$$bindings.max(max); |
|
if ($$props.height === void 0 && $$bindings.height && height !== void 0) |
|
$$bindings.height(height); |
|
if ($$props.rounded === void 0 && $$bindings.rounded && rounded !== void 0) |
|
$$bindings.rounded(rounded); |
|
if ($$props.transition === void 0 && $$bindings.transition && transition !== void 0) |
|
$$bindings.transition(transition); |
|
if ($$props.animIndeterminate === void 0 && $$bindings.animIndeterminate && animIndeterminate !== void 0) |
|
$$bindings.animIndeterminate(animIndeterminate); |
|
if ($$props.meter === void 0 && $$bindings.meter && meter !== void 0) |
|
$$bindings.meter(meter); |
|
if ($$props.track === void 0 && $$bindings.track && track !== void 0) |
|
$$bindings.track(track); |
|
if ($$props.labelledby === void 0 && $$bindings.labelledby && labelledby !== void 0) |
|
$$bindings.labelledby(labelledby); |
|
$$result.css.add(css); |
|
fillPercent = value ? 100 * (value - min) / (max - min) : 0; |
|
indeterminate = value === void 0 || value < 0; |
|
classesIndeterminate = indeterminate ? animIndeterminate : ""; |
|
classesTrack = `${cTrack} ${track} ${height} ${rounded} ${$$props.class ?? ""}`; |
|
classesMeter = `${cMeter} ${meter} ${rounded} ${classesIndeterminate} ${transition}`; |
|
return ` <div class="${"progress-bar " + escape(classesTrack, true) + " svelte-12wvf64"}" data-testid="progress-bar" role="progressbar"${add_attribute("aria-labelledby", labelledby, 0)}${add_attribute("aria-valuenow", value, 0)}${add_attribute("aria-valuemin", min, 0)}${add_attribute("aria-valuemax", max - min, 0)}> <div class="${"progress-bar-meter " + escape(classesMeter, true) + " svelte-12wvf64"}"${add_styles({ |
|
"width": `${indeterminate ? 100 : fillPercent}%` |
|
})}></div> </div>`; |
|
}); |
|
const cBase$1 = "space-y-4"; |
|
const cList = "flex overflow-x-auto hide-scrollbar"; |
|
const cPanel = ""; |
|
const TabGroup = create_ssr_component(($$result, $$props, $$bindings, slots) => { |
|
let classesBase; |
|
let classesList; |
|
let classesPanel; |
|
let $$slots = compute_slots(slots); |
|
let { justify = "justify-start" } = $$props; |
|
let { border = "border-b border-surface-400-500-token" } = $$props; |
|
let { active = "border-b-2 border-surface-900-50-token" } = $$props; |
|
let { hover = "hover:variant-soft" } = $$props; |
|
let { flex = "flex-none" } = $$props; |
|
let { padding = "px-4 py-2" } = $$props; |
|
let { rounded = "rounded-tl-container-token rounded-tr-container-token" } = $$props; |
|
let { spacing = "space-y-1" } = $$props; |
|
let { regionList = "" } = $$props; |
|
let { regionPanel = "" } = $$props; |
|
let { labelledby = "" } = $$props; |
|
let { panel = "" } = $$props; |
|
setContext("active", active); |
|
setContext("hover", hover); |
|
setContext("flex", flex); |
|
setContext("padding", padding); |
|
setContext("rounded", rounded); |
|
setContext("spacing", spacing); |
|
if ($$props.justify === void 0 && $$bindings.justify && justify !== void 0) |
|
$$bindings.justify(justify); |
|
if ($$props.border === void 0 && $$bindings.border && border !== void 0) |
|
$$bindings.border(border); |
|
if ($$props.active === void 0 && $$bindings.active && active !== void 0) |
|
$$bindings.active(active); |
|
if ($$props.hover === void 0 && $$bindings.hover && hover !== void 0) |
|
$$bindings.hover(hover); |
|
if ($$props.flex === void 0 && $$bindings.flex && flex !== void 0) |
|
$$bindings.flex(flex); |
|
if ($$props.padding === void 0 && $$bindings.padding && padding !== void 0) |
|
$$bindings.padding(padding); |
|
if ($$props.rounded === void 0 && $$bindings.rounded && rounded !== void 0) |
|
$$bindings.rounded(rounded); |
|
if ($$props.spacing === void 0 && $$bindings.spacing && spacing !== void 0) |
|
$$bindings.spacing(spacing); |
|
if ($$props.regionList === void 0 && $$bindings.regionList && regionList !== void 0) |
|
$$bindings.regionList(regionList); |
|
if ($$props.regionPanel === void 0 && $$bindings.regionPanel && regionPanel !== void 0) |
|
$$bindings.regionPanel(regionPanel); |
|
if ($$props.labelledby === void 0 && $$bindings.labelledby && labelledby !== void 0) |
|
$$bindings.labelledby(labelledby); |
|
if ($$props.panel === void 0 && $$bindings.panel && panel !== void 0) |
|
$$bindings.panel(panel); |
|
classesBase = `${cBase$1} ${$$props.class ?? ""}`; |
|
classesList = `${cList} ${justify} ${border} ${regionList}`; |
|
classesPanel = `${cPanel} ${regionPanel}`; |
|
return ` <div class="${"tab-group " + escape(classesBase, true)}" data-testid="tab-group"> <div class="${"tab-list " + escape(classesList, true)}" role="tablist"${add_attribute("aria-labelledby", labelledby, 0)}>${slots.default ? slots.default({}) : ``}</div> ${$$slots.panel ? `<div class="${"tab-panel " + escape(classesPanel, true)}" role="tabpanel"${add_attribute("aria-labelledby", panel, 0)} tabindex="0">${slots.panel ? slots.panel({}) : ``}</div>` : ``}</div>`; |
|
}); |
|
const cBase = "text-center cursor-pointer transition-colors duration-100"; |
|
const cInterface = ""; |
|
const Tab = create_ssr_component(($$result, $$props, $$bindings, slots) => { |
|
let selected; |
|
let classesActive; |
|
let classesBase; |
|
let classesInterface; |
|
let classesTab; |
|
let $$restProps = compute_rest_props($$props, [ |
|
"group", |
|
"name", |
|
"value", |
|
"title", |
|
"controls", |
|
"regionTab", |
|
"active", |
|
"hover", |
|
"flex", |
|
"padding", |
|
"rounded", |
|
"spacing" |
|
]); |
|
let $$slots = compute_slots(slots); |
|
let { group } = $$props; |
|
let { name } = $$props; |
|
let { value } = $$props; |
|
let { title = "" } = $$props; |
|
let { controls = "" } = $$props; |
|
let { regionTab = "" } = $$props; |
|
let { active = getContext("active") } = $$props; |
|
let { hover = getContext("hover") } = $$props; |
|
let { flex = getContext("flex") } = $$props; |
|
let { padding = getContext("padding") } = $$props; |
|
let { rounded = getContext("rounded") } = $$props; |
|
let { spacing = getContext("spacing") } = $$props; |
|
let elemInput; |
|
function prunedRestProps() { |
|
delete $$restProps.class; |
|
return $$restProps; |
|
} |
|
if ($$props.group === void 0 && $$bindings.group && group !== void 0) |
|
$$bindings.group(group); |
|
if ($$props.name === void 0 && $$bindings.name && name !== void 0) |
|
$$bindings.name(name); |
|
if ($$props.value === void 0 && $$bindings.value && value !== void 0) |
|
$$bindings.value(value); |
|
if ($$props.title === void 0 && $$bindings.title && title !== void 0) |
|
$$bindings.title(title); |
|
if ($$props.controls === void 0 && $$bindings.controls && controls !== void 0) |
|
$$bindings.controls(controls); |
|
if ($$props.regionTab === void 0 && $$bindings.regionTab && regionTab !== void 0) |
|
$$bindings.regionTab(regionTab); |
|
if ($$props.active === void 0 && $$bindings.active && active !== void 0) |
|
$$bindings.active(active); |
|
if ($$props.hover === void 0 && $$bindings.hover && hover !== void 0) |
|
$$bindings.hover(hover); |
|
if ($$props.flex === void 0 && $$bindings.flex && flex !== void 0) |
|
$$bindings.flex(flex); |
|
if ($$props.padding === void 0 && $$bindings.padding && padding !== void 0) |
|
$$bindings.padding(padding); |
|
if ($$props.rounded === void 0 && $$bindings.rounded && rounded !== void 0) |
|
$$bindings.rounded(rounded); |
|
if ($$props.spacing === void 0 && $$bindings.spacing && spacing !== void 0) |
|
$$bindings.spacing(spacing); |
|
selected = value === group; |
|
classesActive = selected ? active : hover; |
|
classesBase = `${cBase} ${flex} ${padding} ${rounded} ${classesActive} ${$$props.class ?? ""}`; |
|
classesInterface = `${cInterface} ${spacing}`; |
|
classesTab = `${regionTab}`; |
|
return `<label${add_attribute("class", classesBase, 0)}${add_attribute("title", title, 0)}> <div class="${"tab " + escape(classesTab, true)}" data-testid="tab" role="tab"${add_attribute("aria-controls", controls, 0)}${add_attribute("aria-selected", selected, 0)}${add_attribute("tabindex", selected ? 0 : -1, 0)}> <div class="h-0 w-0 overflow-hidden"><input${spread( |
|
[ |
|
{ type: "radio" }, |
|
{ name: escape_attribute_value(name) }, |
|
{ value: escape_attribute_value(value) }, |
|
escape_object(prunedRestProps()), |
|
{ tabindex: "-1" } |
|
], |
|
{} |
|
)}${add_attribute("this", elemInput, 0)}${value === group ? add_attribute("checked", true, 1) : ""}></div> <div class="${"tab-interface " + escape(classesInterface, true)}">${$$slots.lead ? `<div class="tab-lead">${slots.lead ? slots.lead({}) : ``}</div>` : ``} <div class="tab-label">${slots.default ? slots.default({}) : ``}</div></div></div></label>`; |
|
}); |
|
const Page = create_ssr_component(($$result, $$props, $$bindings, slots) => { |
|
let $files, $$unsubscribe_files; |
|
let $progressBarState, $$unsubscribe_progressBarState; |
|
let $activeTab, $$unsubscribe_activeTab; |
|
let $expandedRequest, $$unsubscribe_expandedRequest; |
|
let $expandedExpertAnswer, $$unsubscribe_expandedExpertAnswer; |
|
let $expandedLlmAnswer, $$unsubscribe_expandedLlmAnswer; |
|
let $expandedEvaluation, $$unsubscribe_expandedEvaluation; |
|
let $tabSet, $$unsubscribe_tabSet; |
|
let { data } = $$props; |
|
data.Model; |
|
let selectedExpertLlm; |
|
let selectedStudentLlm; |
|
let isInvestigatorEnabled = false; |
|
let enableQueryExpansionSearch = false; |
|
let enableOlympicSearch = false; |
|
let runExpertLlm = true; |
|
let llmThreadsCount = 1; |
|
let activeFile = ""; |
|
new AbortController(); |
|
const tabSet = writable(0); |
|
$$unsubscribe_tabSet = subscribe(tabSet, (value) => $tabSet = value); |
|
let files = writable([]); |
|
$$unsubscribe_files = subscribe(files, (value) => $files = value); |
|
let activeTab = writable(null); |
|
$$unsubscribe_activeTab = subscribe(activeTab, (value) => $activeTab = value); |
|
let expandedLlmAnswer = writable({}); |
|
$$unsubscribe_expandedLlmAnswer = subscribe(expandedLlmAnswer, (value) => $expandedLlmAnswer = value); |
|
let expandedEvaluation = writable({}); |
|
$$unsubscribe_expandedEvaluation = subscribe(expandedEvaluation, (value) => $expandedEvaluation = value); |
|
let expandedRequest = writable({}); |
|
$$unsubscribe_expandedRequest = subscribe(expandedRequest, (value) => $expandedRequest = value); |
|
let expandedExpertAnswer = writable({}); |
|
$$unsubscribe_expandedExpertAnswer = subscribe(expandedExpertAnswer, (value) => $expandedExpertAnswer = value); |
|
let progressBarState = writable({}); |
|
$$unsubscribe_progressBarState = subscribe(progressBarState, (value) => $progressBarState = value); |
|
let startProcessingButtonText = "Запустить обработку"; |
|
if ($$props.data === void 0 && $$bindings.data && data !== void 0) |
|
$$bindings.data(data); |
|
let $$settled; |
|
let $$rendered; |
|
let previous_head = $$result.head; |
|
do { |
|
$$settled = true; |
|
$$result.head = previous_head; |
|
activeFile = $files.find((file) => file.id === $activeTab); |
|
$$rendered = `<div class="flex flex-col items-center justify-center p-4"> ${validate_component(FileDropzone, "FileDropzone").$$render($$result, {}, {}, { |
|
meta: () => { |
|
return `Только xlsx`; |
|
}, |
|
message: () => { |
|
return `Перетащите файл сюда или нажмите, чтобы выбрать файл.`; |
|
} |
|
})} ${$files.length > 0 ? ` ${validate_component(TabGroup, "TabGroup").$$render($$result, {}, {}, { |
|
panel: () => { |
|
return `<button class="mb-4 chip variant-filled-error" data-svelte-h="svelte-1wp71c2">Удалить файл</button> ${activeFile ? `${$progressBarState[activeFile.id].processingStarted ? `${validate_component(ProgressBar, "ProgressBar").$$render( |
|
$$result, |
|
{ |
|
value: $progressBarState[activeFile.id].completedTasks / $progressBarState[activeFile.id].totalTasks * 100, |
|
max: 100 |
|
}, |
|
{}, |
|
{} |
|
)}` : ``} <div class="flex justify-start mt-4 space-x-5"><div class="flex items-center space-x-2"><label><input type="checkbox" class="checkbox"${add_attribute("checked", isInvestigatorEnabled, 1)}> |
|
Почемучка</label></div> ${``}</div> <div class="flex justify-start mt-4 space-x-5"><div>Отвечает: ${validate_component(LlmSelector, "LlmSelector").$$render( |
|
$$result, |
|
{ selectedLLM: selectedStudentLlm }, |
|
{ |
|
selectedLLM: ($$value) => { |
|
selectedStudentLlm = $$value; |
|
$$settled = false; |
|
} |
|
}, |
|
{} |
|
)}</div> <div class="flex items-center space-x-2"><input type="checkbox" class="checkbox"${add_attribute("checked", runExpertLlm, 1)}> <p data-svelte-h="svelte-da92hf">Оценивать ответ</p></div> ${`<div>Оценивает: ${validate_component(LlmSelector, "LlmSelector").$$render( |
|
$$result, |
|
{ selectedLLM: selectedExpertLlm }, |
|
{ |
|
selectedLLM: ($$value) => { |
|
selectedExpertLlm = $$value; |
|
$$settled = false; |
|
} |
|
}, |
|
{} |
|
)}</div>`}</div> <div class="flex justify-start mt-4 space-x-5 items-center"><label>Количество потоков: <input type="number" min="1" max="100" class="input input-bordered w-32"${add_attribute("value", llmThreadsCount, 0)}></label> <div data-svelte-h="svelte-711pt3">Тип поиска:</div> ${validate_component(SearchTypeSelector, "SearchTypeSelector").$$render( |
|
$$result, |
|
{ |
|
use_olympic: enableOlympicSearch, |
|
use_qe: enableQueryExpansionSearch |
|
}, |
|
{ |
|
use_olympic: ($$value) => { |
|
enableOlympicSearch = $$value; |
|
$$settled = false; |
|
}, |
|
use_qe: ($$value) => { |
|
enableQueryExpansionSearch = $$value; |
|
$$settled = false; |
|
} |
|
}, |
|
{} |
|
)}</div> <div class="flex justify-start mt-4 space-x-5"></div> <div class="flex justify-between mt-4"><button class="btn variant-filled-primary space-x-2 m-2 w-60">${escape(startProcessingButtonText)}</button> <button class="btn variant-filled-primary space-x-2 m-2 w-60" data-svelte-h="svelte-1lfta1">Скачать</button></div> <table class="table-auto w-full mt-4"><thead data-svelte-h="svelte-7jjxgh"><tr><th class="border p-2">Вопрос пользователя</th> <th class="border p-2">Ответ эксперта</th> <th class="border p-2">Ответ LLM</th> <th class="border p-2">Ответ оценки LLM</th> <th class="border p-2">Оценка</th></tr></thead> <tbody>${each(activeFile.data, (row) => { |
|
return `<tr><td class="border p-2">${$expandedRequest[row.id] ? `<!-- HTML_TAG_START -->${row.request?.replace(/\n/g, "<br>")}<!-- HTML_TAG_END --> <a href="#" class="${[ |
|
"text-blue-500 cursor-pointer", |
|
row.request?.replace(/\n/g, "<br>").length > 100 ? "hidden" : "" |
|
].join(" ").trim()}" data-svelte-h="svelte-4wwxnw">Свернуть</a>` : `<!-- HTML_TAG_START -->${row.request?.replace(/\n/g, "<br>").length > 100 ? row.request?.replace(/\n/g, "<br>").slice(0, 100) + "..." : row.request?.replace(/\n/g, "<br>")}<!-- HTML_TAG_END --> <a href="#" class="${[ |
|
"text-blue-500 cursor-pointer", |
|
row.request?.replace(/\n/g, "<br>").length <= 100 ? "hidden" : "" |
|
].join(" ").trim()}" data-svelte-h="svelte-ywkf0q">Развернуть</a>`}</td> <td class="border p-2">${$expandedExpertAnswer[row.id] ? `<!-- HTML_TAG_START -->${row.expertAnswer.replace(/\n/g, "<br>")}<!-- HTML_TAG_END --> <a href="#" class="${[ |
|
"text-blue-500 cursor-pointer", |
|
row.llmAnswer?.replace(/\n/g, "<br>").length > 100 ? "hidden" : "" |
|
].join(" ").trim()}" data-svelte-h="svelte-12lel02">Свернуть</a>` : `<!-- HTML_TAG_START -->${row.expertAnswer?.replace(/\n/g, "<br>").length > 100 ? row.expertAnswer?.replace(/\n/g, "<br>").slice(0, 100) + "..." : row.expertAnswer?.replace(/\n/g, "<br>")}<!-- HTML_TAG_END --> <a href="#" class="${[ |
|
"text-blue-500 cursor-pointer", |
|
row.expertAnswer?.replace(/\n/g, "<br>").length <= 100 ? "hidden" : "" |
|
].join(" ").trim()}" data-svelte-h="svelte-vvsd3m">Развернуть</a>`}</td> <td class="border p-2"><div class="whitespace-pre-wrap">${$expandedLlmAnswer[row.id] ? `<!-- HTML_TAG_START -->${row.llmAnswer?.replace(/\n/g, "<br>")}<!-- HTML_TAG_END --> <a class="${[ |
|
"text-blue-500 cursor-pointer", |
|
row.llmAnswer?.replace(/\n/g, "<br>").length > 100 ? "hidden" : "" |
|
].join(" ").trim()}" data-svelte-h="svelte-8hufxq">Свернуть</a>` : `<!-- HTML_TAG_START -->${row.llmAnswer?.replace(/\n/g, "<br>").length > 100 ? row.llmAnswer?.replace(/\n/g, "<br>").slice(0, 100) + "..." : row.llmAnswer?.replace(/\n/g, "<br>")}<!-- HTML_TAG_END --> <a class="${[ |
|
"text-blue-500 cursor-pointer", |
|
row.llmAnswer?.replace(/\n/g, "<br>").length <= 100 ? "hidden" : "" |
|
].join(" ").trim()}" data-svelte-h="svelte-12v4ty">Развернуть</a>`} </div></td> <td class="border p-2">${row.evaluation ? `${$expandedEvaluation[row.id] ? `<!-- HTML_TAG_START -->${row.evaluation?.replace(/\n/g, "<br>")}<!-- HTML_TAG_END --> <a class="${[ |
|
"text-blue-500 cursor-pointer", |
|
row.evaluation?.replace(/\n/g, "<br>").length > 100 ? "hidden" : "" |
|
].join(" ").trim()}" data-svelte-h="svelte-1ympil6">Свернуть</a>` : `<!-- HTML_TAG_START -->${row.evaluation?.replace(/\n/g, "<br>").length > 100 ? row.evaluation?.replace(/\n/g, "<br>").slice(0, 100) + "..." : row.evaluation?.replace(/\n/g, "<br>")}<!-- HTML_TAG_END --> <a class="${[ |
|
"text-blue-500 cursor-pointer", |
|
row.evaluation?.replace(/\n/g, "<br>").length <= 100 ? "hidden" : "" |
|
].join(" ").trim()}" data-svelte-h="svelte-ank2y6">Развернуть</a>`} ` : ``}</td> <td class="border p-2">${escape(row.mark)}</td> </tr>`; |
|
})}</tbody></table>` : ``} `; |
|
}, |
|
default: () => { |
|
return `${each($files, (file, index) => { |
|
return `${validate_component(Tab, "Tab").$$render( |
|
$$result, |
|
{ |
|
name: file.name, |
|
value: index, |
|
group: $tabSet |
|
}, |
|
{ |
|
group: ($$value) => { |
|
$tabSet = $$value; |
|
$$settled = false; |
|
} |
|
}, |
|
{ |
|
default: () => { |
|
return `<span>${escape(file.id)} ${escape(file.name)}</span> `; |
|
} |
|
} |
|
)}`; |
|
})}`; |
|
} |
|
})}` : ``} </div>`; |
|
} while (!$$settled); |
|
$$unsubscribe_files(); |
|
$$unsubscribe_progressBarState(); |
|
$$unsubscribe_activeTab(); |
|
$$unsubscribe_expandedRequest(); |
|
$$unsubscribe_expandedExpertAnswer(); |
|
$$unsubscribe_expandedLlmAnswer(); |
|
$$unsubscribe_expandedEvaluation(); |
|
$$unsubscribe_tabSet(); |
|
return $$rendered; |
|
}); |
|
|
|
export { Page as default }; |
|
|
|
|