@decocms/mesh 1.0.0-alpha.1 → 1.0.0-alpha.3

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.
Files changed (75) hide show
  1. package/dist/client/assets/{alert-dialog-DsYjmjQa.js → alert-dialog-Caf0mgW9.js} +1 -1
  2. package/dist/client/assets/{auth-dQSMuI_r.js → auth-CGqqbEan.js} +1 -1
  3. package/dist/client/assets/{auth-catchall-vTieIyKZ.js → auth-catchall-Bw-KJI1v.js} +1 -1
  4. package/dist/client/assets/{avatar-DFNVHH7B.js → avatar-CdPaDOIs.js} +1 -1
  5. package/dist/client/assets/{badge-D0svJbIE.js → badge-j-myHF25.js} +1 -1
  6. package/dist/client/assets/{button-CB7Gt-Ba.js → button-DnKGwZ1P.js} +1 -1
  7. package/dist/client/assets/{card-BZePxfHz.js → card-I0CWqn2J.js} +1 -1
  8. package/dist/client/assets/{checkbox-CJwRElzS.js → checkbox-v3iP8MNg.js} +1 -1
  9. package/dist/client/assets/{circle-alert-FONBIc_T.js → circle-alert-CpqBZI3V.js} +1 -1
  10. package/dist/client/assets/{collection-detail-CFf2hZjF.js → collection-detail-BSfYYwzG.js} +1 -1
  11. package/dist/client/assets/{collection-display-button-Ccjj22Xn.js → collection-display-button-Cws3c2TG.js} +1 -1
  12. package/dist/client/assets/{collection-header-C3vTyWNy.js → collection-header-CJC3zXGa.js} +1 -1
  13. package/dist/client/assets/{collection-page-BplXISpO.js → collection-page-CkAonVNX.js} +1 -1
  14. package/dist/client/assets/{collection-search-BpPEPb0j.js → collection-search-Bd4XQ4_K.js} +1 -1
  15. package/dist/client/assets/{collection-table-wrapper-CJdrG443.js → collection-table-wrapper-Dv4rgxdy.js} +1 -1
  16. package/dist/client/assets/{connection-card-B7VMSnFz.js → connection-card-CgJm9r5i.js} +1 -1
  17. package/dist/client/assets/{connection-detail-DGFMHZQW.js → connection-detail-HAGAOVY9.js} +1 -1
  18. package/dist/client/assets/{connections-BFxMYtuo.js → connections-C8Z338-P.js} +1 -1
  19. package/dist/client/assets/{create-organization-dialog-Mq1L8DSD.js → create-organization-dialog-CWgFMDXV.js} +1 -1
  20. package/dist/client/assets/{dialog-DhrfZsqb.js → dialog-Qusr5Dgc.js} +1 -1
  21. package/dist/client/assets/{dropdown-menu-zoKN8fKM.js → dropdown-menu-BIeRR6rM.js} +1 -1
  22. package/dist/client/assets/{empty-state-BCgOYCyG.js → empty-state-DV83eIhT.js} +1 -1
  23. package/dist/client/assets/{error-boundary-L4NxoU-J.js → error-boundary-qOVcoWbq.js} +1 -1
  24. package/dist/client/assets/{extract-connection-data-mJfi2GDs.js → extract-connection-data-DzgXoQyz.js} +1 -1
  25. package/dist/client/assets/{form-BmhZau8F.js → form-0C1lYHJ2.js} +1 -1
  26. package/dist/client/assets/{gateway-detail-BEN_sL0j.js → gateway-detail-mD14k5vr.js} +1 -1
  27. package/dist/client/assets/{gateways-DPfP8fjF.js → gateways-BSGLH5Mc.js} +1 -1
  28. package/dist/client/assets/{home-RT_Ssleq.js → home-B1IT0slW.js} +1 -1
  29. package/dist/client/assets/{icon-Zm7eEeKG.js → icon-C1glN-Ga.js} +1 -1
  30. package/dist/client/assets/index-B5e6fytH.js +118 -0
  31. package/dist/client/assets/{index-CfNAXm02.js → index-C1xA8jg5.js} +1 -1
  32. package/dist/client/assets/{index-CoeZDSQf.js → index-Chpp7zg0.js} +1 -1
  33. package/dist/client/assets/{index-BAut7b_p.js → index-D2ODleHN.js} +1 -1
  34. package/dist/client/assets/{index-CBL6DTCM.js → index-DqmRoUE9.js} +1 -1
  35. package/dist/client/assets/{input-DWY0hRYC.js → input-DpAKmHHm.js} +1 -1
  36. package/dist/client/assets/{integration-icon-Dgf9Pzxc.js → integration-icon-C_Dk6BbN.js} +1 -1
  37. package/dist/client/assets/{layout-C75gYFRR.js → layout-BMHVtK0w.js} +1 -1
  38. package/dist/client/assets/{lazy-highlighter-V_ETf5s5.js → lazy-highlighter-9rAB2zZq.js} +1 -1
  39. package/dist/client/assets/{localstorage-keys-CdMYd__a.js → localstorage-keys-DC7ymQmZ.js} +1 -1
  40. package/dist/client/assets/{login-CaI2gNh0.js → login-BMjQy3tL.js} +1 -1
  41. package/dist/client/assets/{members-BD990Z5F.js → members-k_V-Gxfi.js} +1 -1
  42. package/dist/client/assets/{monitoring-s9rrPP3V.js → monitoring-BG-rBDyv.js} +1 -1
  43. package/dist/client/assets/{monitoring-stats-row-DiSEgwHP.js → monitoring-stats-row-PYfuhQHX.js} +1 -1
  44. package/dist/client/assets/{oauth-callback-ChC_4XSg.js → oauth-callback-CQ4D18kW.js} +1 -1
  45. package/dist/client/assets/{page-BauA0SPJ.js → page-h-kmS-QS.js} +1 -1
  46. package/dist/client/assets/{popover-B7GJHYd2.js → popover-TCQphQTw.js} +1 -1
  47. package/dist/client/assets/{prism-BsII3tZL.js → prism-CcSucC56.js} +1 -1
  48. package/dist/client/assets/{resource-tabs-Djqhz6PB.js → resource-tabs-E4yf0eYT.js} +1 -1
  49. package/dist/client/assets/{schema-CJRWBwzd.js → schema-BLzWyGtx.js} +1 -1
  50. package/dist/client/assets/{select-CrueAR2N.js → select-fvQCifl4.js} +1 -1
  51. package/dist/client/assets/{settings-85tu13fN.js → settings-Bjk195Z6.js} +1 -1
  52. package/dist/client/assets/{shell-layout-CwcEMEv3.js → shell-layout-B8oNCzSa.js} +3 -3
  53. package/dist/client/assets/{spinner-R42f7AVH.js → spinner-Cck765yW.js} +1 -1
  54. package/dist/client/assets/{store-zixro3Vs.js → store-DD1aCoWU.js} +1 -1
  55. package/dist/client/assets/{store-app-detail-D89e4NIX.js → store-app-detail-DZvzqAVf.js} +1 -1
  56. package/dist/client/assets/{textarea-CAmjTm6l.js → textarea--4iImQiq.js} +1 -1
  57. package/dist/client/assets/{tool-set-selector-BfScgRcK.js → tool-set-selector-Fu1vBXWK.js} +1 -1
  58. package/dist/client/assets/{tooltip-BLbXpJcn.js → tooltip-DjXyjtiH.js} +1 -1
  59. package/dist/client/assets/{upload-CG7PZ6WF.js → upload-DkfUhTLj.js} +1 -1
  60. package/dist/client/assets/{use-binding-CeSgmpzj.js → use-binding-BLIUV5ER.js} +1 -1
  61. package/dist/client/assets/{use-connection-D5nZyekX.js → use-connection-IMyxygAc.js} +1 -1
  62. package/dist/client/assets/{use-gateway-pRk3-ua4.js → use-gateway-CuMrhcvh.js} +1 -1
  63. package/dist/client/assets/{use-list-state-BTIryg2o.js → use-list-state-Bas0EIwN.js} +1 -1
  64. package/dist/client/assets/{use-members-OyBpbFn0.js → use-members-DHcrnzKP.js} +1 -1
  65. package/dist/client/assets/{use-mobile-BPQzOCZP.js → use-mobile-CxX0wu31.js} +1 -1
  66. package/dist/client/assets/{use-organization-settings-CMP1q4u_.js → use-organization-settings-CpvpbwdB.js} +1 -1
  67. package/dist/client/assets/{use-tool-call-BsMTRGjQ.js → use-tool-call-p0lqBezD.js} +1 -1
  68. package/dist/client/assets/useQuery-BO2jzwkw.js +1 -0
  69. package/dist/client/assets/utils-BLBjpUfr.js +1 -0
  70. package/dist/client/index.html +1 -1
  71. package/dist/server/cli.js +1 -1
  72. package/package.json +18 -18
  73. package/dist/client/assets/index-VCe1FY3E.js +0 -118
  74. package/dist/client/assets/useQuery-DEUZMq4A.js +0 -1
  75. package/dist/client/assets/utils-B-QWwgyW.js +0 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lazy-highlighter-V_ETf5s5.js","assets/index-VCe1FY3E.js","assets/index-feMggVqN.css","assets/prism-BsII3tZL.js"])))=>i.map(i=>d[i]);
2
- import{$ as z,f as Rh,n as oa,g as ua,e as wr,h as Oh,i as ke,k as ws,p as an,l as ci,m as di,o as Lh,q as Dh,s as hl,t as pl,v as Wn,w as vs,x as Ph,y as Mh,z as cr,B as _r,C as Bh,D as la,E as ml,F as Fh,G as ee,c as F,H as zh,I as jh,J as Uh,_ as Hh,K as $h,L as Zh,M as Yh,O as qh,P as Vh,Q as Wh,R as Gh,T as Kh,U as Qh,V as gl,W as Xh,Z as le,X as ca,r as P,j as m,Y as Mn,a0 as bl,a1 as El,a2 as at,a3 as da,a4 as Jh,a5 as vr,a6 as ei,a as Rr,a7 as ep,a8 as tp,a9 as np,aa as rp,ab as ip,ac as sp,ad as ap,ae as op,af as up,ag as lp,d as xl,ah as cp,ai as dp,aj as fp,ak as hp,S as Tl,al as pp,am as mp,N as gp,an as bp,ao as _l}from"./index-VCe1FY3E.js";import{E as Ep}from"./empty-state-BCgOYCyG.js";import{U as yl,u as kl,c as Al,a as xp,b as Tp}from"./use-connection-D5nZyekX.js";import{E as _p,u as ro}from"./use-binding-CeSgmpzj.js";import{u as On,L as Or}from"./localstorage-keys-CdMYd__a.js";import{c as yp,T as Sl,a as Cl,b as Il,u as vt,d as kp,L as io,P as Ap,O as Sp}from"./tooltip-BLbXpJcn.js";import{B as ot,u as on}from"./button-CB7Gt-Ba.js";import{I as fe}from"./icon-Zm7eEeKG.js";import{S as Cp,a as Ip,b as Np,c as wp}from"./select-CrueAR2N.js";import{c as X}from"./utils-B-QWwgyW.js";import{u as Bn}from"./use-mobile-BPQzOCZP.js";import{T as vp}from"./textarea-CAmjTm6l.js";import{C as Rp}from"./connection-card-B7VMSnFz.js";import{E as Rs}from"./error-boundary-L4NxoU-J.js";import{X as Op,D as Nl,a as wl,b as vl,c as Rl,d as Ol}from"./dialog-DhrfZsqb.js";import{u as Ll,a as Lp}from"./use-organization-settings-CMP1q4u_.js";import{C as Dp}from"./create-organization-dialog-Mq1L8DSD.js";import{I as Pp}from"./input-DWY0hRYC.js";import{P as Mp,a as Bp,b as Fp}from"./popover-B7GJHYd2.js";import{A as Fn}from"./avatar-DFNVHH7B.js";import{D as zp,a as jp,b as Up,c as Hp,d as so}from"./dropdown-menu-zoKN8fKM.js";import"./auth-dQSMuI_r.js";import"./useQuery-DEUZMq4A.js";import"./badge-D0svJbIE.js";import"./card-BZePxfHz.js";import"./integration-icon-Dgf9Pzxc.js";import"./alert-dialog-DsYjmjQa.js";import"./form-BmhZau8F.js";import"./spinner-R42f7AVH.js";const $p=/^[cC][^\s-]{8,}$/,Zp=/^[0-9a-z]+$/,Yp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qp=/^[0-9a-vA-V]{20}$/,Vp=/^[A-Za-z0-9]{27}$/,Wp=/^[a-zA-Z0-9_-]{21}$/,Gp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Kp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ao=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Qp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Xp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Jp(){return new RegExp(Xp,"u")}const em=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,nm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,im=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dl=/^[A-Za-z0-9_-]*$/,sm=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,am=/^\+(?:[0-9]){6,14}[0-9]$/,Pl="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",om=new RegExp(`^${Pl}$`);function Ml(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function um(t){return new RegExp(`^${Ml(t)}$`)}function lm(t){const e=Ml({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-]\\d{2}:\\d{2})");const r=`${e}(?:${n.join("|")})`;return new RegExp(`^${Pl}T(?:${r})$`)}const cm=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},dm=/^\d+$/,fm=/^-?\d+(?:\.\d+)?/i,hm=/true|false/i,pm=/null/i,mm=/^[^A-Z]*$/,gm=/^[^a-z]*$/,ut=z("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Bl={number:"number",bigint:"bigint",object:"date"},Fl=z("$ZodCheckLessThan",(t,e)=>{ut.init(t,e);const n=Bl[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,s=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),zl=z("$ZodCheckGreaterThan",(t,e)=>{ut.init(t,e);const n=Bl[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,s=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),bm=z("$ZodCheckMultipleOf",(t,e)=>{ut.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Rh(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Em=z("$ZodCheckNumberFormat",(t,e)=>{ut.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),r=n?"int":"number",[i,s]=Oh[e.format];t._zod.onattach.push(a=>{const o=a._zod.bag;o.format=e.format,o.minimum=i,o.maximum=s,n&&(o.pattern=dm)}),t._zod.check=a=>{const o=a.value;if(n){if(!Number.isInteger(o)){a.issues.push({expected:r,format:e.format,code:"invalid_type",input:o,inst:t});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort});return}}o<i&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),o>s&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:s,inst:t})}}),xm=z("$ZodCheckMaxLength",(t,e)=>{var n;ut.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{const i=r.value;if(i.length<=e.maximum)return;const a=ua(i);r.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Tm=z("$ZodCheckMinLength",(t,e)=>{var n;ut.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{const i=r.value;if(i.length>=e.minimum)return;const a=ua(i);r.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),_m=z("$ZodCheckLengthEquals",(t,e)=>{var n;ut.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=r=>{const i=r.value,s=i.length;if(s===e.length)return;const a=ua(i),o=s>e.length;r.issues.push({origin:a,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),Ni=z("$ZodCheckStringFormat",(t,e)=>{var n,r;ut.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),ym=z("$ZodCheckRegex",(t,e)=>{Ni.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),km=z("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=mm),Ni.init(t,e)}),Am=z("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=gm),Ni.init(t,e)}),Sm=z("$ZodCheckIncludes",(t,e)=>{ut.init(t,e);const n=wr(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Cm=z("$ZodCheckStartsWith",(t,e)=>{ut.init(t,e);const n=new RegExp(`^${wr(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),Im=z("$ZodCheckEndsWith",(t,e)=>{ut.init(t,e);const n=new RegExp(`.*${wr(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}}),Nm=z("$ZodCheckOverwrite",(t,e)=>{ut.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class wm{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const r=e.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/lazy-highlighter-9rAB2zZq.js","assets/index-B5e6fytH.js","assets/index-feMggVqN.css","assets/prism-CcSucC56.js"])))=>i.map(i=>d[i]);
2
+ import{$ as z,f as Rh,n as oa,g as ua,e as wr,h as Oh,i as ke,k as ws,p as an,l as ci,m as di,o as Lh,q as Dh,s as hl,t as pl,v as Wn,w as vs,x as Ph,y as Mh,z as cr,B as _r,C as Bh,D as la,E as ml,F as Fh,G as ee,c as F,H as zh,I as jh,J as Uh,_ as Hh,K as $h,L as Zh,M as Yh,O as qh,P as Vh,Q as Wh,R as Gh,T as Kh,U as Qh,V as gl,W as Xh,Z as le,X as ca,r as P,j as m,Y as Mn,a0 as bl,a1 as El,a2 as at,a3 as da,a4 as Jh,a5 as vr,a6 as ei,a as Rr,a7 as ep,a8 as tp,a9 as np,aa as rp,ab as ip,ac as sp,ad as ap,ae as op,af as up,ag as lp,d as xl,ah as cp,ai as dp,aj as fp,ak as hp,S as Tl,al as pp,am as mp,N as gp,an as bp,ao as _l}from"./index-B5e6fytH.js";import{E as Ep}from"./empty-state-DV83eIhT.js";import{U as yl,u as kl,c as Al,a as xp,b as Tp}from"./use-connection-IMyxygAc.js";import{E as _p,u as ro}from"./use-binding-BLIUV5ER.js";import{u as On,L as Or}from"./localstorage-keys-DC7ymQmZ.js";import{c as yp,T as Sl,a as Cl,b as Il,u as vt,d as kp,L as io,P as Ap,O as Sp}from"./tooltip-DjXyjtiH.js";import{B as ot,u as on}from"./button-DnKGwZ1P.js";import{I as fe}from"./icon-C1glN-Ga.js";import{S as Cp,a as Ip,b as Np,c as wp}from"./select-fvQCifl4.js";import{c as X}from"./utils-BLBjpUfr.js";import{u as Bn}from"./use-mobile-CxX0wu31.js";import{T as vp}from"./textarea--4iImQiq.js";import{C as Rp}from"./connection-card-CgJm9r5i.js";import{E as Rs}from"./error-boundary-qOVcoWbq.js";import{X as Op,D as Nl,a as wl,b as vl,c as Rl,d as Ol}from"./dialog-Qusr5Dgc.js";import{u as Ll,a as Lp}from"./use-organization-settings-CpvpbwdB.js";import{C as Dp}from"./create-organization-dialog-CWgFMDXV.js";import{I as Pp}from"./input-DpAKmHHm.js";import{P as Mp,a as Bp,b as Fp}from"./popover-TCQphQTw.js";import{A as Fn}from"./avatar-CdPaDOIs.js";import{D as zp,a as jp,b as Up,c as Hp,d as so}from"./dropdown-menu-BIeRR6rM.js";import"./auth-CGqqbEan.js";import"./useQuery-BO2jzwkw.js";import"./badge-j-myHF25.js";import"./card-I0CWqn2J.js";import"./integration-icon-C_Dk6BbN.js";import"./alert-dialog-Caf0mgW9.js";import"./form-0C1lYHJ2.js";import"./spinner-Cck765yW.js";const $p=/^[cC][^\s-]{8,}$/,Zp=/^[0-9a-z]+$/,Yp=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,qp=/^[0-9a-vA-V]{20}$/,Vp=/^[A-Za-z0-9]{27}$/,Wp=/^[a-zA-Z0-9_-]{21}$/,Gp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Kp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ao=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,Qp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Xp="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Jp(){return new RegExp(Xp,"u")}const em=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,tm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,nm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,im=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dl=/^[A-Za-z0-9_-]*$/,sm=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,am=/^\+(?:[0-9]){6,14}[0-9]$/,Pl="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",om=new RegExp(`^${Pl}$`);function Ml(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function um(t){return new RegExp(`^${Ml(t)}$`)}function lm(t){const e=Ml({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-]\\d{2}:\\d{2})");const r=`${e}(?:${n.join("|")})`;return new RegExp(`^${Pl}T(?:${r})$`)}const cm=t=>{const e=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},dm=/^\d+$/,fm=/^-?\d+(?:\.\d+)?/i,hm=/true|false/i,pm=/null/i,mm=/^[^A-Z]*$/,gm=/^[^a-z]*$/,ut=z("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Bl={number:"number",bigint:"bigint",object:"date"},Fl=z("$ZodCheckLessThan",(t,e)=>{ut.init(t,e);const n=Bl[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,s=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),zl=z("$ZodCheckGreaterThan",(t,e)=>{ut.init(t,e);const n=Bl[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,s=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),bm=z("$ZodCheckMultipleOf",(t,e)=>{ut.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):Rh(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),Em=z("$ZodCheckNumberFormat",(t,e)=>{ut.init(t,e),e.format=e.format||"float64";const n=e.format?.includes("int"),r=n?"int":"number",[i,s]=Oh[e.format];t._zod.onattach.push(a=>{const o=a._zod.bag;o.format=e.format,o.minimum=i,o.maximum=s,n&&(o.pattern=dm)}),t._zod.check=a=>{const o=a.value;if(n){if(!Number.isInteger(o)){a.issues.push({expected:r,format:e.format,code:"invalid_type",input:o,inst:t});return}if(!Number.isSafeInteger(o)){o>0?a.issues.push({input:o,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort}):a.issues.push({input:o,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,continue:!e.abort});return}}o<i&&a.issues.push({origin:"number",input:o,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),o>s&&a.issues.push({origin:"number",input:o,code:"too_big",maximum:s,inst:t})}}),xm=z("$ZodCheckMaxLength",(t,e)=>{var n;ut.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{const i=r.value;if(i.length<=e.maximum)return;const a=ua(i);r.issues.push({origin:a,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),Tm=z("$ZodCheckMinLength",(t,e)=>{var n;ut.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{const i=r.value;if(i.length>=e.minimum)return;const a=ua(i);r.issues.push({origin:a,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),_m=z("$ZodCheckLengthEquals",(t,e)=>{var n;ut.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!oa(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=r=>{const i=r.value,s=i.length;if(s===e.length)return;const a=ua(i),o=s>e.length;r.issues.push({origin:a,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),Ni=z("$ZodCheckStringFormat",(t,e)=>{var n,r;ut.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),ym=z("$ZodCheckRegex",(t,e)=>{Ni.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),km=z("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=mm),Ni.init(t,e)}),Am=z("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=gm),Ni.init(t,e)}),Sm=z("$ZodCheckIncludes",(t,e)=>{ut.init(t,e);const n=wr(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Cm=z("$ZodCheckStartsWith",(t,e)=>{ut.init(t,e);const n=new RegExp(`^${wr(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),Im=z("$ZodCheckEndsWith",(t,e)=>{ut.init(t,e);const n=new RegExp(`.*${wr(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}}),Nm=z("$ZodCheckOverwrite",(t,e)=>{ut.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class wm{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const r=e.split(`
3
3
  `).filter(a=>a),i=Math.min(...r.map(a=>a.length-a.trimStart().length)),s=r.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(const a of s)this.content.push(a)}compile(){const e=Function,n=this?.args,i=[...(this?.content??[""]).map(s=>` ${s}`)];return new e(...n,i.join(`
4
4
  `))}}const vm={major:4,minor:0,patch:0},ve=z("$ZodType",(t,e)=>{var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=vm;const r=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&r.unshift(t);for(const i of r)for(const s of i._zod.onattach)s(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const i=(s,a,o)=>{let u=cr(s),l;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(s))continue}else if(u)continue;const c=s.issues.length,h=d._zod.check(s);if(h instanceof Promise&&o?.async===!1)throw new vs;if(l||h instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await h,s.issues.length!==c&&(u||(u=cr(s,c)))});else{if(s.issues.length===c)continue;u||(u=cr(s,c))}}return l?l.then(()=>s):s};t._zod.run=(s,a)=>{const o=t._zod.parse(s,a);if(o instanceof Promise){if(a.async===!1)throw new vs;return o.then(u=>i(u,r,a))}return i(o,r,a)}}t["~standard"]={validate:i=>{try{const s=Ph(t,i);return s.success?{value:s.data}:{issues:s.error?.issues}}catch{return Mh(t,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}}),fa=z("$ZodString",(t,e)=>{ve.init(t,e),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??cm(t._zod.bag),t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:t}),n}}),De=z("$ZodStringFormat",(t,e)=>{Ni.init(t,e),fa.init(t,e)}),Rm=z("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Kp),De.init(t,e)}),Om=z("$ZodUUID",(t,e)=>{if(e.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(r===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=ao(r))}else e.pattern??(e.pattern=ao());De.init(t,e)}),Lm=z("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Qp),De.init(t,e)}),Dm=z("$ZodURL",(t,e)=>{De.init(t,e),t._zod.check=n=>{try{const r=n.value,i=new URL(r),s=i.href;e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:sm.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),!r.endsWith("/")&&s.endsWith("/")?n.value=s.slice(0,-1):n.value=s;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),Pm=z("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Jp()),De.init(t,e)}),Mm=z("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Wp),De.init(t,e)}),Bm=z("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=$p),De.init(t,e)}),Fm=z("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=Zp),De.init(t,e)}),zm=z("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Yp),De.init(t,e)}),jm=z("$ZodXID",(t,e)=>{e.pattern??(e.pattern=qp),De.init(t,e)}),Um=z("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Vp),De.init(t,e)}),Hm=z("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=lm(e)),De.init(t,e)}),$m=z("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=om),De.init(t,e)}),Zm=z("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=um(e)),De.init(t,e)}),Ym=z("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Gp),De.init(t,e)}),qm=z("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=em),De.init(t,e),t._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv4"})}),Vm=z("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=tm),De.init(t,e),t._zod.onattach.push(n=>{const r=n._zod.bag;r.format="ipv6"}),t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),Wm=z("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=nm),De.init(t,e)}),Gm=z("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=rm),De.init(t,e),t._zod.check=n=>{const[r,i]=n.value.split("/");try{if(!i)throw new Error;const s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function jl(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const Km=z("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=im),De.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64"}),t._zod.check=n=>{jl(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function Qm(t){if(!Dl.test(t))return!1;const e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return jl(n)}const Xm=z("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Dl),De.init(t,e),t._zod.onattach.push(n=>{n._zod.bag.contentEncoding="base64url"}),t._zod.check=n=>{Qm(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),Jm=z("$ZodE164",(t,e)=>{e.pattern??(e.pattern=am),De.init(t,e)});function e0(t,e=null){try{const n=t.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}const t0=z("$ZodJWT",(t,e)=>{De.init(t,e),t._zod.check=n=>{e0(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),Ul=z("$ZodNumber",(t,e)=>{ve.init(t,e),t._zod.pattern=t._zod.bag.pattern??fm,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}const i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;const s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...s?{received:s}:{}}),n}}),n0=z("$ZodNumber",(t,e)=>{Em.init(t,e),Ul.init(t,e)}),r0=z("$ZodBoolean",(t,e)=>{ve.init(t,e),t._zod.pattern=hm,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}const i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),n}}),i0=z("$ZodNull",(t,e)=>{ve.init(t,e),t._zod.pattern=pm,t._zod.values=new Set([null]),t._zod.parse=(n,r)=>{const i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),n}}),s0=z("$ZodUnknown",(t,e)=>{ve.init(t,e),t._zod.parse=n=>n}),a0=z("$ZodNever",(t,e)=>{ve.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)});function oo(t,e,n){t.issues.length&&e.issues.push(...an(n,t.issues)),e.value[n]=t.value}const o0=z("$ZodArray",(t,e)=>{ve.init(t,e),t._zod.parse=(n,r)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),n;n.value=Array(i.length);const s=[];for(let a=0;a<i.length;a++){const o=i[a],u=e.element._zod.run({value:o,issues:[]},r);u instanceof Promise?s.push(u.then(l=>oo(l,n,a))):oo(u,n,a)}return s.length?Promise.all(s).then(()=>n):n}});function Zr(t,e,n){t.issues.length&&e.issues.push(...an(n,t.issues)),e.value[n]=t.value}function uo(t,e,n,r){t.issues.length?r[n]===void 0?n in r?e.value[n]=void 0:e.value[n]=t.value:e.issues.push(...an(n,t.issues)):t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}const u0=z("$ZodObject",(t,e)=>{ve.init(t,e);const n=hl(()=>{const c=Object.keys(e.shape);for(const p of c)if(!(e.shape[p]instanceof ve))throw new Error(`Invalid element at key "${p}": expected a Zod schema`);const h=Bh(e.shape);return{shape:e.shape,keys:c,keySet:new Set(c),numKeys:c.length,optionalKeys:new Set(h)}});ke(t._zod,"propValues",()=>{const c=e.shape,h={};for(const p in c){const g=c[p]._zod;if(g.values){h[p]??(h[p]=new Set);for(const b of g.values)h[p].add(b)}}return h});const r=c=>{const h=new wm(["shape","payload","ctx"]),p=n.value,g=k=>{const y=Wn(k);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};h.write("const input = payload.value;");const b=Object.create(null);let x=0;for(const k of p.keys)b[k]=`key_${x++}`;h.write("const newResult = {}");for(const k of p.keys)if(p.optionalKeys.has(k)){const y=b[k];h.write(`const ${y} = ${g(k)};`);const _=Wn(k);h.write(`
5
5
  if (${y}.issues.length) {
@@ -120,5 +120,5 @@ Please report this to https://github.com/markedjs/marked.`,t){const r="<p>An err
120
120
  `))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");s.move(a+" ");let l=n.containerPhrasing(t,{before:"# ",after:`
121
121
  `,...s.current()});return/^[\t ]/.test(l)&&(l=Cr(l.charCodeAt(0))+l.slice(1)),l=l?a+" "+l:a,n.options.closeAtx&&(l+=" "+a),u(),o(),l}Nf.peek=WS;function Nf(t){return t.value||""}function WS(){return"<"}wf.peek=GS;function wf(t,e,n,r){const i=qa(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const u=n.createTracker(r);let l=u.move("![");return l+=u.move(n.safe(t.alt,{before:l,after:"]",...u.current()})),l+=u.move("]("),o(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),l+=u.move("<"),l+=u.move(n.safe(t.url,{before:l,after:">",...u.current()})),l+=u.move(">")):(o=n.enter("destinationRaw"),l+=u.move(n.safe(t.url,{before:l,after:t.title?" ":")",...u.current()}))),o(),t.title&&(o=n.enter(`title${s}`),l+=u.move(" "+i),l+=u.move(n.safe(t.title,{before:l,after:i,...u.current()})),l+=u.move(i),o()),l+=u.move(")"),a(),l}function GS(){return"!"}vf.peek=KS;function vf(t,e,n,r){const i=t.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("![");const l=n.safe(t.alt,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(t),{before:u,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!l||l!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function KS(){return"!"}Rf.peek=QS;function Rf(t,e,n){let r=t.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let u;if(a.atBreak)for(;u=o.exec(r);){let l=u.index;r.charCodeAt(l)===10&&r.charCodeAt(l-1)===13&&l--,r=r.slice(0,l)+" "+r.slice(u.index+1)}}return i+r+i}function QS(){return"`"}function Of(t,e){const n=Oa(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Lf.peek=XS;function Lf(t,e,n,r){const i=qa(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,u;if(Of(t,n)){const d=n.stack;n.stack=[],o=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(t,{before:c,after:">",...a.current()})),c+=a.move(">"),o(),n.stack=d,c}o=n.enter("link"),u=n.enter("label");let l=a.move("[");return l+=a.move(n.containerPhrasing(t,{before:l,after:"](",...a.current()})),l+=a.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(n.safe(t.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(u=n.enter("destinationRaw"),l+=a.move(n.safe(t.url,{before:l,after:t.title?" ":")",...a.current()}))),u(),t.title&&(u=n.enter(`title${s}`),l+=a.move(" "+i),l+=a.move(n.safe(t.title,{before:l,after:i,...a.current()})),l+=a.move(i),u()),l+=a.move(")"),o(),l}function XS(t,e,n){return Of(t,n)?"<":"["}Df.peek=JS;function Df(t,e,n,r){const i=t.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let u=o.move("[");const l=n.containerPhrasing(t,{before:u,after:"]",...o.current()});u+=o.move(l+"]["),a();const d=n.stack;n.stack=[],a=n.enter("reference");const c=n.safe(n.associationId(t),{before:u,after:"]",...o.current()});return a(),n.stack=d,s(),i==="full"||!l||l!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function JS(){return"["}function Va(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function eC(t){const e=Va(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function tC(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function Pf(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function nC(t,e,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=t.ordered?tC(n):Va(n);const o=t.ordered?a==="."?")":".":eC(n);let u=e&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!t.ordered){const d=t.children?t.children[0]:void 0;if((a==="*"||a==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Pf(n)===a&&d){let c=-1;for(;++c<t.children.length;){const h=t.children[c];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=o),n.bulletCurrent=a;const l=n.containerFlow(t,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),l}function rC(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function iC(t,e,n,r){const i=rC(n);let s=n.bulletCurrent||Va(n);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const u=n.enter("listItem"),l=n.indentLines(n.containerFlow(t,o.current()),d);return u(),l;function d(c,h,p){return h?(p?"":" ".repeat(a))+c:(p?s:s+" ".repeat(a-s.length))+c}}function sC(t,e,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(t,r);return s(),i(),a}const aC=zi(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function oC(t,e,n,r){return(t.children.some(function(a){return aC(a)})?n.containerPhrasing:n.containerFlow).call(n,t,r)}function uC(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Mf.peek=lC;function Mf(t,e,n,r){const i=uC(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let u=a.move(n.containerPhrasing(t,{after:i,before:o,...a.current()}));const l=u.charCodeAt(0),d=Si(r.before.charCodeAt(r.before.length-1),l,i);d.inside&&(u=Cr(l)+u.slice(1));const c=u.charCodeAt(u.length-1),h=Si(r.after.charCodeAt(0),c,i);h.inside&&(u=u.slice(0,-1)+Cr(c));const p=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},o+u+p}function lC(t,e,n){return n.options.strong||"*"}function cC(t,e,n,r){return n.safe(t.value,r)}function dC(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function fC(t,e,n){const r=(Pf(n)+(n.options.ruleSpaces?" ":"")).repeat(dC(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Bf={blockquote:PS,break:Qu,code:US,definition:$S,emphasis:If,hardBreak:Qu,heading:VS,html:Nf,image:wf,imageReference:vf,inlineCode:Rf,link:Lf,linkReference:Df,list:nC,listItem:iC,paragraph:sC,root:oC,strong:Mf,text:cC,thematicBreak:fC};function hC(){return{enter:{table:pC,tableData:Xu,tableHeader:Xu,tableRow:gC},exit:{codeText:bC,table:mC,tableData:_s,tableHeader:_s,tableRow:_s}}}function pC(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function mC(t){this.exit(t),this.data.inTable=void 0}function gC(t){this.enter({type:"tableRow",children:[]},t)}function _s(t){this.exit(t)}function Xu(t){this.enter({type:"tableCell",children:[]},t)}function bC(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,EC));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function EC(t,e){return e==="|"?e:t}function xC(t){const e=t||{},n=e.tableCellPadding,r=e.tablePipeAlign,i=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
122
122
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:a,tableCell:u,tableRow:o}};function a(p,g,b,x){return l(d(p,b,x),p.align)}function o(p,g,b,x){const E=c(p,b,x),k=l([E]);return k.slice(0,k.indexOf(`
123
- `))}function u(p,g,b,x){const E=b.enter("tableCell"),k=b.enter("phrasing"),y=b.containerPhrasing(p,{...x,before:s,after:s});return k(),E(),y}function l(p,g){return LS(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(p,g,b){const x=p.children;let E=-1;const k=[],y=g.enter("table");for(;++E<x.length;)k[E]=c(x[E],g,b);return y(),k}function c(p,g,b){const x=p.children;let E=-1;const k=[],y=g.enter("tableRow");for(;++E<x.length;)k[E]=u(x[E],p,g,b);return y(),k}function h(p,g,b){let x=Bf.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function TC(){return{exit:{taskListCheckValueChecked:Ju,taskListCheckValueUnchecked:Ju,paragraph:yC}}}function _C(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:kC}}}function Ju(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function yC(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function kC(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let u=Bf.listItem(t,e,n,{...r,...o.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(d){return d+a}}function AC(){return[nS(),kS(),IS(),hC(),TC()]}function SC(t){return{extensions:[rS(),AS(t),NS(),xC(t),_C()]}}const CC={tokenize:OC,partial:!0},Ff={tokenize:LC,partial:!0},zf={tokenize:DC,partial:!0},jf={tokenize:PC,partial:!0},IC={tokenize:MC,partial:!0},Uf={name:"wwwAutolink",tokenize:vC,previous:$f},Hf={name:"protocolAutolink",tokenize:RC,previous:Zf},zt={name:"emailAutolink",tokenize:wC,previous:Yf},Ot={};function NC(){return{text:Ot}}let tn=48;for(;tn<123;)Ot[tn]=zt,tn++,tn===58?tn=65:tn===91&&(tn=97);Ot[43]=zt;Ot[45]=zt;Ot[46]=zt;Ot[95]=zt;Ot[72]=[zt,Hf];Ot[104]=[zt,Hf];Ot[87]=[zt,Uf];Ot[119]=[zt,Uf];function wC(t,e,n){const r=this;let i,s;return a;function a(c){return!ia(c)||!Yf.call(r,r.previous)||Wa(r.events)?n(c):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(c))}function o(c){return ia(c)?(t.consume(c),o):c===64?(t.consume(c),u):n(c)}function u(c){return c===46?t.check(IC,d,l)(c):c===45||c===95||Ke(c)?(s=!0,t.consume(c),u):d(c)}function l(c){return t.consume(c),i=!0,u}function d(c){return s&&i&&et(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(c)):n(c)}}function vC(t,e,n){const r=this;return i;function i(a){return a!==87&&a!==119||!$f.call(r,r.previous)||Wa(r.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(CC,t.attempt(Ff,t.attempt(zf,s),n),n)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function RC(t,e,n){const r=this;let i="",s=!1;return a;function a(c){return(c===72||c===104)&&Zf.call(r,r.previous)&&!Wa(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),t.consume(c),o):n(c)}function o(c){if(et(c)&&i.length<5)return i+=String.fromCodePoint(c),t.consume(c),o;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return t.consume(c),u}return n(c)}function u(c){return c===47?(t.consume(c),s?l:(s=!0,u)):n(c)}function l(c){return c===null||Ti(c)||Ne(c)||hn(c)||Mi(c)?n(c):t.attempt(Ff,t.attempt(zf,d),n)(c)}function d(c){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(c)}}function OC(t,e,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,t.consume(a),i):a===46&&r===3?(t.consume(a),s):n(a)}function s(a){return a===null?n(a):e(a)}}function LC(t,e,n){let r,i,s;return a;function a(l){return l===46||l===95?t.check(jf,u,o)(l):l===null||Ne(l)||hn(l)||l!==45&&Mi(l)?u(l):(s=!0,t.consume(l),a)}function o(l){return l===95?r=!0:(i=r,r=void 0),t.consume(l),a}function u(l){return i||r||!s?n(l):e(l)}}function DC(t,e){let n=0,r=0;return i;function i(a){return a===40?(n++,t.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(jf,e,s)(a):a===null||Ne(a)||hn(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&r++,t.consume(a),i}}function PC(t,e,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(t.consume(o),r):o===38?(t.consume(o),s):o===93?(t.consume(o),i):o===60||o===null||Ne(o)||hn(o)?e(o):n(o)}function i(o){return o===null||o===40||o===91||Ne(o)||hn(o)?e(o):r(o)}function s(o){return et(o)?a(o):n(o)}function a(o){return o===59?(t.consume(o),r):et(o)?(t.consume(o),a):n(o)}}function MC(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Ke(s)?n(s):e(s)}}function $f(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ne(t)}function Zf(t){return!et(t)}function Yf(t){return!(t===47||ia(t))}function ia(t){return t===43||t===45||t===46||t===95||Ke(t)}function Wa(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const BC={tokenize:YC,partial:!0};function FC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:HC,continuation:{tokenize:$C},exit:ZC}},text:{91:{name:"gfmFootnoteCall",tokenize:UC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zC,resolveTo:jC}}}}function zC(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!a||!a._balanced)return n(u);const l=yt(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!s.includes(l.slice(1))?n(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function jC(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...o),t}function UC(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(c){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(t.enter("gfmFootnoteCallMarker"),t.consume(c),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(c){if(s>999||c===93&&!a||c===null||c===91||Ne(c))return n(c);if(c===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(yt(r.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(c)}return Ne(c)||(a=!0),s++,t.consume(c),c===92?d:l}function d(c){return c===91||c===92||c===93?(t.consume(c),s++,l):l(c)}}function HC(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return u;function u(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",d):n(g)}function d(g){if(a>999||g===93&&!o||g===null||g===91||Ne(g))return n(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteDefinitionLabelString");return s=yt(r.sliceSerialize(b)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return Ne(g)||(o=!0),a++,t.consume(g),g===92?c:d}function c(g){return g===91||g===92||g===93?(t.consume(g),a++,d):d(g)}function h(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),i.includes(s)||i.push(s),_e(t,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return e(g)}}function $C(t,e,n){return t.check(Fr,e,t.attempt(BC,e,n))}function ZC(t){t.exit("gfmFootnoteDefinition")}function YC(t,e,n){const r=this;return _e(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):n(s)}}function qC(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},c={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},h=[["enter",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["enter",c,o]],p=o.parser.constructs.insideSpan.null;p&&ht(h,h.length,0,Bi(p,a.slice(l+1,u),o)),ht(h,h.length,0,[["exit",c,o],["enter",a[u][1],o],["exit",a[u][1],o],["exit",d,o]]),ht(a,l-1,u-l+3,h),u=l+h.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function s(a,o,u){const l=this.previous,d=this.events;let c=0;return h;function h(g){return l===126&&d[d.length-1][1].type!=="characterEscape"?u(g):(a.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=Ln(l);if(g===126)return c>1?u(g):(a.consume(g),c++,p);if(c<2&&!n)return u(g);const x=a.exit("strikethroughSequenceTemporary"),E=Ln(g);return x._open=!E||E===2&&!!b,x._close=!b||b===2&&!!E,o(g)}}}class VC{constructor(){this.map=[]}add(e,n,r){WC(this,e,n,r)}consume(e){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function WC(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function GC(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function KC(){return{flow:{null:{name:"table",tokenize:QC,resolveAll:XC}}}}function QC(t,e,n){const r=this;let i=0,s=0,a;return o;function o(v){let B=r.events.length-1;for(;B>-1;){const Y=r.events[B][1].type;if(Y==="lineEnding"||Y==="linePrefix")B--;else break}const j=B>-1?r.events[B][1].type:null,G=j==="tableHead"||j==="tableRow"?S:u;return G===S&&r.parser.lazy[r.now().line]?n(v):G(v)}function u(v){return t.enter("tableHead"),t.enter("tableRow"),l(v)}function l(v){return v===124||(a=!0,s+=1),d(v)}function d(v){return v===null?n(v):ie(v)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),p):n(v):be(v)?_e(t,d,"whitespace")(v):(s+=1,a&&(a=!1,i+=1),v===124?(t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),a=!0,d):(t.enter("data"),c(v)))}function c(v){return v===null||v===124||Ne(v)?(t.exit("data"),d(v)):(t.consume(v),v===92?h:c)}function h(v){return v===92||v===124?(t.consume(v),c):c(v)}function p(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(v):(t.enter("tableDelimiterRow"),a=!1,be(v)?_e(t,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):g(v))}function g(v){return v===45||v===58?x(v):v===124?(a=!0,t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),b):R(v)}function b(v){return be(v)?_e(t,x,"whitespace")(v):x(v)}function x(v){return v===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(v),t.exit("tableDelimiterMarker"),E):v===45?(s+=1,E(v)):v===null||ie(v)?_(v):R(v)}function E(v){return v===45?(t.enter("tableDelimiterFiller"),k(v)):R(v)}function k(v){return v===45?(t.consume(v),k):v===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(v),t.exit("tableDelimiterMarker"),y):(t.exit("tableDelimiterFiller"),y(v))}function y(v){return be(v)?_e(t,_,"whitespace")(v):_(v)}function _(v){return v===124?g(v):v===null||ie(v)?!a||i!==s?R(v):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(v)):R(v)}function R(v){return n(v)}function S(v){return t.enter("tableRow"),w(v)}function w(v){return v===124?(t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),w):v===null||ie(v)?(t.exit("tableRow"),e(v)):be(v)?_e(t,w,"whitespace")(v):(t.enter("data"),O(v))}function O(v){return v===null||v===124||Ne(v)?(t.exit("data"),w(v)):(t.consume(v),v===92?D:O)}function D(v){return v===92||v===124?(t.consume(v),O):O(v)}}function XC(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,u=0,l,d,c;const h=new VC;for(;++n<t.length;){const p=t[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(el(h,e,u,l,d),d=void 0,u=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",l,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",d,e]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],c=Qr(h,e,s,i,void 0,c),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],c=Qr(h,e,s,i,void 0,c)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,s[1]!==0?(a[0]=a[1],c=Qr(h,e,s,i,n,c)):a[1]!==0&&(c=Qr(h,e,a,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&el(h,e,u,l,d),h.consume(e.events),n=-1;++n<e.events.length;){const p=e.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=GC(e.events,n))}return t}function Qr(t,e,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Cn(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const u=Cn(e.events,n[1]);if(s={type:a,start:Object.assign({},u),end:Object.assign({},u)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const l=Cn(e.events,n[2]),d=Cn(e.events,n[3]),c={type:o,start:Object.assign({},l),end:Object.assign({},d)};if(t.add(n[2],0,[["enter",c,e]]),r!==2){const h=e.events[n[2]],p=e.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;t.add(g,b,[])}}t.add(n[3]+1,0,[["exit",c,e]])}return i!==void 0&&(s.end=Object.assign({},Cn(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function el(t,e,n,r,i){const s=[],a=Cn(e.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,e])),r.end=Object.assign({},a),s.push(["exit",r,e]),t.add(n+1,0,s)}function Cn(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const JC={name:"tasklistCheck",tokenize:tI};function eI(){return{text:{91:JC}}}function tI(t,e,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),s)}function s(u){return Ne(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),o):n(u)}function o(u){return ie(u)?e(u):be(u)?t.check({tokenize:nI},e,n)(u):n(u)}}function nI(t,e,n){return _e(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function rI(t){return xd([NC(),FC(),qC(t),KC(),eI()])}const iI={};function sI(t){const e=this,n=t||iI,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(rI(n)),s.push(AC()),a.push(SC(n))}const aI=P.lazy(()=>Jh(()=>import("./lazy-highlighter-V_ETf5s5.js"),__vite__mapDeps([0,1,2,3])));function qf(){const t=F.c(3),[e,n]=P.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async a=>{await navigator.clipboard.writeText(a),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let s;return t[1]!==e?(s={handleCopy:i,copied:e},t[1]=e,t[2]=s):s=t[2],s}function oI(){const t=F.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[85,70],t[0]=e):e=t[0];const n=e;let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx("div",{className:"p-4 font-mono text-sm",style:{background:"#2d2d2d",borderRadius:"0 0 0.5rem 0.5rem",overflow:"auto",minHeight:"4rem"},children:n.map(uI)}),t[1]=r):r=t[1],r}function uI(t,e){return m.jsxs("div",{className:"flex gap-2 items-center my-1",children:[e>2&&e<7&&m.jsx("div",{className:"w-4 h-4 rounded-sm opacity-40 animate-pulse",style:{background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.1}s`}}),e%4===0&&m.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"3rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.12}s`}}),e%3===1&&m.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"2.5rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.14}s`}}),m.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:`${t}%`,background:"rgba(255, 255, 255, 0.1)",animationDelay:`${e*.1}s`}}),e%5===2&&m.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"4rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.16}s`}})]},e)}function lI(t){const e=F.c(12),n=P.useRef(null),{handleCopy:r,copied:i}=qf(),s=cI;let a;e[0]!==r?(a=async()=>{const p=s(n.current);await r(p)},e[0]=r,e[1]=a):a=e[1];const o=a,u=i?"check":"content_copy";let l;e[2]!==u?(l=m.jsx(fe,{name:u,size:12}),e[2]=u,e[3]=l):l=e[3];let d;e[4]!==o||e[5]!==l?(d=m.jsx("div",{className:"flex justify-end items-center",children:m.jsxs(ot,{variant:"ghost",onClick:o,"aria-label":"Copy as CSV",className:"text-muted-foreground hover:text-foreground h-6 text-[10px]",type:"button",children:["Copy as CSV",l]})}),e[4]=o,e[5]=l,e[6]=d):d=e[6];let c;e[7]!==t?(c=m.jsx("div",{className:"overflow-x-auto mb-4 rounded-lg border border-border",children:m.jsx("table",{ref:n,...t,className:"min-w-full border-collapse text-sm",children:t.children})}),e[7]=t,e[8]=c):c=e[8];let h;return e[9]!==d||e[10]!==c?(h=m.jsxs(m.Fragment,{children:[d,c]}),e[9]=d,e[10]=c,e[11]=h):h=e[11],h}function cI(t){return t?Array.from(t.querySelectorAll("tr")).map(dI).join(`
123
+ `))}function u(p,g,b,x){const E=b.enter("tableCell"),k=b.enter("phrasing"),y=b.containerPhrasing(p,{...x,before:s,after:s});return k(),E(),y}function l(p,g){return LS(p,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function d(p,g,b){const x=p.children;let E=-1;const k=[],y=g.enter("table");for(;++E<x.length;)k[E]=c(x[E],g,b);return y(),k}function c(p,g,b){const x=p.children;let E=-1;const k=[],y=g.enter("tableRow");for(;++E<x.length;)k[E]=u(x[E],p,g,b);return y(),k}function h(p,g,b){let x=Bf.inlineCode(p,g,b);return b.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function TC(){return{exit:{taskListCheckValueChecked:Ju,taskListCheckValueUnchecked:Ju,paragraph:yC}}}function _C(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:kC}}}function Ju(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function yC(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=e.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function kC(t,e,n,r){const i=t.children[0],s=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let u=Bf.listItem(t,e,n,{...r,...o.current()});return s&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),u;function l(d){return d+a}}function AC(){return[nS(),kS(),IS(),hC(),TC()]}function SC(t){return{extensions:[rS(),AS(t),NS(),xC(t),_C()]}}const CC={tokenize:OC,partial:!0},Ff={tokenize:LC,partial:!0},zf={tokenize:DC,partial:!0},jf={tokenize:PC,partial:!0},IC={tokenize:MC,partial:!0},Uf={name:"wwwAutolink",tokenize:vC,previous:$f},Hf={name:"protocolAutolink",tokenize:RC,previous:Zf},zt={name:"emailAutolink",tokenize:wC,previous:Yf},Ot={};function NC(){return{text:Ot}}let tn=48;for(;tn<123;)Ot[tn]=zt,tn++,tn===58?tn=65:tn===91&&(tn=97);Ot[43]=zt;Ot[45]=zt;Ot[46]=zt;Ot[95]=zt;Ot[72]=[zt,Hf];Ot[104]=[zt,Hf];Ot[87]=[zt,Uf];Ot[119]=[zt,Uf];function wC(t,e,n){const r=this;let i,s;return a;function a(c){return!ia(c)||!Yf.call(r,r.previous)||Wa(r.events)?n(c):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(c))}function o(c){return ia(c)?(t.consume(c),o):c===64?(t.consume(c),u):n(c)}function u(c){return c===46?t.check(IC,d,l)(c):c===45||c===95||Ke(c)?(s=!0,t.consume(c),u):d(c)}function l(c){return t.consume(c),i=!0,u}function d(c){return s&&i&&et(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(c)):n(c)}}function vC(t,e,n){const r=this;return i;function i(a){return a!==87&&a!==119||!$f.call(r,r.previous)||Wa(r.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(CC,t.attempt(Ff,t.attempt(zf,s),n),n)(a))}function s(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function RC(t,e,n){const r=this;let i="",s=!1;return a;function a(c){return(c===72||c===104)&&Zf.call(r,r.previous)&&!Wa(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),t.consume(c),o):n(c)}function o(c){if(et(c)&&i.length<5)return i+=String.fromCodePoint(c),t.consume(c),o;if(c===58){const h=i.toLowerCase();if(h==="http"||h==="https")return t.consume(c),u}return n(c)}function u(c){return c===47?(t.consume(c),s?l:(s=!0,u)):n(c)}function l(c){return c===null||Ti(c)||Ne(c)||hn(c)||Mi(c)?n(c):t.attempt(Ff,t.attempt(zf,d),n)(c)}function d(c){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(c)}}function OC(t,e,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,t.consume(a),i):a===46&&r===3?(t.consume(a),s):n(a)}function s(a){return a===null?n(a):e(a)}}function LC(t,e,n){let r,i,s;return a;function a(l){return l===46||l===95?t.check(jf,u,o)(l):l===null||Ne(l)||hn(l)||l!==45&&Mi(l)?u(l):(s=!0,t.consume(l),a)}function o(l){return l===95?r=!0:(i=r,r=void 0),t.consume(l),a}function u(l){return i||r||!s?n(l):e(l)}}function DC(t,e){let n=0,r=0;return i;function i(a){return a===40?(n++,t.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(jf,e,s)(a):a===null||Ne(a)||hn(a)?e(a):(t.consume(a),i)}function s(a){return a===41&&r++,t.consume(a),i}}function PC(t,e,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(t.consume(o),r):o===38?(t.consume(o),s):o===93?(t.consume(o),i):o===60||o===null||Ne(o)||hn(o)?e(o):n(o)}function i(o){return o===null||o===40||o===91||Ne(o)||hn(o)?e(o):r(o)}function s(o){return et(o)?a(o):n(o)}function a(o){return o===59?(t.consume(o),r):et(o)?(t.consume(o),a):n(o)}}function MC(t,e,n){return r;function r(s){return t.consume(s),i}function i(s){return Ke(s)?n(s):e(s)}}function $f(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Ne(t)}function Zf(t){return!et(t)}function Yf(t){return!(t===47||ia(t))}function ia(t){return t===43||t===45||t===46||t===95||Ke(t)}function Wa(t){let e=t.length,n=!1;for(;e--;){const r=t[e][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const BC={tokenize:YC,partial:!0};function FC(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:HC,continuation:{tokenize:$C},exit:ZC}},text:{91:{name:"gfmFootnoteCall",tokenize:UC},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:zC,resolveTo:jC}}}}function zC(t,e,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const u=r.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!a||!a._balanced)return n(u);const l=yt(r.sliceSerialize({start:a.end,end:r.now()}));return l.codePointAt(0)!==94||!s.includes(l.slice(1))?n(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function jC(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},t[t.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[t[n+1],t[n+2],["enter",r,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",s,e],["enter",a,e],["exit",a,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",r,e]];return t.splice(n,t.length-n+1,...o),t}function UC(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(c){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(t.enter("gfmFootnoteCallMarker"),t.consume(c),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",l)}function l(c){if(s>999||c===93&&!a||c===null||c===91||Ne(c))return n(c);if(c===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(yt(r.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(c)}return Ne(c)||(a=!0),s++,t.consume(c),c===92?d:l}function d(c){return c===91||c===92||c===93?(t.consume(c),s++,l):l(c)}}function HC(t,e,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return u;function u(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",d):n(g)}function d(g){if(a>999||g===93&&!o||g===null||g===91||Ne(g))return n(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteDefinitionLabelString");return s=yt(r.sliceSerialize(b)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return Ne(g)||(o=!0),a++,t.consume(g),g===92?c:d}function c(g){return g===91||g===92||g===93?(t.consume(g),a++,d):d(g)}function h(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),i.includes(s)||i.push(s),_e(t,p,"gfmFootnoteDefinitionWhitespace")):n(g)}function p(g){return e(g)}}function $C(t,e,n){return t.check(Fr,e,t.attempt(BC,e,n))}function ZC(t){t.exit("gfmFootnoteDefinition")}function YC(t,e,n){const r=this;return _e(t,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(s):n(s)}}function qC(t){let n=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let l=u;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[u][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[u][1].end)},c={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[u][1].start)},h=[["enter",d,o],["enter",a[l][1],o],["exit",a[l][1],o],["enter",c,o]],p=o.parser.constructs.insideSpan.null;p&&ht(h,h.length,0,Bi(p,a.slice(l+1,u),o)),ht(h,h.length,0,[["exit",c,o],["enter",a[u][1],o],["exit",a[u][1],o],["exit",d,o]]),ht(a,l-1,u-l+3,h),u=l+h.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function s(a,o,u){const l=this.previous,d=this.events;let c=0;return h;function h(g){return l===126&&d[d.length-1][1].type!=="characterEscape"?u(g):(a.enter("strikethroughSequenceTemporary"),p(g))}function p(g){const b=Ln(l);if(g===126)return c>1?u(g):(a.consume(g),c++,p);if(c<2&&!n)return u(g);const x=a.exit("strikethroughSequenceTemporary"),E=Ln(g);return x._open=!E||E===2&&!!b,x._close=!b||b===2&&!!E,o(g)}}}class VC{constructor(){this.map=[]}add(e,n,r){WC(this,e,n,r)}consume(e){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];r.push(e.slice()),e.length=0;let i=r.pop();for(;i;){for(const s of i)e.push(s);i=r.pop()}this.map.length=0}}function WC(t,e,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...r);return}i+=1}t.map.push([e,n,r])}}function GC(t,e){let n=!1;const r=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return r}function KC(){return{flow:{null:{name:"table",tokenize:QC,resolveAll:XC}}}}function QC(t,e,n){const r=this;let i=0,s=0,a;return o;function o(v){let B=r.events.length-1;for(;B>-1;){const Y=r.events[B][1].type;if(Y==="lineEnding"||Y==="linePrefix")B--;else break}const j=B>-1?r.events[B][1].type:null,G=j==="tableHead"||j==="tableRow"?S:u;return G===S&&r.parser.lazy[r.now().line]?n(v):G(v)}function u(v){return t.enter("tableHead"),t.enter("tableRow"),l(v)}function l(v){return v===124||(a=!0,s+=1),d(v)}function d(v){return v===null?n(v):ie(v)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),p):n(v):be(v)?_e(t,d,"whitespace")(v):(s+=1,a&&(a=!1,i+=1),v===124?(t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),a=!0,d):(t.enter("data"),c(v)))}function c(v){return v===null||v===124||Ne(v)?(t.exit("data"),d(v)):(t.consume(v),v===92?h:c)}function h(v){return v===92||v===124?(t.consume(v),c):c(v)}function p(v){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(v):(t.enter("tableDelimiterRow"),a=!1,be(v)?_e(t,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):g(v))}function g(v){return v===45||v===58?x(v):v===124?(a=!0,t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),b):R(v)}function b(v){return be(v)?_e(t,x,"whitespace")(v):x(v)}function x(v){return v===58?(s+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(v),t.exit("tableDelimiterMarker"),E):v===45?(s+=1,E(v)):v===null||ie(v)?_(v):R(v)}function E(v){return v===45?(t.enter("tableDelimiterFiller"),k(v)):R(v)}function k(v){return v===45?(t.consume(v),k):v===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(v),t.exit("tableDelimiterMarker"),y):(t.exit("tableDelimiterFiller"),y(v))}function y(v){return be(v)?_e(t,_,"whitespace")(v):_(v)}function _(v){return v===124?g(v):v===null||ie(v)?!a||i!==s?R(v):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(v)):R(v)}function R(v){return n(v)}function S(v){return t.enter("tableRow"),w(v)}function w(v){return v===124?(t.enter("tableCellDivider"),t.consume(v),t.exit("tableCellDivider"),w):v===null||ie(v)?(t.exit("tableRow"),e(v)):be(v)?_e(t,w,"whitespace")(v):(t.enter("data"),O(v))}function O(v){return v===null||v===124||Ne(v)?(t.exit("data"),w(v)):(t.consume(v),v===92?D:O)}function D(v){return v===92||v===124?(t.consume(v),O):O(v)}}function XC(t,e){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,u=0,l,d,c;const h=new VC;for(;++n<t.length;){const p=t[n],g=p[1];p[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(el(h,e,u,l,d),d=void 0,u=0),l={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",l,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,c=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,d={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},h.add(n,0,[["enter",d,e]])),i=g.type==="tableDelimiterRow"?2:d?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],c=Qr(h,e,s,i,void 0,c),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],c=Qr(h,e,s,i,void 0,c)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,s[1]!==0?(a[0]=a[1],c=Qr(h,e,s,i,n,c)):a[1]!==0&&(c=Qr(h,e,a,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&el(h,e,u,l,d),h.consume(e.events),n=-1;++n<e.events.length;){const p=e.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=GC(e.events,n))}return t}function Qr(t,e,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Cn(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const u=Cn(e.events,n[1]);if(s={type:a,start:Object.assign({},u),end:Object.assign({},u)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const l=Cn(e.events,n[2]),d=Cn(e.events,n[3]),c={type:o,start:Object.assign({},l),end:Object.assign({},d)};if(t.add(n[2],0,[["enter",c,e]]),r!==2){const h=e.events[n[2]],p=e.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,b=n[3]-n[2]-1;t.add(g,b,[])}}t.add(n[3]+1,0,[["exit",c,e]])}return i!==void 0&&(s.end=Object.assign({},Cn(e.events,i)),t.add(i,0,[["exit",s,e]]),s=void 0),s}function el(t,e,n,r,i){const s=[],a=Cn(e.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,e])),r.end=Object.assign({},a),s.push(["exit",r,e]),t.add(n+1,0,s)}function Cn(t,e){const n=t[e],r=n[0]==="enter"?"start":"end";return n[1][r]}const JC={name:"tasklistCheck",tokenize:tI};function eI(){return{text:{91:JC}}}function tI(t,e,n){const r=this;return i;function i(u){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),s)}function s(u){return Ne(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),o):n(u)}function o(u){return ie(u)?e(u):be(u)?t.check({tokenize:nI},e,n)(u):n(u)}}function nI(t,e,n){return _e(t,r,"whitespace");function r(i){return i===null?n(i):e(i)}}function rI(t){return xd([NC(),FC(),qC(t),KC(),eI()])}const iI={};function sI(t){const e=this,n=t||iI,r=e.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(rI(n)),s.push(AC()),a.push(SC(n))}const aI=P.lazy(()=>Jh(()=>import("./lazy-highlighter-9rAB2zZq.js"),__vite__mapDeps([0,1,2,3])));function qf(){const t=F.c(3),[e,n]=P.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async a=>{await navigator.clipboard.writeText(a),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let s;return t[1]!==e?(s={handleCopy:i,copied:e},t[1]=e,t[2]=s):s=t[2],s}function oI(){const t=F.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=[85,70],t[0]=e):e=t[0];const n=e;let r;return t[1]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx("div",{className:"p-4 font-mono text-sm",style:{background:"#2d2d2d",borderRadius:"0 0 0.5rem 0.5rem",overflow:"auto",minHeight:"4rem"},children:n.map(uI)}),t[1]=r):r=t[1],r}function uI(t,e){return m.jsxs("div",{className:"flex gap-2 items-center my-1",children:[e>2&&e<7&&m.jsx("div",{className:"w-4 h-4 rounded-sm opacity-40 animate-pulse",style:{background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.1}s`}}),e%4===0&&m.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"3rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.12}s`}}),e%3===1&&m.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"2.5rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.14}s`}}),m.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:`${t}%`,background:"rgba(255, 255, 255, 0.1)",animationDelay:`${e*.1}s`}}),e%5===2&&m.jsx("div",{className:"h-4 rounded animate-pulse",style:{width:"4rem",background:"rgba(128, 128, 128, 0.3)",animationDelay:`${e*.16}s`}})]},e)}function lI(t){const e=F.c(12),n=P.useRef(null),{handleCopy:r,copied:i}=qf(),s=cI;let a;e[0]!==r?(a=async()=>{const p=s(n.current);await r(p)},e[0]=r,e[1]=a):a=e[1];const o=a,u=i?"check":"content_copy";let l;e[2]!==u?(l=m.jsx(fe,{name:u,size:12}),e[2]=u,e[3]=l):l=e[3];let d;e[4]!==o||e[5]!==l?(d=m.jsx("div",{className:"flex justify-end items-center",children:m.jsxs(ot,{variant:"ghost",onClick:o,"aria-label":"Copy as CSV",className:"text-muted-foreground hover:text-foreground h-6 text-[10px]",type:"button",children:["Copy as CSV",l]})}),e[4]=o,e[5]=l,e[6]=d):d=e[6];let c;e[7]!==t?(c=m.jsx("div",{className:"overflow-x-auto mb-4 rounded-lg border border-border",children:m.jsx("table",{ref:n,...t,className:"min-w-full border-collapse text-sm",children:t.children})}),e[7]=t,e[8]=c):c=e[8];let h;return e[9]!==d||e[10]!==c?(h=m.jsxs(m.Fragment,{children:[d,c]}),e[9]=d,e[10]=c,e[11]=h):h=e[11],h}function cI(t){return t?Array.from(t.querySelectorAll("tr")).map(dI).join(`
124
124
  `):""}function dI(t){return Array.from(t.querySelectorAll("th,td")).map(fI).join(",")}function fI(t){let e=t.textContent||"";return e=e.replace(/"/g,'""'),e.search(/([",\n])/g)>=0&&(e=`"${e}"`),e}const hI=[sI],pI=[KA],mI={p:t=>m.jsx("p",{...t,className:"leading-relaxed text-[0.9375rem]"}),strong:t=>m.jsx("strong",{...t,className:"font-bold"}),em:t=>m.jsx("em",{...t,className:"italic"}),a:t=>m.jsx("a",{...t,target:"_blank",rel:"noopener noreferrer",className:"text-primary-dark hover:underline break-all font-medium"}),ul:t=>m.jsx("ul",{...t,className:"list-disc ml-6 my-4 space-y-2"}),ol:t=>m.jsx("ol",{...t,className:"list-decimal ml-6 my-4 space-y-2"}),li:t=>m.jsx("li",{...t,className:"leading-relaxed text-[0.9375rem]"}),code:t=>m.jsx("code",{...t,className:"px-1 py-0.5 bg-muted rounded text-sm font-mono break-all"}),pre:t=>m.jsx("pre",{...t,className:"flex w-full min-w-0 my-4 bg-muted rounded overflow-hidden",children:m.jsx("code",{className:"flex-1 min-w-0 p-4 text-sm font-mono whitespace-pre overflow-x-auto",children:t.children})}),table:t=>m.jsx(lI,{...t}),thead:t=>m.jsx("thead",{...t,className:"bg-muted",children:t.children}),tr:t=>m.jsx("tr",{...t,className:"even:bg-muted/50 border-b border-border last:border-0"}),th:t=>m.jsx("th",{...t,className:"px-4 py-2 text-left font-semibold text-muted-foreground border-b border-border"}),td:t=>m.jsx("td",{...t,className:"px-4 py-2 border-b border-border"})},Vf=P.memo(t=>{const e=F.c(2),{content:n}=t;let r;return e[0]!==n?(r=m.jsx(Dy,{remarkPlugins:hI,rehypePlugins:pI,components:mI,children:n}),e[0]=n,e[1]=r):r=e[1],r},(t,e)=>t.content===e.content);function gI(t){const e=F.c(20),{language:n,content:r}=t,{handleCopy:i,copied:s}=qf(),a=n||"text";let o;e[0]!==a?(o=m.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground tracking-widest select-none",children:a}),e[0]=a,e[1]=o):o=e[1];let u;e[2]!==r||e[3]!==i?(u=()=>i(r),e[2]=r,e[3]=i,e[4]=u):u=e[4];const l=s?"check":"content_copy";let d;e[5]!==l?(d=m.jsx(fe,{name:l,size:14}),e[5]=l,e[6]=d):d=e[6];let c;e[7]!==u||e[8]!==d?(c=m.jsx(ot,{size:"icon",variant:"ghost",onClick:u,"aria-label":"Copy code",className:"text-muted-foreground hover:text-foreground rounded-lg h-8 w-8",children:d}),e[7]=u,e[8]=d,e[9]=c):c=e[9];let h;e[10]!==o||e[11]!==c?(h=m.jsxs("div",{className:"flex items-center justify-between p-1 pl-4 bg-muted border-b border-border",children:[o,c]}),e[10]=o,e[11]=c,e[12]=h):h=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsx(oI,{}),e[13]=p):p=e[13];let g;e[14]!==r||e[15]!==n?(g=m.jsx(P.Suspense,{fallback:p,children:m.jsx(aI,{language:n,content:r})}),e[14]=r,e[15]=n,e[16]=g):g=e[16];let b;return e[17]!==h||e[18]!==g?(b=m.jsxs("div",{className:"my-4 rounded-lg bg-muted overflow-hidden border border-border grid min-w-0",children:[h,g]}),e[17]=h,e[18]=g,e[19]=b):b=e[19],b}Vf.displayName="MemoizedMarkdownBlock";const Ga=t=>{const e=F.c(7),{id:n,text:r}=t;let i;e[0]!==r?(i=Se.lexer(r),e[0]=r,e[1]=i):i=e[1];const s=i;let a;if(e[2]!==s||e[3]!==n){let o;e[5]!==n?(o=(u,l)=>u.type==="code"?m.jsx(gI,{language:u.lang,content:u.text},`${n}-block_${l}`):m.jsx(Vf,{content:u.raw},`${n}-block_${l}`),e[5]=n,e[6]=o):o=e[6],a=s.map(o),e[2]=s,e[3]=n,e[4]=a}else a=e[4];return a};Ga.displayName="MemoizedMarkdown";function bI(t,e){switch(e.type){case"TOGGLE":return{isExpanded:!t.isExpanded,wasManuallyToggled:!0};case"SET_EXPANDED":return t.wasManuallyToggled?t:{...t,isExpanded:e.payload};default:return t}}function EI(t){const e=F.c(38),{part:n,id:r}=t,{state:i}=n,s=i==="streaming";let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={isExpanded:!1,wasManuallyToggled:!1},e[0]=a):a=e[0];const[o,u]=P.useReducer(bI,a),{isExpanded:l}=o;let d,c;e[1]!==s?(d=()=>{u({type:"SET_EXPANDED",payload:s})},c=[s],e[1]=s,e[2]=d,e[3]=c):(d=e[2],c=e[3]),P.useEffect(d,c);let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{u({type:"TOGGLE"})},e[4]=h):h=e[4];const p=h,g=s&&"animate-pulse";let b;e[5]!==g?(b=X("text-muted-foreground transition-opacity",g),e[5]=g,e[6]=b):b=e[6];let x;e[7]!==b?(x=m.jsx(fe,{name:"psychology",className:b}),e[7]=b,e[8]=x):x=e[8];const E=s&&"text-shimmer";let k;e[9]!==E?(k=X("text-sm font-medium text-muted-foreground",E),e[9]=E,e[10]=k):k=e[10];let y;e[11]!==k?(y=m.jsx("span",{className:k,children:"Agent thinking"}),e[11]=k,e[12]=y):y=e[12];const _=l?"rotate-180":"";let R;e[13]!==_?(R=X("text-muted-foreground transition-transform duration-200",_),e[13]=_,e[14]=R):R=e[14];let S;e[15]!==R?(S=m.jsx(fe,{name:"expand_more",className:R}),e[15]=R,e[16]=S):S=e[16];let w;e[17]!==y||e[18]!==S||e[19]!==x?(w=m.jsxs("button",{type:"button",onClick:p,className:"flex items-center gap-2 py-2 transition-colors cursor-pointer",children:[x,y,S]}),e[17]=y,e[18]=S,e[19]=x,e[20]=w):w=e[20];const O=l?s?"max-h-[400px] opacity-100":"max-h-[200px] opacity-80":"max-h-0 opacity-0 overflow-hidden";let D;e[21]!==O?(D=X("transition-all duration-200 ease-in-out",O),e[21]=O,e[22]=D):D=e[22];const v=s?"max-h-[400px]":"max-h-[200px]";let B;e[23]!==v?(B=X("border-l-2 pl-4 overflow-y-auto",v),e[23]=v,e[24]=B):B=e[24];let j;e[25]===Symbol.for("react.memo_cache_sentinel")?(j=X("text-muted-foreground markdown-sm pb-2"),e[25]=j):j=e[25];let G;e[26]!==r||e[27]!==n.text?(G=m.jsx("div",{className:j,children:m.jsx(Ga,{id:r,text:n.text})}),e[26]=r,e[27]=n.text,e[28]=G):G=e[28];let Y;e[29]!==B||e[30]!==G?(Y=m.jsx("div",{className:B,children:G}),e[29]=B,e[30]=G,e[31]=Y):Y=e[31];let H;e[32]!==D||e[33]!==Y?(H=m.jsx("div",{className:D,children:Y}),e[32]=D,e[33]=Y,e[34]=H):H=e[34];let K;return e[35]!==w||e[36]!==H?(K=m.jsxs("div",{className:"flex flex-col",children:[w,H]}),e[35]=w,e[36]=H,e[37]=K):K=e[37],K}function xI(){const t=F.c(3),[e,n]=P.useState(!1);let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=async a=>{await navigator.clipboard.writeText(a),n(!0),setTimeout(()=>n(!1),2e3)},t[0]=r):r=t[0];const i=r;let s;return t[1]!==e?(s={handleCopy:i,copied:e},t[1]=e,t[2]=s):s=t[2],s}function Wf(t){const e=F.c(13),{id:n,text:r,copyable:i}=t,s=i===void 0?!1:i,{handleCopy:a}=xI(),[o,u]=P.useState(!1);let l;e[0]!==a||e[1]!==r?(l=async()=>{await a(r),u(!0),setTimeout(()=>u(!1),2e3)},e[0]=a,e[1]=r,e[2]=l):l=e[2];const d=l;let c;e[3]!==n||e[4]!==r?(c=m.jsx(Ga,{id:n,text:r}),e[3]=n,e[4]=r,e[5]=c):c=e[5];let h;e[6]!==s||e[7]!==d||e[8]!==o?(h=s&&m.jsx("div",{className:"flex w-full items-center justify-end gap-2 text-xs text-muted-foreground opacity-0 pointer-events-none transition-all duration-200 group-hover/part:opacity-100 group-hover/part:pointer-events-auto",children:m.jsx("div",{className:"flex gap-1",children:m.jsx(ot,{onClick:d,variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-foreground px-2 py-1 h-auto whitespace-nowrap",children:o?m.jsx(m.Fragment,{children:m.jsx(fe,{name:"check",className:"mr-1 text-sm"})}):m.jsx(m.Fragment,{children:m.jsx(fe,{name:"content_copy",className:"mr-1 text-sm"})})})})}),e[6]=s,e[7]=d,e[8]=o,e[9]=h):h=e[9];let p;return e[10]!==c||e[11]!==h?(p=m.jsxs("div",{className:"group/part relative",children:[c,h]}),e[10]=c,e[11]=h,e[12]=p):p=e[12],p}function TI(t){const e=F.c(30),{toolName:n,input:r,output:i,isError:s}=t;if(n==="READ_MCP_TOOLS"){const u=r?.id;if(u){let l;return e[0]!==u?(l=m.jsx(tl,{connectionId:u}),e[0]=u,e[1]=l):l=e[1],l}}if(n==="CALL_MCP_TOOL"){const u=r?.connectionId;let l;e[2]!==u?(l=u&&m.jsx(tl,{connectionId:u,compact:!0}),e[2]=u,e[3]=l):l=e[3];let d;e[4]!==i?(d=JSON.stringify(i,null,2),e[4]=i,e[5]=d):d=e[5];let c;e[6]!==d?(c=m.jsx("div",{className:"absolute top-1 right-1 z-10",children:m.jsx(_I,{text:d})}),e[6]=d,e[7]=c):c=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=m.jsx("div",{className:"font-semibold text-muted-foreground mb-0.5 text-[10px] uppercase tracking-wider",children:"Input"}),e[8]=h):h=e[8];let p;e[9]!==r?(p=JSON.stringify(r,null,2),e[9]=r,e[10]=p):p=e[10];let g;e[11]!==p?(g=m.jsx("pre",{className:"whitespace-pre-wrap break-all text-muted-foreground mb-2",children:p}),e[11]=p,e[12]=g):g=e[12];let b;e[13]===Symbol.for("react.memo_cache_sentinel")?(b=m.jsx("div",{className:"font-semibold text-muted-foreground mb-0.5 text-[10px] uppercase tracking-wider",children:"Output"}),e[13]=b):b=e[13];const x=`whitespace-pre-wrap break-all ${s?"text-destructive":"text-foreground"}`;let E;e[14]!==i?(E=JSON.stringify(i,null,2),e[14]=i,e[15]=E):E=e[15];let k;e[16]!==x||e[17]!==E?(k=m.jsx("pre",{className:x,children:E}),e[16]=x,e[17]=E,e[18]=k):k=e[18];let y;e[19]!==k||e[20]!==c||e[21]!==g?(y=m.jsxs("div",{className:"relative bg-muted rounded-md p-2 text-xs font-mono overflow-auto max-h-[200px]",children:[c,h,g,b,k]}),e[19]=k,e[20]=c,e[21]=g,e[22]=y):y=e[22];let _;return e[23]!==l||e[24]!==y?(_=m.jsxs("div",{className:"flex flex-col gap-2",children:[l,y]}),e[23]=l,e[24]=y,e[25]=_):_=e[25],_}let a;e[26]!==i?(a=JSON.stringify(i,null,2),e[26]=i,e[27]=a):a=e[27];let o;return e[28]!==a?(o=m.jsx("div",{className:"bg-muted rounded-md p-2 text-xs font-mono overflow-auto max-h-[200px]",children:m.jsx("pre",{className:"whitespace-pre-wrap break-all",children:a})}),e[28]=a,e[29]=o):o=e[29],o}function tl(t){const e=F.c(15),{connectionId:n,compact:r}=t,i=xp(n),{org:s}=vt(),{slug:a}=s,o=vr();if(!i)return null;let u;e[0]!==i.id||e[1]!==o||e[2]!==a?(u=()=>{o({to:"/$org/mcps/$connectionId",params:{org:a,connectionId:i.id}})},e[0]=i.id,e[1]=o,e[2]=a,e[3]=u):u=e[3];const l=u;if(r){let c;e[4]!==i.title?(c=m.jsx("span",{className:"font-medium text-foreground",children:i.title}),e[4]=i.title,e[5]=c):c=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=m.jsx(fe,{name:"open_in_new",size:12}),e[6]=h):h=e[6];let p;e[7]!==l?(p=m.jsx("button",{type:"button",onClick:l,className:"hover:text-foreground transition-colors",title:"Open connection",children:h}),e[7]=l,e[8]=p):p=e[8];let g;return e[9]!==c||e[10]!==p?(g=m.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground bg-muted/50 px-2 py-1 rounded-md w-fit",children:[c,p]}),e[9]=c,e[10]=p,e[11]=g):g=e[11],g}let d;return e[12]!==i||e[13]!==l?(d=m.jsx(Rp,{connection:i,onClick:l}),e[12]=i,e[13]=l,e[14]=d):d=e[14],d}function _I({text:t}){const e=async()=>{try{if(navigator.clipboard)await navigator.clipboard.writeText(t),ei.success("Copied to clipboard");else throw new Error("Clipboard API unavailable")}catch(n){try{const r=document.createElement("textarea");r.value=t,r.style.position="fixed",r.style.left="-9999px",r.style.top="0",document.body.appendChild(r),r.focus(),r.select();const i=document.execCommand("copy");if(document.body.removeChild(r),i)ei.success("Copied to clipboard");else throw new Error("Fallback copy failed")}catch(r){console.error("Copy failed",n,r),ei.error("Failed to copy to clipboard")}}};return m.jsx(ot,{size:"icon",variant:"ghost",className:"h-5 w-5 hover:bg-background/50",onClick:e,children:m.jsx(fe,{name:"content_copy",size:12})})}function yI(t){const e=F.c(42),{part:n}=t;let r;e[0]!==n.type?(r=n.type.replace("tool-",""),e[0]=n.type,e[1]=r):r=e[1];const i=r,{state:s}=n,a=s==="output-error"?"error":"terminal",o=s==="output-error"&&"text-destructive";let u;e[2]!==o?(u=X("h-3.5 w-3.5",o),e[2]=o,e[3]=u):u=e[3];let l;e[4]!==a||e[5]!==u?(l=m.jsx(fe,{name:a,className:u}),e[4]=a,e[5]=u,e[6]=l):l=e[6];const d=s==="output-error"&&"text-destructive/90";let c;e[7]!==d?(c=X(d),e[7]=d,e[8]=c):c=e[8];const h=s==="input-streaming"&&`Streaming ${i} arguments...`,p=s==="input-available"&&`Calling ${i}...`,g=s==="output-available"&&`Called ${i}`,b=s==="output-error"&&`Error calling ${i}`;let x;e[9]!==g||e[10]!==b||e[11]!==c||e[12]!==h||e[13]!==p?(x=m.jsxs("span",{className:c,children:[h,p,g,b]}),e[9]=g,e[10]=b,e[11]=c,e[12]=h,e[13]=p,e[14]=x):x=e[14];let E;e[15]!==s?(E=(s==="input-streaming"||s==="input-available")&&m.jsx("span",{className:"animate-pulse",children:"..."}),e[15]=s,e[16]=E):E=e[16];let k;e[17]!==x||e[18]!==E||e[19]!==l?(k=m.jsxs("div",{className:"flex items-center gap-2 text-xs font-medium text-muted-foreground",children:[l,x,E]}),e[17]=x,e[18]=E,e[19]=l,e[20]=k):k=e[20];const y=s==="output-error"?"border-destructive/50":"border-border";let _;e[21]!==y?(_=X("transition-all duration-200 ease-in-out","border-l-2 pl-3",y),e[21]=y,e[22]=_):_=e[22];let R;e[23]!==n.input||e[24]!==s?(R=(s==="input-streaming"||s==="input-available")&&!!n.input&&m.jsx("div",{className:"text-xs font-mono text-muted-foreground bg-muted/30 p-2 rounded",children:JSON.stringify(n.input,null,2)}),e[23]=n.input,e[24]=s,e[25]=R):R=e[25];let S;e[26]!==n.input||e[27]!==n.output||e[28]!==s||e[29]!==i?(S=s==="output-available"&&m.jsx(TI,{toolName:i,input:n.input,output:n.output}),e[26]=n.input,e[27]=n.output,e[28]=s,e[29]=i,e[30]=S):S=e[30];let w;e[31]!==n||e[32]!==s?(w=s==="output-error"&&m.jsx("div",{className:"text-xs font-mono bg-destructive/10 text-destructive p-2 rounded border border-destructive/20",children:"errorText"in n&&typeof n.errorText=="string"?n.errorText:"An unknown error occurred"}),e[31]=n,e[32]=s,e[33]=w):w=e[33];let O;e[34]!==_||e[35]!==R||e[36]!==S||e[37]!==w?(O=m.jsxs("div",{className:_,children:[R,S,w]}),e[34]=_,e[35]=R,e[36]=S,e[37]=w,e[38]=O):O=e[38];let D;return e[39]!==k||e[40]!==O?(D=m.jsxs("div",{className:"flex flex-col gap-1.5 py-1",children:[k,O]}),e[39]=k,e[40]=O,e[41]=D):D=e[41],D}const kI={planning:{icon:"track_changes",label:"Planning next moves"},thinking:{icon:"psychology",label:"Thinking"}},AI=1200;function SI(){const t=F.c(9),[e,n]=P.useState("planning");let r,i;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{const l=setTimeout(()=>{n("thinking")},AI);return()=>{clearTimeout(l)}},i=[],t[0]=r,t[1]=i):(r=t[0],i=t[1]),P.useEffect(r,i);const s=kI[e];let a;t[2]!==s.icon?(a=m.jsx(fe,{name:s.icon,className:"text-muted-foreground animate-pulse",size:20}),t[2]=s.icon,t[3]=a):a=t[3];let o;t[4]!==s.label?(o=m.jsxs("span",{className:"text-sm font-medium text-muted-foreground text-shimmer",children:[s.label,"..."]}),t[4]=s.label,t[5]=o):o=t[5];let u;return t[6]!==a||t[7]!==o?(u=m.jsxs("div",{className:"flex items-center gap-2 py-2",children:[a,o]}),t[6]=a,t[7]=o,t[8]=u):u=t[8],u}function CI(t){const e=F.c(5),{duration:n}=t,r=n/1e3;let i;e[0]!==r?(i=r.toFixed(1),e[0]=r,e[1]=i):i=e[1];const s=i;let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=m.jsx(fe,{name:"lightbulb",className:"text-muted-foreground",size:16}),e[2]=a):a=e[2];let o;return e[3]!==s?(o=m.jsxs("div",{className:"flex items-center gap-2 py-2 opacity-60",children:[a,m.jsxs("span",{className:"text-xs text-muted-foreground",children:["Thought · ",s,"s"]})]}),e[3]=s,e[4]=o):o=e[4],o}function II(t){const e=F.c(24),{message:n,status:r,className:i}=t,{id:s,parts:a}=n,l=r==="streaming"||r==="submitted",d=P.useRef(null);let c;e[0]!==s?(c=()=>{const O=localStorage.getItem(`msg-duration-${s}`);return O?Number(O):null},e[0]=s,e[1]=c):c=e[1];const[h,p]=P.useState(c);let g,b;e[2]!==l?(g=()=>{l&&d.current===null&&(d.current=Date.now())},b=[l],e[2]=l,e[3]=g,e[4]=b):(g=e[3],b=e[4]),P.useEffect(g,b);let x,E;e[5]!==h||e[6]!==s||e[7]!==a.length?(x=()=>{if(a.length>0&&h===null&&d.current!==null){const O=Date.now()-d.current;p(O),localStorage.setItem(`msg-duration-${s}`,O.toString())}},E=[a.length,h,s],e[5]=h,e[6]=s,e[7]=a.length,e[8]=x,e[9]=E):(x=e[8],E=e[9]),P.useEffect(x,E);const k=a.length>0,y=k&&!l&&h!==null;let _;e[10]!==i?(_=X("w-full min-w-0 group relative flex items-start gap-4 px-8 z-20 text-foreground flex-row",i),e[10]=i,e[11]=_):_=e[11];let R;e[12]!==h||e[13]!==k||e[14]!==s||e[15]!==l||e[16]!==a||e[17]!==y?(R=k?m.jsxs(m.Fragment,{children:[y&&m.jsx(CI,{duration:h}),a.map((O,D)=>O.type==="text"?m.jsx(Wf,{id:s,text:O.text,copyable:!0},`${s}-${D}`):O.type==="reasoning"?m.jsx(EI,{part:O,id:s},`${s}-${D}`):O.type.startsWith("tool-")?m.jsx(yI,{part:O,id:s},`${s}-${D}`):null)]}):l?m.jsx(SI,{}):null,e[12]=h,e[13]=k,e[14]=s,e[15]=l,e[16]=a,e[17]=y,e[18]=R):R=e[18];let S;e[19]!==R?(S=m.jsx("div",{className:"flex flex-col gap-2 min-w-0 w-full items-start",children:m.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[0.9375rem] wrap-break-word overflow-wrap-anywhere bg-transparent",children:R})}),e[19]=R,e[20]=S):S=e[20];let w;return e[21]!==_||e[22]!==S?(w=m.jsx("div",{className:_,children:S}),e[21]=_,e[22]=S,e[23]=w):w=e[23],w}const Gf=P.createContext(null);function Kf(t){const e=F.c(2),{children:n}=t;let r;return e[0]!==n?(r=m.jsx(m.Fragment,{children:n}),e[0]=n,e[1]=r):r=e[1],r}function NI(t){const e=[];for(let n=0;n<t.length;n++){const r=t[n];if(!P.isValidElement(r))continue;if(r.props?.message?.role==="assistant"){const s=t[n-1],a=P.isValidElement(s)&&s.props?.message?.role,o=s&&P.isValidElement(s)&&a==="user"?s:null;e.push({user:o,assistant:r})}}return e}function wI(t){const e=F.c(27),{children:n,className:r,minHeightOffset:i}=t,s=P.useRef(null);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const o=P.useRef(a);let u,l,d,c,h,p,g;if(e[1]!==n||e[2]!==r||e[3]!==i){const k=P.Children.toArray(n),y=k[k.length-1];l=y&&P.isValidElement(y)&&y.type===Kf?y:null;const _=l?k.slice(0,-1):k,R=NI(_);let S;e[11]===Symbol.for("react.memo_cache_sentinel")?(S=O=>{const D=o.current[O];if(D&&s.current){const v=s.current.offsetTop,B=D.offsetTop;s.current.scrollTo({top:B-v,behavior:"smooth"})}},e[11]=S):S=e[11];const w=S;u=Gf.Provider,e[12]===Symbol.for("react.memo_cache_sentinel")?(g={scrollToPair:w},e[12]=g):g=e[12],h=s,e[13]!==r?(p=X("w-full min-w-0 max-w-full overflow-y-auto h-full overflow-x-hidden",r),e[13]=r,e[14]=p):p=e[14],d="flex flex-col min-w-0 max-w-2xl mx-auto w-full",c=R.map((O,D)=>{const v=D===R.length-1;return m.jsxs("div",{ref:B=>{o.current[D]=B},className:"flex flex-col gap-2 py-2",style:v&&i?{minHeight:`calc(100vh - ${i}px)`}:void 0,children:[m.jsx("div",{className:"sticky top-0 z-50 bg-background w-full h-2"}),m.jsx("div",{className:"sticky top-2 z-50",children:O.user&&P.isValidElement(O.user)?P.cloneElement(O.user,{pairIndex:D}):O.user}),O.assistant]},D)}),e[1]=n,e[2]=r,e[3]=i,e[4]=u,e[5]=l,e[6]=d,e[7]=c,e[8]=h,e[9]=p,e[10]=g}else u=e[4],l=e[5],d=e[6],c=e[7],h=e[8],p=e[9],g=e[10];let b;e[15]!==l||e[16]!==d||e[17]!==c?(b=m.jsxs("div",{className:d,children:[c,l]}),e[15]=l,e[16]=d,e[17]=c,e[18]=b):b=e[18];let x;e[19]!==h||e[20]!==p||e[21]!==b?(x=m.jsx("div",{ref:h,className:p,children:b}),e[19]=h,e[20]=p,e[21]=b,e[22]=x):x=e[22];let E;return e[23]!==u||e[24]!==g||e[25]!==x?(E=m.jsx(u,{value:g,children:x}),e[23]=u,e[24]=g,e[25]=x,e[26]=E):E=e[26],E}function vI(t){const e=F.c(29),{message:n,className:r,pairIndex:i}=t,{id:s,parts:a}=n,o=P.useRef(null),u=P.useContext(Gf),[l,d]=P.useState(!1);if(!a||a.length===0)return null;const h=a.reduce(RI,0)>60;let p;e[0]!==u||e[1]!==i?(p=()=>{i!==void 0&&u?.scrollToPair(i)},e[0]=u,e[1]=i,e[2]=p):p=e[2];const g=p;let b;e[3]!==r?(b=X("message-block w-full min-w-0 group relative flex items-start gap-4 px-4 text-foreground flex-row-reverse",r),e[3]=r,e[4]=b):b=e[4];const x=h&&!l&&"overflow-hidden relative max-h-[60px]";let E;e[5]!==x?(E=X(x),e[5]=x,e[6]=E):E=e[6];let k;if(e[7]!==s||e[8]!==a){let O;e[10]!==s?(O=(D,v)=>D.type==="text"?m.jsx(Wf,{id:s,text:D.text},`${s}-${v}`):null,e[10]=s,e[11]=O):O=e[11],k=a.map(O),e[7]=s,e[8]=a,e[9]=k}else k=e[9];let y;e[12]!==l||e[13]!==h?(y=h&&!l&&m.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-muted to-transparent pointer-events-none"}),e[12]=l,e[13]=h,e[14]=y):y=e[14];let _;e[15]!==E||e[16]!==k||e[17]!==y?(_=m.jsxs("div",{className:E,children:[k,y]}),e[15]=E,e[16]=k,e[17]=y,e[18]=_):_=e[18];let R;e[19]!==l||e[20]!==h?(R=h&&m.jsx("div",{className:"flex justify-center",children:m.jsx(ot,{onClick:O=>{O.stopPropagation(),d(!l)},variant:"ghost",size:"xs",className:"text-xs w-full text-muted-foreground hover:text-foreground",children:m.jsx(fe,{name:l?"expand_less":"expand_more",className:"text-sm"})})}),e[19]=l,e[20]=h,e[21]=R):R=e[21];let S;e[22]!==g||e[23]!==_||e[24]!==R?(S=m.jsxs("div",{onClick:g,className:"w-full border min-w-0 shadow-[0_3px_6px_-1px_rgba(0,0,0,0.1)] rounded-lg text-[0.9375rem] break-words overflow-wrap-anywhere bg-muted px-4 py-2 cursor-pointer transition-colors",children:[_,R]}),e[22]=g,e[23]=_,e[24]=R,e[25]=S):S=e[25];let w;return e[26]!==b||e[27]!==S?(w=m.jsxs("div",{ref:o,className:b,children:[" ",S]}),e[26]=b,e[27]=S,e[28]=w):w=e[28],w}function RI(t,e){return e.type==="text"?t+e.text.length:t}const nl="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png",OI=t=>new wc({api:`/api/${t}/models/stream`,credentials:"include",prepareSendMessagesRequest:({messages:e,requestMetadata:n})=>({body:{messages:e,stream:!0,...n}})});function LI(t){const e=F.c(12),{onSubmit:n,onStop:r,disabled:i,isStreaming:s,placeholder:a,leftActions:o}=t,[u,l]=P.useState("");let d;e[0]!==u||e[1]!==s||e[2]!==n?(d=async p=>{if(p?.preventDefault(),!u?.trim()||s)return;const g=u.trim();try{await n(g),l("")}catch(b){const x=b;console.error("Failed to send message:",x);const E=x instanceof Error?x.message:"Failed to send message";ei.error(E)}},e[0]=u,e[1]=s,e[2]=n,e[3]=d):d=e[3];const c=d;let h;return e[4]!==i||e[5]!==c||e[6]!==u||e[7]!==s||e[8]!==o||e[9]!==r||e[10]!==a?(h=m.jsx(wE,{value:u,onChange:l,onSubmit:c,onStop:r,disabled:i,isStreaming:s,placeholder:a,leftActions:o}),e[4]=i,e[5]=c,e[6]=u,e[7]=s,e[8]=o,e[9]=r,e[10]=a,e[11]=h):h=e[11],h}function DI(){const{data:t}=Rr.useSession(),e=t?.user,{org:n,locator:r}=vt(),[,i]=wi(),s=vr(),{createThread:a,activeThreadId:o}=Ea(),u=P.useRef(null),l=Zc(),d=$E(),c=HE(o),[h,p]=On(Or.chatSelectedModel(r),T=>T??null),[g,b]=On(`${r}:selected-agent`,()=>null),x=OI(n.slug),y=mE({id:o,messages:c,transport:x,onFinish:async T=>{const{finishReason:V,messages:te,isAbort:Q,isDisconnect:J,isError:ne}=T;if(V!=="stop"||Q||J||ne)return;const ae=te.slice(-2).filter(Boolean);if(ae.length===2){d.insertMany.mutate(ae);const ge=ae.find(Me=>Me.parts?.find(ye=>ye.type==="text"))?.parts?.find(Me=>Me.type==="text")?.text.slice(0,100)||"",Re=await zE(r,o);Re?l.update.mutate({id:o,updates:{title:Re.title||ge,updated_at:new Date().toISOString()}}):a({id:o,title:ge})}},onError:T=>{console.error("[deco-chat] Chat error:",T)}}),{status:_}=y,R=Tp(),[S]=ro({connections:R,binding:"LLMS"}),[w]=ro({connections:R,binding:"AGENTS"}),O=x1(S?.id),D=E1(w?.id),v=!O||!S?[]:O.map(T=>({...T,name:T.title,contextWindow:T.limits?.contextWindow,outputLimit:T.limits?.maxOutputTokens,inputCost:T.costs?.input,outputCost:T.costs?.output,provider:T.provider,connectionId:S.id,connectionName:S.title})).sort((T,V)=>T.name.localeCompare(V.name)),B=!D||!w?[]:D.map(T=>({...T,connectionId:w.id,connectionName:w.title}));P.useEffect(()=>{if(v.length>0&&!h){const T=v[0];T&&p({id:T.id,connectionId:T.connectionId})}},[O,S,h,p]),P.useEffect(()=>{if(B.length>0&&!g){const T=B[0];T&&b({agentId:T.id,connectionId:T.connectionId})}},[D,w,g,b]);const j=v.find(T=>T.id===h?.id&&T.connectionId===h?.connectionId),G=B.find(T=>T.id===g?.agentId&&T.connectionId===g?.connectionId),Y=y.messages.length===0,H=P.useRef(y.messages.length),K=P.useRef(0);y.messages.length>H.current&&K.current!==y.messages.length&&queueMicrotask(()=>{u.current&&(u.current.scrollIntoView({behavior:"smooth",block:"start"}),K.current=y.messages.length)}),H.current=y.messages.length;const se=B.map(T=>({id:`${T.connectionId}:${T.id}`,name:T.title,avatar:T.avatar,description:T.description})),pe=async T=>{if(!T?.trim()||_==="submitted"||_==="streaming")return;if(!j){console.error("No model configured");return}const V={created_at:new Date().toISOString(),thread_id:o,model:j,agent:G??void 0,user:{avatar:e?.image??void 0,name:e?.name??"you"}};await y.sendMessage({id:crypto.randomUUID(),role:"user",parts:[{type:"text",text:T}],metadata:V},{metadata:V})},ce=()=>{y.stop?.()},N=!!S,Ee=!!w;if(!(N&&Ee)){let T,V;return!N&&!Ee?(T="Connect your providers",V="Connect MCP Servers with llm and agents to unlock AI-powered features."):N?(T="No agents configured",V="Connect to an agents provider to use AI assistants."):(T="No model provider connected",V="Connect to a model provider to unlock AI-powered features."),m.jsxs(en,{className:"h-full",children:[m.jsxs(en.Header,{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("img",{src:nl,alt:"deco chat",className:"size-5 rounded"}),m.jsx("span",{className:"text-sm font-medium",children:"deco chat"})]}),m.jsx("div",{className:"flex items-center gap-1",children:m.jsx("button",{type:"button",onClick:()=>i(!1),className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:m.jsx(fe,{name:"close",size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})})]}),m.jsx(en.Content,{className:"flex flex-col items-center",children:m.jsx(Ep,{title:T,description:V,actions:m.jsx(ot,{variant:"outline",onClick:()=>s({to:"/$org/mcps",params:{org:n.slug},search:{action:"create"}}),children:"Add connection"})})})]})}return m.jsxs(en,{className:"h-full",children:[m.jsxs(en.Header,{children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("img",{src:G?.avatar||nl,alt:"deco chat",className:"size-5 rounded"}),m.jsx("span",{className:"text-sm font-medium",children:G?.title||"deco chat"})]}),m.jsxs("div",{className:"flex items-center gap-1",children:[!Y&&m.jsx("button",{type:"button",onClick:()=>{a()},className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent group cursor-pointer",title:"New chat",children:m.jsx(fe,{name:"add",size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})}),m.jsx("button",{type:"button",onClick:()=>i(!1),className:"flex size-6 items-center justify-center rounded-full p-1 hover:bg-transparent transition-colors group cursor-pointer",title:"Close chat",children:m.jsx(fe,{name:"close",size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors"})})]})]}),m.jsx(en.Content,{children:Y?m.jsx(NE,{title:G?.title||"Ask deco chat",description:G?.description||"Ask anything about configuring model providers or using MCP Mesh.",avatar:G?.avatar||"https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png"}):m.jsxs(wI,{minHeightOffset:240,children:[y.messages.map((T,V)=>T.role==="user"?m.jsx(vI,{message:T},T.id):T.role==="assistant"?m.jsx(II,{message:T,status:V===y.messages.length-1?_:void 0},T.id):null),m.jsx(Kf,{children:m.jsx("div",{ref:u,className:"h-0"})})]})}),m.jsx(en.Footer,{children:m.jsx(LI,{onSubmit:pe,onStop:ce,disabled:v.length===0||!h,isStreaming:_==="submitted"||_==="streaming",placeholder:v.length===0?"Add an LLM binding connection to start chatting":"Ask anything or @ for context",leftActions:m.jsxs("div",{className:"flex items-center gap-2",children:[B.length>0&&m.jsx(kE,{agents:se,selectedAgentId:g?`${g.connectionId}:${g.agentId}`:void 0,onAgentChange:T=>{if(!T)return;const[V,te]=T.split(":");V&&te&&b({agentId:te,connectionId:V})},placeholder:"Agent",variant:"bordered"}),v.length>0&&m.jsx(LE,{models:v,selectedModelId:h?.id,onModelChange:T=>{if(!T)return;const V=v.find(te=>te.id===T);V&&p({id:V.id,connectionId:V.connectionId})},placeholder:"Model",variant:"borderless"})]})})})]})}function Qf(t){const e=F.c(12);let n,r,i,s;e[0]!==t?({className:n,orientation:i,decorative:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s):(n=e[1],r=e[2],i=e[3],s=e[4]);const a=i===void 0?"horizontal":i,o=s===void 0?!0:s;let u;e[5]!==n?(u=X("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",n),e[5]=n,e[6]=u):u=e[6];let l;return e[7]!==o||e[8]!==a||e[9]!==r||e[10]!==u?(l=m.jsx(ep,{"data-slot":"separator-root",decorative:o,orientation:a,className:u,...r}),e[7]=o,e[8]=a,e[9]=r,e[10]=u,e[11]=l):l=e[11],l}function PI(t){const e=F.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(tp,{"data-slot":"sheet",...n}),e[2]=n,e[3]=r):r=e[3],r}function MI(t){const e=F.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(sp,{"data-slot":"sheet-portal",...n}),e[2]=n,e[3]=r):r=e[3],r}function BI(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx(op,{"data-slot":"sheet-overlay",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function FI(t){const e=F.c(17);let n,r,i,s;e[0]!==t?({className:r,children:n,side:s,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s):(n=e[1],r=e[2],i=e[3],s=e[4]);const a=s===void 0?"right":s;let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx(BI,{}),e[5]=o):o=e[5];const u=a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",l=a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",d=a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",c=a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let h;e[6]!==r||e[7]!==u||e[8]!==l||e[9]!==d||e[10]!==c?(h=X("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",u,l,d,c,r),e[6]=r,e[7]=u,e[8]=l,e[9]=d,e[10]=c,e[11]=h):h=e[11];let p;e[12]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsxs(ap,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[m.jsx(Op,{className:"size-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]}),e[12]=p):p=e[12];let g;return e[13]!==n||e[14]!==i||e[15]!==h?(g=m.jsxs(MI,{children:[o,m.jsxs(ip,{"data-slot":"sheet-content",className:h,...i,children:[n,p]})]}),e[13]=n,e[14]=i,e[15]=h,e[16]=g):g=e[16],g}function zI(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("flex flex-col gap-1.5 p-4",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx("div",{"data-slot":"sheet-header",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function jI(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("text-foreground font-semibold",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx(np,{"data-slot":"sheet-title",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function UI(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("text-muted-foreground text-sm",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx(rp,{"data-slot":"sheet-description",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function Ka(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("bg-accent animate-pulse rounded-md",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx("div",{"data-slot":"skeleton",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}const HI="sidebar_state",$I=3600*24*7,ZI="16rem",YI="18rem",qI="3rem",VI="b",Xf=P.createContext(null);function Qa(){const t=P.useContext(Xf);if(!t)throw new Error("useSidebar must be used within a SidebarProvider.");return t}function WI(t){const e=F.c(21),{defaultOpen:n,open:r,onOpenChange:i,children:s}=t,a=n===void 0?!0:n,o=Bn(),[u,l]=P.useState(!1),[d,c]=P.useState(a),h=r??d;let p;e[0]!==h||e[1]!==i?(p=O=>{const D=typeof O=="function"?O(h):O;i?i(D):c(D),document.cookie=`${HI}=${D}; path=/; max-age=${$I}`},e[0]=h,e[1]=i,e[2]=p):p=e[2];const g=p;let b;e[3]!==o||e[4]!==g?(b=()=>o?l(KI):g(GI),e[3]=o,e[4]=g,e[5]=b):b=e[5];const x=b;let E,k;e[6]!==x?(E=()=>{const O=D=>{if(D.key===VI&&(D.metaKey||D.ctrlKey)){const v=D.target;if(v.tagName==="INPUT"||v.tagName==="TEXTAREA"||v.isContentEditable)return;D.preventDefault(),x()}};return globalThis.addEventListener("keydown",O),()=>globalThis.removeEventListener("keydown",O)},k=[x],e[6]=x,e[7]=E,e[8]=k):(E=e[7],k=e[8]),P.useEffect(E,k);const y=h?"expanded":"collapsed";let _;e[9]!==o||e[10]!==h||e[11]!==u||e[12]!==g||e[13]!==y||e[14]!==x?(_={state:y,open:h,setOpen:g,isMobile:o,openMobile:u,setOpenMobile:l,toggleSidebar:x},e[9]=o,e[10]=h,e[11]=u,e[12]=g,e[13]=y,e[14]=x,e[15]=_):_=e[15];const R=_;let S;e[16]!==s?(S=m.jsx(kp,{delayDuration:0,children:s}),e[16]=s,e[17]=S):S=e[17];let w;return e[18]!==R||e[19]!==S?(w=m.jsx(Xf.Provider,{value:R,children:S}),e[18]=R,e[19]=S,e[20]=w):w=e[20],w}function GI(t){return!t}function KI(t){return!t}function QI(t){const e=F.c(14);let n,r,i,s;e[0]!==t?({className:r,style:s,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s):(n=e[1],r=e[2],i=e[3],s=e[4]);let a;e[5]!==s?(a={"--sidebar-width":ZI,"--sidebar-width-icon":qI,...s},e[5]=s,e[6]=a):a=e[6];const o=a;let u;e[7]!==r?(u=X("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",r),e[7]=r,e[8]=u):u=e[8];let l;return e[9]!==n||e[10]!==i||e[11]!==o||e[12]!==u?(l=m.jsx("div",{"data-slot":"sidebar-wrapper",style:o,className:u,...i,children:n}),e[9]=n,e[10]=i,e[11]=o,e[12]=u,e[13]=l):l=e[13],l}function XI(t){const e=F.c(46);let n,r,i,s,a,o;e[0]!==t?({side:s,variant:a,collapsible:o,className:r,children:n,...i}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s,e[5]=a,e[6]=o):(n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],o=e[6]);const u=s===void 0?"left":s,l=a===void 0?"sidebar":a,d=o===void 0?"offcanvas":o,{isMobile:c,state:h,openMobile:p,setOpenMobile:g}=Qa();if(d==="none"){let D;e[7]!==r?(D=X("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),e[7]=r,e[8]=D):D=e[8];let v;return e[9]!==n||e[10]!==i||e[11]!==D?(v=m.jsx("div",{"data-slot":"sidebar",className:D,...i,children:n}),e[9]=n,e[10]=i,e[11]=D,e[12]=v):v=e[12],v}if(c){let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D={"--sidebar-width":YI},e[13]=D):D=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=m.jsxs(zI,{className:"sr-only",children:[m.jsx(jI,{children:"Sidebar"}),m.jsx(UI,{children:"Displays the mobile sidebar."})]}),e[14]=v):v=e[14];let B;e[15]!==n?(B=m.jsx("div",{className:"flex h-full w-full flex-col",children:n}),e[15]=n,e[16]=B):B=e[16];let j;e[17]!==u||e[18]!==B?(j=m.jsxs(FI,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:D,side:u,children:[v,B]}),e[17]=u,e[18]=B,e[19]=j):j=e[19];let G;return e[20]!==p||e[21]!==i||e[22]!==g||e[23]!==j?(G=m.jsx(PI,{open:p,onOpenChange:g,...i,children:j}),e[20]=p,e[21]=i,e[22]=g,e[23]=j,e[24]=G):G=e[24],G}const b=h==="collapsed"?d:"",x=l==="floating"||l==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let E;e[25]!==x?(E=X("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",x),e[25]=x,e[26]=E):E=e[26];let k;e[27]!==E?(k=m.jsx("div",{"data-slot":"sidebar-gap",className:E}),e[27]=E,e[28]=k):k=e[28];const y=u==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",_=l==="floating"||l==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)";let R;e[29]!==r||e[30]!==y||e[31]!==_?(R=X("fixed top-12 bottom-0 z-10 hidden w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear md:flex",y,_,r),e[29]=r,e[30]=y,e[31]=_,e[32]=R):R=e[32];let S;e[33]!==n?(S=m.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:border-sidebar-border py-2 flex h-full w-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:shadow-sm",children:n}),e[33]=n,e[34]=S):S=e[34];let w;e[35]!==i||e[36]!==R||e[37]!==S?(w=m.jsx("div",{"data-slot":"sidebar-container",className:R,...i,children:S}),e[35]=i,e[36]=R,e[37]=S,e[38]=w):w=e[38];let O;return e[39]!==u||e[40]!==h||e[41]!==w||e[42]!==b||e[43]!==k||e[44]!==l?(O=m.jsxs("div",{className:"group peer text-foreground hidden md:block border-r","data-state":h,"data-collapsible":b,"data-variant":l,"data-side":u,"data-slot":"sidebar",children:[k,w]}),e[39]=u,e[40]=h,e[41]=w,e[42]=b,e[43]=k,e[44]=l,e[45]=O):O=e[45],O}function JI(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx("main",{"data-slot":"sidebar-inset",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function Jf(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("bg-border mx-4 w-full",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx(Qf,{"data-slot":"sidebar-separator","data-sidebar":"separator",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function eN(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function tN(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function nN(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("w-full text-sm",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function rN(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("flex w-full min-w-0 flex-col gap-1",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function Kt(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("group/menu-item relative",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}const iN=up("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg px-2 py-1.5 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding,colors] transition-colors duration-150 ease-out hover:transition-none focus-visible:ring-2 active:bg-sidebar-accent/75 disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent/75 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! [&>span:last-child]:truncate [&>svg]:size-[18px] [&>svg]:shrink-0 [&>svg]:text-muted-foreground/75",{variants:{variant:{default:"hover:bg-sidebar-accent text-sidebar-foreground/80 active:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Xa(t){const e=F.c(28);let n,r,i,s,a,o,u;e[0]!==t?({asChild:i,isActive:s,variant:a,size:o,tooltip:u,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s,e[5]=a,e[6]=o,e[7]=u):(n=e[1],r=e[2],i=e[3],s=e[4],a=e[5],o=e[6],u=e[7]);const l=i===void 0?!1:i,d=s===void 0?!1:s,c=a===void 0?"default":a,h=o===void 0?"default":o,p=l?lp:"button",{isMobile:g,state:b}=Qa();let x;e[8]!==n||e[9]!==h||e[10]!==c?(x=X(iN({variant:c,size:h}),n),e[8]=n,e[9]=h,e[10]=c,e[11]=x):x=e[11];let E;e[12]!==p||e[13]!==d||e[14]!==r||e[15]!==h||e[16]!==x?(E=m.jsx(p,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":h,"data-active":d,className:x,...r}),e[12]=p,e[13]=d,e[14]=r,e[15]=h,e[16]=x,e[17]=E):E=e[17];const k=E;if(!u)return k;if(typeof u=="string"){let w;e[18]!==u?(w={children:u},e[18]=u,e[19]=w):w=e[19],u=w}let y;e[20]!==k?(y=m.jsx(Cl,{asChild:!0,children:k}),e[20]=k,e[21]=y):y=e[21];const _=b!=="collapsed"||g;let R;e[22]!==_||e[23]!==u?(R=m.jsx(Sl,{side:"right",align:"center",hidden:_,...u}),e[22]=_,e[23]=u,e[24]=R):R=e[24];let S;return e[25]!==y||e[26]!==R?(S=m.jsxs(Il,{children:[y,R]}),e[25]=y,e[26]=R,e[27]=S):S=e[27],S}function sN(t){const e=F.c(25),{item:n}=t,r=vr(),{org:i}=vt(),s=Ll(i.id),a=Lp(i.id);let o;e[0]!==a.update||e[1]!==n.url||e[2]!==s?.sidebar_items?(o=async()=>{const y=(s?.sidebar_items||[]).filter(_=>_.url!==n.url);await a.update.mutateAsync({sidebar_items:y})},e[0]=a.update,e[1]=n.url,e[2]=s?.sidebar_items,e[3]=o):o=e[3];const u=o;let l;e[4]===Symbol.for("react.memo_cache_sentinel")?(l=/^https?:\/\/.+/,e[4]=l):l=e[4];let d;e[5]!==n.icon?(d=l.test(n.icon),e[5]=n.icon,e[6]=d):d=e[6];const c=d;let h;e[7]!==n.url||e[8]!==r?(h=()=>{r({to:n.url})},e[7]=n.url,e[8]=r,e[9]=h):h=e[9];let p;e[10]!==c||e[11]!==n.icon||e[12]!==n.title?(p=m.jsx("div",{className:"flex items-center justify-center shrink-0 mr-2",children:c?m.jsx("img",{src:n.icon,alt:n.title,className:"h-4 w-4 rounded object-cover"}):m.jsx(fe,{name:n.icon,size:16,className:"text-muted-foreground"})}),e[10]=c,e[11]=n.icon,e[12]=n.title,e[13]=p):p=e[13];let g;e[14]!==n.title?(g=n.title.toLocaleLowerCase(),e[14]=n.title,e[15]=g):g=e[15];let b;e[16]!==g?(b=m.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:m.jsx("span",{className:"truncate text-sm w-full capitalize",children:g})}),e[16]=g,e[17]=b):b=e[17];let x;e[18]!==u?(x=m.jsx(fe,{name:"close",size:16,className:"text-muted-foreground opacity-0 group-hover/item:opacity-50 hover:opacity-100 cursor-pointer",onClick:k=>{k.preventDefault(),k.stopPropagation(),u()}}),e[18]=u,e[19]=x):x=e[19];let E;return e[20]!==h||e[21]!==p||e[22]!==b||e[23]!==x?(E=m.jsx(Kt,{children:m.jsxs(Xa,{className:"w-full pr-2 group/item relative cursor-pointer",onClick:h,children:[p,b,x]})}),e[20]=h,e[21]=p,e[22]=b,e[23]=x,e[24]=E):E=e[24],E}function aN(){const t=F.c(4),{org:e}=vt(),r=Ll(e.id)?.sidebar_items;if(!r?.length)return null;let i;t[0]!==r?(i=r.map(oN),t[0]=r,t[1]=i):i=t[1];let s;return t[2]!==i?(s=m.jsx(eh,{children:i}),t[2]=i,t[3]=s):s=t[3],s}function oN(t){return m.jsx(sN,{item:t},t.url)}function rl(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx(Kt,{children:m.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:m.jsx(Ka,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function eh(t){const e=F.c(4),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx(Jf,{className:"my-2 -ml-1"}),e[0]=r):r=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx(Kt,{children:m.jsx("div",{className:"px-2 py-0 text-xs font-medium text-muted-foreground flex items-center justify-between",children:m.jsx("span",{children:"Pinned Views"})})}),e[1]=i):i=e[1];let s;return e[2]!==n?(s=m.jsxs(m.Fragment,{children:[r,i,n]}),e[2]=n,e[3]=s):s=e[3],s}function uN(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx(P.Suspense,{fallback:m.jsxs(eh,{children:[m.jsx(rl,{}),m.jsx(rl,{})]}),children:m.jsx(aN,{})}),t[0]=e):e=t[0],e}function lN(t){const e=F.c(18),{thread:n,isActive:r}=t,{setActiveThreadId:i,hideThread:s}=Ea(),[,a]=wi();let o;e[0]!==n.created_at||e[1]!==n.title?(o=n.title||`Chat ${new Date(n.created_at).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}`,e[0]=n.created_at,e[1]=n.title,e[2]=o):o=e[2];const u=o,l=`w-full pr-2 group/thread relative cursor-pointer ${r?"bg-accent":""}`;let d;e[3]!==i||e[4]!==a||e[5]!==n.id?(d=()=>{i(n.id),a(!0)},e[3]=i,e[4]=a,e[5]=n.id,e[6]=d):d=e[6];let c;e[7]!==u?(c=m.jsx("div",{className:"flex-1 min-w-0 flex flex-col items-start",children:m.jsx("span",{className:"truncate text-sm w-full",children:u})}),e[7]=u,e[8]=c):c=e[8];let h;e[9]!==s||e[10]!==r||e[11]!==n.id?(h=!r&&m.jsx(fe,{name:"close",size:16,className:"text-muted-foreground opacity-0 group-hover/thread:opacity-50 hover:opacity-100 cursor-pointer",onClick:g=>{g.preventDefault(),g.stopPropagation(),s(n.id)}}),e[9]=s,e[10]=r,e[11]=n.id,e[12]=h):h=e[12];let p;return e[13]!==l||e[14]!==d||e[15]!==c||e[16]!==h?(p=m.jsx(Kt,{children:m.jsxs(Xa,{className:l,onClick:d,children:[c,h]})}),e[13]=l,e[14]=d,e[15]=c,e[16]=h,e[17]=p):p=e[17],p}const cN=5;function dN(){const t=F.c(9),{activeThreadId:e}=Ea(),n=UE();let r,i;if(t[0]!==e||t[1]!==n){i=Symbol.for("react.early_return_sentinel");e:{const a=n.filter(hN).sort(fN).slice(0,cN);if(a.length===0){let u;t[4]===Symbol.for("react.memo_cache_sentinel")?(u=m.jsx(Kt,{children:m.jsx("div",{className:"px-4 py-2 text-xs text-muted-foreground text-center",children:"No recent chats"})}),t[4]=u):u=t[4],i=u;break e}let o;t[5]!==e?(o=u=>m.jsx(lN,{thread:u,isActive:u.id===e},u.id),t[5]=e,t[6]=o):o=t[6],r=a.map(o)}t[0]=e,t[1]=n,t[2]=r,t[3]=i}else r=t[2],i=t[3];if(i!==Symbol.for("react.early_return_sentinel"))return i;let s;return t[7]!==r?(s=m.jsx(m.Fragment,{children:r}),t[7]=r,t[8]=s):s=t[8],s}function fN(t,e){const n=new Date(t.updated_at).getTime();return new Date(e.updated_at).getTime()-n}function hN(t){return!t.hidden}function ys(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx(Kt,{children:m.jsx("div",{className:"flex items-center gap-2 px-4 py-2",children:m.jsx(Ka,{className:"h-4 flex-1"})})}),t[0]=e):e=t[0],e}function pN(){const t=F.c(3);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx(Jf,{className:"my-2 -ml-1"}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsx(Kt,{children:m.jsx("div",{className:"px-2 py-0 text-xs font-medium text-muted-foreground flex items-center justify-between",children:m.jsx("span",{children:"Recent Threads"})})}),t[1]=n):n=t[1];let r;return t[2]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsxs(m.Fragment,{children:[e,n,m.jsx(P.Suspense,{fallback:m.jsxs(m.Fragment,{children:[m.jsx(ys,{}),m.jsx(ys,{}),m.jsx(ys,{})]}),children:m.jsx(dN,{})})]}),t[2]=r):r=t[2],r}function mN(){const t=F.c(36),{locator:e}=vt(),n=vr();let r;t[0]!==e?(r=io.parse(e),t[0]=e,t[1]=r):r=t[1];const{org:i}=r;let s;t[2]!==e?(s=io.isOrgAdminProject(e),t[2]=e,t[3]=s):s=t[3];const a=s;let o;t[4]!==n||t[5]!==i?(o={key:"home",label:"Home",icon:"home",onClick:()=>n({to:"/$org",params:{org:i}})},t[4]=n,t[5]=i,t[6]=o):o=t[6];let u;t[7]!==n||t[8]!==i?(u={key:"store",label:"Store",icon:"shopping_bag",onClick:()=>n({to:"/$org/store",params:{org:i}})},t[7]=n,t[8]=i,t[9]=u):u=t[9];let l;t[10]!==n||t[11]!==i?(l={key:"mcps",label:"MCP Servers",icon:"extension",onClick:()=>n({to:"/$org/mcps",params:{org:i}})},t[10]=n,t[11]=i,t[12]=l):l=t[12];let d;t[13]!==n||t[14]!==i?(d={key:"gateways",label:"MCP Gateways",icon:"network_node",onClick:()=>n({to:"/$org/gateways",params:{org:i}})},t[13]=n,t[14]=i,t[15]=d):d=t[15];let c;t[16]!==n||t[17]!==i?(c={key:"monitoring",label:"Monitoring",icon:"monitoring",onClick:()=>n({to:"/$org/monitoring",params:{org:i}})},t[16]=n,t[17]=i,t[18]=c):c=t[18];let h;t[19]!==n||t[20]!==i?(h={key:"members",label:"Members",icon:"group",onClick:()=>n({to:"/$org/members",params:{org:i}})},t[19]=n,t[20]=i,t[21]=h):h=t[21];let p;t[22]!==n||t[23]!==i?(p={key:"settings",label:"Settings",icon:"settings",onClick:()=>n({to:"/$org/settings",params:{org:i}})},t[22]=n,t[23]=i,t[24]=p):p=t[24];let g;t[25]!==o||t[26]!==u||t[27]!==l||t[28]!==d||t[29]!==c||t[30]!==h||t[31]!==p?(g=[o,u,l,d,c,h,p],t[25]=o,t[26]=u,t[27]=l,t[28]=d,t[29]=c,t[30]=h,t[31]=p,t[32]=g):g=t[32];const b=g;let x;return t[33]!==b||t[34]!==a?(x=a?b:[],t[33]=b,t[34]=a,t[35]=x):x=t[35],x}function th(t){const e=F.c(9),{navigationItems:n,footer:r,additionalContent:i,variant:s}=t,a=s===void 0?"sidebar":s;let o;e[0]!==n?(o=n.map(gN),e[0]=n,e[1]=o):o=e[1];let u;e[2]!==i||e[3]!==o?(u=m.jsx(eN,{className:"flex-1 overflow-x-hidden",children:m.jsx(tN,{className:"font-medium",children:m.jsx(nN,{children:m.jsxs(rN,{className:"gap-0.5",children:[o,i]})})})}),e[2]=i,e[3]=o,e[4]=u):u=e[4];let l;return e[5]!==r||e[6]!==u||e[7]!==a?(l=m.jsxs(XI,{variant:a,children:[u,r]}),e[5]=r,e[6]=u,e[7]=a,e[8]=l):l=e[8],l}function gN(t){return m.jsx(Kt,{children:m.jsxs(Xa,{className:"cursor-pointer",onClick:t.onClick,isActive:t.isActive,children:[m.jsx(fe,{name:t.icon,size:20,className:"text-muted-foreground/75"}),m.jsx("span",{className:"truncate",children:t.label})]})},t.key)}th.Skeleton=function(){return m.jsx("div",{className:"flex flex-col gap-0.5",children:Array.from({length:8}).map((e,n)=>m.jsx("div",{className:"w-full h-8",children:m.jsx(Ka,{className:"h-full bg-sidebar-accent rounded-md"})},n))})};function bN(){const t=F.c(4),e=mN();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsx(Rs,{children:m.jsx(P.Suspense,{fallback:null,children:m.jsx(uN,{})})}),t[0]=n):n=t[0];let r;t[1]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsxs(m.Fragment,{children:[n,m.jsx(Rs,{children:m.jsx(P.Suspense,{fallback:null,children:m.jsx(pN,{})})})]}),t[1]=r):r=t[1];let i;return t[2]!==e?(i=m.jsx(th,{navigationItems:e,additionalContent:r}),t[2]=e,t[3]=i):i=t[3],i}const nh=P.createContext(null);function EN(){const t=P.useContext(nh);if(!t)throw new Error("TopbarSwitcher compound components must be used within TopbarSwitcher.Root");return t}function xN(t){const e=F.c(10),{children:n,onItemHover:r}=t,[i,s]=P.useState(null);let a;e[0]!==r?(a=c=>{s(c),r?.(c)},e[0]=r,e[1]=a):a=e[1];const o=a;let u;e[2]!==i||e[3]!==o?(u={hoveredItem:i,setHoveredItem:o},e[2]=i,e[3]=o,e[4]=u):u=e[4];let l;e[5]!==n?(l=m.jsx(Mp,{children:n}),e[5]=n,e[6]=l):l=e[6];let d;return e[7]!==u||e[8]!==l?(d=m.jsx(nh.Provider,{value:u,children:l}),e[7]=u,e[8]=l,e[9]=d):d=e[9],d}function TN(t){const e=F.c(6),{children:n,onClick:r}=t;let i;e[0]!==n||e[1]!==r?(i=m.jsx(ot,{variant:"link",className:"p-0.5 h-auto",onClick:r,type:"button",children:n}),e[0]=n,e[1]=r,e[2]=i):i=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(Bp,{asChild:!0,children:m.jsx(ot,{size:"icon",variant:"ghost",className:"w-6 h-6 p-0",children:m.jsx(fe,{name:"expand_all",size:16,className:"opacity-50"})})}),e[3]=s):s=e[3];let a;return e[4]!==i?(a=m.jsxs("div",{className:"flex items-center gap-1",children:[i,s]}),e[4]=i,e[5]=a):a=e[5],a}function _N(t){const e=F.c(8),{item:n,fallback:r}=t,i=r===void 0?"":r,s=n?.avatarUrl??"",a=n?.name??i;let o;e[0]!==s||e[1]!==a?(o=m.jsx(Fn,{url:s,fallback:a,size:"xs",objectFit:"contain"}),e[0]=s,e[1]=a,e[2]=o):o=e[2];const u=n?.name??i;let l;e[3]!==u?(l=m.jsx("span",{children:u}),e[3]=u,e[4]=l):l=e[4];let d;return e[5]!==o||e[6]!==l?(d=m.jsxs("div",{className:"flex items-center gap-2",children:[o,l]}),e[5]=o,e[6]=l,e[7]=d):d=e[7],d}function yN(t){const e=F.c(6),{children:n,align:r}=t,i=r===void 0?"start":r,a=P.Children.toArray(n).filter(kN).length===1?"280px":"480px";let o;e[0]!==a?(o={width:a},e[0]=a,e[1]=o):o=e[1];let u;return e[2]!==i||e[3]!==n||e[4]!==o?(u=m.jsx(Fp,{align:i,className:"p-0 flex items-start",style:o,children:n}),e[2]=i,e[3]=n,e[4]=o,e[5]=u):u=e[5],u}function kN(t){return P.isValidElement(t)&&(t.type===ih||t.type===rh)}function rh(t){const e=F.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=X("flex flex-col border-border w-[240px] border-r last:border-r-0 last:w-full",r),e[0]=r,e[1]=i):i=e[1];let s;return e[2]!==n||e[3]!==i?(s=m.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=s):s=e[4],s}const ih=rh;function AN(t){const e=F.c(6),{placeholder:n,value:r,onChange:i}=t,s=n===void 0?"Search...":n;let a;e[0]!==i?(a=u=>i(u.target.value),e[0]=i,e[1]=a):a=e[1];let o;return e[2]!==s||e[3]!==a||e[4]!==r?(o=m.jsx(Pp,{placeholder:s,value:r,onChange:a,className:"rounded-none border-t-0 border-x-0 focus-visible:border-border focus-visible:ring-0"}),e[2]=s,e[3]=a,e[4]=r,e[5]=o):o=e[5],o}function SN(t){const e=F.c(6),{children:n,emptyMessage:r}=t,i=r===void 0?"No items found.":r,s=P.Children.count(n)>0;let a;e[0]!==i||e[1]!==s?(a=!s&&m.jsx("div",{className:"text-muted-foreground text-sm px-1 py-8 text-center",children:i}),e[0]=i,e[1]=s,e[2]=a):a=e[2];let o;return e[3]!==n||e[4]!==a?(o=m.jsxs("div",{className:"flex flex-col gap-0.5 p-1 max-h-44 overflow-y-auto",children:[a,n]}),e[3]=n,e[4]=a,e[5]=o):o=e[5],o}function CN(t){const e=F.c(15),{item:n,onClick:r,onHover:i,children:s}=t,a=EN();let o;e[0]!==a||e[1]!==n||e[2]!==i?(o=()=>{a.setHoveredItem(n.slug),i?.(n)},e[0]=a,e[1]=n,e[2]=i,e[3]=o):o=e[3];const u=o;let l;e[4]!==n||e[5]!==r?(l=()=>r(n),e[4]=n,e[5]=r,e[6]=l):l=e[6];let d;e[7]!==s||e[8]!==n.avatarUrl||e[9]!==n.name?(d=s||m.jsxs(m.Fragment,{children:[m.jsx(Fn,{url:n.avatarUrl??"",fallback:n.name,size:"xs",className:"w-[22px]! h-[22px]!",objectFit:"contain"}),m.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap",children:n.name})]}),e[7]=s,e[8]=n.avatarUrl,e[9]=n.name,e[10]=d):d=e[10];let c;return e[11]!==u||e[12]!==l||e[13]!==d?(c=m.jsx(ot,{onClick:l,onMouseEnter:u,variant:"ghost",size:"sm",className:"w-full justify-start font-normal",children:d}),e[11]=u,e[12]=l,e[13]=d,e[14]=c):c=e[14],c}function IN(t){const e=F.c(2),{children:n}=t;let r;return e[0]!==n?(r=m.jsx("div",{className:"px-1 pb-1 pt-0.5",children:n}),e[0]=n,e[1]=r):r=e[1],r}function NN(t){const e=F.c(11),{onClick:n,icon:r,children:i,variant:s}=t,o=(s===void 0?"default":s)==="muted"&&"text-muted-foreground";let u;e[0]!==o?(u=X("w-full justify-start font-normal",o),e[0]=o,e[1]=u):u=e[1];let l;e[2]!==r?(l=r&&m.jsx(fe,{name:r,size:16}),e[2]=r,e[3]=l):l=e[3];let d;e[4]!==i?(d=m.jsx("span",{children:i}),e[4]=i,e[5]=d):d=e[5];let c;return e[6]!==n||e[7]!==u||e[8]!==l||e[9]!==d?(c=m.jsxs(ot,{variant:"ghost",size:"sm",className:u,onClick:n,children:[l,d]}),e[6]=n,e[7]=u,e[8]=l,e[9]=d,e[10]=c):c=e[10],c}function wN(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx(Qf,{}),t[0]=e):e=t[0],e}function vN(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx("div",{className:"h-4 w-16 bg-accent rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const it=Object.assign(xN,{Trigger:TN,CurrentItem:_N,Content:yN,Panel:ih,Search:AN,Items:SN,Item:CN,Actions:IN,Action:NN,Separator:wN,Skeleton:vN});function sa(){const t=F.c(56);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:n}=xl(e),{data:r}=Rr.useListOrganizations(),i=vr();let s;t[1]!==n||t[2]!==r?(s=r?.find(j=>j.slug===n),t[1]=n,t[2]=r,t[3]=s):s=t[3];const a=s,[o,u]=P.useState(""),[l,d]=P.useState(!1);let c,h,p,g,b,x,E,k;if(t[4]!==a||t[5]!==i||t[6]!==n||t[7]!==o||t[8]!==r){const G=(r?(()=>{const ce=r.filter(N=>N.name.toLowerCase().includes(o.toLowerCase()));if(n){const N=ce.findIndex(Ee=>Ee.slug===n);if(N>0){const Ee=ce[N];Ee&&(ce.splice(N,1),ce.unshift(Ee))}}return ce})():[]).map(RN);let Y;t[17]!==a?(Y=a?{slug:a.slug,name:a.name,avatarUrl:a.logo}:void 0,t[17]=a,t[18]=Y):Y=t[18];const H=Y;g=it;let K;t[19]!==i||t[20]!==n?(K=()=>i({to:"/$org",params:{org:n??""}}),t[19]=i,t[20]=n,t[21]=K):K=t[21];let se;t[22]!==H?(se=m.jsx(it.CurrentItem,{item:H}),t[22]=H,t[23]=se):se=t[23],t[24]!==K||t[25]!==se?(k=m.jsx(it.Trigger,{onClick:K,children:se}),t[24]=K,t[25]=se,t[26]=k):k=t[26],p=it.Content,h=it.Panel,t[27]!==o?(E=m.jsx(it.Search,{placeholder:"Search organizations...",value:o,onChange:u}),t[27]=o,t[28]=E):E=t[28],c=it.Items,b="No organizations found.";let pe;t[29]!==i?(pe=ce=>m.jsx(it.Item,{item:ce,onClick:N=>i({to:"/$org",params:{org:N.slug}})},ce.slug),t[29]=i,t[30]=pe):pe=t[30],x=G.map(pe),t[4]=a,t[5]=i,t[6]=n,t[7]=o,t[8]=r,t[9]=c,t[10]=h,t[11]=p,t[12]=g,t[13]=b,t[14]=x,t[15]=E,t[16]=k}else c=t[9],h=t[10],p=t[11],g=t[12],b=t[13],x=t[14],E=t[15],k=t[16];let y;t[31]!==c||t[32]!==b||t[33]!==x?(y=m.jsx(c,{emptyMessage:b,children:x}),t[31]=c,t[32]=b,t[33]=x,t[34]=y):y=t[34];let _,R;t[35]===Symbol.for("react.memo_cache_sentinel")?(_=m.jsx(it.Actions,{children:m.jsx(it.Action,{onClick:()=>d(!0),variant:"muted",children:"+ Create organization"})}),R=m.jsx(it.Separator,{}),t[35]=_,t[36]=R):(_=t[35],R=t[36]);let S;t[37]!==i?(S=m.jsx(it.Actions,{children:m.jsx(it.Action,{onClick:()=>i({to:"/"}),icon:"grid_view",children:"See all organizations"})}),t[37]=i,t[38]=S):S=t[38];let w;t[39]!==h||t[40]!==E||t[41]!==y||t[42]!==S?(w=m.jsxs(h,{children:[E,y,_,R,S]}),t[39]=h,t[40]=E,t[41]=y,t[42]=S,t[43]=w):w=t[43];let O;t[44]!==p||t[45]!==w?(O=m.jsx(p,{children:w}),t[44]=p,t[45]=w,t[46]=O):O=t[46];let D;t[47]!==g||t[48]!==O||t[49]!==k?(D=m.jsxs(g,{children:[k,O]}),t[47]=g,t[48]=O,t[49]=k,t[50]=D):D=t[50];let v;t[51]!==l?(v=m.jsx(Dp,{open:l,onOpenChange:d}),t[51]=l,t[52]=v):v=t[52];let B;return t[53]!==D||t[54]!==v?(B=m.jsxs(m.Fragment,{children:[D,v]}),t[53]=D,t[54]=v,t[55]=B):B=t[55],B}function RN(t){return{slug:t.slug,name:t.name,avatarUrl:t.logo}}sa.Skeleton=it.Skeleton;const sh=P.createContext({setOpen:()=>{}}),ON=()=>P.useContext(sh),LN=t=>{const e=F.c(25);let n,r,i,s,a;e[0]!==t?({children:n,defaultOpen:r,open:s,onOpenChange:i,...a}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i,e[4]=s,e[5]=a):(n=e[1],r=e[2],i=e[3],s=e[4],a=e[5]);const o=r??!1;let u;e[6]!==i||e[7]!==s||e[8]!==o?(u={prop:s,defaultProp:o,onChange:i},e[6]=i,e[7]=s,e[8]=o,e[9]=u):u=e[9];const[l,d]=js(u);let c;e[10]!==d?(c={setOpen:d},e[10]=d,e[11]=c):c=e[11];let h;e[12]!==n||e[13]!==l||e[14]!==a||e[15]!==d?(h=m.jsx(Rc,{open:l,onOpenChange:d,...a,children:n}),e[12]=n,e[13]=l,e[14]=a,e[15]=d,e[16]=h):h=e[16];let p;e[17]!==l||e[18]!==a||e[19]!==d||e[20]!==h?(p=m.jsx(Up,{open:l,onOpenChange:d,...a,children:h}),e[17]=l,e[18]=a,e[19]=d,e[20]=h,e[21]=p):p=e[21];let g;return e[22]!==c||e[23]!==p?(g=m.jsx(sh.Provider,{value:c,children:p}),e[22]=c,e[23]=p,e[24]=g):g=e[24],g},DN=t=>{const{children:e,title:n,...r}=t,i=Bn(),{className:s,...a}=r;return i?m.jsxs(Lc,{...a,children:[m.jsx(Dc,{className:"hidden",children:m.jsx(Pc,{children:n})}),m.jsx("div",{className:X("flex flex-col gap-2 p-2 py-4",s),children:e})]}):m.jsx(jp,{...r,children:e})},PN=t=>{const{children:e,...n}=t,{setOpen:r}=ON(),i=Bn(),{className:s,...a}=n;return i?m.jsx("div",{...a,onClick:o=>{r(!1);const{onClick:u}=a;u?.(o)},className:X("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",s),children:e}):m.jsx(Hp,{...n,children:e})},MN=t=>{const e=F.c(7);let n,r;e[0]!==t?({children:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const i=Bn();let s;return e[3]!==n||e[4]!==i||e[5]!==r?(s=i?m.jsx(Oc,{asChild:!0,children:n}):m.jsx(zp,{...r,children:n}),e[3]=n,e[4]=i,e[5]=r,e[6]=s):s=e[6],s},BN=t=>{const e=F.c(7);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);const i=Bn();let s;return e[3]!==n||e[4]!==i||e[5]!==r?(s=i?m.jsx(so,{className:X(n),...r}):m.jsx(so,{className:X(n),...r}),e[3]=n,e[4]=i,e[5]=r,e[6]=s):s=e[6],s};function FN(t){const e=F.c(11),{user:n,trigger:r,align:i,children:s}=t,a=i===void 0?"start":i;let o;e[0]!==r||e[1]!==n?(o=r(n),e[0]=r,e[1]=n,e[2]=o):o=e[2];let u;e[3]!==o?(u=m.jsx(MN,{asChild:!0,children:m.jsx("div",{children:o})}),e[3]=o,e[4]=u):u=e[4];let l;e[5]!==a||e[6]!==s?(l=m.jsx(DN,{side:"top",align:a,className:"md:w-[240px]",children:s}),e[5]=a,e[6]=s,e[7]=l):l=e[7];let d;return e[8]!==u||e[9]!==l?(d=m.jsxs(LN,{children:[u,l]}),e[8]=u,e[9]=l,e[10]=d):d=e[10],d}function zN(t){const e=F.c(8),{children:n,onClick:r,className:i,asChild:s}=t;let a;e[0]!==s||e[1]!==n||e[2]!==r?(a=s?n:m.jsx("button",{type:"button",className:"flex items-center gap-2 text-sm w-full cursor-pointer",onClick:r,children:n}),e[0]=s,e[1]=n,e[2]=r,e[3]=a):a=e[3];let o;return e[4]!==s||e[5]!==i||e[6]!==a?(o=m.jsx(PN,{asChild:s,className:i,children:a}),e[4]=s,e[5]=i,e[6]=a,e[7]=o):o=e[7],o}function jN(t){const e=F.c(2),{className:n}=t;let r;return e[0]!==n?(r=m.jsx(BN,{className:n}),e[0]=n,e[1]=r):r=e[1],r}function UN(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"}),t[0]=e):e=t[0],e}const Ut=Object.assign(FN,{Item:zN,Separator:jN,Skeleton:UN});function HN(t){const e=F.c(33),{open:n,onOpenChange:r,user:i,userImage:s}=t,[a,o]=P.useState(!1);let u;e[0]!==i.id?(u=()=>{navigator.clipboard.writeText(i.id),o(!0),setTimeout(()=>o(!1),2e3)},e[0]=i.id,e[1]=u):u=e[1];const l=u;let d;e[2]===Symbol.for("react.memo_cache_sentinel")?(d=m.jsxs(Nl,{children:[m.jsx(wl,{children:"Profile"}),m.jsx(vl,{children:"Your account information"})]}),e[2]=d):d=e[2];const c=i.name||i.email||"U";let h;e[3]!==c||e[4]!==s?(h=m.jsx(Fn,{url:s,fallback:c,shape:"circle",size:"2xl"}),e[3]=c,e[4]=s,e[5]=h):h=e[5];const p=i.name||i.email;let g;e[6]!==p?(g=m.jsx("div",{className:"text-lg font-semibold text-center",children:p}),e[6]=p,e[7]=g):g=e[7];let b;e[8]!==i.email?(b=m.jsx("div",{className:"text-sm text-muted-foreground text-center",children:i.email}),e[8]=i.email,e[9]=b):b=e[9];let x;e[10]!==g||e[11]!==b?(x=m.jsxs("div",{className:"flex flex-col items-center gap-2 w-full",children:[g,b]}),e[10]=g,e[11]=b,e[12]=x):x=e[12];let E;e[13]===Symbol.for("react.memo_cache_sentinel")?(E=m.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"User ID"}),e[13]=E):E=e[13];let k;e[14]!==i.id?(k=m.jsxs("div",{className:"flex flex-col gap-1 min-w-0 flex-1",children:[E,m.jsx("span",{className:"text-sm font-mono truncate",children:i.id})]}),e[14]=i.id,e[15]=k):k=e[15];const y=a?"check":"content_copy",_=a?"text-green-600":"text-muted-foreground";let R;e[16]!==y||e[17]!==_?(R=m.jsx(fe,{name:y,size:16,className:_}),e[16]=y,e[17]=_,e[18]=R):R=e[18];let S;e[19]!==l||e[20]!==R?(S=m.jsx("button",{type:"button",onClick:l,className:"flex-shrink-0 p-2 hover:bg-background rounded-md transition-colors","aria-label":"Copy user ID",children:R}),e[19]=l,e[20]=R,e[21]=S):S=e[21];let w;e[22]!==k||e[23]!==S?(w=m.jsxs("div",{className:"flex items-center justify-between gap-3 w-full px-4 py-3 rounded-lg bg-muted/50 border border-border",children:[k,S]}),e[22]=k,e[23]=S,e[24]=w):w=e[24];let O;e[25]!==w||e[26]!==h||e[27]!==x?(O=m.jsxs(Rl,{className:"sm:max-w-md",children:[d,m.jsxs("div",{className:"flex flex-col items-center gap-6 py-4",children:[h,x,w]})]}),e[25]=w,e[26]=h,e[27]=x,e[28]=O):O=e[28];let D;return e[29]!==r||e[30]!==n||e[31]!==O?(D=m.jsx(Ol,{open:n,onOpenChange:r,children:O}),e[29]=r,e[30]=n,e[31]=O,e[32]=D):D=e[32],D}function $N(t){const e=F.c(5),{open:n,onOpenChange:r}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsxs(Nl,{children:[m.jsx(wl,{children:"Invitations"}),m.jsx(vl,{children:"Your pending organization invitations"})]}),e[0]=i):i=e[0];let s;e[1]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsxs(Rl,{className:"sm:max-w-lg",children:[i,m.jsx("div",{className:"max-h-[420px] overflow-auto pr-1",children:m.jsx(fp,{})})]}),e[1]=s):s=e[1];let a;return e[2]!==r||e[3]!==n?(a=m.jsx(Ol,{open:n,onOpenChange:r,children:s}),e[2]=r,e[3]=n,e[4]=a):a=e[4],a}function ZN(t){const e=F.c(31),{user:n,userImage:r,hasInvites:i,showInvitesItem:s}=t,[a,o]=P.useState(!1),[u,l]=P.useState(!1);let d;e[0]!==i||e[1]!==n.email||e[2]!==n.name||e[3]!==r?(d=()=>m.jsxs("div",{className:"relative",children:[m.jsx(Fn,{url:r,fallback:n.name||n.email||"U",shape:"circle",size:"sm",className:"cursor-pointer hover:ring-2 ring-muted-foreground transition-all"}),i&&m.jsx("span",{className:"absolute -top-0.5 -right-0.5 h-2.5 w-2.5 rounded-full bg-destructive ring-2 ring-background"})]}),e[0]=i,e[1]=n.email,e[2]=n.name,e[3]=r,e[4]=d):d=e[4];let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=m.jsxs(Ut.Item,{onClick:()=>o(!0),children:[m.jsx(fe,{name:"account_circle",className:"text-muted-foreground"}),"Profile"]}),e[5]=c):c=e[5];let h;e[6]!==i||e[7]!==s?(h=s&&m.jsxs(Ut.Item,{onClick:()=>l(!0),children:[m.jsx(fe,{name:"mail",className:"text-muted-foreground"}),"Invitations",i&&m.jsx("span",{className:"ml-auto h-2 w-2 rounded-full bg-destructive"})]}),e[6]=i,e[7]=s,e[8]=h):h=e[8];let p;e[9]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsx(Ut.Separator,{}),e[9]=p):p=e[9];let g;e[10]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsx(dp,{className:"w-4 h-4 text-muted-foreground"}),e[10]=g):g=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=m.jsx(Ut.Item,{asChild:!0,children:m.jsxs("a",{href:"https://github.com/decocms/admin",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[g,"decocms/admin",m.jsx(fe,{name:"arrow_outward",size:18,className:"text-muted-foreground ml-auto"})]})}),e[11]=b):b=e[11];let x;e[12]===Symbol.for("react.memo_cache_sentinel")?(x=m.jsx(fe,{name:"language",className:"text-muted-foreground"}),e[12]=x):x=e[12];let E,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(E=m.jsx(Ut.Item,{asChild:!0,children:m.jsxs("a",{href:"https://decocms.com",target:"_blank",rel:"noopener noreferrer",className:"flex w-full items-center gap-2 text-sm cursor-pointer",children:[x,"Homepage",m.jsx(fe,{name:"arrow_outward",size:18,className:"ml-auto text-muted-foreground"})]})}),k=m.jsx(Ut.Separator,{}),e[13]=E,e[14]=k):(E=e[13],k=e[14]);let y;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=m.jsxs(Ut.Item,{onClick:YN,children:[m.jsx(fe,{name:"logout",size:18,className:"text-muted-foreground"}),"Log out"]}),e[15]=y):y=e[15];let _;e[16]!==d||e[17]!==h||e[18]!==n?(_=m.jsxs(Ut,{user:n,trigger:d,align:"end",children:[c,h,p,b,E,k,y]}),e[16]=d,e[17]=h,e[18]=n,e[19]=_):_=e[19];let R;e[20]!==a||e[21]!==n||e[22]!==r?(R=a&&m.jsx(HN,{open:a,onOpenChange:o,user:n,userImage:r}),e[20]=a,e[21]=n,e[22]=r,e[23]=R):R=e[23];let S;e[24]!==u||e[25]!==s?(S=s&&u&&m.jsx($N,{open:u,onOpenChange:l}),e[24]=u,e[25]=s,e[26]=S):S=e[26];let w;return e[27]!==_||e[28]!==R||e[29]!==S?(w=m.jsxs(m.Fragment,{children:[_,R,S]}),e[27]=_,e[28]=R,e[29]=S,e[30]=w):w=e[30],w}function YN(){return Rr.signOut()}function qN(){const{data:t}=Rr.useSession(),e=P.useContext(cp),{data:n}=e.hooks.useListUserInvitations(),i=(n??[]).length>0;if(!t?.user)return m.jsx(Fn,{url:void 0,fallback:"U",shape:"circle",size:"sm",className:"cursor-pointer",muted:!0});const s=t.user,a={...s,name:s.name??void 0},o=s.image;return m.jsx(ZN,{user:a,userImage:o,hasInvites:i,showInvitesItem:!0})}function VN(t){const e=F.c(6),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx(hp,{children:m.jsx(Tl,{})}),e[0]=r):r=e[0];let i;e[1]!==n?(i=m.jsx(pp,{children:n}),e[1]=n,e[2]=i):i=e[2];let s;e[3]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(mp,{children:m.jsx(gp,{to:"/login",replace:!0})}),e[3]=s):s=e[3];let a;return e[4]!==i?(a=m.jsxs(m.Fragment,{children:[r,i,s]}),e[4]=i,e[5]=a):a=e[5],a}function WN(t){const e=F.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=X("fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center justify-between w-full px-2.5 h-12 border-b border-border",r),e[0]=r,e[1]=i):i=e[1];let s;return e[2]!==n||e[3]!==i?(s=m.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=s):s=e[4],s}function GN(t){const e=F.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=X("flex items-center gap-2",r),e[0]=r,e[1]=i):i=e[1];let s;return e[2]!==n||e[3]!==i?(s=m.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=s):s=e[4],s}function KN(t){const e=F.c(5),{children:n,className:r}=t;let i;e[0]!==r?(i=X("flex items-center gap-2",r),e[0]=r,e[1]=i):i=e[1];let s;return e[2]!==n||e[3]!==i?(s=m.jsx("div",{className:i,children:n}),e[2]=n,e[3]=i,e[4]=s):s=e[4],s}function QN(){const t=F.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"}),m.jsx("div",{className:"w-32 h-6 bg-muted rounded-md animate-pulse"})]}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsxs("div",{className:"fixed top-0 left-0 right-0 z-20 bg-sidebar flex items-center justify-between w-full px-4 h-12 border-b border-border",children:[e,m.jsx("div",{className:"flex items-center gap-2",children:m.jsx("div",{className:"w-8 h-8 bg-muted rounded-full animate-pulse"})})]}),t[1]=n):n=t[1],n}const ks=Object.assign(WN,{Left:GN,Right:KN,Skeleton:QN});function XN(){const t=F.c(7);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx("div",{className:"size-10 rounded-xl bg-muted animate-pulse"}),t[0]=e):e=t[0];let n;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsxs("div",{className:"flex items-center gap-3",children:[e,m.jsxs("div",{className:"flex flex-col gap-2",children:[m.jsx("div",{className:"h-4 w-24 rounded bg-muted animate-pulse"}),m.jsx("div",{className:"h-3 w-32 rounded bg-muted/60 animate-pulse"})]})]}),t[1]=n):n=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=m.jsx("div",{className:"flex-none border-b border-border/80 px-5 pb-4 pt-6",children:m.jsxs("div",{className:"flex items-start justify-between gap-3",children:[n,m.jsxs("div",{className:"flex flex-col items-end gap-2",children:[m.jsx("div",{className:"h-5 w-20 rounded-full bg-muted animate-pulse"}),m.jsx("div",{className:"h-8 w-48 rounded-lg bg-muted animate-pulse"})]})]})}),t[2]=r):r=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx("div",{className:"flex-1 overflow-hidden px-4 py-4",children:m.jsxs("div",{className:"mx-auto flex max-w-2xl flex-col gap-4",children:[m.jsx(Xr,{align:"right",width:"w-3/4"}),m.jsx(Xr,{align:"left",width:"w-full",lines:3}),m.jsx(Xr,{align:"right",width:"w-2/3"}),m.jsx(Xr,{align:"left",width:"w-5/6",lines:2})]})}),t[3]=i):i=t[3];let s;t[4]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx("div",{className:"relative flex flex-1 flex-col gap-2 p-2.5",children:m.jsx("div",{className:"relative flex-1",children:m.jsxs("div",{className:"space-y-2 p-2",children:[m.jsx("div",{className:"h-3 w-full rounded bg-muted/40 animate-pulse"}),m.jsx("div",{className:"h-3 w-4/5 rounded bg-muted/40 animate-pulse"})]})})}),t[4]=s):s=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=m.jsx("div",{className:"flex items-center gap-1",children:m.jsx("div",{className:"size-8 rounded-full bg-muted/60 animate-pulse"})}),t[5]=a):a=t[5];let o;return t[6]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsxs("div",{className:"flex h-full w-full flex-col bg-sidebar",children:[r,i,m.jsx("div",{className:"flex-none border-t border-border/80 px-5 py-4",children:m.jsx("div",{className:"space-y-3",children:m.jsxs("div",{className:"relative flex min-h-[130px] flex-col rounded-xl border border-border bg-background shadow-sm",children:[s,m.jsxs("div",{className:"flex items-center justify-between px-2.5 pb-2.5",children:[a,m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx("div",{className:"h-8 w-32 rounded-lg bg-muted/60 animate-pulse"}),m.jsx("div",{className:"size-8 rounded-full bg-muted animate-pulse"})]})]})]})})})]}),t[6]=o):o=t[6],o}function Xr(t){const e=F.c(22),{align:n,width:r,lines:i}=t,s=r===void 0?"w-full":r,a=i===void 0?1:i,o=n==="right"?"flex-row-reverse":"flex-row";let u;e[0]!==o?(u=X("flex w-full gap-4 px-4 py-2",o),e[0]=o,e[1]=u):u=e[1];const l=n==="right"?"ml-auto max-w-3/4 items-end":"w-full items-start";let d;e[2]!==l?(d=X("flex min-w-0 flex-col gap-2",l),e[2]=l,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=m.jsx("div",{className:"h-3 w-16 rounded bg-muted/40 animate-pulse"}),e[4]=c):c=e[4];const h=n==="right"?"bg-muted":"bg-transparent border border-border/40";let p;e[5]!==h||e[6]!==s?(p=X("min-w-0 rounded-2xl p-4",h,s),e[5]=h,e[6]=s,e[7]=p):p=e[7];let g;e[8]!==a?(g=Array.from({length:a}),e[8]=a,e[9]=g):g=e[9];let b;e[10]!==a||e[11]!==g?(b=m.jsx("div",{className:"space-y-2",children:g.map((y,_)=>m.jsx("div",{className:X("h-3 rounded bg-muted-foreground/20 animate-pulse",_===a-1?"w-3/4":"w-full"),style:{animationDelay:`${_*.1}s`}},_))}),e[10]=a,e[11]=g,e[12]=b):b=e[12];let x;e[13]!==b||e[14]!==p?(x=m.jsx("div",{className:p,children:b}),e[13]=b,e[14]=p,e[15]=x):x=e[15];let E;e[16]!==x||e[17]!==d?(E=m.jsxs("div",{className:d,children:[c,x]}),e[16]=x,e[17]=d,e[18]=E):E=e[18];let k;return e[19]!==E||e[20]!==u?(k=m.jsx("div",{className:u,children:E}),e[19]=E,e[20]=u,e[21]=k):k=e[21],k}const qi=P.createContext(null);qi.displayName="PanelGroupContext";const ze={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Ja=10,cn=P.useLayoutEffect,il=bp.useId,JN=typeof il=="function"?il:()=>null;let e6=0;function eo(t=null){const e=JN(),n=P.useRef(t||e||null);return n.current===null&&(n.current=""+e6++),t??n.current}function ah({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:i,forwardedRef:s,id:a,maxSize:o,minSize:u,onCollapse:l,onExpand:d,onResize:c,order:h,style:p,tagName:g="div",...b}){const x=P.useContext(qi);if(x===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:E,expandPanel:k,getPanelSize:y,getPanelStyle:_,groupId:R,isPanelCollapsed:S,reevaluatePanelConstraints:w,registerPanel:O,resizePanel:D,unregisterPanel:v}=x,B=eo(a),j=P.useRef({callbacks:{onCollapse:l,onExpand:d,onResize:c},constraints:{collapsedSize:n,collapsible:r,defaultSize:i,maxSize:o,minSize:u},id:B,idIsFromProps:a!==void 0,order:h});P.useRef({didLogMissingDefaultSizeWarning:!1}),cn(()=>{const{callbacks:Y,constraints:H}=j.current,K={...H};j.current.id=B,j.current.idIsFromProps=a!==void 0,j.current.order=h,Y.onCollapse=l,Y.onExpand=d,Y.onResize=c,H.collapsedSize=n,H.collapsible=r,H.defaultSize=i,H.maxSize=o,H.minSize=u,(K.collapsedSize!==H.collapsedSize||K.collapsible!==H.collapsible||K.maxSize!==H.maxSize||K.minSize!==H.minSize)&&w(j.current,K)}),cn(()=>{const Y=j.current;return O(Y),()=>{v(Y)}},[h,B,O,v]),P.useImperativeHandle(s,()=>({collapse:()=>{E(j.current)},expand:Y=>{k(j.current,Y)},getId(){return B},getSize(){return y(j.current)},isCollapsed(){return S(j.current)},isExpanded(){return!S(j.current)},resize:Y=>{D(j.current,Y)}}),[E,k,y,S,B,D]);const G=_(j.current,i);return P.createElement(g,{...b,children:t,className:e,id:B,style:{...G,...p},[ze.groupId]:R,[ze.panel]:"",[ze.panelCollapsible]:r||void 0,[ze.panelId]:B,[ze.panelSize]:parseFloat(""+G.flexGrow).toFixed(1)})}const oh=P.forwardRef((t,e)=>P.createElement(ah,{...t,forwardedRef:e}));ah.displayName="Panel";oh.displayName="forwardRef(Panel)";let aa=null,li=-1,Yt=null;function t6(t,e){if(e){const n=(e&fh)!==0,r=(e&hh)!==0,i=(e&ph)!==0,s=(e&mh)!==0;if(n)return i?"se-resize":s?"ne-resize":"e-resize";if(r)return i?"sw-resize":s?"nw-resize":"w-resize";if(i)return"s-resize";if(s)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function n6(){Yt!==null&&(document.head.removeChild(Yt),aa=null,Yt=null,li=-1)}function As(t,e){var n,r;const i=t6(t,e);if(aa!==i){if(aa=i,Yt===null&&(Yt=document.createElement("style"),document.head.appendChild(Yt)),li>=0){var s;(s=Yt.sheet)===null||s===void 0||s.removeRule(li)}li=(n=(r=Yt.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&n!==void 0?n:-1}}function uh(t){return t.type==="keydown"}function lh(t){return t.type.startsWith("pointer")}function ch(t){return t.type.startsWith("mouse")}function Vi(t){if(lh(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if(ch(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function r6(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function i6(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function s6(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:ol(t),b:ol(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;de(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:al(sl(n.a)),b:al(sl(n.b))};if(i.a===i.b){const s=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let o=s.length;for(;o--;){const u=s[o];if(u===a.a)return 1;if(u===a.b)return-1}}return Math.sign(i.a-i.b)}const a6=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function o6(t){var e;const n=getComputedStyle((e=dh(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function u6(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||o6(t))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||a6.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function sl(t){let e=t.length;for(;e--;){const n=t[e];if(de(n,"Missing node"),u6(n))return n}return null}function al(t){return t&&Number(getComputedStyle(t).zIndex)||0}function ol(t){const e=[];for(;t;)e.push(t),t=dh(t);return e}function dh(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const fh=1,hh=2,ph=4,mh=8,l6=r6()==="coarse";let kt=[],Rn=!1,sn=new Map,Wi=new Map;const Ir=new Set;function c6(t,e,n,r,i){var s;const{ownerDocument:a}=e,o={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:i},u=(s=sn.get(a))!==null&&s!==void 0?s:0;return sn.set(a,u+1),Ir.add(o),Ci(),function(){var d;Wi.delete(t),Ir.delete(o);const c=(d=sn.get(a))!==null&&d!==void 0?d:1;if(sn.set(a,c-1),Ci(),c===1&&sn.delete(a),kt.includes(o)){const h=kt.indexOf(o);h>=0&&kt.splice(h,1),no(),i("up",!0,null)}}}function d6(t){const{target:e}=t,{x:n,y:r}=Vi(t);Rn=!0,to({target:e,x:n,y:r}),Ci(),kt.length>0&&(Ii("down",t),t.preventDefault(),gh(e)||t.stopImmediatePropagation())}function Ss(t){const{x:e,y:n}=Vi(t);if(Rn&&t.buttons===0&&(Rn=!1,Ii("up",t)),!Rn){const{target:r}=t;to({target:r,x:e,y:n})}Ii("move",t),no(),kt.length>0&&t.preventDefault()}function Cs(t){const{target:e}=t,{x:n,y:r}=Vi(t);Wi.clear(),Rn=!1,kt.length>0&&(t.preventDefault(),gh(e)||t.stopImmediatePropagation()),Ii("up",t),to({target:e,x:n,y:r}),no(),Ci()}function gh(t){let e=t;for(;e;){if(e.hasAttribute(ze.resizeHandle))return!0;e=e.parentElement}return!1}function to({target:t,x:e,y:n}){kt.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Ir.forEach(i=>{const{element:s,hitAreaMargins:a}=i,o=s.getBoundingClientRect(),{bottom:u,left:l,right:d,top:c}=o,h=l6?a.coarse:a.fine;if(e>=l-h&&e<=d+h&&n>=c-h&&n<=u+h){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&s6(r,s)>0){let g=r,b=!1;for(;g&&!g.contains(s);){if(i6(g.getBoundingClientRect(),o)){b=!0;break}g=g.parentElement}if(b)return}kt.push(i)}})}function Is(t,e){Wi.set(t,e)}function no(){let t=!1,e=!1;kt.forEach(r=>{const{direction:i}=r;i==="horizontal"?t=!0:e=!0});let n=0;Wi.forEach(r=>{n|=r}),t&&e?As("intersection",n):t?As("horizontal",n):e?As("vertical",n):n6()}let Ns=new AbortController;function Ci(){Ns.abort(),Ns=new AbortController;const t={capture:!0,signal:Ns.signal};Ir.size&&(Rn?(kt.length>0&&sn.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",Cs,t),r.addEventListener("pointerleave",Ss,t),r.addEventListener("pointermove",Ss,t))}),window.addEventListener("pointerup",Cs,t),window.addEventListener("pointercancel",Cs,t)):sn.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",d6,t),r.addEventListener("pointermove",Ss,t))}))}function Ii(t,e){Ir.forEach(n=>{const{setResizeHandlerState:r}=n,i=kt.includes(n);r(t,i,e)})}function f6(){const[t,e]=P.useState(0);return P.useCallback(()=>e(n=>n+1),[])}function de(t,e){if(!t)throw console.error(e),Error(e)}function pn(t,e,n=Ja){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function Mt(t,e,n=Ja){return pn(t,e,n)===0}function ft(t,e,n){return pn(t,e,n)===0}function h6(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const i=t[r],s=e[r];if(!ft(i,s,n))return!1}return!0}function wn({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];de(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:i=0,collapsible:s,maxSize:a=100,minSize:o=0}=r;if(pn(n,o)<0)if(s){const u=(i+o)/2;pn(n,u)<0?n=i:n=o}else n=o;return n=Math.min(a,n),n=parseFloat(n.toFixed(Ja)),n}function ur({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:s}){if(ft(t,0))return e;const a=[...e],[o,u]=r;de(o!=null,"Invalid first pivot index"),de(u!=null,"Invalid second pivot index");let l=0;if(s==="keyboard"){{const c=t<0?u:o,h=n[c];de(h,`Panel constraints not found for index ${c}`);const{collapsedSize:p=0,collapsible:g,minSize:b=0}=h;if(g){const x=e[c];if(de(x!=null,`Previous layout not found for panel index ${c}`),ft(x,p)){const E=b-x;pn(E,Math.abs(t))>0&&(t=t<0?0-E:E)}}}{const c=t<0?o:u,h=n[c];de(h,`No panel constraints found for index ${c}`);const{collapsedSize:p=0,collapsible:g,minSize:b=0}=h;if(g){const x=e[c];if(de(x!=null,`Previous layout not found for panel index ${c}`),ft(x,b)){const E=x-p;pn(E,Math.abs(t))>0&&(t=t<0?0-E:E)}}}}{const c=t<0?1:-1;let h=t<0?u:o,p=0;for(;;){const b=e[h];de(b!=null,`Previous layout not found for panel index ${h}`);const E=wn({panelConstraints:n,panelIndex:h,size:100})-b;if(p+=E,h+=c,h<0||h>=n.length)break}const g=Math.min(Math.abs(t),Math.abs(p));t=t<0?0-g:g}{let h=t<0?o:u;for(;h>=0&&h<n.length;){const p=Math.abs(t)-Math.abs(l),g=e[h];de(g!=null,`Previous layout not found for panel index ${h}`);const b=g-p,x=wn({panelConstraints:n,panelIndex:h,size:b});if(!ft(g,x)&&(l+=g-x,a[h]=x,l.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?h--:h++}}if(h6(i,a))return i;{const c=t<0?u:o,h=e[c];de(h!=null,`Previous layout not found for panel index ${c}`);const p=h+l,g=wn({panelConstraints:n,panelIndex:c,size:p});if(a[c]=g,!ft(g,p)){let b=p-g,E=t<0?u:o;for(;E>=0&&E<n.length;){const k=a[E];de(k!=null,`Previous layout not found for panel index ${E}`);const y=k+b,_=wn({panelConstraints:n,panelIndex:E,size:y});if(ft(k,_)||(b-=_-k,a[E]=_),ft(b,0))break;t>0?E--:E++}}}const d=a.reduce((c,h)=>h+c,0);return ft(d,100)?a:i}function p6({layout:t,panelsArray:e,pivotIndices:n}){let r=0,i=100,s=0,a=0;const o=n[0];de(o!=null,"No pivot index found"),e.forEach((c,h)=>{const{constraints:p}=c,{maxSize:g=100,minSize:b=0}=p;h===o?(r=b,i=g):(s+=b,a+=g)});const u=Math.min(i,100-s),l=Math.max(r,100-a),d=t[o];return{valueMax:u,valueMin:l,valueNow:d}}function Nr(t,e=document){return Array.from(e.querySelectorAll(`[${ze.resizeHandleId}][data-panel-group-id="${t}"]`))}function bh(t,e,n=document){const i=Nr(t,n).findIndex(s=>s.getAttribute(ze.resizeHandleId)===e);return i??null}function Eh(t,e,n){const r=bh(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function xh(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Gi(t,e=document){const n=e.querySelector(`[${ze.resizeHandleId}="${t}"]`);return n||null}function m6(t,e,n,r=document){var i,s,a,o;const u=Gi(e,r),l=Nr(t,r),d=u?l.indexOf(u):-1,c=(i=(s=n[d])===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:null,h=(a=(o=n[d+1])===null||o===void 0?void 0:o.id)!==null&&a!==void 0?a:null;return[c,h]}function g6({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:i,panelGroupElement:s,setLayout:a}){P.useRef({didWarnAboutMissingResizeHandle:!1}),cn(()=>{if(!s)return;const o=Nr(n,s);for(let u=0;u<i.length-1;u++){const{valueMax:l,valueMin:d,valueNow:c}=p6({layout:r,panelsArray:i,pivotIndices:[u,u+1]}),h=o[u];if(h!=null){const p=i[u];de(p,`No panel data found for index "${u}"`),h.setAttribute("aria-controls",p.id),h.setAttribute("aria-valuemax",""+Math.round(l)),h.setAttribute("aria-valuemin",""+Math.round(d)),h.setAttribute("aria-valuenow",c!=null?""+Math.round(c):"")}}return()=>{o.forEach((u,l)=>{u.removeAttribute("aria-controls"),u.removeAttribute("aria-valuemax"),u.removeAttribute("aria-valuemin"),u.removeAttribute("aria-valuenow")})}},[n,r,i,s]),P.useEffect(()=>{if(!s)return;const o=e.current;de(o,"Eager values not found");const{panelDataArray:u}=o,l=xh(n,s);de(l!=null,`No group found for id "${n}"`);const d=Nr(n,s);de(d,`No resize handles found for group id "${n}"`);const c=d.map(h=>{const p=h.getAttribute(ze.resizeHandleId);de(p,"Resize handle element has no handle id attribute");const[g,b]=m6(n,p,u,s);if(g==null||b==null)return()=>{};const x=E=>{if(!E.defaultPrevented)switch(E.key){case"Enter":{E.preventDefault();const k=u.findIndex(y=>y.id===g);if(k>=0){const y=u[k];de(y,`No panel data found for index ${k}`);const _=r[k],{collapsedSize:R=0,collapsible:S,minSize:w=0}=y.constraints;if(_!=null&&S){const O=ur({delta:ft(_,R)?w-R:R-_,initialLayout:r,panelConstraints:u.map(D=>D.constraints),pivotIndices:Eh(n,p,s),prevLayout:r,trigger:"keyboard"});r!==O&&a(O)}}break}}};return h.addEventListener("keydown",x),()=>{h.removeEventListener("keydown",x)}});return()=>{c.forEach(h=>h())}},[s,t,e,n,r,i,a])}function ul(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Th(t,e){const n=t==="horizontal",{x:r,y:i}=Vi(e);return n?r:i}function b6(t,e,n,r,i){const s=n==="horizontal",a=Gi(e,i);de(a,`No resize handle element found for id "${e}"`);const o=a.getAttribute(ze.groupId);de(o,"Resize handle element has no group id attribute");let{initialCursorPosition:u}=r;const l=Th(n,t),d=xh(o,i);de(d,`No group element found for id "${o}"`);const c=d.getBoundingClientRect(),h=s?c.width:c.height;return(l-u)/h*100}function E6(t,e,n,r,i,s){if(uh(t)){const a=n==="horizontal";let o=0;t.shiftKey?o=100:i!=null?o=i:o=10;let u=0;switch(t.key){case"ArrowDown":u=a?0:o;break;case"ArrowLeft":u=a?-o:0;break;case"ArrowRight":u=a?o:0;break;case"ArrowUp":u=a?0:-o;break;case"End":u=100;break;case"Home":u=-100;break}return u}else return r==null?0:b6(t,e,n,r,s)}function x6({panelDataArray:t}){const e=Array(t.length),n=t.map(s=>s.constraints);let r=0,i=100;for(let s=0;s<t.length;s++){const a=n[s];de(a,`Panel constraints not found for index ${s}`);const{defaultSize:o}=a;o!=null&&(r++,e[s]=o,i-=o)}for(let s=0;s<t.length;s++){const a=n[s];de(a,`Panel constraints not found for index ${s}`);const{defaultSize:o}=a;if(o!=null)continue;const u=t.length-r,l=i/u;r++,e[s]=l,i-=l}return e}function kn(t,e,n){e.forEach((r,i)=>{const s=t[i];de(s,`Panel data not found for index ${i}`);const{callbacks:a,constraints:o,id:u}=s,{collapsedSize:l=0,collapsible:d}=o,c=n[u];if(c==null||r!==c){n[u]=r;const{onCollapse:h,onExpand:p,onResize:g}=a;g&&g(r,c),d&&(h||p)&&(p&&(c==null||Mt(c,l))&&!Mt(r,l)&&p(),h&&(c==null||!Mt(c,l))&&Mt(r,l)&&h())}})}function Jr(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function T6({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:i,precision:s=3}){const a=n[i];let o;return a==null?o=t!=null?t.toPrecision(s):"1":r.length===1?o="1":o=a.toPrecision(s),{flexBasis:0,flexGrow:o,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function _6(t,e=10){let n=null;return(...i)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...i)},e)}}function ll(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function _h(t){return`react-resizable-panels:${t}`}function yh(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:i,order:s}=e;return i?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function kh(t,e){try{const n=_h(t),r=e.getItem(n);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function y6(t,e,n){var r,i;const s=(r=kh(t,n))!==null&&r!==void 0?r:{},a=yh(e);return(i=s[a])!==null&&i!==void 0?i:null}function k6(t,e,n,r,i){var s;const a=_h(t),o=yh(e),u=(s=kh(t,i))!==null&&s!==void 0?s:{};u[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{i.setItem(a,JSON.stringify(u))}catch(l){console.error(l)}}function cl({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((s,a)=>s+a,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!ft(r,100)&&n.length>0)for(let s=0;s<e.length;s++){const a=n[s];de(a!=null,`No layout data found for index ${s}`);const o=100/r*a;n[s]=o}let i=0;for(let s=0;s<e.length;s++){const a=n[s];de(a!=null,`No layout data found for index ${s}`);const o=wn({panelConstraints:e,panelIndex:s,size:a});a!=o&&(i+=a-o,n[s]=o)}if(!ft(i,0))for(let s=0;s<e.length;s++){const a=n[s];de(a!=null,`No layout data found for index ${s}`);const o=a+i,u=wn({panelConstraints:e,panelIndex:s,size:o});if(a!==u&&(i-=u-a,n[s]=u,ft(i,0)))break}return n}const A6=100,lr={getItem:t=>(ll(lr),lr.getItem(t)),setItem:(t,e)=>{ll(lr),lr.setItem(t,e)}},dl={};function Ah({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:i,id:s=null,onLayout:a=null,keyboardResizeBy:o=null,storage:u=lr,style:l,tagName:d="div",...c}){const h=eo(s),p=P.useRef(null),[g,b]=P.useState(null),[x,E]=P.useState([]),k=f6(),y=P.useRef({}),_=P.useRef(new Map),R=P.useRef(0),S=P.useRef({autoSaveId:t,direction:r,dragState:g,id:h,keyboardResizeBy:o,onLayout:a,storage:u}),w=P.useRef({layout:x,panelDataArray:[],panelDataArrayChanged:!1});P.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),P.useImperativeHandle(i,()=>({getId:()=>S.current.id,getLayout:()=>{const{layout:T}=w.current;return T},setLayout:T=>{const{onLayout:V}=S.current,{layout:te,panelDataArray:Q}=w.current,J=cl({layout:T,panelConstraints:Q.map(ne=>ne.constraints)});ul(te,J)||(E(J),w.current.layout=J,V&&V(J),kn(Q,J,y.current))}}),[]),cn(()=>{S.current.autoSaveId=t,S.current.direction=r,S.current.dragState=g,S.current.id=h,S.current.onLayout=a,S.current.storage=u}),g6({committedValuesRef:S,eagerValuesRef:w,groupId:h,layout:x,panelDataArray:w.current.panelDataArray,setLayout:E,panelGroupElement:p.current}),P.useEffect(()=>{const{panelDataArray:T}=w.current;if(t){if(x.length===0||x.length!==T.length)return;let V=dl[t];V==null&&(V=_6(k6,A6),dl[t]=V);const te=[...T],Q=new Map(_.current);V(t,te,Q,x,u)}},[t,x,u]),P.useEffect(()=>{});const O=P.useCallback(T=>{const{onLayout:V}=S.current,{layout:te,panelDataArray:Q}=w.current;if(T.constraints.collapsible){const J=Q.map(Re=>Re.constraints),{collapsedSize:ne=0,panelSize:ae,pivotIndices:ge}=nn(Q,T,te);if(de(ae!=null,`Panel size not found for panel "${T.id}"`),!Mt(ae,ne)){_.current.set(T.id,ae);const Me=In(Q,T)===Q.length-1?ae-ne:ne-ae,ye=ur({delta:Me,initialLayout:te,panelConstraints:J,pivotIndices:ge,prevLayout:te,trigger:"imperative-api"});Jr(te,ye)||(E(ye),w.current.layout=ye,V&&V(ye),kn(Q,ye,y.current))}}},[]),D=P.useCallback((T,V)=>{const{onLayout:te}=S.current,{layout:Q,panelDataArray:J}=w.current;if(T.constraints.collapsible){const ne=J.map(Ye=>Ye.constraints),{collapsedSize:ae=0,panelSize:ge=0,minSize:Re=0,pivotIndices:Me}=nn(J,T,Q),ye=V??Re;if(Mt(ge,ae)){const Ye=_.current.get(T.id),$e=Ye!=null&&Ye>=ye?Ye:ye,En=In(J,T)===J.length-1?ge-$e:$e-ge,Ge=ur({delta:En,initialLayout:Q,panelConstraints:ne,pivotIndices:Me,prevLayout:Q,trigger:"imperative-api"});Jr(Q,Ge)||(E(Ge),w.current.layout=Ge,te&&te(Ge),kn(J,Ge,y.current))}}},[]),v=P.useCallback(T=>{const{layout:V,panelDataArray:te}=w.current,{panelSize:Q}=nn(te,T,V);return de(Q!=null,`Panel size not found for panel "${T.id}"`),Q},[]),B=P.useCallback((T,V)=>{const{panelDataArray:te}=w.current,Q=In(te,T);return T6({defaultSize:V,dragState:g,layout:x,panelData:te,panelIndex:Q})},[g,x]),j=P.useCallback(T=>{const{layout:V,panelDataArray:te}=w.current,{collapsedSize:Q=0,collapsible:J,panelSize:ne}=nn(te,T,V);return de(ne!=null,`Panel size not found for panel "${T.id}"`),J===!0&&Mt(ne,Q)},[]),G=P.useCallback(T=>{const{layout:V,panelDataArray:te}=w.current,{collapsedSize:Q=0,collapsible:J,panelSize:ne}=nn(te,T,V);return de(ne!=null,`Panel size not found for panel "${T.id}"`),!J||pn(ne,Q)>0},[]),Y=P.useCallback(T=>{const{panelDataArray:V}=w.current;V.push(T),V.sort((te,Q)=>{const J=te.order,ne=Q.order;return J==null&&ne==null?0:J==null?-1:ne==null?1:J-ne}),w.current.panelDataArrayChanged=!0,k()},[k]);cn(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:T,onLayout:V,storage:te}=S.current,{layout:Q,panelDataArray:J}=w.current;let ne=null;if(T){const ge=y6(T,J,te);ge&&(_.current=new Map(Object.entries(ge.expandToSizes)),ne=ge.layout)}ne==null&&(ne=x6({panelDataArray:J}));const ae=cl({layout:ne,panelConstraints:J.map(ge=>ge.constraints)});ul(Q,ae)||(E(ae),w.current.layout=ae,V&&V(ae),kn(J,ae,y.current))}}),cn(()=>{const T=w.current;return()=>{T.layout=[]}},[]);const H=P.useCallback(T=>{let V=!1;const te=p.current;return te&&window.getComputedStyle(te,null).getPropertyValue("direction")==="rtl"&&(V=!0),function(J){J.preventDefault();const ne=p.current;if(!ne)return()=>null;const{direction:ae,dragState:ge,id:Re,keyboardResizeBy:Me,onLayout:ye}=S.current,{layout:Ye,panelDataArray:$e}=w.current,{initialLayout:Qt}=ge??{},En=Eh(Re,T,ne);let Ge=E6(J,T,ae,ge,Me,ne);const Yn=ae==="horizontal";Yn&&V&&(Ge=-Ge);const Hr=$e.map(Ki=>Ki.constraints),Xt=ur({delta:Ge,initialLayout:Qt??Ye,panelConstraints:Hr,pivotIndices:En,prevLayout:Ye,trigger:uh(J)?"keyboard":"mouse-or-touch"}),$r=!Jr(Ye,Xt);(lh(J)||ch(J))&&R.current!=Ge&&(R.current=Ge,!$r&&Ge!==0?Yn?Is(T,Ge<0?fh:hh):Is(T,Ge<0?ph:mh):Is(T,0)),$r&&(E(Xt),w.current.layout=Xt,ye&&ye(Xt),kn($e,Xt,y.current))}},[]),K=P.useCallback((T,V)=>{const{onLayout:te}=S.current,{layout:Q,panelDataArray:J}=w.current,ne=J.map(Ye=>Ye.constraints),{panelSize:ae,pivotIndices:ge}=nn(J,T,Q);de(ae!=null,`Panel size not found for panel "${T.id}"`);const Me=In(J,T)===J.length-1?ae-V:V-ae,ye=ur({delta:Me,initialLayout:Q,panelConstraints:ne,pivotIndices:ge,prevLayout:Q,trigger:"imperative-api"});Jr(Q,ye)||(E(ye),w.current.layout=ye,te&&te(ye),kn(J,ye,y.current))},[]),se=P.useCallback((T,V)=>{const{layout:te,panelDataArray:Q}=w.current,{collapsedSize:J=0,collapsible:ne}=V,{collapsedSize:ae=0,collapsible:ge,maxSize:Re=100,minSize:Me=0}=T.constraints,{panelSize:ye}=nn(Q,T,te);ye!=null&&(ne&&ge&&Mt(ye,J)?Mt(J,ae)||K(T,ae):ye<Me?K(T,Me):ye>Re&&K(T,Re))},[K]),pe=P.useCallback((T,V)=>{const{direction:te}=S.current,{layout:Q}=w.current;if(!p.current)return;const J=Gi(T,p.current);de(J,`Drag handle element not found for id "${T}"`);const ne=Th(te,V);b({dragHandleId:T,dragHandleRect:J.getBoundingClientRect(),initialCursorPosition:ne,initialLayout:Q})},[]),ce=P.useCallback(()=>{b(null)},[]),N=P.useCallback(T=>{const{panelDataArray:V}=w.current,te=In(V,T);te>=0&&(V.splice(te,1),delete y.current[T.id],w.current.panelDataArrayChanged=!0,k())},[k]),Ee=P.useMemo(()=>({collapsePanel:O,direction:r,dragState:g,expandPanel:D,getPanelSize:v,getPanelStyle:B,groupId:h,isPanelCollapsed:j,isPanelExpanded:G,reevaluatePanelConstraints:se,registerPanel:Y,registerResizeHandle:H,resizePanel:K,startDragging:pe,stopDragging:ce,unregisterPanel:N,panelGroupElement:p.current}),[O,g,r,D,v,B,h,j,G,se,Y,H,K,pe,ce,N]),xe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return P.createElement(qi.Provider,{value:Ee},P.createElement(d,{...c,children:e,className:n,id:s,ref:p,style:{...xe,...l},[ze.group]:"",[ze.groupDirection]:r,[ze.groupId]:h}))}const Sh=P.forwardRef((t,e)=>P.createElement(Ah,{...t,forwardedRef:e}));Ah.displayName="PanelGroup";Sh.displayName="forwardRef(PanelGroup)";function In(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function nn(t,e,n){const r=In(t,e),s=r===t.length-1?[r-1,r]:[r,r+1],a=n[r];return{...e.constraints,panelSize:a,pivotIndices:s}}function S6({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){P.useEffect(()=>{if(t||n==null||r==null)return;const i=Gi(e,r);if(i==null)return;const s=a=>{if(!a.defaultPrevented)switch(a.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{a.preventDefault(),n(a);break}case"F6":{a.preventDefault();const o=i.getAttribute(ze.groupId);de(o,`No group element found for id "${o}"`);const u=Nr(o,r),l=bh(o,e,r);de(l!==null,`No resize element found for id "${e}"`);const d=a.shiftKey?l>0?l-1:u.length-1:l+1<u.length?l+1:0;u[d].focus();break}}};return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}},[r,t,e,n])}function Ch({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:i,onBlur:s,onClick:a,onDragging:o,onFocus:u,onPointerDown:l,onPointerUp:d,style:c={},tabIndex:h=0,tagName:p="div",...g}){var b,x;const E=P.useRef(null),k=P.useRef({onClick:a,onDragging:o,onPointerDown:l,onPointerUp:d});P.useEffect(()=>{k.current.onClick=a,k.current.onDragging=o,k.current.onPointerDown=l,k.current.onPointerUp=d});const y=P.useContext(qi);if(y===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:_,groupId:R,registerResizeHandle:S,startDragging:w,stopDragging:O,panelGroupElement:D}=y,v=eo(i),[B,j]=P.useState("inactive"),[G,Y]=P.useState(!1),[H,K]=P.useState(null),se=P.useRef({state:B});cn(()=>{se.current.state=B}),P.useEffect(()=>{if(n)K(null);else{const Ee=S(v);K(()=>Ee)}},[n,v,S]);const pe=(b=r?.coarse)!==null&&b!==void 0?b:15,ce=(x=r?.fine)!==null&&x!==void 0?x:5;P.useEffect(()=>{if(n||H==null)return;const Ee=E.current;de(Ee,"Element ref not attached");let xe=!1;return c6(v,Ee,_,{coarse:pe,fine:ce},(V,te,Q)=>{if(!te){j("inactive");return}switch(V){case"down":{j("drag"),xe=!1,de(Q,'Expected event to be defined for "down" action'),w(v,Q);const{onDragging:J,onPointerDown:ne}=k.current;J?.(!0),ne?.();break}case"move":{const{state:J}=se.current;xe=!0,J!=="drag"&&j("hover"),de(Q,'Expected event to be defined for "move" action'),H(Q);break}case"up":{j("hover"),O();const{onClick:J,onDragging:ne,onPointerUp:ae}=k.current;ne?.(!1),ae?.(),xe||J?.();break}}})},[pe,_,n,ce,S,v,H,w,O]),S6({disabled:n,handleId:v,resizeHandler:H,panelGroupElement:D});const N={touchAction:"none",userSelect:"none"};return P.createElement(p,{...g,children:t,className:e,id:i,onBlur:()=>{Y(!1),s?.()},onFocus:()=>{Y(!0),u?.()},ref:E,role:"separator",style:{...N,...c},tabIndex:h,[ze.groupDirection]:_,[ze.groupId]:R,[ze.resizeHandle]:"",[ze.resizeHandleActive]:B==="drag"?"pointer":G?"keyboard":void 0,[ze.resizeHandleEnabled]:!n,[ze.resizeHandleId]:v,[ze.resizeHandleState]:B})}Ch.displayName="PanelResizeHandle";function C6(t){const e=F.c(8);let n,r;e[0]!==t?({className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r):(n=e[1],r=e[2]);let i;e[3]!==n?(i=X("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[3]=n,e[4]=i):i=e[4];let s;return e[5]!==r||e[6]!==i?(s=m.jsx(Sh,{"data-slot":"resizable-panel-group",className:i,...r}),e[5]=r,e[6]=i,e[7]=s):s=e[7],s}function Ih(t){const e=F.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=m.jsx(oh,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=r):r=e[3],r}function I6(t){const e=F.c(12);let n,r,i;e[0]!==t?({withHandle:i,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=i):(n=e[1],r=e[2],i=e[3]);let s;e[4]!==n?(s=X("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),e[4]=n,e[5]=s):s=e[5];let a;e[6]!==i?(a=i&&m.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:m.jsx(bE,{className:"size-2.5"})}),e[6]=i,e[7]=a):a=e[7];let o;return e[8]!==r||e[9]!==s||e[10]!==a?(o=m.jsx(Ch,{"data-slot":"resizable-handle",className:s,...r,children:a}),e[8]=r,e[9]=s,e[10]=a,e[11]=o):o=e[11],o}function Nh(){const t=F.c(6),{toggleSidebar:e}=Qa();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsx(fe,{name:"dock_to_right",className:"text-muted-foreground",size:20}),t[0]=n):n=t[0];let r;t[1]!==e?(r=m.jsx(ot,{onClick:e,size:"icon",variant:"ghost",className:"w-8 h-8 rounded-md",children:n}),t[1]=e,t[2]=r):r=t[2];let i;t[3]===Symbol.for("react.memo_cache_sentinel")?(i=m.jsx("div",{className:"h-8 w-px bg-border"}),t[3]=i):i=t[3];let s;return t[4]!==r?(s=m.jsxs(m.Fragment,{children:[r,i]}),t[4]=r,t[5]=s):s=t[5],s}Nh.Skeleton=function(){return m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"w-8 h-8 bg-muted rounded-md animate-pulse"}),m.jsx("div",{className:"h-8 w-px bg-border"})]})};const N6="https://assets.decocache.com/decocms/fd07a578-6b1c-40f1-bc05-88a3b981695d/f7fc4ffa81aec04e37ae670c3cd4936643a7b269.png";function fl(t){const e=F.c(18),{showSidebarToggle:n,showOrgSwitcher:r,showDecoChat:i}=t,s=n===void 0?!1:n,a=r===void 0?!1:r,o=i===void 0?!1:i,[,u]=wi();let l;e[0]!==u?(l=()=>u(w6),e[0]=u,e[1]=l):l=e[1];const d=l;let c;e[2]!==s?(c=s&&m.jsx(Nh,{}),e[2]=s,e[3]=c):c=e[3];let h;e[4]!==a?(h=a&&m.jsx(P.Suspense,{fallback:m.jsx(sa.Skeleton,{}),children:m.jsx(sa,{})}),e[4]=a,e[5]=h):h=e[5];let p;e[6]!==c||e[7]!==h?(p=m.jsxs(ks.Left,{children:[c,h]}),e[6]=c,e[7]=h,e[8]=p):p=e[8];let g;e[9]!==o||e[10]!==d?(g=o&&m.jsxs(ot,{size:"sm",variant:"default",onClick:d,children:[m.jsx(Fn,{url:N6,fallback:"DC",size:"2xs",className:"rounded-sm"}),"deco chat"]}),e[9]=o,e[10]=d,e[11]=g):g=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=m.jsx(qN,{}),e[12]=b):b=e[12];let x;e[13]!==g?(x=m.jsxs(ks.Right,{className:"gap-2",children:[g,b]}),e[13]=g,e[14]=x):x=e[14];let E;return e[15]!==x||e[16]!==p?(E=m.jsxs(ks,{children:[p,x]}),e[15]=x,e[16]=p,e[17]=E):E=e[17],E}function w6(t){return!t}function v6(t){const e=F.c(10),{children:n,className:r}=t,[,i]=P.useTransition();let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=Or.decoChatPanelWidth(),e[0]=s):s=e[0];const[a,o]=On(s,30);let u;e[1]!==o?(u=h=>i(()=>o(h)),e[1]=o,e[2]=u):u=e[2];const l=u;let d;e[3]!==r?(d=X("min-w-0",r),e[3]=r,e[4]=d):d=e[4];let c;return e[5]!==a||e[6]!==n||e[7]!==l||e[8]!==d?(c=m.jsx(Ih,{defaultSize:a,minSize:20,className:d,onResize:l,children:n}),e[5]=a,e[6]=n,e[7]=l,e[8]=d,e[9]=c):c=e[9],c}function R6(t){const e=F.c(5),{children:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=Or.sidebarOpen(),e[0]=r):r=e[0];const[i,s]=On(r,!0);let a;return e[1]!==n||e[2]!==s||e[3]!==i?(a=m.jsx(WI,{open:i,onOpenChange:s,children:n}),e[1]=n,e[2]=s,e[3]=i,e[4]=a):a=e[4],a}function O6(){const t=F.c(9),[e]=wi();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n=m.jsx(Ih,{className:"bg-background",children:m.jsx(_l,{})}),t[0]=n):n=t[0];let r;t[1]!==e?(r=m.jsx(I6,{withHandle:e}),t[1]=e,t[2]=r):r=t[2];const i=e?"max-w-none":"max-w-0";let s;t[3]===Symbol.for("react.memo_cache_sentinel")?(s=m.jsx(Rs,{children:m.jsx(P.Suspense,{fallback:m.jsx(XN,{}),children:m.jsx(DI,{})})}),t[3]=s):s=t[3];let a;t[4]!==i?(a=m.jsx(v6,{className:i,children:s}),t[4]=i,t[5]=a):a=t[5];let o;return t[6]!==r||t[7]!==a?(o=m.jsxs(C6,{direction:"horizontal",children:[n,r,a]}),t[6]=r,t[7]=a,t[8]=o):o=t[8],o}function L6(){const t=F.c(19);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},t[0]=e):e=t[0];const{org:n}=xl(e);let r;t[1]!==n?(r=at.activeOrganization(n),t[1]=n,t[2]=r):r=t[2];let i;t[3]!==n?(i=async()=>{if(!n)return null;const{data:p}=await Rr.organization.setActive({organizationSlug:n});return{org:p,project:{slug:Sp}}},t[3]=n,t[4]=i):i=t[4];let s;t[5]!==r||t[6]!==i?(s={queryKey:r,queryFn:i,gcTime:1/0,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1},t[5]=r,t[6]=i,t[7]=s):s=t[7];const{data:a}=da(s);if(!a){let p;t[8]===Symbol.for("react.memo_cache_sentinel")?(p=m.jsx(fl,{}),t[8]=p):p=t[8];let g;return t[9]===Symbol.for("react.memo_cache_sentinel")?(g=m.jsxs("div",{className:"min-h-screen bg-background",children:[p,m.jsx("div",{className:"pt-12",children:m.jsx(_l,{})})]}),t[9]=g):g=t[9],g}let o;t[10]===Symbol.for("react.memo_cache_sentinel")?(o=m.jsx(fl,{showSidebarToggle:!0,showOrgSwitcher:!0,showDecoChat:!0}),t[10]=o):o=t[10];let u;t[11]===Symbol.for("react.memo_cache_sentinel")?(u={"--sidebar-width":"13rem","--sidebar-width-mobile":"11rem"},t[11]=u):u=t[11];let l;t[12]===Symbol.for("react.memo_cache_sentinel")?(l=m.jsx(bN,{}),t[12]=l):l=t[12];let d;t[13]===Symbol.for("react.memo_cache_sentinel")?(d=m.jsx(R6,{children:m.jsxs("div",{className:"flex flex-col h-screen",children:[o,m.jsxs(QI,{className:"flex-1 bg-sidebar",style:u,children:[l,m.jsx(JI,{className:"pt-12",children:m.jsx(O6,{})})]})]})}),t[13]=d):d=t[13];let c;t[14]!==a.org.slug?(c=m.jsx(ZE,{children:d},a.org.slug),t[14]=a.org.slug,t[15]=c):c=t[15];let h;return t[16]!==a||t[17]!==c?(h=m.jsx(Ap,{...a,children:c}),t[16]=a,t[17]=c,t[18]=h):h=t[18],h}function l4(){const t=F.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=m.jsx(VN,{children:m.jsx(P.Suspense,{fallback:m.jsx(Tl,{}),children:m.jsx(L6,{})})}),t[0]=e):e=t[0],e}export{l4 as default};
@@ -1 +1 @@
1
- import{c as C,af as d,j as a}from"./index-VCe1FY3E.js";import{c as m}from"./utils-B-QWwgyW.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};
1
+ import{c as C,af as d,j as a}from"./index-B5e6fytH.js";import{c as m}from"./utils-BLBjpUfr.js";const u=d("animate-spin",{variants:{variant:{default:"fill-primary text-gray-200",destructive:"fill-destructive text-gray-200",secondary:"fill-secondary text-gray-200",special:"fill-special text-backround"},size:{default:"h-7 w-7",sm:"h-6 w-6",lg:"h-8 w-8",icon:"h-6 w-6",xs:"h-4 w-4"}},defaultVariants:{variant:"default",size:"default"}});function h(f){const e=C.c(10),{variant:c,size:o}=f;let t;e[0]!==o||e[1]!==c?(t=m(u({variant:c,size:o})),e[0]=o,e[1]=c,e[2]=t):t=e[2];let l,i;e[3]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),i=a.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"}),e[3]=l,e[4]=i):(l=e[3],i=e[4]);let s;e[5]!==t?(s=a.jsxs("svg",{"aria-hidden":"true",className:t,viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[l,i]}),e[5]=t,e[6]=s):s=e[6];let r;e[7]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx("span",{className:"sr-only",children:"Loading..."}),e[7]=r):r=e[7];let n;return e[8]!==s?(n=a.jsxs("div",{role:"status",children:[s,r]}),e[8]=s,e[9]=n):n=e[9],n}export{h as S};