@alepha/devtools 0.13.8 → 0.14.0

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 (39) hide show
  1. package/assets/devtools/{chunk.Cw2RCl4F.js → chunk.4uk7i9-q.js} +1 -1
  2. package/assets/devtools/{chunk.17gtbQUO.js → chunk.69EpOqBb.js} +1 -1
  3. package/assets/devtools/{chunk.BULoWCgJ.js → chunk.Ahe7TOrT.js} +1 -1
  4. package/assets/devtools/{chunk.CyQeq1kA.js → chunk.BOmhpMQZ.js} +1 -1
  5. package/assets/devtools/{chunk.BmJ7-uBd.js → chunk.BPR3Fzfi.js} +1 -1
  6. package/assets/devtools/{chunk.Ct58VlQl.js → chunk.BY1cUJeA.js} +1 -1
  7. package/assets/devtools/{chunk.DooL4OcT.js → chunk.BiZFFFTD.js} +1 -1
  8. package/assets/devtools/{chunk.DJJIo7HU.js → chunk.Bmb3xtb6.js} +1 -1
  9. package/assets/devtools/{chunk.DHWcJNNS.js → chunk.BumKuBFW.js} +1 -1
  10. package/assets/devtools/{chunk.CHRbA_gU.js → chunk.BzgsKQoC.js} +1 -1
  11. package/assets/devtools/{chunk.1mem8WHh.js → chunk.C2hdXZn7.js} +1 -1
  12. package/assets/devtools/{chunk.OlMI8g2F.js → chunk.CKmrGczh.js} +1 -1
  13. package/assets/devtools/{chunk.DR0SHXXd.js → chunk.CLi65HO4.js} +1 -1
  14. package/assets/devtools/{chunk.DEUHUxKv.js → chunk.CUTV1O_R.js} +1 -1
  15. package/assets/devtools/{chunk.CBGZOsrp.js → chunk.CaPSIJzT.js} +1 -1
  16. package/assets/devtools/{chunk.DJOi4_So.js → chunk.ChHWktn9.js} +1 -1
  17. package/assets/devtools/{chunk.DGW-W4Kc.js → chunk.ChW-mtOy.js} +1 -1
  18. package/assets/devtools/{chunk.fpKvkQeU.js → chunk.CkWIENRP.js} +1 -1
  19. package/assets/devtools/{chunk.CzbujtK7.js → chunk.CvqDfxXu.js} +1 -1
  20. package/assets/devtools/{chunk.Pj_uCbSv.js → chunk.CyVfOtMH.js} +1 -1
  21. package/assets/devtools/{chunk.IVvrfXp1.js → chunk.D4LcKiGJ.js} +1 -1
  22. package/assets/devtools/{chunk.DinJSUfH.js → chunk.D4_B6m39.js} +1 -1
  23. package/assets/devtools/{chunk.B0aYes_4.js → chunk.D7T7GuJQ.js} +1 -1
  24. package/assets/devtools/{chunk.YXYL4YAO.js → chunk.DD8gLmva.js} +1 -1
  25. package/assets/devtools/{chunk.RTodzvo0.js → chunk.DFYPFYhv.js} +1 -1
  26. package/assets/devtools/{chunk.Dry2LXOT.js → chunk.DUAYORVN.js} +1 -1
  27. package/assets/devtools/{chunk.BYrPfJRg.js → chunk.DXpU07Gr.js} +1 -1
  28. package/assets/devtools/{chunk.DIfRZc20.js → chunk.DknkYaMA.js} +1 -1
  29. package/assets/devtools/{chunk.DA9XnVAa.js → chunk.K3IQQCLu.js} +1 -1
  30. package/assets/devtools/{chunk.qDx9cjbN.js → chunk.KBmIO7L9.js} +1 -1
  31. package/assets/devtools/{chunk.BzE7YYkj.js → chunk.RI-cVyH7.js} +1 -1
  32. package/assets/devtools/{chunk.rJToME5k.js → chunk.humlEV7p.js} +1 -1
  33. package/assets/devtools/{chunk.C49FcqzR.js → chunk.iXAb6asG.js} +1 -1
  34. package/assets/devtools/{chunk.rohGhT-A.js → chunk.qynByvMI.js} +1 -1
  35. package/assets/devtools/entry.Bkwg306k.js +75 -0
  36. package/assets/devtools/index.html +1 -1
  37. package/dist/index.d.ts +31 -28
  38. package/package.json +6 -6
  39. package/assets/devtools/entry.BY4L2Uc6.js +0 -75
@@ -1 +1 @@
1
- import{r,bv as E,f as F,b as W,q as L,s as B,ay as M,j as I,B as $,i as oe,bw as j,a0 as ae,$ as ie,ai as ue,aI as le,t as ce,v as de,a1 as fe}from"./entry.BY4L2Uc6.js";import{g as me}from"./chunk.uyVen0u2.js";function ve(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:o}=n;if(o!==Object.keys(e).length)return!1;for(let a=0;a<o;a+=1){const i=n[a];if(!(i in e)||t[i]!==e[i]&&!(Number.isNaN(t[i])&&Number.isNaN(e[i])))return!1}return!0}function he(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!ve(t[n],e[n]))return!1;return!0}function be(t){const e=r.useRef([]),n=r.useRef(0);return he(e.current,t)||(e.current=t,n.current+=1),[n.current]}function ge(t,e){r.useEffect(t,be(e))}function pe(t,e,n={autoInvoke:!1}){const o=r.useRef(null),a=r.useCallback((...m)=>{o.current||(o.current=window.setTimeout(()=>{t(m),o.current=null},e))},[e]),i=r.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return r.useEffect(()=>(n.autoInvoke&&a(),i),[i,a]),{start:a,clear:i}}function ye(t,e,n){const o=r.useRef(null),a=r.useRef(null);return r.useEffect(()=>{const i=typeof n=="function"?n():n;return(i||a.current)&&(o.current=new MutationObserver(t),o.current.observe(i||a.current,e)),()=>{o.current?.disconnect()}},[t,e]),a}function Re(){const[t,e]=r.useState(!1);return r.useEffect(()=>e(!0),[]),t}function we(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function Se({target:t,parent:e,ref:n,displayAfterTransitionEnd:o}){const a=r.useRef(-1),[i,m]=r.useState(!1),[w,S]=r.useState(typeof o=="boolean"?o:!1),l=()=>{if(!t||!e||!n.current)return;const u=t.getBoundingClientRect(),c=e.getBoundingClientRect(),f=window.getComputedStyle(t),h=window.getComputedStyle(e),p=E(f.borderTopWidth)+E(h.borderTopWidth),y=E(f.borderLeftWidth)+E(h.borderLeftWidth),b={top:u.top-c.top-p,left:u.left-c.left-y,width:u.width,height:u.height};n.current.style.transform=`translateY(${b.top}px) translateX(${b.left}px)`,n.current.style.width=`${b.width}px`,n.current.style.height=`${b.height}px`},d=()=>{window.clearTimeout(a.current),n.current&&(n.current.style.transitionDuration="0ms"),l(),a.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},g=r.useRef(null),v=r.useRef(null);return r.useEffect(()=>{if(l(),t)return g.current=new ResizeObserver(d),g.current.observe(t),e&&(v.current=new ResizeObserver(d),v.current.observe(e)),()=>{g.current?.disconnect(),v.current?.disconnect()}},[e,t]),r.useEffect(()=>{if(e){const u=c=>{we(c.target,e)&&(d(),S(!1))};return e.addEventListener("transitionend",u),()=>{e.removeEventListener("transitionend",u)}}},[e]),pe(()=>{me()!=="test"&&m(!0)},20,{autoInvoke:!0}),ye(u=>{u.forEach(c=>{c.type==="attributes"&&c.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:w}}var P={root:"m_96b553a6"};const Ce=B((t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}})),_=F((t,e)=>{const n=W("FloatingIndicator",null,t),{classNames:o,className:a,style:i,styles:m,unstyled:w,vars:S,target:l,parent:d,transitionDuration:g,mod:v,displayAfterTransitionEnd:u,attributes:c,...f}=n,h=L({name:"FloatingIndicator",classes:P,props:n,className:a,style:i,classNames:o,styles:m,unstyled:w,attributes:c,vars:S,varsResolver:Ce}),p=r.useRef(null),{initialized:y,hidden:b}=Se({target:l,parent:d,ref:p,displayAfterTransitionEnd:u}),N=M(e,p);return!l||!d?null:I.jsx($,{ref:N,mod:[{initialized:y,hidden:b},v],...h("root"),...f})});_.displayName="@mantine/core/FloatingIndicator";_.classes=P;var A={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const Ne={withItemsBorders:!0},Ee=B((t,{radius:e,color:n,transitionDuration:o,size:a,transitionTimingFunction:i})=>({root:{"--sc-radius":e===void 0?void 0:fe(e),"--sc-color":n?de(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":o===void 0?void 0:`${o}ms`,"--sc-transition-timing-function":i,"--sc-padding":ce(a,"sc-padding"),"--sc-font-size":le(a)}})),q=F((t,e)=>{const n=W("SegmentedControl",Ne,t),{classNames:o,className:a,style:i,styles:m,unstyled:w,vars:S,data:l,value:d,defaultValue:g,onChange:v,size:u,name:c,disabled:f,readOnly:h,fullWidth:p,orientation:y,radius:b,color:N,transitionDuration:Ie,transitionTimingFunction:$e,variant:D,autoContrast:H,withItemsBorders:K,mod:U,attributes:X,...Y}=n,R=L({name:"SegmentedControl",props:n,classes:A,className:a,style:i,classNames:o,styles:m,unstyled:w,attributes:X,vars:S,varsResolver:Ee}),z=oe(),O=l.map(s=>typeof s=="string"?{label:s,value:s}:s),G=Re(),[J,Q]=r.useState(j()),[Z,V]=r.useState(null),[x,ee]=r.useState({}),te=(s,T)=>{x[T]=s,ee(x)},[C,ne]=ae({value:d,defaultValue:g,finalValue:Array.isArray(l)?O.find(s=>!s.disabled)?.value??l[0]?.value??null:null,onChange:v}),k=ie(c),se=O.map(s=>r.createElement($,{...R("control"),mod:{active:C===s.value,orientation:y},key:s.value},r.createElement("input",{...R("input"),disabled:f||s.disabled,type:"radio",name:k,value:s.value,id:`${k}-${s.value}`,checked:C===s.value,onChange:()=>!h&&ne(s.value),"data-focus-ring":z.focusRing,key:`${s.value}-input`}),r.createElement($,{component:"label",...R("label"),mod:{active:C===s.value&&!(f||s.disabled),disabled:f||s.disabled,"read-only":h},htmlFor:`${k}-${s.value}`,ref:T=>te(T,s.value),__vars:{"--sc-label-color":N!==void 0?ue({color:N,theme:z,autoContrast:H}):void 0},key:`${s.value}-label`},I.jsx("span",{...R("innerLabel"),children:s.label})))),re=M(e,s=>V(s));return ge(()=>{Q(j())},[l.length]),l.length===0?null:I.jsxs($,{...R("root"),variant:D,size:u,ref:re,mod:[{"full-width":p,orientation:y,initialized:G,"with-items-borders":K},U],...Y,role:"radiogroup","data-disabled":f,children:[typeof C=="string"&&I.jsx(_,{target:x[C],parent:Z,component:"span",transitionDuration:"var(--sc-transition-duration)",...R("indicator")},J),se]})});q.classes=A;q.displayName="@mantine/core/SegmentedControl";export{q as S};
1
+ import{r,bv as E,f as F,b as W,q as L,s as B,ay as M,j as I,B as $,i as oe,bw as j,a0 as ae,$ as ie,ai as ue,aI as le,t as ce,v as de,a1 as fe}from"./entry.Bkwg306k.js";import{g as me}from"./chunk.uyVen0u2.js";function ve(t,e){if(t===e||Number.isNaN(t)&&Number.isNaN(e))return!0;if(!(t instanceof Object)||!(e instanceof Object))return!1;const n=Object.keys(t),{length:o}=n;if(o!==Object.keys(e).length)return!1;for(let a=0;a<o;a+=1){const i=n[a];if(!(i in e)||t[i]!==e[i]&&!(Number.isNaN(t[i])&&Number.isNaN(e[i])))return!1}return!0}function he(t,e){if(!t||!e)return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(let n=0;n<t.length;n+=1)if(!ve(t[n],e[n]))return!1;return!0}function be(t){const e=r.useRef([]),n=r.useRef(0);return he(e.current,t)||(e.current=t,n.current+=1),[n.current]}function ge(t,e){r.useEffect(t,be(e))}function pe(t,e,n={autoInvoke:!1}){const o=r.useRef(null),a=r.useCallback((...m)=>{o.current||(o.current=window.setTimeout(()=>{t(m),o.current=null},e))},[e]),i=r.useCallback(()=>{o.current&&(window.clearTimeout(o.current),o.current=null)},[]);return r.useEffect(()=>(n.autoInvoke&&a(),i),[i,a]),{start:a,clear:i}}function ye(t,e,n){const o=r.useRef(null),a=r.useRef(null);return r.useEffect(()=>{const i=typeof n=="function"?n():n;return(i||a.current)&&(o.current=new MutationObserver(t),o.current.observe(i||a.current,e)),()=>{o.current?.disconnect()}},[t,e]),a}function Re(){const[t,e]=r.useState(!1);return r.useEffect(()=>e(!0),[]),t}function we(t,e){if(!e||!t)return!1;let n=e.parentNode;for(;n!=null;){if(n===t)return!0;n=n.parentNode}return!1}function Se({target:t,parent:e,ref:n,displayAfterTransitionEnd:o}){const a=r.useRef(-1),[i,m]=r.useState(!1),[w,S]=r.useState(typeof o=="boolean"?o:!1),l=()=>{if(!t||!e||!n.current)return;const u=t.getBoundingClientRect(),c=e.getBoundingClientRect(),f=window.getComputedStyle(t),h=window.getComputedStyle(e),p=E(f.borderTopWidth)+E(h.borderTopWidth),y=E(f.borderLeftWidth)+E(h.borderLeftWidth),b={top:u.top-c.top-p,left:u.left-c.left-y,width:u.width,height:u.height};n.current.style.transform=`translateY(${b.top}px) translateX(${b.left}px)`,n.current.style.width=`${b.width}px`,n.current.style.height=`${b.height}px`},d=()=>{window.clearTimeout(a.current),n.current&&(n.current.style.transitionDuration="0ms"),l(),a.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration="")},30)},g=r.useRef(null),v=r.useRef(null);return r.useEffect(()=>{if(l(),t)return g.current=new ResizeObserver(d),g.current.observe(t),e&&(v.current=new ResizeObserver(d),v.current.observe(e)),()=>{g.current?.disconnect(),v.current?.disconnect()}},[e,t]),r.useEffect(()=>{if(e){const u=c=>{we(c.target,e)&&(d(),S(!1))};return e.addEventListener("transitionend",u),()=>{e.removeEventListener("transitionend",u)}}},[e]),pe(()=>{me()!=="test"&&m(!0)},20,{autoInvoke:!0}),ye(u=>{u.forEach(c=>{c.type==="attributes"&&c.attributeName==="dir"&&d()})},{attributes:!0,attributeFilter:["dir"]},()=>document.documentElement),{initialized:i,hidden:w}}var P={root:"m_96b553a6"};const Ce=B((t,{transitionDuration:e})=>({root:{"--transition-duration":typeof e=="number"?`${e}ms`:e}})),_=F((t,e)=>{const n=W("FloatingIndicator",null,t),{classNames:o,className:a,style:i,styles:m,unstyled:w,vars:S,target:l,parent:d,transitionDuration:g,mod:v,displayAfterTransitionEnd:u,attributes:c,...f}=n,h=L({name:"FloatingIndicator",classes:P,props:n,className:a,style:i,classNames:o,styles:m,unstyled:w,attributes:c,vars:S,varsResolver:Ce}),p=r.useRef(null),{initialized:y,hidden:b}=Se({target:l,parent:d,ref:p,displayAfterTransitionEnd:u}),N=M(e,p);return!l||!d?null:I.jsx($,{ref:N,mod:[{initialized:y,hidden:b},v],...h("root"),...f})});_.displayName="@mantine/core/FloatingIndicator";_.classes=P;var A={root:"m_cf365364",indicator:"m_9e182ccd",label:"m_1738fcb2",input:"m_1714d588",control:"m_69686b9b",innerLabel:"m_78882f40"};const Ne={withItemsBorders:!0},Ee=B((t,{radius:e,color:n,transitionDuration:o,size:a,transitionTimingFunction:i})=>({root:{"--sc-radius":e===void 0?void 0:fe(e),"--sc-color":n?de(n,t):void 0,"--sc-shadow":n?void 0:"var(--mantine-shadow-xs)","--sc-transition-duration":o===void 0?void 0:`${o}ms`,"--sc-transition-timing-function":i,"--sc-padding":ce(a,"sc-padding"),"--sc-font-size":le(a)}})),q=F((t,e)=>{const n=W("SegmentedControl",Ne,t),{classNames:o,className:a,style:i,styles:m,unstyled:w,vars:S,data:l,value:d,defaultValue:g,onChange:v,size:u,name:c,disabled:f,readOnly:h,fullWidth:p,orientation:y,radius:b,color:N,transitionDuration:Ie,transitionTimingFunction:$e,variant:D,autoContrast:H,withItemsBorders:K,mod:U,attributes:X,...Y}=n,R=L({name:"SegmentedControl",props:n,classes:A,className:a,style:i,classNames:o,styles:m,unstyled:w,attributes:X,vars:S,varsResolver:Ee}),z=oe(),O=l.map(s=>typeof s=="string"?{label:s,value:s}:s),G=Re(),[J,Q]=r.useState(j()),[Z,V]=r.useState(null),[x,ee]=r.useState({}),te=(s,T)=>{x[T]=s,ee(x)},[C,ne]=ae({value:d,defaultValue:g,finalValue:Array.isArray(l)?O.find(s=>!s.disabled)?.value??l[0]?.value??null:null,onChange:v}),k=ie(c),se=O.map(s=>r.createElement($,{...R("control"),mod:{active:C===s.value,orientation:y},key:s.value},r.createElement("input",{...R("input"),disabled:f||s.disabled,type:"radio",name:k,value:s.value,id:`${k}-${s.value}`,checked:C===s.value,onChange:()=>!h&&ne(s.value),"data-focus-ring":z.focusRing,key:`${s.value}-input`}),r.createElement($,{component:"label",...R("label"),mod:{active:C===s.value&&!(f||s.disabled),disabled:f||s.disabled,"read-only":h},htmlFor:`${k}-${s.value}`,ref:T=>te(T,s.value),__vars:{"--sc-label-color":N!==void 0?ue({color:N,theme:z,autoContrast:H}):void 0},key:`${s.value}-label`},I.jsx("span",{...R("innerLabel"),children:s.label})))),re=M(e,s=>V(s));return ge(()=>{Q(j())},[l.length]),l.length===0?null:I.jsxs($,{...R("root"),variant:D,size:u,ref:re,mod:[{"full-width":p,orientation:y,initialized:G,"with-items-borders":K},U],...Y,role:"radiogroup","data-disabled":f,children:[typeof C=="string"&&I.jsx(_,{target:x[C],parent:Z,component:"span",transitionDuration:"var(--sc-transition-duration)",...R("indicator")},J),se]})});q.classes=A;q.displayName="@mantine/core/SegmentedControl";export{q as S};
@@ -1 +1 @@
1
- import{w as a}from"./entry.BY4L2Uc6.js";const e=[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]],o=a("outline","key","Key",e);export{o as I};
1
+ import{w as a}from"./entry.Bkwg306k.js";const e=[["path",{d:"M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0z",key:"svg-0"}],["path",{d:"M15 9h.01",key:"svg-1"}]],o=a("outline","key","Key",e);export{o as I};
@@ -1 +1 @@
1
- import{aD as h,g as d,j as i,I as q,i as w,k as p,b9 as v,f as C,b as P,q as V,aE as E,B}from"./entry.BY4L2Uc6.js";import{a as F}from"./chunk.17gtbQUO.js";function f(s){return typeof s=="object"&&s!==null?"base"in s?s.base:void 0:s}function I({spacing:s,verticalSpacing:o,cols:t,selector:m}){const a=w(),l=o===void 0?s:o,c=h({"--sg-spacing-x":d(f(s)),"--sg-spacing-y":d(f(l)),"--sg-cols":f(t)?.toString()}),u=p(a.breakpoints).reduce((e,n)=>(e[n]||(e[n]={}),typeof s=="object"&&s[n]!==void 0&&(e[n]["--sg-spacing-x"]=d(s[n])),typeof l=="object"&&l[n]!==void 0&&(e[n]["--sg-spacing-y"]=d(l[n])),typeof t=="object"&&t[n]!==void 0&&(e[n]["--sg-cols"]=t[n]),e),{}),r=F(p(u),a.breakpoints).filter(e=>p(u[e.value]).length>0).map(e=>({query:`(min-width: ${a.breakpoints[e.value]})`,styles:u[e.value]}));return i.jsx(q,{styles:c,media:r,selector:m})}function x(s){return typeof s=="object"&&s!==null?p(s):[]}function M(s){return s.sort((o,t)=>v(o)-v(t))}function R({spacing:s,verticalSpacing:o,cols:t}){const m=Array.from(new Set([...x(s),...x(o),...x(t)]));return M(m)}function A({spacing:s,verticalSpacing:o,cols:t,selector:m}){const a=o===void 0?s:o,l=h({"--sg-spacing-x":d(f(s)),"--sg-spacing-y":d(f(a)),"--sg-cols":f(t)?.toString()}),c=R({spacing:s,verticalSpacing:o,cols:t}),u=c.reduce((r,e)=>(r[e]||(r[e]={}),typeof s=="object"&&s[e]!==void 0&&(r[e]["--sg-spacing-x"]=d(s[e])),typeof a=="object"&&a[e]!==void 0&&(r[e]["--sg-spacing-y"]=d(a[e])),typeof t=="object"&&t[e]!==void 0&&(r[e]["--sg-cols"]=t[e]),r),{}),y=c.map(r=>({query:`simple-grid (min-width: ${r})`,styles:u[r]}));return i.jsx(q,{styles:l,container:y,selector:m})}var N={container:"m_925c2d2c",root:"m_2415a157"};const D={cols:1,spacing:"md",type:"media"},G=C((s,o)=>{const t=P("SimpleGrid",D,s),{classNames:m,className:a,style:l,styles:c,unstyled:u,vars:y,cols:r,verticalSpacing:e,spacing:n,type:_,attributes:$,...S}=t,j=V({name:"SimpleGrid",classes:N,props:t,className:a,style:l,classNames:m,styles:c,unstyled:u,attributes:$,vars:y}),g=E();return _==="container"?i.jsxs(i.Fragment,{children:[i.jsx(A,{...t,selector:`.${g}`}),i.jsx("div",{...j("container"),children:i.jsx(B,{ref:o,...j("root",{className:g}),...S})})]}):i.jsxs(i.Fragment,{children:[i.jsx(I,{...t,selector:`.${g}`}),i.jsx(B,{ref:o,...j("root",{className:g}),...S})]})});G.classes=N;G.displayName="@mantine/core/SimpleGrid";export{G as S,f as g};
1
+ import{aD as h,g as d,j as i,I as q,i as w,k as p,b9 as v,f as C,b as P,q as V,aE as E,B}from"./entry.Bkwg306k.js";import{a as F}from"./chunk.69EpOqBb.js";function f(s){return typeof s=="object"&&s!==null?"base"in s?s.base:void 0:s}function I({spacing:s,verticalSpacing:o,cols:t,selector:m}){const a=w(),l=o===void 0?s:o,c=h({"--sg-spacing-x":d(f(s)),"--sg-spacing-y":d(f(l)),"--sg-cols":f(t)?.toString()}),u=p(a.breakpoints).reduce((e,n)=>(e[n]||(e[n]={}),typeof s=="object"&&s[n]!==void 0&&(e[n]["--sg-spacing-x"]=d(s[n])),typeof l=="object"&&l[n]!==void 0&&(e[n]["--sg-spacing-y"]=d(l[n])),typeof t=="object"&&t[n]!==void 0&&(e[n]["--sg-cols"]=t[n]),e),{}),r=F(p(u),a.breakpoints).filter(e=>p(u[e.value]).length>0).map(e=>({query:`(min-width: ${a.breakpoints[e.value]})`,styles:u[e.value]}));return i.jsx(q,{styles:c,media:r,selector:m})}function x(s){return typeof s=="object"&&s!==null?p(s):[]}function M(s){return s.sort((o,t)=>v(o)-v(t))}function R({spacing:s,verticalSpacing:o,cols:t}){const m=Array.from(new Set([...x(s),...x(o),...x(t)]));return M(m)}function A({spacing:s,verticalSpacing:o,cols:t,selector:m}){const a=o===void 0?s:o,l=h({"--sg-spacing-x":d(f(s)),"--sg-spacing-y":d(f(a)),"--sg-cols":f(t)?.toString()}),c=R({spacing:s,verticalSpacing:o,cols:t}),u=c.reduce((r,e)=>(r[e]||(r[e]={}),typeof s=="object"&&s[e]!==void 0&&(r[e]["--sg-spacing-x"]=d(s[e])),typeof a=="object"&&a[e]!==void 0&&(r[e]["--sg-spacing-y"]=d(a[e])),typeof t=="object"&&t[e]!==void 0&&(r[e]["--sg-cols"]=t[e]),r),{}),y=c.map(r=>({query:`simple-grid (min-width: ${r})`,styles:u[r]}));return i.jsx(q,{styles:l,container:y,selector:m})}var N={container:"m_925c2d2c",root:"m_2415a157"};const D={cols:1,spacing:"md",type:"media"},G=C((s,o)=>{const t=P("SimpleGrid",D,s),{classNames:m,className:a,style:l,styles:c,unstyled:u,vars:y,cols:r,verticalSpacing:e,spacing:n,type:_,attributes:$,...S}=t,j=V({name:"SimpleGrid",classes:N,props:t,className:a,style:l,classNames:m,styles:c,unstyled:u,attributes:$,vars:y}),g=E();return _==="container"?i.jsxs(i.Fragment,{children:[i.jsx(A,{...t,selector:`.${g}`}),i.jsx("div",{...j("container"),children:i.jsx(B,{ref:o,...j("root",{className:g}),...S})})]}):i.jsxs(i.Fragment,{children:[i.jsx(I,{...t,selector:`.${g}`}),i.jsx(B,{ref:o,...j("root",{className:g}),...S})]})});G.classes=N;G.displayName="@mantine/core/SimpleGrid";export{G as S,f as g};
@@ -1 +1 @@
1
- import{c as M,f as w,b as B,j as a,B as N,q as P,s as $,ac as Q,e as C,v as x,g as O}from"./entry.BY4L2Uc6.js";const[X,Y]=M("Table component was not found in the tree");var f={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Z(e,r){if(!r)return;const t={};return r.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),r.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),r.striped&&e.striped&&(t["data-striped"]=e.striped),r.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),r.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),r.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function b(e,r){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,o=w((l,i)=>{const n=B(t,{},l),{classNames:c,className:d,style:m,styles:u,...h}=n,p=Y();return a.jsx(N,{component:e,ref:i,...Z(p,r),...p.getStyles(e,{className:d,classNames:c,style:m,styles:u,props:n}),...h})});return o.displayName=`@mantine/core/${t}`,o.classes=f,o}const j=b("th",{columnBorder:!0}),A=b("td",{columnBorder:!0}),v=b("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),D=b("thead",{stickyHeader:!0}),z=b("tbody"),E=b("tfoot"),I=b("caption",{captionSide:!0});function R({data:e}){return a.jsxs(a.Fragment,{children:[e.caption&&a.jsx(I,{children:e.caption}),e.head&&a.jsx(D,{children:a.jsx(v,{children:e.head.map((r,t)=>a.jsx(j,{children:r},t))})}),e.body&&a.jsx(z,{children:e.body.map((r,t)=>a.jsx(v,{children:r.map((o,l)=>a.jsx(A,{children:o},l))},t))}),e.foot&&a.jsx(E,{children:a.jsx(v,{children:e.foot.map((r,t)=>a.jsx(j,{children:r},t))})})]})}R.displayName="@mantine/core/TableDataRenderer";const ee={type:"scrollarea"},te=$((e,{minWidth:r,maxHeight:t,type:o})=>({scrollContainer:{"--table-min-width":C(r),"--table-max-height":C(t),"--table-overflow":o==="native"?"auto":void 0}})),H=w((e,r)=>{const t=B("TableScrollContainer",ee,e),{classNames:o,className:l,style:i,styles:n,unstyled:c,vars:d,children:m,minWidth:u,maxHeight:h,type:p,scrollAreaProps:g,attributes:T,...S}=t,y=P({name:"TableScrollContainer",classes:f,props:t,className:l,style:i,classNames:o,styles:n,unstyled:c,attributes:T,vars:d,varsResolver:te,rootSelector:"scrollContainer"});return a.jsx(N,{component:p==="scrollarea"?Q:"div",...p==="scrollarea"?h?{offsetScrollbars:"xy",...g}:{offsetScrollbars:"x",...g}:{},ref:r,...y("scrollContainer"),...S,children:a.jsx("div",{...y("scrollContainerInner"),children:m})})});H.classes=f;H.displayName="@mantine/core/TableScrollContainer";const re={withRowBorders:!0,verticalSpacing:7},ae=$((e,{layout:r,captionSide:t,horizontalSpacing:o,verticalSpacing:l,borderColor:i,stripedColor:n,highlightOnHoverColor:c,striped:d,highlightOnHover:m,stickyHeaderOffset:u,stickyHeader:h})=>({table:{"--table-layout":r,"--table-caption-side":t,"--table-horizontal-spacing":O(o),"--table-vertical-spacing":O(l),"--table-border-color":i?x(i,e):void 0,"--table-striped-color":d&&n?x(n,e):void 0,"--table-highlight-on-hover-color":m&&c?x(c,e):void 0,"--table-sticky-header-offset":h?C(u):void 0}})),s=w((e,r)=>{const t=B("Table",re,e),{classNames:o,className:l,style:i,styles:n,unstyled:c,vars:d,horizontalSpacing:m,verticalSpacing:u,captionSide:h,stripedColor:p,highlightOnHoverColor:g,striped:T,highlightOnHover:S,withColumnBorders:y,withRowBorders:q,withTableBorder:F,borderColor:oe,layout:se,variant:U,data:_,children:V,stickyHeader:W,stickyHeaderOffset:le,mod:G,tabularNums:J,attributes:K,...L}=t,k=P({name:"Table",props:t,className:l,style:i,classes:f,classNames:o,styles:n,unstyled:c,attributes:K,rootSelector:"table",vars:d,varsResolver:ae});return a.jsx(X,{value:{getStyles:k,stickyHeader:W,striped:T===!0?"odd":T||void 0,highlightOnHover:S,withColumnBorders:y,withRowBorders:q,captionSide:h||"bottom"},children:a.jsx(N,{component:"table",variant:U,ref:r,mod:[{"data-with-table-border":F,"data-tabular-nums":J},G],...k("table"),...L,children:V||!!_&&a.jsx(R,{data:_})})})});s.classes=f;s.displayName="@mantine/core/Table";s.Td=A;s.Th=j;s.Tr=v;s.Thead=D;s.Tbody=z;s.Tfoot=E;s.Caption=I;s.ScrollContainer=H;s.DataRenderer=R;export{s as T};
1
+ import{c as M,f as w,b as B,j as a,B as N,q as P,s as $,ac as Q,e as C,v as x,g as O}from"./entry.Bkwg306k.js";const[X,Y]=M("Table component was not found in the tree");var f={table:"m_b23fa0ef",th:"m_4e7aa4f3",tr:"m_4e7aa4fd",td:"m_4e7aa4ef",tbody:"m_b2404537",thead:"m_b242d975",caption:"m_9e5a3ac7",scrollContainer:"m_a100c15",scrollContainerInner:"m_62259741"};function Z(e,r){if(!r)return;const t={};return r.columnBorder&&e.withColumnBorders&&(t["data-with-column-border"]=!0),r.rowBorder&&e.withRowBorders&&(t["data-with-row-border"]=!0),r.striped&&e.striped&&(t["data-striped"]=e.striped),r.highlightOnHover&&e.highlightOnHover&&(t["data-hover"]=!0),r.captionSide&&e.captionSide&&(t["data-side"]=e.captionSide),r.stickyHeader&&e.stickyHeader&&(t["data-sticky"]=!0),t}function b(e,r){const t=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,o=w((l,i)=>{const n=B(t,{},l),{classNames:c,className:d,style:m,styles:u,...h}=n,p=Y();return a.jsx(N,{component:e,ref:i,...Z(p,r),...p.getStyles(e,{className:d,classNames:c,style:m,styles:u,props:n}),...h})});return o.displayName=`@mantine/core/${t}`,o.classes=f,o}const j=b("th",{columnBorder:!0}),A=b("td",{columnBorder:!0}),v=b("tr",{rowBorder:!0,striped:!0,highlightOnHover:!0}),D=b("thead",{stickyHeader:!0}),z=b("tbody"),E=b("tfoot"),I=b("caption",{captionSide:!0});function R({data:e}){return a.jsxs(a.Fragment,{children:[e.caption&&a.jsx(I,{children:e.caption}),e.head&&a.jsx(D,{children:a.jsx(v,{children:e.head.map((r,t)=>a.jsx(j,{children:r},t))})}),e.body&&a.jsx(z,{children:e.body.map((r,t)=>a.jsx(v,{children:r.map((o,l)=>a.jsx(A,{children:o},l))},t))}),e.foot&&a.jsx(E,{children:a.jsx(v,{children:e.foot.map((r,t)=>a.jsx(j,{children:r},t))})})]})}R.displayName="@mantine/core/TableDataRenderer";const ee={type:"scrollarea"},te=$((e,{minWidth:r,maxHeight:t,type:o})=>({scrollContainer:{"--table-min-width":C(r),"--table-max-height":C(t),"--table-overflow":o==="native"?"auto":void 0}})),H=w((e,r)=>{const t=B("TableScrollContainer",ee,e),{classNames:o,className:l,style:i,styles:n,unstyled:c,vars:d,children:m,minWidth:u,maxHeight:h,type:p,scrollAreaProps:g,attributes:T,...S}=t,y=P({name:"TableScrollContainer",classes:f,props:t,className:l,style:i,classNames:o,styles:n,unstyled:c,attributes:T,vars:d,varsResolver:te,rootSelector:"scrollContainer"});return a.jsx(N,{component:p==="scrollarea"?Q:"div",...p==="scrollarea"?h?{offsetScrollbars:"xy",...g}:{offsetScrollbars:"x",...g}:{},ref:r,...y("scrollContainer"),...S,children:a.jsx("div",{...y("scrollContainerInner"),children:m})})});H.classes=f;H.displayName="@mantine/core/TableScrollContainer";const re={withRowBorders:!0,verticalSpacing:7},ae=$((e,{layout:r,captionSide:t,horizontalSpacing:o,verticalSpacing:l,borderColor:i,stripedColor:n,highlightOnHoverColor:c,striped:d,highlightOnHover:m,stickyHeaderOffset:u,stickyHeader:h})=>({table:{"--table-layout":r,"--table-caption-side":t,"--table-horizontal-spacing":O(o),"--table-vertical-spacing":O(l),"--table-border-color":i?x(i,e):void 0,"--table-striped-color":d&&n?x(n,e):void 0,"--table-highlight-on-hover-color":m&&c?x(c,e):void 0,"--table-sticky-header-offset":h?C(u):void 0}})),s=w((e,r)=>{const t=B("Table",re,e),{classNames:o,className:l,style:i,styles:n,unstyled:c,vars:d,horizontalSpacing:m,verticalSpacing:u,captionSide:h,stripedColor:p,highlightOnHoverColor:g,striped:T,highlightOnHover:S,withColumnBorders:y,withRowBorders:q,withTableBorder:F,borderColor:oe,layout:se,variant:U,data:_,children:V,stickyHeader:W,stickyHeaderOffset:le,mod:G,tabularNums:J,attributes:K,...L}=t,k=P({name:"Table",props:t,className:l,style:i,classes:f,classNames:o,styles:n,unstyled:c,attributes:K,rootSelector:"table",vars:d,varsResolver:ae});return a.jsx(X,{value:{getStyles:k,stickyHeader:W,striped:T===!0?"odd":T||void 0,highlightOnHover:S,withColumnBorders:y,withRowBorders:q,captionSide:h||"bottom"},children:a.jsx(N,{component:"table",variant:U,ref:r,mod:[{"data-with-table-border":F,"data-tabular-nums":J},G],...k("table"),...L,children:V||!!_&&a.jsx(R,{data:_})})})});s.classes=f;s.displayName="@mantine/core/Table";s.Td=A;s.Th=j;s.Tr=v;s.Thead=D;s.Tbody=z;s.Tfoot=E;s.Caption=I;s.ScrollContainer=H;s.DataRenderer=R;export{s as T};
@@ -1 +1 @@
1
- import{r as c,an as y,ba as I,bb as j,f as B,b as N,j as P,a3 as W}from"./entry.BY4L2Uc6.js";import{g as M}from"./chunk.uyVen0u2.js";var $=c.useLayoutEffect,G=function(e){var r=y.useRef(e);return $(function(){r.current=e}),r},E=function(e,r){if(typeof e=="function"){e(r);return}e.current=r},O=function(e,r){var t=y.useRef();return y.useCallback(function(i){e.current=i,t.current&&E(t.current,null),t.current=r,r&&E(r,i)},[r])},H={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Y=function(e){Object.keys(H).forEach(function(r){e.style.setProperty(r,H[r],"important")})},T=Y,o=null,C=function(e,r){var t=e.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?t+r.borderSize:t-r.paddingSize};function q(n,e,r,t){r===void 0&&(r=1),t===void 0&&(t=1/0),o||(o=document.createElement("textarea"),o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),T(o)),o.parentNode===null&&document.body.appendChild(o);var i=n.paddingSize,d=n.borderSize,a=n.sizingStyle,h=a.boxSizing;Object.keys(a).forEach(function(l){var m=l;o.style[m]=a[m]}),T(o),o.value=e;var s=C(o,n);o.value=e,s=C(o,n),o.value="x";var f=o.scrollHeight-i,g=f*r;h==="border-box"&&(g=g+i+d),s=Math.max(g,s);var v=f*t;return h==="border-box"&&(v=v+i+d),s=Math.min(v,s),[s,f]}var F=function(){},U=function(e,r){return e.reduce(function(t,i){return t[i]=r[i],t},{})},X=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Z=!!document.documentElement.currentStyle,D=function(e){var r=window.getComputedStyle(e);if(r===null)return null;var t=U(X,r),i=t.boxSizing;if(i==="")return null;Z&&i==="border-box"&&(t.width=parseFloat(t.width)+parseFloat(t.borderRightWidth)+parseFloat(t.borderLeftWidth)+parseFloat(t.paddingRight)+parseFloat(t.paddingLeft)+"px");var d=parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),a=parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth);return{sizingStyle:t,paddingSize:d,borderSize:a}},J=D;function R(n,e,r){var t=G(r);c.useLayoutEffect(function(){var i=function(a){return t.current(a)};if(n)return n.addEventListener(e,i),function(){return n.removeEventListener(e,i)}},[])}var K=function(e,r){R(document.body,"reset",function(t){e.current.form===t.target&&r(t)})},Q=function(e){R(window,"resize",e)},V=function(e){R(document.fonts,"loadingdone",e)},ee=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],te=function(e,r){var t=e.cacheMeasurements,i=e.maxRows,d=e.minRows,a=e.onChange,h=a===void 0?F:a,s=e.onHeightChange,f=s===void 0?F:s,g=I(e,ee),v=g.value!==void 0,l=c.useRef(null),m=O(l,r),L=c.useRef(0),x=c.useRef(),p=function(){var u=l.current,z=t&&x.current?x.current:J(u);if(z){x.current=z;var w=q(z,u.value||u.placeholder||"x",d,i),b=w[0],k=w[1];L.current!==b&&(L.current=b,u.style.setProperty("height",b+"px","important"),f(b,{rowHeight:k}))}},A=function(u){v||p(),h(u)};return c.useLayoutEffect(p),K(l,function(){if(!v){var S=l.current.value;requestAnimationFrame(function(){var u=l.current;u&&S!==u.value&&p()})}}),Q(p),V(p),c.createElement("textarea",j({},g,{onChange:A,ref:m}))},re=c.forwardRef(te);const ne={size:"sm"},_=B((n,e)=>{const{autosize:r,maxRows:t,minRows:i,__staticSelector:d,resize:a,...h}=N("Textarea",ne,n),s=r&&M()!=="test",f=s?{maxRows:t,minRows:i}:{};return P.jsx(W,{component:s?re:"textarea",ref:e,...h,__staticSelector:d||"Textarea",multiline:!0,"data-no-overflow":r&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});_.classes=W.classes;_.displayName="@mantine/core/Textarea";export{_ as T};
1
+ import{r as c,an as y,ba as I,bb as j,f as B,b as N,j as P,a3 as W}from"./entry.Bkwg306k.js";import{g as M}from"./chunk.uyVen0u2.js";var $=c.useLayoutEffect,G=function(e){var r=y.useRef(e);return $(function(){r.current=e}),r},E=function(e,r){if(typeof e=="function"){e(r);return}e.current=r},O=function(e,r){var t=y.useRef();return y.useCallback(function(i){e.current=i,t.current&&E(t.current,null),t.current=r,r&&E(r,i)},[r])},H={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Y=function(e){Object.keys(H).forEach(function(r){e.style.setProperty(r,H[r],"important")})},T=Y,o=null,C=function(e,r){var t=e.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?t+r.borderSize:t-r.paddingSize};function q(n,e,r,t){r===void 0&&(r=1),t===void 0&&(t=1/0),o||(o=document.createElement("textarea"),o.setAttribute("tabindex","-1"),o.setAttribute("aria-hidden","true"),T(o)),o.parentNode===null&&document.body.appendChild(o);var i=n.paddingSize,d=n.borderSize,a=n.sizingStyle,h=a.boxSizing;Object.keys(a).forEach(function(l){var m=l;o.style[m]=a[m]}),T(o),o.value=e;var s=C(o,n);o.value=e,s=C(o,n),o.value="x";var f=o.scrollHeight-i,g=f*r;h==="border-box"&&(g=g+i+d),s=Math.max(g,s);var v=f*t;return h==="border-box"&&(v=v+i+d),s=Math.min(v,s),[s,f]}var F=function(){},U=function(e,r){return e.reduce(function(t,i){return t[i]=r[i],t},{})},X=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Z=!!document.documentElement.currentStyle,D=function(e){var r=window.getComputedStyle(e);if(r===null)return null;var t=U(X,r),i=t.boxSizing;if(i==="")return null;Z&&i==="border-box"&&(t.width=parseFloat(t.width)+parseFloat(t.borderRightWidth)+parseFloat(t.borderLeftWidth)+parseFloat(t.paddingRight)+parseFloat(t.paddingLeft)+"px");var d=parseFloat(t.paddingBottom)+parseFloat(t.paddingTop),a=parseFloat(t.borderBottomWidth)+parseFloat(t.borderTopWidth);return{sizingStyle:t,paddingSize:d,borderSize:a}},J=D;function R(n,e,r){var t=G(r);c.useLayoutEffect(function(){var i=function(a){return t.current(a)};if(n)return n.addEventListener(e,i),function(){return n.removeEventListener(e,i)}},[])}var K=function(e,r){R(document.body,"reset",function(t){e.current.form===t.target&&r(t)})},Q=function(e){R(window,"resize",e)},V=function(e){R(document.fonts,"loadingdone",e)},ee=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],te=function(e,r){var t=e.cacheMeasurements,i=e.maxRows,d=e.minRows,a=e.onChange,h=a===void 0?F:a,s=e.onHeightChange,f=s===void 0?F:s,g=I(e,ee),v=g.value!==void 0,l=c.useRef(null),m=O(l,r),L=c.useRef(0),x=c.useRef(),p=function(){var u=l.current,z=t&&x.current?x.current:J(u);if(z){x.current=z;var w=q(z,u.value||u.placeholder||"x",d,i),b=w[0],k=w[1];L.current!==b&&(L.current=b,u.style.setProperty("height",b+"px","important"),f(b,{rowHeight:k}))}},A=function(u){v||p(),h(u)};return c.useLayoutEffect(p),K(l,function(){if(!v){var S=l.current.value;requestAnimationFrame(function(){var u=l.current;u&&S!==u.value&&p()})}}),Q(p),V(p),c.createElement("textarea",j({},g,{onChange:A,ref:m}))},re=c.forwardRef(te);const ne={size:"sm"},_=B((n,e)=>{const{autosize:r,maxRows:t,minRows:i,__staticSelector:d,resize:a,...h}=N("Textarea",ne,n),s=r&&M()!=="test",f=s?{maxRows:t,minRows:i}:{};return P.jsx(W,{component:s?re:"textarea",ref:e,...h,__staticSelector:d||"Textarea",multiline:!0,"data-no-overflow":r&&t===void 0||void 0,__vars:{"--input-resize":a},...f})});_.classes=W.classes;_.displayName="@mantine/core/Textarea";export{_ as T};
@@ -1 +1 @@
1
- import{w as C,Y as O,Z as R,r as x,j as e,F as m,T as i,B as c,H as j,ae as D,z as B,ac as z,O as S,E as F,G as _,af as w,ad as v,a5 as $,a9 as I}from"./entry.BY4L2Uc6.js";import{d as A}from"./chunk.Cw2RCl4F.js";import{S as f,B as T}from"./chunk.Dry2LXOT.js";import{I as H}from"./chunk.DEUHUxKv.js";import{T as g}from"./chunk.rJToME5k.js";import{I as J}from"./chunk.DIfRZc20.js";import{I as V,a as G}from"./chunk.C49FcqzR.js";import{T as Y}from"./chunk.DHWcJNNS.js";import"./chunk.BlqFPyLh.js";import"./chunk.uyVen0u2.js";const Z=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],q=C("outline","folder-open","FolderOpen",Z);const K=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],Q=C("outline","folder","Folder",K);const U=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],L=C("outline","send","Send",U),M={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},E=s=>M[s]??M.default,W=s=>{const o={name:"",fullPath:"",children:new Map};for(const p of s){const a=p.name.split(/[./]/);let l=o;for(let n=0;n<a.length;n++){const r=a[n],d=a.slice(0,n+1).join("/");l.children.has(r)||l.children.set(r,{name:r,fullPath:d,children:new Map}),l=l.children.get(r)}l.topic=p}return o},N=({node:s,depth:o,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n})=>{const r=s.children.size>0,d=l.has(s.fullPath),b=s.topic&&p?.name===s.topic.name,t=s.topic?E(s.topic.provider):"#495057",u=()=>{s.topic&&a(s.topic),r&&n(s.fullPath)};return e.jsxs(c,{children:[e.jsxs(m,{align:"center",gap:4,px:"sm",py:4,onClick:u,style:{cursor:"pointer",paddingLeft:o*16+8,backgroundColor:b?`${t}15`:void 0,borderLeft:b?`2px solid ${t}`:"2px solid transparent",borderBottom:`1px solid ${j.colors.border}`},children:[r?d?e.jsx(F,{size:12,opacity:.5}):e.jsx(_,{size:12,opacity:.5}):e.jsx(c,{w:12}),r?d?e.jsx(q,{size:14,opacity:.5}):e.jsx(Q,{size:14,opacity:.5}):e.jsx(S,{size:14,opacity:.5}),e.jsx(i,{size:"sm",style:{flex:1},truncate:!0,fw:s.topic?500:400,children:s.name}),s.topic&&e.jsx(T,{size:"xs",variant:"light",color:s.topic.provider==="redis"?"red":"green",children:s.topic.provider})]}),r&&d&&e.jsx(c,{children:Array.from(s.children.values()).sort((h,y)=>{const P=h.children.size>0,k=y.children.size>0;return P&&!k?-1:!P&&k?1:h.name.localeCompare(y.name)}).map(h=>e.jsx(N,{node:h,depth:o+1,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n},h.fullPath))})]})},X=({topics:s,selectedTopic:o,onSelectTopic:p,search:a,onSearchChange:l})=>{const[n,r]=x.useState(new Set),d=x.useMemo(()=>W(s),[s]);x.useEffect(()=>{const t=new Set,u=h=>{h.fullPath&&t.add(h.fullPath);for(const y of h.children.values())u(y)};u(d),r(t)},[d]);const b=x.useCallback(t=>{r(u=>{const h=new Set(u);return h.has(t)?h.delete(t):h.add(t),h})},[]);return e.jsxs(f,{gap:0,h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsx(D,{placeholder:"Search topics...",leftSection:e.jsx(B,{size:14}),size:"xs",value:a,onChange:t=>l(t.target.value)})}),e.jsx(z,{style:{flex:1},children:Array.from(d.children.values()).sort((t,u)=>t.name.localeCompare(u.name)).map(t=>e.jsx(N,{node:t,depth:0,selectedTopic:o,onSelectTopic:p,expandedNodes:n,onToggleExpand:b},t.fullPath))})]})},ee=({topic:s})=>e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"lg",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Topic Info"}),e.jsxs(f,{gap:"xs",children:[e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Name"}),e.jsx(i,{size:"sm",ff:"monospace",children:s.name})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Provider"}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Description"}),e.jsx(i,{size:"sm",children:s.description})]})]})]}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Message Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:5,size:"xs"})})]})]})}),se=({topic:s})=>{const[o,p]=x.useState([]),[a,l]=x.useState(!1),n=x.useCallback(()=>{const r=s.schema?{example:"data",topic:s.name,timestamp:new Date().toISOString()}:{message:`Hello from ${s.name}`};p(d=>[{id:Math.random().toString(36).slice(2),timestamp:new Date,payload:r},...d.slice(0,49)])},[s]);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsxs(m,{gap:"sm",align:"center",justify:"space-between",children:[e.jsxs(m,{gap:"sm",align:"center",children:[e.jsx(v,{label:a?"Stop listening (coming soon)":"Start listening (coming soon)",children:e.jsx($,{size:"xs",variant:"light",color:a?"red":"green",leftSection:e.jsx(J,{size:14}),onClick:()=>l(!a),disabled:!0,children:a?"Stop":"Listen"})}),e.jsxs(i,{size:"xs",c:"dimmed",children:[o.length," messages"]})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(v,{label:"Add fake message (for demo)",children:e.jsx(I,{size:"sm",variant:"light",onClick:n,children:e.jsx(L,{size:14})})}),e.jsx(v,{label:"Clear messages",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:()=>p([]),children:e.jsx(V,{size:14})})})]})]})}),o.length===0?e.jsx(m,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"No messages yet"}),e.jsx(i,{size:"xs",c:"dimmed",children:"Click the send icon to add a fake message for demo"})]})}):e.jsx(z,{style:{flex:1},children:e.jsx(f,{gap:0,children:o.map(r=>e.jsxs(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:[e.jsxs(m,{align:"center",gap:"xs",mb:"xs",children:[e.jsx(G,{size:12,opacity:.5}),e.jsx(i,{size:"xs",c:"dimmed",children:r.timestamp.toLocaleTimeString()})]}),e.jsx(c,{p:"xs",style:{backgroundColor:j.colors.surface,borderRadius:4},children:e.jsx(w,{data:r.payload,maxDepth:3,size:"xs",copyable:!1})})]},r.id))})})]})},re=({topic:s})=>{const[o,p]=x.useState(JSON.stringify({message:"Hello",timestamp:new Date().toISOString()},null,2)),[a,l]=x.useState(null),n=()=>{try{JSON.parse(o),l(null),alert(`Message would be published to "${s.name}" (coming soon)`)}catch{l("Invalid JSON")}};return e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"md",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Publish Message"}),e.jsx(i,{size:"xs",c:"dimmed",mb:"sm",children:"Send a test message to this topic (coming soon)"})]}),e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Payload (JSON)"}),e.jsx(Y,{value:o,onChange:r=>p(r.target.value),minRows:8,maxRows:15,autosize:!0,ff:"monospace",size:"xs",error:a,styles:{input:{backgroundColor:j.colors.surface}}})]}),e.jsx(v,{label:"Publish message (coming soon)",children:e.jsx($,{size:"sm",variant:"light",leftSection:e.jsx(L,{size:16}),onClick:n,disabled:!0,children:"Publish"})}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Expected Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:3,size:"xs"})})]})]})})},ie=({topic:s})=>{const o=E(s.provider);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsxs(c,{px:"md",py:"sm",style:{borderBottom:`1px solid ${j.colors.border}`,backgroundColor:`${o}08`},children:[e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(i,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsx(i,{size:"xs",c:"dimmed",mt:4,children:s.description})]}),e.jsxs(g,{defaultValue:"schema",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(g.List,{px:"md",children:[e.jsx(g.Tab,{value:"schema",children:"Schema"}),e.jsx(g.Tab,{value:"messages",children:"Messages"}),e.jsx(g.Tab,{value:"publish",children:"Publish"})]}),e.jsx(g.Panel,{value:"schema",style:{flex:1,overflow:"hidden"},children:e.jsx(ee,{topic:s})}),e.jsx(g.Panel,{value:"messages",style:{flex:1,overflow:"hidden"},children:e.jsx(se,{topic:s})}),e.jsx(g.Panel,{value:"publish",style:{flex:1,overflow:"hidden"},children:e.jsx(re,{topic:s})})]})]})},oe=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"Select a topic to view details"})]})}),te=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(H,{size:48,opacity:.3}),e.jsx(i,{children:"No topics found"}),e.jsx(i,{size:"sm",c:"dimmed",children:"Add topics using $topic primitive to see them here"})]})}),ue=()=>{const s=O(R),[o,p]=x.useState([]),[a,l]=x.useState(!0),[n,r]=x.useState(null),[d,b]=x.useState("");x.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:A}}).then(u=>{p(u.data.topics),l(!1)})},[]);const t=x.useMemo(()=>{if(!d)return o;const u=d.toLowerCase();return o.filter(h=>h.name.toLowerCase().includes(u))},[o,d]);return a?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(i,{c:"dimmed",children:"Loading..."})}):o.length===0?e.jsx(te,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(c,{w:280,style:{borderRight:`1px solid ${j.colors.border}`,backgroundColor:j.colors.surface},children:e.jsx(X,{topics:t,selectedTopic:n,onSelectTopic:r,search:d,onSearchChange:b})}),e.jsx(c,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(ie,{topic:n}):e.jsx(oe,{})})]})};export{ue as DevTopicsViewer,ue as default};
1
+ import{w as C,Y as O,Z as R,r as x,j as e,F as m,T as i,B as c,H as j,ae as D,z as B,ac as z,O as S,E as F,G as _,af as w,ad as v,a5 as $,a9 as I}from"./entry.Bkwg306k.js";import{d as A}from"./chunk.4uk7i9-q.js";import{S as f,B as T}from"./chunk.DUAYORVN.js";import{I as H}from"./chunk.CUTV1O_R.js";import{T as g}from"./chunk.humlEV7p.js";import{I as J}from"./chunk.DknkYaMA.js";import{I as V,a as G}from"./chunk.iXAb6asG.js";import{T as Y}from"./chunk.BumKuBFW.js";import"./chunk.BlqFPyLh.js";import"./chunk.uyVen0u2.js";const Z=[["path",{d:"M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2",key:"svg-0"}]],q=C("outline","folder-open","FolderOpen",Z);const K=[["path",{d:"M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2",key:"svg-0"}]],Q=C("outline","folder","Folder",K);const U=[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]],L=C("outline","send","Send",U),M={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},E=s=>M[s]??M.default,W=s=>{const o={name:"",fullPath:"",children:new Map};for(const p of s){const a=p.name.split(/[./]/);let l=o;for(let n=0;n<a.length;n++){const r=a[n],d=a.slice(0,n+1).join("/");l.children.has(r)||l.children.set(r,{name:r,fullPath:d,children:new Map}),l=l.children.get(r)}l.topic=p}return o},N=({node:s,depth:o,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n})=>{const r=s.children.size>0,d=l.has(s.fullPath),b=s.topic&&p?.name===s.topic.name,t=s.topic?E(s.topic.provider):"#495057",u=()=>{s.topic&&a(s.topic),r&&n(s.fullPath)};return e.jsxs(c,{children:[e.jsxs(m,{align:"center",gap:4,px:"sm",py:4,onClick:u,style:{cursor:"pointer",paddingLeft:o*16+8,backgroundColor:b?`${t}15`:void 0,borderLeft:b?`2px solid ${t}`:"2px solid transparent",borderBottom:`1px solid ${j.colors.border}`},children:[r?d?e.jsx(F,{size:12,opacity:.5}):e.jsx(_,{size:12,opacity:.5}):e.jsx(c,{w:12}),r?d?e.jsx(q,{size:14,opacity:.5}):e.jsx(Q,{size:14,opacity:.5}):e.jsx(S,{size:14,opacity:.5}),e.jsx(i,{size:"sm",style:{flex:1},truncate:!0,fw:s.topic?500:400,children:s.name}),s.topic&&e.jsx(T,{size:"xs",variant:"light",color:s.topic.provider==="redis"?"red":"green",children:s.topic.provider})]}),r&&d&&e.jsx(c,{children:Array.from(s.children.values()).sort((h,y)=>{const P=h.children.size>0,k=y.children.size>0;return P&&!k?-1:!P&&k?1:h.name.localeCompare(y.name)}).map(h=>e.jsx(N,{node:h,depth:o+1,selectedTopic:p,onSelectTopic:a,expandedNodes:l,onToggleExpand:n},h.fullPath))})]})},X=({topics:s,selectedTopic:o,onSelectTopic:p,search:a,onSearchChange:l})=>{const[n,r]=x.useState(new Set),d=x.useMemo(()=>W(s),[s]);x.useEffect(()=>{const t=new Set,u=h=>{h.fullPath&&t.add(h.fullPath);for(const y of h.children.values())u(y)};u(d),r(t)},[d]);const b=x.useCallback(t=>{r(u=>{const h=new Set(u);return h.has(t)?h.delete(t):h.add(t),h})},[]);return e.jsxs(f,{gap:0,h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsx(D,{placeholder:"Search topics...",leftSection:e.jsx(B,{size:14}),size:"xs",value:a,onChange:t=>l(t.target.value)})}),e.jsx(z,{style:{flex:1},children:Array.from(d.children.values()).sort((t,u)=>t.name.localeCompare(u.name)).map(t=>e.jsx(N,{node:t,depth:0,selectedTopic:o,onSelectTopic:p,expandedNodes:n,onToggleExpand:b},t.fullPath))})]})},ee=({topic:s})=>e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"lg",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Topic Info"}),e.jsxs(f,{gap:"xs",children:[e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Name"}),e.jsx(i,{size:"sm",ff:"monospace",children:s.name})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Provider"}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsxs(m,{gap:"sm",children:[e.jsx(i,{size:"sm",c:"dimmed",w:100,children:"Description"}),e.jsx(i,{size:"sm",children:s.description})]})]})]}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Message Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:5,size:"xs"})})]})]})}),se=({topic:s})=>{const[o,p]=x.useState([]),[a,l]=x.useState(!1),n=x.useCallback(()=>{const r=s.schema?{example:"data",topic:s.name,timestamp:new Date().toISOString()}:{message:`Hello from ${s.name}`};p(d=>[{id:Math.random().toString(36).slice(2),timestamp:new Date,payload:r},...d.slice(0,49)])},[s]);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsx(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:e.jsxs(m,{gap:"sm",align:"center",justify:"space-between",children:[e.jsxs(m,{gap:"sm",align:"center",children:[e.jsx(v,{label:a?"Stop listening (coming soon)":"Start listening (coming soon)",children:e.jsx($,{size:"xs",variant:"light",color:a?"red":"green",leftSection:e.jsx(J,{size:14}),onClick:()=>l(!a),disabled:!0,children:a?"Stop":"Listen"})}),e.jsxs(i,{size:"xs",c:"dimmed",children:[o.length," messages"]})]}),e.jsxs(m,{gap:"sm",children:[e.jsx(v,{label:"Add fake message (for demo)",children:e.jsx(I,{size:"sm",variant:"light",onClick:n,children:e.jsx(L,{size:14})})}),e.jsx(v,{label:"Clear messages",children:e.jsx(I,{size:"sm",variant:"light",color:"gray",onClick:()=>p([]),children:e.jsx(V,{size:14})})})]})]})}),o.length===0?e.jsx(m,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"No messages yet"}),e.jsx(i,{size:"xs",c:"dimmed",children:"Click the send icon to add a fake message for demo"})]})}):e.jsx(z,{style:{flex:1},children:e.jsx(f,{gap:0,children:o.map(r=>e.jsxs(c,{p:"sm",style:{borderBottom:`1px solid ${j.colors.border}`},children:[e.jsxs(m,{align:"center",gap:"xs",mb:"xs",children:[e.jsx(G,{size:12,opacity:.5}),e.jsx(i,{size:"xs",c:"dimmed",children:r.timestamp.toLocaleTimeString()})]}),e.jsx(c,{p:"xs",style:{backgroundColor:j.colors.surface,borderRadius:4},children:e.jsx(w,{data:r.payload,maxDepth:3,size:"xs",copyable:!1})})]},r.id))})})]})},re=({topic:s})=>{const[o,p]=x.useState(JSON.stringify({message:"Hello",timestamp:new Date().toISOString()},null,2)),[a,l]=x.useState(null),n=()=>{try{JSON.parse(o),l(null),alert(`Message would be published to "${s.name}" (coming soon)`)}catch{l("Invalid JSON")}};return e.jsx(z,{h:"100%",p:"md",children:e.jsxs(f,{gap:"md",children:[e.jsxs(c,{children:[e.jsx(i,{size:"sm",fw:600,mb:"xs",children:"Publish Message"}),e.jsx(i,{size:"xs",c:"dimmed",mb:"sm",children:"Send a test message to this topic (coming soon)"})]}),e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Payload (JSON)"}),e.jsx(Y,{value:o,onChange:r=>p(r.target.value),minRows:8,maxRows:15,autosize:!0,ff:"monospace",size:"xs",error:a,styles:{input:{backgroundColor:j.colors.surface}}})]}),e.jsx(v,{label:"Publish message (coming soon)",children:e.jsx($,{size:"sm",variant:"light",leftSection:e.jsx(L,{size:16}),onClick:n,disabled:!0,children:"Publish"})}),s.schema&&e.jsxs(c,{children:[e.jsx(i,{size:"sm",c:"dimmed",mb:"xs",children:"Expected Schema"}),e.jsx(c,{p:"sm",style:{border:`1px solid ${j.colors.border}`,borderRadius:8,backgroundColor:j.colors.surface},children:e.jsx(w,{data:s.schema,maxDepth:3,size:"xs"})})]})]})})},ie=({topic:s})=>{const o=E(s.provider);return e.jsxs(m,{direction:"column",h:"100%",children:[e.jsxs(c,{px:"md",py:"sm",style:{borderBottom:`1px solid ${j.colors.border}`,backgroundColor:`${o}08`},children:[e.jsxs(m,{align:"center",gap:"sm",children:[e.jsx(S,{size:18,opacity:.7}),e.jsx(i,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(T,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})]}),s.description&&e.jsx(i,{size:"xs",c:"dimmed",mt:4,children:s.description})]}),e.jsxs(g,{defaultValue:"schema",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(g.List,{px:"md",children:[e.jsx(g.Tab,{value:"schema",children:"Schema"}),e.jsx(g.Tab,{value:"messages",children:"Messages"}),e.jsx(g.Tab,{value:"publish",children:"Publish"})]}),e.jsx(g.Panel,{value:"schema",style:{flex:1,overflow:"hidden"},children:e.jsx(ee,{topic:s})}),e.jsx(g.Panel,{value:"messages",style:{flex:1,overflow:"hidden"},children:e.jsx(se,{topic:s})}),e.jsx(g.Panel,{value:"publish",style:{flex:1,overflow:"hidden"},children:e.jsx(re,{topic:s})})]})]})},oe=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(S,{size:48,opacity:.3}),e.jsx(i,{size:"sm",children:"Select a topic to view details"})]})}),te=()=>e.jsx(m,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(f,{align:"center",gap:"xs",children:[e.jsx(H,{size:48,opacity:.3}),e.jsx(i,{children:"No topics found"}),e.jsx(i,{size:"sm",c:"dimmed",children:"Add topics using $topic primitive to see them here"})]})}),ue=()=>{const s=O(R),[o,p]=x.useState([]),[a,l]=x.useState(!0),[n,r]=x.useState(null),[d,b]=x.useState("");x.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:A}}).then(u=>{p(u.data.topics),l(!1)})},[]);const t=x.useMemo(()=>{if(!d)return o;const u=d.toLowerCase();return o.filter(h=>h.name.toLowerCase().includes(u))},[o,d]);return a?e.jsx(m,{align:"center",justify:"center",h:"100%",children:e.jsx(i,{c:"dimmed",children:"Loading..."})}):o.length===0?e.jsx(te,{}):e.jsxs(m,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(c,{w:280,style:{borderRight:`1px solid ${j.colors.border}`,backgroundColor:j.colors.surface},children:e.jsx(X,{topics:t,selectedTopic:n,onSelectTopic:r,search:d,onSearchChange:b})}),e.jsx(c,{style:{flex:1,overflow:"hidden"},children:n?e.jsx(ie,{topic:n}):e.jsx(oe,{})})]})};export{ue as DevTopicsViewer,ue as default};