buildgrid-ui 1.7.1 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5345,21 +5345,14 @@ function Wi(e) {
5345
5345
  return e ? "open" : "closed";
5346
5346
  }
5347
5347
  var fg = Di, mg = _i, pg = Li, zi = $i, Vi = Bi;
5348
- const xN = fg, hg = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
5349
- mg,
5350
- {
5351
- ref: n,
5352
- className: T("border-b", e),
5353
- ...t
5354
- }
5355
- ));
5348
+ const xN = fg, hg = l.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(mg, { ref: n, className: T("border-b", e), ...t }));
5356
5349
  hg.displayName = "AccordionItem";
5357
5350
  const gg = l.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ u.jsx(pg, { className: "flex", children: /* @__PURE__ */ u.jsxs(
5358
5351
  zi,
5359
5352
  {
5360
5353
  ref: r,
5361
5354
  className: T(
5362
- "flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
5355
+ "text-base flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
5363
5356
  e
5364
5357
  ),
5365
5358
  ...n,
@@ -148,7 +148,7 @@ Check the top-level render call using <`+C+">."),W}var x=S,E=Symbol.for("react.t
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
- */const Gs=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lv=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return u.jsxs("div",{className:R("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||u.jsx(tv,{size:45}),u.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function uv(e,t){const n=l.createContext(t),r=a=>{const{children:s,...i}=a,c=l.useMemo(()=>i,Object.values(i));return u.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=l.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ve(e,t=[]){let n=[];function r(a,s){const i=l.createContext(s),c=n.length;n=[...n,s];const d=p=>{var y;const{scope:v,children:m,...h}=p,g=((y=v==null?void 0:v[e])==null?void 0:y[c])||i,b=l.useMemo(()=>h,Object.values(h));return u.jsx(g.Provider,{value:b,children:m})};d.displayName=a+"Provider";function f(p,v){var g;const m=((g=v==null?void 0:v[e])==null?void 0:g[c])||i,h=l.useContext(m);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>l.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,dv(o,...t)]}function dv(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:d})=>{const p=c(a)[`__scope${d}`];return{...i,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ys(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ys(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ys(e[o],null)}}}}function Z(...e){return l.useCallback(mn(...e),e)}var it=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),a=o.find(fv);if(a){const s=a.props.children,i=o.map(c=>c===a?l.Children.count(s)>1?l.Children.only(null):l.isValidElement(s)?s.props.children:null:c);return u.jsx(so,{...r,ref:t,children:l.isValidElement(s)?l.cloneElement(s,void 0,i):null})}return u.jsx(so,{...r,ref:t,children:n})});it.displayName="Slot";var so=l.forwardRef((e,t)=>{const{children:n,...r}=e;if(l.isValidElement(n)){const o=pv(n);return l.cloneElement(n,{...mv(r,n.props),ref:t?mn(t,o):o})}return l.Children.count(n)>1?l.Children.only(null):null});so.displayName="SlotClone";var io=({children:e})=>u.jsx(u.Fragment,{children:e});function fv(e){return l.isValidElement(e)&&e.type===io}function mv(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function pv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Vt(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:h,children:g}=m,b=S.useRef(null),y=S.useRef(new Map).current;return u.jsx(o,{scope:h,itemMap:y,collectionRef:b,children:g})};s.displayName=t;const i=e+"CollectionSlot",c=S.forwardRef((m,h)=>{const{scope:g,children:b}=m,y=a(i,g),w=Z(h,y.collectionRef);return u.jsx(it,{ref:w,children:b})});c.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=S.forwardRef((m,h)=>{const{scope:g,children:b,...y}=m,w=S.useRef(null),x=Z(h,w),E=a(d,g);return S.useEffect(()=>(E.itemMap.set(w,{ref:w,...y}),()=>void E.itemMap.delete(w))),u.jsx(it,{[f]:"",ref:x,children:b})});p.displayName=d;function v(m){const h=a(e+"CollectionConsumer",m);return S.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((E,P)=>y.indexOf(E.ref.current)-y.indexOf(P.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},v,r]}function k(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function be(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function xe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=hv({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=be(n),c=l.useCallback(d=>{if(a){const p=typeof d=="function"?d(e):d;p!==e&&i(p)}else o(d)},[a,e,o,i]);return[s,c]}function hv({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),a=be(t);return l.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var gv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],O=gv.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?it:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Wn(e,t){e&&_n.flushSync(()=>e.dispatchEvent(t))}var we=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function vv(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Ce=e=>{const{present:t,children:n}=e,r=bv(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=Z(r.ref,wv(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Ce.displayName="Presence";function bv(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),s=e?"mounted":"unmounted",[i,c]=vv(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=zn(r.current);a.current=i==="mounted"?d:"none"},[i]),we(()=>{const d=r.current,f=o.current;if(f!==e){const v=a.current,m=zn(d);e?c("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),we(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const g=zn(r.current).includes(m.animationName);if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},v=m=>{m.target===t&&(a.current=zn(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function zn(e){return(e==null?void 0:e.animationName)||"none"}function wv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yv=l.useId||(()=>{}),xv=0;function Ee(e){const[t,n]=l.useState(yv());return we(()=>{n(r=>r??String(xv++))},[e]),t?`radix-${t}`:""}var co="Collapsible",[Cv,Us]=ve(co),[Nv,lo]=Cv(co),Ks=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[c=!1,d]=xe({prop:r,defaultProp:o,onChange:s});return u.jsx(Nv,{scope:n,disabled:a,contentId:Ee(),open:c,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),children:u.jsx(O.div,{"data-state":fo(c),"data-disabled":a?"":void 0,...i,ref:t})})});Ks.displayName=co;var qs="CollapsibleTrigger",Xs=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=lo(qs,n);return u.jsx(O.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":fo(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:k(e.onClick,o.onOpenToggle)})});Xs.displayName=qs;var uo="CollapsibleContent",Zs=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=lo(uo,e.__scopeCollapsible);return u.jsx(Ce,{present:n||o.open,children:({present:a})=>u.jsx(Ev,{...r,ref:t,present:a})})});Zs.displayName=uo;var Ev=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=lo(uo,n),[i,c]=l.useState(r),d=l.useRef(null),f=Z(t,d),p=l.useRef(0),v=p.current,m=l.useRef(0),h=m.current,g=s.open||i,b=l.useRef(g),y=l.useRef(void 0);return l.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),we(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const x=w.getBoundingClientRect();p.current=x.height,m.current=x.width,b.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),c(r)}},[s.open,r]),u.jsx(O.div,{"data-state":fo(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:f,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:g&&o})});function fo(e){return e?"open":"closed"}var Sv=Ks,Pv=Xs,Tv=Zs,Mv=l.createContext(void 0);function vt(e){const t=l.useContext(Mv);return e||t||"ltr"}var ct="Accordion",Av=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[mo,Rv,Dv]=Vt(ct),[Vn,fE]=ve(ct,[Dv,Us]),po=Us(),Qs=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return u.jsx(mo.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?u.jsx(_v,{...a,ref:t}):u.jsx(jv,{...o,ref:t})})});Qs.displayName=ct;var[Js,Iv]=Vn(ct),[ei,kv]=Vn(ct,{collapsible:!1}),jv=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,c]=xe({prop:n,defaultProp:r,onChange:o});return u.jsx(Js,{scope:e.__scopeAccordion,value:i?[i]:[],onItemOpen:c,onItemClose:S.useCallback(()=>a&&c(""),[a,c]),children:u.jsx(ei,{scope:e.__scopeAccordion,collapsible:a,children:u.jsx(ti,{...s,ref:t})})})}),_v=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=xe({prop:n,defaultProp:r,onChange:o}),c=S.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=S.useCallback(f=>i((p=[])=>p.filter(v=>v!==f)),[i]);return u.jsx(Js,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d,children:u.jsx(ei,{scope:e.__scopeAccordion,collapsible:!0,children:u.jsx(ti,{...a,ref:t})})})}),[Ov,Hn]=Vn(ct),ti=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=S.useRef(null),c=Z(i,t),d=Rv(n),p=vt(o)==="ltr",v=k(e.onKeyDown,m=>{var D;if(!Av.includes(m.key))return;const h=m.target,g=d().filter(I=>{var $;return!(($=I.ref.current)!=null&&$.disabled)}),b=g.findIndex(I=>I.ref.current===h),y=g.length;if(b===-1)return;m.preventDefault();let w=b;const x=0,E=y-1,P=()=>{w=b+1,w>E&&(w=x)},T=()=>{w=b-1,w<x&&(w=E)};switch(m.key){case"Home":w=x;break;case"End":w=E;break;case"ArrowRight":a==="horizontal"&&(p?P():T());break;case"ArrowDown":a==="vertical"&&P();break;case"ArrowLeft":a==="horizontal"&&(p?T():P());break;case"ArrowUp":a==="vertical"&&T();break}const M=w%y;(D=g[M].ref.current)==null||D.focus()});return u.jsx(Ov,{scope:n,disabled:r,direction:o,orientation:a,children:u.jsx(mo.Slot,{scope:n,children:u.jsx(O.div,{...s,"data-orientation":a,ref:c,onKeyDown:r?void 0:v})})})}),Gn="AccordionItem",[Lv,ho]=Vn(Gn),ni=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Hn(Gn,n),s=Iv(Gn,n),i=po(n),c=Ee(),d=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return u.jsx(Lv,{scope:n,open:d,disabled:f,triggerId:c,children:u.jsx(Sv,{"data-orientation":a.orientation,"data-state":ci(d),...i,...o,ref:t,disabled:f,open:d,onOpenChange:p=>{p?s.onItemOpen(r):s.onItemClose(r)}})})});ni.displayName=Gn;var ri="AccordionHeader",oi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hn(ct,n),a=ho(ri,n);return u.jsx(O.h3,{"data-orientation":o.orientation,"data-state":ci(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});oi.displayName=ri;var go="AccordionTrigger",ai=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hn(ct,n),a=ho(go,n),s=kv(go,n),i=po(n);return u.jsx(mo.ItemSlot,{scope:n,children:u.jsx(Pv,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});ai.displayName=go;var si="AccordionContent",ii=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hn(ct,n),a=ho(si,n),s=po(n);return u.jsx(Tv,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ii.displayName=si;function ci(e){return e?"open":"closed"}var $v=Qs,Fv=ni,Bv=oi,li=ai,ui=ii;const Wv=$v,di=l.forwardRef(({className:e,...t},n)=>u.jsx(Fv,{ref:n,className:R("border-b",e),...t}));di.displayName="AccordionItem";const fi=l.forwardRef(({className:e,children:t,...n},r)=>u.jsx(Bv,{className:"flex",children:u.jsxs(li,{ref:r,className:R("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,u.jsx(Fn,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));fi.displayName=li.displayName;const mi=l.forwardRef(({className:e,children:t,...n},r)=>u.jsx(ui,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:u.jsx("div",{className:R("pb-4 pt-0",e),children:t})}));mi.displayName=ui.displayName;const pi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hi=Gr,Ht=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return hi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],p=a==null?void 0:a[d];if(f===null)return null;const v=pi(f)||pi(p);return o[d][v]}),i=n&&Object.entries(n).reduce((d,f)=>{let[p,v]=f;return v===void 0||(d[p]=v),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:p,className:v,...m}=f;return Object.entries(m).every(h=>{let[g,b]=h;return Array.isArray(b)?b.includes({...a,...i}[g]):{...a,...i}[g]===b})?[...d,p,v]:d},[]);return hi(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},zv=Ht("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),Yn=l.forwardRef(({className:e,sizing:t,type:n,...r},o)=>u.jsx("input",{type:n,className:R(zv({sizing:t,className:e})),ref:o,...r}));Yn.displayName="Input";const Vv=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},Un=l.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const i=c=>{const d=c.target;if(r){const f=Vv(d.value,r);d.value=f}o==null||o(c)};return u.jsxs("div",{className:"relative w-full",children:[t&&u.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),u.jsx(Yn,{className:R(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:i,...a}),n&&u.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});Un.displayName="AdaptiveInput";function Hv(e,t=globalThis==null?void 0:globalThis.document){const n=be(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Gv="DismissableLayer",vo="dismissableLayer.update",Yv="dismissableLayer.pointerDownOutside",Uv="dismissableLayer.focusOutside",gi,vi=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),It=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,d=l.useContext(vi),[f,p]=l.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=l.useState({}),h=Z(t,M=>p(M)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,P=Xv(M=>{const D=M.target,I=[...d.branches].some($=>$.contains(D));!E||I||(o==null||o(M),s==null||s(M),M.defaultPrevented||i==null||i())},v),T=Zv(M=>{const D=M.target;[...d.branches].some($=>$.contains(D))||(a==null||a(M),s==null||s(M),M.defaultPrevented||i==null||i())},v);return Hv(M=>{w===d.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},v),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(gi=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),bi(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=gi)}},[f,v,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),bi())},[f,d]),l.useEffect(()=>{const M=()=>m({});return document.addEventListener(vo,M),()=>document.removeEventListener(vo,M)},[]),u.jsx(O.div,{...c,ref:h,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:k(e.onFocusCapture,T.onFocusCapture),onBlurCapture:k(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:k(e.onPointerDownCapture,P.onPointerDownCapture)})});It.displayName=Gv;var Kv="DismissableLayerBranch",qv=l.forwardRef((e,t)=>{const n=l.useContext(vi),r=l.useRef(null),o=Z(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(O.div,{...e,ref:o})});qv.displayName=Kv;function Xv(e,t=globalThis==null?void 0:globalThis.document){const n=be(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let c=function(){wi(Yv,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zv(e,t=globalThis==null?void 0:globalThis.document){const n=be(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&wi(Uv,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bi(){const e=new CustomEvent(vo);document.dispatchEvent(e)}function wi(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Wn(o,a):o.dispatchEvent(a)}var bo="focusScope.autoFocusOnMount",wo="focusScope.autoFocusOnUnmount",yi={bubbles:!1,cancelable:!0},Qv="FocusScope",pn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=l.useState(null),d=be(o),f=be(a),p=l.useRef(null),v=Z(t,g=>c(g)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(x){if(m.paused||!i)return;const E=x.target;i.contains(E)?p.current=E:bt(p.current,{select:!0})},b=function(x){if(m.paused||!i)return;const E=x.relatedTarget;E!==null&&(i.contains(E)||bt(p.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const P of x)P.removedNodes.length>0&&bt(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(y);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,m.paused]),l.useEffect(()=>{if(i){Ni.add(m);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(bo,yi);i.addEventListener(bo,d),i.dispatchEvent(y),y.defaultPrevented||(Jv(ob(xi(i)),{select:!0}),document.activeElement===g&&bt(i))}return()=>{i.removeEventListener(bo,d),setTimeout(()=>{const y=new CustomEvent(wo,yi);i.addEventListener(wo,f),i.dispatchEvent(y),y.defaultPrevented||bt(g??document.body,{select:!0}),i.removeEventListener(wo,f),Ni.remove(m)},0)}}},[i,d,f,m]);const h=l.useCallback(g=>{if(!n&&!r||m.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const w=g.currentTarget,[x,E]=eb(w);x&&E?!g.shiftKey&&y===E?(g.preventDefault(),n&&bt(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&bt(E,{select:!0})):y===w&&g.preventDefault()}},[n,r,m.paused]);return u.jsx(O.div,{tabIndex:-1,...s,ref:v,onKeyDown:h})});pn.displayName=Qv;function Jv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(bt(r,{select:t}),document.activeElement!==n)return}function eb(e){const t=xi(e),n=Ci(t,e),r=Ci(t.reverse(),e);return[n,r]}function xi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ci(e,t){for(const n of e)if(!tb(n,{upTo:t}))return n}function tb(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function nb(e){return e instanceof HTMLInputElement&&"select"in e}function bt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nb(e)&&t&&e.select()}}var Ni=rb();function rb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ei(e,t),e.unshift(t)},remove(t){var n;e=Ei(e,t),(n=e[0])==null||n.resume()}}}function Ei(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ob(e){return e.filter(t=>t.tagName!=="A")}var ab="Portal",hn=l.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=l.useState(!1);we(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?jn.createPortal(u.jsx(O.div,{...r,ref:t}),s):null});hn.displayName=ab;var yo=0;function Kn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Si()),document.body.insertAdjacentElement("beforeend",e[1]??Si()),yo++,()=>{yo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),yo--}},[])}function Si(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ze=function(){return Ze=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ze.apply(this,arguments)};function Pi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function sb(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var qn="right-scroll-bar-position",Xn="width-before-scroll-bar",ib="with-scroll-bars-hidden",cb="--removed-body-scroll-bar-size";function xo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lb(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ub=typeof window<"u"?l.useLayoutEffect:l.useEffect,Ti=new WeakMap;function db(e,t){var n=lb(null,function(r){return e.forEach(function(o){return xo(o,r)})});return ub(function(){var r=Ti.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||xo(i,null)}),a.forEach(function(i){o.has(i)||xo(i,s)})}Ti.set(n,e)},[e]),n}function fb(e){return e}function mb(e,t){t===void 0&&(t=fb);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function pb(e){e===void 0&&(e={});var t=mb(null);return t.options=Ze({async:!0,ssr:!1},e),t}var Mi=function(e){var t=e.sideCar,n=Pi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Ze({},n))};Mi.isSideCarExport=!0;function hb(e,t){return e.useMedium(t),Mi}var Ai=pb(),Co=function(){},Zn=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Co,onWheelCapture:Co,onTouchMoveCapture:Co}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,v=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,x=Pi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,P=db([n,t]),T=Ze(Ze({},x),o);return l.createElement(l.Fragment,null,f&&l.createElement(E,{sideCar:Ai,removeScrollBar:d,shards:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),s?l.cloneElement(l.Children.only(i),Ze(Ze({},T),{ref:P})):l.createElement(y,Ze({},T,{className:c,ref:P}),i))});Zn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zn.classNames={fullWidth:Xn,zeroRight:qn};var gb=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vb(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gb();return t&&e.setAttribute("nonce",t),e}function bb(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wb(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yb=function(){var e=0,t=null;return{add:function(n){e==0&&(t=vb())&&(bb(t,n),wb(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xb=function(){var e=yb();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ri=function(){var e=xb(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Cb={left:0,top:0,right:0,gap:0},No=function(e){return parseInt(e||"",10)||0},Nb=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[No(n),No(r),No(o)]},Eb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cb;var t=Nb(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Sb=Ri(),Gt="data-scroll-locked",Pb=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
151
+ */const Gs=ye("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),lv=e=>{const{notFoundText:t,notFoundAction:n,icon:r,className:o}=e;return u.jsxs("div",{className:R("flex flex-col gap-4 items-center bg-gray-200 rounded-lg p-6 justify-center",o),children:[r||u.jsx(tv,{size:45}),u.jsxs("div",{className:"text-lg font-medium m-0",children:[t,n||null]})]})};function uv(e,t){const n=l.createContext(t),r=a=>{const{children:s,...i}=a,c=l.useMemo(()=>i,Object.values(i));return u.jsx(n.Provider,{value:c,children:s})};r.displayName=e+"Provider";function o(a){const s=l.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function ve(e,t=[]){let n=[];function r(a,s){const i=l.createContext(s),c=n.length;n=[...n,s];const d=p=>{var y;const{scope:v,children:m,...h}=p,g=((y=v==null?void 0:v[e])==null?void 0:y[c])||i,b=l.useMemo(()=>h,Object.values(h));return u.jsx(g.Provider,{value:b,children:m})};d.displayName=a+"Provider";function f(p,v){var g;const m=((g=v==null?void 0:v[e])==null?void 0:g[c])||i,h=l.useContext(m);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[d,f]}const o=()=>{const a=n.map(s=>l.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[r,dv(o,...t)]}function dv(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:c,scopeName:d})=>{const p=c(a)[`__scope${d}`];return{...i,...p}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function Ys(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function mn(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ys(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ys(e[o],null)}}}}function Z(...e){return l.useCallback(mn(...e),e)}var it=l.forwardRef((e,t)=>{const{children:n,...r}=e,o=l.Children.toArray(n),a=o.find(fv);if(a){const s=a.props.children,i=o.map(c=>c===a?l.Children.count(s)>1?l.Children.only(null):l.isValidElement(s)?s.props.children:null:c);return u.jsx(so,{...r,ref:t,children:l.isValidElement(s)?l.cloneElement(s,void 0,i):null})}return u.jsx(so,{...r,ref:t,children:n})});it.displayName="Slot";var so=l.forwardRef((e,t)=>{const{children:n,...r}=e;if(l.isValidElement(n)){const o=pv(n);return l.cloneElement(n,{...mv(r,n.props),ref:t?mn(t,o):o})}return l.Children.count(n)>1?l.Children.only(null):null});so.displayName="SlotClone";var io=({children:e})=>u.jsx(u.Fragment,{children:e});function fv(e){return l.isValidElement(e)&&e.type===io}function mv(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{a(...i),o(...i)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function pv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Vt(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=m=>{const{scope:h,children:g}=m,b=S.useRef(null),y=S.useRef(new Map).current;return u.jsx(o,{scope:h,itemMap:y,collectionRef:b,children:g})};s.displayName=t;const i=e+"CollectionSlot",c=S.forwardRef((m,h)=>{const{scope:g,children:b}=m,y=a(i,g),w=Z(h,y.collectionRef);return u.jsx(it,{ref:w,children:b})});c.displayName=i;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=S.forwardRef((m,h)=>{const{scope:g,children:b,...y}=m,w=S.useRef(null),x=Z(h,w),E=a(d,g);return S.useEffect(()=>(E.itemMap.set(w,{ref:w,...y}),()=>void E.itemMap.delete(w))),u.jsx(it,{[f]:"",ref:x,children:b})});p.displayName=d;function v(m){const h=a(e+"CollectionConsumer",m);return S.useCallback(()=>{const b=h.collectionRef.current;if(!b)return[];const y=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(h.itemMap.values()).sort((E,P)=>y.indexOf(E.ref.current)-y.indexOf(P.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:s,Slot:c,ItemSlot:p},v,r]}function k(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function be(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function xe({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=hv({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=be(n),c=l.useCallback(d=>{if(a){const p=typeof d=="function"?d(e):d;p!==e&&i(p)}else o(d)},[a,e,o,i]);return[s,c]}function hv({defaultProp:e,onChange:t}){const n=l.useState(e),[r]=n,o=l.useRef(r),a=be(t);return l.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}var gv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],O=gv.reduce((e,t)=>{const n=l.forwardRef((r,o)=>{const{asChild:a,...s}=r,i=a?it:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(i,{...s,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function Wn(e,t){e&&_n.flushSync(()=>e.dispatchEvent(t))}var we=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{};function vv(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Ce=e=>{const{present:t,children:n}=e,r=bv(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=Z(r.ref,wv(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Ce.displayName="Presence";function bv(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),s=e?"mounted":"unmounted",[i,c]=vv(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const d=zn(r.current);a.current=i==="mounted"?d:"none"},[i]),we(()=>{const d=r.current,f=o.current;if(f!==e){const v=a.current,m=zn(d);e?c("MOUNT"):m==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(f&&v!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),we(()=>{if(t){let d;const f=t.ownerDocument.defaultView??window,p=m=>{const g=zn(r.current).includes(m.animationName);if(m.target===t&&g&&(c("ANIMATION_END"),!o.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",d=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},v=m=>{m.target===t&&(a.current=zn(r.current))};return t.addEventListener("animationstart",v),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(d),t.removeEventListener("animationstart",v),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:l.useCallback(d=>{d&&(r.current=getComputedStyle(d)),n(d)},[])}}function zn(e){return(e==null?void 0:e.animationName)||"none"}function wv(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yv=l.useId||(()=>{}),xv=0;function Ee(e){const[t,n]=l.useState(yv());return we(()=>{n(r=>r??String(xv++))},[e]),t?`radix-${t}`:""}var co="Collapsible",[Cv,Us]=ve(co),[Nv,lo]=Cv(co),Ks=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[c=!1,d]=xe({prop:r,defaultProp:o,onChange:s});return u.jsx(Nv,{scope:n,disabled:a,contentId:Ee(),open:c,onOpenToggle:l.useCallback(()=>d(f=>!f),[d]),children:u.jsx(O.div,{"data-state":fo(c),"data-disabled":a?"":void 0,...i,ref:t})})});Ks.displayName=co;var qs="CollapsibleTrigger",Xs=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=lo(qs,n);return u.jsx(O.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":fo(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:k(e.onClick,o.onOpenToggle)})});Xs.displayName=qs;var uo="CollapsibleContent",Zs=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=lo(uo,e.__scopeCollapsible);return u.jsx(Ce,{present:n||o.open,children:({present:a})=>u.jsx(Ev,{...r,ref:t,present:a})})});Zs.displayName=uo;var Ev=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=lo(uo,n),[i,c]=l.useState(r),d=l.useRef(null),f=Z(t,d),p=l.useRef(0),v=p.current,m=l.useRef(0),h=m.current,g=s.open||i,b=l.useRef(g),y=l.useRef(void 0);return l.useEffect(()=>{const w=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(w)},[]),we(()=>{const w=d.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const x=w.getBoundingClientRect();p.current=x.height,m.current=x.width,b.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),c(r)}},[s.open,r]),u.jsx(O.div,{"data-state":fo(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:f,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:g&&o})});function fo(e){return e?"open":"closed"}var Sv=Ks,Pv=Xs,Tv=Zs,Mv=l.createContext(void 0);function vt(e){const t=l.useContext(Mv);return e||t||"ltr"}var ct="Accordion",Av=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[mo,Rv,Dv]=Vt(ct),[Vn,fE]=ve(ct,[Dv,Us]),po=Us(),Qs=S.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return u.jsx(mo.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?u.jsx(_v,{...a,ref:t}):u.jsx(jv,{...o,ref:t})})});Qs.displayName=ct;var[Js,Iv]=Vn(ct),[ei,kv]=Vn(ct,{collapsible:!1}),jv=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,c]=xe({prop:n,defaultProp:r,onChange:o});return u.jsx(Js,{scope:e.__scopeAccordion,value:i?[i]:[],onItemOpen:c,onItemClose:S.useCallback(()=>a&&c(""),[a,c]),children:u.jsx(ei,{scope:e.__scopeAccordion,collapsible:a,children:u.jsx(ti,{...s,ref:t})})})}),_v=S.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[s=[],i]=xe({prop:n,defaultProp:r,onChange:o}),c=S.useCallback(f=>i((p=[])=>[...p,f]),[i]),d=S.useCallback(f=>i((p=[])=>p.filter(v=>v!==f)),[i]);return u.jsx(Js,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:d,children:u.jsx(ei,{scope:e.__scopeAccordion,collapsible:!0,children:u.jsx(ti,{...a,ref:t})})})}),[Ov,Hn]=Vn(ct),ti=S.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...s}=e,i=S.useRef(null),c=Z(i,t),d=Rv(n),p=vt(o)==="ltr",v=k(e.onKeyDown,m=>{var D;if(!Av.includes(m.key))return;const h=m.target,g=d().filter(I=>{var $;return!(($=I.ref.current)!=null&&$.disabled)}),b=g.findIndex(I=>I.ref.current===h),y=g.length;if(b===-1)return;m.preventDefault();let w=b;const x=0,E=y-1,P=()=>{w=b+1,w>E&&(w=x)},T=()=>{w=b-1,w<x&&(w=E)};switch(m.key){case"Home":w=x;break;case"End":w=E;break;case"ArrowRight":a==="horizontal"&&(p?P():T());break;case"ArrowDown":a==="vertical"&&P();break;case"ArrowLeft":a==="horizontal"&&(p?T():P());break;case"ArrowUp":a==="vertical"&&T();break}const M=w%y;(D=g[M].ref.current)==null||D.focus()});return u.jsx(Ov,{scope:n,disabled:r,direction:o,orientation:a,children:u.jsx(mo.Slot,{scope:n,children:u.jsx(O.div,{...s,"data-orientation":a,ref:c,onKeyDown:r?void 0:v})})})}),Gn="AccordionItem",[Lv,ho]=Vn(Gn),ni=S.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=Hn(Gn,n),s=Iv(Gn,n),i=po(n),c=Ee(),d=r&&s.value.includes(r)||!1,f=a.disabled||e.disabled;return u.jsx(Lv,{scope:n,open:d,disabled:f,triggerId:c,children:u.jsx(Sv,{"data-orientation":a.orientation,"data-state":ci(d),...i,...o,ref:t,disabled:f,open:d,onOpenChange:p=>{p?s.onItemOpen(r):s.onItemClose(r)}})})});ni.displayName=Gn;var ri="AccordionHeader",oi=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hn(ct,n),a=ho(ri,n);return u.jsx(O.h3,{"data-orientation":o.orientation,"data-state":ci(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});oi.displayName=ri;var go="AccordionTrigger",ai=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hn(ct,n),a=ho(go,n),s=kv(go,n),i=po(n);return u.jsx(mo.ItemSlot,{scope:n,children:u.jsx(Pv,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...r,ref:t})})});ai.displayName=go;var si="AccordionContent",ii=S.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Hn(ct,n),a=ho(si,n),s=po(n);return u.jsx(Tv,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ii.displayName=si;function ci(e){return e?"open":"closed"}var $v=Qs,Fv=ni,Bv=oi,li=ai,ui=ii;const Wv=$v,di=l.forwardRef(({className:e,...t},n)=>u.jsx(Fv,{ref:n,className:R("border-b",e),...t}));di.displayName="AccordionItem";const fi=l.forwardRef(({className:e,children:t,...n},r)=>u.jsx(Bv,{className:"flex",children:u.jsxs(li,{ref:r,className:R("text-base flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,u.jsx(Fn,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));fi.displayName=li.displayName;const mi=l.forwardRef(({className:e,children:t,...n},r)=>u.jsx(ui,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:u.jsx("div",{className:R("pb-4 pt-0",e),children:t})}));mi.displayName=ui.displayName;const pi=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,hi=Gr,Ht=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return hi(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(d=>{const f=n==null?void 0:n[d],p=a==null?void 0:a[d];if(f===null)return null;const v=pi(f)||pi(p);return o[d][v]}),i=n&&Object.entries(n).reduce((d,f)=>{let[p,v]=f;return v===void 0||(d[p]=v),d},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((d,f)=>{let{class:p,className:v,...m}=f;return Object.entries(m).every(h=>{let[g,b]=h;return Array.isArray(b)?b.includes({...a,...i}[g]):{...a,...i}[g]===b})?[...d,p,v]:d},[]);return hi(e,s,c,n==null?void 0:n.class,n==null?void 0:n.className)},zv=Ht("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",{variants:{sizing:{sm:"h-8 text-xs px-2",md:"h-10 text-sm px-3",lg:"h-12 text-base px-4",xl:"h-14 text-lg px-5","2xl":"h-16 text-xl px-6"}},defaultVariants:{sizing:"md"}}),Yn=l.forwardRef(({className:e,sizing:t,type:n,...r},o)=>u.jsx("input",{type:n,className:R(zv({sizing:t,className:e})),ref:o,...r}));Yn.displayName="Input";const Vv=(e,t)=>{const n=e.replace(/\D/g,"");let r="",o=0,a=0;for(;o<t.length&&a<n.length;)t[o]==="0"?(r+=n[a],a++):r+=t[o],o++;return r},Un=l.forwardRef(({className:e,leftIcon:t,rightIcon:n,mask:r,onChange:o,...a},s)=>{const i=c=>{const d=c.target;if(r){const f=Vv(d.value,r);d.value=f}o==null||o(c)};return u.jsxs("div",{className:"relative w-full",children:[t&&u.jsx("div",{className:"absolute left-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:t}),u.jsx(Yn,{className:R(t&&"pl-8",n&&"pr-8",e),ref:s,onInput:i,...a}),n&&u.jsx("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground",children:n})]})});Un.displayName="AdaptiveInput";function Hv(e,t=globalThis==null?void 0:globalThis.document){const n=be(e);l.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Gv="DismissableLayer",vo="dismissableLayer.update",Yv="dismissableLayer.pointerDownOutside",Uv="dismissableLayer.focusOutside",gi,vi=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),It=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,d=l.useContext(vi),[f,p]=l.useState(null),v=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=l.useState({}),h=Z(t,M=>p(M)),g=Array.from(d.layers),[b]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(b),w=f?g.indexOf(f):-1,x=d.layersWithOutsidePointerEventsDisabled.size>0,E=w>=y,P=Xv(M=>{const D=M.target,I=[...d.branches].some($=>$.contains(D));!E||I||(o==null||o(M),s==null||s(M),M.defaultPrevented||i==null||i())},v),T=Zv(M=>{const D=M.target;[...d.branches].some($=>$.contains(D))||(a==null||a(M),s==null||s(M),M.defaultPrevented||i==null||i())},v);return Hv(M=>{w===d.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},v),l.useEffect(()=>{if(f)return n&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(gi=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(f)),d.layers.add(f),bi(),()=>{n&&d.layersWithOutsidePointerEventsDisabled.size===1&&(v.body.style.pointerEvents=gi)}},[f,v,n,d]),l.useEffect(()=>()=>{f&&(d.layers.delete(f),d.layersWithOutsidePointerEventsDisabled.delete(f),bi())},[f,d]),l.useEffect(()=>{const M=()=>m({});return document.addEventListener(vo,M),()=>document.removeEventListener(vo,M)},[]),u.jsx(O.div,{...c,ref:h,style:{pointerEvents:x?E?"auto":"none":void 0,...e.style},onFocusCapture:k(e.onFocusCapture,T.onFocusCapture),onBlurCapture:k(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:k(e.onPointerDownCapture,P.onPointerDownCapture)})});It.displayName=Gv;var Kv="DismissableLayerBranch",qv=l.forwardRef((e,t)=>{const n=l.useContext(vi),r=l.useRef(null),o=Z(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),u.jsx(O.div,{...e,ref:o})});qv.displayName=Kv;function Xv(e,t=globalThis==null?void 0:globalThis.document){const n=be(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let c=function(){wi(Yv,n,d,{discrete:!0})};const d={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Zv(e,t=globalThis==null?void 0:globalThis.document){const n=be(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&wi(Uv,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bi(){const e=new CustomEvent(vo);document.dispatchEvent(e)}function wi(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Wn(o,a):o.dispatchEvent(a)}var bo="focusScope.autoFocusOnMount",wo="focusScope.autoFocusOnUnmount",yi={bubbles:!1,cancelable:!0},Qv="FocusScope",pn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=l.useState(null),d=be(o),f=be(a),p=l.useRef(null),v=Z(t,g=>c(g)),m=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(x){if(m.paused||!i)return;const E=x.target;i.contains(E)?p.current=E:bt(p.current,{select:!0})},b=function(x){if(m.paused||!i)return;const E=x.relatedTarget;E!==null&&(i.contains(E)||bt(p.current,{select:!0}))},y=function(x){if(document.activeElement===document.body)for(const P of x)P.removedNodes.length>0&&bt(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",b);const w=new MutationObserver(y);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",b),w.disconnect()}}},[r,i,m.paused]),l.useEffect(()=>{if(i){Ni.add(m);const g=document.activeElement;if(!i.contains(g)){const y=new CustomEvent(bo,yi);i.addEventListener(bo,d),i.dispatchEvent(y),y.defaultPrevented||(Jv(ob(xi(i)),{select:!0}),document.activeElement===g&&bt(i))}return()=>{i.removeEventListener(bo,d),setTimeout(()=>{const y=new CustomEvent(wo,yi);i.addEventListener(wo,f),i.dispatchEvent(y),y.defaultPrevented||bt(g??document.body,{select:!0}),i.removeEventListener(wo,f),Ni.remove(m)},0)}}},[i,d,f,m]);const h=l.useCallback(g=>{if(!n&&!r||m.paused)return;const b=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(b&&y){const w=g.currentTarget,[x,E]=eb(w);x&&E?!g.shiftKey&&y===E?(g.preventDefault(),n&&bt(x,{select:!0})):g.shiftKey&&y===x&&(g.preventDefault(),n&&bt(E,{select:!0})):y===w&&g.preventDefault()}},[n,r,m.paused]);return u.jsx(O.div,{tabIndex:-1,...s,ref:v,onKeyDown:h})});pn.displayName=Qv;function Jv(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(bt(r,{select:t}),document.activeElement!==n)return}function eb(e){const t=xi(e),n=Ci(t,e),r=Ci(t.reverse(),e);return[n,r]}function xi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Ci(e,t){for(const n of e)if(!tb(n,{upTo:t}))return n}function tb(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function nb(e){return e instanceof HTMLInputElement&&"select"in e}function bt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&nb(e)&&t&&e.select()}}var Ni=rb();function rb(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Ei(e,t),e.unshift(t)},remove(t){var n;e=Ei(e,t),(n=e[0])==null||n.resume()}}}function Ei(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function ob(e){return e.filter(t=>t.tagName!=="A")}var ab="Portal",hn=l.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=l.useState(!1);we(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?jn.createPortal(u.jsx(O.div,{...r,ref:t}),s):null});hn.displayName=ab;var yo=0;function Kn(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Si()),document.body.insertAdjacentElement("beforeend",e[1]??Si()),yo++,()=>{yo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),yo--}},[])}function Si(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ze=function(){return Ze=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},Ze.apply(this,arguments)};function Pi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function sb(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var qn="right-scroll-bar-position",Xn="width-before-scroll-bar",ib="with-scroll-bars-hidden",cb="--removed-body-scroll-bar-size";function xo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function lb(e,t){var n=S.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var ub=typeof window<"u"?l.useLayoutEffect:l.useEffect,Ti=new WeakMap;function db(e,t){var n=lb(null,function(r){return e.forEach(function(o){return xo(o,r)})});return ub(function(){var r=Ti.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||xo(i,null)}),a.forEach(function(i){o.has(i)||xo(i,s)})}Ti.set(n,e)},[e]),n}function fb(e){return e}function mb(e,t){t===void 0&&(t=fb);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var c=function(){var f=s;s=[],f.forEach(a)},d=function(){return Promise.resolve().then(c)};d(),n={push:function(f){s.push(f),d()},filter:function(f){return s=s.filter(f),n}}}};return o}function pb(e){e===void 0&&(e={});var t=mb(null);return t.options=Ze({async:!0,ssr:!1},e),t}var Mi=function(e){var t=e.sideCar,n=Pi(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return l.createElement(r,Ze({},n))};Mi.isSideCarExport=!0;function hb(e,t){return e.useMedium(t),Mi}var Ai=pb(),Co=function(){},Zn=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:Co,onWheelCapture:Co,onTouchMoveCapture:Co}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,c=e.className,d=e.removeScrollBar,f=e.enabled,p=e.shards,v=e.sideCar,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,x=Pi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,P=db([n,t]),T=Ze(Ze({},x),o);return l.createElement(l.Fragment,null,f&&l.createElement(E,{sideCar:Ai,removeScrollBar:d,shards:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:w}),s?l.cloneElement(l.Children.only(i),Ze(Ze({},T),{ref:P})):l.createElement(y,Ze({},T,{className:c,ref:P}),i))});Zn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Zn.classNames={fullWidth:Xn,zeroRight:qn};var gb=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function vb(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=gb();return t&&e.setAttribute("nonce",t),e}function bb(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function wb(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var yb=function(){var e=0,t=null;return{add:function(n){e==0&&(t=vb())&&(bb(t,n),wb(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},xb=function(){var e=yb();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ri=function(){var e=xb(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Cb={left:0,top:0,right:0,gap:0},No=function(e){return parseInt(e||"",10)||0},Nb=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[No(n),No(r),No(o)]},Eb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Cb;var t=Nb(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Sb=Ri(),Gt="data-scroll-locked",Pb=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
152
152
  .`.concat(ib,` {
153
153
  overflow: hidden `).concat(r,`;
154
154
  padding-right: `).concat(i,"px ").concat(r,`;
@@ -1,7 +1,7 @@
1
- import * as React from "react";
2
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
1
+ import * as AccordionPrimitive from '@radix-ui/react-accordion';
2
+ import * as React from 'react';
3
3
  declare const Accordion: React.ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>;
4
4
  declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
6
  declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
- export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
7
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buildgrid-ui",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "homepage": "http://adrianomaringolo.github.io/buildgrid-ui",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -13,9 +13,9 @@
13
13
  ],
14
14
  "exports": {
15
15
  ".": {
16
- "types": "./dist/index.d.ts",
17
16
  "import": "./dist/buildgrid-ui.es.js",
18
- "require": "./dist/buildgrid-ui.umd.js"
17
+ "require": "./dist/buildgrid-ui.umd.js",
18
+ "types": "./dist/index.d.ts"
19
19
  }
20
20
  },
21
21
  "scripts": {