@clasing/ui 0.1.126 → 0.1.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/{badge-BnerQ2lF.js → badge-1kvIHznc.js} +1 -1
  2. package/dist/{badge-Czof3oqL.cjs → badge-P7DTJePf.cjs} +1 -1
  3. package/dist/{button-DddHyyHa.js → button-BMeBsgLZ.js} +156 -150
  4. package/dist/{button-Cegl49Yi.cjs → button-Chd1eL4R.cjs} +1 -1
  5. package/dist/{calendar-DL8gqdRp.cjs → calendar-B1iUTT_d.cjs} +1 -1
  6. package/dist/{calendar-BAQkzm4v.js → calendar-Bc6nud5f.js} +1 -1
  7. package/dist/{chip-A32aAc-8.cjs → chip-BtBgM97Y.cjs} +1 -1
  8. package/dist/{chip-ZZHZ8i1Q.js → chip-DOFVLzAe.js} +1 -1
  9. package/dist/command-BVqQYgq1.cjs +1 -0
  10. package/dist/command-DS_uqbdy.js +176 -0
  11. package/dist/components/accordion.cjs.js +1 -1
  12. package/dist/components/accordion.es.js +1 -1
  13. package/dist/components/alert-dialog.cjs.js +1 -1
  14. package/dist/components/alert-dialog.es.js +1 -1
  15. package/dist/components/alert.cjs.js +1 -1
  16. package/dist/components/alert.es.js +1 -1
  17. package/dist/components/badge.cjs.js +1 -1
  18. package/dist/components/badge.es.js +1 -1
  19. package/dist/components/blocks/date-picker.cjs.js +1 -1
  20. package/dist/components/blocks/date-picker.es.js +2 -2
  21. package/dist/components/blocks/date-range-picker.cjs.js +1 -1
  22. package/dist/components/blocks/date-range-picker.es.js +1 -1
  23. package/dist/components/blocks/interactive-card.cjs.js +1 -1
  24. package/dist/components/blocks/interactive-card.es.js +2 -2
  25. package/dist/components/blocks/selectable-chips.cjs.js +1 -1
  26. package/dist/components/blocks/selectable-chips.es.js +1 -1
  27. package/dist/components/breadcrumb.cjs.js +1 -1
  28. package/dist/components/breadcrumb.es.js +1 -1
  29. package/dist/components/button.cjs.js +1 -1
  30. package/dist/components/button.d.ts +1 -1
  31. package/dist/components/button.es.js +1 -1
  32. package/dist/components/calendar.cjs.js +1 -1
  33. package/dist/components/calendar.es.js +1 -1
  34. package/dist/components/checkbox.cjs.js +1 -1
  35. package/dist/components/checkbox.es.js +1 -1
  36. package/dist/components/chip.cjs.js +1 -1
  37. package/dist/components/chip.d.ts +1 -1
  38. package/dist/components/chip.es.js +1 -1
  39. package/dist/components/command.cjs.js +1 -1
  40. package/dist/components/command.es.js +1 -1
  41. package/dist/components/context-menu.cjs.js +1 -1
  42. package/dist/components/context-menu.es.js +1 -1
  43. package/dist/components/dialog.cjs.js +1 -1
  44. package/dist/components/dialog.es.js +1 -1
  45. package/dist/components/drawer.cjs.js +1 -3
  46. package/dist/components/drawer.es.js +58 -1091
  47. package/dist/components/dropdown-menu.cjs.js +1 -1
  48. package/dist/components/dropdown-menu.es.js +1 -1
  49. package/dist/components/icon-component.cjs.js +1 -1
  50. package/dist/components/icon-component.d.ts +2 -2
  51. package/dist/components/icon-component.es.js +1 -1
  52. package/dist/components/input-otp.cjs.js +1 -20
  53. package/dist/components/input-otp.es.js +37 -225
  54. package/dist/components/input.cjs.js +1 -1
  55. package/dist/components/input.d.ts +5 -8
  56. package/dist/components/input.es.js +1 -1
  57. package/dist/components/menubar.cjs.js +1 -1
  58. package/dist/components/menubar.es.js +1 -1
  59. package/dist/components/multi-select.cjs.js +1 -1
  60. package/dist/components/multi-select.es.js +3 -3
  61. package/dist/components/navigation-menu.cjs.js +1 -1
  62. package/dist/components/navigation-menu.es.js +1 -1
  63. package/dist/components/phone-input.cjs.js +1 -1
  64. package/dist/components/phone-input.es.js +4 -4
  65. package/dist/components/resizable.cjs.js +1 -1
  66. package/dist/components/resizable.es.js +24 -1527
  67. package/dist/components/select.cjs.js +1 -1
  68. package/dist/components/select.es.js +1 -1
  69. package/dist/components/sheet.cjs.js +1 -1
  70. package/dist/components/sheet.es.js +1 -1
  71. package/dist/{dialog-DZpF7OXg.js → dialog-BdbmyluB.js} +1 -1
  72. package/dist/{dialog-BKm2PZl2.cjs → dialog-DEwsbeqW.cjs} +1 -1
  73. package/dist/{icon-component-BZ-4FDV6.js → icon-component-DS1KwkwD.js} +11 -10
  74. package/dist/icon-component-lt1cLU_1.cjs +1 -0
  75. package/dist/{input-DwPDvbRE.js → input-CToZ7rWo.js} +55 -55
  76. package/dist/input-DDSu84U-.cjs +1 -0
  77. package/package.json +1 -1
  78. package/dist/command-BGCSJ9vX.js +0 -506
  79. package/dist/command-D9M8dk1M.cjs +0 -1
  80. package/dist/icon-component-LY_vGYHZ.cjs +0 -1
  81. package/dist/input-DFPJ_mtM.cjs +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../jsx-runtime-DUiatUiq.cjs"),q=require("react"),I=require("react-phone-number-input"),P=require("react-phone-number-input/flags"),v=require("react-phone-number-input/locale/en"),O=require("react-phone-number-input/locale/es"),w=require("react-phone-number-input/locale/fr"),_=require("../button-Cegl49Yi.cjs"),p=require("../command-D9M8dk1M.cjs"),z=require("../input-DFPJ_mtM.cjs"),T=require("../label-CbzkBbPT.cjs"),g=require("../popover-B8wp2cHF.cjs"),A=require("../scroll-area-Dr-7opp_.cjs"),d=require("../index-DoxiiusW.cjs"),C=require("../icon-component-LY_vGYHZ.cjs");function N(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const j=N(q),y=N(I),b=j.forwardRef(({className:t,onChange:n,value:o,variant:s="md",rounded:r="default",label:c,helperText:a,locale:x="en",error:u,touched:m,...l},R)=>(console.log(s),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3",children:[c&&e.jsxRuntimeExports.jsx(T.Label,{htmlFor:l.id,className:d.cn({"text-neutral-700":l.disabled}),children:c}),e.jsxRuntimeExports.jsx(y.default,{ref:R,className:d.cn("flex",t),flagComponent:E,countrySelectComponent:D,inputComponent:S,smartCaret:!1,labels:x==="es"?O:x==="fr"?w:v,value:o||void 0,onChange:f=>n?.(f||""),countrySelectProps:{variant:s,rounded:r,error:u,touched:m},numberInputProps:{variant:s,rounded:r,error:u,touched:m},...l}),u&&m?e.jsxRuntimeExports.jsx("span",{id:l.id&&`${l.id}-error-text`,"aria-invalid":!0,className:"text-destructive text-label-md -mt-1",children:u}):a?e.jsxRuntimeExports.jsx("span",{id:l.id&&`${l.id}-helper-text`,className:d.cn("text-label-md -mt-1",{"text-muted-foreground":!u&&!m,"text-destructive":u&&m,"text-neutral-700":l.disabled}),children:a}):null]})));b.displayName="PhoneInput";const S=j.forwardRef(({className:t,rounded:n="default",error:o,touched:s,variant:r,...c},a)=>{const{"data-country":x,...u}=c;return e.jsxRuntimeExports.jsx(z.Input,{variant:r,className:d.cn(n==="default"?"rounded-s-none rounded-e-lg":"rounded-s-none rounded-e-full",{"border-destructive":o&&s,"border-blue-800":s&&!o,"rounded-e-sm":r==="sm","rounded-e-md":r==="md","rounded-e-lg":r==="lg"},t),...u,ref:a})});S.displayName="InputComponent";const D=({disabled:t,value:n,options:o,onChange:s,variant:r="md",rounded:c="default",error:a,touched:x})=>{const u=j.useRef(null),[m,l]=j.useState(""),[R,f]=j.useState(!1);return e.jsxRuntimeExports.jsxs(g.Popover,{open:R,modal:!0,onOpenChange:i=>{f(i),i&&l("")},children:[e.jsxRuntimeExports.jsx(g.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(_.Button,{type:"button",variant:"outline",className:d.cn("outline-r-0 outline-input text-secondary flex gap-1 px-3 focus:z-10",c==="default"?"rounded-e-none":"rounded-s-full rounded-e-none",{"outline-destructive":a&&x,"outline-blue-800":x&&!a,"h-8 rounded-s-sm":r==="sm","h-12 rounded-s-md":r==="md","h-16 rounded-s-lg":r==="lg"}),disabled:t,children:[e.jsxRuntimeExports.jsx(E,{country:n,countryName:n,disabled:t}),e.jsxRuntimeExports.jsx(C.IconComponent,{iconName:"IconChevronDown",className:d.cn("-mr-2 size-4 opacity-50",t?"hidden":"opacity-100")})]})}),e.jsxRuntimeExports.jsx(g.PopoverContent,{className:"w-[300px] p-0",children:e.jsxRuntimeExports.jsxs(p.Command,{children:[e.jsxRuntimeExports.jsx(p.CommandInput,{value:m,onValueChange:i=>{l(i),setTimeout(()=>{if(u.current){const h=u.current.querySelector("[data-radix-scroll-area-viewport]");h&&(h.scrollTop=0)}},0)},placeholder:"Search country..."}),e.jsxRuntimeExports.jsx(p.CommandList,{children:e.jsxRuntimeExports.jsxs(A.ScrollArea,{ref:u,className:"h-72",children:[e.jsxRuntimeExports.jsx(p.CommandEmpty,{children:"No country found."}),e.jsxRuntimeExports.jsx(p.CommandGroup,{children:o.map(({value:i,label:h})=>i?e.jsxRuntimeExports.jsx(F,{country:i,countryName:h,selectedCountry:n,onChange:s,onSelectComplete:()=>f(!1)},i):null)})]})})]})})]})},F=({country:t,countryName:n,selectedCountry:o,onChange:s,onSelectComplete:r})=>{const c=()=>{s(t),r()};return e.jsxRuntimeExports.jsxs(p.CommandItem,{className:"gap-2",onSelect:c,children:[e.jsxRuntimeExports.jsx(E,{country:t,countryName:n}),e.jsxRuntimeExports.jsx("span",{className:"flex-1 text-sm",children:n}),e.jsxRuntimeExports.jsx("span",{className:"text-foreground/50 text-sm",children:`+${y.getCountryCallingCode(t)}`}),e.jsxRuntimeExports.jsx(C.IconComponent,{iconName:"IconCheck",className:`ml-auto size-4 ${t===o?"opacity-100":"opacity-0"}`})]})},E=({country:t,countryName:n,disabled:o})=>{const s=P[t];return e.jsxRuntimeExports.jsx("span",{className:d.cn("bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",{"opacity-50":o}),children:s&&e.jsxRuntimeExports.jsx(s,{title:n})})};exports.PhoneInput=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../jsx-runtime-DUiatUiq.cjs"),q=require("react"),I=require("react-phone-number-input"),P=require("react-phone-number-input/flags"),v=require("react-phone-number-input/locale/en"),O=require("react-phone-number-input/locale/es"),w=require("react-phone-number-input/locale/fr"),_=require("../button-Chd1eL4R.cjs"),p=require("../command-BVqQYgq1.cjs"),z=require("../input-DDSu84U-.cjs"),T=require("../label-CbzkBbPT.cjs"),g=require("../popover-B8wp2cHF.cjs"),A=require("../scroll-area-Dr-7opp_.cjs"),d=require("../index-DoxiiusW.cjs"),C=require("../icon-component-lt1cLU_1.cjs");function N(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,s.get?s:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const j=N(q),y=N(I),b=j.forwardRef(({className:t,onChange:n,value:o,variant:s="md",rounded:r="default",label:c,helperText:a,locale:x="en",error:u,touched:m,...l},R)=>(console.log(s),e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-3",children:[c&&e.jsxRuntimeExports.jsx(T.Label,{htmlFor:l.id,className:d.cn({"text-neutral-700":l.disabled}),children:c}),e.jsxRuntimeExports.jsx(y.default,{ref:R,className:d.cn("flex",t),flagComponent:E,countrySelectComponent:D,inputComponent:S,smartCaret:!1,labels:x==="es"?O:x==="fr"?w:v,value:o||void 0,onChange:f=>n?.(f||""),countrySelectProps:{variant:s,rounded:r,error:u,touched:m},numberInputProps:{variant:s,rounded:r,error:u,touched:m},...l}),u&&m?e.jsxRuntimeExports.jsx("span",{id:l.id&&`${l.id}-error-text`,"aria-invalid":!0,className:"text-destructive text-label-md -mt-1",children:u}):a?e.jsxRuntimeExports.jsx("span",{id:l.id&&`${l.id}-helper-text`,className:d.cn("text-label-md -mt-1",{"text-muted-foreground":!u&&!m,"text-destructive":u&&m,"text-neutral-700":l.disabled}),children:a}):null]})));b.displayName="PhoneInput";const S=j.forwardRef(({className:t,rounded:n="default",error:o,touched:s,variant:r,...c},a)=>{const{"data-country":x,...u}=c;return e.jsxRuntimeExports.jsx(z.Input,{variant:r,className:d.cn(n==="default"?"rounded-s-none rounded-e-lg":"rounded-s-none rounded-e-full",{"border-destructive":o&&s,"border-blue-800":s&&!o,"rounded-e-sm":r==="sm","rounded-e-md":r==="md","rounded-e-lg":r==="lg"},t),...u,ref:a})});S.displayName="InputComponent";const D=({disabled:t,value:n,options:o,onChange:s,variant:r="md",rounded:c="default",error:a,touched:x})=>{const u=j.useRef(null),[m,l]=j.useState(""),[R,f]=j.useState(!1);return e.jsxRuntimeExports.jsxs(g.Popover,{open:R,modal:!0,onOpenChange:i=>{f(i),i&&l("")},children:[e.jsxRuntimeExports.jsx(g.PopoverTrigger,{asChild:!0,children:e.jsxRuntimeExports.jsxs(_.Button,{type:"button",variant:"outline",className:d.cn("outline-r-0 outline-input text-secondary flex gap-1 px-3 focus:z-10",c==="default"?"rounded-e-none":"rounded-s-full rounded-e-none",{"outline-destructive":a&&x,"outline-blue-800":x&&!a,"h-8 rounded-s-sm":r==="sm","h-12 rounded-s-md":r==="md","h-16 rounded-s-lg":r==="lg"}),disabled:t,children:[e.jsxRuntimeExports.jsx(E,{country:n,countryName:n,disabled:t}),e.jsxRuntimeExports.jsx(C.IconComponent,{iconName:"IconChevronDown",className:d.cn("-mr-2 size-4 opacity-50",t?"hidden":"opacity-100")})]})}),e.jsxRuntimeExports.jsx(g.PopoverContent,{className:"w-[300px] p-0",children:e.jsxRuntimeExports.jsxs(p.Command,{children:[e.jsxRuntimeExports.jsx(p.CommandInput,{value:m,onValueChange:i=>{l(i),setTimeout(()=>{if(u.current){const h=u.current.querySelector("[data-radix-scroll-area-viewport]");h&&(h.scrollTop=0)}},0)},placeholder:"Search country..."}),e.jsxRuntimeExports.jsx(p.CommandList,{children:e.jsxRuntimeExports.jsxs(A.ScrollArea,{ref:u,className:"h-72",children:[e.jsxRuntimeExports.jsx(p.CommandEmpty,{children:"No country found."}),e.jsxRuntimeExports.jsx(p.CommandGroup,{children:o.map(({value:i,label:h})=>i?e.jsxRuntimeExports.jsx(F,{country:i,countryName:h,selectedCountry:n,onChange:s,onSelectComplete:()=>f(!1)},i):null)})]})})]})})]})},F=({country:t,countryName:n,selectedCountry:o,onChange:s,onSelectComplete:r})=>{const c=()=>{s(t),r()};return e.jsxRuntimeExports.jsxs(p.CommandItem,{className:"gap-2",onSelect:c,children:[e.jsxRuntimeExports.jsx(E,{country:t,countryName:n}),e.jsxRuntimeExports.jsx("span",{className:"flex-1 text-sm",children:n}),e.jsxRuntimeExports.jsx("span",{className:"text-foreground/50 text-sm",children:`+${y.getCountryCallingCode(t)}`}),e.jsxRuntimeExports.jsx(C.IconComponent,{iconName:"IconCheck",className:`ml-auto size-4 ${t===o?"opacity-100":"opacity-0"}`})]})},E=({country:t,countryName:n,disabled:o})=>{const s=P[t];return e.jsxRuntimeExports.jsx("span",{className:d.cn("bg-foreground/20 flex h-4 w-6 overflow-hidden rounded-[4px] [&_svg:not([class*='size-'])]:size-full",{"opacity-50":o}),children:s&&e.jsxRuntimeExports.jsx(s,{title:n})})};exports.PhoneInput=b;
@@ -5,14 +5,14 @@ import I from "react-phone-number-input/flags";
5
5
  import S from "react-phone-number-input/locale/en";
6
6
  import b from "react-phone-number-input/locale/es";
7
7
  import v from "react-phone-number-input/locale/fr";
8
- import { B as P } from "../button-DddHyyHa.js";
9
- import { C as w, d as R, f as z, b as O, c as $, e as E } from "../command-BGCSJ9vX.js";
10
- import { I as F } from "../input-DwPDvbRE.js";
8
+ import { B as P } from "../button-BMeBsgLZ.js";
9
+ import { C as w, d as R, f as z, b as O, c as $, e as E } from "../command-DS_uqbdy.js";
10
+ import { I as F } from "../input-CToZ7rWo.js";
11
11
  import { L } from "../label-BpDUqtrC.js";
12
12
  import { P as V, c as A, b as B } from "../popover-BoDRCUh2.js";
13
13
  import { S as T } from "../scroll-area-CNsThIs_.js";
14
14
  import { c as u } from "../index-CRiPKpXj.js";
15
- import { I as N } from "../icon-component-BZ-4FDV6.js";
15
+ import { I as N } from "../icon-component-DS1KwkwD.js";
16
16
  const _ = f.forwardRef(
17
17
  ({
18
18
  className: n,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ze=require("../jsx-runtime-DUiatUiq.cjs"),f=require("react"),Je=require("../index-DoxiiusW.cjs"),bn=require("../icon-component-LY_vGYHZ.cjs");function Sn(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const Pn=Sn(f),Ee=f.createContext(null);Ee.displayName="PanelGroupContext";const k={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},$e=10,ne=f.useLayoutEffect,Oe=Pn.useId,wn=typeof Oe=="function"?Oe:()=>null;let En=0;function _e(e=null){const n=wn(),t=f.useRef(e||n||null);return t.current===null&&(t.current=""+En++),e??t.current}function Ye({children:e,className:n="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:o,id:l,maxSize:a,minSize:s,onCollapse:z,onExpand:w,onResize:p,order:u,style:v,tagName:h="div",...C}){const E=f.useContext(Ee);if(E===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:S,expandPanel:L,getPanelSize:D,getPanelStyle:N,groupId:q,isPanelCollapsed:I,reevaluatePanelConstraints:P,registerPanel:F,resizePanel:X,unregisterPanel:B}=E,G=_e(l),M=f.useRef({callbacks:{onCollapse:z,onExpand:w,onResize:p},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:s},id:G,idIsFromProps:l!==void 0,order:u});f.useRef({didLogMissingDefaultSizeWarning:!1}),ne(()=>{const{callbacks:_,constraints:$}=M.current,j={...$};M.current.id=G,M.current.idIsFromProps=l!==void 0,M.current.order=u,_.onCollapse=z,_.onExpand=w,_.onResize=p,$.collapsedSize=t,$.collapsible=r,$.defaultSize=i,$.maxSize=a,$.minSize=s,(j.collapsedSize!==$.collapsedSize||j.collapsible!==$.collapsible||j.maxSize!==$.maxSize||j.minSize!==$.minSize)&&P(M.current,j)}),ne(()=>{const _=M.current;return F(_),()=>{B(_)}},[u,G,F,B]),f.useImperativeHandle(o,()=>({collapse:()=>{S(M.current)},expand:_=>{L(M.current,_)},getId(){return G},getSize(){return D(M.current)},isCollapsed(){return I(M.current)},isExpanded(){return!I(M.current)},resize:_=>{X(M.current,_)}}),[S,L,D,I,G,X]);const Q=N(M.current,i);return f.createElement(h,{...C,children:e,className:n,id:G,style:{...Q,...v},[k.groupId]:q,[k.panel]:"",[k.panelCollapsible]:r||void 0,[k.panelId]:G,[k.panelSize]:parseFloat(""+Q.flexGrow).toFixed(1)})}const Ze=f.forwardRef((e,n)=>f.createElement(Ye,{...e,forwardedRef:n}));Ye.displayName="Panel";Ze.displayName="forwardRef(Panel)";let Ne=null,Se=-1,Y=null;function Cn(e,n){if(n){const t=(n&rn)!==0,r=(n&on)!==0,i=(n&ln)!==0,o=(n&an)!==0;if(t)return i?"se-resize":o?"ne-resize":"e-resize";if(r)return i?"sw-resize":o?"nw-resize":"w-resize";if(i)return"s-resize";if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Rn(){Y!==null&&(document.head.removeChild(Y),Ne=null,Y=null,Se=-1)}function Ae(e,n){var t,r;const i=Cn(e,n);if(Ne!==i){if(Ne=i,Y===null&&(Y=document.createElement("style"),document.head.appendChild(Y)),Se>=0){var o;(o=Y.sheet)===null||o===void 0||o.removeRule(Se)}Se=(t=(r=Y.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${i} !important;}`))!==null&&t!==void 0?t:-1}}function Qe(e){return e.type==="keydown"}function en(e){return e.type.startsWith("pointer")}function nn(e){return e.type.startsWith("mouse")}function Ce(e){if(en(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(nn(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function In(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Ln(e,n,t){return e.x<n.x+n.width&&e.x+e.width>n.x&&e.y<n.y+n.height&&e.y+e.height>n.y}function An(e,n){if(e===n)throw new Error("Cannot compare node with itself");const t={a:We(e),b:We(n)};let r;for(;t.a.at(-1)===t.b.at(-1);)e=t.a.pop(),n=t.b.pop(),r=e;x(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:Ve(Fe(t.a)),b:Ve(Fe(t.b))};if(i.a===i.b){const o=r.childNodes,l={a:t.a.at(-1),b:t.b.at(-1)};let a=o.length;for(;a--;){const s=o[a];if(s===l.a)return 1;if(s===l.b)return-1}}return Math.sign(i.a-i.b)}const kn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Mn(e){var n;const t=getComputedStyle((n=tn(e))!==null&&n!==void 0?n:e).display;return t==="flex"||t==="inline-flex"}function Dn(e){const n=getComputedStyle(e);return!!(n.position==="fixed"||n.zIndex!=="auto"&&(n.position!=="static"||Mn(e))||+n.opacity<1||"transform"in n&&n.transform!=="none"||"webkitTransform"in n&&n.webkitTransform!=="none"||"mixBlendMode"in n&&n.mixBlendMode!=="normal"||"filter"in n&&n.filter!=="none"||"webkitFilter"in n&&n.webkitFilter!=="none"||"isolation"in n&&n.isolation==="isolate"||kn.test(n.willChange)||n.webkitOverflowScrolling==="touch")}function Fe(e){let n=e.length;for(;n--;){const t=e[n];if(x(t,"Missing node"),Dn(t))return t}return null}function Ve(e){return e&&Number(getComputedStyle(e).zIndex)||0}function We(e){const n=[];for(;e;)n.push(e),e=tn(e);return n}function tn(e){const{parentNode:n}=e;return n&&n instanceof ShadowRoot?n.host:n}const rn=1,on=2,ln=4,an=8,Hn=In()==="coarse";let W=[],ae=!1,Z=new Map,Re=new Map;const he=new Set;function Nn(e,n,t,r,i){var o;const{ownerDocument:l}=n,a={direction:t,element:n,hitAreaMargins:r,setResizeHandlerState:i},s=(o=Z.get(l))!==null&&o!==void 0?o:0;return Z.set(l,s+1),he.add(a),Pe(),function(){var w;Re.delete(e),he.delete(a);const p=(w=Z.get(l))!==null&&w!==void 0?w:1;if(Z.set(l,p-1),Pe(),p===1&&Z.delete(l),W.includes(a)){const u=W.indexOf(a);u>=0&&W.splice(u,1),je(),i("up",!0,null)}}}function $n(e){const{target:n}=e,{x:t,y:r}=Ce(e);ae=!0,Ge({target:n,x:t,y:r}),Pe(),W.length>0&&(we("down",e),e.preventDefault(),sn(n)||e.stopImmediatePropagation())}function ke(e){const{x:n,y:t}=Ce(e);if(ae&&e.buttons===0&&(ae=!1,we("up",e)),!ae){const{target:r}=e;Ge({target:r,x:n,y:t})}we("move",e),je(),W.length>0&&e.preventDefault()}function Me(e){const{target:n}=e,{x:t,y:r}=Ce(e);Re.clear(),ae=!1,W.length>0&&(e.preventDefault(),sn(n)||e.stopImmediatePropagation()),we("up",e),Ge({target:n,x:t,y:r}),je(),Pe()}function sn(e){let n=e;for(;n;){if(n.hasAttribute(k.resizeHandle))return!0;n=n.parentElement}return!1}function Ge({target:e,x:n,y:t}){W.splice(0);let r=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(r=e),he.forEach(i=>{const{element:o,hitAreaMargins:l}=i,a=o.getBoundingClientRect(),{bottom:s,left:z,right:w,top:p}=a,u=Hn?l.coarse:l.fine;if(n>=z-u&&n<=w+u&&t>=p-u&&t<=s+u){if(r!==null&&document.contains(r)&&o!==r&&!o.contains(r)&&!r.contains(o)&&An(r,o)>0){let h=r,C=!1;for(;h&&!h.contains(o);){if(Ln(h.getBoundingClientRect(),a)){C=!0;break}h=h.parentElement}if(C)return}W.push(i)}})}function De(e,n){Re.set(e,n)}function je(){let e=!1,n=!1;W.forEach(r=>{const{direction:i}=r;i==="horizontal"?e=!0:n=!0});let t=0;Re.forEach(r=>{t|=r}),e&&n?Ae("intersection",t):e?Ae("horizontal",t):n?Ae("vertical",t):Rn()}let He;function Pe(){var e;(e=He)===null||e===void 0||e.abort(),He=new AbortController;const n={capture:!0,signal:He.signal};he.size&&(ae?(W.length>0&&Z.forEach((t,r)=>{const{body:i}=r;t>0&&(i.addEventListener("contextmenu",Me,n),i.addEventListener("pointerleave",ke,n),i.addEventListener("pointermove",ke,n))}),Z.forEach((t,r)=>{const{body:i}=r;i.addEventListener("pointerup",Me,n),i.addEventListener("pointercancel",Me,n)})):Z.forEach((t,r)=>{const{body:i}=r;t>0&&(i.addEventListener("pointerdown",$n,n),i.addEventListener("pointermove",ke,n))}))}function we(e,n){he.forEach(t=>{const{setResizeHandlerState:r}=t,i=W.includes(t);r(e,i,n)})}function _n(){const[e,n]=f.useState(0);return f.useCallback(()=>n(t=>t+1),[])}function x(e,n){if(!e)throw console.error(n),Error(n)}function te(e,n,t=$e){return e.toFixed(t)===n.toFixed(t)?0:e>n?1:-1}function J(e,n,t=$e){return te(e,n,t)===0}function O(e,n,t){return te(e,n,t)===0}function Gn(e,n,t){if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++){const i=e[r],o=n[r];if(!O(i,o,t))return!1}return!0}function le({panelConstraints:e,panelIndex:n,size:t}){const r=e[n];x(r!=null,`Panel constraints not found for index ${n}`);let{collapsedSize:i=0,collapsible:o,maxSize:l=100,minSize:a=0}=r;if(te(t,a)<0)if(o){const s=(i+a)/2;te(t,s)<0?t=i:t=a}else t=a;return t=Math.min(l,t),t=parseFloat(t.toFixed($e)),t}function ge({delta:e,initialLayout:n,panelConstraints:t,pivotIndices:r,prevLayout:i,trigger:o}){if(O(e,0))return n;const l=[...n],[a,s]=r;x(a!=null,"Invalid first pivot index"),x(s!=null,"Invalid second pivot index");let z=0;if(o==="keyboard"){{const p=e<0?s:a,u=t[p];x(u,`Panel constraints not found for index ${p}`);const{collapsedSize:v=0,collapsible:h,minSize:C=0}=u;if(h){const E=n[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),O(E,v)){const S=C-E;te(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}{const p=e<0?a:s,u=t[p];x(u,`No panel constraints found for index ${p}`);const{collapsedSize:v=0,collapsible:h,minSize:C=0}=u;if(h){const E=n[p];if(x(E!=null,`Previous layout not found for panel index ${p}`),O(E,C)){const S=E-v;te(S,Math.abs(e))>0&&(e=e<0?0-S:S)}}}}{const p=e<0?1:-1;let u=e<0?s:a,v=0;for(;;){const C=n[u];x(C!=null,`Previous layout not found for panel index ${u}`);const S=le({panelConstraints:t,panelIndex:u,size:100})-C;if(v+=S,u+=p,u<0||u>=t.length)break}const h=Math.min(Math.abs(e),Math.abs(v));e=e<0?0-h:h}{let u=e<0?a:s;for(;u>=0&&u<t.length;){const v=Math.abs(e)-Math.abs(z),h=n[u];x(h!=null,`Previous layout not found for panel index ${u}`);const C=h-v,E=le({panelConstraints:t,panelIndex:u,size:C});if(!O(h,E)&&(z+=h-E,l[u]=E,z.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3),void 0,{numeric:!0})>=0))break;e<0?u--:u++}}if(Gn(i,l))return i;{const p=e<0?s:a,u=n[p];x(u!=null,`Previous layout not found for panel index ${p}`);const v=u+z,h=le({panelConstraints:t,panelIndex:p,size:v});if(l[p]=h,!O(h,v)){let C=v-h,S=e<0?s:a;for(;S>=0&&S<t.length;){const L=l[S];x(L!=null,`Previous layout not found for panel index ${S}`);const D=L+C,N=le({panelConstraints:t,panelIndex:S,size:D});if(O(L,N)||(C-=N-L,l[S]=N),O(C,0))break;e>0?S--:S++}}}const w=l.reduce((p,u)=>u+p,0);return O(w,100)?l:i}function jn({layout:e,panelsArray:n,pivotIndices:t}){let r=0,i=100,o=0,l=0;const a=t[0];x(a!=null,"No pivot index found"),n.forEach((p,u)=>{const{constraints:v}=p,{maxSize:h=100,minSize:C=0}=v;u===a?(r=C,i=h):(o+=C,l+=h)});const s=Math.min(i,100-o),z=Math.max(r,100-l),w=e[a];return{valueMax:s,valueMin:z,valueNow:w}}function ye(e,n=document){return Array.from(n.querySelectorAll(`[${k.resizeHandleId}][data-panel-group-id="${e}"]`))}function un(e,n,t=document){const i=ye(e,t).findIndex(o=>o.getAttribute(k.resizeHandleId)===n);return i??null}function cn(e,n,t){const r=un(e,n,t);return r!=null?[r,r+1]:[-1,-1]}function Tn(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function fn(e,n=document){if(Tn(n)&&n.dataset.panelGroupId==e)return n;const t=n.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return t||null}function Ie(e,n=document){const t=n.querySelector(`[${k.resizeHandleId}="${e}"]`);return t||null}function Bn(e,n,t,r=document){var i,o,l,a;const s=Ie(n,r),z=ye(e,r),w=s?z.indexOf(s):-1,p=(i=(o=t[w])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null,u=(l=(a=t[w+1])===null||a===void 0?void 0:a.id)!==null&&l!==void 0?l:null;return[p,u]}function On({committedValuesRef:e,eagerValuesRef:n,groupId:t,layout:r,panelDataArray:i,panelGroupElement:o,setLayout:l}){f.useRef({didWarnAboutMissingResizeHandle:!1}),ne(()=>{if(!o)return;const a=ye(t,o);for(let s=0;s<i.length-1;s++){const{valueMax:z,valueMin:w,valueNow:p}=jn({layout:r,panelsArray:i,pivotIndices:[s,s+1]}),u=a[s];if(u!=null){const v=i[s];x(v,`No panel data found for index "${s}"`),u.setAttribute("aria-controls",v.id),u.setAttribute("aria-valuemax",""+Math.round(z)),u.setAttribute("aria-valuemin",""+Math.round(w)),u.setAttribute("aria-valuenow",p!=null?""+Math.round(p):"")}}return()=>{a.forEach((s,z)=>{s.removeAttribute("aria-controls"),s.removeAttribute("aria-valuemax"),s.removeAttribute("aria-valuemin"),s.removeAttribute("aria-valuenow")})}},[t,r,i,o]),f.useEffect(()=>{if(!o)return;const a=n.current;x(a,"Eager values not found");const{panelDataArray:s}=a,z=fn(t,o);x(z!=null,`No group found for id "${t}"`);const w=ye(t,o);x(w,`No resize handles found for group id "${t}"`);const p=w.map(u=>{const v=u.getAttribute(k.resizeHandleId);x(v,"Resize handle element has no handle id attribute");const[h,C]=Bn(t,v,s,o);if(h==null||C==null)return()=>{};const E=S=>{if(!S.defaultPrevented)switch(S.key){case"Enter":{S.preventDefault();const L=s.findIndex(D=>D.id===h);if(L>=0){const D=s[L];x(D,`No panel data found for index ${L}`);const N=r[L],{collapsedSize:q=0,collapsible:I,minSize:P=0}=D.constraints;if(N!=null&&I){const F=ge({delta:O(N,q)?P-q:q-N,initialLayout:r,panelConstraints:s.map(X=>X.constraints),pivotIndices:cn(t,v,o),prevLayout:r,trigger:"keyboard"});r!==F&&l(F)}}break}}};return u.addEventListener("keydown",E),()=>{u.removeEventListener("keydown",E)}});return()=>{p.forEach(u=>u())}},[o,e,n,t,r,i,l])}function qe(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function dn(e,n){const t=e==="horizontal",{x:r,y:i}=Ce(n);return t?r:i}function Fn(e,n,t,r,i){const o=t==="horizontal",l=Ie(n,i);x(l,`No resize handle element found for id "${n}"`);const a=l.getAttribute(k.groupId);x(a,"Resize handle element has no group id attribute");let{initialCursorPosition:s}=r;const z=dn(t,e),w=fn(a,i);x(w,`No group element found for id "${a}"`);const p=w.getBoundingClientRect(),u=o?p.width:p.height;return(z-s)/u*100}function Vn(e,n,t,r,i,o){if(Qe(e)){const l=t==="horizontal";let a=0;e.shiftKey?a=100:i!=null?a=i:a=10;let s=0;switch(e.key){case"ArrowDown":s=l?0:a;break;case"ArrowLeft":s=l?-a:0;break;case"ArrowRight":s=l?a:0;break;case"ArrowUp":s=l?0:-a;break;case"End":s=100;break;case"Home":s=-100;break}return s}else return r==null?0:Fn(e,n,t,r,o)}function Wn({panelDataArray:e}){const n=Array(e.length),t=e.map(o=>o.constraints);let r=0,i=100;for(let o=0;o<e.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;a!=null&&(r++,n[o]=a,i-=a)}for(let o=0;o<e.length;o++){const l=t[o];x(l,`Panel constraints not found for index ${o}`);const{defaultSize:a}=l;if(a!=null)continue;const s=e.length-r,z=i/s;r++,n[o]=z,i-=z}return n}function oe(e,n,t){n.forEach((r,i)=>{const o=e[i];x(o,`Panel data not found for index ${i}`);const{callbacks:l,constraints:a,id:s}=o,{collapsedSize:z=0,collapsible:w}=a,p=t[s];if(p==null||r!==p){t[s]=r;const{onCollapse:u,onExpand:v,onResize:h}=l;h&&h(r,p),w&&(u||v)&&(v&&(p==null||J(p,z))&&!J(r,z)&&v(),u&&(p==null||!J(p,z))&&J(r,z)&&u())}})}function be(e,n){if(e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!=n[t])return!1;return!0}function qn({defaultSize:e,dragState:n,layout:t,panelData:r,panelIndex:i,precision:o=3}){const l=t[i];let a;return l==null?a=e!=null?e.toPrecision(o):"1":r.length===1?a="1":a=l.toPrecision(o),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:n!==null?"none":void 0}}function Kn(e,n=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{e(...i)},n)}}function Ke(e){try{if(typeof localStorage<"u")e.getItem=n=>localStorage.getItem(n),e.setItem=(n,t)=>{localStorage.setItem(n,t)};else throw new Error("localStorage not supported in this environment")}catch(n){console.error(n),e.getItem=()=>null,e.setItem=()=>{}}}function pn(e){return`react-resizable-panels:${e}`}function gn(e){return e.map(n=>{const{constraints:t,id:r,idIsFromProps:i,order:o}=n;return i?r:o?`${o}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((n,t)=>n.localeCompare(t)).join(",")}function mn(e,n){try{const t=pn(e),r=n.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function Un(e,n,t){var r,i;const o=(r=mn(e,t))!==null&&r!==void 0?r:{},l=gn(n);return(i=o[l])!==null&&i!==void 0?i:null}function Xn(e,n,t,r,i){var o;const l=pn(e),a=gn(n),s=(o=mn(e,i))!==null&&o!==void 0?o:{};s[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(l,JSON.stringify(s))}catch(z){console.error(z)}}function Ue({layout:e,panelConstraints:n}){const t=[...e],r=t.reduce((o,l)=>o+l,0);if(t.length!==n.length)throw Error(`Invalid ${n.length} panel layout: ${t.map(o=>`${o}%`).join(", ")}`);if(!O(r,100)&&t.length>0)for(let o=0;o<n.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=100/r*l;t[o]=a}let i=0;for(let o=0;o<n.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=le({panelConstraints:n,panelIndex:o,size:l});l!=a&&(i+=l-a,t[o]=a)}if(!O(i,0))for(let o=0;o<n.length;o++){const l=t[o];x(l!=null,`No layout data found for index ${o}`);const a=l+i,s=le({panelConstraints:n,panelIndex:o,size:a});if(l!==s&&(i-=s-l,t[o]=s,O(i,0)))break}return t}const Jn=100,me={getItem:e=>(Ke(me),me.getItem(e)),setItem:(e,n)=>{Ke(me),me.setItem(e,n)}},Xe={};function zn({autoSaveId:e=null,children:n,className:t="",direction:r,forwardedRef:i,id:o=null,onLayout:l=null,keyboardResizeBy:a=null,storage:s=me,style:z,tagName:w="div",...p}){const u=_e(o),v=f.useRef(null),[h,C]=f.useState(null),[E,S]=f.useState([]),L=_n(),D=f.useRef({}),N=f.useRef(new Map),q=f.useRef(0),I=f.useRef({autoSaveId:e,direction:r,dragState:h,id:u,keyboardResizeBy:a,onLayout:l,storage:s}),P=f.useRef({layout:E,panelDataArray:[],panelDataArrayChanged:!1});f.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),f.useImperativeHandle(i,()=>({getId:()=>I.current.id,getLayout:()=>{const{layout:c}=P.current;return c},setLayout:c=>{const{onLayout:m}=I.current,{layout:b,panelDataArray:g}=P.current,d=Ue({layout:c,panelConstraints:g.map(y=>y.constraints)});qe(b,d)||(S(d),P.current.layout=d,m&&m(d),oe(g,d,D.current))}}),[]),ne(()=>{I.current.autoSaveId=e,I.current.direction=r,I.current.dragState=h,I.current.id=u,I.current.onLayout=l,I.current.storage=s}),On({committedValuesRef:I,eagerValuesRef:P,groupId:u,layout:E,panelDataArray:P.current.panelDataArray,setLayout:S,panelGroupElement:v.current}),f.useEffect(()=>{const{panelDataArray:c}=P.current;if(e){if(E.length===0||E.length!==c.length)return;let m=Xe[e];m==null&&(m=Kn(Xn,Jn),Xe[e]=m);const b=[...c],g=new Map(N.current);m(e,b,g,E,s)}},[e,E,s]),f.useEffect(()=>{});const F=f.useCallback(c=>{const{onLayout:m}=I.current,{layout:b,panelDataArray:g}=P.current;if(c.constraints.collapsible){const d=g.map(K=>K.constraints),{collapsedSize:y=0,panelSize:R,pivotIndices:H}=ee(g,c,b);if(x(R!=null,`Panel size not found for panel "${c.id}"`),!J(R,y)){N.current.set(c.id,R);const U=ie(g,c)===g.length-1?R-y:y-R,A=ge({delta:U,initialLayout:b,panelConstraints:d,pivotIndices:H,prevLayout:b,trigger:"imperative-api"});be(b,A)||(S(A),P.current.layout=A,m&&m(A),oe(g,A,D.current))}}},[]),X=f.useCallback((c,m)=>{const{onLayout:b}=I.current,{layout:g,panelDataArray:d}=P.current;if(c.constraints.collapsible){const y=d.map(V=>V.constraints),{collapsedSize:R=0,panelSize:H=0,minSize:K=0,pivotIndices:U}=ee(d,c,g),A=m??K;if(J(H,R)){const V=N.current.get(c.id),de=V!=null&&V>=A?V:A,Le=ie(d,c)===d.length-1?H-de:de-H,T=ge({delta:Le,initialLayout:g,panelConstraints:y,pivotIndices:U,prevLayout:g,trigger:"imperative-api"});be(g,T)||(S(T),P.current.layout=T,b&&b(T),oe(d,T,D.current))}}},[]),B=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{panelSize:g}=ee(b,c,m);return x(g!=null,`Panel size not found for panel "${c.id}"`),g},[]),G=f.useCallback((c,m)=>{const{panelDataArray:b}=P.current,g=ie(b,c);return qn({defaultSize:m,dragState:h,layout:E,panelData:b,panelIndex:g})},[h,E]),M=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=ee(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),d===!0&&J(y,g)},[]),Q=f.useCallback(c=>{const{layout:m,panelDataArray:b}=P.current,{collapsedSize:g=0,collapsible:d,panelSize:y}=ee(b,c,m);return x(y!=null,`Panel size not found for panel "${c.id}"`),!d||te(y,g)>0},[]),_=f.useCallback(c=>{const{panelDataArray:m}=P.current;m.push(c),m.sort((b,g)=>{const d=b.order,y=g.order;return d==null&&y==null?0:d==null?-1:y==null?1:d-y}),P.current.panelDataArrayChanged=!0,L()},[L]);ne(()=>{if(P.current.panelDataArrayChanged){P.current.panelDataArrayChanged=!1;const{autoSaveId:c,onLayout:m,storage:b}=I.current,{layout:g,panelDataArray:d}=P.current;let y=null;if(c){const H=Un(c,d,b);H&&(N.current=new Map(Object.entries(H.expandToSizes)),y=H.layout)}y==null&&(y=Wn({panelDataArray:d}));const R=Ue({layout:y,panelConstraints:d.map(H=>H.constraints)});qe(g,R)||(S(R),P.current.layout=R,m&&m(R),oe(d,R,D.current))}}),ne(()=>{const c=P.current;return()=>{c.layout=[]}},[]);const $=f.useCallback(c=>{let m=!1;const b=v.current;return b&&window.getComputedStyle(b,null).getPropertyValue("direction")==="rtl"&&(m=!0),function(d){d.preventDefault();const y=v.current;if(!y)return()=>null;const{direction:R,dragState:H,id:K,keyboardResizeBy:U,onLayout:A}=I.current,{layout:V,panelDataArray:de}=P.current,{initialLayout:ve}=H??{},Le=cn(K,c,y);let T=Vn(d,c,R,H,U,y);const Te=R==="horizontal";Te&&m&&(T=-T);const xn=de.map(vn=>vn.constraints),pe=ge({delta:T,initialLayout:ve??V,panelConstraints:xn,pivotIndices:Le,prevLayout:V,trigger:Qe(d)?"keyboard":"mouse-or-touch"}),Be=!be(V,pe);(en(d)||nn(d))&&q.current!=T&&(q.current=T,!Be&&T!==0?Te?De(c,T<0?rn:on):De(c,T<0?ln:an):De(c,0)),Be&&(S(pe),P.current.layout=pe,A&&A(pe),oe(de,pe,D.current))}},[]),j=f.useCallback((c,m)=>{const{onLayout:b}=I.current,{layout:g,panelDataArray:d}=P.current,y=d.map(V=>V.constraints),{panelSize:R,pivotIndices:H}=ee(d,c,g);x(R!=null,`Panel size not found for panel "${c.id}"`);const U=ie(d,c)===d.length-1?R-m:m-R,A=ge({delta:U,initialLayout:g,panelConstraints:y,pivotIndices:H,prevLayout:g,trigger:"imperative-api"});be(g,A)||(S(A),P.current.layout=A,b&&b(A),oe(d,A,D.current))},[]),se=f.useCallback((c,m)=>{const{layout:b,panelDataArray:g}=P.current,{collapsedSize:d=0,collapsible:y}=m,{collapsedSize:R=0,collapsible:H,maxSize:K=100,minSize:U=0}=c.constraints,{panelSize:A}=ee(g,c,b);A!=null&&(y&&H&&J(A,d)?J(d,R)||j(c,R):A<U?j(c,U):A>K&&j(c,K))},[j]),ue=f.useCallback((c,m)=>{const{direction:b}=I.current,{layout:g}=P.current;if(!v.current)return;const d=Ie(c,v.current);x(d,`Drag handle element not found for id "${c}"`);const y=dn(b,m);C({dragHandleId:c,dragHandleRect:d.getBoundingClientRect(),initialCursorPosition:y,initialLayout:g})},[]),ce=f.useCallback(()=>{C(null)},[]),xe=f.useCallback(c=>{const{panelDataArray:m}=P.current,b=ie(m,c);b>=0&&(m.splice(b,1),delete D.current[c.id],P.current.panelDataArrayChanged=!0,L())},[L]),re=f.useMemo(()=>({collapsePanel:F,direction:r,dragState:h,expandPanel:X,getPanelSize:B,getPanelStyle:G,groupId:u,isPanelCollapsed:M,isPanelExpanded:Q,reevaluatePanelConstraints:se,registerPanel:_,registerResizeHandle:$,resizePanel:j,startDragging:ue,stopDragging:ce,unregisterPanel:xe,panelGroupElement:v.current}),[F,h,r,X,B,G,u,M,Q,se,_,$,j,ue,ce,xe]),fe={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return f.createElement(Ee.Provider,{value:re},f.createElement(w,{...p,children:n,className:t,id:o,ref:v,style:{...fe,...z},[k.group]:"",[k.groupDirection]:r,[k.groupId]:u}))}const hn=f.forwardRef((e,n)=>f.createElement(zn,{...e,forwardedRef:n}));zn.displayName="PanelGroup";hn.displayName="forwardRef(PanelGroup)";function ie(e,n){return e.findIndex(t=>t===n||t.id===n.id)}function ee(e,n,t){const r=ie(e,n),o=r===e.length-1?[r-1,r]:[r,r+1],l=t[r];return{...n.constraints,panelSize:l,pivotIndices:o}}function Yn({disabled:e,handleId:n,resizeHandler:t,panelGroupElement:r}){f.useEffect(()=>{if(e||t==null||r==null)return;const i=Ie(n,r);if(i==null)return;const o=l=>{if(!l.defaultPrevented)switch(l.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{l.preventDefault(),t(l);break}case"F6":{l.preventDefault();const a=i.getAttribute(k.groupId);x(a,`No group element found for id "${a}"`);const s=ye(a,r),z=un(a,n,r);x(z!==null,`No resize element found for id "${n}"`);const w=l.shiftKey?z>0?z-1:s.length-1:z+1<s.length?z+1:0;s[w].focus();break}}};return i.addEventListener("keydown",o),()=>{i.removeEventListener("keydown",o)}},[r,e,n,t])}function yn({children:e=null,className:n="",disabled:t=!1,hitAreaMargins:r,id:i,onBlur:o,onClick:l,onDragging:a,onFocus:s,onPointerDown:z,onPointerUp:w,style:p={},tabIndex:u=0,tagName:v="div",...h}){var C,E;const S=f.useRef(null),L=f.useRef({onClick:l,onDragging:a,onPointerDown:z,onPointerUp:w});f.useEffect(()=>{L.current.onClick=l,L.current.onDragging=a,L.current.onPointerDown=z,L.current.onPointerUp=w});const D=f.useContext(Ee);if(D===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:q,registerResizeHandle:I,startDragging:P,stopDragging:F,panelGroupElement:X}=D,B=_e(i),[G,M]=f.useState("inactive"),[Q,_]=f.useState(!1),[$,j]=f.useState(null),se=f.useRef({state:G});ne(()=>{se.current.state=G}),f.useEffect(()=>{if(t)j(null);else{const re=I(B);j(()=>re)}},[t,B,I]);const ue=(C=r?.coarse)!==null&&C!==void 0?C:15,ce=(E=r?.fine)!==null&&E!==void 0?E:5;f.useEffect(()=>{if(t||$==null)return;const re=S.current;x(re,"Element ref not attached");let fe=!1;return Nn(B,re,N,{coarse:ue,fine:ce},(m,b,g)=>{if(!b){M("inactive");return}switch(m){case"down":{M("drag"),fe=!1,x(g,'Expected event to be defined for "down" action'),P(B,g);const{onDragging:d,onPointerDown:y}=L.current;d?.(!0),y?.();break}case"move":{const{state:d}=se.current;fe=!0,d!=="drag"&&M("hover"),x(g,'Expected event to be defined for "move" action'),$(g);break}case"up":{M("hover"),F();const{onClick:d,onDragging:y,onPointerUp:R}=L.current;y?.(!1),R?.(),fe||d?.();break}}})},[ue,N,t,ce,I,B,$,P,F]),Yn({disabled:t,handleId:B,resizeHandler:$,panelGroupElement:X});const xe={touchAction:"none",userSelect:"none"};return f.createElement(v,{...h,children:e,className:n,id:i,onBlur:()=>{_(!1),o?.()},onFocus:()=>{_(!0),s?.()},ref:S,role:"separator",style:{...xe,...p},tabIndex:u,[k.groupDirection]:N,[k.groupId]:q,[k.resizeHandle]:"",[k.resizeHandleActive]:G==="drag"?"pointer":Q?"keyboard":void 0,[k.resizeHandleEnabled]:!t,[k.resizeHandleId]:B,[k.resizeHandleState]:G})}yn.displayName="PanelResizeHandle";function Zn({className:e,...n}){return ze.jsxRuntimeExports.jsx(hn,{"data-slot":"resizable-panel-group",className:Je.cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...n})}function Qn({...e}){return ze.jsxRuntimeExports.jsx(Ze,{"data-slot":"resizable-panel",...e})}function et({withHandle:e,className:n,...t}){return ze.jsxRuntimeExports.jsx(yn,{"data-slot":"resizable-handle",className:Je.cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",n),...t,children:e&&ze.jsxRuntimeExports.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:ze.jsxRuntimeExports.jsx(bn.IconComponent,{iconName:"IconGripVertical",className:"size-2.5"})})})}exports.ResizableHandle=et;exports.ResizablePanel=Qn;exports.ResizablePanelGroup=Zn;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../jsx-runtime-DUiatUiq.cjs"),o=require("react-resizable-panels"),l=require("../index-DoxiiusW.cjs"),s=require("../icon-component-lt1cLU_1.cjs");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const n=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,n.get?n:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const i=c(o);function u({className:e,...t}){return r.jsxRuntimeExports.jsx(i.PanelGroup,{"data-slot":"resizable-panel-group",className:l.cn("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t})}function d({...e}){return r.jsxRuntimeExports.jsx(i.Panel,{"data-slot":"resizable-panel",...e})}function f({withHandle:e,className:t,...a}){return r.jsxRuntimeExports.jsx(i.PanelResizeHandle,{"data-slot":"resizable-handle",className:l.cn("bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...a,children:e&&r.jsxRuntimeExports.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:r.jsxRuntimeExports.jsx(s.IconComponent,{iconName:"IconGripVertical",className:"size-2.5"})})})}exports.ResizableHandle=f;exports.ResizablePanel=d;exports.ResizablePanelGroup=u;