react-semaphor 0.0.178 → 0.0.179

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("./index-yuBRAEvg.js"),g=require("react");/**
1
+ "use strict";const e=require("./index-uZiQ3QfU.js"),g=require("react");/**
2
2
  * @license lucide-react v0.379.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import { P as T, b as k, j as e, Q as ds, R as hs, U as w, V as Us, W as ms, X as us, Y as xs, Z as ps, _ as B, $ as ae, a0 as Js, J as Gs, O as Ee, a1 as Ia, a2 as qa, a3 as Va, a4 as Ra, a5 as _a, a6 as Ha, a7 as Fs, a8 as Re, a9 as Ze, aa as Qe, T as fs, e as Ps, g as gs, ab as Oe, ac as Me, f as W, ad as Te, ae as Ae, af as _e, ag as Le, ah as X, ai as js, G as i, aj as $e, ak as Ke, al as Ba, am as Ue, w as Qs, v as Ws, t as he, an as $a, r as Ka, N as Ys, s as Ua, ao as Ja, B as Ga, ap as Xs, aq as Pa, L as He, S as bs, z as Qa, n as Os, ar as Ms, A as rs, u as es, as as Ce, at as ze, au as Zs, av as ea, aw as sa, ax as aa, ay as ta, az as Wa, aA as Ya, aB as na, aC as Xa, aD as Za, aE as et, aF as st, aG as at, aH as is, aI as tt, aJ as Pe, aK as os, aL as Fe, aM as cs, aN as Ts, aO as nt, aP as lt, aQ as rt, aR as it, aS as ot, aT as ls, aU as ct, aV as As, aW as dt, aX as Es, aY as ht, aZ as mt, a_ as ut, a$ as la, l as xt, C as pt, E as Ls, d as ft, h as gt, i as jt, o as bt, b0 as yt, m as vt, b1 as Nt, b2 as Ct, b3 as St, b4 as Ds, b5 as kt, b6 as Is, b7 as qs, K as wt, b8 as ys, b9 as zt, ba as ra, bb as We, bc as ia, bd as Ft, be as Ot, bf as Mt, bg as Tt, bh as At, bi as Et, bj as Se, bk as q, bl as V, bm as vs, bn as R, bo as Vs, bp as Lt, bq as Dt, br as It, bs as qt, bt as Rs, bu as Vt, bv as Rt, bw as _t, bx as Ht, by as Bt, bz as $t } from "./index-pwZs1bG3.js";
1
+ import { P as T, b as k, j as e, Q as ds, R as hs, U as w, V as Us, W as ms, X as us, Y as xs, Z as ps, _ as B, $ as ae, a0 as Js, J as Gs, O as Ee, a1 as Ia, a2 as qa, a3 as Va, a4 as Ra, a5 as _a, a6 as Ha, a7 as Fs, a8 as Re, a9 as Ze, aa as Qe, T as fs, e as Ps, g as gs, ab as Oe, ac as Me, f as W, ad as Te, ae as Ae, af as _e, ag as Le, ah as X, ai as js, G as i, aj as $e, ak as Ke, al as Ba, am as Ue, w as Qs, v as Ws, t as he, an as $a, r as Ka, N as Ys, s as Ua, ao as Ja, B as Ga, ap as Xs, aq as Pa, L as He, S as bs, z as Qa, n as Os, ar as Ms, A as rs, u as es, as as Ce, at as ze, au as Zs, av as ea, aw as sa, ax as aa, ay as ta, az as Wa, aA as Ya, aB as na, aC as Xa, aD as Za, aE as et, aF as st, aG as at, aH as is, aI as tt, aJ as Pe, aK as os, aL as Fe, aM as cs, aN as Ts, aO as nt, aP as lt, aQ as rt, aR as it, aS as ot, aT as ls, aU as ct, aV as As, aW as dt, aX as Es, aY as ht, aZ as mt, a_ as ut, a$ as la, l as xt, C as pt, E as Ls, d as ft, h as gt, i as jt, o as bt, b0 as yt, m as vt, b1 as Nt, b2 as Ct, b3 as St, b4 as Ds, b5 as kt, b6 as Is, b7 as qs, K as wt, b8 as ys, b9 as zt, ba as ra, bb as We, bc as ia, bd as Ft, be as Ot, bf as Mt, bg as Tt, bh as At, bi as Et, bj as Se, bk as q, bl as V, bm as vs, bn as R, bo as Vs, bp as Lt, bq as Dt, br as It, bs as qt, bt as Rs, bu as Vt, bv as Rt, bw as _t, bx as Ht, by as Bt, bz as $t } from "./index-23glWvhg.js";
2
2
  import me, { useState as M, useEffect as K, useMemo as Kt, useRef as Be } from "react";
3
3
  /**
4
4
  * @license lucide-react v0.379.0 - ISC
@@ -34607,6 +34607,7 @@ function FJ({ data: e, card: t }) {
34607
34607
  // if the table has only 2 columns
34608
34608
  // if the table has only 2 columns,
34609
34609
  "border-l": $ == 0,
34610
+ "border-r": $ === y.length - 1,
34610
34611
  "border-b": k === ((A = x.getRowModel().rows) == null ? void 0 : A.length) - 1
34611
34612
  }),
34612
34613
  children: Y2(
@@ -305,7 +305,7 @@ Valid keys: `+JSON.stringify(Object.keys(T),null," "));var G=be(fe,ie,se,ae,ue+
305
305
  `)},kQ=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r,i=pe.useMemo(function(){return $Q(o)},[o]);return pe.createElement(DQ,{styles:TQ(i,!t,o,n?"":"!important")})},$y=!1;if(typeof window<"u")try{var qh=Object.defineProperty({},"passive",{get:function(){return $y=!0,!0}});window.addEventListener("test",qh,qh),window.removeEventListener("test",qh,qh)}catch{$y=!1}var $l=$y?{passive:!1}:!1,MQ=function(e){return e.tagName==="TEXTAREA"},ek=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!MQ(e)&&n[t]==="visible")},AQ=function(e){return ek(e,"overflowY")},IQ=function(e){return ek(e,"overflowX")},uP=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=tk(e,n);if(r){var o=nk(e,n),i=o[1],s=o[2];if(i>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},NQ=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},LQ=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},tk=function(e,t){return e==="v"?AQ(t):IQ(t)},nk=function(e,t){return e==="v"?NQ(t):LQ(t)},FQ=function(e,t){return e==="h"&&t==="rtl"?-1:1},zQ=function(e,t,n,r,o){var i=FQ(e,window.getComputedStyle(t).direction),s=i*r,a=n.target,l=t.contains(a),c=!1,u=s>0,f=0,p=0;do{var g=nk(e,a),v=g[0],b=g[1],x=g[2],w=b-x-i*v;(v||w)&&tk(e,a)&&(f+=w,p+=v),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&(o&&f===0||!o&&s>f)||!u&&(o&&p===0||!o&&-s>p))&&(c=!0),c},Gh=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},dP=function(e){return[e.deltaX,e.deltaY]},fP=function(e){return e&&"current"in e?e.current:e},jQ=function(e,t){return e[0]===t[0]&&e[1]===t[1]},BQ=function(e){return`
306
306
  .block-interactivity-`.concat(e,` {pointer-events: none;}
307
307
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
308
- `)},VQ=0,Dl=[];function HQ(e){var t=pe.useRef([]),n=pe.useRef([0,0]),r=pe.useRef(),o=pe.useState(VQ++)[0],i=pe.useState(function(){return ZT()})[0],s=pe.useRef(e);pe.useEffect(function(){s.current=e},[e]),pe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=dQ([e.lockRef.current],(e.shards||[]).map(fP),!0).filter(Boolean);return b.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=pe.useCallback(function(b,x){if("touches"in b&&b.touches.length===2)return!s.current.allowPinchZoom;var w=Gh(b),_=n.current,S="deltaX"in b?b.deltaX:_[0]-w[0],R="deltaY"in b?b.deltaY:_[1]-w[1],C,P=b.target,M=Math.abs(S)>Math.abs(R)?"h":"v";if("touches"in b&&M==="h"&&P.type==="range")return!1;var A=uP(M,P);if(!A)return!0;if(A?C=M:(C=M==="v"?"h":"v",A=uP(M,P)),!A)return!1;if(!r.current&&"changedTouches"in b&&(S||R)&&(r.current=C),!C)return!0;var D=r.current||C;return zQ(D,x,b,D==="h"?S:R,!0)},[]),l=pe.useCallback(function(b){var x=b;if(!(!Dl.length||Dl[Dl.length-1]!==i)){var w="deltaY"in x?dP(x):Gh(x),_=t.current.filter(function(C){return C.name===x.type&&C.target===x.target&&jQ(C.delta,w)})[0];if(_&&_.should){x.cancelable&&x.preventDefault();return}if(!_){var S=(s.current.shards||[]).map(fP).filter(Boolean).filter(function(C){return C.contains(x.target)}),R=S.length>0?a(x,S[0]):!s.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),c=pe.useCallback(function(b,x,w,_){var S={name:b,delta:x,target:w,should:_};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(R){return R!==S})},1)},[]),u=pe.useCallback(function(b){n.current=Gh(b),r.current=void 0},[]),f=pe.useCallback(function(b){c(b.type,dP(b),b.target,a(b,e.lockRef.current))},[]),p=pe.useCallback(function(b){c(b.type,Gh(b),b.target,a(b,e.lockRef.current))},[]);pe.useEffect(function(){return Dl.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,$l),document.addEventListener("touchmove",l,$l),document.addEventListener("touchstart",u,$l),function(){Dl=Dl.filter(function(b){return b!==i}),document.removeEventListener("wheel",l,$l),document.removeEventListener("touchmove",l,$l),document.removeEventListener("touchstart",u,$l)}},[]);var g=e.removeScrollBar,v=e.inert;return pe.createElement(pe.Fragment,null,v?pe.createElement(i,{styles:BQ(o)}):null,g?pe.createElement(kQ,{gapMode:"margin"}):null)}const WQ=xQ(JT,HQ);var rk=pe.forwardRef(function(e,t){return pe.createElement(em,Qo({},e,{ref:t,sideCar:WQ}))});rk.classNames=em.classNames;const tm=rk,UQ=[" ","Enter","ArrowUp","ArrowDown"],qQ=[" ","Enter"],nm="Select",[rm,om,GQ]=Cg(nm),[Ac,qpe]=Bn(nm,[GQ,di]),Hw=di(),[YQ,tl]=Ac(nm),[KQ,XQ]=Ac(nm),QQ=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:p,required:g}=e,v=Hw(t),[b,x]=m.useState(null),[w,_]=m.useState(null),[S,R]=m.useState(!1),C=Xa(c),[P=!1,M]=nr({prop:r,defaultProp:o,onChange:i}),[A,D]=nr({prop:s,defaultProp:a,onChange:l}),I=m.useRef(null),z=b?!!b.closest("form"):!0,[B,U]=m.useState(new Set),W=Array.from(B).map(j=>j.props.value).join(";");return m.createElement(lf,v,m.createElement(YQ,{required:g,scope:t,trigger:b,onTriggerChange:x,valueNode:w,onValueNodeChange:_,valueNodeHasChildren:S,onValueNodeHasChildrenChange:R,contentId:Or(),value:A,onValueChange:D,open:P,onOpenChange:M,dir:C,triggerPointerDownPosRef:I,disabled:p},m.createElement(rm.Provider,{scope:t},m.createElement(KQ,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback(j=>{U(Q=>new Set(Q).add(j))},[]),onNativeOptionRemove:m.useCallback(j=>{U(Q=>{const q=new Set(Q);return q.delete(j),q})},[])},n)),z?m.createElement(lk,{key:W,"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:f,value:A,onChange:j=>D(j.target.value),disabled:p},A===void 0?m.createElement("option",{value:""}):null,Array.from(B)):null))},JQ="SelectTrigger",ZQ=m.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Hw(n),s=tl(JQ,n),a=s.disabled||r,l=lt(t,s.onTriggerChange),c=om(n),[u,f,p]=ck(v=>{const b=c().filter(_=>!_.disabled),x=b.find(_=>_.value===s.value),w=uk(b,v,x);w!==void 0&&s.onValueChange(w.value)}),g=()=>{a||(s.onOpenChange(!0),p())};return m.createElement(cf,le({asChild:!0},i),m.createElement(Ue.button,le({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":ak(s.value)?"":void 0},o,{ref:l,onClick:Re(o.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Re(o.onPointerDown,v=>{const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(g(),s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Re(o.onKeyDown,v=>{const b=u.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&f(v.key),!(b&&v.key===" ")&&UQ.includes(v.key)&&(g(),v.preventDefault())})})))}),eJ="SelectValue",tJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,l=tl(eJ,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,f=lt(t,l.onValueNodeChange);return tr(()=>{c(u)},[c,u]),m.createElement(Ue.span,le({},a,{ref:f,style:{pointerEvents:"none"}}),ak(l.value)?m.createElement(m.Fragment,null,s):i)}),nJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.createElement(Ue.span,le({"aria-hidden":!0},o,{ref:t}),r||"▼")}),rJ=e=>m.createElement(Ug,le({asChild:!0},e)),Cc="SelectContent",oJ=m.forwardRef((e,t)=>{const n=tl(Cc,e.__scopeSelect),[r,o]=m.useState();if(tr(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Fo.createPortal(m.createElement(ok,{scope:e.__scopeSelect},m.createElement(rm.Slot,{scope:e.__scopeSelect},m.createElement("div",null,e.children))),i):null}return m.createElement(iJ,le({},e,{ref:t}))}),$i=10,[ok,nl]=Ac(Cc),iJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:x,...w}=e,_=tl(Cc,n),[S,R]=m.useState(null),[C,P]=m.useState(null),M=lt(t,fe=>R(fe)),[A,D]=m.useState(null),[I,z]=m.useState(null),B=om(n),[U,W]=m.useState(!1),j=m.useRef(!1);m.useEffect(()=>{if(S)return Zg(S)},[S]),Xg();const Q=m.useCallback(fe=>{const[oe,...ee]=B().map(G=>G.ref.current),[ie]=ee.slice(-1),be=document.activeElement;for(const G of fe)if(G===be||(G==null||G.scrollIntoView({block:"nearest"}),G===oe&&C&&(C.scrollTop=0),G===ie&&C&&(C.scrollTop=C.scrollHeight),G==null||G.focus(),document.activeElement!==be))return},[B,C]),q=m.useCallback(()=>Q([A,S]),[Q,A,S]);m.useEffect(()=>{U&&q()},[U,q]);const{onOpenChange:X,triggerPointerDownPosRef:Z}=_;m.useEffect(()=>{if(S){let fe={x:0,y:0};const oe=ie=>{var be,G,me,_e;fe={x:Math.abs(Math.round(ie.pageX)-((be=(G=Z.current)===null||G===void 0?void 0:G.x)!==null&&be!==void 0?be:0)),y:Math.abs(Math.round(ie.pageY)-((me=(_e=Z.current)===null||_e===void 0?void 0:_e.y)!==null&&me!==void 0?me:0))}},ee=ie=>{fe.x<=10&&fe.y<=10?ie.preventDefault():S.contains(ie.target)||X(!1),document.removeEventListener("pointermove",oe),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",ee,{capture:!0})}}},[S,X,Z]),m.useEffect(()=>{const fe=()=>X(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[X]);const[T,V]=ck(fe=>{const oe=B().filter(be=>!be.disabled),ee=oe.find(be=>be.ref.current===document.activeElement),ie=uk(oe,fe,ee);ie&&setTimeout(()=>ie.ref.current.focus())}),K=m.useCallback((fe,oe,ee)=>{const ie=!j.current&&!ee;(_.value!==void 0&&_.value===oe||ie)&&(D(fe),ie&&(j.current=!0))},[_.value]),N=m.useCallback(()=>S==null?void 0:S.focus(),[S]),se=m.useCallback((fe,oe,ee)=>{const ie=!j.current&&!ee;(_.value!==void 0&&_.value===oe||ie)&&z(fe)},[_.value]),ae=r==="popper"?hP:sJ,ue=ae===hP?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:x}:{};return m.createElement(ok,{scope:n,content:S,viewport:C,onViewportChange:P,itemRefCallback:K,selectedItem:A,onItemLeave:N,itemTextRefCallback:se,focusSelectedItem:q,selectedItemText:I,position:r,isPositioned:U,searchRef:T},m.createElement(tm,{as:zi,allowPinchZoom:!0},m.createElement(Qg,{asChild:!0,trapped:_.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:Re(o,fe=>{var oe;(oe=_.trigger)===null||oe===void 0||oe.focus({preventScroll:!0}),fe.preventDefault()})},m.createElement(Tc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>_.onOpenChange(!1)},m.createElement(ae,le({role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:fe=>fe.preventDefault()},w,ue,{onPlaced:()=>W(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Re(w.onKeyDown,fe=>{const oe=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!oe&&fe.key.length===1&&V(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let ie=B().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const be=fe.target,G=ie.indexOf(be);ie=ie.slice(G+1)}setTimeout(()=>Q(ie)),fe.preventDefault()}})}))))))}),sJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=tl(Cc,n),s=nl(Cc,n),[a,l]=m.useState(null),[c,u]=m.useState(null),f=lt(t,M=>u(M)),p=om(n),g=m.useRef(!1),v=m.useRef(!0),{viewport:b,selectedItem:x,selectedItemText:w,focusSelectedItem:_}=s,S=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&b&&x&&w){const M=i.trigger.getBoundingClientRect(),A=c.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),I=w.getBoundingClientRect();if(i.dir!=="rtl"){const be=I.left-A.left,G=D.left-be,me=M.left-G,_e=M.width+me,Pe=Math.max(_e,A.width),$e=window.innerWidth-$i,Ve=Oy(G,[$i,$e-Pe]);a.style.minWidth=_e+"px",a.style.left=Ve+"px"}else{const be=A.right-I.right,G=window.innerWidth-D.right-be,me=window.innerWidth-M.right-G,_e=M.width+me,Pe=Math.max(_e,A.width),$e=window.innerWidth-$i,Ve=Oy(G,[$i,$e-Pe]);a.style.minWidth=_e+"px",a.style.right=Ve+"px"}const z=p(),B=window.innerHeight-$i*2,U=b.scrollHeight,W=window.getComputedStyle(c),j=parseInt(W.borderTopWidth,10),Q=parseInt(W.paddingTop,10),q=parseInt(W.borderBottomWidth,10),X=parseInt(W.paddingBottom,10),Z=j+Q+U+X+q,T=Math.min(x.offsetHeight*5,Z),V=window.getComputedStyle(b),K=parseInt(V.paddingTop,10),N=parseInt(V.paddingBottom,10),se=M.top+M.height/2-$i,ae=B-se,ue=x.offsetHeight/2,fe=x.offsetTop+ue,oe=j+Q+fe,ee=Z-oe;if(oe<=se){const be=x===z[z.length-1].ref.current;a.style.bottom="0px";const G=c.clientHeight-b.offsetTop-b.offsetHeight,me=Math.max(ae,ue+(be?N:0)+G+q),_e=oe+me;a.style.height=_e+"px"}else{const be=x===z[0].ref.current;a.style.top="0px";const me=Math.max(se,j+b.offsetTop+(be?K:0)+ue)+ee;a.style.height=me+"px",b.scrollTop=oe-se+b.offsetTop}a.style.margin=`${$i}px 0`,a.style.minHeight=T+"px",a.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,i.trigger,i.valueNode,a,c,b,x,w,i.dir,r]);tr(()=>S(),[S]);const[R,C]=m.useState();tr(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const P=m.useCallback(M=>{M&&v.current===!0&&(S(),_==null||_(),v.current=!1)},[S,_]);return m.createElement(aJ,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:P},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R}},m.createElement(Ue.div,le({},o,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),hP=m.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=$i,...i}=e,s=Hw(n);return m.createElement(uf,le({},s,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[aJ,Ww]=Ac(Cc,{}),pP="SelectViewport",lJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=nl(pP,n),i=Ww(pP,n),s=lt(t,o.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),m.createElement(rm.Slot,{scope:n},m.createElement(Ue.div,le({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Re(r.onScroll,l=>{const c=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&u){const p=Math.abs(a.current-c.scrollTop);if(p>0){const g=window.innerHeight-$i*2,v=parseFloat(u.style.minHeight),b=parseFloat(u.style.height),x=Math.max(v,b);if(x<g){const w=x+p,_=Math.min(g,w),S=w-_;u.style.height=_+"px",u.style.bottom==="0px"&&(c.scrollTop=S>0?S:0,u.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),cJ="SelectGroup",[uJ,dJ]=Ac(cJ),fJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Or();return m.createElement(uJ,{scope:n,id:o},m.createElement(Ue.div,le({role:"group","aria-labelledby":o},r,{ref:t})))}),hJ="SelectLabel",pJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dJ(hJ,n);return m.createElement(Ue.div,le({id:o.id},r,{ref:t}))}),Dy="SelectItem",[gJ,ik]=Ac(Dy),mJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=tl(Dy,n),l=nl(Dy,n),c=a.value===r,[u,f]=m.useState(i??""),[p,g]=m.useState(!1),v=lt(t,w=>{var _;return(_=l.itemRefCallback)===null||_===void 0?void 0:_.call(l,w,r,o)}),b=Or(),x=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.createElement(gJ,{scope:n,value:r,disabled:o,textId:b,isSelected:c,onItemTextChange:m.useCallback(w=>{f(_=>{var S;return _||((S=w==null?void 0:w.textContent)!==null&&S!==void 0?S:"").trim()})},[])},m.createElement(rm.ItemSlot,{scope:n,value:r,disabled:o,textValue:u},m.createElement(Ue.div,le({role:"option","aria-labelledby":b,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},s,{ref:v,onFocus:Re(s.onFocus,()=>g(!0)),onBlur:Re(s.onBlur,()=>g(!1)),onPointerUp:Re(s.onPointerUp,x),onPointerMove:Re(s.onPointerMove,w=>{if(o){var _;(_=l.onItemLeave)===null||_===void 0||_.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Re(s.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var _;(_=l.onItemLeave)===null||_===void 0||_.call(l)}}),onKeyDown:Re(s.onKeyDown,w=>{var _;((_=l.searchRef)===null||_===void 0?void 0:_.current)!==""&&w.key===" "||(qQ.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})}))))}),Yh="SelectItemText",vJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=tl(Yh,n),a=nl(Yh,n),l=ik(Yh,n),c=XQ(Yh,n),[u,f]=m.useState(null),p=lt(t,w=>f(w),l.onItemTextChange,w=>{var _;return(_=a.itemTextRefCallback)===null||_===void 0?void 0:_.call(a,w,l.value,l.disabled)}),g=u==null?void 0:u.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},g),[l.disabled,l.value,g]),{onNativeOptionAdd:b,onNativeOptionRemove:x}=c;return tr(()=>(b(v),()=>x(v)),[b,x,v]),m.createElement(m.Fragment,null,m.createElement(Ue.span,le({id:l.textId},i,{ref:p})),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Fo.createPortal(i.children,s.valueNode):null)}),bJ="SelectItemIndicator",yJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ik(bJ,n).isSelected?m.createElement(Ue.span,le({"aria-hidden":!0},r,{ref:t})):null}),gP="SelectScrollUpButton",xJ=m.forwardRef((e,t)=>{const n=nl(gP,e.__scopeSelect),r=Ww(gP,e.__scopeSelect),[o,i]=m.useState(!1),s=lt(t,r.onScrollButtonChange);return tr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const c=a.scrollTop>0;i(c)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?m.createElement(sk,le({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}})):null}),mP="SelectScrollDownButton",wJ=m.forwardRef((e,t)=>{const n=nl(mP,e.__scopeSelect),r=Ww(mP,e.__scopeSelect),[o,i]=m.useState(!1),s=lt(t,r.onScrollButtonChange);return tr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const c=a.scrollHeight-a.clientHeight,u=Math.ceil(a.scrollTop)<c;i(u)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?m.createElement(sk,le({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}})):null}),sk=m.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=nl("SelectScrollButton",n),s=m.useRef(null),a=om(n),l=m.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return m.useEffect(()=>()=>l(),[l]),tr(()=>{var c;const u=a().find(f=>f.ref.current===document.activeElement);u==null||(c=u.ref.current)===null||c===void 0||c.scrollIntoView({block:"nearest"})},[a]),m.createElement(Ue.div,le({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Re(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Re(o.onPointerMove,()=>{var c;(c=i.onItemLeave)===null||c===void 0||c.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Re(o.onPointerLeave,()=>{l()})}))}),_J=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.createElement(Ue.div,le({"aria-hidden":!0},r,{ref:t}))});function ak(e){return e===""||e===void 0}const lk=m.forwardRef((e,t)=>{const{value:n,...r}=e,o=m.useRef(null),i=lt(t,o),s=Jg(n);return m.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&u){const f=new Event("change",{bubbles:!0});u.call(a,n),a.dispatchEvent(f)}},[s,n]),m.createElement(pT,{asChild:!0},m.createElement("select",le({},r,{ref:i,defaultValue:n})))});lk.displayName="BubbleSelect";function ck(e){const t=Mn(e),n=m.useRef(""),r=m.useRef(0),o=m.useCallback(s=>{const a=n.current+s;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function uk(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=SJ(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function SJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const CJ=QQ,dk=ZQ,EJ=tJ,RJ=nJ,PJ=rJ,fk=oJ,OJ=lJ,$J=fJ,hk=pJ,pk=mJ,DJ=vJ,TJ=yJ,gk=xJ,mk=wJ,vk=_J,hs=CJ,Fl=$J,ps=EJ,Ti=pe.forwardRef(({className:e,children:t,...n},r)=>O.jsxs(dk,{ref:r,className:Ee("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,O.jsx(RJ,{asChild:!0,children:O.jsx(Yg,{className:"h-4 w-4 opacity-50"})})]}));Ti.displayName=dk.displayName;const bk=pe.forwardRef(({className:e,...t},n)=>O.jsx(gk,{ref:n,className:Ee("flex cursor-default items-center justify-center py-1",e),...t,children:O.jsx(RK,{className:"h-4 w-4"})}));bk.displayName=gk.displayName;const yk=pe.forwardRef(({className:e,...t},n)=>O.jsx(mk,{ref:n,className:Ee("flex cursor-default items-center justify-center py-1",e),...t,children:O.jsx(Yg,{className:"h-4 w-4"})}));yk.displayName=mk.displayName;const ki=pe.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>O.jsx(PJ,{children:O.jsxs(fk,{ref:o,className:Ee("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[O.jsx(bk,{}),O.jsx(OJ,{className:Ee("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),O.jsx(yk,{})]})}));ki.displayName=fk.displayName;const ba=pe.forwardRef(({className:e,...t},n)=>O.jsx(hk,{ref:n,className:Ee("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));ba.displayName=hk.displayName;const Fn=pe.forwardRef(({className:e,children:t,...n},r)=>O.jsxs(pk,{ref:r,className:Ee("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(TJ,{children:O.jsx(df,{className:"h-4 w-4"})})}),O.jsx(DJ,{children:t})]}));Fn.displayName=pk.displayName;const eg=pe.forwardRef(({className:e,...t},n)=>O.jsx(vk,{ref:n,className:Ee("-mx-1 my-1 h-px bg-muted",e),...t}));eg.displayName=vk.displayName;const vP=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,bP=Pp,Uw=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return bP(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const p=vP(u)||vP(f);return o[c][p]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,p]=u;return p===void 0||(c[f]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:p,...g}=u;return Object.entries(g).every(v=>{let[b,x]=v;return Array.isArray(x)?x.includes({...i,...a}[b]):{...i,...a}[b]===x})?[...c,f,p]:c},[]);return bP(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ty=Uw("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),dr=pe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?zi:"button";return O.jsx(s,{className:Ee(Ty({variant:t,size:n,className:e})),ref:i,...o})});dr.displayName="Button";const kJ=m.forwardRef((e,t)=>m.createElement(Ue.label,le({},e,{ref:t,onMouseDown:n=>{var r;(r=e.onMouseDown)===null||r===void 0||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault()}}))),xk=kJ,MJ=Uw("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),zn=pe.forwardRef(({className:e,...t},n)=>O.jsx(xk,{ref:n,className:Ee(MJ(),e),...t}));zn.displayName=xk.displayName;const wk="Popover",[_k,Gpe]=Bn(wk,[di]),qw=di(),[AJ,Ic]=_k(wk),IJ=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=qw(t),l=m.useRef(null),[c,u]=m.useState(!1),[f=!1,p]=nr({prop:r,defaultProp:o,onChange:i});return m.createElement(lf,a,m.createElement(AJ,{scope:t,contentId:Or(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:m.useCallback(()=>p(g=>!g),[p]),hasCustomAnchor:c,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:s},n))},NJ="PopoverTrigger",LJ=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ic(NJ,n),i=qw(n),s=lt(t,o.triggerRef),a=m.createElement(Ue.button,le({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ek(o.open)},r,{ref:s,onClick:Re(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?a:m.createElement(cf,le({asChild:!0},i),a)}),Sk="PopoverPortal",[FJ,zJ]=_k(Sk,{forceMount:void 0}),jJ=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Ic(Sk,t);return m.createElement(FJ,{scope:t,forceMount:n},m.createElement(En,{present:n||i.open},m.createElement(Ug,{asChild:!0,container:o},r)))},dd="PopoverContent",BJ=m.forwardRef((e,t)=>{const n=zJ(dd,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Ic(dd,e.__scopePopover);return m.createElement(En,{present:r||i.open},i.modal?m.createElement(VJ,le({},o,{ref:t})):m.createElement(HJ,le({},o,{ref:t})))}),VJ=m.forwardRef((e,t)=>{const n=Ic(dd,e.__scopePopover),r=m.useRef(null),o=lt(t,r),i=m.useRef(!1);return m.useEffect(()=>{const s=r.current;if(s)return Zg(s)},[]),m.createElement(tm,{as:zi,allowPinchZoom:!0},m.createElement(Ck,le({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Re(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Re(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})))}),HJ=m.forwardRef((e,t)=>{const n=Ic(dd,e.__scopePopover),r=m.useRef(!1),o=m.useRef(!1);return m.createElement(Ck,le({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Ck=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=e,p=Ic(dd,n),g=qw(n);return Xg(),m.createElement(Qg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},m.createElement(Tc,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1)},m.createElement(uf,le({"data-state":Ek(p.open),role:"dialog",id:p.contentId},g,f,{ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function Ek(e){return e?"open":"closed"}const WJ=IJ,UJ=LJ,qJ=jJ,Rk=BJ,im=WJ,sm=UJ,ff=pe.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>O.jsx(qJ,{children:O.jsx(Rk,{ref:o,align:t,sideOffset:n,className:Ee("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ff.displayName=Rk.displayName;function GJ(e,t){switch(t){case"full-date-time":return{locale:e,format:"full-date-time",options:{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}};case"short-date-time":return{locale:e,format:"short-date-time",options:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}};case"hours-date-time":return{locale:e,format:"hours-date-time",options:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}};case"short-date":return{format:"short-date",locale:e,options:{}};case"long-date":return{format:"long-date",locale:e,options:{year:"numeric",month:"long",day:"numeric"}};default:return{format:"short-date-time",locale:e,options:{}}}}const Gl=pe.forwardRef(({className:e,type:t,...n},r)=>O.jsx("input",{type:t,className:Ee("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Gl.displayName="Input";function Pk({colorRanges:e,setColorRanges:t}){const n={start:-1/0,end:100,color:""};function r(s,a,l){const c=[...e];c[s]={...c[s],[a]:l},t(c)}function o(s){const a=[...e];a.splice(s,1),t(a)}function i(){t([...e,n])}return O.jsxs("div",{className:"space-y-3",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(zn,{children:"Color Range"}),O.jsx(dr,{onClick:i,variant:"secondary",className:"h-5 p-1 text-muted-foreground",children:O.jsx(CT,{className:"size-3"})})]}),e.map((s,a)=>O.jsxs("div",{className:"flex items-center gap-2 px-2",children:[O.jsx(Gl,{onChange:l=>r(a,"start",l.target.value),value:s.start,className:Ee(`h-7 ${fp}`)}),O.jsx("span",{children:"-"}),O.jsx(Gl,{value:s.end,onChange:l=>r(a,"end",l.target.value),className:Ee(`h-7 ${fp}`)}),O.jsx(Gl,{onChange:l=>r(a,"color",l.target.value),value:s.color,className:Ee(`h-7 min-w-14 p-0 ${fp}`),type:"color",list:"presetColors"}),O.jsxs("datalist",{id:"presetColors",children:[O.jsx("option",{children:zt.green[600]}),O.jsx("option",{children:zt.red[500]}),O.jsx("option",{children:zt.yellow[400]}),O.jsx("option",{children:zt.orange[500]})]}),O.jsx(dr,{onClick:()=>o(a),variant:"secondary",className:"h-5 p-1 text-muted-foreground",children:O.jsx($w,{className:"size-3"})})]},a))]})}const YJ=m.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...i}=e,[s=!1,a]=nr({prop:n,onChange:o,defaultProp:r});return m.createElement(Ue.button,le({type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0},i,{ref:t,onClick:Re(e.onClick,()=>{e.disabled||a(!s)})}))}),Ok=YJ,KJ=Uw("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Gw=pe.forwardRef(({className:e,variant:t,size:n,...r},o)=>O.jsx(Ok,{ref:o,className:Ee(KJ({variant:t,size:n,className:e})),...r}));Gw.displayName=Ok.displayName;function XJ(e,t){var r;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(o=>o.columnIdx===t);return n==null?void 0:n.type}function QJ(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return((o=n==null?void 0:n.options)==null?void 0:o.locale)||"en-US"}function JJ(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t&&i.type==="date");return((o=n==null?void 0:n.options)==null?void 0:o.format)||"short-date-time"}function ZJ(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return(o=n==null?void 0:n.options)==null?void 0:o.currency}function eZ(e,t){var r,o,i;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(s=>s.columnIdx===t);return((i=(o=n==null?void 0:n.options)==null?void 0:o.options)==null?void 0:i.minimumFractionDigits)||0}function tZ(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return((o=n==null?void 0:n.options)==null?void 0:o.colorRanges)||[]}function nZ(e,t){var r,o,i;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(s=>s.columnIdx===t);return((i=(o=n==null?void 0:n.options)==null?void 0:o.options)==null?void 0:i.style)==="percent"}function rZ({columnIndex:e,columnName:t}){const[n,r]=m.useState(!1),o=Sr(D=>{var I;return(I=D.card)==null?void 0:I.preferences}),[i,s]=m.useState(XJ(o,e)),[a,l]=m.useState(tZ(o,e)),[c,u]=m.useState(QJ(o,e)),[f,p]=m.useState(JJ(o,e)),[g,v]=m.useState(ZJ(o,e)),[b,x]=m.useState(eZ(o,e).toString()),[w,_]=m.useState(nZ(o,e));m.useState("");const S=Sr(D=>D.actions.setCardPreferences);function R(){const D=[...new Set(C0.map(I=>I.currency))];return O.jsx(O.Fragment,{children:O.jsxs("div",{className:"grid grid-cols-9 items-center gap-2",children:[O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Locale"}),O.jsxs(hs,{value:c,onValueChange:I=>u(I),children:[O.jsx(Ti,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{children:O.jsxs(Fl,{children:[O.jsx(ba,{children:"Locale"}),C0.map(I=>O.jsx(Fn,{value:I.locale,children:I.locale},I.locale))]})})]}),O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Currency"}),O.jsxs(hs,{value:g||"none",onValueChange:I=>v(I==="none"?void 0:I),children:[O.jsx(Ti,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{children:O.jsxs(Fl,{children:[O.jsx(ba,{children:"Currency"}),O.jsx(Fn,{value:"none",children:"None"}),D.map(I=>O.jsx(Fn,{value:I,children:I},I))]})})]}),O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Decimals"}),O.jsxs(hs,{value:b,onValueChange:I=>x(I),children:[O.jsx(Ti,{className:"col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{children:["0","1","2","3","4"].map(I=>O.jsx(Fn,{value:I,children:I},I))})]}),!g&&O.jsx(Gw,{onPressedChange:I=>_(I),variant:"outline",size:"sm",className:"col-span-3 h-8","aria-label":"Toggle italic",children:O.jsx($K,{className:"size-3"})})]})})}function C(){return O.jsx(O.Fragment,{children:O.jsxs("div",{className:"grid grid-cols-9 items-center gap-2",children:[O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Locale"}),O.jsxs(hs,{defaultValue:"en-US",value:c,onValueChange:D=>u(D),children:[O.jsx(Ti,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{children:W9.map(D=>O.jsxs(Fl,{children:[O.jsx(ba,{children:D.label}),D.locales.map(I=>O.jsx(Fn,{value:I.code,children:I.name},I.code))]},D.label))})]}),O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Format"}),O.jsxs(hs,{defaultValue:"short-date-time",value:f,onValueChange:D=>{console.log("format",D),p(D)},children:[O.jsx(Ti,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{className:"",id:"type",children:O.jsxs(Fl,{children:[O.jsx(ba,{children:"Option"}),O.jsx(Fn,{value:"full-date-time",children:"Full Date-Time"}),O.jsx(Fn,{value:"short-date-time",children:"Short Date-Time"}),O.jsx(Fn,{value:"hours-date-time",children:"24-Hour Date-Time"}),O.jsx(Fn,{value:"short-date",children:"Short Date"}),O.jsx(Fn,{value:"long-date",children:"Long Date"})]})})]})]})})}function P(){S({...o,columnSettings:[]})}function M(){var D;S({...o,columnSettings:[...((D=o==null?void 0:o.columnSettings)==null?void 0:D.filter(I=>I.columnIdx!==e))||[]]})}function A(){var D,I,z;if(i==="date"){const B=GJ(c,f),U={columnIdx:e,type:i,options:B};S({...o,columnSettings:[...((D=o==null?void 0:o.columnSettings)==null?void 0:D.filter(W=>W.columnIdx!==e))||[],U]})}else if(i==="number"){let B;g?B={locale:c,currency:g,options:{style:"currency",currency:g,minimumFractionDigits:Number(b)},colorRanges:a.length>0?a:void 0}:B={locale:c,currency:void 0,options:{style:w?"percent":"decimal",minimumFractionDigits:Number(b)},colorRanges:a.length>0?a:void 0};const U={columnIdx:e,type:i,options:B};S({...o,columnSettings:[...((I=o==null?void 0:o.columnSettings)==null?void 0:I.filter(W=>W.columnIdx!==e))||[],U]})}else S({...o,columnSettings:[...((z=o==null?void 0:o.columnSettings)==null?void 0:z.filter(B=>B.columnIdx!==e))||[]]})}return O.jsxs(im,{onOpenChange:D=>r(D),children:[O.jsx(sm,{asChild:!0,children:O.jsx(Ow,{className:"size-3.5 cursor-pointer text-muted"})}),O.jsx(ff,{align:"center",className:"max-w-70",children:O.jsxs("div",{className:"grid gap-4",children:[O.jsxs("div",{className:"space-y-2",children:[O.jsx("h4",{className:"font-medium leading-none",children:"Display Settings"}),O.jsx("p",{className:"text-sm text-muted-foreground",children:`Display setting for '${t}'`})]}),O.jsxs("div",{className:"grid gap-2",children:[O.jsxs("div",{className:"grid grid-cols-3 items-center gap-2",children:[O.jsx(zn,{htmlFor:"scale",children:"Type"}),O.jsxs(hs,{value:i||"none",onValueChange:D=>s(D),children:[O.jsx(Ti,{className:"col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{id:"type",children:O.jsxs(Fl,{children:[O.jsx(ba,{children:"Option"}),O.jsx(Fn,{value:"number",children:"Number"}),O.jsx(Fn,{value:"date",children:"Date"}),O.jsx(Fn,{value:"none",children:"None"})]})})]})]}),i==="number"&&R(),i==="date"&&C(),i==="number"&&O.jsxs(O.Fragment,{children:[O.jsx(eg,{}),O.jsx(Pk,{colorRanges:a,setColorRanges:l})]}),O.jsx(eg,{}),O.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[O.jsx(dr,{onClick:P,variant:"secondary",className:"col-span-1 col-start-1 h-8 w-full text-destructive",children:"Reset All"}),O.jsx(dr,{onClick:M,variant:"secondary",className:"col-span-1 col-start-2 h-8 w-full",children:"Reset"}),O.jsx(dr,{onClick:A,variant:"secondary",className:"col-span-1 col-start-3 h-8 w-full",children:"Apply"})]})]})]})})]})}function oZ(e){const t=new Date(e);return!isNaN(t.getTime())}function $k({data:e,card:t}){var R,C;const[n,r]=m.useState([]),{keys:o}=Xr(e),i=ke(P=>P.filteringCards),s=ke(P=>P.themeStyle),a=ke(P=>P.isVisualEditing),l=i==null?void 0:i.find(P=>P.id===t.id),c=(R=t==null?void 0:t.preferences)==null?void 0:R.onClickFilter,{addOrUpdateFilterValues:u,addFilteringCard:f,removeFilterValue:p,removeFilteringCard:g}=Hi(),v=t==null?void 0:t.preferences;function b(P,M){if((M==null?void 0:M.type)==="date"&&oZ(P)){const{locale:A,options:D}=M.options;return new Date(P).toLocaleDateString(A,D)}if((M==null?void 0:M.type)==="number"){const{locale:A,currency:D,options:I}=M.options;return D?new Intl.NumberFormat(A,{style:"currency",currency:D,...I}).format(P):new Intl.NumberFormat(A,I).format(P)}return P}const x=o.map((P,M)=>({accessorKey:P,header:({column:A})=>{const D=A.getIsSorted();return O.jsxs("div",{className:"flex items-center justify-between gap-2",children:[O.jsxs("div",{className:"flex cursor-pointer items-center",onClick:()=>A.toggleSorting(A.getIsSorted()==="asc"),children:[P,D==="asc"?O.jsx(pw,{className:"ml-2 h-5 w-5"}):D==="desc"?O.jsx(hw,{className:"ml-2 h-5 w-5"}):null]}),a&&O.jsx(rZ,{columnName:A.id,columnIndex:M})]})},cell:({cell:A})=>{var U,W;const D=A.getValue(),I=(U=v==null?void 0:v.columnSettings)==null?void 0:U.find(j=>j.columnIdx===M),z=b(D,I),B=RT(D,(W=I==null?void 0:I.options)==null?void 0:W.colorRanges);return O.jsx("div",{className:"px-2 py-1",style:{backgroundColor:B},children:z})}})),w=GT({data:e,columns:x,getCoreRowModel:WT(),getPaginationRowModel:qT(),onSortingChange:r,getSortedRowModel:UT(),manualPagination:!0,state:{sorting:n}}),_=w.getSelectedRowModel().rows;m.useEffect(()=>{if(_.length===0){if(l){const P=t.id;p(P),g(t)}return}if(c){const{dimensionKeys:P}=Xr(e),M=c.map(A=>{const D=P==null?void 0:P[A.columnIndex],I=_.map(B=>B.getValue(D));return{filterId:t.id+"-"+D,connectionId:t==null?void 0:t.connectionId,tableName:t.lastSelectedTable,name:D,expression:A.expression,valueType:Ju(I[0]===void 0?"":I[0]),operation:"in",values:I}});u(M),f(t)}},[f,u,t,e,l,c,p,g,_]);function S(P){P.toggleSelected()}return O.jsxs(Nw,{className:"",containerClassName:"rounded-md ",onMouseDown:P=>P.stopPropagation(),children:[O.jsx(Lw,{children:w.getHeaderGroups().map(P=>O.jsx(Hu,{children:P.headers.map((M,A)=>{var D;return O.jsx(zw,{className:Ee("sticky -top-[1px] h-9 bg-muted-foreground px-2 text-background",{"border-x":A>0&&A<P.headers.length-1,"border-l":A===1&&P.headers.length==2},(D=s==null?void 0:s.table)==null?void 0:D.tableHeaderColor),children:M.isPlaceholder?null:Py(M.column.columnDef.header,M.getContext())},M.id)})},P.id))}),O.jsx(Fw,{children:(C=w.getRowModel().rows)!=null&&C.length?w.getRowModel().rows.map((P,M)=>O.jsx(Hu,{onClick:()=>S(P),className:Ee("whitespace-nowrap p-1",{"cursor-pointer data-[state=selected]:border-2 data-[state=selected]:border-dashed":c&&(c==null?void 0:c.length)>0}),"data-state":P.getIsSelected()&&"selected",children:P.getVisibleCells().map((A,D)=>{var I;return O.jsx(Jp,{className:Ee("p-0",{"border-x":D>0&&D<x.length-1||D===1&&x.length==2,"border-l":D==0,"border-b":M===((I=w.getRowModel().rows)==null?void 0:I.length)-1}),children:Py(A.column.columnDef.cell,A.getContext())},A.id)})},P.id)):O.jsx(Hu,{children:O.jsx(Jp,{colSpan:x.length,className:"p-1 text-center",children:"No results."})})})]})}function iZ({frame:e,footer:t,className:n,...r}){const{customCards:o}=el(),i=m.useRef(null),s=ke(U=>U.themeStyle),a=ke(U=>U.selectedSheetId),l=ke(U=>U.selectedFrameId),c=ke(U=>U.isDashboardEditing),u=e.cards.find(U=>U.id===e.activeCardId);rX(e,i);const{isError:f,isLoading:p,isFetching:g,cfg:v,visualKey:b,handleDatapointClick:x}=Tw(u),{setCardTitle:w,setCardDescription:_,setSelectedFrameId:S}=Hi(),{setSelectedConnectionId:R,setSelectedDatabaseName:C,setSelectedSchemaName:P,setSelectedTableName:M}=gw();function A(U){U.stopPropagation(),S(e.id),u!=null&&u.connectionId&&R(u==null?void 0:u.connectionId),u!=null&&u.lastSelectedDatabase&&C(u==null?void 0:u.lastSelectedDatabase),u!=null&&u.lastSelectedSchema&&P(u==null?void 0:u.lastSelectedSchema),u!=null&&u.lastSelectedTable&&M(u==null?void 0:u.lastSelectedTable)}function D(){if(o&&o.length>0){const U=o.find(W=>W.cardId===u.id);if(U&&U.replaceDefault){const W=U.content;if(W)return O.jsx(W,{card:u})}}return u.type==="kpi"?O.jsx(PT,{isLoading:p||g,card:u}):B}function I(){if(f)return O.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(u.type==="table"&&u.data&&u.data.length>0)return O.jsx("div",{className:"relative flex min-h-0 flex-1 grow basis-0",children:O.jsx($k,{card:u,data:u.data})});if(o&&o.length>0){const U=o.find(W=>W.cardId===u.id);if(U&&U.content){const W=U.content;return O.jsx(W,{card:u})}}if(v)return O.jsx(fw,{cfg:v,onDatapointClick:x},b)}function z(){if(o&&o.length>0){const U=o.find(W=>W.cardId===u.id);if(U&&U.footer){const W=U.footer;if(W)return O.jsx(W,{card:u})}}return t||null}if(!u.id)return null;const B=O.jsxs(O.Fragment,{children:[O.jsxs(wg,{className:"pb-4",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Va,{text:u.title,onSave:U=>w(a,u.id,U),children:O.jsx(Zd,{className:"text-base",children:u.title})}),(c||u.info)&&O.jsx(gX,{card:u}),u.refreshInterval&&O.jsxs(bT,{children:[O.jsx(yT,{className:"pr-1",children:O.jsx("div",{className:Ee("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":p||g})})}),O.jsx(Ew,{side:"right",align:"center",children:O.jsx("p",{className:"text-xs",children:`Realtime (${u==null?void 0:u.refreshInterval})`})})]}),!u.refreshInterval&&(p||g)&&O.jsx(Pw,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),O.jsx(Va,{text:(u==null?void 0:u.description)||"",onSave:U=>_(a,u.id,U),children:O.jsxs(bx,{children:[" ",u.description]})})]}),O.jsx(_g,{className:"relative flex grow flex-col",children:I()}),O.jsx(yx,{children:z()})]});return O.jsxs(vx,{tabIndex:-1,ref:i,role:"card-frame",onClick:A,className:Ee("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":l===e.id&&c},s==null?void 0:s.dashboardCard,n,"semaphor-card-frame"),...r,children:[O.jsx(rY,{frame:e}),D()]})}const Yw=pe.forwardRef(({className:e,...t},n)=>O.jsx("textarea",{className:Ee("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Yw.displayName="Textarea";const ky="horizontal",sZ=["horizontal","vertical"],Dk=m.forwardRef((e,t)=>{const{decorative:n,orientation:r=ky,...o}=e,i=Tk(r)?r:ky,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return m.createElement(Ue.div,le({"data-orientation":i},a,o,{ref:t}))});Dk.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!Tk(r)?new Error(aZ(o,n)):null}};function aZ(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:
308
+ `)},VQ=0,Dl=[];function HQ(e){var t=pe.useRef([]),n=pe.useRef([0,0]),r=pe.useRef(),o=pe.useState(VQ++)[0],i=pe.useState(function(){return ZT()})[0],s=pe.useRef(e);pe.useEffect(function(){s.current=e},[e]),pe.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var b=dQ([e.lockRef.current],(e.shards||[]).map(fP),!0).filter(Boolean);return b.forEach(function(x){return x.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),b.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=pe.useCallback(function(b,x){if("touches"in b&&b.touches.length===2)return!s.current.allowPinchZoom;var w=Gh(b),_=n.current,S="deltaX"in b?b.deltaX:_[0]-w[0],R="deltaY"in b?b.deltaY:_[1]-w[1],C,P=b.target,M=Math.abs(S)>Math.abs(R)?"h":"v";if("touches"in b&&M==="h"&&P.type==="range")return!1;var A=uP(M,P);if(!A)return!0;if(A?C=M:(C=M==="v"?"h":"v",A=uP(M,P)),!A)return!1;if(!r.current&&"changedTouches"in b&&(S||R)&&(r.current=C),!C)return!0;var D=r.current||C;return zQ(D,x,b,D==="h"?S:R,!0)},[]),l=pe.useCallback(function(b){var x=b;if(!(!Dl.length||Dl[Dl.length-1]!==i)){var w="deltaY"in x?dP(x):Gh(x),_=t.current.filter(function(C){return C.name===x.type&&C.target===x.target&&jQ(C.delta,w)})[0];if(_&&_.should){x.cancelable&&x.preventDefault();return}if(!_){var S=(s.current.shards||[]).map(fP).filter(Boolean).filter(function(C){return C.contains(x.target)}),R=S.length>0?a(x,S[0]):!s.current.noIsolation;R&&x.cancelable&&x.preventDefault()}}},[]),c=pe.useCallback(function(b,x,w,_){var S={name:b,delta:x,target:w,should:_};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(R){return R!==S})},1)},[]),u=pe.useCallback(function(b){n.current=Gh(b),r.current=void 0},[]),f=pe.useCallback(function(b){c(b.type,dP(b),b.target,a(b,e.lockRef.current))},[]),p=pe.useCallback(function(b){c(b.type,Gh(b),b.target,a(b,e.lockRef.current))},[]);pe.useEffect(function(){return Dl.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,$l),document.addEventListener("touchmove",l,$l),document.addEventListener("touchstart",u,$l),function(){Dl=Dl.filter(function(b){return b!==i}),document.removeEventListener("wheel",l,$l),document.removeEventListener("touchmove",l,$l),document.removeEventListener("touchstart",u,$l)}},[]);var g=e.removeScrollBar,v=e.inert;return pe.createElement(pe.Fragment,null,v?pe.createElement(i,{styles:BQ(o)}):null,g?pe.createElement(kQ,{gapMode:"margin"}):null)}const WQ=xQ(JT,HQ);var rk=pe.forwardRef(function(e,t){return pe.createElement(em,Qo({},e,{ref:t,sideCar:WQ}))});rk.classNames=em.classNames;const tm=rk,UQ=[" ","Enter","ArrowUp","ArrowDown"],qQ=[" ","Enter"],nm="Select",[rm,om,GQ]=Cg(nm),[Ac,qpe]=Bn(nm,[GQ,di]),Hw=di(),[YQ,tl]=Ac(nm),[KQ,XQ]=Ac(nm),QQ=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:p,required:g}=e,v=Hw(t),[b,x]=m.useState(null),[w,_]=m.useState(null),[S,R]=m.useState(!1),C=Xa(c),[P=!1,M]=nr({prop:r,defaultProp:o,onChange:i}),[A,D]=nr({prop:s,defaultProp:a,onChange:l}),I=m.useRef(null),z=b?!!b.closest("form"):!0,[B,U]=m.useState(new Set),W=Array.from(B).map(j=>j.props.value).join(";");return m.createElement(lf,v,m.createElement(YQ,{required:g,scope:t,trigger:b,onTriggerChange:x,valueNode:w,onValueNodeChange:_,valueNodeHasChildren:S,onValueNodeHasChildrenChange:R,contentId:Or(),value:A,onValueChange:D,open:P,onOpenChange:M,dir:C,triggerPointerDownPosRef:I,disabled:p},m.createElement(rm.Provider,{scope:t},m.createElement(KQ,{scope:e.__scopeSelect,onNativeOptionAdd:m.useCallback(j=>{U(Q=>new Set(Q).add(j))},[]),onNativeOptionRemove:m.useCallback(j=>{U(Q=>{const q=new Set(Q);return q.delete(j),q})},[])},n)),z?m.createElement(lk,{key:W,"aria-hidden":!0,required:g,tabIndex:-1,name:u,autoComplete:f,value:A,onChange:j=>D(j.target.value),disabled:p},A===void 0?m.createElement("option",{value:""}):null,Array.from(B)):null))},JQ="SelectTrigger",ZQ=m.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=Hw(n),s=tl(JQ,n),a=s.disabled||r,l=lt(t,s.onTriggerChange),c=om(n),[u,f,p]=ck(v=>{const b=c().filter(_=>!_.disabled),x=b.find(_=>_.value===s.value),w=uk(b,v,x);w!==void 0&&s.onValueChange(w.value)}),g=()=>{a||(s.onOpenChange(!0),p())};return m.createElement(cf,le({asChild:!0},i),m.createElement(Ue.button,le({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":ak(s.value)?"":void 0},o,{ref:l,onClick:Re(o.onClick,v=>{v.currentTarget.focus()}),onPointerDown:Re(o.onPointerDown,v=>{const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&(g(),s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)},v.preventDefault())}),onKeyDown:Re(o.onKeyDown,v=>{const b=u.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&f(v.key),!(b&&v.key===" ")&&UQ.includes(v.key)&&(g(),v.preventDefault())})})))}),eJ="SelectValue",tJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:s="",...a}=e,l=tl(eJ,n),{onValueNodeHasChildrenChange:c}=l,u=i!==void 0,f=lt(t,l.onValueNodeChange);return tr(()=>{c(u)},[c,u]),m.createElement(Ue.span,le({},a,{ref:f,style:{pointerEvents:"none"}}),ak(l.value)?m.createElement(m.Fragment,null,s):i)}),nJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.createElement(Ue.span,le({"aria-hidden":!0},o,{ref:t}),r||"▼")}),rJ=e=>m.createElement(Ug,le({asChild:!0},e)),Cc="SelectContent",oJ=m.forwardRef((e,t)=>{const n=tl(Cc,e.__scopeSelect),[r,o]=m.useState();if(tr(()=>{o(new DocumentFragment)},[]),!n.open){const i=r;return i?Fo.createPortal(m.createElement(ok,{scope:e.__scopeSelect},m.createElement(rm.Slot,{scope:e.__scopeSelect},m.createElement("div",null,e.children))),i):null}return m.createElement(iJ,le({},e,{ref:t}))}),$i=10,[ok,nl]=Ac(Cc),iJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:s,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:x,...w}=e,_=tl(Cc,n),[S,R]=m.useState(null),[C,P]=m.useState(null),M=lt(t,fe=>R(fe)),[A,D]=m.useState(null),[I,z]=m.useState(null),B=om(n),[U,W]=m.useState(!1),j=m.useRef(!1);m.useEffect(()=>{if(S)return Zg(S)},[S]),Xg();const Q=m.useCallback(fe=>{const[oe,...ee]=B().map(G=>G.ref.current),[ie]=ee.slice(-1),be=document.activeElement;for(const G of fe)if(G===be||(G==null||G.scrollIntoView({block:"nearest"}),G===oe&&C&&(C.scrollTop=0),G===ie&&C&&(C.scrollTop=C.scrollHeight),G==null||G.focus(),document.activeElement!==be))return},[B,C]),q=m.useCallback(()=>Q([A,S]),[Q,A,S]);m.useEffect(()=>{U&&q()},[U,q]);const{onOpenChange:X,triggerPointerDownPosRef:Z}=_;m.useEffect(()=>{if(S){let fe={x:0,y:0};const oe=ie=>{var be,G,me,_e;fe={x:Math.abs(Math.round(ie.pageX)-((be=(G=Z.current)===null||G===void 0?void 0:G.x)!==null&&be!==void 0?be:0)),y:Math.abs(Math.round(ie.pageY)-((me=(_e=Z.current)===null||_e===void 0?void 0:_e.y)!==null&&me!==void 0?me:0))}},ee=ie=>{fe.x<=10&&fe.y<=10?ie.preventDefault():S.contains(ie.target)||X(!1),document.removeEventListener("pointermove",oe),Z.current=null};return Z.current!==null&&(document.addEventListener("pointermove",oe),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",oe),document.removeEventListener("pointerup",ee,{capture:!0})}}},[S,X,Z]),m.useEffect(()=>{const fe=()=>X(!1);return window.addEventListener("blur",fe),window.addEventListener("resize",fe),()=>{window.removeEventListener("blur",fe),window.removeEventListener("resize",fe)}},[X]);const[T,V]=ck(fe=>{const oe=B().filter(be=>!be.disabled),ee=oe.find(be=>be.ref.current===document.activeElement),ie=uk(oe,fe,ee);ie&&setTimeout(()=>ie.ref.current.focus())}),K=m.useCallback((fe,oe,ee)=>{const ie=!j.current&&!ee;(_.value!==void 0&&_.value===oe||ie)&&(D(fe),ie&&(j.current=!0))},[_.value]),N=m.useCallback(()=>S==null?void 0:S.focus(),[S]),se=m.useCallback((fe,oe,ee)=>{const ie=!j.current&&!ee;(_.value!==void 0&&_.value===oe||ie)&&z(fe)},[_.value]),ae=r==="popper"?hP:sJ,ue=ae===hP?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:p,collisionPadding:g,sticky:v,hideWhenDetached:b,avoidCollisions:x}:{};return m.createElement(ok,{scope:n,content:S,viewport:C,onViewportChange:P,itemRefCallback:K,selectedItem:A,onItemLeave:N,itemTextRefCallback:se,focusSelectedItem:q,selectedItemText:I,position:r,isPositioned:U,searchRef:T},m.createElement(tm,{as:zi,allowPinchZoom:!0},m.createElement(Qg,{asChild:!0,trapped:_.open,onMountAutoFocus:fe=>{fe.preventDefault()},onUnmountAutoFocus:Re(o,fe=>{var oe;(oe=_.trigger)===null||oe===void 0||oe.focus({preventScroll:!0}),fe.preventDefault()})},m.createElement(Tc,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:s,onFocusOutside:fe=>fe.preventDefault(),onDismiss:()=>_.onOpenChange(!1)},m.createElement(ae,le({role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:fe=>fe.preventDefault()},w,ue,{onPlaced:()=>W(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Re(w.onKeyDown,fe=>{const oe=fe.ctrlKey||fe.altKey||fe.metaKey;if(fe.key==="Tab"&&fe.preventDefault(),!oe&&fe.key.length===1&&V(fe.key),["ArrowUp","ArrowDown","Home","End"].includes(fe.key)){let ie=B().filter(be=>!be.disabled).map(be=>be.ref.current);if(["ArrowUp","End"].includes(fe.key)&&(ie=ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(fe.key)){const be=fe.target,G=ie.indexOf(be);ie=ie.slice(G+1)}setTimeout(()=>Q(ie)),fe.preventDefault()}})}))))))}),sJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=tl(Cc,n),s=nl(Cc,n),[a,l]=m.useState(null),[c,u]=m.useState(null),f=lt(t,M=>u(M)),p=om(n),g=m.useRef(!1),v=m.useRef(!0),{viewport:b,selectedItem:x,selectedItemText:w,focusSelectedItem:_}=s,S=m.useCallback(()=>{if(i.trigger&&i.valueNode&&a&&c&&b&&x&&w){const M=i.trigger.getBoundingClientRect(),A=c.getBoundingClientRect(),D=i.valueNode.getBoundingClientRect(),I=w.getBoundingClientRect();if(i.dir!=="rtl"){const be=I.left-A.left,G=D.left-be,me=M.left-G,_e=M.width+me,Pe=Math.max(_e,A.width),$e=window.innerWidth-$i,Ve=Oy(G,[$i,$e-Pe]);a.style.minWidth=_e+"px",a.style.left=Ve+"px"}else{const be=A.right-I.right,G=window.innerWidth-D.right-be,me=window.innerWidth-M.right-G,_e=M.width+me,Pe=Math.max(_e,A.width),$e=window.innerWidth-$i,Ve=Oy(G,[$i,$e-Pe]);a.style.minWidth=_e+"px",a.style.right=Ve+"px"}const z=p(),B=window.innerHeight-$i*2,U=b.scrollHeight,W=window.getComputedStyle(c),j=parseInt(W.borderTopWidth,10),Q=parseInt(W.paddingTop,10),q=parseInt(W.borderBottomWidth,10),X=parseInt(W.paddingBottom,10),Z=j+Q+U+X+q,T=Math.min(x.offsetHeight*5,Z),V=window.getComputedStyle(b),K=parseInt(V.paddingTop,10),N=parseInt(V.paddingBottom,10),se=M.top+M.height/2-$i,ae=B-se,ue=x.offsetHeight/2,fe=x.offsetTop+ue,oe=j+Q+fe,ee=Z-oe;if(oe<=se){const be=x===z[z.length-1].ref.current;a.style.bottom="0px";const G=c.clientHeight-b.offsetTop-b.offsetHeight,me=Math.max(ae,ue+(be?N:0)+G+q),_e=oe+me;a.style.height=_e+"px"}else{const be=x===z[0].ref.current;a.style.top="0px";const me=Math.max(se,j+b.offsetTop+(be?K:0)+ue)+ee;a.style.height=me+"px",b.scrollTop=oe-se+b.offsetTop}a.style.margin=`${$i}px 0`,a.style.minHeight=T+"px",a.style.maxHeight=B+"px",r==null||r(),requestAnimationFrame(()=>g.current=!0)}},[p,i.trigger,i.valueNode,a,c,b,x,w,i.dir,r]);tr(()=>S(),[S]);const[R,C]=m.useState();tr(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const P=m.useCallback(M=>{M&&v.current===!0&&(S(),_==null||_(),v.current=!1)},[S,_]);return m.createElement(aJ,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:g,onScrollButtonChange:P},m.createElement("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R}},m.createElement(Ue.div,le({},o,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))}),hP=m.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=$i,...i}=e,s=Hw(n);return m.createElement(uf,le({},s,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[aJ,Ww]=Ac(Cc,{}),pP="SelectViewport",lJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=nl(pP,n),i=Ww(pP,n),s=lt(t,o.onViewportChange),a=m.useRef(0);return m.createElement(m.Fragment,null,m.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),m.createElement(rm.Slot,{scope:n},m.createElement(Ue.div,le({"data-radix-select-viewport":"",role:"presentation"},r,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:Re(r.onScroll,l=>{const c=l.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:f}=i;if(f!=null&&f.current&&u){const p=Math.abs(a.current-c.scrollTop);if(p>0){const g=window.innerHeight-$i*2,v=parseFloat(u.style.minHeight),b=parseFloat(u.style.height),x=Math.max(v,b);if(x<g){const w=x+p,_=Math.min(g,w),S=w-_;u.style.height=_+"px",u.style.bottom==="0px"&&(c.scrollTop=S>0?S:0,u.style.justifyContent="flex-end")}}}a.current=c.scrollTop})}))))}),cJ="SelectGroup",[uJ,dJ]=Ac(cJ),fJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Or();return m.createElement(uJ,{scope:n,id:o},m.createElement(Ue.div,le({role:"group","aria-labelledby":o},r,{ref:t})))}),hJ="SelectLabel",pJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=dJ(hJ,n);return m.createElement(Ue.div,le({id:o.id},r,{ref:t}))}),Dy="SelectItem",[gJ,ik]=Ac(Dy),mJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...s}=e,a=tl(Dy,n),l=nl(Dy,n),c=a.value===r,[u,f]=m.useState(i??""),[p,g]=m.useState(!1),v=lt(t,w=>{var _;return(_=l.itemRefCallback)===null||_===void 0?void 0:_.call(l,w,r,o)}),b=Or(),x=()=>{o||(a.onValueChange(r),a.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return m.createElement(gJ,{scope:n,value:r,disabled:o,textId:b,isSelected:c,onItemTextChange:m.useCallback(w=>{f(_=>{var S;return _||((S=w==null?void 0:w.textContent)!==null&&S!==void 0?S:"").trim()})},[])},m.createElement(rm.ItemSlot,{scope:n,value:r,disabled:o,textValue:u},m.createElement(Ue.div,le({role:"option","aria-labelledby":b,"data-highlighted":p?"":void 0,"aria-selected":c&&p,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},s,{ref:v,onFocus:Re(s.onFocus,()=>g(!0)),onBlur:Re(s.onBlur,()=>g(!1)),onPointerUp:Re(s.onPointerUp,x),onPointerMove:Re(s.onPointerMove,w=>{if(o){var _;(_=l.onItemLeave)===null||_===void 0||_.call(l)}else w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Re(s.onPointerLeave,w=>{if(w.currentTarget===document.activeElement){var _;(_=l.onItemLeave)===null||_===void 0||_.call(l)}}),onKeyDown:Re(s.onKeyDown,w=>{var _;((_=l.searchRef)===null||_===void 0?void 0:_.current)!==""&&w.key===" "||(qQ.includes(w.key)&&x(),w.key===" "&&w.preventDefault())})}))))}),Yh="SelectItemText",vJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,s=tl(Yh,n),a=nl(Yh,n),l=ik(Yh,n),c=XQ(Yh,n),[u,f]=m.useState(null),p=lt(t,w=>f(w),l.onItemTextChange,w=>{var _;return(_=a.itemTextRefCallback)===null||_===void 0?void 0:_.call(a,w,l.value,l.disabled)}),g=u==null?void 0:u.textContent,v=m.useMemo(()=>m.createElement("option",{key:l.value,value:l.value,disabled:l.disabled},g),[l.disabled,l.value,g]),{onNativeOptionAdd:b,onNativeOptionRemove:x}=c;return tr(()=>(b(v),()=>x(v)),[b,x,v]),m.createElement(m.Fragment,null,m.createElement(Ue.span,le({id:l.textId},i,{ref:p})),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Fo.createPortal(i.children,s.valueNode):null)}),bJ="SelectItemIndicator",yJ=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ik(bJ,n).isSelected?m.createElement(Ue.span,le({"aria-hidden":!0},r,{ref:t})):null}),gP="SelectScrollUpButton",xJ=m.forwardRef((e,t)=>{const n=nl(gP,e.__scopeSelect),r=Ww(gP,e.__scopeSelect),[o,i]=m.useState(!1),s=lt(t,r.onScrollButtonChange);return tr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const c=a.scrollTop>0;i(c)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?m.createElement(sk,le({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}})):null}),mP="SelectScrollDownButton",wJ=m.forwardRef((e,t)=>{const n=nl(mP,e.__scopeSelect),r=Ww(mP,e.__scopeSelect),[o,i]=m.useState(!1),s=lt(t,r.onScrollButtonChange);return tr(()=>{if(n.viewport&&n.isPositioned){let l=function(){const c=a.scrollHeight-a.clientHeight,u=Math.ceil(a.scrollTop)<c;i(u)};const a=n.viewport;return l(),a.addEventListener("scroll",l),()=>a.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),o?m.createElement(sk,le({},e,{ref:s,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}})):null}),sk=m.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=nl("SelectScrollButton",n),s=m.useRef(null),a=om(n),l=m.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return m.useEffect(()=>()=>l(),[l]),tr(()=>{var c;const u=a().find(f=>f.ref.current===document.activeElement);u==null||(c=u.ref.current)===null||c===void 0||c.scrollIntoView({block:"nearest"})},[a]),m.createElement(Ue.div,le({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:Re(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:Re(o.onPointerMove,()=>{var c;(c=i.onItemLeave)===null||c===void 0||c.call(i),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:Re(o.onPointerLeave,()=>{l()})}))}),_J=m.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.createElement(Ue.div,le({"aria-hidden":!0},r,{ref:t}))});function ak(e){return e===""||e===void 0}const lk=m.forwardRef((e,t)=>{const{value:n,...r}=e,o=m.useRef(null),i=lt(t,o),s=Jg(n);return m.useEffect(()=>{const a=o.current,l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==n&&u){const f=new Event("change",{bubbles:!0});u.call(a,n),a.dispatchEvent(f)}},[s,n]),m.createElement(pT,{asChild:!0},m.createElement("select",le({},r,{ref:i,defaultValue:n})))});lk.displayName="BubbleSelect";function ck(e){const t=Mn(e),n=m.useRef(""),r=m.useRef(0),o=m.useCallback(s=>{const a=n.current+s;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),i=m.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return m.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,i]}function uk(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let s=SJ(e,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==n));const l=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function SJ(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const CJ=QQ,dk=ZQ,EJ=tJ,RJ=nJ,PJ=rJ,fk=oJ,OJ=lJ,$J=fJ,hk=pJ,pk=mJ,DJ=vJ,TJ=yJ,gk=xJ,mk=wJ,vk=_J,hs=CJ,Fl=$J,ps=EJ,Ti=pe.forwardRef(({className:e,children:t,...n},r)=>O.jsxs(dk,{ref:r,className:Ee("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,O.jsx(RJ,{asChild:!0,children:O.jsx(Yg,{className:"h-4 w-4 opacity-50"})})]}));Ti.displayName=dk.displayName;const bk=pe.forwardRef(({className:e,...t},n)=>O.jsx(gk,{ref:n,className:Ee("flex cursor-default items-center justify-center py-1",e),...t,children:O.jsx(RK,{className:"h-4 w-4"})}));bk.displayName=gk.displayName;const yk=pe.forwardRef(({className:e,...t},n)=>O.jsx(mk,{ref:n,className:Ee("flex cursor-default items-center justify-center py-1",e),...t,children:O.jsx(Yg,{className:"h-4 w-4"})}));yk.displayName=mk.displayName;const ki=pe.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>O.jsx(PJ,{children:O.jsxs(fk,{ref:o,className:Ee("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[O.jsx(bk,{}),O.jsx(OJ,{className:Ee("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),O.jsx(yk,{})]})}));ki.displayName=fk.displayName;const ba=pe.forwardRef(({className:e,...t},n)=>O.jsx(hk,{ref:n,className:Ee("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));ba.displayName=hk.displayName;const Fn=pe.forwardRef(({className:e,children:t,...n},r)=>O.jsxs(pk,{ref:r,className:Ee("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[O.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:O.jsx(TJ,{children:O.jsx(df,{className:"h-4 w-4"})})}),O.jsx(DJ,{children:t})]}));Fn.displayName=pk.displayName;const eg=pe.forwardRef(({className:e,...t},n)=>O.jsx(vk,{ref:n,className:Ee("-mx-1 my-1 h-px bg-muted",e),...t}));eg.displayName=vk.displayName;const vP=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,bP=Pp,Uw=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return bP(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=i==null?void 0:i[c];if(u===null)return null;const p=vP(u)||vP(f);return o[c][p]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,p]=u;return p===void 0||(c[f]=p),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:p,...g}=u;return Object.entries(g).every(v=>{let[b,x]=v;return Array.isArray(x)?x.includes({...i,...a}[b]):{...i,...a}[b]===x})?[...c,f,p]:c},[]);return bP(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ty=Uw("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),dr=pe.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},i)=>{const s=r?zi:"button";return O.jsx(s,{className:Ee(Ty({variant:t,size:n,className:e})),ref:i,...o})});dr.displayName="Button";const kJ=m.forwardRef((e,t)=>m.createElement(Ue.label,le({},e,{ref:t,onMouseDown:n=>{var r;(r=e.onMouseDown)===null||r===void 0||r.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault()}}))),xk=kJ,MJ=Uw("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),zn=pe.forwardRef(({className:e,...t},n)=>O.jsx(xk,{ref:n,className:Ee(MJ(),e),...t}));zn.displayName=xk.displayName;const wk="Popover",[_k,Gpe]=Bn(wk,[di]),qw=di(),[AJ,Ic]=_k(wk),IJ=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:s=!1}=e,a=qw(t),l=m.useRef(null),[c,u]=m.useState(!1),[f=!1,p]=nr({prop:r,defaultProp:o,onChange:i});return m.createElement(lf,a,m.createElement(AJ,{scope:t,contentId:Or(),triggerRef:l,open:f,onOpenChange:p,onOpenToggle:m.useCallback(()=>p(g=>!g),[p]),hasCustomAnchor:c,onCustomAnchorAdd:m.useCallback(()=>u(!0),[]),onCustomAnchorRemove:m.useCallback(()=>u(!1),[]),modal:s},n))},NJ="PopoverTrigger",LJ=m.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ic(NJ,n),i=qw(n),s=lt(t,o.triggerRef),a=m.createElement(Ue.button,le({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Ek(o.open)},r,{ref:s,onClick:Re(e.onClick,o.onOpenToggle)}));return o.hasCustomAnchor?a:m.createElement(cf,le({asChild:!0},i),a)}),Sk="PopoverPortal",[FJ,zJ]=_k(Sk,{forceMount:void 0}),jJ=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=Ic(Sk,t);return m.createElement(FJ,{scope:t,forceMount:n},m.createElement(En,{present:n||i.open},m.createElement(Ug,{asChild:!0,container:o},r)))},dd="PopoverContent",BJ=m.forwardRef((e,t)=>{const n=zJ(dd,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=Ic(dd,e.__scopePopover);return m.createElement(En,{present:r||i.open},i.modal?m.createElement(VJ,le({},o,{ref:t})):m.createElement(HJ,le({},o,{ref:t})))}),VJ=m.forwardRef((e,t)=>{const n=Ic(dd,e.__scopePopover),r=m.useRef(null),o=lt(t,r),i=m.useRef(!1);return m.useEffect(()=>{const s=r.current;if(s)return Zg(s)},[]),m.createElement(tm,{as:zi,allowPinchZoom:!0},m.createElement(Ck,le({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Re(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),i.current||(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Re(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;i.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:Re(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})))}),HJ=m.forwardRef((e,t)=>{const n=Ic(dd,e.__scopePopover),r=m.useRef(!1),o=m.useRef(!1);return m.createElement(Ck,le({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1,o.current=!1},onInteractOutside:i=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const l=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),Ck=m.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=e,p=Ic(dd,n),g=qw(n);return Xg(),m.createElement(Qg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i},m.createElement(Tc,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>p.onOpenChange(!1)},m.createElement(uf,le({"data-state":Ek(p.open),role:"dialog",id:p.contentId},g,f,{ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))});function Ek(e){return e?"open":"closed"}const WJ=IJ,UJ=LJ,qJ=jJ,Rk=BJ,im=WJ,sm=UJ,ff=pe.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>O.jsx(qJ,{children:O.jsx(Rk,{ref:o,align:t,sideOffset:n,className:Ee("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));ff.displayName=Rk.displayName;function GJ(e,t){switch(t){case"full-date-time":return{locale:e,format:"full-date-time",options:{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",hour12:!0}};case"short-date-time":return{locale:e,format:"short-date-time",options:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",hour12:!0}};case"hours-date-time":return{locale:e,format:"hours-date-time",options:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}};case"short-date":return{format:"short-date",locale:e,options:{}};case"long-date":return{format:"long-date",locale:e,options:{year:"numeric",month:"long",day:"numeric"}};default:return{format:"short-date-time",locale:e,options:{}}}}const Gl=pe.forwardRef(({className:e,type:t,...n},r)=>O.jsx("input",{type:t,className:Ee("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));Gl.displayName="Input";function Pk({colorRanges:e,setColorRanges:t}){const n={start:-1/0,end:100,color:""};function r(s,a,l){const c=[...e];c[s]={...c[s],[a]:l},t(c)}function o(s){const a=[...e];a.splice(s,1),t(a)}function i(){t([...e,n])}return O.jsxs("div",{className:"space-y-3",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(zn,{children:"Color Range"}),O.jsx(dr,{onClick:i,variant:"secondary",className:"h-5 p-1 text-muted-foreground",children:O.jsx(CT,{className:"size-3"})})]}),e.map((s,a)=>O.jsxs("div",{className:"flex items-center gap-2 px-2",children:[O.jsx(Gl,{onChange:l=>r(a,"start",l.target.value),value:s.start,className:Ee(`h-7 ${fp}`)}),O.jsx("span",{children:"-"}),O.jsx(Gl,{value:s.end,onChange:l=>r(a,"end",l.target.value),className:Ee(`h-7 ${fp}`)}),O.jsx(Gl,{onChange:l=>r(a,"color",l.target.value),value:s.color,className:Ee(`h-7 min-w-14 p-0 ${fp}`),type:"color",list:"presetColors"}),O.jsxs("datalist",{id:"presetColors",children:[O.jsx("option",{children:zt.green[600]}),O.jsx("option",{children:zt.red[500]}),O.jsx("option",{children:zt.yellow[400]}),O.jsx("option",{children:zt.orange[500]})]}),O.jsx(dr,{onClick:()=>o(a),variant:"secondary",className:"h-5 p-1 text-muted-foreground",children:O.jsx($w,{className:"size-3"})})]},a))]})}const YJ=m.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:o,...i}=e,[s=!1,a]=nr({prop:n,onChange:o,defaultProp:r});return m.createElement(Ue.button,le({type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0},i,{ref:t,onClick:Re(e.onClick,()=>{e.disabled||a(!s)})}))}),Ok=YJ,KJ=Uw("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent hover:bg-accent hover:text-accent-foreground"},size:{default:"h-10 px-3",sm:"h-9 px-2.5",lg:"h-11 px-5"}},defaultVariants:{variant:"default",size:"default"}}),Gw=pe.forwardRef(({className:e,variant:t,size:n,...r},o)=>O.jsx(Ok,{ref:o,className:Ee(KJ({variant:t,size:n,className:e})),...r}));Gw.displayName=Ok.displayName;function XJ(e,t){var r;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(o=>o.columnIdx===t);return n==null?void 0:n.type}function QJ(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return((o=n==null?void 0:n.options)==null?void 0:o.locale)||"en-US"}function JJ(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t&&i.type==="date");return((o=n==null?void 0:n.options)==null?void 0:o.format)||"short-date-time"}function ZJ(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return(o=n==null?void 0:n.options)==null?void 0:o.currency}function eZ(e,t){var r,o,i;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(s=>s.columnIdx===t);return((i=(o=n==null?void 0:n.options)==null?void 0:o.options)==null?void 0:i.minimumFractionDigits)||0}function tZ(e,t){var r,o;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(i=>i.columnIdx===t);return((o=n==null?void 0:n.options)==null?void 0:o.colorRanges)||[]}function nZ(e,t){var r,o,i;const n=(r=e==null?void 0:e.columnSettings)==null?void 0:r.find(s=>s.columnIdx===t);return((i=(o=n==null?void 0:n.options)==null?void 0:o.options)==null?void 0:i.style)==="percent"}function rZ({columnIndex:e,columnName:t}){const[n,r]=m.useState(!1),o=Sr(D=>{var I;return(I=D.card)==null?void 0:I.preferences}),[i,s]=m.useState(XJ(o,e)),[a,l]=m.useState(tZ(o,e)),[c,u]=m.useState(QJ(o,e)),[f,p]=m.useState(JJ(o,e)),[g,v]=m.useState(ZJ(o,e)),[b,x]=m.useState(eZ(o,e).toString()),[w,_]=m.useState(nZ(o,e));m.useState("");const S=Sr(D=>D.actions.setCardPreferences);function R(){const D=[...new Set(C0.map(I=>I.currency))];return O.jsx(O.Fragment,{children:O.jsxs("div",{className:"grid grid-cols-9 items-center gap-2",children:[O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Locale"}),O.jsxs(hs,{value:c,onValueChange:I=>u(I),children:[O.jsx(Ti,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{children:O.jsxs(Fl,{children:[O.jsx(ba,{children:"Locale"}),C0.map(I=>O.jsx(Fn,{value:I.locale,children:I.locale},I.locale))]})})]}),O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Currency"}),O.jsxs(hs,{value:g||"none",onValueChange:I=>v(I==="none"?void 0:I),children:[O.jsx(Ti,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{children:O.jsxs(Fl,{children:[O.jsx(ba,{children:"Currency"}),O.jsx(Fn,{value:"none",children:"None"}),D.map(I=>O.jsx(Fn,{value:I,children:I},I))]})})]}),O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Decimals"}),O.jsxs(hs,{value:b,onValueChange:I=>x(I),children:[O.jsx(Ti,{className:"col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{children:["0","1","2","3","4"].map(I=>O.jsx(Fn,{value:I,children:I},I))})]}),!g&&O.jsx(Gw,{onPressedChange:I=>_(I),variant:"outline",size:"sm",className:"col-span-3 h-8","aria-label":"Toggle italic",children:O.jsx($K,{className:"size-3"})})]})})}function C(){return O.jsx(O.Fragment,{children:O.jsxs("div",{className:"grid grid-cols-9 items-center gap-2",children:[O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Locale"}),O.jsxs(hs,{defaultValue:"en-US",value:c,onValueChange:D=>u(D),children:[O.jsx(Ti,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{children:W9.map(D=>O.jsxs(Fl,{children:[O.jsx(ba,{children:D.label}),D.locales.map(I=>O.jsx(Fn,{value:I.code,children:I.name},I.code))]},D.label))})]}),O.jsx(zn,{className:"col-span-3",htmlFor:"format",children:"Format"}),O.jsxs(hs,{defaultValue:"short-date-time",value:f,onValueChange:D=>{console.log("format",D),p(D)},children:[O.jsx(Ti,{className:"col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{className:"",id:"type",children:O.jsxs(Fl,{children:[O.jsx(ba,{children:"Option"}),O.jsx(Fn,{value:"full-date-time",children:"Full Date-Time"}),O.jsx(Fn,{value:"short-date-time",children:"Short Date-Time"}),O.jsx(Fn,{value:"hours-date-time",children:"24-Hour Date-Time"}),O.jsx(Fn,{value:"short-date",children:"Short Date"}),O.jsx(Fn,{value:"long-date",children:"Long Date"})]})})]})]})})}function P(){S({...o,columnSettings:[]})}function M(){var D;S({...o,columnSettings:[...((D=o==null?void 0:o.columnSettings)==null?void 0:D.filter(I=>I.columnIdx!==e))||[]]})}function A(){var D,I,z;if(i==="date"){const B=GJ(c,f),U={columnIdx:e,type:i,options:B};S({...o,columnSettings:[...((D=o==null?void 0:o.columnSettings)==null?void 0:D.filter(W=>W.columnIdx!==e))||[],U]})}else if(i==="number"){let B;g?B={locale:c,currency:g,options:{style:"currency",currency:g,minimumFractionDigits:Number(b)},colorRanges:a.length>0?a:void 0}:B={locale:c,currency:void 0,options:{style:w?"percent":"decimal",minimumFractionDigits:Number(b)},colorRanges:a.length>0?a:void 0};const U={columnIdx:e,type:i,options:B};S({...o,columnSettings:[...((I=o==null?void 0:o.columnSettings)==null?void 0:I.filter(W=>W.columnIdx!==e))||[],U]})}else S({...o,columnSettings:[...((z=o==null?void 0:o.columnSettings)==null?void 0:z.filter(B=>B.columnIdx!==e))||[]]})}return O.jsxs(im,{onOpenChange:D=>r(D),children:[O.jsx(sm,{asChild:!0,children:O.jsx(Ow,{className:"size-3.5 cursor-pointer text-muted"})}),O.jsx(ff,{align:"center",className:"max-w-70",children:O.jsxs("div",{className:"grid gap-4",children:[O.jsxs("div",{className:"space-y-2",children:[O.jsx("h4",{className:"font-medium leading-none",children:"Display Settings"}),O.jsx("p",{className:"text-sm text-muted-foreground",children:`Display setting for '${t}'`})]}),O.jsxs("div",{className:"grid gap-2",children:[O.jsxs("div",{className:"grid grid-cols-3 items-center gap-2",children:[O.jsx(zn,{htmlFor:"scale",children:"Type"}),O.jsxs(hs,{value:i||"none",onValueChange:D=>s(D),children:[O.jsx(Ti,{className:"col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0",children:O.jsx(ps,{})}),O.jsx(ki,{id:"type",children:O.jsxs(Fl,{children:[O.jsx(ba,{children:"Option"}),O.jsx(Fn,{value:"number",children:"Number"}),O.jsx(Fn,{value:"date",children:"Date"}),O.jsx(Fn,{value:"none",children:"None"})]})})]})]}),i==="number"&&R(),i==="date"&&C(),i==="number"&&O.jsxs(O.Fragment,{children:[O.jsx(eg,{}),O.jsx(Pk,{colorRanges:a,setColorRanges:l})]}),O.jsx(eg,{}),O.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[O.jsx(dr,{onClick:P,variant:"secondary",className:"col-span-1 col-start-1 h-8 w-full text-destructive",children:"Reset All"}),O.jsx(dr,{onClick:M,variant:"secondary",className:"col-span-1 col-start-2 h-8 w-full",children:"Reset"}),O.jsx(dr,{onClick:A,variant:"secondary",className:"col-span-1 col-start-3 h-8 w-full",children:"Apply"})]})]})]})})]})}function oZ(e){const t=new Date(e);return!isNaN(t.getTime())}function $k({data:e,card:t}){var R,C;const[n,r]=m.useState([]),{keys:o}=Xr(e),i=ke(P=>P.filteringCards),s=ke(P=>P.themeStyle),a=ke(P=>P.isVisualEditing),l=i==null?void 0:i.find(P=>P.id===t.id),c=(R=t==null?void 0:t.preferences)==null?void 0:R.onClickFilter,{addOrUpdateFilterValues:u,addFilteringCard:f,removeFilterValue:p,removeFilteringCard:g}=Hi(),v=t==null?void 0:t.preferences;function b(P,M){if((M==null?void 0:M.type)==="date"&&oZ(P)){const{locale:A,options:D}=M.options;return new Date(P).toLocaleDateString(A,D)}if((M==null?void 0:M.type)==="number"){const{locale:A,currency:D,options:I}=M.options;return D?new Intl.NumberFormat(A,{style:"currency",currency:D,...I}).format(P):new Intl.NumberFormat(A,I).format(P)}return P}const x=o.map((P,M)=>({accessorKey:P,header:({column:A})=>{const D=A.getIsSorted();return O.jsxs("div",{className:"flex items-center justify-between gap-2",children:[O.jsxs("div",{className:"flex cursor-pointer items-center",onClick:()=>A.toggleSorting(A.getIsSorted()==="asc"),children:[P,D==="asc"?O.jsx(pw,{className:"ml-2 h-5 w-5"}):D==="desc"?O.jsx(hw,{className:"ml-2 h-5 w-5"}):null]}),a&&O.jsx(rZ,{columnName:A.id,columnIndex:M})]})},cell:({cell:A})=>{var U,W;const D=A.getValue(),I=(U=v==null?void 0:v.columnSettings)==null?void 0:U.find(j=>j.columnIdx===M),z=b(D,I),B=RT(D,(W=I==null?void 0:I.options)==null?void 0:W.colorRanges);return O.jsx("div",{className:"px-2 py-1",style:{backgroundColor:B},children:z})}})),w=GT({data:e,columns:x,getCoreRowModel:WT(),getPaginationRowModel:qT(),onSortingChange:r,getSortedRowModel:UT(),manualPagination:!0,state:{sorting:n}}),_=w.getSelectedRowModel().rows;m.useEffect(()=>{if(_.length===0){if(l){const P=t.id;p(P),g(t)}return}if(c){const{dimensionKeys:P}=Xr(e),M=c.map(A=>{const D=P==null?void 0:P[A.columnIndex],I=_.map(B=>B.getValue(D));return{filterId:t.id+"-"+D,connectionId:t==null?void 0:t.connectionId,tableName:t.lastSelectedTable,name:D,expression:A.expression,valueType:Ju(I[0]===void 0?"":I[0]),operation:"in",values:I}});u(M),f(t)}},[f,u,t,e,l,c,p,g,_]);function S(P){P.toggleSelected()}return O.jsxs(Nw,{className:"",containerClassName:"rounded-md ",onMouseDown:P=>P.stopPropagation(),children:[O.jsx(Lw,{children:w.getHeaderGroups().map(P=>O.jsx(Hu,{children:P.headers.map((M,A)=>{var D;return O.jsx(zw,{className:Ee("sticky -top-[1px] h-9 bg-muted-foreground px-2 text-background",{"border-x":A>0&&A<P.headers.length-1,"border-l":A===1&&P.headers.length==2},(D=s==null?void 0:s.table)==null?void 0:D.tableHeaderColor),children:M.isPlaceholder?null:Py(M.column.columnDef.header,M.getContext())},M.id)})},P.id))}),O.jsx(Fw,{children:(C=w.getRowModel().rows)!=null&&C.length?w.getRowModel().rows.map((P,M)=>O.jsx(Hu,{onClick:()=>S(P),className:Ee("whitespace-nowrap p-1",{"cursor-pointer data-[state=selected]:border-2 data-[state=selected]:border-dashed":c&&(c==null?void 0:c.length)>0}),"data-state":P.getIsSelected()&&"selected",children:P.getVisibleCells().map((A,D)=>{var I;return O.jsx(Jp,{className:Ee("p-0",{"border-x":D>0&&D<x.length-1||D===1&&x.length==2,"border-l":D==0,"border-r":D===x.length-1,"border-b":M===((I=w.getRowModel().rows)==null?void 0:I.length)-1}),children:Py(A.column.columnDef.cell,A.getContext())},A.id)})},P.id)):O.jsx(Hu,{children:O.jsx(Jp,{colSpan:x.length,className:"p-1 text-center",children:"No results."})})})]})}function iZ({frame:e,footer:t,className:n,...r}){const{customCards:o}=el(),i=m.useRef(null),s=ke(U=>U.themeStyle),a=ke(U=>U.selectedSheetId),l=ke(U=>U.selectedFrameId),c=ke(U=>U.isDashboardEditing),u=e.cards.find(U=>U.id===e.activeCardId);rX(e,i);const{isError:f,isLoading:p,isFetching:g,cfg:v,visualKey:b,handleDatapointClick:x}=Tw(u),{setCardTitle:w,setCardDescription:_,setSelectedFrameId:S}=Hi(),{setSelectedConnectionId:R,setSelectedDatabaseName:C,setSelectedSchemaName:P,setSelectedTableName:M}=gw();function A(U){U.stopPropagation(),S(e.id),u!=null&&u.connectionId&&R(u==null?void 0:u.connectionId),u!=null&&u.lastSelectedDatabase&&C(u==null?void 0:u.lastSelectedDatabase),u!=null&&u.lastSelectedSchema&&P(u==null?void 0:u.lastSelectedSchema),u!=null&&u.lastSelectedTable&&M(u==null?void 0:u.lastSelectedTable)}function D(){if(o&&o.length>0){const U=o.find(W=>W.cardId===u.id);if(U&&U.replaceDefault){const W=U.content;if(W)return O.jsx(W,{card:u})}}return u.type==="kpi"?O.jsx(PT,{isLoading:p||g,card:u}):B}function I(){if(f)return O.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(u.type==="table"&&u.data&&u.data.length>0)return O.jsx("div",{className:"relative flex min-h-0 flex-1 grow basis-0",children:O.jsx($k,{card:u,data:u.data})});if(o&&o.length>0){const U=o.find(W=>W.cardId===u.id);if(U&&U.content){const W=U.content;return O.jsx(W,{card:u})}}if(v)return O.jsx(fw,{cfg:v,onDatapointClick:x},b)}function z(){if(o&&o.length>0){const U=o.find(W=>W.cardId===u.id);if(U&&U.footer){const W=U.footer;if(W)return O.jsx(W,{card:u})}}return t||null}if(!u.id)return null;const B=O.jsxs(O.Fragment,{children:[O.jsxs(wg,{className:"pb-4",children:[O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Va,{text:u.title,onSave:U=>w(a,u.id,U),children:O.jsx(Zd,{className:"text-base",children:u.title})}),(c||u.info)&&O.jsx(gX,{card:u}),u.refreshInterval&&O.jsxs(bT,{children:[O.jsx(yT,{className:"pr-1",children:O.jsx("div",{className:Ee("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":p||g})})}),O.jsx(Ew,{side:"right",align:"center",children:O.jsx("p",{className:"text-xs",children:`Realtime (${u==null?void 0:u.refreshInterval})`})})]}),!u.refreshInterval&&(p||g)&&O.jsx(Pw,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),O.jsx(Va,{text:(u==null?void 0:u.description)||"",onSave:U=>_(a,u.id,U),children:O.jsxs(bx,{children:[" ",u.description]})})]}),O.jsx(_g,{className:"relative flex grow flex-col",children:I()}),O.jsx(yx,{children:z()})]});return O.jsxs(vx,{tabIndex:-1,ref:i,role:"card-frame",onClick:A,className:Ee("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":l===e.id&&c},s==null?void 0:s.dashboardCard,n,"semaphor-card-frame"),...r,children:[O.jsx(rY,{frame:e}),D()]})}const Yw=pe.forwardRef(({className:e,...t},n)=>O.jsx("textarea",{className:Ee("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Yw.displayName="Textarea";const ky="horizontal",sZ=["horizontal","vertical"],Dk=m.forwardRef((e,t)=>{const{decorative:n,orientation:r=ky,...o}=e,i=Tk(r)?r:ky,a=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return m.createElement(Ue.div,le({"data-orientation":i},a,o,{ref:t}))});Dk.propTypes={orientation(e,t,n){const r=e[t],o=String(r);return r&&!Tk(r)?new Error(aZ(o,n)):null}};function aZ(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:
309
309
  - horizontal
310
310
  - vertical
311
311
 
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-yuBRAEvg.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-uZiQ3QfU.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;
@@ -1,4 +1,4 @@
1
- import { D as p } from "../chunks/index-pwZs1bG3.js";
1
+ import { D as p } from "../chunks/index-23glWvhg.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-yuBRAEvg.js"),d=require("./chunks/dashboard-plus-jbL1CmJq.js"),I=require("react");require("react-dom");function N({card:t,footer:u,className:m,...c}){const{customCards:r}=e.useSemaphorContext(),h=I.useRef(null),{isError:p,isLoading:n,isFetching:i,cfg:x,visualKey:C,handleDatapointClick:f}=e.useDashboardCard(t),a=e.useDashboardStore(s=>s.themeStyle),l=e.useDashboardStore(s=>s.selectedSheetId),E=e.useDashboardStore(s=>s.selectedCardId),j=e.useDashboardStore(s=>s.isDashboardEditing),{setCardTitle:g,setCardDescription:D,setSelectedCardId:b}=e.useDashboardActions();function S(s){s.stopPropagation(),b(l,t.id)}function T(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.replaceDefault){const o=s.content;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return t.type==="kpi"?t.data&&t.data.length>0&&e.jsxRuntimeExports.jsx(e.KPICard,{isLoading:n||i,card:t}):y}function R(){if(p)return e.jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(t.type==="table"&&t.data&&t.data.length>0)return e.jsxRuntimeExports.jsxs(e.ScrollArea,{children:[e.jsxRuntimeExports.jsx(e.TableVisual,{card:t,data:t.data}),e.jsxRuntimeExports.jsx(e.ScrollBar,{orientation:"horizontal"})]});if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.content){const o=s.content;return e.jsxRuntimeExports.jsx(o,{card:t})}}if(x)return e.jsxRuntimeExports.jsx(e.ChartJsVisual,{cfg:x,onDatapointClick:f},C)}function A(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.footer){const o=s.footer;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return u||null}if(!t.id)return null;const y=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(e.CardHeader,{className:"pb-4",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(e.Editable,{text:t.title,onSave:s=>g(l,t.id,s),children:e.jsxRuntimeExports.jsx(e.CardTitle,{className:"text-base",children:t.title})}),t.refreshInterval&&e.jsxRuntimeExports.jsxs(e.Tooltip,{children:[e.jsxRuntimeExports.jsx(e.TooltipTrigger,{className:"pr-1",children:e.jsxRuntimeExports.jsx("div",{className:e.cn("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":n||i})})}),e.jsxRuntimeExports.jsx(e.TooltipContent,{side:"right",align:"center",children:e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:`Realtime (${t==null?void 0:t.refreshInterval})`})})]}),!t.refreshInterval&&(n||i)&&e.jsxRuntimeExports.jsx(e.LoaderCircle,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),e.jsxRuntimeExports.jsx(e.Editable,{text:(t==null?void 0:t.description)||"",onSave:s=>D(l,t.id,s),children:e.jsxRuntimeExports.jsxs(e.CardDescription,{children:[" ",t.description]})})]}),e.jsxRuntimeExports.jsx(e.CardContent,{className:"relative flex grow flex-col overflow-auto pb-0",children:R()}),e.jsxRuntimeExports.jsx(e.CardFooter,{children:A()})]});return e.jsxRuntimeExports.jsx(e.Card,{tabIndex:-1,ref:h,role:"dashboard-card",onClick:S,className:e.cn("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":E===t.id&&j},a==null?void 0:a.dashboardCard,m),...c,children:T()})}exports.BOOLEAN_DATA_TYPES=e.BOOLEAN_DATA_TYPES;exports.DATE_DATA_TYPES=e.DATE_DATA_TYPES;exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.NUMBER_DATA_TYPES=e.NUMBER_DATA_TYPES;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.TEXT_DATA_TYPES=e.TEXT_DATA_TYPES;exports.cleanCard=e.cleanCard;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getBookmarkKey=e.getBookmarkKey;exports.getColumnDataType=e.getColumnDataType;exports.getDashbaordStateWithoutData=e.getDashbaordStateWithoutData;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.SelectComponent=d.SelectComponent;exports.Surfboard=d.DashboardPlus;exports.useEditorAside=d.useEditorAside;exports.DashboardCard=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-uZiQ3QfU.js"),d=require("./chunks/dashboard-plus-1PKT3o6a.js"),I=require("react");require("react-dom");function N({card:t,footer:u,className:m,...c}){const{customCards:r}=e.useSemaphorContext(),h=I.useRef(null),{isError:p,isLoading:n,isFetching:i,cfg:x,visualKey:C,handleDatapointClick:f}=e.useDashboardCard(t),a=e.useDashboardStore(s=>s.themeStyle),l=e.useDashboardStore(s=>s.selectedSheetId),E=e.useDashboardStore(s=>s.selectedCardId),j=e.useDashboardStore(s=>s.isDashboardEditing),{setCardTitle:g,setCardDescription:D,setSelectedCardId:b}=e.useDashboardActions();function S(s){s.stopPropagation(),b(l,t.id)}function T(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.replaceDefault){const o=s.content;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return t.type==="kpi"?t.data&&t.data.length>0&&e.jsxRuntimeExports.jsx(e.KPICard,{isLoading:n||i,card:t}):y}function R(){if(p)return e.jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(t.type==="table"&&t.data&&t.data.length>0)return e.jsxRuntimeExports.jsxs(e.ScrollArea,{children:[e.jsxRuntimeExports.jsx(e.TableVisual,{card:t,data:t.data}),e.jsxRuntimeExports.jsx(e.ScrollBar,{orientation:"horizontal"})]});if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.content){const o=s.content;return e.jsxRuntimeExports.jsx(o,{card:t})}}if(x)return e.jsxRuntimeExports.jsx(e.ChartJsVisual,{cfg:x,onDatapointClick:f},C)}function A(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.footer){const o=s.footer;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return u||null}if(!t.id)return null;const y=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(e.CardHeader,{className:"pb-4",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(e.Editable,{text:t.title,onSave:s=>g(l,t.id,s),children:e.jsxRuntimeExports.jsx(e.CardTitle,{className:"text-base",children:t.title})}),t.refreshInterval&&e.jsxRuntimeExports.jsxs(e.Tooltip,{children:[e.jsxRuntimeExports.jsx(e.TooltipTrigger,{className:"pr-1",children:e.jsxRuntimeExports.jsx("div",{className:e.cn("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":n||i})})}),e.jsxRuntimeExports.jsx(e.TooltipContent,{side:"right",align:"center",children:e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:`Realtime (${t==null?void 0:t.refreshInterval})`})})]}),!t.refreshInterval&&(n||i)&&e.jsxRuntimeExports.jsx(e.LoaderCircle,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),e.jsxRuntimeExports.jsx(e.Editable,{text:(t==null?void 0:t.description)||"",onSave:s=>D(l,t.id,s),children:e.jsxRuntimeExports.jsxs(e.CardDescription,{children:[" ",t.description]})})]}),e.jsxRuntimeExports.jsx(e.CardContent,{className:"relative flex grow flex-col overflow-auto pb-0",children:R()}),e.jsxRuntimeExports.jsx(e.CardFooter,{children:A()})]});return e.jsxRuntimeExports.jsx(e.Card,{tabIndex:-1,ref:h,role:"dashboard-card",onClick:S,className:e.cn("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":E===t.id&&j},a==null?void 0:a.dashboardCard,m),...c,children:T()})}exports.BOOLEAN_DATA_TYPES=e.BOOLEAN_DATA_TYPES;exports.DATE_DATA_TYPES=e.DATE_DATA_TYPES;exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.NUMBER_DATA_TYPES=e.NUMBER_DATA_TYPES;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.TEXT_DATA_TYPES=e.TEXT_DATA_TYPES;exports.cleanCard=e.cleanCard;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getBookmarkKey=e.getBookmarkKey;exports.getColumnDataType=e.getColumnDataType;exports.getDashbaordStateWithoutData=e.getDashbaordStateWithoutData;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.SelectComponent=d.SelectComponent;exports.Surfboard=d.DashboardPlus;exports.useEditorAside=d.useEditorAside;exports.DashboardCard=N;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { u as _, a as k, b as n, c as w, j as s, C as F, E as f, d as P, T as R, e as B, f as h, g as L, L as q, h as K, i as O, k as Y, l as G, K as V, S as z, m as H, n as J, o as M } from "./chunks/index-pwZs1bG3.js";
2
- import { B as se, s as te, D as ae, q as oe, N as ne, I as re, r as ie, M as le, w as de, t as ue, O as ce, y as fe, J as he, x as Ce, A as xe, v as me, z as pe, F as ge, p as je, H as De, G as be } from "./chunks/index-pwZs1bG3.js";
3
- import { S as Te, D as Ee, u as Ie } from "./chunks/dashboard-plus-UfBR5acm.js";
1
+ import { u as _, a as k, b as n, c as w, j as s, C as F, E as f, d as P, T as R, e as B, f as h, g as L, L as q, h as K, i as O, k as Y, l as G, K as V, S as z, m as H, n as J, o as M } from "./chunks/index-23glWvhg.js";
2
+ import { B as se, s as te, D as ae, q as oe, N as ne, I as re, r as ie, M as le, w as de, t as ue, O as ce, y as fe, J as he, x as Ce, A as xe, v as me, z as pe, F as ge, p as je, H as De, G as be } from "./chunks/index-23glWvhg.js";
3
+ import { S as Te, D as Ee, u as Ie } from "./chunks/dashboard-plus-b5HPnuSv.js";
4
4
  import Q from "react";
5
5
  import "react-dom";
6
6
  function $({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/dashboard-plus-jbL1CmJq.js");require("../chunks/index-yuBRAEvg.js");require("react");require("react-dom");exports.Surfboard=r.DashboardPlus;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/dashboard-plus-1PKT3o6a.js");require("../chunks/index-uZiQ3QfU.js");require("react");require("react-dom");exports.Surfboard=r.DashboardPlus;
@@ -1,5 +1,5 @@
1
- import { D as i } from "../chunks/dashboard-plus-UfBR5acm.js";
2
- import "../chunks/index-pwZs1bG3.js";
1
+ import { D as i } from "../chunks/dashboard-plus-b5HPnuSv.js";
2
+ import "../chunks/index-23glWvhg.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  export {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.178",
8
+ "version": "0.0.179",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",