PageSourceSearch

https://recork.org/_app/immutable/nodes/54.DXJt2eep.js

js recork.org collected 2026-09-25 21:07:11 UTC 5,164 bytes, 4 lines download raw bytes

1import"../chunks/CWj6FrbW.js";import"../chunks/69_IOA4Y.js";import{p as pe,g as he,x as W,y as _e,h as xe,i as ye,a as M,b as $e,s as we,l as e,j as be,m as u,e as h,f as R,k as i,D,z as y,$ as ke,aG as Se,c as o,r as l,n as O,t as Q,B as Ie,d as q,u as Me,q as Be}from"../chunks/7a2fV5I9.js";import{i as V}from"../chunks/Dw-yaK-_.js";import{h as Ue}from"../chunks/DKaByr9K.js";import{s as je,a as Ce}from"../chunks/3tOhmI7k.js";import{i as Ee}from"../chunks/CWFN-V6k.js";import{g as B}from"../chunks/BnvOT63w.js";import{p as Ne}from"../chunks/BewnZnAa.js";import{h as z,l as Ae,m as Le,o as We}from"../chunks/DKKyCjZm.js";import{u as De,e as F,d as Oe,i as X,j as qe,W as ze,c as Fe,k as Re}from"../chunks/C33EP41Y.js";import{M as Ge}from"../chunks/DD6X9srx.js";import{a as He,g as Je}from"../chunks/CDK5_MXF.js";import{g as Pe}from"../chunks/BIMfEMVU.js";import{t as Y}from"../chunks/B1RxOmHW.js";var Te=R('<meta name="robots" content="noindex,nofollow"/>'),Ke=R('<div class="absolute bottom-0 right-0 left-0 flex justify-center w-full bg-linear-to-b from-transparent to-white dark:to-gray-900"><div class="pb-5"><button class="px-3.5 py-1.5 text-sm font-normal bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-full"> </button></div></div>'),Qe=R('<div class="h-screen max-h-[100dvh] w-full flex flex-col text-gray-700 dark:text-gray-100 bg-white dark:bg-gray-900"><div class="flex flex-col flex-auto justify-center relative"><div class=" flex flex-col w-full flex-auto overflow-auto h-0" id="messages-container"><div><div class="px-3"><h1 class=" text-2xl font-normal line-clamp-1 m-0"> </h1> <div class="flex text-sm justify-between items-center mt-1"><time class="text-gray-400"> </time></div></div></div> <div class=" h-full w-full flex flex-col py-2" role="main"><div class="w-full"><!></div></div></div> <!></div></div>');function ut(Z,ee){pe(ee,!1);const S=()=>h(De,"$sessionUser",m),U=()=>h(Ne,"$page",m),te=()=>h(Fe,"$config",m),j=()=>h(F,"$settings",m),C=()=>h(re,"$i18n",m),E=()=>h(ze,"$WEBUI_NAME",m),ae=()=>h(X,"$chatId",m),[m,se]=we(),N=u(),re=he("i18n");z.extend(Ae);let G=u(!1),A=u(!0),oe="",H=u([""]),n=u(null),J=u(null),f=u(""),le=[],g=u([]),d=u({messages:{},currentId:null});const ie=async()=>{var _,p,$,x,I,w;const a=localStorage.token??"",s=U().params.id;if(!s)return null;const v=a?await He(a).catch(t=>null):null;if(v)F.set(v.ui);else{let t={};try{t=JSON.parse(localStorage.getItem("settings")??"{}")}catch(b){}F.set(t)}if(await Oe.set(a?await Pe(a,(p=(_=te())==null?void 0:_.features)!=null&&p.enable_direct_connections?(($=j())==null?void 0:$.directConnections)??null:null).catch(t=>[]):[]),await X.set(s),i(n,await qe(a,s).catch(async t=>(await B("/"),null))),e(n)){i(J,a?await Je(a,e(n).user_id).catch(b=>null):null);const t=e(n).chat;return t?(i(H,((t==null?void 0:t.models)??void 0)!==void 0?t.models:[t.models??""]),i(d,((t==null?void 0:t.history)??void 0)!==void 0?t.history:We(t.messages)),i(f,t.title),i(A,!0),await D(),e(g).length>0&&((x=e(g).at(-1))!=null&&x.id)&&((I=e(g).at(-1))==null?void 0:I.id)in e(d).messages&&Se(d,e(d).messages[(w=e(g).at(-1))==null?void 0:w.id].done=!0),await D(),!0):null}},ne=async()=>{if(!e(N)){Y.error(C().t("Access prohibited"));return}if(!e(n))return;const a=await Re(localStorage.token,e(n).id).catch(s=>(Y.error(`${s}`),null));a&&B(`/c/${a.id}`)};W(()=>e(d),()=>{i(g,Le(e(d),e(d).currentId))}),W(()=>S(),()=>{var a,s;i(N,S()&&(S().role==="admin"||(((s=(a=S().permissions)==null?void 0:a.chat)==null?void 0:s.import)??!0)))}),W(()=>(U(),B),()=>{U().params.id&&(async()=>await ie()?(await D(),i(G,!0)):await B("/"))()}),_e(),Ee();var P=xe();Ue("hrl0ku",a=>{var s=Te();be(v=>{ke.title=`
2		${v??""}
3	`},[()=>(e(f),E(),y(()=>e(f)?`${e(f).length>30?`${e(f).slice(0,30)}...`:e(f)} / ${E()}`:`${E()}`))]),M(a,s)});var ce=ye(P);{var de=a=>{var s=Qe(),v=o(s),_=o(v),p=o(_),$=o(p),x=o($),I=o(x,!0);l(x);var w=O(x,2),t=o(w),b=o(t,!0);l(t),l(w),l($),l(p);var T=O(p,2),K=o(T),ue=o(K);{let c=Me(()=>y(()=>le.length>0));Ge(ue,{className:"h-full flex pt-4 pb-8 ",get user(){return e(J)},get chatId(){return ae()},readOnly:!0,get selectedModels(){return e(H)},processing:oe,get bottomPadding(){return e(c)},sendMessage:()=>{},continueResponse:()=>{},regenerateResponse:()=>{},get history(){return e(d)},set history(r){i(d,r)},get messages(){return e(g)},set messages(r){i(g,r)},get autoScroll(){return e(A)},set autoScroll(r){i(A,r)},$$legacy:!0})}l(K),l(T),l(_);var me=O(_,2);{var fe=c=>{var r=Ke(),k=o(r),L=o(k),ge=o(L,!0);l(L),l(k),l(r),Q(ve=>q(ge,ve),[()=>(C(),y(()=>C().t("Clone Chat")))]),Be("click",L,ne),M(c,r)};V(me,c=>{e(N)&&c(fe)})}l(v),l(s),Q((c,r)=>
3{je(p,1,`pt-5 px-2 w-full ${j(),y(()=>{var k;return((k=j())==null?void 0:k.widescreenMode)??null?"max-w-full":"max-w-[58rem]"})??""} mx-auto`),q(I,e(f)),Ce(t,"datetime",c),q(b,r)},[()=>(e(n),y(()=>{var c,r;return new Date(((r=(c=e(n))==null?void 0:c.chat)==null?void 0:r.timestamp)||Date.now()).toISOString()})),()=>(Ie(z),e(n),y(()=>z(e(n).chat.timestamp).format("LLL")))]),M(a,s)};V(ce,a=>{e(G)&&a(de)})}M(Z,P),$e(),se()}export{ut as component};
4//# sourceMappingURL=54.DXJt2eep.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.