adminizer 4.6.0-build.216 → 4.6.0-build.217

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.
@@ -1 +1 @@
1
- import{u as t,j as o}from"./app.js";import{A as m}from"./app-layout-C8wmVuF8.js";import{A as p}from"./RelationDialogStack-BKadPz2U.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-DbPu3ZPM.js";import"./app-sidebar-hVOY5HV7.js";import"./nav-main-8YJwixyP.js";import"./material-icon-BXxpxGAd.js";import"./app-sidebar-header-B__FqkNk.js";import"./breadcrumbs-CkRn0IkH.js";import"./nav-user-Booo1xYl.js";import"./user-info-Cb4KumEO.js";import"./user-menu-content-BoS7_3sB.js";import"./theme-switcher-Bx74FM9Q.js";import"./icon-BTIjB9Wk.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-CSrUHo1P.js";const i=[];function P(){const r=t();return o.jsx(m,{breadcrumbs:i,children:o.jsx(p,{page:r,catalog:!1})})}export{P as default};
1
+ import{u as t,j as o}from"./app.js";import{A as m}from"./app-layout-HwzoFLMz.js";import{A as p}from"./RelationDialogStack-BKadPz2U.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-DbPu3ZPM.js";import"./app-sidebar-Cqj5L2kB.js";import"./nav-main-8YJwixyP.js";import"./material-icon-BXxpxGAd.js";import"./app-sidebar-header-B__FqkNk.js";import"./breadcrumbs-CkRn0IkH.js";import"./nav-user-Booo1xYl.js";import"./user-info-Cb4KumEO.js";import"./user-menu-content-BoS7_3sB.js";import"./theme-switcher-Bx74FM9Q.js";import"./icon-BTIjB9Wk.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-CSrUHo1P.js";const i=[];function P(){const r=t();return o.jsx(m,{breadcrumbs:i,children:o.jsx(p,{page:r,catalog:!1})})}export{P as default};
@@ -1 +1 @@
1
- import{j as r}from"./app.js";import{A as o}from"./app-layout-C8wmVuF8.js";import t from"./add-group-form-B7c4coU-.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-DbPu3ZPM.js";import"./app-sidebar-hVOY5HV7.js";import"./nav-main-8YJwixyP.js";import"./material-icon-BXxpxGAd.js";import"./app-sidebar-header-B__FqkNk.js";import"./breadcrumbs-CkRn0IkH.js";import"./nav-user-Booo1xYl.js";import"./user-info-Cb4KumEO.js";import"./user-menu-content-BoS7_3sB.js";import"./theme-switcher-Bx74FM9Q.js";import"./icon-BTIjB9Wk.js";import"./RelationDialogStack-BKadPz2U.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-CSrUHo1P.js";const m=[];function L(){return r.jsx(o,{breadcrumbs:m,children:r.jsx(t,{})})}export{L as default};
1
+ import{j as r}from"./app.js";import{A as o}from"./app-layout-HwzoFLMz.js";import t from"./add-group-form-B7c4coU-.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-DbPu3ZPM.js";import"./app-sidebar-Cqj5L2kB.js";import"./nav-main-8YJwixyP.js";import"./material-icon-BXxpxGAd.js";import"./app-sidebar-header-B__FqkNk.js";import"./breadcrumbs-CkRn0IkH.js";import"./nav-user-Booo1xYl.js";import"./user-info-Cb4KumEO.js";import"./user-menu-content-BoS7_3sB.js";import"./theme-switcher-Bx74FM9Q.js";import"./icon-BTIjB9Wk.js";import"./RelationDialogStack-BKadPz2U.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-CSrUHo1P.js";const m=[];function L(){return r.jsx(o,{breadcrumbs:m,children:r.jsx(t,{})})}export{L as default};
@@ -1 +1 @@
1
- import{j as r}from"./app.js";import{A as o}from"./app-layout-C8wmVuF8.js";import t from"./add-user-form-BXSGx38D.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-DbPu3ZPM.js";import"./app-sidebar-hVOY5HV7.js";import"./nav-main-8YJwixyP.js";import"./material-icon-BXxpxGAd.js";import"./app-sidebar-header-B__FqkNk.js";import"./breadcrumbs-CkRn0IkH.js";import"./nav-user-Booo1xYl.js";import"./user-info-Cb4KumEO.js";import"./user-menu-content-BoS7_3sB.js";import"./theme-switcher-Bx74FM9Q.js";import"./icon-BTIjB9Wk.js";import"./RelationDialogStack-BKadPz2U.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-CSrUHo1P.js";const m=[];function L(){return r.jsx(o,{breadcrumbs:m,children:r.jsx(t,{})})}export{L as default};
1
+ import{j as r}from"./app.js";import{A as o}from"./app-layout-HwzoFLMz.js";import t from"./add-user-form-BXSGx38D.js";import"./jsoneditor-De1FvcYu.js";import"./handsontable-PxYdjN8c.js";import"./monaco-BhBYtg3d.js";import"./app-shell-DbPu3ZPM.js";import"./app-sidebar-Cqj5L2kB.js";import"./nav-main-8YJwixyP.js";import"./material-icon-BXxpxGAd.js";import"./app-sidebar-header-B__FqkNk.js";import"./breadcrumbs-CkRn0IkH.js";import"./nav-user-Booo1xYl.js";import"./user-info-Cb4KumEO.js";import"./user-menu-content-BoS7_3sB.js";import"./theme-switcher-Bx74FM9Q.js";import"./icon-BTIjB9Wk.js";import"./RelationDialogStack-BKadPz2U.js";import"./dynamic-controls-k61T9W2P.js";import"./input-error-CSrUHo1P.js";const m=[];function L(){return r.jsx(o,{breadcrumbs:m,children:r.jsx(t,{})})}export{L as default};
@@ -1 +1 @@
1
- import{u as E,j as e,ah as I,an as P,ao as L,B as v,ap as R,S as z,c as C,d as D,e as M,f as T,aq as w,ar as k,L as O}from"./app.js";import B from"./app-shell-DbPu3ZPM.js";import{AppSidebar as K}from"./app-sidebar-hVOY5HV7.js";import{A as V,a as N,N as _,b as F}from"./app-sidebar-header-B__FqkNk.js";import{r as l}from"./handsontable-PxYdjN8c.js";import{R as H}from"./RelationDialogStack-BKadPz2U.js";const q=l.memo(({children:o,breadcrumbs:a=[],className:i})=>{const n=E();return e.jsxs(B,{variant:"sidebar",children:[e.jsx(I,{title:n.props.title}),e.jsx(K,{}),e.jsxs(P,{className:i,children:[e.jsx(V,{breadcrumbs:a}),e.jsx("div",{className:"relative flex-1 overflow-hidden",children:e.jsx("div",{className:"h-full",children:o})})]})]})});function $({width:o="min(25vw, 420px)"}){const{isEnabled:a,isOpen:i,closeChat:n,models:s,activeModel:r,setActiveModel:d,messages:c,loading:m,sending:x,error:g,sendMessage:y}=N(),[f,h]=l.useState(""),j=l.useRef(null);l.useEffect(()=>{i||h("")},[i]),l.useEffect(()=>{j.current&&j.current.scrollIntoView({behavior:"smooth"})},[c]);const u=s.length>0,A=async t=>{t.preventDefault();const p=f.trim();p&&(await y(p),h(""))},S=t=>{if((t.ctrlKey||t.metaKey)&&t.key==="Enter"){t.preventDefault();const p=f.trim();p&&!x&&(y(p),h(""))}};return a?e.jsxs("aside",{id:"ai-assistant-panel","aria-label":"AI assistant chat","aria-hidden":!i,className:w("bg-card text-card-foreground fixed bottom-0 right-0 top-0 z-[60] flex h-full flex-col border-l shadow-xl transition-all duration-300 ease-in-out","md:w-auto w-full",i?"translate-x-0 opacity-100":"translate-x-full opacity-0 pointer-events-none"),style:{width:"var(--ai-assistant-panel-actual-width, "+o+")"},children:[e.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{className:"size-5 text-primary"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-semibold leading-tight",children:"AI assistant"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Chat with your selected model."})]})]}),e.jsx(v,{variant:"ghost",size:"icon",onClick:n,"aria-label":"Close AI assistant",children:e.jsx(R,{className:"size-4"})})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-4 overflow-hidden px-4 py-4",children:[!u&&!m&&e.jsx("div",{className:"flex flex-1 items-center justify-center rounded-md border border-dashed p-6 text-sm text-muted-foreground",children:"No AI models are available for your account."}),u&&e.jsxs(e.Fragment,{children:[e.jsxs(z,{value:r,onValueChange:d,children:[e.jsx(C,{className:"w-full",children:e.jsx(D,{placeholder:"Select a model"})}),e.jsx(M,{className:"z-[70]",children:s.map(t=>e.jsx(T,{value:t.id,children:e.jsxs("div",{className:"flex flex-col text-left",children:[e.jsx("span",{className:"font-medium",children:t.name}),t.description&&e.jsx("span",{className:"text-xs text-muted-foreground",children:t.description})]})},t.id))})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-3 overflow-hidden rounded-md border bg-background p-4",children:[e.jsxs("div",{className:"flex-1 space-y-3 overflow-y-auto pr-2","data-ai-assistant-messages":!0,children:[m&&e.jsx("div",{className:"flex justify-center py-6 text-sm text-muted-foreground",children:"Loading conversation..."}),!m&&c.length===0&&e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"Start a conversation to see responses here."}),c.map(t=>e.jsxs("div",{className:w("flex flex-col gap-1 rounded-md border p-3 text-sm shadow-xs",t.role==="assistant"?"border-primary/30 bg-primary/5":"border-border bg-background"),children:[e.jsx("span",{className:"font-semibold",children:t.role==="assistant"?"Assistant":"You"}),e.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",children:t.content}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(t.timestamp).toLocaleTimeString()})]},t.id)),e.jsx("div",{ref:j})]}),e.jsxs("form",{className:"space-y-2",onSubmit:A,children:[e.jsx(k,{placeholder:u?"Type your question... (Ctrl+Enter to send)":"No models available",value:f,onChange:t=>h(t.target.value),onKeyDown:S,disabled:!u||x,rows:3}),e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g&&e.jsx("span",{className:"text-xs text-destructive",children:g}),e.jsx(v,{type:"submit",disabled:!u||x||!f.trim(),children:x?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"size-4 animate-spin"}),"Sending…"]}):"Send"})]})]})]})]})]})]}):null}const G="min(25vw, 420px)",b="margin-right 300ms ease-in-out";function U({children:o,panelWidth:a=G}){const{isEnabled:i,isOpen:n}=N();return l.useEffect(()=>{const s=document.getElementById("app");if(!s)return;const r=s.style.transition,d=r==null?void 0:r.includes("margin-right");return d||(s.style.transition=r?`${r}, ${b}`:b),s.classList.add("ai-assistant-host"),s.style.setProperty("--ai-assistant-panel-width",a),()=>{s.classList.remove("ai-assistant-host"),s.style.removeProperty("--ai-assistant-panel-width"),s.style.removeProperty("--ai-assistant-panel-actual-width"),s.style.removeProperty("margin-right"),delete s.dataset.aiAssistantOpen,d||(s.style.transition=r)}},[a]),l.useEffect(()=>{const s=document.getElementById("app");if(!s)return;const r=window.innerWidth<768,d=r?"100vw":a;s.style.setProperty("--ai-assistant-panel-actual-width",d),i&&n?(s.style.marginRight=r?"0":a,s.dataset.aiAssistantOpen="true"):(s.style.removeProperty("margin-right"),s.dataset.aiAssistantOpen="false");const c=()=>{const m=window.innerWidth<768,x=m?"100vw":a;s.style.setProperty("--ai-assistant-panel-actual-width",x),i&&n&&(s.style.marginRight=m?"0":a)};return window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[i,n,a]),e.jsxs(e.Fragment,{children:[o,e.jsx($,{width:a})]})}const ee=l.memo(({children:o,className:a,breadcrumbs:i,...n})=>e.jsx(_,{children:e.jsx(F,{children:e.jsxs(H,{children:[e.jsx(q,{breadcrumbs:i,className:a,...n,children:o}),e.jsx(U,{})]})})}));export{ee as A};
1
+ import{u as E,j as e,ah as I,an as P,ao as L,B as v,ap as R,S as z,c as C,d as D,e as M,f as T,aq as w,ar as k,L as O}from"./app.js";import B from"./app-shell-DbPu3ZPM.js";import{AppSidebar as K}from"./app-sidebar-Cqj5L2kB.js";import{A as V,a as N,N as _,b as F}from"./app-sidebar-header-B__FqkNk.js";import{r as l}from"./handsontable-PxYdjN8c.js";import{R as H}from"./RelationDialogStack-BKadPz2U.js";const q=l.memo(({children:o,breadcrumbs:a=[],className:i})=>{const n=E();return e.jsxs(B,{variant:"sidebar",children:[e.jsx(I,{title:n.props.title}),e.jsx(K,{}),e.jsxs(P,{className:i,children:[e.jsx(V,{breadcrumbs:a}),e.jsx("div",{className:"relative flex-1 overflow-hidden",children:e.jsx("div",{className:"h-full",children:o})})]})]})});function $({width:o="min(25vw, 420px)"}){const{isEnabled:a,isOpen:i,closeChat:n,models:s,activeModel:r,setActiveModel:d,messages:c,loading:m,sending:x,error:g,sendMessage:y}=N(),[f,h]=l.useState(""),j=l.useRef(null);l.useEffect(()=>{i||h("")},[i]),l.useEffect(()=>{j.current&&j.current.scrollIntoView({behavior:"smooth"})},[c]);const u=s.length>0,A=async t=>{t.preventDefault();const p=f.trim();p&&(await y(p),h(""))},S=t=>{if((t.ctrlKey||t.metaKey)&&t.key==="Enter"){t.preventDefault();const p=f.trim();p&&!x&&(y(p),h(""))}};return a?e.jsxs("aside",{id:"ai-assistant-panel","aria-label":"AI assistant chat","aria-hidden":!i,className:w("bg-card text-card-foreground fixed bottom-0 right-0 top-0 z-[60] flex h-full flex-col border-l shadow-xl transition-all duration-300 ease-in-out","md:w-auto w-full",i?"translate-x-0 opacity-100":"translate-x-full opacity-0 pointer-events-none"),style:{width:"var(--ai-assistant-panel-actual-width, "+o+")"},children:[e.jsxs("div",{className:"flex items-center justify-between border-b px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(L,{className:"size-5 text-primary"}),e.jsxs("div",{className:"flex flex-col",children:[e.jsx("span",{className:"font-semibold leading-tight",children:"AI assistant"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"Chat with your selected model."})]})]}),e.jsx(v,{variant:"ghost",size:"icon",onClick:n,"aria-label":"Close AI assistant",children:e.jsx(R,{className:"size-4"})})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-4 overflow-hidden px-4 py-4",children:[!u&&!m&&e.jsx("div",{className:"flex flex-1 items-center justify-center rounded-md border border-dashed p-6 text-sm text-muted-foreground",children:"No AI models are available for your account."}),u&&e.jsxs(e.Fragment,{children:[e.jsxs(z,{value:r,onValueChange:d,children:[e.jsx(C,{className:"w-full",children:e.jsx(D,{placeholder:"Select a model"})}),e.jsx(M,{className:"z-[70]",children:s.map(t=>e.jsx(T,{value:t.id,children:e.jsxs("div",{className:"flex flex-col text-left",children:[e.jsx("span",{className:"font-medium",children:t.name}),t.description&&e.jsx("span",{className:"text-xs text-muted-foreground",children:t.description})]})},t.id))})]}),e.jsxs("div",{className:"flex flex-1 flex-col gap-3 overflow-hidden rounded-md border bg-background p-4",children:[e.jsxs("div",{className:"flex-1 space-y-3 overflow-y-auto pr-2","data-ai-assistant-messages":!0,children:[m&&e.jsx("div",{className:"flex justify-center py-6 text-sm text-muted-foreground",children:"Loading conversation..."}),!m&&c.length===0&&e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"Start a conversation to see responses here."}),c.map(t=>e.jsxs("div",{className:w("flex flex-col gap-1 rounded-md border p-3 text-sm shadow-xs",t.role==="assistant"?"border-primary/30 bg-primary/5":"border-border bg-background"),children:[e.jsx("span",{className:"font-semibold",children:t.role==="assistant"?"Assistant":"You"}),e.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",children:t.content}),e.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(t.timestamp).toLocaleTimeString()})]},t.id)),e.jsx("div",{ref:j})]}),e.jsxs("form",{className:"space-y-2",onSubmit:A,children:[e.jsx(k,{placeholder:u?"Type your question... (Ctrl+Enter to send)":"No models available",value:f,onChange:t=>h(t.target.value),onKeyDown:S,disabled:!u||x,rows:3}),e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g&&e.jsx("span",{className:"text-xs text-destructive",children:g}),e.jsx(v,{type:"submit",disabled:!u||x||!f.trim(),children:x?e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(O,{className:"size-4 animate-spin"}),"Sending…"]}):"Send"})]})]})]})]})]})]}):null}const G="min(25vw, 420px)",b="margin-right 300ms ease-in-out";function U({children:o,panelWidth:a=G}){const{isEnabled:i,isOpen:n}=N();return l.useEffect(()=>{const s=document.getElementById("app");if(!s)return;const r=s.style.transition,d=r==null?void 0:r.includes("margin-right");return d||(s.style.transition=r?`${r}, ${b}`:b),s.classList.add("ai-assistant-host"),s.style.setProperty("--ai-assistant-panel-width",a),()=>{s.classList.remove("ai-assistant-host"),s.style.removeProperty("--ai-assistant-panel-width"),s.style.removeProperty("--ai-assistant-panel-actual-width"),s.style.removeProperty("margin-right"),delete s.dataset.aiAssistantOpen,d||(s.style.transition=r)}},[a]),l.useEffect(()=>{const s=document.getElementById("app");if(!s)return;const r=window.innerWidth<768,d=r?"100vw":a;s.style.setProperty("--ai-assistant-panel-actual-width",d),i&&n?(s.style.marginRight=r?"0":a,s.dataset.aiAssistantOpen="true"):(s.style.removeProperty("margin-right"),s.dataset.aiAssistantOpen="false");const c=()=>{const m=window.innerWidth<768,x=m?"100vw":a;s.style.setProperty("--ai-assistant-panel-actual-width",x),i&&n&&(s.style.marginRight=m?"0":a)};return window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[i,n,a]),e.jsxs(e.Fragment,{children:[o,e.jsx($,{width:a})]})}const ee=l.memo(({children:o,className:a,breadcrumbs:i,...n})=>e.jsx(_,{children:e.jsx(F,{children:e.jsxs(H,{children:[e.jsx(q,{breadcrumbs:i,className:a,...n,children:o}),e.jsx(U,{})]})})}));export{ee as A};
@@ -1 +1 @@
1
- import{u as $,j as e,D as Z,U as G,b0 as J,i as Q,k as W,l as Y,b1 as I,b2 as ee,V as se,b as M,I as ae,ar as re,B as D,b3 as te,ap as le,b4 as ne,L as ie,h as ce,b5 as de,b6 as oe,b7 as F,b8 as S,b9 as xe,ba as pe,bb as he,bc as w,bd as me,be as ue,bf as je,bg as be,bh as fe,bi as z,ai as v,bj as ge,bk as E,bl as L,C as P,bm as B,bn as O,bo as A,bp as R,bq as Ne,br as ve}from"./app.js";import{NavMain as ke}from"./nav-main-8YJwixyP.js";import{r as i,a as ye}from"./handsontable-PxYdjN8c.js";import d from"./material-icon-BXxpxGAd.js";import"./jsoneditor-De1FvcYu.js";import"./monaco-BhBYtg3d.js";const Ce=5*1024*1024,q=i.memo(({routePrefix:t,triggerLabel:s,placeholder:a,ui:x,onClose:p})=>{const l=r=>x[r]??r,[m,k]=i.useState(""),[g,y]=i.useState(""),[j,b]=i.useState([]),[o,N]=i.useState({}),[h,_]=i.useState(!1),[C,H]=i.useState(!1),T=i.useRef(null),K=r=>{if(!r)return;const n={},u=[];Array.from(r).forEach(c=>{c.size>Ce?n[c.name]=l("File size exceeds the 5 MB limit"):u.push(c)}),b(c=>[...c,...u]),Object.keys(n).length&&N(c=>({...c,...n}))},U=r=>b(n=>n.filter((u,c)=>c!==r)),V=async r=>{var u,c;if(r.preventDefault(),!m.trim()){N({title:l("Title is required")});return}_(!0),N({});const n=new FormData;n.append("title",m.trim()),n.append("description",g.trim()),j.forEach(f=>n.append("files",f));try{await ce.post(`${t}/api/feedback`,n),H(!0)}catch(f){const X=((c=(u=f==null?void 0:f.response)==null?void 0:u.data)==null?void 0:c.error)??l("Internal server error");N({_global:X}),_(!1)}};return i.useEffect(()=>{if(!C)return;const r=setTimeout(p,2e3);return()=>clearTimeout(r)},[C,p]),C?e.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-24 text-center",children:[e.jsx(I,{size:48,className:"text-green-500 dark:text-green-400"}),e.jsx("p",{className:"text-base font-medium",children:l("Feedback sent successfully")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(ee,{className:"mb-4",children:[e.jsx(se,{children:s??l("Feedback")}),a&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a})]}),e.jsxs("form",{onSubmit:V,className:"space-y-5",noValidate:!0,children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(M,{htmlFor:"fb-title",children:l("Title")}),e.jsx(ae,{id:"fb-title",value:m,onChange:r=>k(r.target.value),disabled:h,placeholder:l("Title"),className:o.title?"border-destructive":""}),o.title&&e.jsx("p",{className:"text-xs text-destructive",children:o.title})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(M,{htmlFor:"fb-desc",children:l("Description")}),e.jsx(re,{id:"fb-desc",value:g,onChange:r=>y(r.target.value),disabled:h,placeholder:l("Description"),rows:5,className:"resize-none"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(M,{children:l("Attach files")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(D,{type:"button",variant:"outline",size:"sm",onClick:()=>{var r;return(r=T.current)==null?void 0:r.click()},disabled:h,children:[e.jsx(te,{size:14,className:"mr-1"}),l("Attach files")]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:l("Max 5 MB per file")})]}),e.jsx("input",{ref:T,type:"file",multiple:!0,className:"hidden",onChange:r=>K(r.target.files),disabled:h}),j.length>0&&e.jsx("ul",{className:"mt-2 space-y-1",children:j.map((r,n)=>e.jsxs("li",{className:"flex items-center justify-between rounded-md border bg-muted/40 px-3 py-1.5 text-xs",children:[e.jsx("span",{className:"truncate max-w-[340px]",children:r.name}),e.jsx("button",{type:"button",onClick:()=>U(n),className:"ml-2 text-muted-foreground hover:text-destructive transition-colors","aria-label":l("Remove file"),disabled:h,children:e.jsx(le,{size:13})})]},n))}),Object.entries(o).filter(([r])=>r!=="title"&&r!=="_global").map(([r,n])=>e.jsx("p",{className:"text-xs text-destructive",children:n},r))]}),o._global&&e.jsx("p",{className:"text-xs text-destructive",children:o._global}),e.jsx(ne,{children:e.jsx(D,{type:"submit",disabled:h,children:h?e.jsxs(e.Fragment,{children:[e.jsx(ie,{size:14,className:"mr-1.5 animate-spin"}),l("Sending...")]}):l("Send")})})]})]})});q.displayName="FeedbackForm";function Me(){const t=$(),s=t.props.uiMessages??{},a=t.props.routePrefix??window.routePrefix??"",x=t.props.feedbackTriggerLabel??null,p=t.props.feedbackPlaceholder??null,[l,m]=i.useState(!1),[k,g]=i.useState(0),y=i.useCallback(()=>m(!1),[]),j=i.useCallback(b=>{m(b),b||g(o=>o+1)},[]);return e.jsxs(Z,{open:l,onOpenChange:j,children:[e.jsx(G,{asChild:!0,children:e.jsxs("button",{className:"flex items-center gap-1.5 text-xs opacity-60 hover:opacity-100 transition-opacity cursor-pointer mt-1 mx-auto","aria-label":x??s["Send feedback"]??"Send feedback",children:[e.jsx(J,{size:13}),x??s["Send feedback"]??"Send feedback"]})}),ye.createPortal(e.jsx(Q,{}),document.body),e.jsx(W,{children:e.jsx(Y,{children:e.jsx(q,{routePrefix:a,triggerLabel:x,placeholder:p,ui:s,onClose:y},k)})})]})}function ze(){const t=$();return e.jsxs(de,{collapsible:"icon",variant:"inset",children:[e.jsx(oe,{children:e.jsx(F,{children:e.jsxs(S,{children:[e.jsx(xe,{className:"p-0 shadow-none border-none bg-transparent hidden md:block",children:e.jsxs(pe,{children:[e.jsx(he,{asChild:!0,className:"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground rounded-md",children:e.jsx(w,{asChild:!0,children:e.jsx(D,{variant:"ghost",asChild:!0,className:`w-full ${t.props.section?"":"pointer-events-none"}`,children:e.jsxs("div",{children:[e.jsx(d,{name:"rocket_launch",className:"!text-[18px]"}),e.jsx("span",{className:"group-data-[state=collapsed]:hidden",children:t.props.brand}),t.props.section&&e.jsx(me,{className:"ml-auto group-data-[state=collapsed]:hidden"})]})})})}),t.props.section&&e.jsx(ue,{side:"right",className:"z-[1003]",children:t.props.section.map(s=>e.jsx("div",{children:s.subItems?e.jsxs(je,{children:[e.jsxs(be,{className:"flex gap-2 items-center cursor-pointer",children:[e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]}),e.jsx(fe,{children:s.subItems.map(a=>e.jsx(z,{children:a.type==="blank"?e.jsxs("a",{href:a.link,target:"_blank",className:"flex gap-2 items-center",children:[a.icon&&e.jsx(d,{name:a.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:a.title})]},a.id):e.jsxs(v,{href:a.link,className:"flex gap-2 items-center",children:[a.icon&&e.jsx(d,{name:a.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:a.title})]},a.id)},a.id))})]}):e.jsx(z,{children:s.type==="blank"?e.jsxs("a",{href:s.link,target:"_blank",className:"flex gap-2 items-center",children:[s.icon&&e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]}):e.jsxs(v,{href:s.link,className:"flex gap-2 items-center",children:[s.icon&&e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]})})},s.id))})]})}),e.jsx(ge,{className:"px-2 py-0 block md:hidden",children:e.jsx(F,{children:e.jsx(E,{asChild:!0,className:"group/collapsible",children:e.jsxs(S,{children:[e.jsx(L,{asChild:!0,children:e.jsxs(w,{children:[e.jsx(d,{name:"rocket_launch",className:"!text-[18px]"}),e.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:t.props.brand}),t.props.section&&e.jsx(P,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),t.props.section&&e.jsx(B,{children:e.jsx(O,{children:t.props.section&&t.props.section.map(s=>s.subItems?e.jsx(F,{children:e.jsx(E,{asChild:!0,className:"group/collapsible-sub",children:e.jsxs(S,{children:[e.jsx(L,{asChild:!0,children:e.jsxs(w,{children:[e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.title}),e.jsx(P,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible-sub:rotate-90"})]})}),e.jsx(B,{children:e.jsx(O,{children:s.subItems.map(a=>e.jsx(A,{children:e.jsx(R,{asChild:!0,children:a.type==="blank"?e.jsxs("a",{href:a.link,target:"_blank",className:"flex gap-2 items-center",children:[a.icon&&e.jsx(d,{name:a.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:a.title})]}):e.jsxs(v,{href:a.link,className:"flex gap-2 items-center",children:[a.icon&&e.jsx(d,{name:a.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:a.title})]})})},a.id))})})]})})},s.id):e.jsx(A,{children:e.jsx(R,{asChild:!0,children:s.type==="blank"?e.jsxs("a",{href:s.link,target:"_blank",className:"flex gap-2 items-center",children:[s.icon&&e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]}):e.jsxs(v,{href:s.link,className:"flex gap-2 items-center",children:[s.icon&&e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]})})},s.id))})})]})})})})]},t.props.brand)})}),e.jsx(Ne,{children:e.jsx(ke,{items:t.props.menu})}),e.jsx(ve,{children:e.jsxs("div",{className:"flex flex-col items-center",children:[t.props.version&&(()=>{const s=t.props.version,a=s.text||"4.6.0",x=new Date("2026-05-01T04:20:46.779Z").toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),p=s.text?`v.${a}`:`v.${a} · ${x}`,l="text-center opacity-70 hover:opacity-100 transition-opacity text-xs";return s.link?e.jsx("a",{href:s.link,target:"_blank",rel:"noreferrer",title:s.hint??void 0,className:l,children:p}):e.jsx("span",{title:s.hint??void 0,className:l,children:p})})(),t.props.showFeedback&&e.jsx(Me,{})]})})]})}export{ze as AppSidebar};
1
+ import{u as $,j as e,D as Z,U as G,b0 as J,i as Q,k as W,l as Y,b1 as I,b2 as ee,V as se,b as M,I as ae,ar as re,B as D,b3 as te,ap as le,b4 as ne,L as ie,h as ce,b5 as de,b6 as oe,b7 as F,b8 as S,b9 as xe,ba as pe,bb as he,bc as w,bd as me,be as ue,bf as je,bg as be,bh as fe,bi as z,ai as v,bj as ge,bk as E,bl as L,C as P,bm as B,bn as O,bo as A,bp as R,bq as Ne,br as ve}from"./app.js";import{NavMain as ke}from"./nav-main-8YJwixyP.js";import{r as i,a as ye}from"./handsontable-PxYdjN8c.js";import d from"./material-icon-BXxpxGAd.js";import"./jsoneditor-De1FvcYu.js";import"./monaco-BhBYtg3d.js";const Ce=5*1024*1024,q=i.memo(({routePrefix:t,triggerLabel:s,placeholder:a,ui:x,onClose:p})=>{const l=r=>x[r]??r,[m,k]=i.useState(""),[g,y]=i.useState(""),[j,b]=i.useState([]),[o,N]=i.useState({}),[h,_]=i.useState(!1),[C,H]=i.useState(!1),T=i.useRef(null),K=r=>{if(!r)return;const n={},u=[];Array.from(r).forEach(c=>{c.size>Ce?n[c.name]=l("File size exceeds the 5 MB limit"):u.push(c)}),b(c=>[...c,...u]),Object.keys(n).length&&N(c=>({...c,...n}))},U=r=>b(n=>n.filter((u,c)=>c!==r)),V=async r=>{var u,c;if(r.preventDefault(),!m.trim()){N({title:l("Title is required")});return}_(!0),N({});const n=new FormData;n.append("title",m.trim()),n.append("description",g.trim()),j.forEach(f=>n.append("files",f));try{await ce.post(`${t}/api/feedback`,n),H(!0)}catch(f){const X=((c=(u=f==null?void 0:f.response)==null?void 0:u.data)==null?void 0:c.error)??l("Internal server error");N({_global:X}),_(!1)}};return i.useEffect(()=>{if(!C)return;const r=setTimeout(p,2e3);return()=>clearTimeout(r)},[C,p]),C?e.jsxs("div",{className:"flex flex-col items-center justify-center gap-4 py-24 text-center",children:[e.jsx(I,{size:48,className:"text-green-500 dark:text-green-400"}),e.jsx("p",{className:"text-base font-medium",children:l("Feedback sent successfully")})]}):e.jsxs(e.Fragment,{children:[e.jsxs(ee,{className:"mb-4",children:[e.jsx(se,{children:s??l("Feedback")}),a&&e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a})]}),e.jsxs("form",{onSubmit:V,className:"space-y-5",noValidate:!0,children:[e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(M,{htmlFor:"fb-title",children:l("Title")}),e.jsx(ae,{id:"fb-title",value:m,onChange:r=>k(r.target.value),disabled:h,placeholder:l("Title"),className:o.title?"border-destructive":""}),o.title&&e.jsx("p",{className:"text-xs text-destructive",children:o.title})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(M,{htmlFor:"fb-desc",children:l("Description")}),e.jsx(re,{id:"fb-desc",value:g,onChange:r=>y(r.target.value),disabled:h,placeholder:l("Description"),rows:5,className:"resize-none"})]}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx(M,{children:l("Attach files")}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(D,{type:"button",variant:"outline",size:"sm",onClick:()=>{var r;return(r=T.current)==null?void 0:r.click()},disabled:h,children:[e.jsx(te,{size:14,className:"mr-1"}),l("Attach files")]}),e.jsx("span",{className:"text-xs text-muted-foreground",children:l("Max 5 MB per file")})]}),e.jsx("input",{ref:T,type:"file",multiple:!0,className:"hidden",onChange:r=>K(r.target.files),disabled:h}),j.length>0&&e.jsx("ul",{className:"mt-2 space-y-1",children:j.map((r,n)=>e.jsxs("li",{className:"flex items-center justify-between rounded-md border bg-muted/40 px-3 py-1.5 text-xs",children:[e.jsx("span",{className:"truncate max-w-[340px]",children:r.name}),e.jsx("button",{type:"button",onClick:()=>U(n),className:"ml-2 text-muted-foreground hover:text-destructive transition-colors","aria-label":l("Remove file"),disabled:h,children:e.jsx(le,{size:13})})]},n))}),Object.entries(o).filter(([r])=>r!=="title"&&r!=="_global").map(([r,n])=>e.jsx("p",{className:"text-xs text-destructive",children:n},r))]}),o._global&&e.jsx("p",{className:"text-xs text-destructive",children:o._global}),e.jsx(ne,{children:e.jsx(D,{type:"submit",disabled:h,children:h?e.jsxs(e.Fragment,{children:[e.jsx(ie,{size:14,className:"mr-1.5 animate-spin"}),l("Sending...")]}):l("Send")})})]})]})});q.displayName="FeedbackForm";function Me(){const t=$(),s=t.props.uiMessages??{},a=t.props.routePrefix??window.routePrefix??"",x=t.props.feedbackTriggerLabel??null,p=t.props.feedbackPlaceholder??null,[l,m]=i.useState(!1),[k,g]=i.useState(0),y=i.useCallback(()=>m(!1),[]),j=i.useCallback(b=>{m(b),b||g(o=>o+1)},[]);return e.jsxs(Z,{open:l,onOpenChange:j,children:[e.jsx(G,{asChild:!0,children:e.jsxs("button",{className:"flex items-center gap-1.5 text-xs opacity-60 hover:opacity-100 transition-opacity cursor-pointer mt-1 mx-auto","aria-label":x??s["Send feedback"]??"Send feedback",children:[e.jsx(J,{size:13}),x??s["Send feedback"]??"Send feedback"]})}),ye.createPortal(e.jsx(Q,{}),document.body),e.jsx(W,{children:e.jsx(Y,{children:e.jsx(q,{routePrefix:a,triggerLabel:x,placeholder:p,ui:s,onClose:y},k)})})]})}function ze(){const t=$();return e.jsxs(de,{collapsible:"icon",variant:"inset",children:[e.jsx(oe,{children:e.jsx(F,{children:e.jsxs(S,{children:[e.jsx(xe,{className:"p-0 shadow-none border-none bg-transparent hidden md:block",children:e.jsxs(pe,{children:[e.jsx(he,{asChild:!0,className:"text-sidebar-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground rounded-md",children:e.jsx(w,{asChild:!0,children:e.jsx(D,{variant:"ghost",asChild:!0,className:`w-full ${t.props.section?"":"pointer-events-none"}`,children:e.jsxs("div",{children:[e.jsx(d,{name:"rocket_launch",className:"!text-[18px]"}),e.jsx("span",{className:"group-data-[state=collapsed]:hidden",children:t.props.brand}),t.props.section&&e.jsx(me,{className:"ml-auto group-data-[state=collapsed]:hidden"})]})})})}),t.props.section&&e.jsx(ue,{side:"right",className:"z-[1003]",children:t.props.section.map(s=>e.jsx("div",{children:s.subItems?e.jsxs(je,{children:[e.jsxs(be,{className:"flex gap-2 items-center cursor-pointer",children:[e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]}),e.jsx(fe,{children:s.subItems.map(a=>e.jsx(z,{children:a.type==="blank"?e.jsxs("a",{href:a.link,target:"_blank",className:"flex gap-2 items-center",children:[a.icon&&e.jsx(d,{name:a.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:a.title})]},a.id):e.jsxs(v,{href:a.link,className:"flex gap-2 items-center",children:[a.icon&&e.jsx(d,{name:a.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:a.title})]},a.id)},a.id))})]}):e.jsx(z,{children:s.type==="blank"?e.jsxs("a",{href:s.link,target:"_blank",className:"flex gap-2 items-center",children:[s.icon&&e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]}):e.jsxs(v,{href:s.link,className:"flex gap-2 items-center",children:[s.icon&&e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]})})},s.id))})]})}),e.jsx(ge,{className:"px-2 py-0 block md:hidden",children:e.jsx(F,{children:e.jsx(E,{asChild:!0,className:"group/collapsible",children:e.jsxs(S,{children:[e.jsx(L,{asChild:!0,children:e.jsxs(w,{children:[e.jsx(d,{name:"rocket_launch",className:"!text-[18px]"}),e.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:t.props.brand}),t.props.section&&e.jsx(P,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90"})]})}),t.props.section&&e.jsx(B,{children:e.jsx(O,{children:t.props.section&&t.props.section.map(s=>s.subItems?e.jsx(F,{children:e.jsx(E,{asChild:!0,className:"group/collapsible-sub",children:e.jsxs(S,{children:[e.jsx(L,{asChild:!0,children:e.jsxs(w,{children:[e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:s.title}),e.jsx(P,{className:"ml-auto transition-transform duration-200 group-data-[state=open]/collapsible-sub:rotate-90"})]})}),e.jsx(B,{children:e.jsx(O,{children:s.subItems.map(a=>e.jsx(A,{children:e.jsx(R,{asChild:!0,children:a.type==="blank"?e.jsxs("a",{href:a.link,target:"_blank",className:"flex gap-2 items-center",children:[a.icon&&e.jsx(d,{name:a.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:a.title})]}):e.jsxs(v,{href:a.link,className:"flex gap-2 items-center",children:[a.icon&&e.jsx(d,{name:a.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:a.title})]})})},a.id))})})]})})},s.id):e.jsx(A,{children:e.jsx(R,{asChild:!0,children:s.type==="blank"?e.jsxs("a",{href:s.link,target:"_blank",className:"flex gap-2 items-center",children:[s.icon&&e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]}):e.jsxs(v,{href:s.link,className:"flex gap-2 items-center",children:[s.icon&&e.jsx(d,{name:s.icon,className:"!text-[18px]"}),e.jsx("span",{className:"hover:underline",children:s.title})]})})},s.id))})})]})})})})]},t.props.brand)})}),e.jsx(Ne,{children:e.jsx(ke,{items:t.props.menu})}),e.jsx(ve,{children:e.jsxs("div",{className:"flex flex-col items-center",children:[t.props.version&&(()=>{const s=t.props.version,a=s.text||"4.6.0",x=new Date("2026-05-05T03:47:10.748Z").toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}),p=s.text?`v.${a}`:`v.${a} · ${x}`,l="text-center opacity-70 hover:opacity-100 transition-opacity text-xs";return s.link?e.jsx("a",{href:s.link,target:"_blank",rel:"noreferrer",title:s.hint??void 0,className:l,children:p}):e.jsx("span",{title:s.hint??void 0,className:l,children:p})})(),t.props.showFeedback&&e.jsx(Me,{})]})})]})}export{ze as AppSidebar};