@alepha/devtools 0.13.8 → 0.14.1
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.
- package/README.md +1 -1
- package/assets/devtools/{chunk.DGW-W4Kc.js → chunk.0pKzkQ-k.js} +1 -1
- package/assets/devtools/{chunk.CyQeq1kA.js → chunk.B5eTVHku.js} +1 -1
- package/assets/devtools/{chunk.DooL4OcT.js → chunk.B9h7IAR1.js} +1 -1
- package/assets/devtools/{chunk.CzbujtK7.js → chunk.BChtaeaz.js} +1 -1
- package/assets/devtools/{chunk.CBGZOsrp.js → chunk.BLm9NSIJ.js} +1 -1
- package/assets/devtools/{chunk.RTodzvo0.js → chunk.BRzkf5AB.js} +1 -1
- package/assets/devtools/{chunk.DJOi4_So.js → chunk.BVciOoK-.js} +1 -1
- package/assets/devtools/{chunk.17gtbQUO.js → chunk.BiYuhEvJ.js} +1 -1
- package/assets/devtools/{chunk.C49FcqzR.js → chunk.BkBlh2Dt.js} +1 -1
- package/assets/devtools/{chunk.IVvrfXp1.js → chunk.BmVQcEyT.js} +1 -1
- package/assets/devtools/{chunk.BzE7YYkj.js → chunk.ByjndBdY.js} +1 -1
- package/assets/devtools/{chunk.qDx9cjbN.js → chunk.C8MW3asi.js} +1 -1
- package/assets/devtools/{chunk.CHRbA_gU.js → chunk.CLYiSTOf.js} +1 -1
- package/assets/devtools/{chunk.Ct58VlQl.js → chunk.CaVuq3Op.js} +1 -1
- package/assets/devtools/{chunk.DA9XnVAa.js → chunk.CioNo4ZJ.js} +1 -1
- package/assets/devtools/{chunk.BULoWCgJ.js → chunk.CjoaeVq1.js} +1 -1
- package/assets/devtools/{chunk.rJToME5k.js → chunk.Ct5753mG.js} +1 -1
- package/assets/devtools/{chunk.1mem8WHh.js → chunk.D4sT5zWZ.js} +1 -1
- package/assets/devtools/{chunk.DHWcJNNS.js → chunk.DPzX4t8Q.js} +1 -1
- package/assets/devtools/{chunk.DEUHUxKv.js → chunk.Ddpv5E_O.js} +1 -1
- package/assets/devtools/{chunk.OlMI8g2F.js → chunk.Djkuv-DD.js} +1 -1
- package/assets/devtools/{chunk.fpKvkQeU.js → chunk.DtstekP0.js} +1 -1
- package/assets/devtools/{chunk.DinJSUfH.js → chunk.Duwrcaca.js} +1 -1
- package/assets/devtools/{chunk.DIfRZc20.js → chunk.R7-m7OZO.js} +1 -1
- package/assets/devtools/{chunk.YXYL4YAO.js → chunk.VgeujX8m.js} +1 -1
- package/assets/devtools/{chunk.BYrPfJRg.js → chunk.VjygskIP.js} +1 -1
- package/assets/devtools/{chunk.rohGhT-A.js → chunk.W1p_0xSo.js} +1 -1
- package/assets/devtools/{chunk.Cw2RCl4F.js → chunk.XGXwPH1e.js} +1 -1
- package/assets/devtools/{chunk.DJJIo7HU.js → chunk.aHk99chr.js} +1 -1
- package/assets/devtools/{chunk.B0aYes_4.js → chunk.arBxf8N4.js} +1 -1
- package/assets/devtools/{chunk.Pj_uCbSv.js → chunk.bYKDU_ru.js} +1 -1
- package/assets/devtools/{chunk.DR0SHXXd.js → chunk.cMS5bixD.js} +1 -1
- package/assets/devtools/{chunk.BmJ7-uBd.js → chunk.e1Pq7Nwk.js} +1 -1
- package/assets/devtools/{chunk.Dry2LXOT.js → chunk.uTsm7un3.js} +1 -1
- package/assets/devtools/entry.Cjxjbqvs.js +75 -0
- package/assets/devtools/index.html +1 -1
- package/dist/index.d.ts +32 -29
- package/package.json +6 -6
- package/assets/devtools/entry.BY4L2Uc6.js +0 -75
|
@@ -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.
|
|
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.Cjxjbqvs.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 e}from"./entry.
|
|
1
|
+
import{w as e}from"./entry.Cjxjbqvs.js";const a=[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]],o=e("outline","server","Server",a);export{o as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as p,b as y,q as b,s as g,j as x,B as R,a1 as T,t as f}from"./entry.
|
|
1
|
+
import{f as p,b as y,q as b,s as g,j as x,B as R,a1 as T,t as f}from"./entry.Cjxjbqvs.js";var c={root:"m_7341320d"};const I=g((e,{size:a,radius:t,variant:s,gradient:i,color:o,autoContrast:l})=>{const r=e.variantColorResolver({color:o||e.primaryColor,theme:e,gradient:i,variant:s||"filled",autoContrast:l});return{root:{"--ti-size":f(a,"ti-size"),"--ti-radius":t===void 0?void 0:T(t),"--ti-bg":o||s?r.background:void 0,"--ti-color":o||s?r.color:void 0,"--ti-bd":o||s?r.border:void 0}}}),n=p((e,a)=>{const t=y("ThemeIcon",null,e),{classNames:s,className:i,style:o,styles:l,unstyled:r,vars:d,autoContrast:h,attributes:m,...u}=t,v=b({name:"ThemeIcon",classes:c,props:t,className:i,style:o,classNames:s,styles:l,unstyled:r,attributes:m,vars:d,varsResolver:I});return x.jsx(R,{ref:a,...v("root"),...u})});n.classes=c;n.displayName="@mantine/core/ThemeIcon";export{n as T};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as u,c as Me,f as S,b as P,bd as $e,ay as q,j as g,be as B,aJ as J,bf as Ae,B as T,bg as Le,e as He,b8 as Ke,bc as Ue,d as We,bh as Z,a0 as Xe,bi as Ye,bj as K,ax as U,n as qe,bk as Be,bl as Je,bm as Ze,bn as W,bo as X,bp as Y,bq as Ge,br as Qe,o as eo,q as G,s as Q,av as oo,ah as to,$ as ro,bs as so,bt as no,bu as ao,a1 as io,t as lo,v as co}from"./entry.
|
|
1
|
+
import{r as u,c as Me,f as S,b as P,bd as $e,ay as q,j as g,be as B,aJ as J,bf as Ae,B as T,bg as Le,e as He,b8 as Ke,bc as Ue,d as We,bh as Z,a0 as Xe,bi as Ye,bj as K,ax as U,n as qe,bk as Be,bl as Je,bm as Ze,bn as W,bo as X,bp as Y,bq as Ge,br as Qe,o as eo,q as G,s as Q,av as oo,ah as to,$ as ro,bs as so,bt as no,bu as ao,a1 as io,t as lo,v as co}from"./entry.Cjxjbqvs.js";import{n as po}from"./chunk.BjFrJKj1.js";function uo(e,s={active:!0}){return typeof e!="function"||!s.active?s.onKeyDown||po:r=>{r.key==="Escape"&&(e(r),s.onTrigger?.())}}const fo=["mousedown","touchstart"];function go(e,s,r){const t=u.useRef(null),l=s||fo;return u.useEffect(()=>{const p=i=>{const{target:n}=i??{};if(Array.isArray(r)){const a=!document.body.contains(n)&&n?.tagName!=="HTML";r.every(d=>!!d&&!i.composedPath().includes(d))&&!a&&e(i)}else t.current&&!t.current.contains(n)&&e(i)};return l.forEach(i=>document.addEventListener(i,p)),()=>{l.forEach(i=>document.removeEventListener(i,p))}},[t,e,r]),t}const[wo,ee]=Me("Popover component was not found in the tree");var oe={dropdown:"m_38a85659",arrow:"m_a31dc6c1",overlay:"m_3d7bc908"};const N=S((e,s)=>{const r=P("PopoverDropdown",null,e),{className:t,style:l,vars:p,children:i,onKeyDownCapture:n,variant:a,classNames:w,styles:d,...f}=r,o=ee(),m=$e({opened:o.opened,shouldReturnFocus:o.returnFocus}),v=o.withRoles?{"aria-labelledby":o.getTargetId(),id:o.getDropdownId(),role:"dialog",tabIndex:-1}:{},y=q(s,o.floating);return o.disabled?null:g.jsx(B,{...o.portalProps,withinPortal:o.withinPortal,children:g.jsx(J,{mounted:o.opened,...o.transitionProps,transition:o.transitionProps?.transition||"fade",duration:o.transitionProps?.duration??150,keepMounted:o.keepMounted,exitDuration:typeof o.transitionProps?.exitDuration=="number"?o.transitionProps.exitDuration:o.transitionProps?.duration,children:b=>g.jsx(Ae,{active:o.trapFocus&&o.opened,innerRef:y,children:g.jsxs(T,{...v,...f,variant:a,onKeyDownCapture:uo(()=>{o.onClose?.(),o.onDismiss?.()},{active:o.closeOnEscape,onTrigger:m,onKeyDown:n}),"data-position":o.placement,"data-fixed":o.floatingStrategy==="fixed"||void 0,...o.getStyles("dropdown",{className:t,props:r,classNames:w,styles:d,style:[{...b,zIndex:o.zIndex,top:o.y??0,left:o.x??0,width:o.width==="target"?void 0:He(o.width),...o.referenceHidden?{display:"none"}:null},o.resolvedStyles.dropdown,d?.dropdown,l]}),children:[i,g.jsx(Le,{ref:o.arrowRef,arrowX:o.arrowX,arrowY:o.arrowY,visible:o.withArrow,position:o.placement,arrowSize:o.arrowSize,arrowRadius:o.arrowRadius,arrowOffset:o.arrowOffset,arrowPosition:o.arrowPosition,...o.getStyles("arrow",{props:r,classNames:w,styles:d})})]})})})})});N.classes=oe;N.displayName="@mantine/core/PopoverDropdown";const ho={refProp:"ref",popupType:"dialog"},te=S((e,s)=>{const{children:r,refProp:t,popupType:l,...p}=P("PopoverTarget",ho,e),i=Ke(r);if(!i)throw new Error("Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const n=p,a=ee(),w=q(a.reference,Ue(i),s),d=a.withRoles?{"aria-haspopup":l,"aria-expanded":a.opened,"aria-controls":a.getDropdownId(),id:a.getTargetId()}:{},f=i.props;return u.cloneElement(i,{...n,...d,...a.targetProps,className:We(a.targetProps.className,n.className,f.className),[t]:w,...a.controlled?null:{onClick:()=>{a.onToggle(),f.onClick?.()}}})});te.displayName="@mantine/core/PopoverTarget";function mo(e){if(e===void 0)return{shift:!0,flip:!0};const s={...e};return e.shift===void 0&&(s.shift=!0),e.flip===void 0&&(s.flip=!0),s}function vo(e,s,r){const t=mo(e.middlewares),l=[Be(e.offset),Je()];return e.dropdownVisible&&r!=="test"&&e.preventPositionChangeWhenVisible&&(t.flip=!1),t.shift&&l.push(Ze(typeof t.shift=="boolean"?{limiter:W(),padding:5}:{limiter:W(),padding:5,...t.shift})),t.flip&&l.push(typeof t.flip=="boolean"?X():X(t.flip)),t.inline&&l.push(typeof t.inline=="boolean"?Y():Y(t.inline)),l.push(Ge({element:e.arrowRef,padding:e.arrowOffset})),(t.size||e.width==="target")&&l.push(Qe({...typeof t.size=="boolean"?{}:t.size,apply({rects:p,availableWidth:i,availableHeight:n,...a}){const d=s().refs.floating.current?.style??{};t.size&&(typeof t.size=="object"&&t.size.apply?t.size.apply({rects:p,availableWidth:i,availableHeight:n,...a}):Object.assign(d,{maxWidth:`${i}px`,maxHeight:`${n}px`})),e.width==="target"&&Object.assign(d,{width:`${p.reference.width}px`})}})),l}function yo(e){const s=Z(),[r,t]=Xe({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),l=u.useRef(r),p=()=>{r&&!e.disabled&&t(!1)},i=()=>{e.disabled||t(!r)},n=Ye({strategy:e.strategy,placement:e.preventPositionChangeWhenVisible?e.positionRef.current:e.position,middleware:vo(e,()=>n,s),whileElementsMounted:e.keepMounted?void 0:K});return u.useEffect(()=>{if(!(!n.refs.reference.current||!n.refs.floating.current)&&r)return K(n.refs.reference.current,n.refs.floating.current,n.update)},[r,n.update]),U(()=>{e.onPositionChange?.(n.placement),e.positionRef.current=n.placement},[n.placement,e.preventPositionChangeWhenVisible]),U(()=>{r!==l.current&&(r?e.onOpen?.():e.onClose?.()),l.current=r},[r,e.onClose,e.onOpen]),qe(()=>{let a=-1;return r&&(a=window.setTimeout(()=>e.setDropdownVisible(!0),4)),()=>{window.clearTimeout(a)}},[r,e.position]),{floating:n,controlled:typeof e.opened=="boolean",opened:r,onClose:p,onToggle:i}}const bo={position:"bottom",offset:8,positionDependencies:[],transitionProps:{transition:"fade",duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:"side",closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,clickOutsideEvents:["mousedown","touchstart"],zIndex:eo("popover"),__staticSelector:"Popover",width:"max-content"},Po=Q((e,{radius:s,shadow:r})=>({dropdown:{"--popover-radius":s===void 0?void 0:io(s),"--popover-shadow":ao(r)}}));function x(e){const s=P("Popover",bo,e),{children:r,position:t,offset:l,onPositionChange:p,positionDependencies:i,opened:n,transitionProps:a,onExitTransitionEnd:w,onEnterTransitionEnd:d,width:f,middlewares:o,withArrow:m,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:ne,unstyled:z,classNames:D,styles:E,closeOnClickOutside:ae,withinPortal:j,portalProps:ie,closeOnEscape:le,clickOutsideEvents:de,trapFocus:ce,onClose:pe,onDismiss:R,onOpen:ue,onChange:fe,zIndex:ge,radius:we,shadow:he,id:me,defaultOpened:F,__staticSelector:I,withRoles:ve,disabled:k,returnFocus:ye,variant:be,keepMounted:V,vars:Pe,floatingStrategy:_,withOverlay:xe,overlayProps:C,hideDetached:De,attributes:Ee,preventPositionChangeWhenVisible:O,...Re}=s,M=G({name:I,props:s,classes:oe,classNames:D,styles:E,unstyled:z,attributes:Ee,rootSelector:"dropdown",vars:Pe,varsResolver:Po}),{resolvedStyles:Ce}=oo({classNames:D,styles:E,props:s}),[Oe,$]=u.useState(n??F??!1),A=u.useRef(t),L=u.useRef(null),[Te,Se]=u.useState(null),[Ne,ze]=u.useState(null),{dir:je}=to(),Fe=Z(),H=ro(me),c=yo({middlewares:o,width:f,position:so(je,t),offset:typeof l=="number"?l+(m?v/2:0):l,arrowRef:L,arrowOffset:y,onPositionChange:p,positionDependencies:i,opened:n,defaultOpened:F,onChange:fe,onOpen:ue,onClose:pe,onDismiss:R,strategy:_,dropdownVisible:Oe,setDropdownVisible:$,positionRef:A,disabled:k,preventPositionChangeWhenVisible:O,keepMounted:V});go(()=>{ae&&(c.onClose(),R?.())},de,[Te,Ne]);const Ie=u.useCallback(h=>{Se(h),c.floating.refs.setReference(h)},[c.floating.refs.setReference]),ke=u.useCallback(h=>{ze(h),c.floating.refs.setFloating(h)},[c.floating.refs.setFloating]),Ve=u.useCallback(()=>{a?.onExited?.(),w?.(),$(!1),O||(A.current=t)},[a?.onExited,w,O,t]),_e=u.useCallback(()=>{a?.onEntered?.(),d?.()},[a?.onEntered,d]);return g.jsxs(wo,{value:{returnFocus:ye,disabled:k,controlled:c.controlled,reference:Ie,floating:ke,x:c.floating.x,y:c.floating.y,arrowX:c.floating?.middlewareData?.arrow?.x,arrowY:c.floating?.middlewareData?.arrow?.y,opened:c.opened,arrowRef:L,transitionProps:{...a,onExited:Ve,onEntered:_e},width:f,withArrow:m,arrowSize:v,arrowOffset:y,arrowRadius:b,arrowPosition:ne,placement:c.floating.placement,trapFocus:ce,withinPortal:j,portalProps:ie,zIndex:ge,radius:we,shadow:he,closeOnEscape:le,onDismiss:R,onClose:c.onClose,onToggle:c.onToggle,getTargetId:()=>`${H}-target`,getDropdownId:()=>`${H}-dropdown`,withRoles:ve,targetProps:Re,__staticSelector:I,classNames:D,styles:E,unstyled:z,variant:be,keepMounted:V,getStyles:M,resolvedStyles:Ce,floatingStrategy:_,referenceHidden:De&&Fe!=="test"?c.floating.middlewareData.hide?.referenceHidden:!1},children:[r,xe&&g.jsx(J,{transition:"fade",mounted:c.opened,duration:a?.duration||250,exitDuration:a?.exitDuration||250,children:h=>g.jsx(B,{withinPortal:j,children:g.jsx(no,{...C,...M("overlay",{className:C?.className,style:[h,C?.style]})})})})]})}x.Target=te;x.Dropdown=N;x.displayName="@mantine/core/Popover";x.extend=e=>e;var re={root:"m_3eebeb36",label:"m_9e365f20"};const xo={orientation:"horizontal"},Do=Q((e,{color:s,variant:r,size:t})=>({root:{"--divider-color":s?co(s,e):void 0,"--divider-border-style":r,"--divider-size":lo(t,"divider-size")}})),se=S((e,s)=>{const r=P("Divider",xo,e),{classNames:t,className:l,style:p,styles:i,unstyled:n,vars:a,color:w,orientation:d,label:f,labelPosition:o,mod:m,attributes:v,...y}=r,b=G({name:"Divider",classes:re,props:r,className:l,style:p,classNames:t,styles:i,unstyled:n,attributes:v,vars:a,varsResolver:Do});return g.jsx(T,{ref:s,mod:[{orientation:d,"with-label":!!f},m],...b("root"),...y,role:"separator",children:f&&g.jsx(T,{component:"span",mod:{position:o},...b("label"),children:f})})});se.classes=re;se.displayName="@mantine/core/Divider";export{se as D,x as P,go as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,e as n}from"./entry.
|
|
1
|
+
import{j as o,e as n}from"./entry.Cjxjbqvs.js";function i({style:r,size:e=16,...l}){return o.jsx("svg",{viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{...r,width:n(e),height:n(e),display:"block"},...l,children:o.jsx("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"})})}i.displayName="@mantine/core/AccordionChevron";export{i as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as a}from"./entry.
|
|
1
|
+
import{w as a}from"./entry.Cjxjbqvs.js";const e=[["path",{d:"M7 4v16l13 -8z",key:"svg-0"}]],t=a("outline","player-play","PlayerPlay",e);export{t as I};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{w as T,Y as C,Z as k,r as h,j as e,F as x,T as r,B as a,H as p,ae as L,z as E,ac as v,S as z,a8 as V,ad as B,aa as I,ab as M}from"./entry.
|
|
1
|
+
import{w as T,Y as C,Z as k,r as h,j as e,F as x,T as r,B as a,H as p,ae as L,z as E,ac as v,S as z,a8 as V,ad as B,aa as I,ab as M}from"./entry.Cjxjbqvs.js";import{d as $}from"./chunk.XGXwPH1e.js";import{S as y,B as b}from"./chunk.uTsm7un3.js";import{C as w}from"./chunk.B5eTVHku.js";import{T as t}from"./chunk.aHk99chr.js";import{I as H}from"./chunk.CaVuq3Op.js";const N=[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]],O=T("outline","settings","Settings",N),A=s=>{const n=new Map;for(const l of s){const i=l.schema;if(i?.properties)for(const[o,c]of Object.entries(i.properties)){if(n.has(o))continue;const d=c,u=l.values[o];let g=d.type??"unknown",m=d.format;if(d.anyOf){const j=d.anyOf.find(f=>f.type!=="null");j&&(g=j.type??"unknown",m=j.format)}n.set(o,{name:o,value:u,type:g,description:d.description,format:m})}}return Array.from(n.values()).sort((l,i)=>l.name.localeCompare(i.name))},F=({variables:s,selectedVar:n,onSelectVar:l,search:i,onSearchChange:o})=>e.jsxs(y,{gap:0,h:"100%",children:[e.jsx(a,{p:"sm",style:{borderBottom:`1px solid ${p.colors.border}`},children:e.jsx(L,{placeholder:"Search variables...",leftSection:e.jsx(E,{size:14}),size:"xs",value:i,onChange:c=>o(c.target.value)})}),e.jsx(v,{style:{flex:1},children:e.jsxs(a,{children:[e.jsxs(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:p.colors.background,borderBottom:`1px solid ${p.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:["Variables (",s.length,")"]}),s.map(c=>{const d=n?.name===c.name;return e.jsxs(x,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>l(c),style:{cursor:"pointer",backgroundColor:d?"#228be615":void 0,borderLeft:d?"2px solid #228be6":"2px solid transparent",borderBottom:`1px solid ${p.colors.border}`},children:[e.jsx(z,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,ff:"monospace",children:c.name})]},c.name)})]})})]}),R=({variable:s})=>{const n=s.value!==void 0&&s.value!=="",l=n?String(s.value):"(not set)",i=s.name.toLowerCase().includes("secret")||s.name.toLowerCase().includes("password")||s.name.toLowerCase().includes("key")||s.name.toLowerCase().includes("token");return e.jsxs(x,{direction:"column",h:"100%",children:[e.jsx(a,{px:"md",py:"sm",style:{borderBottom:`1px solid ${p.colors.border}`,backgroundColor:"#228be608"},children:e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(z,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,ff:"monospace",children:s.name}),e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:s.format||s.type})]})}),e.jsx(v,{style:{flex:1},p:"md",children:e.jsxs(y,{gap:"lg",children:[s.description&&e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Description"}),e.jsx(r,{size:"sm",c:"dimmed",children:s.description})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Current Value"}),e.jsxs(x,{align:"center",gap:"sm",children:[e.jsx(w,{block:!0,style:{flex:1,filter:i&&n?"blur(4px)":void 0,transition:"filter 0.2s"},onMouseEnter:o=>{i&&(o.currentTarget.style.filter="none")},onMouseLeave:o=>{i&&n&&(o.currentTarget.style.filter="blur(4px)")},children:l}),n&&e.jsx(V,{value:String(s.value),children:({copied:o,copy:c})=>e.jsx(B,{label:o?"Copied!":"Copy value",children:e.jsx(a,{onClick:c,style:{cursor:"pointer"},c:o?"teal":"dimmed",children:o?e.jsx(I,{size:16}):e.jsx(M,{size:16})})})})]}),i&&e.jsx(r,{size:"xs",c:"dimmed",mt:"xs",children:"Hover to reveal sensitive value"})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Schema"}),e.jsx(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(t.Tbody,{children:[e.jsxs(t.Tr,{children:[e.jsx(t.Td,{w:120,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Type"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.type})})]}),s.format&&e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Format"})}),e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.format})})]})]})})]}),e.jsxs(a,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Usage"}),e.jsx(w,{block:!0,children:`# Set in .env file or environment
|
|
2
2
|
${s.name}=${n?s.value:"<value>"}`})]})]})})]})},D=()=>e.jsx(x,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(y,{align:"center",gap:"xs",children:[e.jsx(O,{size:48,opacity:.3}),e.jsx(r,{children:"No environment variables found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Use $env primitive to define expected environment variables"})]})}),U=({variables:s})=>e.jsx(v,{h:"100%",p:"md",children:e.jsx(y,{gap:"lg",children:e.jsxs(a,{children:[e.jsxs(x,{align:"center",gap:"xs",mb:"sm",children:[e.jsx(H,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:"All Environment Variables"}),e.jsxs(b,{size:"sm",variant:"light",children:[s.length," variables"]})]}),e.jsxs(t,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(t.Thead,{children:e.jsxs(t.Tr,{children:[e.jsx(t.Th,{children:"Name"}),e.jsx(t.Th,{children:"Type"}),e.jsx(t.Th,{children:"Value"})]})}),e.jsx(t.Tbody,{children:s.map(n=>{const l=n.value!==void 0&&n.value!=="",i=n.name.toLowerCase().includes("secret")||n.name.toLowerCase().includes("password")||n.name.toLowerCase().includes("key")||n.name.toLowerCase().includes("token");return e.jsxs(t.Tr,{children:[e.jsx(t.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",fw:500,children:n.name})}),e.jsx(t.Td,{children:e.jsx(b,{size:"xs",variant:"outline",color:"blue",children:n.format||n.type})}),e.jsx(t.Td,{children:l?e.jsxs(r,{size:"sm",ff:"monospace",c:"dimmed",style:{filter:i?"blur(4px)":void 0},children:[String(n.value).slice(0,30),String(n.value).length>30?"...":""]}):e.jsx(r,{size:"sm",c:"dimmed",fs:"italic",children:"(not set)"})})]},n.name)})})]})]})})}),G=()=>{const s=C(k),[n,l]=h.useState([]),[i,o]=h.useState(!0),[c,d]=h.useState(null),[u,g]=h.useState("");h.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:$}}).then(f=>{l(f.data.envs),o(!1)})},[]);const m=h.useMemo(()=>A(n),[n]),j=h.useMemo(()=>{if(!u)return m;const f=u.toLowerCase();return m.filter(S=>S.name.toLowerCase().includes(f))},[m,u]);return i?e.jsx(x,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):m.length===0?e.jsx(D,{}):e.jsxs(x,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(a,{w:280,style:{borderRight:`1px solid ${p.colors.border}`,backgroundColor:p.colors.surface},children:e.jsx(F,{variables:j,selectedVar:c,onSelectVar:d,search:u,onSearchChange:g})}),e.jsx(a,{style:{flex:1,overflow:"hidden"},children:c?e.jsx(R,{variable:c}):e.jsx(U,{variables:m})})]})};export{G as DevEnvExplorer,G as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as a}from"./entry.
|
|
1
|
+
import{w as a}from"./entry.Cjxjbqvs.js";const o=[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]],e=a("outline","lock","Lock",o);export{e as I};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as we,r as b,M as Ne,a as Ie,c as Ae,f as S,b as v,j as n,B as x,d as H,R as $,e as m,k as N,g as Ce,h as te,i as ze,l as ke,I as ye,p as Be,m as Pe,n as Re,o as Te,q as W,s as O,U as _e,t as ne,v as Ve,w as A,x as T,F as f,y as Ee,z as Fe,T as q,A as _,C as k,D as ae,E as Le,G as De,H as j,N as le,J as He,K as $e,L as We,O as Oe,P as qe,Q as Ke,S as Xe,V as Qe,W as Ge,X as Ue}from"./entry.BY4L2Uc6.js";import{A as I,u as Ye}from"./chunk.DR0SHXXd.js";import{n as Je}from"./chunk.BjFrJKj1.js";import{S as Me}from"./chunk.BmJ7-uBd.js";import{D as Ze}from"./chunk.fpKvkQeU.js";import{g as ie,a as se}from"./chunk.17gtbQUO.js";import{I as et}from"./chunk.DGW-W4Kc.js";import"./chunk.OlMI8g2F.js";import"./chunk.BlqFPyLh.js";import"./chunk.DinJSUfH.js";import"./chunk.uyVen0u2.js";function ce(e,t){return we("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}function oe(e){const t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(s=>s.remove())}function de({keepTransitions:e}={}){const t=b.useRef(Je),o=b.useRef(-1),s=b.useContext(Ne),d=Ie(),l=b.useRef(d?.());if(!s)throw new Error("[@mantine/core] MantineProvider was not found in tree");const a=p=>{s.setColorScheme(p),t.current=e?()=>{}:oe(l.current),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current?.()},10)},c=()=>{s.clearColorScheme(),t.current=e?()=>{}:oe(l.current),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current?.()},10)},r=ce("light",{getInitialValueInEffect:!1}),h=s.colorScheme==="auto"?r:s.colorScheme,i=b.useCallback(()=>a(h==="light"?"dark":"light"),[a,h]);return b.useEffect(()=>()=>{t.current?.(),window.clearTimeout(o.current)},[]),{colorScheme:s.colorScheme,setColorScheme:a,clearColorScheme:c,toggleColorScheme:i}}function tt(e,t={getInitialValueInEffect:!0}){const o=ce(e,t),{colorScheme:s}=de();return s==="auto"?o:s}const[st,C]=Ae("AppShell was not found in tree");var w={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const K=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellAside",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"aside",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("aside",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-aside-z-index":`calc(${h??u.zIndex} + 1)`}})});K.classes=w;K.displayName="@mantine/core/AppShellAside";const X=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellFooter",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"footer",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("footer",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-footer-z-index":(h??u.zIndex)?.toString()}})});X.classes=w;X.displayName="@mantine/core/AppShellFooter";const Q=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellHeader",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"header",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("header",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-header-z-index":(h??u.zIndex)?.toString()}})});Q.classes=w;Q.displayName="@mantine/core/AppShellHeader";const G=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,vars:a,...c}=v("AppShellMain",null,e),r=C();return n.jsx(x,{component:"main",ref:t,...r.getStyles("main",{className:s,style:d,classNames:o,styles:l}),...c})});G.classes=w;G.displayName="@mantine/core/AppShellMain";function y(e){return typeof e=="object"?e.base:e}function B(e){const t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function P(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function ot({baseStyles:e,minMediaStyles:t,maxMediaStyles:o,aside:s,theme:d}){const l=s?.width,a="translateX(var(--app-shell-aside-width))",c="translateX(calc(var(--app-shell-aside-width) * -1))";if(s?.breakpoint&&!s?.collapsed?.mobile&&(o[s?.breakpoint]=o[s?.breakpoint]||{},o[s?.breakpoint]["--app-shell-aside-width"]="100%",o[s?.breakpoint]["--app-shell-aside-offset"]="0px"),B(l)){const r=m(y(l));e["--app-shell-aside-width"]=r,e["--app-shell-aside-offset"]=r}if(P(l)&&(typeof l.base<"u"&&(e["--app-shell-aside-width"]=m(l.base),e["--app-shell-aside-offset"]=m(l.base)),N(l).forEach(r=>{r!=="base"&&(t[r]=t[r]||{},t[r]["--app-shell-aside-width"]=m(l[r]),t[r]["--app-shell-aside-offset"]=m(l[r]))})),s?.collapsed?.desktop){const r=s.breakpoint;t[r]=t[r]||{},t[r]["--app-shell-aside-transform"]=a,t[r]["--app-shell-aside-transform-rtl"]=c,t[r]["--app-shell-aside-offset"]="0px !important",t[r]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if(s?.collapsed?.mobile){const r=ie(s.breakpoint,d.breakpoints)-.1;o[r]=o[r]||{},o[r]["--app-shell-aside-width"]="100%",o[r]["--app-shell-aside-offset"]="0px",o[r]["--app-shell-aside-transform"]=a,o[r]["--app-shell-aside-transform-rtl"]=c,o[r]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function rt({baseStyles:e,minMediaStyles:t,footer:o}){const s=o?.height,d="translateY(var(--app-shell-footer-height))",l=o?.offset??!0;if(B(s)){const a=m(y(s));e["--app-shell-footer-height"]=a,l&&(e["--app-shell-footer-offset"]=a)}P(s)&&(typeof s.base<"u"&&(e["--app-shell-footer-height"]=m(s.base),l&&(e["--app-shell-footer-offset"]=m(s.base))),N(s).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-footer-height"]=m(s[a]),l&&(t[a]["--app-shell-footer-offset"]=m(s[a])))})),o?.collapsed&&(e["--app-shell-footer-transform"]=d,e["--app-shell-footer-offset"]="0px !important")}function nt({baseStyles:e,minMediaStyles:t,header:o}){const s=o?.height,d="translateY(calc(var(--app-shell-header-height) * -1))",l=o?.offset??!0;if(B(s)){const a=m(y(s));e["--app-shell-header-height"]=a,l&&(e["--app-shell-header-offset"]=a)}P(s)&&(typeof s.base<"u"&&(e["--app-shell-header-height"]=m(s.base),l&&(e["--app-shell-header-offset"]=m(s.base))),N(s).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-header-height"]=m(s[a]),l&&(t[a]["--app-shell-header-offset"]=m(s[a])))})),o?.collapsed&&(e["--app-shell-header-transform"]=d,e["--app-shell-header-offset"]="0px !important")}function at({baseStyles:e,minMediaStyles:t,maxMediaStyles:o,navbar:s,theme:d}){const l=s?.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",c="translateX(var(--app-shell-navbar-width))";if(s?.breakpoint&&!s?.collapsed?.mobile&&(o[s?.breakpoint]=o[s?.breakpoint]||{},o[s?.breakpoint]["--app-shell-navbar-width"]="100%",o[s?.breakpoint]["--app-shell-navbar-offset"]="0px"),B(l)){const r=m(y(l));e["--app-shell-navbar-width"]=r,e["--app-shell-navbar-offset"]=r}if(P(l)&&(typeof l.base<"u"&&(e["--app-shell-navbar-width"]=m(l.base),e["--app-shell-navbar-offset"]=m(l.base)),N(l).forEach(r=>{r!=="base"&&(t[r]=t[r]||{},t[r]["--app-shell-navbar-width"]=m(l[r]),t[r]["--app-shell-navbar-offset"]=m(l[r]))})),s?.collapsed?.desktop){const r=s.breakpoint;t[r]=t[r]||{},t[r]["--app-shell-navbar-transform"]=a,t[r]["--app-shell-navbar-transform-rtl"]=c,t[r]["--app-shell-navbar-offset"]="0px !important"}if(s?.collapsed?.mobile){const r=ie(s.breakpoint,d.breakpoints)-.1;o[r]=o[r]||{},o[r]["--app-shell-navbar-width"]="100%",o[r]["--app-shell-navbar-offset"]="0px",o[r]["--app-shell-navbar-transform"]=a,o[r]["--app-shell-navbar-transform-rtl"]=c}}function L(e){return Number(e)===0?"0px":Ce(e)}function lt({padding:e,baseStyles:t,minMediaStyles:o}){B(e)&&(t["--app-shell-padding"]=L(y(e))),P(e)&&(e.base&&(t["--app-shell-padding"]=L(e.base)),N(e).forEach(s=>{s!=="base"&&(o[s]=o[s]||{},o[s]["--app-shell-padding"]=L(e[s]))}))}function it({navbar:e,header:t,footer:o,aside:s,padding:d,theme:l}){const a={},c={},r={};at({baseStyles:r,minMediaStyles:a,maxMediaStyles:c,navbar:e,theme:l}),ot({baseStyles:r,minMediaStyles:a,maxMediaStyles:c,aside:s,theme:l}),nt({baseStyles:r,minMediaStyles:a,header:t}),rt({baseStyles:r,minMediaStyles:a,footer:o}),lt({baseStyles:r,minMediaStyles:a,padding:d});const h=se(N(a),l.breakpoints).map(u=>({query:`(min-width: ${te(u.px)})`,styles:a[u.value]})),i=se(N(c),l.breakpoints).map(u=>({query:`(max-width: ${te(u.px)})`,styles:c[u.value]})),p=[...h,...i];return{baseStyles:r,media:p}}function ct({navbar:e,header:t,aside:o,footer:s,padding:d}){const l=ze(),a=ke(),{media:c,baseStyles:r}=it({navbar:e,header:t,footer:s,aside:o,padding:d,theme:l});return n.jsx(ye,{media:c,styles:r,selector:a.cssVariablesSelector})}const U=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellNavbar",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"nav",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("navbar",{className:s,classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-navbar-z-index":`calc(${h??u.zIndex} + 1)`}})});U.classes=w;U.displayName="@mantine/core/AppShellNavbar";const Y=Be((e,t)=>{const{classNames:o,className:s,style:d,styles:l,vars:a,grow:c,mod:r,...h}=v("AppShellSection",null,e),i=C();return n.jsx(x,{ref:t,mod:[{grow:c},r],...i.getStyles("section",{className:s,style:d,classNames:o,styles:l}),...h})});Y.classes=w;Y.displayName="@mantine/core/AppShellSection";function dt({transitionDuration:e,disabled:t}){const[o,s]=b.useState(!0),d=b.useRef(-1),l=b.useRef(-1);return Pe("resize",()=>{s(!0),clearTimeout(d.current),d.current=window.setTimeout(()=>b.startTransition(()=>{s(!1)}),200)}),Re(()=>{s(!0),clearTimeout(l.current),l.current=window.setTimeout(()=>b.startTransition(()=>{s(!1)}),e||0)},[t,e]),o}const ht={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Te("app")},pt=O((e,{transitionDuration:t,transitionTimingFunction:o})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":o}})),g=S((e,t)=>{const o=v("AppShell",ht,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,navbar:h,withBorder:i,padding:p,transitionDuration:u,transitionTimingFunction:V,header:z,zIndex:E,layout:R,disabled:F,aside:me,footer:be,offsetScrollbars:ge=!0,mod:ve,attributes:xe,...je}=o,ee=W({name:"AppShell",classes:w,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:xe,vars:r,varsResolver:pt}),Se=dt({disabled:F,transitionDuration:u});return n.jsxs(st,{value:{getStyles:ee,withBorder:i,zIndex:E,disabled:F,offsetScrollbars:ge},children:[n.jsx(ct,{navbar:h,header:z,aside:me,footer:be,padding:p}),n.jsx(x,{ref:t,...ee("root"),mod:[{resizing:Se,layout:R,disabled:F},ve],...je})]})});g.classes=w;g.displayName="@mantine/core/AppShell";g.Navbar=U;g.Header=Q;g.Main=G;g.Aside=K;g.Footer=X;g.Section=Y;var he={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const ut=O((e,{color:t,size:o,lineSize:s,transitionDuration:d,transitionTimingFunction:l})=>({root:{"--burger-color":t?Ve(t,e):void 0,"--burger-size":ne(o,"burger-size"),"--burger-line-size":s?m(s):void 0,"--burger-transition-duration":d===void 0?void 0:`${d}ms`,"--burger-transition-timing-function":l}})),J=S((e,t)=>{const o=v("Burger",null,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,opened:h,children:i,transitionDuration:p,transitionTimingFunction:u,lineSize:V,attributes:z,...E}=o,R=W({name:"Burger",classes:he,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:z,vars:r,varsResolver:ut});return n.jsxs(_e,{...R("root"),ref:t,...E,children:[n.jsx(x,{mod:["reduce-motion",{opened:h}],...R("burger")}),i]})});J.classes=he;J.displayName="@mantine/core/Burger";var pe={root:"m_dc6f14e2"};const ft=O((e,{size:t})=>({root:{"--kbd-fz":ne(t,"kbd-fz")}})),M=S((e,t)=>{const o=v("Kbd",null,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,attributes:h,...i}=o,p=W({name:"Kbd",classes:pe,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:h,vars:r,varsResolver:ft});return n.jsx(x,{component:"kbd",ref:t,...p("root"),...i})});M.classes=pe;M.displayName="@mantine/core/Kbd";const mt=[["path",{d:"M9 6.371c0 4.418 -2.239 6.629 -5 6.629",key:"svg-0"}],["path",{d:"M4 6.371h7",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}],["path",{d:"M6.694 3l.793 .582",key:"svg-5"}]],bt=A("outline","language","Language",mt);const gt=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 4v16",key:"svg-1"}],["path",{d:"M15 10l-2 2l2 2",key:"svg-2"}]],vt=A("outline","layout-sidebar-left-collapse","LayoutSidebarLeftCollapse",gt);const xt=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M15 4v16",key:"svg-1"}],["path",{d:"M9 10l2 2l-2 2",key:"svg-2"}]],jt=A("outline","layout-sidebar-right-collapse","LayoutSidebarRightCollapse",xt);const St=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]],re=A("outline","moon","Moon",St);const wt=[["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-0"}]],Nt=A("outline","square-rounded","SquareRounded",wt);const It=[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],D=A("outline","sun","Sun",It),At=e=>{const[t,o]=T("alepha.ui.sidebar.opened");return n.jsx(J,{opened:t,onClick:()=>o(!t),hiddenFrom:"sm",size:"sm",...e})},ue=e=>{const{setColorScheme:t}=de(),o=tt("light"),[s,d]=b.useState("default"),l=e.mode??"minimal";b.useEffect(()=>{d(o)},[o]);const a=()=>{t(o==="dark"?"light":"dark")};return l==="segmented"?n.jsx(Me,{value:s,onChange:c=>t(c),data:[{value:"light",label:n.jsx(f,{h:20,align:"center",justify:"center",children:n.jsx(D,{size:16})})},{value:"dark",label:n.jsx(f,{h:20,align:"center",justify:"center",children:n.jsx(re,{size:16})})}],w:e.fullWidth?"100%":void 0,...e.segmentedProps}):n.jsx(I,{onClick:a,variant:e.variant??"subtle",size:e.size??"sm","aria-label":"Toggle color scheme",px:"xs",fullWidth:e.fullWidth??!1,icon:s==="dark"?D:s==="light"?re:D,...e.actionProps})},Ct=e=>{const t=Ye();return n.jsx(I,{variant:"default",icon:bt,menu:{items:t.languages.map(o=>({label:t.tr(o),onClick:()=>t.setLang(o),active:t.lang===o}))},...e.actionProps})},Z=e=>n.jsx(I,{variant:"default",onClick:Ee.open,justify:"space-between",rightSection:n.jsx(M,{visibleFrom:"sm",size:"sm",children:"⌘+K"}),radius:"md",...e.actionProps,children:n.jsxs(f,{align:"center",gap:"xs",children:[n.jsx(Fe,{size:16,color:"gray"}),n.jsx(f,{visibleFrom:"sm",miw:192,children:n.jsx(q,{size:"xs",c:"dimmed",children:"Search..."})})]})}),zt=e=>{const{items:t=[]}=e,o=(a,c)=>{if("type"in a){if(a.type==="burger")return n.jsx(At,{},c);if(a.type==="dark")return n.jsx(ue,{...a.props},c);if(a.type==="search")return n.jsx(Z,{...a.props},c);if(a.type==="lang")return n.jsx(Ct,{...a.props},c);if(a.type==="spacer")return n.jsx(f,{w:16},c);if(a.type==="divider")return n.jsx(Ze,{orientation:"vertical"},c)}return"element"in a?a.element:null},s=t.filter(a=>a.position==="left"),d=t.filter(a=>a.position==="center"),l=t.filter(a=>a.position==="right");return n.jsxs(f,{h:"100%",align:"center",px:"md",justify:"space-between",...e.flexProps,children:[n.jsx(f,{flex:1,children:s.map((a,c)=>n.jsx(f,{ml:c===0?0:"md",align:"center",children:o(a,c)},c))}),n.jsx(f,{children:d.map((a,c)=>n.jsx(f,{mx:"md",align:"center",children:o(a,c)},c))}),n.jsx(f,{flex:1,align:"center",justify:"end",children:l.map((a,c)=>n.jsx(f,{ml:c===0?0:"md",align:"center",children:o(a,c)},c))})]})},kt=()=>{const[e,t]=T("alepha.ui.sidebar.collapsed");return n.jsx(f,{children:n.jsx(I,{icon:e?n.jsx(jt,{}):n.jsx(vt,{}),variant:"subtle",size:"md",onClick:()=>t(!e),tooltip:{position:"right",label:e?"Show sidebar":"Hide sidebar"}})})},yt=e=>{const t=_(),{top:o=[],bottom:s=[],onItemClick:d}=e,l=(i,p)=>{if("type"in i){if(i.type==="spacer")return n.jsx(f,{h:16},p);if(i.type==="divider")return n.jsx(f,{h:1,bg:"var(--alepha-border)",my:"md",mx:"sm"},p);if(i.type==="search")return n.jsx(Z,{collapsed:e.collapsed},p);if(i.type==="toggle")return n.jsx(kt,{},p);if(i.type==="section")return e.collapsed?void 0:n.jsxs(f,{mt:"md",mb:"xs",align:"center",gap:"xs",children:[k(i.icon),n.jsx(q,{size:"xs",c:"dimmed",tt:"uppercase",fw:"bold",children:i.label},p)]},p)}return"element"in i?n.jsx(f,{children:i.element},p):i.can&&!i.can()?null:e.collapsed?n.jsx(Bt,{item:i,level:0,onItemClick:d,theme:e.theme??{}},p):n.jsx(fe,{item:i,level:0,onItemClick:d,theme:e.theme??{}},p)},a=()=>{if(e.menu)return e.menu;if(e.autoPopulateMenu){const i=t.concretePages.map(p=>({label:p.label??p.name,description:p.description?.slice(0,32),icon:k(p.icon),href:t.path(p.name)}));if(typeof e.autoPopulateMenu=="object"&&e.autoPopulateMenu.startsWith){const p=e.autoPopulateMenu.startsWith;return i.filter(u=>u.href?.startsWith(p))}}return[]},c="md",r=e.menu?e.gap:"xs",h=b.useMemo(()=>a(),[]);return n.jsxs(f,{flex:1,py:c,direction:"column",className:"overflow-auto",...e.flexProps,children:[n.jsxs(f,{gap:r,px:c,direction:"column",children:[o.map((i,p)=>l(i,p)),h.filter(i=>i.position==="top").map((i,p)=>l(i,p+o.length))]}),n.jsx(f,{gap:r,px:c,direction:"column",flex:1,className:"overflow-auto",children:h.filter(i=>!i.position).map((i,p)=>l(i,p))}),n.jsxs(f,{gap:r,px:c,direction:"column",children:[s.map((i,p)=>l(i,p)),h.filter(i=>i.position==="bottom").map((i,p)=>l(i,p+s.length))]})]})},fe=e=>{const{item:t,level:o}=e,s=2,d=_(),l=b.useCallback(h=>{if(!h.children)return!1;for(const i of h.children)if(i.href&&d.isActive(i.href)||l(i))return!0;return!1},[]),[a,c]=b.useState(l(t));if(ae({"react:transition:end":()=>{l(t)&&c(!0)}},[]),o>s)return null;const r=h=>{e.item.target||h.preventDefault(),t.children&&t.children.length>0?c(!a):(e.onItemClick?.(t),t.onClick?.())};return n.jsxs(f,{direction:"column",ps:o===0?0:32,pos:"relative",children:[n.jsx(I,{w:"100%",justify:"space-between",href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(o===0?"sm":"xs"),c:"var(--mantine-color-text)",color:"gray",variant:"subtle",variantActive:"default",radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:r,leftSection:n.jsxs(f,{w:"100%",align:"center",gap:"sm",children:[k(t.icon),n.jsxs(f,{direction:"column",children:[n.jsx(f,{children:t.label}),t.description&&n.jsx(q,{size:"xs",c:"dimmed",children:t.description})]})]}),rightSection:t.children?n.jsx(f,{children:a?n.jsx(Le,{size:14}):n.jsx(De,{size:14})}):e.item.rightSection,...e.item.actionProps}),t.children&&a&&n.jsxs(f,{direction:"column","data-parent-level":o,children:[n.jsx(f,{style:{position:"absolute",width:1,background:"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)",top:48,left:20+32*o,bottom:16}}),t.children.filter(h=>!h.can||h.can()).map((h,i)=>n.jsx(fe,{item:h,level:o+1,onItemClick:e.onItemClick,theme:e.theme},i))]})]})},Bt=e=>{const{item:t,level:o}=e,s=_(),d=b.useCallback(r=>{if(!r.children)return!1;for(const h of r.children)if(h.href&&s.isActive(h.href)||d(h))return!0;return!1},[]),[l,a]=b.useState(d(t)),c=r=>{e.item.target||r.preventDefault(),t.children&&t.children.length>0?a(!l):(e.onItemClick?.(t),t.onClick?.())};return n.jsx(I,{size:e.item.theme?.size??e.theme.button?.size??(o===0?"sm":"xs"),variant:"subtle",variantActive:"default",tooltip:t.children?void 0:{label:t.label,position:"right"},radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:c,icon:k(t.icon)??n.jsx(Nt,{}),href:e.item.href,target:e.item.target,menu:t.children?{position:"right",on:"hover",items:t.children.filter(r=>!r.can||r.can()).map(r=>({label:r.label,href:r.href,icon:k(r.icon),children:r.children?.filter(h=>!h.can||h.can())}))}:void 0,...e.item.actionProps})},Pt=e=>{const t=_(),[o,s]=T("alepha.ui.sidebar.opened"),[d]=T("alepha.ui.sidebar.collapsed",e.sidebarProps?.collapsed),l=()=>{if(e.noSidebarWhen?.paths){for(const z of e.noSidebarWhen.paths)if(t.isActive(z,{startWith:!0}))return!1}return!0},[a,c]=b.useState(l());ae({"react:transition:end":()=>{c(l())},"react:transition:begin":()=>{s(!1)}},[]);const r=[{position:"left",type:"burger"}],h=a&&e.sidebarProps!==void 0,i=h||e.appBarProps||e.header,p=i?60:0,u=e.footer?24:0,V=h?d?78:300:0;return n.jsxs(g,{w:"100%",flex:1,padding:"md",header:i?{height:60}:void 0,navbar:h?{width:d?{base:78}:{base:300},breakpoint:"sm",collapsed:{mobile:!o}}:void 0,footer:e.footer?{height:24}:void 0,...e.appShellProps,children:[n.jsx(g.Header,{bg:j.colors.surface,...e.appShellHeaderProps,children:e.header??n.jsx(zt,{items:r,...e.appBarProps})}),h&&n.jsx(g.Navbar,{bg:j.colors.surface,...e.appShellNavbarProps,children:n.jsx(yt,{collapsed:d,...e.sidebarProps??{}})}),n.jsx(g.Main,{pl:V,pt:p,pb:u,pr:0,display:"flex",flex:1,style:{flexDirection:"column"},...e.appShellMainProps,children:e.children??n.jsx(le,{})}),e.footer&&n.jsx(g.Footer,{bg:j.colors.surface,...e.appShellFooterProps,children:e.footer})]})},Ot=()=>n.jsx(Pt,{appShellProps:{withBorder:!1,bg:j.colors.background},appShellNavbarProps:{bg:j.colors.transparent},appShellHeaderProps:{bg:j.colors.transparent,style:{backdropFilter:"blur(10px)"}},sidebarProps:{gap:"xs",collapsed:!0,menu:[{label:"Dashboard",icon:n.jsx(He,{}),href:"/"},{type:"divider"},{label:"Actions",icon:n.jsx($e,{}),href:"/actions"},{label:"Queues",icon:n.jsx(We,{}),href:"/queues"},{label:"Topics",icon:n.jsx(Oe,{}),href:"/topics"},{label:"Caches",icon:n.jsx(qe,{}),href:"/caches"},{label:"DB Studio",icon:n.jsx(Ke,{}),href:"/db"},{type:"divider"},{label:"Environment",icon:n.jsx(Xe,{}),href:"/env"},{label:"Atoms",icon:n.jsx(Qe,{}),href:"/atoms"},{type:"divider"},{label:"Graph",icon:n.jsx(Ge,{}),href:"/graph"},{label:"Logs",icon:n.jsx(Ue,{}),href:"/logs"}]},appBarProps:{items:[{position:"left",type:"burger"},{position:"left",element:n.jsx(I,{intent:"none",icon:et,href:"/",active:!1,children:"Devtools"})},{position:"center",element:n.jsx(Z,{})},{position:"right",element:n.jsx(ue,{})}]},children:n.jsx(f,{className:"overflow-auto",w:"100%",flex:1,direction:"column",bd:`1px solid ${j.colors.border}`,bg:j.colors.elevated,ml:-16,mr:-16,mt:-16,style:{borderTopLeftRadius:16},children:n.jsx(le,{})})});export{Ot as DevLayout,Ot as default};
|
|
1
|
+
import{u as we,r as b,M as Ne,a as Ie,c as Ae,f as S,b as v,j as n,B as x,d as H,R as $,e as m,k as N,g as Ce,h as te,i as ze,l as ke,I as ye,p as Be,m as Pe,n as Re,o as Te,q as W,s as O,U as _e,t as ne,v as Ve,w as A,x as T,F as f,y as Ee,z as Fe,T as q,A as _,C as k,D as ae,E as Le,G as De,H as j,N as le,J as He,K as $e,L as We,O as Oe,P as qe,Q as Ke,S as Xe,V as Qe,W as Ge,X as Ue}from"./entry.Cjxjbqvs.js";import{A as I,u as Ye}from"./chunk.cMS5bixD.js";import{n as Je}from"./chunk.BjFrJKj1.js";import{S as Me}from"./chunk.e1Pq7Nwk.js";import{D as Ze}from"./chunk.DtstekP0.js";import{g as ie,a as se}from"./chunk.BiYuhEvJ.js";import{I as et}from"./chunk.0pKzkQ-k.js";import"./chunk.Djkuv-DD.js";import"./chunk.BlqFPyLh.js";import"./chunk.Duwrcaca.js";import"./chunk.uyVen0u2.js";function ce(e,t){return we("(prefers-color-scheme: dark)",e==="dark",t)?"dark":"light"}function oe(e){const t=document.createElement("style");return t.setAttribute("data-mantine-styles","inline"),t.innerHTML="*, *::before, *::after {transition: none !important;}",t.setAttribute("data-mantine-disable-transition","true"),e&&t.setAttribute("nonce",e),document.head.appendChild(t),()=>document.querySelectorAll("[data-mantine-disable-transition]").forEach(s=>s.remove())}function de({keepTransitions:e}={}){const t=b.useRef(Je),o=b.useRef(-1),s=b.useContext(Ne),d=Ie(),l=b.useRef(d?.());if(!s)throw new Error("[@mantine/core] MantineProvider was not found in tree");const a=p=>{s.setColorScheme(p),t.current=e?()=>{}:oe(l.current),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current?.()},10)},c=()=>{s.clearColorScheme(),t.current=e?()=>{}:oe(l.current),window.clearTimeout(o.current),o.current=window.setTimeout(()=>{t.current?.()},10)},r=ce("light",{getInitialValueInEffect:!1}),h=s.colorScheme==="auto"?r:s.colorScheme,i=b.useCallback(()=>a(h==="light"?"dark":"light"),[a,h]);return b.useEffect(()=>()=>{t.current?.(),window.clearTimeout(o.current)},[]),{colorScheme:s.colorScheme,setColorScheme:a,clearColorScheme:c,toggleColorScheme:i}}function tt(e,t={getInitialValueInEffect:!0}){const o=ce(e,t),{colorScheme:s}=de();return s==="auto"?o:s}const[st,C]=Ae("AppShell was not found in tree");var w={root:"m_89ab340",navbar:"m_45252eee",aside:"m_9cdde9a",header:"m_3b16f56b",main:"m_8983817",footer:"m_3840c879",section:"m_6dcfc7c7"};const K=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellAside",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"aside",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("aside",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-aside-z-index":`calc(${h??u.zIndex} + 1)`}})});K.classes=w;K.displayName="@mantine/core/AppShellAside";const X=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellFooter",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"footer",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("footer",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-footer-z-index":(h??u.zIndex)?.toString()}})});X.classes=w;X.displayName="@mantine/core/AppShellFooter";const Q=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellHeader",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"header",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("header",{className:H({[$.classNames.zeroRight]:u.offsetScrollbars},s),classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-header-z-index":(h??u.zIndex)?.toString()}})});Q.classes=w;Q.displayName="@mantine/core/AppShellHeader";const G=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,vars:a,...c}=v("AppShellMain",null,e),r=C();return n.jsx(x,{component:"main",ref:t,...r.getStyles("main",{className:s,style:d,classNames:o,styles:l}),...c})});G.classes=w;G.displayName="@mantine/core/AppShellMain";function y(e){return typeof e=="object"?e.base:e}function B(e){const t=typeof e=="object"&&e!==null&&typeof e.base<"u"&&Object.keys(e).length===1;return typeof e=="number"||typeof e=="string"||t}function P(e){return!(typeof e!="object"||e===null||Object.keys(e).length===1&&"base"in e)}function ot({baseStyles:e,minMediaStyles:t,maxMediaStyles:o,aside:s,theme:d}){const l=s?.width,a="translateX(var(--app-shell-aside-width))",c="translateX(calc(var(--app-shell-aside-width) * -1))";if(s?.breakpoint&&!s?.collapsed?.mobile&&(o[s?.breakpoint]=o[s?.breakpoint]||{},o[s?.breakpoint]["--app-shell-aside-width"]="100%",o[s?.breakpoint]["--app-shell-aside-offset"]="0px"),B(l)){const r=m(y(l));e["--app-shell-aside-width"]=r,e["--app-shell-aside-offset"]=r}if(P(l)&&(typeof l.base<"u"&&(e["--app-shell-aside-width"]=m(l.base),e["--app-shell-aside-offset"]=m(l.base)),N(l).forEach(r=>{r!=="base"&&(t[r]=t[r]||{},t[r]["--app-shell-aside-width"]=m(l[r]),t[r]["--app-shell-aside-offset"]=m(l[r]))})),s?.collapsed?.desktop){const r=s.breakpoint;t[r]=t[r]||{},t[r]["--app-shell-aside-transform"]=a,t[r]["--app-shell-aside-transform-rtl"]=c,t[r]["--app-shell-aside-offset"]="0px !important",t[r]["--app-shell-aside-scroll-locked-visibility"]="hidden"}if(s?.collapsed?.mobile){const r=ie(s.breakpoint,d.breakpoints)-.1;o[r]=o[r]||{},o[r]["--app-shell-aside-width"]="100%",o[r]["--app-shell-aside-offset"]="0px",o[r]["--app-shell-aside-transform"]=a,o[r]["--app-shell-aside-transform-rtl"]=c,o[r]["--app-shell-aside-scroll-locked-visibility"]="hidden"}}function rt({baseStyles:e,minMediaStyles:t,footer:o}){const s=o?.height,d="translateY(var(--app-shell-footer-height))",l=o?.offset??!0;if(B(s)){const a=m(y(s));e["--app-shell-footer-height"]=a,l&&(e["--app-shell-footer-offset"]=a)}P(s)&&(typeof s.base<"u"&&(e["--app-shell-footer-height"]=m(s.base),l&&(e["--app-shell-footer-offset"]=m(s.base))),N(s).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-footer-height"]=m(s[a]),l&&(t[a]["--app-shell-footer-offset"]=m(s[a])))})),o?.collapsed&&(e["--app-shell-footer-transform"]=d,e["--app-shell-footer-offset"]="0px !important")}function nt({baseStyles:e,minMediaStyles:t,header:o}){const s=o?.height,d="translateY(calc(var(--app-shell-header-height) * -1))",l=o?.offset??!0;if(B(s)){const a=m(y(s));e["--app-shell-header-height"]=a,l&&(e["--app-shell-header-offset"]=a)}P(s)&&(typeof s.base<"u"&&(e["--app-shell-header-height"]=m(s.base),l&&(e["--app-shell-header-offset"]=m(s.base))),N(s).forEach(a=>{a!=="base"&&(t[a]=t[a]||{},t[a]["--app-shell-header-height"]=m(s[a]),l&&(t[a]["--app-shell-header-offset"]=m(s[a])))})),o?.collapsed&&(e["--app-shell-header-transform"]=d,e["--app-shell-header-offset"]="0px !important")}function at({baseStyles:e,minMediaStyles:t,maxMediaStyles:o,navbar:s,theme:d}){const l=s?.width,a="translateX(calc(var(--app-shell-navbar-width) * -1))",c="translateX(var(--app-shell-navbar-width))";if(s?.breakpoint&&!s?.collapsed?.mobile&&(o[s?.breakpoint]=o[s?.breakpoint]||{},o[s?.breakpoint]["--app-shell-navbar-width"]="100%",o[s?.breakpoint]["--app-shell-navbar-offset"]="0px"),B(l)){const r=m(y(l));e["--app-shell-navbar-width"]=r,e["--app-shell-navbar-offset"]=r}if(P(l)&&(typeof l.base<"u"&&(e["--app-shell-navbar-width"]=m(l.base),e["--app-shell-navbar-offset"]=m(l.base)),N(l).forEach(r=>{r!=="base"&&(t[r]=t[r]||{},t[r]["--app-shell-navbar-width"]=m(l[r]),t[r]["--app-shell-navbar-offset"]=m(l[r]))})),s?.collapsed?.desktop){const r=s.breakpoint;t[r]=t[r]||{},t[r]["--app-shell-navbar-transform"]=a,t[r]["--app-shell-navbar-transform-rtl"]=c,t[r]["--app-shell-navbar-offset"]="0px !important"}if(s?.collapsed?.mobile){const r=ie(s.breakpoint,d.breakpoints)-.1;o[r]=o[r]||{},o[r]["--app-shell-navbar-width"]="100%",o[r]["--app-shell-navbar-offset"]="0px",o[r]["--app-shell-navbar-transform"]=a,o[r]["--app-shell-navbar-transform-rtl"]=c}}function L(e){return Number(e)===0?"0px":Ce(e)}function lt({padding:e,baseStyles:t,minMediaStyles:o}){B(e)&&(t["--app-shell-padding"]=L(y(e))),P(e)&&(e.base&&(t["--app-shell-padding"]=L(e.base)),N(e).forEach(s=>{s!=="base"&&(o[s]=o[s]||{},o[s]["--app-shell-padding"]=L(e[s]))}))}function it({navbar:e,header:t,footer:o,aside:s,padding:d,theme:l}){const a={},c={},r={};at({baseStyles:r,minMediaStyles:a,maxMediaStyles:c,navbar:e,theme:l}),ot({baseStyles:r,minMediaStyles:a,maxMediaStyles:c,aside:s,theme:l}),nt({baseStyles:r,minMediaStyles:a,header:t}),rt({baseStyles:r,minMediaStyles:a,footer:o}),lt({baseStyles:r,minMediaStyles:a,padding:d});const h=se(N(a),l.breakpoints).map(u=>({query:`(min-width: ${te(u.px)})`,styles:a[u.value]})),i=se(N(c),l.breakpoints).map(u=>({query:`(max-width: ${te(u.px)})`,styles:c[u.value]})),p=[...h,...i];return{baseStyles:r,media:p}}function ct({navbar:e,header:t,aside:o,footer:s,padding:d}){const l=ze(),a=ke(),{media:c,baseStyles:r}=it({navbar:e,header:t,footer:s,aside:o,padding:d,theme:l});return n.jsx(ye,{media:c,styles:r,selector:a.cssVariablesSelector})}const U=S((e,t)=>{const{classNames:o,className:s,style:d,styles:l,unstyled:a,vars:c,withBorder:r,zIndex:h,mod:i,...p}=v("AppShellNavbar",null,e),u=C();return u.disabled?null:n.jsx(x,{component:"nav",ref:t,mod:[{"with-border":r??u.withBorder},i],...u.getStyles("navbar",{className:s,classNames:o,styles:l,style:d}),...p,__vars:{"--app-shell-navbar-z-index":`calc(${h??u.zIndex} + 1)`}})});U.classes=w;U.displayName="@mantine/core/AppShellNavbar";const Y=Be((e,t)=>{const{classNames:o,className:s,style:d,styles:l,vars:a,grow:c,mod:r,...h}=v("AppShellSection",null,e),i=C();return n.jsx(x,{ref:t,mod:[{grow:c},r],...i.getStyles("section",{className:s,style:d,classNames:o,styles:l}),...h})});Y.classes=w;Y.displayName="@mantine/core/AppShellSection";function dt({transitionDuration:e,disabled:t}){const[o,s]=b.useState(!0),d=b.useRef(-1),l=b.useRef(-1);return Pe("resize",()=>{s(!0),clearTimeout(d.current),d.current=window.setTimeout(()=>b.startTransition(()=>{s(!1)}),200)}),Re(()=>{s(!0),clearTimeout(l.current),l.current=window.setTimeout(()=>b.startTransition(()=>{s(!1)}),e||0)},[t,e]),o}const ht={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:"ease",zIndex:Te("app")},pt=O((e,{transitionDuration:t,transitionTimingFunction:o})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":o}})),g=S((e,t)=>{const o=v("AppShell",ht,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,navbar:h,withBorder:i,padding:p,transitionDuration:u,transitionTimingFunction:V,header:z,zIndex:E,layout:R,disabled:F,aside:me,footer:be,offsetScrollbars:ge=!0,mod:ve,attributes:xe,...je}=o,ee=W({name:"AppShell",classes:w,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:xe,vars:r,varsResolver:pt}),Se=dt({disabled:F,transitionDuration:u});return n.jsxs(st,{value:{getStyles:ee,withBorder:i,zIndex:E,disabled:F,offsetScrollbars:ge},children:[n.jsx(ct,{navbar:h,header:z,aside:me,footer:be,padding:p}),n.jsx(x,{ref:t,...ee("root"),mod:[{resizing:Se,layout:R,disabled:F},ve],...je})]})});g.classes=w;g.displayName="@mantine/core/AppShell";g.Navbar=U;g.Header=Q;g.Main=G;g.Aside=K;g.Footer=X;g.Section=Y;var he={root:"m_fea6bf1a",burger:"m_d4fb9cad"};const ut=O((e,{color:t,size:o,lineSize:s,transitionDuration:d,transitionTimingFunction:l})=>({root:{"--burger-color":t?Ve(t,e):void 0,"--burger-size":ne(o,"burger-size"),"--burger-line-size":s?m(s):void 0,"--burger-transition-duration":d===void 0?void 0:`${d}ms`,"--burger-transition-timing-function":l}})),J=S((e,t)=>{const o=v("Burger",null,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,opened:h,children:i,transitionDuration:p,transitionTimingFunction:u,lineSize:V,attributes:z,...E}=o,R=W({name:"Burger",classes:he,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:z,vars:r,varsResolver:ut});return n.jsxs(_e,{...R("root"),ref:t,...E,children:[n.jsx(x,{mod:["reduce-motion",{opened:h}],...R("burger")}),i]})});J.classes=he;J.displayName="@mantine/core/Burger";var pe={root:"m_dc6f14e2"};const ft=O((e,{size:t})=>({root:{"--kbd-fz":ne(t,"kbd-fz")}})),M=S((e,t)=>{const o=v("Kbd",null,e),{classNames:s,className:d,style:l,styles:a,unstyled:c,vars:r,attributes:h,...i}=o,p=W({name:"Kbd",classes:pe,props:o,className:d,style:l,classNames:s,styles:a,unstyled:c,attributes:h,vars:r,varsResolver:ft});return n.jsx(x,{component:"kbd",ref:t,...p("root"),...i})});M.classes=pe;M.displayName="@mantine/core/Kbd";const mt=[["path",{d:"M9 6.371c0 4.418 -2.239 6.629 -5 6.629",key:"svg-0"}],["path",{d:"M4 6.371h7",key:"svg-1"}],["path",{d:"M5 9c0 2.144 2.252 3.908 6 4",key:"svg-2"}],["path",{d:"M12 20l4 -9l4 9",key:"svg-3"}],["path",{d:"M19.1 18h-6.2",key:"svg-4"}],["path",{d:"M6.694 3l.793 .582",key:"svg-5"}]],bt=A("outline","language","Language",mt);const gt=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M9 4v16",key:"svg-1"}],["path",{d:"M15 10l-2 2l2 2",key:"svg-2"}]],vt=A("outline","layout-sidebar-left-collapse","LayoutSidebarLeftCollapse",gt);const xt=[["path",{d:"M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M15 4v16",key:"svg-1"}],["path",{d:"M9 10l2 2l-2 2",key:"svg-2"}]],jt=A("outline","layout-sidebar-right-collapse","LayoutSidebarRightCollapse",xt);const St=[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]],re=A("outline","moon","Moon",St);const wt=[["path",{d:"M12 3c7.2 0 9 1.8 9 9s-1.8 9 -9 9s-9 -1.8 -9 -9s1.8 -9 9 -9z",key:"svg-0"}]],Nt=A("outline","square-rounded","SquareRounded",wt);const It=[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]],D=A("outline","sun","Sun",It),At=e=>{const[t,o]=T("alepha.ui.sidebar.opened");return n.jsx(J,{opened:t,onClick:()=>o(!t),hiddenFrom:"sm",size:"sm",...e})},ue=e=>{const{setColorScheme:t}=de(),o=tt("light"),[s,d]=b.useState("default"),l=e.mode??"minimal";b.useEffect(()=>{d(o)},[o]);const a=()=>{t(o==="dark"?"light":"dark")};return l==="segmented"?n.jsx(Me,{value:s,onChange:c=>t(c),data:[{value:"light",label:n.jsx(f,{h:20,align:"center",justify:"center",children:n.jsx(D,{size:16})})},{value:"dark",label:n.jsx(f,{h:20,align:"center",justify:"center",children:n.jsx(re,{size:16})})}],w:e.fullWidth?"100%":void 0,...e.segmentedProps}):n.jsx(I,{onClick:a,variant:e.variant??"subtle",size:e.size??"sm","aria-label":"Toggle color scheme",px:"xs",fullWidth:e.fullWidth??!1,icon:s==="dark"?D:s==="light"?re:D,...e.actionProps})},Ct=e=>{const t=Ye();return n.jsx(I,{variant:"default",icon:bt,menu:{items:t.languages.map(o=>({label:t.tr(o),onClick:()=>t.setLang(o),active:t.lang===o}))},...e.actionProps})},Z=e=>n.jsx(I,{variant:"default",onClick:Ee.open,justify:"space-between",rightSection:n.jsx(M,{visibleFrom:"sm",size:"sm",children:"⌘+K"}),radius:"md",...e.actionProps,children:n.jsxs(f,{align:"center",gap:"xs",children:[n.jsx(Fe,{size:16,color:"gray"}),n.jsx(f,{visibleFrom:"sm",miw:192,children:n.jsx(q,{size:"xs",c:"dimmed",children:"Search..."})})]})}),zt=e=>{const{items:t=[]}=e,o=(a,c)=>{if("type"in a){if(a.type==="burger")return n.jsx(At,{},c);if(a.type==="dark")return n.jsx(ue,{...a.props},c);if(a.type==="search")return n.jsx(Z,{...a.props},c);if(a.type==="lang")return n.jsx(Ct,{...a.props},c);if(a.type==="spacer")return n.jsx(f,{w:16},c);if(a.type==="divider")return n.jsx(Ze,{orientation:"vertical"},c)}return"element"in a?a.element:null},s=t.filter(a=>a.position==="left"),d=t.filter(a=>a.position==="center"),l=t.filter(a=>a.position==="right");return n.jsxs(f,{h:"100%",align:"center",px:"md",justify:"space-between",...e.flexProps,children:[n.jsx(f,{flex:1,children:s.map((a,c)=>n.jsx(f,{ml:c===0?0:"md",align:"center",children:o(a,c)},c))}),n.jsx(f,{children:d.map((a,c)=>n.jsx(f,{mx:"md",align:"center",children:o(a,c)},c))}),n.jsx(f,{flex:1,align:"center",justify:"end",children:l.map((a,c)=>n.jsx(f,{ml:c===0?0:"md",align:"center",children:o(a,c)},c))})]})},kt=()=>{const[e,t]=T("alepha.ui.sidebar.collapsed");return n.jsx(f,{children:n.jsx(I,{icon:e?n.jsx(jt,{}):n.jsx(vt,{}),variant:"subtle",size:"md",onClick:()=>t(!e),tooltip:{position:"right",label:e?"Show sidebar":"Hide sidebar"}})})},yt=e=>{const t=_(),{top:o=[],bottom:s=[],onItemClick:d}=e,l=(i,p)=>{if("type"in i){if(i.type==="spacer")return n.jsx(f,{h:16},p);if(i.type==="divider")return n.jsx(f,{h:1,bg:"var(--alepha-border)",my:"md",mx:"sm"},p);if(i.type==="search")return n.jsx(Z,{collapsed:e.collapsed},p);if(i.type==="toggle")return n.jsx(kt,{},p);if(i.type==="section")return e.collapsed?void 0:n.jsxs(f,{mt:"md",mb:"xs",align:"center",gap:"xs",children:[k(i.icon),n.jsx(q,{size:"xs",c:"dimmed",tt:"uppercase",fw:"bold",children:i.label},p)]},p)}return"element"in i?n.jsx(f,{children:i.element},p):i.can&&!i.can()?null:e.collapsed?n.jsx(Bt,{item:i,level:0,onItemClick:d,theme:e.theme??{}},p):n.jsx(fe,{item:i,level:0,onItemClick:d,theme:e.theme??{}},p)},a=()=>{if(e.menu)return e.menu;if(e.autoPopulateMenu){const i=t.concretePages.map(p=>({label:p.label??p.name,description:p.description?.slice(0,32),icon:k(p.icon),href:t.path(p.name)}));if(typeof e.autoPopulateMenu=="object"&&e.autoPopulateMenu.startsWith){const p=e.autoPopulateMenu.startsWith;return i.filter(u=>u.href?.startsWith(p))}}return[]},c="md",r=e.menu?e.gap:"xs",h=b.useMemo(()=>a(),[]);return n.jsxs(f,{flex:1,py:c,direction:"column",className:"overflow-auto",...e.flexProps,children:[n.jsxs(f,{gap:r,px:c,direction:"column",children:[o.map((i,p)=>l(i,p)),h.filter(i=>i.position==="top").map((i,p)=>l(i,p+o.length))]}),n.jsx(f,{gap:r,px:c,direction:"column",flex:1,className:"overflow-auto",children:h.filter(i=>!i.position).map((i,p)=>l(i,p))}),n.jsxs(f,{gap:r,px:c,direction:"column",children:[s.map((i,p)=>l(i,p)),h.filter(i=>i.position==="bottom").map((i,p)=>l(i,p+s.length))]})]})},fe=e=>{const{item:t,level:o}=e,s=2,d=_(),l=b.useCallback(h=>{if(!h.children)return!1;for(const i of h.children)if(i.href&&d.isActive(i.href)||l(i))return!0;return!1},[]),[a,c]=b.useState(l(t));if(ae({"react:transition:end":()=>{l(t)&&c(!0)}},[]),o>s)return null;const r=h=>{e.item.target||h.preventDefault(),t.children&&t.children.length>0?c(!a):(e.onItemClick?.(t),t.onClick?.())};return n.jsxs(f,{direction:"column",ps:o===0?0:32,pos:"relative",children:[n.jsx(I,{w:"100%",justify:"space-between",href:e.item.href,target:e.item.target,size:e.item.theme?.size??e.theme.button?.size??(o===0?"sm":"xs"),c:"var(--mantine-color-text)",color:"gray",variant:"subtle",variantActive:"default",radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:r,leftSection:n.jsxs(f,{w:"100%",align:"center",gap:"sm",children:[k(t.icon),n.jsxs(f,{direction:"column",children:[n.jsx(f,{children:t.label}),t.description&&n.jsx(q,{size:"xs",c:"dimmed",children:t.description})]})]}),rightSection:t.children?n.jsx(f,{children:a?n.jsx(Le,{size:14}):n.jsx(De,{size:14})}):e.item.rightSection,...e.item.actionProps}),t.children&&a&&n.jsxs(f,{direction:"column","data-parent-level":o,children:[n.jsx(f,{style:{position:"absolute",width:1,background:"linear-gradient(to bottom, transparent, var(--alepha-border), transparent)",top:48,left:20+32*o,bottom:16}}),t.children.filter(h=>!h.can||h.can()).map((h,i)=>n.jsx(fe,{item:h,level:o+1,onItemClick:e.onItemClick,theme:e.theme},i))]})]})},Bt=e=>{const{item:t,level:o}=e,s=_(),d=b.useCallback(r=>{if(!r.children)return!1;for(const h of r.children)if(h.href&&s.isActive(h.href)||d(h))return!0;return!1},[]),[l,a]=b.useState(d(t)),c=r=>{e.item.target||r.preventDefault(),t.children&&t.children.length>0?a(!l):(e.onItemClick?.(t),t.onClick?.())};return n.jsx(I,{size:e.item.theme?.size??e.theme.button?.size??(o===0?"sm":"xs"),variant:"subtle",variantActive:"default",tooltip:t.children?void 0:{label:t.label,position:"right"},radius:e.item.theme?.radius??e.theme.button?.radius??"md",onClick:c,icon:k(t.icon)??n.jsx(Nt,{}),href:e.item.href,target:e.item.target,menu:t.children?{position:"right",on:"hover",items:t.children.filter(r=>!r.can||r.can()).map(r=>({label:r.label,href:r.href,icon:k(r.icon),children:r.children?.filter(h=>!h.can||h.can())}))}:void 0,...e.item.actionProps})},Pt=e=>{const t=_(),[o,s]=T("alepha.ui.sidebar.opened"),[d]=T("alepha.ui.sidebar.collapsed",e.sidebarProps?.collapsed),l=()=>{if(e.noSidebarWhen?.paths){for(const z of e.noSidebarWhen.paths)if(t.isActive(z,{startWith:!0}))return!1}return!0},[a,c]=b.useState(l());ae({"react:transition:end":()=>{c(l())},"react:transition:begin":()=>{s(!1)}},[]);const r=[{position:"left",type:"burger"}],h=a&&e.sidebarProps!==void 0,i=h||e.appBarProps||e.header,p=i?60:0,u=e.footer?24:0,V=h?d?78:300:0;return n.jsxs(g,{w:"100%",flex:1,padding:"md",header:i?{height:60}:void 0,navbar:h?{width:d?{base:78}:{base:300},breakpoint:"sm",collapsed:{mobile:!o}}:void 0,footer:e.footer?{height:24}:void 0,...e.appShellProps,children:[n.jsx(g.Header,{bg:j.colors.surface,...e.appShellHeaderProps,children:e.header??n.jsx(zt,{items:r,...e.appBarProps})}),h&&n.jsx(g.Navbar,{bg:j.colors.surface,...e.appShellNavbarProps,children:n.jsx(yt,{collapsed:d,...e.sidebarProps??{}})}),n.jsx(g.Main,{pl:V,pt:p,pb:u,pr:0,display:"flex",flex:1,style:{flexDirection:"column"},...e.appShellMainProps,children:e.children??n.jsx(le,{})}),e.footer&&n.jsx(g.Footer,{bg:j.colors.surface,...e.appShellFooterProps,children:e.footer})]})},Ot=()=>n.jsx(Pt,{appShellProps:{withBorder:!1,bg:j.colors.background},appShellNavbarProps:{bg:j.colors.transparent},appShellHeaderProps:{bg:j.colors.transparent,style:{backdropFilter:"blur(10px)"}},sidebarProps:{gap:"xs",collapsed:!0,menu:[{label:"Dashboard",icon:n.jsx(He,{}),href:"/"},{type:"divider"},{label:"Actions",icon:n.jsx($e,{}),href:"/actions"},{label:"Queues",icon:n.jsx(We,{}),href:"/queues"},{label:"Topics",icon:n.jsx(Oe,{}),href:"/topics"},{label:"Caches",icon:n.jsx(qe,{}),href:"/caches"},{label:"DB Studio",icon:n.jsx(Ke,{}),href:"/db"},{type:"divider"},{label:"Environment",icon:n.jsx(Xe,{}),href:"/env"},{label:"Atoms",icon:n.jsx(Qe,{}),href:"/atoms"},{type:"divider"},{label:"Graph",icon:n.jsx(Ge,{}),href:"/graph"},{label:"Logs",icon:n.jsx(Ue,{}),href:"/logs"}]},appBarProps:{items:[{position:"left",type:"burger"},{position:"left",element:n.jsx(I,{intent:"none",icon:et,href:"/",active:!1,children:"Devtools"})},{position:"center",element:n.jsx(Z,{})},{position:"right",element:n.jsx(ue,{})}]},children:n.jsx(f,{className:"overflow-auto",w:"100%",flex:1,direction:"column",bd:`1px solid ${j.colors.border}`,bg:j.colors.elevated,ml:-16,mr:-16,mt:-16,style:{borderTopLeftRadius:16},children:n.jsx(le,{})})});export{Ot as DevLayout,Ot as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ap as t}from"./entry.
|
|
1
|
+
import{ap as t}from"./entry.Cjxjbqvs.js";const e=t.object({name:t.text(),group:t.text(),method:t.text(),path:t.text(),prefix:t.text(),fullPath:t.text(),description:t.optional(t.text()),summary:t.optional(t.text()),disabled:t.optional(t.boolean()),secure:t.optional(t.boolean()),hide:t.optional(t.boolean()),body:t.optional(t.any()),params:t.optional(t.any()),query:t.optional(t.any()),response:t.optional(t.any()),bodyContentType:t.optional(t.text())}),a=t.object({name:t.text(),description:t.optional(t.text()),schema:t.any(),defaultValue:t.optional(t.any()),currentValue:t.optional(t.any())}),o=t.object({name:t.text(),description:t.optional(t.text()),mimeTypes:t.optional(t.array(t.text())),maxSize:t.optional(t.number()),provider:t.text()}),n=t.object({name:t.text(),ttl:t.optional(t.any()),disabled:t.optional(t.boolean()),provider:t.text()}),r=t.object({name:t.text(),description:t.optional(t.text()),hidden:t.optional(t.boolean())}),i=t.object({name:t.text(),type:t.text(),nullable:t.boolean(),primaryKey:t.boolean(),identity:t.boolean(),createdAt:t.boolean(),updatedAt:t.boolean(),deletedAt:t.boolean(),version:t.boolean(),hasDefault:t.boolean(),ref:t.optional(t.object({entity:t.text(),column:t.text(),onUpdate:t.optional(t.text()),onDelete:t.optional(t.text())}))}),l=t.object({name:t.optional(t.text()),columns:t.array(t.text()),unique:t.boolean()}),c=t.object({name:t.optional(t.text()),columns:t.array(t.text()),foreignEntity:t.text(),foreignColumns:t.array(t.text())}),s=t.object({name:t.optional(t.text()),columns:t.array(t.text()),unique:t.boolean(),hasCheck:t.boolean()}),p=t.object({name:t.text(),provider:t.text(),columns:t.array(i),indexes:t.array(l),foreignKeys:t.array(c),constraints:t.array(s)}),d=t.object({propertyKey:t.text(),schema:t.any(),values:t.record(t.text(),t.any()),serviceName:t.optional(t.text())}),m=t.object({name:t.text(),providers:t.array(t.text())}),y=t.object({name:t.text(),description:t.optional(t.text()),path:t.optional(t.text()),params:t.optional(t.any()),query:t.optional(t.any()),hasComponent:t.boolean(),hasLazy:t.boolean(),hasResolve:t.boolean(),hasChildren:t.boolean(),hasParent:t.boolean(),hasErrorHandler:t.boolean(),static:t.optional(t.boolean()),cache:t.optional(t.any()),client:t.optional(t.any()),animation:t.optional(t.any())}),x=t.object({name:t.text(),module:t.optional(t.text()),dependencies:t.array(t.text()),aliases:t.optional(t.array(t.text()))}),b=t.object({name:t.text(),description:t.optional(t.text()),schema:t.optional(t.any()),provider:t.text()}),h=t.object({name:t.text(),description:t.optional(t.text()),roles:t.optional(t.array(t.any())),type:t.enum(["internal","external"]),settings:t.optional(t.object({accessTokenExpiration:t.optional(t.any()),refreshTokenExpiration:t.optional(t.any()),hasOnCreateSession:t.boolean(),hasOnRefreshSession:t.boolean(),hasOnDeleteSession:t.boolean()}))}),u=t.object({method:t.text(),path:t.text()}),v=t.object({name:t.text(),description:t.optional(t.text()),cron:t.optional(t.text()),interval:t.optional(t.any()),lock:t.optional(t.boolean())}),S=t.object({name:t.text(),description:t.optional(t.text()),schema:t.optional(t.any()),provider:t.text()}),M=t.object({actions:t.array(e),queues:t.array(b),schedulers:t.array(v),topics:t.array(S),buckets:t.array(o),realms:t.array(h),caches:t.array(n),pages:t.array(y),providers:t.array(x),modules:t.array(m),entities:t.array(p),commands:t.array(r),routes:t.array(u),envs:t.array(d),atoms:t.array(a)});export{M as d};
|
|
@@ -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.
|
|
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.Cjxjbqvs.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{w as B,j as e,ad as v,Y as D,Z as P,r as j,F as d,T as n,B as a,H as m,Q as C,ae as k,z as I,ac as w}from"./entry.
|
|
1
|
+
import{w as B,j as e,ad as v,Y as D,Z as P,r as j,F as d,T as n,B as a,H as m,Q as C,ae as k,z as I,ac as w}from"./entry.Cjxjbqvs.js";import{d as $}from"./chunk.XGXwPH1e.js";import{B as x,S as g}from"./chunk.uTsm7un3.js";import{T as f}from"./chunk.Ct5753mG.js";import{T as s}from"./chunk.aHk99chr.js";import"./chunk.BlqFPyLh.js";const A=[["path",{d:"M3 5a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-14z",key:"svg-0"}],["path",{d:"M3 10h18",key:"svg-1"}],["path",{d:"M10 3v18",key:"svg-2"}]],y=B("outline","table","Table",A),K=({column:i,size:r="xs"})=>{const t=[];return i.primaryKey&&t.push({label:"PK",tooltip:"Primary Key"}),i.identity&&t.push({label:"ID",tooltip:"Auto-increment Identity"}),i.ref&&t.push({label:"FK",tooltip:`Foreign Key → ${i.ref.entity}.${i.ref.column}`}),i.createdAt&&t.push({label:"C",tooltip:"Created At (auto-set on insert)"}),i.updatedAt&&t.push({label:"U",tooltip:"Updated At (auto-set on update)"}),i.deletedAt&&t.push({label:"D",tooltip:"Deleted At (soft delete)"}),i.version&&t.push({label:"V",tooltip:"Version (optimistic locking)"}),e.jsxs(e.Fragment,{children:[t.map(o=>e.jsx(v,{label:o.tooltip,children:e.jsx(x,{size:r,variant:"light",color:"blue",children:o.label})},o.label)),i.nullable&&e.jsx(v,{label:"Nullable",children:e.jsx(x,{size:r,variant:"outline",color:"gray",children:"?"})})]})},z={PostgresProvider:"#336791",SqliteProvider:"#003B57",DatabaseProvider:"#495057",default:"#495057"},S=i=>z[i]??z.default,N=({entities:i,selectedEntity:r,onSelectEntity:t,search:o,onSearchChange:T})=>{const u=j.useMemo(()=>{const l={};for(const c of i){const h=c.provider.replace("Provider","");l[h]||(l[h]=[]),l[h].push(c)}return l},[i]),b=Object.keys(u).sort();return e.jsxs(g,{gap:0,h:"100%",children:[e.jsx(a,{p:"sm",style:{borderBottom:`1px solid ${m.colors.border}`},children:e.jsx(k,{placeholder:"Search tables...",leftSection:e.jsx(I,{size:14}),size:"xs",value:o,onChange:l=>T(l.target.value)})}),e.jsx(w,{style:{flex:1},children:b.map(l=>e.jsxs(a,{children:[e.jsx(n,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:m.colors.background,borderBottom:`1px solid ${m.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:l}),u[l].map(c=>{const h=r?.name===c.name,p=S(c.provider);return e.jsxs(d,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>t(c),style:{cursor:"pointer",backgroundColor:h?`${p}15`:void 0,borderLeft:h?`2px solid ${p}`:"2px solid transparent",borderBottom:`1px solid ${m.colors.border}`},children:[e.jsx(y,{size:14,opacity:.5}),e.jsx(n,{size:"sm",style:{flex:1},truncate:!0,children:c.name}),e.jsx(n,{size:"xs",c:"dimmed",children:c.columns.length})]},c.name)})]},l))})]})},O=({entity:i})=>e.jsx(w,{h:"100%",p:"md",children:e.jsxs(g,{gap:"lg",children:[e.jsxs(a,{children:[e.jsx(n,{size:"sm",fw:600,mb:"xs",children:"Columns"}),e.jsxs(s,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(s.Thead,{children:e.jsxs(s.Tr,{children:[e.jsx(s.Th,{children:"Name"}),e.jsx(s.Th,{children:"Type"}),e.jsx(s.Th,{children:"Attributes"})]})}),e.jsx(s.Tbody,{children:i.columns.map(r=>e.jsxs(s.Tr,{children:[e.jsx(s.Td,{children:e.jsx(n,{size:"sm",ff:"monospace",fw:r.primaryKey?600:400,children:r.name})}),e.jsx(s.Td,{children:e.jsx(n,{size:"sm",ff:"monospace",c:"dimmed",children:r.type})}),e.jsx(s.Td,{children:e.jsx(d,{gap:4,wrap:"wrap",children:e.jsx(K,{column:r})})})]},r.name))})]})]}),i.indexes.length>0&&e.jsxs(a,{children:[e.jsx(n,{size:"sm",fw:600,mb:"xs",children:"Indexes"}),e.jsxs(s,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(s.Thead,{children:e.jsxs(s.Tr,{children:[e.jsx(s.Th,{children:"Name"}),e.jsx(s.Th,{children:"Columns"}),e.jsx(s.Th,{children:"Unique"})]})}),e.jsx(s.Tbody,{children:i.indexes.map((r,t)=>e.jsxs(s.Tr,{children:[e.jsx(s.Td,{children:e.jsx(n,{size:"sm",ff:"monospace",children:r.name||"-"})}),e.jsx(s.Td,{children:e.jsx(d,{gap:4,children:r.columns.map(o=>e.jsx(x,{size:"xs",variant:"light",children:o},o))})}),e.jsx(s.Td,{children:r.unique&&e.jsx(x,{size:"xs",color:"yellow",children:"UNIQUE"})})]},r.name||t))})]})]}),i.foreignKeys.length>0&&e.jsxs(a,{children:[e.jsx(n,{size:"sm",fw:600,mb:"xs",children:"Foreign Keys"}),e.jsxs(s,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(s.Thead,{children:e.jsxs(s.Tr,{children:[e.jsx(s.Th,{children:"Name"}),e.jsx(s.Th,{children:"Column"}),e.jsx(s.Th,{children:"References"})]})}),e.jsx(s.Tbody,{children:i.foreignKeys.map((r,t)=>e.jsxs(s.Tr,{children:[e.jsx(s.Td,{children:e.jsx(n,{size:"sm",ff:"monospace",children:r.name||"-"})}),e.jsx(s.Td,{children:e.jsx(n,{size:"sm",ff:"monospace",children:r.columns.join(", ")})}),e.jsx(s.Td,{children:e.jsxs(n,{size:"sm",ff:"monospace",c:"pink",children:[r.foreignEntity,".",r.foreignColumns.join(", ")]})})]},r.name||t))})]})]}),i.columns.some(r=>r.ref)&&e.jsxs(a,{children:[e.jsx(n,{size:"sm",fw:600,mb:"xs",children:"Column References"}),e.jsxs(s,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(s.Thead,{children:e.jsxs(s.Tr,{children:[e.jsx(s.Th,{children:"Column"}),e.jsx(s.Th,{children:"References"})]})}),e.jsx(s.Tbody,{children:i.columns.filter(r=>r.ref).map(r=>e.jsxs(s.Tr,{children:[e.jsx(s.Td,{children:e.jsx(n,{size:"sm",ff:"monospace",children:r.name})}),e.jsx(s.Td,{children:e.jsxs(n,{size:"sm",ff:"monospace",c:"pink",children:[r.ref?.entity,".",r.ref?.column]})})]},r.name))})]})]}),i.constraints.length>0&&e.jsxs(a,{children:[e.jsx(n,{size:"sm",fw:600,mb:"xs",children:"Constraints"}),e.jsxs(s,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:[e.jsx(s.Thead,{children:e.jsxs(s.Tr,{children:[e.jsx(s.Th,{children:"Name"}),e.jsx(s.Th,{children:"Columns"}),e.jsx(s.Th,{children:"Type"})]})}),e.jsx(s.Tbody,{children:i.constraints.map((r,t)=>e.jsxs(s.Tr,{children:[e.jsx(s.Td,{children:e.jsx(n,{size:"sm",ff:"monospace",children:r.name||"-"})}),e.jsx(s.Td,{children:e.jsx(d,{gap:4,children:r.columns.map(o=>e.jsx(x,{size:"xs",variant:"outline",children:o},o))})}),e.jsx(s.Td,{children:e.jsxs(d,{gap:4,children:[r.unique&&e.jsx(x,{size:"xs",color:"yellow",children:"UNIQUE"}),r.hasCheck&&e.jsx(x,{size:"xs",color:"blue",children:"CHECK"})]})})]},r.name||t))})]})]})]})}),R=()=>e.jsx(d,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(C,{size:48,opacity:.3}),e.jsx(n,{size:"sm",children:"Data browser coming soon"})]})}),H=({entity:i})=>{const r=S(i.provider);return e.jsxs(d,{direction:"column",h:"100%",children:[e.jsx(a,{px:"md",py:"sm",style:{borderBottom:`1px solid ${m.colors.border}`,backgroundColor:`${r}08`},children:e.jsxs(d,{align:"center",gap:"sm",children:[e.jsx(y,{size:18,opacity:.7}),e.jsx(n,{size:"md",fw:600,children:i.name}),e.jsxs(x,{size:"xs",variant:"light",color:"gray",children:[i.columns.length," columns"]})]})}),e.jsxs(f,{defaultValue:"structure",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(f.List,{px:"md",children:[e.jsx(f.Tab,{value:"structure",children:"Structure"}),e.jsx(f.Tab,{value:"data",children:"Data"})]}),e.jsx(f.Panel,{value:"structure",style:{flex:1,overflow:"hidden"},children:e.jsx(O,{entity:i})}),e.jsx(f.Panel,{value:"data",style:{flex:1,overflow:"hidden"},children:e.jsx(R,{})})]})]})},L=()=>e.jsx(d,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(y,{size:48,opacity:.3}),e.jsx(n,{size:"sm",children:"Select a table to view its structure"})]})}),U=()=>e.jsx(d,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(C,{size:48,opacity:.3}),e.jsx(n,{children:"No entities found"}),e.jsx(n,{size:"sm",c:"dimmed",children:"Add entities using $entity primitive to see them here"})]})}),Y=()=>{const i=D(P),[r,t]=j.useState([]),[o,T]=j.useState(!0),[u,b]=j.useState(null),[l,c]=j.useState("");j.useEffect(()=>{i.fetch("/devtools/api/metadata",{schema:{response:$}}).then(p=>{t(p.data.entities),T(!1)})},[]);const h=j.useMemo(()=>{if(!l)return r;const p=l.toLowerCase();return r.filter(E=>E.name.toLowerCase().includes(p))},[r,l]);return o?e.jsx(d,{align:"center",justify:"center",h:"100%",children:e.jsx(n,{c:"dimmed",children:"Loading..."})}):r.length===0?e.jsx(U,{}):e.jsxs(d,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(a,{w:240,style:{borderRight:`1px solid ${m.colors.border}`,backgroundColor:m.colors.surface},children:e.jsx(N,{entities:h,selectedEntity:u,onSelectEntity:b,search:l,onSearchChange:c})}),e.jsx(a,{style:{flex:1,overflow:"hidden"},children:u?e.jsx(H,{entity:u}):e.jsx(L,{})})]})};export{Y as DevDbStudio,Y as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as B,Z as L,r as c,j as e,F as t,T as r,B as x,H as a,ae as T,z as C,ac as S,P as v,ad as w,a5 as P,a9 as A}from"./entry.
|
|
1
|
+
import{Y as B,Z as L,r as c,j as e,F as t,T as r,B as x,H as a,ae as T,z as C,ac as S,P as v,ad as w,a5 as P,a9 as A}from"./entry.Cjxjbqvs.js";import{d as E}from"./chunk.XGXwPH1e.js";import{S as g,B as u}from"./chunk.uTsm7un3.js";import{I as M}from"./chunk.Ddpv5E_O.js";import{T as j}from"./chunk.Ct5753mG.js";import{T as n}from"./chunk.aHk99chr.js";import{a as O,I}from"./chunk.BkBlh2Dt.js";import{I as R}from"./chunk.CaVuq3Op.js";import"./chunk.BlqFPyLh.js";const z={memory:"#69db7c",redis:"#ff6b6b",default:"#495057"},$=s=>z[s]??z.default,D=s=>s?typeof s=="number"?s<60?`${s}s`:s<3600?`${Math.floor(s/60)}m`:s<86400?`${Math.floor(s/3600)}h`:`${Math.floor(s/86400)}d`:String(s):"No TTL",K=({caches:s,selectedCache:l,onSelectCache:p,search:f,onSearchChange:b})=>{const h=c.useMemo(()=>{const i={};for(const o of s){const d=o.provider||"default";i[d]||(i[d]=[]),i[d].push(o)}return i},[s]),y=Object.keys(h).sort();return e.jsxs(g,{gap:0,h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsx(T,{placeholder:"Search caches...",leftSection:e.jsx(C,{size:14}),size:"xs",value:f,onChange:i=>b(i.target.value)})}),e.jsx(S,{style:{flex:1},children:y.map(i=>e.jsxs(x,{children:[e.jsx(r,{size:"xs",fw:600,c:"dimmed",px:"sm",py:"xs",style:{backgroundColor:a.colors.background,borderBottom:`1px solid ${a.colors.border}`,textTransform:"uppercase",letterSpacing:"0.05em"},children:i}),h[i].map(o=>{const d=l?.name===o.name,m=$(o.provider);return e.jsxs(t,{align:"center",gap:"xs",px:"sm",py:6,onClick:()=>p(o),style:{cursor:"pointer",backgroundColor:d?`${m}15`:void 0,borderLeft:d?`2px solid ${m}`:"2px solid transparent",borderBottom:`1px solid ${a.colors.border}`,opacity:o.disabled?.5:1},children:[e.jsx(v,{size:14,opacity:.5}),e.jsx(r,{size:"sm",style:{flex:1},truncate:!0,children:o.name}),o.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"off"})]},o.name)})]},i))})]})},N=({cache:s})=>e.jsx(S,{h:"100%",p:"md",children:e.jsxs(g,{gap:"lg",children:[e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Configuration"}),e.jsx(n,{striped:!0,highlightOnHover:!0,withTableBorder:!0,children:e.jsxs(n.Tbody,{children:[e.jsxs(n.Tr,{children:[e.jsx(n.Td,{w:150,children:e.jsx(r,{size:"sm",c:"dimmed",children:"Name"})}),e.jsx(n.Td,{children:e.jsx(r,{size:"sm",ff:"monospace",children:s.name})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Provider"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"TTL"})}),e.jsx(n.Td,{children:e.jsxs(t,{align:"center",gap:"xs",children:[e.jsx(O,{size:14,opacity:.5}),e.jsx(r,{size:"sm",ff:"monospace",children:D(s.ttl)})]})})]}),e.jsxs(n.Tr,{children:[e.jsx(n.Td,{children:e.jsx(r,{size:"sm",c:"dimmed",children:"Status"})}),e.jsx(n.Td,{children:e.jsx(u,{size:"xs",variant:"light",color:s.disabled?"gray":"green",children:s.disabled?"Disabled":"Enabled"})})]})]})})]}),e.jsxs(x,{children:[e.jsx(r,{size:"sm",fw:600,mb:"xs",children:"Actions"}),e.jsx(t,{gap:"sm",children:e.jsx(w,{label:"Clear all cached entries (coming soon)",children:e.jsx(P,{size:"xs",variant:"light",color:"red",leftSection:e.jsx(I,{size:14}),disabled:!0,children:"Clear All"})})})]})]})}),F=({cache:s})=>{const[l,p]=c.useState("");return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{p:"sm",style:{borderBottom:`1px solid ${a.colors.border}`},children:e.jsxs(t,{gap:"sm",align:"center",children:[e.jsx(T,{placeholder:"Filter by pattern...",leftSection:e.jsx(C,{size:14}),size:"xs",value:l,onChange:f=>p(f.target.value),style:{flex:1}}),e.jsx(w,{label:"Invalidate matching keys (coming soon)",children:e.jsx(A,{size:"sm",variant:"light",color:"orange",disabled:!0,children:e.jsx(I,{size:14})})})]})}),e.jsx(t,{align:"center",justify:"center",style:{flex:1},c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(R,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Key browser coming soon"}),e.jsxs(r,{size:"xs",c:"dimmed",children:["Browse and manage cached keys for ",s.name]})]})})]})},H=({cache:s})=>{const l=$(s.provider);return e.jsxs(t,{direction:"column",h:"100%",children:[e.jsx(x,{px:"md",py:"sm",style:{borderBottom:`1px solid ${a.colors.border}`,backgroundColor:`${l}08`},children:e.jsxs(t,{align:"center",gap:"sm",children:[e.jsx(v,{size:18,opacity:.7}),e.jsx(r,{size:"md",fw:600,children:s.name}),e.jsx(u,{size:"xs",variant:"light",color:s.provider==="redis"?"red":"green",children:s.provider}),s.disabled&&e.jsx(u,{size:"xs",variant:"light",color:"gray",children:"disabled"})]})}),e.jsxs(j,{defaultValue:"config",style:{flex:1,display:"flex",flexDirection:"column"},children:[e.jsxs(j.List,{px:"md",children:[e.jsx(j.Tab,{value:"config",children:"Config"}),e.jsx(j.Tab,{value:"keys",children:"Keys"})]}),e.jsx(j.Panel,{value:"config",style:{flex:1,overflow:"hidden"},children:e.jsx(N,{cache:s})}),e.jsx(j.Panel,{value:"keys",style:{flex:1,overflow:"hidden"},children:e.jsx(F,{cache:s})})]})]})},V=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(v,{size:48,opacity:.3}),e.jsx(r,{size:"sm",children:"Select a cache to view its configuration"})]})}),Y=()=>e.jsx(t,{align:"center",justify:"center",h:"100%",c:"dimmed",children:e.jsxs(g,{align:"center",gap:"xs",children:[e.jsx(M,{size:48,opacity:.3}),e.jsx(r,{children:"No caches found"}),e.jsx(r,{size:"sm",c:"dimmed",children:"Add caches using $cache primitive to see them here"})]})}),ee=()=>{const s=B(L),[l,p]=c.useState([]),[f,b]=c.useState(!0),[h,y]=c.useState(null),[i,o]=c.useState("");c.useEffect(()=>{s.fetch("/devtools/api/metadata",{schema:{response:E}}).then(m=>{p(m.data.caches),b(!1)})},[]);const d=c.useMemo(()=>{if(!i)return l;const m=i.toLowerCase();return l.filter(k=>k.name.toLowerCase().includes(m))},[l,i]);return f?e.jsx(t,{align:"center",justify:"center",h:"100%",children:e.jsx(r,{c:"dimmed",children:"Loading..."})}):l.length===0?e.jsx(Y,{}):e.jsxs(t,{h:"100%",style:{overflow:"hidden"},children:[e.jsx(x,{w:240,style:{borderRight:`1px solid ${a.colors.border}`,backgroundColor:a.colors.surface},children:e.jsx(K,{caches:d,selectedCache:h,onSelectCache:y,search:i,onSearchChange:o})}),e.jsx(x,{style:{flex:1,overflow:"hidden"},children:h?e.jsx(H,{cache:h}):e.jsx(V,{})})]})};export{ee as DevCacheInspector,ee as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{at as oe,Y as re,a$ as De,r as f,A as z,b4 as je,aK as ke,x as Ie,b5 as Te,p as H,b as M,j as s,T as Ae,d as Pe,c as Ee,f as B,B as se,ay as K,aw as Ne,i as q,ah as ie,b6 as ae,U as ce,b7 as Re,$ as Le,b8 as Fe,q as Oe,a0 as _e,av as Be,a2 as Ke,aZ as $e,H as Ve,F as te,ad as ze,a5 as R,G as He,aa as qe}from"./entry.BY4L2Uc6.js";import{T as le}from"./chunk.OlMI8g2F.js";import{f as Ue,c as ue}from"./chunk.BlqFPyLh.js";import{P as L}from"./chunk.fpKvkQeU.js";import{A as Ge}from"./chunk.DinJSUfH.js";function de(t,o){const n=oe(),r=re(De),[a,i]=f.useState(!1),[e,c]=f.useState(),l=f.useRef(!1),u=f.useRef(void 0),d=f.useRef(void 0),y=f.useRef(!0),m=f.useRef(void 0);f.useEffect(()=>()=>{y.current=!1,u.current&&(r.clearTimeout(u.current),u.current=void 0),m.current&&(r.clearInterval(m.current),m.current=void 0),d.current&&(d.current.abort(),d.current=void 0)},[]);const v=f.useCallback(async(...g)=>{if(l.current)return;d.current&&d.current.abort();const b=new AbortController;d.current=b,l.current=!0,i(!0),c(void 0),await n.events.emit("react:action:begin",{type:"custom",id:t.id});try{const x=await t.handler(...g,{signal:b.signal});return!y.current||b.signal.aborted?void 0:(await n.events.emit("react:action:success",{type:"custom",id:t.id}),t.onSuccess&&await t.onSuccess(x),x)}catch(x){if(x instanceof Error&&x.name==="AbortError"||!y.current)return;const p=x;if(c(p),await n.events.emit("react:action:error",{type:"custom",id:t.id,error:p}),t.onError)await t.onError(p);else throw p}finally{l.current=!1,i(!1),await n.events.emit("react:action:end",{type:"custom",id:t.id}),d.current===b&&(d.current=void 0)}},[...o,t.id,t.onError,t.onSuccess]),w=f.useCallback(async(...g)=>t.debounce?(u.current&&r.clearTimeout(u.current),new Promise(b=>{u.current=r.createTimeout(async()=>{const x=await v(...g);b(x)},t.debounce??0)})):v(...g),[v,t.debounce]),h=f.useCallback(()=>{u.current&&(r.clearTimeout(u.current),u.current=void 0),d.current&&(d.current.abort(),d.current=void 0),y.current&&(l.current=!1,i(!1))},[]);return f.useEffect(()=>{t.runOnInit&&w()},o),f.useEffect(()=>{if(t.runEvery)return m.current=r.createInterval(()=>w(),t.runEvery,!0),()=>{m.current&&(r.clearInterval(m.current),m.current=void 0)}},[w,t.runEvery]),{run:w,loading:a,error:e,cancel:h}}const We=t=>{const o=z(),[n,r]=f.useState(!1);je().url.pathname;const i=typeof t=="string"?{href:t}:{...t,href:t.href},e=i.href,c=o.isActive(e,i);return{isPending:n,isActive:c,anchorProps:{href:o.base(e),onClick:async l=>{if(l?.stopPropagation(),l?.preventDefault(),!c&&!n){r(!0);try{await o.go(e)}finally{r(!1)}}}}}},me=(t,o=["loading","dirty","error"])=>{const n=oe(),r=o,[a,i]=f.useState(!1),[e,c]=f.useState(!1),[l,u]=f.useState(void 0),[d,y]=f.useState(void 0),m="form"in t?t.form:t,v="path"in t?t.path:void 0,w=r.includes("values"),h=r.includes("error"),g=r.includes("dirty"),b=r.includes("loading");return f.useEffect(()=>{const x=[];return(h||w||g)&&x.push(n.events.on("form:change",p=>{p.id===m.id&&((!v||p.path===v)&&(g&&i(!0),h&&u(void 0)),w&&y(m.currentValues))})),w&&x.push(n.events.on("form:reset",p=>{p.id===m.id&&y(p.values)})),b&&x.push(n.events.on("form:submit:begin",p=>{p.id===m.id&&c(!0)}),n.events.on("form:submit:end",p=>{p.id===m.id&&c(!1)})),(w||g)&&x.push(n.events.on("form:submit:success",p=>{p.id===m.id&&(w&&y(p.values),g&&i(!1))})),h&&x.push(n.events.on("form:submit:error",p=>{p.id===m.id&&(!v||p.error instanceof ke&&p.error.value.path===v)&&u(p.error)})),()=>{for(const p of x)p()}},[]),{dirty:a,loading:e,error:l,values:d}},ht=()=>(Ie("alepha.react.i18n.lang"),re(Te));function C(t,o){return n=>{t?.(n),o?.(n)}}function Ye(t,o,n){return n?Array.from(Ue(n,o)?.querySelectorAll(t)||[]).findIndex(r=>r===n):null}function Ze(t=!1,o={}){const[n,r]=f.useState(t),a=f.useCallback(()=>{r(c=>c||(o.onOpen?.(),!0))},[o.onOpen]),i=f.useCallback(()=>{r(c=>c&&(o.onClose?.(),!1))},[o.onClose]),e=f.useCallback(()=>{n?i():a()},[i,a,n]);return[n,{open:a,close:i,toggle:e}]}function fe({open:t,close:o,openDelay:n,closeDelay:r}){const a=f.useRef(-1),i=f.useRef(-1),e=()=>{window.clearTimeout(a.current),window.clearTimeout(i.current)},c=()=>{e(),n===0||n===void 0?t():a.current=window.setTimeout(t,n)},l=()=>{e(),r===0||r===void 0?o():i.current=window.setTimeout(o,r)};return f.useEffect(()=>e,[]),{openDropdown:c,closeDropdown:l}}var he={root:"m_849cf0da"};const Je={underline:"hover"},U=H((t,o)=>{const{underline:n,className:r,unstyled:a,mod:i,...e}=M("Anchor",Je,t);return s.jsx(Ae,{component:"a",ref:o,className:Pe({[he.root]:!a},r),...e,mod:[{underline:n},i],__staticSelector:"Anchor",unstyled:a})});U.classes=he;U.displayName="@mantine/core/Anchor";const[Qe,k]=Ee("Menu component was not found in the tree");var I={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const G=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,...c}=M("MenuDivider",null,t),l=k();return s.jsx(se,{ref:o,...l.getStyles("divider",{className:r,style:a,styles:i,classNames:n}),...c})});G.classes=I;G.displayName="@mantine/core/MenuDivider";const W=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:d,...y}=M("MenuDropdown",null,t),m=f.useRef(null),v=k(),w=C(u,b=>{(b.key==="ArrowUp"||b.key==="ArrowDown")&&(b.preventDefault(),m.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),h=C(c,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),g=C(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return s.jsxs(L.Dropdown,{...y,onMouseEnter:h,onMouseLeave:g,role:"menu","aria-orientation":"vertical",ref:K(o,m),...v.getStyles("dropdown",{className:r,style:a,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:w,children:[v.withInitialFocusPlaceholder&&s.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});W.classes=I;W.displayName="@mantine/core/MenuDropdown";const[Xe,$]=Ne(),Y=H((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,color:c,closeMenuOnClick:l,leftSection:u,rightSection:d,children:y,disabled:m,"data-disabled":v,...w}=M("MenuItem",null,t),h=k(),g=$(),b=q(),{dir:x}=ie(),p=f.useRef(null),D=w,T=C(D.onClick,()=>{v||(typeof l=="boolean"?l&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),j=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,A=c?ae({color:c,theme:b}):null,O=C(D.onKeyDown,P=>{P.key==="ArrowLeft"&&g&&(g.close(),g.focusParentItem())});return s.jsxs(ce,{onMouseDown:P=>P.preventDefault(),...w,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles("item",{className:r,style:a,styles:i,classNames:n}),ref:K(p,o),role:"menuitem",disabled:m,"data-menu-item":!0,"data-disabled":m||v||void 0,"data-mantine-stop-propagation":!0,onClick:T,onKeyDown:ue({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:h.loop,dir:x,orientation:"vertical",onKeyDown:O}),__vars:{"--menu-item-color":A?.isThemeColor&&A?.shade===void 0?`var(--mantine-color-${A.color}-6)`:j?.color,"--menu-item-hover":j?.hover},children:[u&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:u}),y&&s.jsx("div",{...h.getStyles("itemLabel",{styles:i,classNames:n}),children:y}),d&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:d})]})});Y.classes=I;Y.displayName="@mantine/core/MenuItem";const Z=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,...c}=M("MenuLabel",null,t),l=k();return s.jsx(se,{ref:o,...l.getStyles("label",{className:r,style:a,styles:i,classNames:n}),...c})});Z.classes=I;Z.displayName="@mantine/core/MenuLabel";const J=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:d,...y}=M("MenuSubDropdown",null,t),m=f.useRef(null),v=k(),w=$(),h=C(c,w?.open),g=C(l,w?.close);return s.jsx(L.Dropdown,{...y,onMouseEnter:h,onMouseLeave:g,role:"menu","aria-orientation":"vertical",ref:K(o,m),...v.getStyles("dropdown",{className:r,style:a,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:d})});J.classes=I;J.displayName="@mantine/core/MenuSubDropdown";const Q=H((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,color:c,leftSection:l,rightSection:u,children:d,disabled:y,"data-disabled":m,closeMenuOnClick:v,...w}=M("MenuSubItem",null,t),h=k(),g=$(),b=q(),{dir:x}=ie(),p=f.useRef(null),D=w,T=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,j=c?ae({color:c,theme:b}):null,A=C(D.onKeyDown,N=>{N.key==="ArrowRight"&&(g?.open(),g?.focusFirstItem()),N.key==="ArrowLeft"&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),O=C(D.onClick,()=>{!m&&v&&h.closeDropdownImmediately()}),P=C(D.onMouseEnter,g?.open),E=C(D.onMouseLeave,g?.close);return s.jsxs(ce,{onMouseDown:N=>N.preventDefault(),...w,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles("item",{className:r,style:a,styles:i,classNames:n}),ref:K(p,o),role:"menuitem",disabled:y,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":y||m||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:P,onMouseLeave:E,onClick:O,onKeyDown:ue({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:h.loop,dir:x,orientation:"vertical",onKeyDown:A}),__vars:{"--menu-item-color":j?.isThemeColor&&j?.shade===void 0?`var(--mantine-color-${j.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[l&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:l}),d&&s.jsx("div",{...h.getStyles("itemLabel",{styles:i,classNames:n}),children:d}),s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:u||s.jsx(Ge,{...h.getStyles("chevron"),size:14})})]})});Q.classes=I;Q.displayName="@mantine/core/MenuSubItem";function pe({children:t,refProp:o}){if(!Re(t))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return k(),s.jsx(L.Target,{refProp:o,popupType:"menu",children:t})}pe.displayName="@mantine/core/MenuSubTarget";const et={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function F(t){const{children:o,closeDelay:n,openDelay:r,...a}=M("MenuSub",et,t),i=Le(),[e,{open:c,close:l}]=Ze(!1),u=$(),{openDropdown:d,closeDropdown:y}=fe({open:c,close:l,closeDelay:n,openDelay:r}),m=()=>window.setTimeout(()=>{document.getElementById(`${i}-dropdown`)?.querySelectorAll("[data-menu-item]:not([data-disabled])")[0]?.focus()},16),v=()=>window.setTimeout(()=>{document.getElementById(`${i}-target`)?.focus()},16);return s.jsx(Xe,{value:{opened:e,close:y,open:d,focusFirstItem:m,focusParentItem:v,parentContext:u},children:s.jsx(L,{opened:e,withinPortal:!1,withArrow:!1,id:i,...a,children:o})})}F.extend=t=>t;F.displayName="@mantine/core/MenuSub";F.Target=pe;F.Dropdown=J;F.Item=Q;const tt={refProp:"ref"},ve=f.forwardRef((t,o)=>{const{children:n,refProp:r,...a}=M("MenuTarget",tt,t),i=Fe(n);if(!i)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const e=k(),c=i.props,l=C(c.onClick,()=>{e.trigger==="click"?e.toggleDropdown():e.trigger==="click-hover"&&(e.setOpenedViaClick(!0),e.opened||e.openDropdown())}),u=C(c.onMouseEnter,()=>(e.trigger==="hover"||e.trigger==="click-hover")&&e.openDropdown()),d=C(c.onMouseLeave,()=>{(e.trigger==="hover"||e.trigger==="click-hover"&&!e.openedViaClick)&&e.closeDropdown()});return s.jsx(L.Target,{refProp:r,popupType:"menu",ref:o,...a,children:f.cloneElement(i,{onClick:l,onMouseEnter:u,onMouseLeave:d,"data-expanded":e.opened?!0:void 0})})});ve.displayName="@mantine/core/MenuTarget";const nt={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function S(t){const o=M("Menu",nt,t),{children:n,onOpen:r,onClose:a,opened:i,defaultOpened:e,trapFocus:c,onChange:l,closeOnItemClick:u,loop:d,closeOnEscape:y,trigger:m,openDelay:v,closeDelay:w,classNames:h,styles:g,unstyled:b,variant:x,vars:p,menuItemTabIndex:D,keepMounted:T,withInitialFocusPlaceholder:j,attributes:A,...O}=o,P=Oe({name:"Menu",classes:I,props:o,classNames:h,styles:g,unstyled:b,attributes:A}),[E,N]=_e({value:i,defaultValue:e,finalValue:!1,onChange:l}),[ye,X]=f.useState(!1),_=()=>{N(!1),X(!1),E&&a?.()},V=()=>{N(!0),!E&&r?.()},ee=()=>{E?_():V()},{openDropdown:be,closeDropdown:we}=fe({open:V,close:_,closeDelay:w,openDelay:v}),xe=Me=>Ye("[data-menu-item]","[data-menu-dropdown]",Me),{resolvedClassNames:Se,resolvedStyles:Ce}=Be({classNames:h,styles:g,props:o});return s.jsx(Qe,{value:{getStyles:P,opened:E,toggleDropdown:ee,getItemIndex:xe,openedViaClick:ye,setOpenedViaClick:X,closeOnItemClick:u,closeDropdown:m==="click"?_:we,openDropdown:m==="click"?V:be,closeDropdownImmediately:_,loop:d,trigger:m,unstyled:b,menuItemTabIndex:D,withInitialFocusPlaceholder:j},children:s.jsx(L,{returnFocus:!0,...O,opened:E,onChange:ee,defaultOpened:e,trapFocus:T?!1:c,closeOnEscape:y,__staticSelector:"Menu",classNames:Se,styles:Ce,unstyled:b,variant:x,keepMounted:T,children:n})})}S.extend=t=>t;S.withProps=Ke(S);S.classes=I;S.displayName="@mantine/core/Menu";S.Item=Y;S.Label=Z;S.Dropdown=W;S.Target=ve;S.Divider=G;S.Sub=F;const ge=t=>{const{item:o,index:n}=t,r=z(),a=de({handler:async e=>{await o.onClick?.()}},[o.onClick]);if(o.type==="divider")return s.jsx(S.Divider,{},n);if(o.type==="label")return s.jsx(S.Label,{children:o.label},n);if(o.children&&o.children.length>0)return s.jsxs(S,{trigger:"hover",position:"right-start",offset:2,children:[s.jsx(S.Target,{children:s.jsx(S.Item,{leftSection:o.icon,rightSection:s.jsx(He,{size:14}),children:o.label})}),s.jsx(S.Dropdown,{children:o.children.map((e,c)=>s.jsx(ge,{item:e,index:c},c))})]},n);const i={};return t.item.onClick?i.onClick=a.run:t.item.href&&Object.assign(i,r.anchor(t.item.href)),s.jsx(S.Item,{leftSection:o.icon,onClick:o.onClick,color:o.color,rightSection:o.active?s.jsx(le,{size:"xs",variant:"transparent",children:s.jsx(qe,{})}):void 0,...i,children:o.label},n)},ne=t=>{const o=q(),n={...t},{tooltip:r,menu:a,icon:i,...e}=n;if(n.variant==="subtle"&&(e.c??="var(--mantine-color-text)",e.color??="gray"),n.intent&&(n.intent==="none"?(e.c??="var(--mantine-color-text)",e.color??="gray"):n.intent==="primary"?(e.c??="white",e.color??=o.primaryColor):n.intent==="success"?(e.c??="white",e.color??="green"):n.intent==="danger"?(e.c??="white",e.color??="red"):n.intent==="warning"?(e.c??="var(--mantine-color-text)",e.color??="yellow"):n.intent==="info"&&(e.c??="white",e.color??="blue")),n.icon){const u=$e(n.icon)?s.jsx(n.icon,{size:Ve.sizes.icon.md}):s.jsx(le,{w:24,variant:"transparent",size:"sm",c:"var(--mantine-color-text)",...n.themeIconProps,children:n.icon});n.children?e.leftSection=u:(e.children=f.Children.only(u),e.px??="xs")}if(n.leftSection&&!n.children&&(e.px??="xs"),n.textVisibleFrom){const{children:u,textVisibleFrom:d,leftSection:y,...m}=e;return s.jsxs(s.Fragment,{children:[s.jsx(te,{w:"100%",visibleFrom:d,children:s.jsx(ne,{flex:1,...m,leftSection:y,tooltip:r,menu:a,children:u})}),s.jsx(te,{w:"100%",hiddenFrom:d,children:s.jsx(ne,{px:"xs",...m,tooltip:r,menu:a,children:y})})]})}let l="href"in e&&e.href?e.href.startsWith("http")||e.target?s.jsx(ct,{...e,href:e.href,children:e.children}):s.jsx(at,{...e,href:e.href,children:e.children}):(delete e.classNameActive,delete e.variantActive,"action"in e&&e.action?s.jsx(st,{...e,action:e.action,children:e.children}):"onClick"in e&&e.onClick?s.jsx(it,{...e,onClick:e.onClick,children:e.children}):"form"in e&&e.form?e.type==="reset"?s.jsx(rt,{...e,form:e.form,children:e.children}):s.jsx(ot,{...e,form:e.form,children:e.children}):s.jsx(R,{...e,children:e.children}));if(a&&(l=s.jsxs(S,{position:a.position||"bottom-start",width:a.width||200,shadow:a.shadow||"md",trigger:a.on==="hover"?"hover":"click",...a.menuProps,children:[s.jsx(S.Target,{...a.targetProps,children:l}),s.jsx(S.Dropdown,{children:a.items.map((u,d)=>s.jsx(ge,{item:u,index:d},d))})]})),r){const u={openDelay:1e3},d=typeof r=="string"||typeof r=="number"?{...u,label:r,children:l}:{...u,...r,children:l};return s.jsx(ze,{...d})}return l},ot=t=>{const{form:o,...n}=t,r=me(o);return s.jsx(R,{...n,loading:r.loading,disabled:r.loading,type:"submit",children:t.children})},rt=t=>{const{form:o,...n}=t,r=me(o);return s.jsx(R,{...n,disabled:r.loading,type:"reset",children:t.children})},st=t=>{const{action:o,...n}=t;return s.jsx(R,{...n,disabled:o.loading||t.disabled,loading:o.loading,onClick:()=>o.run(),children:t.children})},it=t=>{const o=de({handler:async n=>{await t.onClick(n)}},[t.onClick]);return s.jsx(R,{...t,disabled:o.loading||t.disabled,loading:o.loading,onClick:o.run,children:t.children})},at=t=>{const{active:o,classNameActive:n,variantActive:r,routerGoOptions:a,...i}=t,e=z(),{isPending:c,isActive:l}=We(o?{href:t.href,...o}:{href:t.href}),u=e.anchor(t.href,a),d=i.className||"";return l&&o!==!1&&n&&(i.className=`${d} ${n}`.trim()),t.anchorProps?s.jsx(U,{component:"a",...u,...t.anchorProps,children:t.children}):s.jsx(R,{component:"a",loading:c,...i,...u,variant:l&&o!==!1?r??"filled":i.variant??"subtle",children:t.children})},ct=t=>{const{active:o,classNameActive:n,variantActive:r,routerGoOptions:a,target:i,...e}=t;return s.jsx(R,{component:"a",target:i,...e,children:t.children})};export{ne as A,Ze as a,me as b,C as c,ht as u};
|
|
1
|
+
import{at as oe,Y as re,a$ as De,r as f,A as z,b4 as je,aK as ke,x as Ie,b5 as Te,p as H,b as M,j as s,T as Ae,d as Pe,c as Ee,f as B,B as se,ay as K,aw as Ne,i as q,ah as ie,b6 as ae,U as ce,b7 as Re,$ as Le,b8 as Fe,q as Oe,a0 as _e,av as Be,a2 as Ke,aZ as $e,H as Ve,F as te,ad as ze,a5 as R,G as He,aa as qe}from"./entry.Cjxjbqvs.js";import{T as le}from"./chunk.Djkuv-DD.js";import{f as Ue,c as ue}from"./chunk.BlqFPyLh.js";import{P as L}from"./chunk.DtstekP0.js";import{A as Ge}from"./chunk.Duwrcaca.js";function de(t,o){const n=oe(),r=re(De),[a,i]=f.useState(!1),[e,c]=f.useState(),l=f.useRef(!1),u=f.useRef(void 0),d=f.useRef(void 0),y=f.useRef(!0),m=f.useRef(void 0);f.useEffect(()=>()=>{y.current=!1,u.current&&(r.clearTimeout(u.current),u.current=void 0),m.current&&(r.clearInterval(m.current),m.current=void 0),d.current&&(d.current.abort(),d.current=void 0)},[]);const v=f.useCallback(async(...g)=>{if(l.current)return;d.current&&d.current.abort();const b=new AbortController;d.current=b,l.current=!0,i(!0),c(void 0),await n.events.emit("react:action:begin",{type:"custom",id:t.id});try{const x=await t.handler(...g,{signal:b.signal});return!y.current||b.signal.aborted?void 0:(await n.events.emit("react:action:success",{type:"custom",id:t.id}),t.onSuccess&&await t.onSuccess(x),x)}catch(x){if(x instanceof Error&&x.name==="AbortError"||!y.current)return;const p=x;if(c(p),await n.events.emit("react:action:error",{type:"custom",id:t.id,error:p}),t.onError)await t.onError(p);else throw p}finally{l.current=!1,i(!1),await n.events.emit("react:action:end",{type:"custom",id:t.id}),d.current===b&&(d.current=void 0)}},[...o,t.id,t.onError,t.onSuccess]),w=f.useCallback(async(...g)=>t.debounce?(u.current&&r.clearTimeout(u.current),new Promise(b=>{u.current=r.createTimeout(async()=>{const x=await v(...g);b(x)},t.debounce??0)})):v(...g),[v,t.debounce]),h=f.useCallback(()=>{u.current&&(r.clearTimeout(u.current),u.current=void 0),d.current&&(d.current.abort(),d.current=void 0),y.current&&(l.current=!1,i(!1))},[]);return f.useEffect(()=>{t.runOnInit&&w()},o),f.useEffect(()=>{if(t.runEvery)return m.current=r.createInterval(()=>w(),t.runEvery,!0),()=>{m.current&&(r.clearInterval(m.current),m.current=void 0)}},[w,t.runEvery]),{run:w,loading:a,error:e,cancel:h}}const We=t=>{const o=z(),[n,r]=f.useState(!1);je().url.pathname;const i=typeof t=="string"?{href:t}:{...t,href:t.href},e=i.href,c=o.isActive(e,i);return{isPending:n,isActive:c,anchorProps:{href:o.base(e),onClick:async l=>{if(l?.stopPropagation(),l?.preventDefault(),!c&&!n){r(!0);try{await o.go(e)}finally{r(!1)}}}}}},me=(t,o=["loading","dirty","error"])=>{const n=oe(),r=o,[a,i]=f.useState(!1),[e,c]=f.useState(!1),[l,u]=f.useState(void 0),[d,y]=f.useState(void 0),m="form"in t?t.form:t,v="path"in t?t.path:void 0,w=r.includes("values"),h=r.includes("error"),g=r.includes("dirty"),b=r.includes("loading");return f.useEffect(()=>{const x=[];return(h||w||g)&&x.push(n.events.on("form:change",p=>{p.id===m.id&&((!v||p.path===v)&&(g&&i(!0),h&&u(void 0)),w&&y(m.currentValues))})),w&&x.push(n.events.on("form:reset",p=>{p.id===m.id&&y(p.values)})),b&&x.push(n.events.on("form:submit:begin",p=>{p.id===m.id&&c(!0)}),n.events.on("form:submit:end",p=>{p.id===m.id&&c(!1)})),(w||g)&&x.push(n.events.on("form:submit:success",p=>{p.id===m.id&&(w&&y(p.values),g&&i(!1))})),h&&x.push(n.events.on("form:submit:error",p=>{p.id===m.id&&(!v||p.error instanceof ke&&p.error.value.path===v)&&u(p.error)})),()=>{for(const p of x)p()}},[]),{dirty:a,loading:e,error:l,values:d}},ht=()=>(Ie("alepha.react.i18n.lang"),re(Te));function C(t,o){return n=>{t?.(n),o?.(n)}}function Ye(t,o,n){return n?Array.from(Ue(n,o)?.querySelectorAll(t)||[]).findIndex(r=>r===n):null}function Ze(t=!1,o={}){const[n,r]=f.useState(t),a=f.useCallback(()=>{r(c=>c||(o.onOpen?.(),!0))},[o.onOpen]),i=f.useCallback(()=>{r(c=>c&&(o.onClose?.(),!1))},[o.onClose]),e=f.useCallback(()=>{n?i():a()},[i,a,n]);return[n,{open:a,close:i,toggle:e}]}function fe({open:t,close:o,openDelay:n,closeDelay:r}){const a=f.useRef(-1),i=f.useRef(-1),e=()=>{window.clearTimeout(a.current),window.clearTimeout(i.current)},c=()=>{e(),n===0||n===void 0?t():a.current=window.setTimeout(t,n)},l=()=>{e(),r===0||r===void 0?o():i.current=window.setTimeout(o,r)};return f.useEffect(()=>e,[]),{openDropdown:c,closeDropdown:l}}var he={root:"m_849cf0da"};const Je={underline:"hover"},U=H((t,o)=>{const{underline:n,className:r,unstyled:a,mod:i,...e}=M("Anchor",Je,t);return s.jsx(Ae,{component:"a",ref:o,className:Pe({[he.root]:!a},r),...e,mod:[{underline:n},i],__staticSelector:"Anchor",unstyled:a})});U.classes=he;U.displayName="@mantine/core/Anchor";const[Qe,k]=Ee("Menu component was not found in the tree");var I={dropdown:"m_dc9b7c9f",label:"m_9bfac126",divider:"m_efdf90cb",item:"m_99ac2aa1",itemLabel:"m_5476e0d3",itemSection:"m_8b75e504",chevron:"m_b85b0bed"};const G=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,...c}=M("MenuDivider",null,t),l=k();return s.jsx(se,{ref:o,...l.getStyles("divider",{className:r,style:a,styles:i,classNames:n}),...c})});G.classes=I;G.displayName="@mantine/core/MenuDivider";const W=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:d,...y}=M("MenuDropdown",null,t),m=f.useRef(null),v=k(),w=C(u,b=>{(b.key==="ArrowUp"||b.key==="ArrowDown")&&(b.preventDefault(),m.current?.querySelectorAll("[data-menu-item]:not(:disabled)")[0]?.focus())}),h=C(c,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.openDropdown()),g=C(l,()=>(v.trigger==="hover"||v.trigger==="click-hover")&&v.closeDropdown());return s.jsxs(L.Dropdown,{...y,onMouseEnter:h,onMouseLeave:g,role:"menu","aria-orientation":"vertical",ref:K(o,m),...v.getStyles("dropdown",{className:r,style:a,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:w,children:[v.withInitialFocusPlaceholder&&s.jsx("div",{tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),d]})});W.classes=I;W.displayName="@mantine/core/MenuDropdown";const[Xe,$]=Ne(),Y=H((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,color:c,closeMenuOnClick:l,leftSection:u,rightSection:d,children:y,disabled:m,"data-disabled":v,...w}=M("MenuItem",null,t),h=k(),g=$(),b=q(),{dir:x}=ie(),p=f.useRef(null),D=w,T=C(D.onClick,()=>{v||(typeof l=="boolean"?l&&h.closeDropdownImmediately():h.closeOnItemClick&&h.closeDropdownImmediately())}),j=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,A=c?ae({color:c,theme:b}):null,O=C(D.onKeyDown,P=>{P.key==="ArrowLeft"&&g&&(g.close(),g.focusParentItem())});return s.jsxs(ce,{onMouseDown:P=>P.preventDefault(),...w,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles("item",{className:r,style:a,styles:i,classNames:n}),ref:K(p,o),role:"menuitem",disabled:m,"data-menu-item":!0,"data-disabled":m||v||void 0,"data-mantine-stop-propagation":!0,onClick:T,onKeyDown:ue({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:h.loop,dir:x,orientation:"vertical",onKeyDown:O}),__vars:{"--menu-item-color":A?.isThemeColor&&A?.shade===void 0?`var(--mantine-color-${A.color}-6)`:j?.color,"--menu-item-hover":j?.hover},children:[u&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:u}),y&&s.jsx("div",{...h.getStyles("itemLabel",{styles:i,classNames:n}),children:y}),d&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:d})]})});Y.classes=I;Y.displayName="@mantine/core/MenuItem";const Z=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,...c}=M("MenuLabel",null,t),l=k();return s.jsx(se,{ref:o,...l.getStyles("label",{className:r,style:a,styles:i,classNames:n}),...c})});Z.classes=I;Z.displayName="@mantine/core/MenuLabel";const J=B((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,onMouseEnter:c,onMouseLeave:l,onKeyDown:u,children:d,...y}=M("MenuSubDropdown",null,t),m=f.useRef(null),v=k(),w=$(),h=C(c,w?.open),g=C(l,w?.close);return s.jsx(L.Dropdown,{...y,onMouseEnter:h,onMouseLeave:g,role:"menu","aria-orientation":"vertical",ref:K(o,m),...v.getStyles("dropdown",{className:r,style:a,styles:i,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,children:d})});J.classes=I;J.displayName="@mantine/core/MenuSubDropdown";const Q=H((t,o)=>{const{classNames:n,className:r,style:a,styles:i,vars:e,color:c,leftSection:l,rightSection:u,children:d,disabled:y,"data-disabled":m,closeMenuOnClick:v,...w}=M("MenuSubItem",null,t),h=k(),g=$(),b=q(),{dir:x}=ie(),p=f.useRef(null),D=w,T=c?b.variantColorResolver({color:c,theme:b,variant:"light"}):void 0,j=c?ae({color:c,theme:b}):null,A=C(D.onKeyDown,N=>{N.key==="ArrowRight"&&(g?.open(),g?.focusFirstItem()),N.key==="ArrowLeft"&&g?.parentContext&&(g.parentContext.close(),g.parentContext.focusParentItem())}),O=C(D.onClick,()=>{!m&&v&&h.closeDropdownImmediately()}),P=C(D.onMouseEnter,g?.open),E=C(D.onMouseLeave,g?.close);return s.jsxs(ce,{onMouseDown:N=>N.preventDefault(),...w,unstyled:h.unstyled,tabIndex:h.menuItemTabIndex,...h.getStyles("item",{className:r,style:a,styles:i,classNames:n}),ref:K(p,o),role:"menuitem",disabled:y,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":y||m||void 0,"data-mantine-stop-propagation":!0,onMouseEnter:P,onMouseLeave:E,onClick:O,onKeyDown:ue({siblingSelector:"[data-menu-item]:not([data-disabled])",parentSelector:"[data-menu-dropdown]",activateOnFocus:!1,loop:h.loop,dir:x,orientation:"vertical",onKeyDown:A}),__vars:{"--menu-item-color":j?.isThemeColor&&j?.shade===void 0?`var(--mantine-color-${j.color}-6)`:T?.color,"--menu-item-hover":T?.hover},children:[l&&s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"left",children:l}),d&&s.jsx("div",{...h.getStyles("itemLabel",{styles:i,classNames:n}),children:d}),s.jsx("div",{...h.getStyles("itemSection",{styles:i,classNames:n}),"data-position":"right",children:u||s.jsx(Ge,{...h.getStyles("chevron"),size:14})})]})});Q.classes=I;Q.displayName="@mantine/core/MenuSubItem";function pe({children:t,refProp:o}){if(!Re(t))throw new Error("Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");return k(),s.jsx(L.Target,{refProp:o,popupType:"menu",children:t})}pe.displayName="@mantine/core/MenuSubTarget";const et={offset:0,position:"right-start",transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function F(t){const{children:o,closeDelay:n,openDelay:r,...a}=M("MenuSub",et,t),i=Le(),[e,{open:c,close:l}]=Ze(!1),u=$(),{openDropdown:d,closeDropdown:y}=fe({open:c,close:l,closeDelay:n,openDelay:r}),m=()=>window.setTimeout(()=>{document.getElementById(`${i}-dropdown`)?.querySelectorAll("[data-menu-item]:not([data-disabled])")[0]?.focus()},16),v=()=>window.setTimeout(()=>{document.getElementById(`${i}-target`)?.focus()},16);return s.jsx(Xe,{value:{opened:e,close:y,open:d,focusFirstItem:m,focusParentItem:v,parentContext:u},children:s.jsx(L,{opened:e,withinPortal:!1,withArrow:!1,id:i,...a,children:o})})}F.extend=t=>t;F.displayName="@mantine/core/MenuSub";F.Target=pe;F.Dropdown=J;F.Item=Q;const tt={refProp:"ref"},ve=f.forwardRef((t,o)=>{const{children:n,refProp:r,...a}=M("MenuTarget",tt,t),i=Fe(n);if(!i)throw new Error("Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported");const e=k(),c=i.props,l=C(c.onClick,()=>{e.trigger==="click"?e.toggleDropdown():e.trigger==="click-hover"&&(e.setOpenedViaClick(!0),e.opened||e.openDropdown())}),u=C(c.onMouseEnter,()=>(e.trigger==="hover"||e.trigger==="click-hover")&&e.openDropdown()),d=C(c.onMouseLeave,()=>{(e.trigger==="hover"||e.trigger==="click-hover"&&!e.openedViaClick)&&e.closeDropdown()});return s.jsx(L.Target,{refProp:r,popupType:"menu",ref:o,...a,children:f.cloneElement(i,{onClick:l,onMouseEnter:u,onMouseLeave:d,"data-expanded":e.opened?!0:void 0})})});ve.displayName="@mantine/core/MenuTarget";const nt={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:["mousedown","touchstart","keydown"],loop:!0,trigger:"click",openDelay:0,closeDelay:100,menuItemTabIndex:-1};function S(t){const o=M("Menu",nt,t),{children:n,onOpen:r,onClose:a,opened:i,defaultOpened:e,trapFocus:c,onChange:l,closeOnItemClick:u,loop:d,closeOnEscape:y,trigger:m,openDelay:v,closeDelay:w,classNames:h,styles:g,unstyled:b,variant:x,vars:p,menuItemTabIndex:D,keepMounted:T,withInitialFocusPlaceholder:j,attributes:A,...O}=o,P=Oe({name:"Menu",classes:I,props:o,classNames:h,styles:g,unstyled:b,attributes:A}),[E,N]=_e({value:i,defaultValue:e,finalValue:!1,onChange:l}),[ye,X]=f.useState(!1),_=()=>{N(!1),X(!1),E&&a?.()},V=()=>{N(!0),!E&&r?.()},ee=()=>{E?_():V()},{openDropdown:be,closeDropdown:we}=fe({open:V,close:_,closeDelay:w,openDelay:v}),xe=Me=>Ye("[data-menu-item]","[data-menu-dropdown]",Me),{resolvedClassNames:Se,resolvedStyles:Ce}=Be({classNames:h,styles:g,props:o});return s.jsx(Qe,{value:{getStyles:P,opened:E,toggleDropdown:ee,getItemIndex:xe,openedViaClick:ye,setOpenedViaClick:X,closeOnItemClick:u,closeDropdown:m==="click"?_:we,openDropdown:m==="click"?V:be,closeDropdownImmediately:_,loop:d,trigger:m,unstyled:b,menuItemTabIndex:D,withInitialFocusPlaceholder:j},children:s.jsx(L,{returnFocus:!0,...O,opened:E,onChange:ee,defaultOpened:e,trapFocus:T?!1:c,closeOnEscape:y,__staticSelector:"Menu",classNames:Se,styles:Ce,unstyled:b,variant:x,keepMounted:T,children:n})})}S.extend=t=>t;S.withProps=Ke(S);S.classes=I;S.displayName="@mantine/core/Menu";S.Item=Y;S.Label=Z;S.Dropdown=W;S.Target=ve;S.Divider=G;S.Sub=F;const ge=t=>{const{item:o,index:n}=t,r=z(),a=de({handler:async e=>{await o.onClick?.()}},[o.onClick]);if(o.type==="divider")return s.jsx(S.Divider,{},n);if(o.type==="label")return s.jsx(S.Label,{children:o.label},n);if(o.children&&o.children.length>0)return s.jsxs(S,{trigger:"hover",position:"right-start",offset:2,children:[s.jsx(S.Target,{children:s.jsx(S.Item,{leftSection:o.icon,rightSection:s.jsx(He,{size:14}),children:o.label})}),s.jsx(S.Dropdown,{children:o.children.map((e,c)=>s.jsx(ge,{item:e,index:c},c))})]},n);const i={};return t.item.onClick?i.onClick=a.run:t.item.href&&Object.assign(i,r.anchor(t.item.href)),s.jsx(S.Item,{leftSection:o.icon,onClick:o.onClick,color:o.color,rightSection:o.active?s.jsx(le,{size:"xs",variant:"transparent",children:s.jsx(qe,{})}):void 0,...i,children:o.label},n)},ne=t=>{const o=q(),n={...t},{tooltip:r,menu:a,icon:i,...e}=n;if(n.variant==="subtle"&&(e.c??="var(--mantine-color-text)",e.color??="gray"),n.intent&&(n.intent==="none"?(e.c??="var(--mantine-color-text)",e.color??="gray"):n.intent==="primary"?(e.c??="white",e.color??=o.primaryColor):n.intent==="success"?(e.c??="white",e.color??="green"):n.intent==="danger"?(e.c??="white",e.color??="red"):n.intent==="warning"?(e.c??="var(--mantine-color-text)",e.color??="yellow"):n.intent==="info"&&(e.c??="white",e.color??="blue")),n.icon){const u=$e(n.icon)?s.jsx(n.icon,{size:Ve.sizes.icon.md}):s.jsx(le,{w:24,variant:"transparent",size:"sm",c:"var(--mantine-color-text)",...n.themeIconProps,children:n.icon});n.children?e.leftSection=u:(e.children=f.Children.only(u),e.px??="xs")}if(n.leftSection&&!n.children&&(e.px??="xs"),n.textVisibleFrom){const{children:u,textVisibleFrom:d,leftSection:y,...m}=e;return s.jsxs(s.Fragment,{children:[s.jsx(te,{w:"100%",visibleFrom:d,children:s.jsx(ne,{flex:1,...m,leftSection:y,tooltip:r,menu:a,children:u})}),s.jsx(te,{w:"100%",hiddenFrom:d,children:s.jsx(ne,{px:"xs",...m,tooltip:r,menu:a,children:y})})]})}let l="href"in e&&e.href?e.href.startsWith("http")||e.target?s.jsx(ct,{...e,href:e.href,children:e.children}):s.jsx(at,{...e,href:e.href,children:e.children}):(delete e.classNameActive,delete e.variantActive,"action"in e&&e.action?s.jsx(st,{...e,action:e.action,children:e.children}):"onClick"in e&&e.onClick?s.jsx(it,{...e,onClick:e.onClick,children:e.children}):"form"in e&&e.form?e.type==="reset"?s.jsx(rt,{...e,form:e.form,children:e.children}):s.jsx(ot,{...e,form:e.form,children:e.children}):s.jsx(R,{...e,children:e.children}));if(a&&(l=s.jsxs(S,{position:a.position||"bottom-start",width:a.width||200,shadow:a.shadow||"md",trigger:a.on==="hover"?"hover":"click",...a.menuProps,children:[s.jsx(S.Target,{...a.targetProps,children:l}),s.jsx(S.Dropdown,{children:a.items.map((u,d)=>s.jsx(ge,{item:u,index:d},d))})]})),r){const u={openDelay:1e3},d=typeof r=="string"||typeof r=="number"?{...u,label:r,children:l}:{...u,...r,children:l};return s.jsx(ze,{...d})}return l},ot=t=>{const{form:o,...n}=t,r=me(o);return s.jsx(R,{...n,loading:r.loading,disabled:r.loading,type:"submit",children:t.children})},rt=t=>{const{form:o,...n}=t,r=me(o);return s.jsx(R,{...n,disabled:r.loading,type:"reset",children:t.children})},st=t=>{const{action:o,...n}=t;return s.jsx(R,{...n,disabled:o.loading||t.disabled,loading:o.loading,onClick:()=>o.run(),children:t.children})},it=t=>{const o=de({handler:async n=>{await t.onClick(n)}},[t.onClick]);return s.jsx(R,{...t,disabled:o.loading||t.disabled,loading:o.loading,onClick:o.run,children:t.children})},at=t=>{const{active:o,classNameActive:n,variantActive:r,routerGoOptions:a,...i}=t,e=z(),{isPending:c,isActive:l}=We(o?{href:t.href,...o}:{href:t.href}),u=e.anchor(t.href,a),d=i.className||"";return l&&o!==!1&&n&&(i.className=`${d} ${n}`.trim()),t.anchorProps?s.jsx(U,{component:"a",...u,...t.anchorProps,children:t.children}):s.jsx(R,{component:"a",loading:c,...i,...u,variant:l&&o!==!1?r??"filled":i.variant??"subtle",children:t.children})},ct=t=>{const{active:o,classNameActive:n,variantActive:r,routerGoOptions:a,target:i,...e}=t;return s.jsx(R,{component:"a",target:i,...e,children:t.children})};export{ne as A,Ze as a,me as b,C as c,ht as u};
|
|
@@ -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.
|
|
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.Cjxjbqvs.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{p as q,b as v,q as y,s as f,j as g,B as h,v as z,a1 as E,t as u,f as F,g as T}from"./entry.
|
|
1
|
+
import{p as q,b as v,q as y,s as f,j as g,B as h,v as z,a1 as E,t as u,f as F,g as T}from"./entry.Cjxjbqvs.js";var x={root:"m_347db0ec","root--dot":"m_fbd81e3d",label:"m_5add502a",section:"m_91fdda9b"};const V=f((a,{radius:e,color:s,gradient:o,variant:t,size:r,autoContrast:l,circle:c})=>{const d=a.variantColorResolver({color:s||a.primaryColor,theme:a,gradient:o,variant:t||"filled",autoContrast:l});return{root:{"--badge-height":u(r,"badge-height"),"--badge-padding-x":u(r,"badge-padding-x"),"--badge-fz":u(r,"badge-fz"),"--badge-radius":c||e===void 0?void 0:E(e),"--badge-bg":s||t?d.background:void 0,"--badge-color":s||t?d.color:void 0,"--badge-bd":s||t?d.border:void 0,"--badge-dot-color":t==="dot"?z(s,a):void 0}}}),S=q((a,e)=>{const s=v("Badge",null,a),{classNames:o,className:t,style:r,styles:l,unstyled:c,vars:d,radius:B,color:R,gradient:N,leftSection:i,rightSection:n,children:m,variant:p,fullWidth:_,autoContrast:D,circle:C,mod:w,attributes:P,...$}=s,b=y({name:"Badge",props:s,classes:x,className:t,style:r,classNames:o,styles:l,unstyled:c,attributes:P,vars:d,varsResolver:V});return g.jsxs(h,{variant:p,mod:[{block:_,circle:C,"with-right-section":!!n,"with-left-section":!!i},w],...b("root",{variant:p}),ref:e,...$,children:[i&&g.jsx("span",{...b("section"),"data-position":"left",children:i}),g.jsx("span",{...b("label"),children:m}),n&&g.jsx("span",{...b("section"),"data-position":"right",children:n})]})});S.classes=x;S.displayName="@mantine/core/Badge";var j={root:"m_6d731127"};const W={gap:"md",align:"stretch",justify:"flex-start"},A=f((a,{gap:e,align:s,justify:o})=>({root:{"--stack-gap":T(e),"--stack-align":s,"--stack-justify":o}})),k=F((a,e)=>{const s=v("Stack",W,a),{classNames:o,className:t,style:r,styles:l,unstyled:c,vars:d,align:B,justify:R,gap:N,variant:i,attributes:n,...m}=s,p=y({name:"Stack",props:s,classes:j,className:t,style:r,classNames:o,styles:l,unstyled:c,attributes:n,vars:d,varsResolver:A});return g.jsx(h,{ref:e,...p("root"),variant:i,...m})});k.classes=j;k.displayName="@mantine/core/Stack";export{S as B,k as S};
|