1import{B as e,T as t,V as n,a as r}from"./chunk-QUQL4437-l4RXGY6F.js";import{n as i,t as a}from"./jsx-runtime-Bbefl-uB.js";import{t as o}from"./use-app-translation-BmSwqAR0.js";import{n as s}from"./cn-B6KiDbIe.js";import{t as c}from"./button-DWQ5H17I.js";import{a as l,i as u,n as d,o as f,r as p,t as m}from"./empty-DP2dFtkP.js";import{t as h}from"./icon-ZqPQDBB4.js";import{n as g}from"./crisp-SVN1eUyG.js";import{t as _}from"./use-store-prefix-DfyyagLw.js";import{t as v}from"./use-effect-once-8tZyCmuD.js";import{t as y}from"./error-handling-DCcRDtvM.js";var b=i(),x=a();function S(){let e=(0,b.c)(43),{t}=o(`common`),n=_(),i=n?`${n}/dashboard`:`/dashboard`,a;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,x.jsx)(l,{variant:`icon`,children:(0,x.jsx)(h,{name:`alert-triangle`,size:22})}),e[0]=a):a=e[0];let s;e[1]===t?s=e[2]:(s=t(`error.notFound.title`),e[1]=t,e[2]=s);let g;e[3]===s?g=e[4]:(g=(0,x.jsx)(f,{children:s}),e[3]=s,e[4]=g);let v;e[5]===t?v=e[6]:(v=t(`error.notFound.description`),e[5]=t,e[6]=v);let y;e[7]===v?y=e[8]:(y=(0,x.jsx)(p,{children:v}),e[7]=v,e[8]=y);let S;e[9]!==g||e[10]!==y?(S=(0,x.jsxs)(u,{children:[a,g,y]}),e[9]=g,e[10]=y,e[11]=S):S=e[11];let w;e[12]===t?w=e[13]:(w=t(`error.notFound.errorCode`),e[12]=t,e[13]=w);let T;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,x.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5`,children:`404`}),e[14]=T):T=e[14];let E;e[15]===w?E=e[16]:(E=(0,x.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[w,` `,T]}),e[15]=w,e[16]=E);let D;e[17]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,x.jsx)(h,{name:`layout-dashboard`}),e[17]=D):D=e[17];let O;e[18]===t?O=e[19]:(O=t(`error.notFound.goToDashboard`),e[18]=t,e[19]=O);let k;e[20]!==i||e[21]!==O?(k=(0,x.jsx)(c,{asChild:!0,className:`w-full`,children:(0,x.jsxs)(r,{to:i,children:[D,O]})}),e[20]=i,e[21]=O,e[22]=k):k=e[22];let A;e[23]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,x.jsx)(h,{name:`home`}),e[23]=A):A=e[23];let j;e[24]===t?j=e[25]:(j=t(`error.notFound.goToHome`),e[24]=t,e[25]=j);let M;e[26]===j?M=e[27]:(M=(0,x.jsx)(c,{asChild:!0,className:`w-full`,variant:`outline`,children:(0,x.jsxs)(r,{to:`/`,children:[A,j]})}),e[26]=j,e[27]=M);let N;e[28]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,x.jsx)(h,{name:`message-square`}),e[28]=N):N=e[28];let P;e[29]===t?P=e[30]:(P=t(`error.notFound.getSupport`),e[29]=t,e[30]=P);let F;e[31]===P?F=e[32]:(F=(0,x.jsxs)(c,{className:`w-full`,onClick:C,variant:`ghost`,children:[N,P]}),e[31]=P,e[32]=F);let I;e[33]!==k||e[34]!==M||e[35]!==F?(I=(0,x.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,children:[k,M,F]}),e[33]=k,e[34]=M,e[35]=F,e[36]=I):I=e[36];let L;e[37]!==I||e[38]!==E?(L=(0,x.jsxs)(d,{children:[E,I]}),e[37]=I,e[38]=E,e[39]=L):L=e[39];let R;return e[40]!==L||e[41]!==S?(R=(0,x.jsxs)(m,{className:`min-h-screen`,children:[S,L]}),e[40]=L,e[41]=S,e[42]=R):R=e[42],R}function C(){return g()}function w(e){let t=(0,b.c)(2),n;t[0]===e?n=t[1]:(n=()=>{e&&typeof e==`object`&&`status`in e&&e.status===404||y(e)},t[0]=e,t[1]=n),v(n)}function T(t){let n=(0,b.c)(52),{error:r}=t,{t:i}=o(`common`),a=e(),g=typeof window<`u`&&window.weaverseAppData?.ENV?.NODE_ENV===`development`;r&&g&&console.trace(`â Error in GenericError component: ${r}`),r?.message?.includes(`Minified React error`)&&a.revalidate();let _;n[0]===i?_=n[1]:(_=i(`error.unknownDescription`),n[0]=i,n[1]=_);let v=_;if(r?.message){let e;n[2]!==r.message||n[3]!==i?(e=i(`error.description`,{message:r.message}),n[2]=r.message,n[3]=i,n[4]=e):e=n[4],v=e}let y=g&&!!r?.stack,S;n[5]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,x.jsx)(l,{variant:`icon`,children:(0,x.jsx)(h,{name:`server-crash`,size:22})}),n[5]=S):S=n[5];let C;n[6]===i?C=n[7]:(C=i(`error.title`),n[6]=i,n[7]=C);let w;n[8]===C?w=n[9]:(w=(0,x.jsx)(f,{children:C}),n[8]=C,n[9]=w);let T;n[10]===v?T=n[11]:(T=(0,x.jsx)(p,{children:v}),n[10]=v,n[11]=T);let D;n[12]!==w||n[13]!==T?(D=(0,x.jsxs)(u,{children:[S,w,T]}),n[12]=w,n[13]=T,n[14]=D):D=n[14];let O=y?`block`:`hidden`,k;n[15]===O?k=n[16]:(k=s(`w-full text-left`,O),n[15]=O,n[16]=k);let A;
1n[17]===i?A=n[18]:(A=i(`error.stackTrace`),n[17]=i,n[18]=A);let j;n[19]===A?j=n[20]:(j=(0,x.jsx)(`summary`,{className:`cursor-pointer font-medium text-center`,children:A}),n[19]=A,n[20]=j);let M;n[21]!==r?.stack||n[22]!==i?(M=r?.stack||i(`error.noStackTrace`),n[21]=r?.stack,n[22]=i,n[23]=M):M=n[23];let N;n[24]===M?N=n[25]:(N=(0,x.jsx)(`pre`,{className:`mt-2 overflow-auto rounded-lg bg-destructive/10 p-4 text-destructive`,children:M}),n[24]=M,n[25]=N);let P;n[26]!==j||n[27]!==N||n[28]!==k?(P=(0,x.jsxs)(`details`,{className:k,open:!0,children:[j,N]}),n[26]=j,n[27]=N,n[28]=k,n[29]=P):P=n[29];let F;n[30]===a?F=n[31]:(F=()=>a.revalidate(),n[30]=a,n[31]=F);let I;n[32]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,x.jsx)(h,{name:`refresh-ccw`}),n[32]=I):I=n[32];let L;n[33]===i?L=n[34]:(L=i(`error.refresh`),n[33]=i,n[34]=L);let R;n[35]!==F||n[36]!==L?(R=(0,x.jsxs)(c,{onClick:F,variant:`outline`,children:[I,L]}),n[35]=F,n[36]=L,n[37]=R):R=n[37];let z;n[38]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,x.jsx)(h,{name:`message-square`}),n[38]=z):z=n[38];let B;n[39]===i?B=n[40]:(B=i(`error.getSupport`),n[39]=i,n[40]=B);let V;n[41]===B?V=n[42]:(V=(0,x.jsxs)(c,{onClick:E,children:[z,B]}),n[41]=B,n[42]=V);let H;n[43]!==R||n[44]!==V?(H=(0,x.jsxs)(`div`,{className:`flex gap-2 pt-2`,children:[R,V]}),n[43]=R,n[44]=V,n[45]=H):H=n[45];let U;n[46]!==P||n[47]!==H?(U=(0,x.jsxs)(d,{className:`max-w-7xl`,children:[P,H]}),n[46]=P,n[47]=H,n[48]=U):U=n[48];let W;return n[49]!==U||n[50]!==D?(W=(0,x.jsxs)(m,{className:`min-h-screen -mt-10`,children:[D,U]}),n[49]=U,n[50]=D,n[51]=W):W=n[51],W}function E(){return g()}function D(){let e=(0,b.c)(5),r=n();if(w(r),t(r)){let t;return e[0]!==r.data||e[1]!==r.status?(t=r.status===404?(0,x.jsx)(S,{}):(0,x.jsx)(T,{error:{message:`${r.status} ${r.data}`}}),e[0]=r.data,e[1]=r.status,e[2]=t):t=e[2],t}let i=r instanceof Error?r:void 0,a;return e[3]===i?a=e[4]:(a=(0,x.jsx)(T,{error:i}),e[3]=i,e[4]=a),a}export{D as t};
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.