@synnaxlabs/pluto 0.43.0 → 0.43.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/{Item-BrHZi6Fl.cjs → Item-CB5c--eX.cjs} +1 -1
  2. package/dist/{Item-BgUwEjzV.js → Item-LAMTj0X2.js} +2 -2
  3. package/dist/{Link-Bngd8rrL.cjs → Link-CPnT8Xp9.cjs} +1 -1
  4. package/dist/{Link-y133HE5v.js → Link-DcudTtgT.js} +1 -1
  5. package/dist/{Provider-CAR23fYq.js → Provider-CLPfWTcl.js} +2 -2
  6. package/dist/{Provider-B1j7nPL9.cjs → Provider-s70PZ9lg.cjs} +1 -1
  7. package/dist/{Text-P0b041la.js → Text-BiWcjO1i.js} +1 -1
  8. package/dist/{Text-CLsJyQGy.cjs → Text-Dw0NDc2A.cjs} +1 -1
  9. package/dist/{Text-Ddc0C5JU.cjs → Text-bSIbkBIL.cjs} +1 -1
  10. package/dist/{Text-B1uUpUKk.js → Text-wL3te5S6.js} +3 -3
  11. package/dist/{Toggle-BC1o8qt5.js → Toggle-CbzT5wR_.js} +2 -2
  12. package/dist/{Toggle-D-vvd8lz.cjs → Toggle-CpDGR6M6.cjs} +1 -1
  13. package/dist/button.cjs +1 -1
  14. package/dist/button.js +1 -1
  15. package/dist/color.cjs +1 -1
  16. package/dist/color.js +1 -1
  17. package/dist/{eraser-CupVBBBp.js → eraser-BJxXs5KS.js} +2 -2
  18. package/dist/{eraser-C0Kv4_kL.cjs → eraser-CGxyWj3B.cjs} +2 -2
  19. package/dist/ether.cjs +1 -1
  20. package/dist/ether.js +6 -6
  21. package/dist/{external-8zJ3fvo2.js → external-5nVYtLDI.js} +4 -4
  22. package/dist/{external-firJ8w9n.js → external-69bqTAcN.js} +3 -3
  23. package/dist/{external-Ds5GDIp9.cjs → external-B-B5ro_s.cjs} +1 -1
  24. package/dist/{external-D38Y0J6S.cjs → external-B3Mtbu36.cjs} +1 -1
  25. package/dist/{external-DHw0SdIj.cjs → external-BgwS5D0j.cjs} +1 -1
  26. package/dist/{external-BYsOdgw5.js → external-Bn3A7Rew.js} +3 -3
  27. package/dist/{external-BgKH42un.cjs → external-Bojct8Fy.cjs} +1 -1
  28. package/dist/{external-CKag7gXR.js → external-C6mmYO7R.js} +4 -4
  29. package/dist/{external-BmeMUsxr.js → external-CnkWbciu.js} +2 -2
  30. package/dist/{external-D8mHEAIG.cjs → external-Cxwmal3D.cjs} +1 -1
  31. package/dist/{external-DuvwfKLw.js → external-Dm9rg2x7.js} +2 -2
  32. package/dist/{external-DlyrUZhP.cjs → external-EvgywGSS.cjs} +1 -1
  33. package/dist/{external-D1gwMWza.cjs → external-MJ2UMa_L.cjs} +1 -1
  34. package/dist/{external-Cjnx793K.js → external-UeyJ6mPv.js} +6 -6
  35. package/dist/{external-CjTwWT6m.cjs → external-V0yO0q2n.cjs} +1 -1
  36. package/dist/{external-IsogMmdT.cjs → external-cDUxSE0v.cjs} +1 -1
  37. package/dist/{external-BDh272rT.js → external-cJGWYB3x.js} +1 -1
  38. package/dist/{external-ZV7pEm55.js → external-fwvNilmo.js} +1 -1
  39. package/dist/{font-Cy9UYjyY.js → font-Csp00pQP.js} +2 -2
  40. package/dist/{font-C5EV9fq1.cjs → font-ifUcrCey.cjs} +1 -1
  41. package/dist/{fontString-CUy7T-OR.cjs → fontString-BWECl_1B.cjs} +1 -1
  42. package/dist/{fontString-CynarMI1.js → fontString-ap-NPnCD.js} +1 -1
  43. package/dist/header.cjs +1 -1
  44. package/dist/header.js +1 -1
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.js +177 -183
  47. package/dist/input.cjs +1 -1
  48. package/dist/input.js +1 -1
  49. package/dist/list.cjs +1 -1
  50. package/dist/list.js +1 -1
  51. package/dist/menu.cjs +1 -1
  52. package/dist/menu.js +1 -1
  53. package/dist/{provider-B8IM-N4g.cjs → provider-YWPkhTn6.cjs} +28 -28
  54. package/dist/{provider-CQqS-teQ.js → provider-gW90qzEG.js} +4439 -4409
  55. package/dist/src/aether/aether/aether.d.ts.map +1 -1
  56. package/dist/src/channel/LinePlot.d.ts +2 -2
  57. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  58. package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
  59. package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
  60. package/dist/src/vis/lineplot/range/Provider.d.ts.map +1 -1
  61. package/dist/src/vis/lineplot/range/aether/provider.d.ts +2 -2
  62. package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
  63. package/dist/tabs.cjs +1 -1
  64. package/dist/tabs.js +1 -1
  65. package/dist/theming.cjs +1 -1
  66. package/dist/theming.js +2 -2
  67. package/dist/tree.cjs +1 -1
  68. package/dist/tree.js +1 -1
  69. package/dist/{value-BVL4mfhG.cjs → value--TYeJRXm.cjs} +4 -4
  70. package/dist/{value-DLy5XRhS.js → value-dkHk-BsO.js} +27 -27
  71. package/package.json +4 -4
@@ -1,5 +1,5 @@
1
1
  import { j as o } from "./jsx-runtime-C5mzlN2N.js";
2
- import "./Text-B1uUpUKk.js";
2
+ import "./Text-wL3te5S6.js";
3
3
  import { o as S, C as t } from "./css-DjQu2Qyf.js";
4
4
  import { useRef as j, useState as g } from "react";
5
5
  import "./Stack-D50qN0Vu.js";
@@ -1,4 +1,4 @@
1
- "use strict";const E=require("./jsx-runtime-CITbqOLs.cjs"),b=require("./Divider-D74_FAXn.cjs"),p=require("./css-C7rJrqRi.cjs"),d=require("react");require("./Stack-BbwDtaE6.cjs");const W=require("./Space-ByFmfiTa.cjs"),H=require("./ContextMenu-BC5x7XR5.cjs"),G=require("./dimensions-BmlCx5q4.cjs");require("./state-DwM4WaEw.cjs");const J=require("./WithIcon-CCnlO2LC.cjs"),K=require("./Provider-B1j7nPL9.cjs"),V=require("./provider-B8IM-N4g.cjs"),Me=require("./font-C5EV9fq1.cjs"),we=require("react-dom"),j=require("./hooks-B92WH57y.cjs"),L=require("./array-CZHEGH95.cjs"),Oe=require("./useMemoCompare-BDs2sKw5.cjs"),je=require("./Center-DE_BtCCX.cjs");function De(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(l,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return l.default=n,Object.freeze(l)}const A=De(d),ee=({transforms:n=[]})=>{const[l,e]=d.useState(n),t=d.useCallback((r,i,c=0)=>e(h=>{const u=h.filter(f=>f.key!==r);return u.push({key:r,transform:i,priority:c}),u.sort((f,g)=>g.priority-f.priority),u}),[e]),s=d.useCallback(r=>e(i=>i.filter(c=>c.key!==r)),[t]);return{transform:d.useCallback(r=>l.reduce((i,c)=>c.transform(i),{...r,transformed:!1}),[l]),setTransform:t,deleteTransform:s}},P=n=>{const l=d.use(n);if(l===null)throw new Error("useRequiredContext: context value is null");return l},te=d.createContext({transformedData:[],sourceData:[],transformed:!1}),se=d.createContext({setSourceData:()=>{},getSourceData:()=>[],getTransformedData:()=>[],deleteTransform:()=>{},setTransform:()=>{},setEmptyContent:()=>{},getEmptyContent:()=>{},getDefaultEmptyContent:()=>{},getTransformed:()=>!1}),D=()=>P(te),k=()=>P(se),ze=()=>D().transformedData,ne=()=>D().sourceData,q=()=>k().getTransformedData,Ae=()=>k().setSourceData,re=({data:n,emptyContent:l,children:e})=>{const{transform:t,setTransform:s,deleteTransform:o}=ee({}),[r,i,c]=b.useCombinedStateAndRef(()=>n??[]);d.useEffect(()=>{n!=null&&i(n)},[n]);const h=d.useMemo(()=>t({data:[...r],transformed:!1}),[r,t]),u=b.useSyncedRef(h),f=b.useSyncedRef(l),[g,S,x]=b.useCombinedStateAndRef(void 0);d.useEffect(()=>{l!=null&&S(l)},[l]);const a=d.useMemo(()=>({setSourceData:i,getSourceData:()=>c.current,getTransformedData:()=>u.current.data,getTransformed:()=>u.current.transformed,deleteTransform:o,setTransform:s,setEmptyContent:S,getEmptyContent:()=>x.current,getDefaultEmptyContent:()=>f.current}),[i,c,u,o,s]),m=d.useMemo(()=>({transformed:h.transformed,transformedData:h.data,sourceData:r,emptyContent:g}),[h,r,g]);return E.jsxRuntimeExports.jsx(se,{value:a,children:E.jsxRuntimeExports.jsx(te,{value:m,children:e})})},oe=({entry:n,selected:l,hovered:e,onSelect:t,className:s,direction:o="x",draggingOver:r,rightAligned:i=!1,highlightHovered:c=!1,allowSelect:h=!0,translate:u,style:f,sourceIndex:g,...S})=>E.jsxRuntimeExports.jsx(W.Space,{id:n.key.toString(),direction:o,onClick:()=>t==null?void 0:t(n.key),tabIndex:0,className:p.CSS(s,H.CONTEXT_TARGET,l&&H.CONTEXT_SELECTED,h&&p.CSS.M("selectable"),e&&p.CSS.M("hovered"),i&&p.CSS.M("right-aligned"),c&&p.CSS.M("highlight-hover"),p.CSS.BE("list","item"),p.CSS.selected(l)),style:{position:u!=null?"absolute":"relative",transform:`translateY(${u}px)`,...f},...S}),ie=d.createContext(null),ke=()=>P(ie),N="sort",_e=({hide:n=!1,columns:l,children:e,level:t="p",weight:s,shade:o})=>{const r=ne(),{setTransform:i,deleteTransform:c}=k(),h=Me.useTypography("p").toString(),[u,f]=d.useState([null,!1]),[g,S]=d.useState({columns:l}),x=a=>{const[m,v]=u;m===a?v?(f([a,!v]),i(N,X(a,!v))):(f([null,!1]),c(N)):(f([a,!0]),i(N,X(a,!0)))};return d.useEffect(()=>{S(a=>({columns:Ve(a.columns.length===0?l:a.columns,r,h)}))},[h,r,l]),E.jsxRuntimeExports.jsxs(ie,{value:g,children:[!n&&E.jsxRuntimeExports.jsx(W.Space,{x:!0,size:"medium",className:p.CSS(p.CSS.BE("list-col-header","container"),p.CSS.visible(!n)),children:g.columns.filter(({visible:a=!0})=>a).map(({key:a,cWidth:m,name:v})=>{const[y,C]=u;let M;const R=r[0];return a===y&&(M=C?E.jsxRuntimeExports.jsx(b.y4.Caret.Up,{}):E.jsxRuntimeExports.jsx(b.y4.Caret.Down,{})),E.jsxRuntimeExports.jsx(J.WithIcon,{className:p.CSS.BE("list-col-header","item"),justify:"spaceBetween",level:t,weight:s,shade:o,endIcon:M,style:{width:m},shrink:!1,onClick:()=>R!=null&&a in R&&x(a),children:v},a.toString())})}),e]})},Ne=({entry:n,onSelect:l,className:e,...t})=>{const{columns:s}=ke(),{index:o}=t;return E.jsxRuntimeExports.jsx(oe,{entry:n,onSelect:l,className:p.CSS(e,p.CSS.BE("list-col-item","container"),l!=null&&p.CSS.BEM("list-col-item","container","selectable")),align:"center",size:"medium",...t,children:s.filter(({visible:r=!0})=>r).map(r=>E.jsxRuntimeExports.jsx(Fe,{entry:n,col:r,index:o},r.key.toString()))},n.key.toString())},Fe=({entry:n,index:l,col:{width:e,...t}})=>{const s={width:t.cWidth,userSelect:"none",padding:"1rem",flexShrink:0};if(t.render!=null)return t.render({key:t.key,entry:n,style:s,index:l});let o;return t.stringer!=null?o=t.stringer(n):o=n[t.key],E.jsxRuntimeExports.jsx(b.Text,{className:p.CSS.BE("list-col-item-value",t.key.toString()),level:"p",style:s,shade:t.shade,weight:t.weight,children:p.fd(o)},t.key.toString())},Ve=(n,l,e,t=30)=>{const s=Le(l,n);return n.map(o=>{if(o.width!=null)o.cWidth=o.width;else{const{width:r}=G.dimensions(o.name,e),{width:i}=G.dimensions(s[o.key],e);o.cWidth=Math.max(r,i)+t}return o})},Le=(n,l)=>{const e={};return n.forEach(t=>l.forEach(({key:s,stringer:o})=>{const r=t[s];if(r==null)return;const i=o!=null?o(t):r.toString();(!(s in e)||i.length>e[s].length)&&(e[s]=i)})),e},X=(n,l)=>({data:e})=>e.length===0?{data:e,transformed:!1}:{data:[...e].sort(p.L.newFieldF(n,e[0],!l)),transformed:!0},We={Header:_e,Item:Ne,itemHeight:5.5*6};function O(n,l,e){let t=e.initialDeps??[],s;function o(){var r,i,c,h;let u;e.key&&((r=e.debug)!=null&&r.call(e))&&(u=Date.now());const f=n();if(!(f.length!==t.length||f.some((x,a)=>t[a]!==x)))return s;t=f;let S;if(e.key&&((i=e.debug)!=null&&i.call(e))&&(S=Date.now()),s=l(...f),e.key&&((c=e.debug)!=null&&c.call(e))){const x=Math.round((Date.now()-u)*100)/100,a=Math.round((Date.now()-S)*100)/100,m=a/16,v=(y,C)=>{for(y=String(y);y.length<C;)y=" "+y;return y};console.info(`%c⏱ ${v(a,5)} /${v(x,5)} ms`,`
1
+ "use strict";const E=require("./jsx-runtime-CITbqOLs.cjs"),b=require("./Divider-D74_FAXn.cjs"),p=require("./css-C7rJrqRi.cjs"),d=require("react");require("./Stack-BbwDtaE6.cjs");const W=require("./Space-ByFmfiTa.cjs"),H=require("./ContextMenu-BC5x7XR5.cjs"),G=require("./dimensions-BmlCx5q4.cjs");require("./state-DwM4WaEw.cjs");const J=require("./WithIcon-CCnlO2LC.cjs"),K=require("./Provider-s70PZ9lg.cjs"),V=require("./provider-YWPkhTn6.cjs"),Me=require("./font-ifUcrCey.cjs"),we=require("react-dom"),j=require("./hooks-B92WH57y.cjs"),L=require("./array-CZHEGH95.cjs"),Oe=require("./useMemoCompare-BDs2sKw5.cjs"),je=require("./Center-DE_BtCCX.cjs");function De(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const t=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(l,e,t.get?t:{enumerable:!0,get:()=>n[e]})}}return l.default=n,Object.freeze(l)}const A=De(d),ee=({transforms:n=[]})=>{const[l,e]=d.useState(n),t=d.useCallback((r,i,c=0)=>e(h=>{const u=h.filter(f=>f.key!==r);return u.push({key:r,transform:i,priority:c}),u.sort((f,g)=>g.priority-f.priority),u}),[e]),s=d.useCallback(r=>e(i=>i.filter(c=>c.key!==r)),[t]);return{transform:d.useCallback(r=>l.reduce((i,c)=>c.transform(i),{...r,transformed:!1}),[l]),setTransform:t,deleteTransform:s}},P=n=>{const l=d.use(n);if(l===null)throw new Error("useRequiredContext: context value is null");return l},te=d.createContext({transformedData:[],sourceData:[],transformed:!1}),se=d.createContext({setSourceData:()=>{},getSourceData:()=>[],getTransformedData:()=>[],deleteTransform:()=>{},setTransform:()=>{},setEmptyContent:()=>{},getEmptyContent:()=>{},getDefaultEmptyContent:()=>{},getTransformed:()=>!1}),D=()=>P(te),k=()=>P(se),ze=()=>D().transformedData,ne=()=>D().sourceData,q=()=>k().getTransformedData,Ae=()=>k().setSourceData,re=({data:n,emptyContent:l,children:e})=>{const{transform:t,setTransform:s,deleteTransform:o}=ee({}),[r,i,c]=b.useCombinedStateAndRef(()=>n??[]);d.useEffect(()=>{n!=null&&i(n)},[n]);const h=d.useMemo(()=>t({data:[...r],transformed:!1}),[r,t]),u=b.useSyncedRef(h),f=b.useSyncedRef(l),[g,S,x]=b.useCombinedStateAndRef(void 0);d.useEffect(()=>{l!=null&&S(l)},[l]);const a=d.useMemo(()=>({setSourceData:i,getSourceData:()=>c.current,getTransformedData:()=>u.current.data,getTransformed:()=>u.current.transformed,deleteTransform:o,setTransform:s,setEmptyContent:S,getEmptyContent:()=>x.current,getDefaultEmptyContent:()=>f.current}),[i,c,u,o,s]),m=d.useMemo(()=>({transformed:h.transformed,transformedData:h.data,sourceData:r,emptyContent:g}),[h,r,g]);return E.jsxRuntimeExports.jsx(se,{value:a,children:E.jsxRuntimeExports.jsx(te,{value:m,children:e})})},oe=({entry:n,selected:l,hovered:e,onSelect:t,className:s,direction:o="x",draggingOver:r,rightAligned:i=!1,highlightHovered:c=!1,allowSelect:h=!0,translate:u,style:f,sourceIndex:g,...S})=>E.jsxRuntimeExports.jsx(W.Space,{id:n.key.toString(),direction:o,onClick:()=>t==null?void 0:t(n.key),tabIndex:0,className:p.CSS(s,H.CONTEXT_TARGET,l&&H.CONTEXT_SELECTED,h&&p.CSS.M("selectable"),e&&p.CSS.M("hovered"),i&&p.CSS.M("right-aligned"),c&&p.CSS.M("highlight-hover"),p.CSS.BE("list","item"),p.CSS.selected(l)),style:{position:u!=null?"absolute":"relative",transform:`translateY(${u}px)`,...f},...S}),ie=d.createContext(null),ke=()=>P(ie),N="sort",_e=({hide:n=!1,columns:l,children:e,level:t="p",weight:s,shade:o})=>{const r=ne(),{setTransform:i,deleteTransform:c}=k(),h=Me.useTypography("p").toString(),[u,f]=d.useState([null,!1]),[g,S]=d.useState({columns:l}),x=a=>{const[m,v]=u;m===a?v?(f([a,!v]),i(N,X(a,!v))):(f([null,!1]),c(N)):(f([a,!0]),i(N,X(a,!0)))};return d.useEffect(()=>{S(a=>({columns:Ve(a.columns.length===0?l:a.columns,r,h)}))},[h,r,l]),E.jsxRuntimeExports.jsxs(ie,{value:g,children:[!n&&E.jsxRuntimeExports.jsx(W.Space,{x:!0,size:"medium",className:p.CSS(p.CSS.BE("list-col-header","container"),p.CSS.visible(!n)),children:g.columns.filter(({visible:a=!0})=>a).map(({key:a,cWidth:m,name:v})=>{const[y,C]=u;let M;const R=r[0];return a===y&&(M=C?E.jsxRuntimeExports.jsx(b.y4.Caret.Up,{}):E.jsxRuntimeExports.jsx(b.y4.Caret.Down,{})),E.jsxRuntimeExports.jsx(J.WithIcon,{className:p.CSS.BE("list-col-header","item"),justify:"spaceBetween",level:t,weight:s,shade:o,endIcon:M,style:{width:m},shrink:!1,onClick:()=>R!=null&&a in R&&x(a),children:v},a.toString())})}),e]})},Ne=({entry:n,onSelect:l,className:e,...t})=>{const{columns:s}=ke(),{index:o}=t;return E.jsxRuntimeExports.jsx(oe,{entry:n,onSelect:l,className:p.CSS(e,p.CSS.BE("list-col-item","container"),l!=null&&p.CSS.BEM("list-col-item","container","selectable")),align:"center",size:"medium",...t,children:s.filter(({visible:r=!0})=>r).map(r=>E.jsxRuntimeExports.jsx(Fe,{entry:n,col:r,index:o},r.key.toString()))},n.key.toString())},Fe=({entry:n,index:l,col:{width:e,...t}})=>{const s={width:t.cWidth,userSelect:"none",padding:"1rem",flexShrink:0};if(t.render!=null)return t.render({key:t.key,entry:n,style:s,index:l});let o;return t.stringer!=null?o=t.stringer(n):o=n[t.key],E.jsxRuntimeExports.jsx(b.Text,{className:p.CSS.BE("list-col-item-value",t.key.toString()),level:"p",style:s,shade:t.shade,weight:t.weight,children:p.fd(o)},t.key.toString())},Ve=(n,l,e,t=30)=>{const s=Le(l,n);return n.map(o=>{if(o.width!=null)o.cWidth=o.width;else{const{width:r}=G.dimensions(o.name,e),{width:i}=G.dimensions(s[o.key],e);o.cWidth=Math.max(r,i)+t}return o})},Le=(n,l)=>{const e={};return n.forEach(t=>l.forEach(({key:s,stringer:o})=>{const r=t[s];if(r==null)return;const i=o!=null?o(t):r.toString();(!(s in e)||i.length>e[s].length)&&(e[s]=i)})),e},X=(n,l)=>({data:e})=>e.length===0?{data:e,transformed:!1}:{data:[...e].sort(p.L.newFieldF(n,e[0],!l)),transformed:!0},We={Header:_e,Item:Ne,itemHeight:5.5*6};function O(n,l,e){let t=e.initialDeps??[],s;function o(){var r,i,c,h;let u;e.key&&((r=e.debug)!=null&&r.call(e))&&(u=Date.now());const f=n();if(!(f.length!==t.length||f.some((x,a)=>t[a]!==x)))return s;t=f;let S;if(e.key&&((i=e.debug)!=null&&i.call(e))&&(S=Date.now()),s=l(...f),e.key&&((c=e.debug)!=null&&c.call(e))){const x=Math.round((Date.now()-u)*100)/100,a=Math.round((Date.now()-S)*100)/100,m=a/16,v=(y,C)=>{for(y=String(y);y.length<C;)y=" "+y;return y};console.info(`%c⏱ ${v(a,5)} /${v(x,5)} ms`,`
2
2
  font-size: .6rem;
3
3
  font-weight: bold;
4
4
  color: hsl(${Math.max(0,Math.min(120-120*m,120))}deg 100% 31%);`,e==null?void 0:e.key)}return(h=e==null?void 0:e.onChange)==null||h.call(e,s),s}return o.updateDeps=r=>{t=r},o}function F(n,l){if(n===void 0)throw new Error("Unexpected undefined");return n}const Pe=(n,l)=>Math.abs(n-l)<1,qe=(n,l,e)=>{let t;return function(...s){n.clearTimeout(t),t=n.setTimeout(()=>l.apply(this,s),e)}},Be=n=>n,Ue=n=>{const l=Math.max(n.startIndex-n.overscan,0),e=Math.min(n.endIndex+n.overscan,n.count-1),t=[];for(let s=l;s<=e;s++)t.push(s);return t},$e=(n,l)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;const s=r=>{const{width:i,height:c}=r;l({width:Math.round(i),height:Math.round(c)})};if(s(e.getBoundingClientRect()),!t.ResizeObserver)return()=>{};const o=new t.ResizeObserver(r=>{const i=()=>{const c=r[0];if(c!=null&&c.borderBoxSize){const h=c.borderBoxSize[0];if(h){s({width:h.inlineSize,height:h.blockSize});return}}s(e.getBoundingClientRect())};n.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(i):i()});return o.observe(e,{box:"border-box"}),()=>{o.unobserve(e)}},Z={passive:!0},Y=typeof window>"u"?!0:"onscrollend"in window,He=(n,l)=>{const e=n.scrollElement;if(!e)return;const t=n.targetWindow;if(!t)return;let s=0;const o=n.options.useScrollendEvent&&Y?()=>{}:qe(t,()=>{l(s,!1)},n.options.isScrollingResetDelay),r=u=>()=>{const{horizontal:f,isRtl:g}=n.options;s=f?e.scrollLeft*(g&&-1||1):e.scrollTop,o(),l(s,u)},i=r(!0),c=r(!1);c(),e.addEventListener("scroll",i,Z);const h=n.options.useScrollendEvent&&Y;return h&&e.addEventListener("scrollend",c,Z),()=>{e.removeEventListener("scroll",i),h&&e.removeEventListener("scrollend",c)}},Ge=(n,l,e)=>{if(l!=null&&l.borderBoxSize){const t=l.borderBoxSize[0];if(t)return Math.round(t[e.options.horizontal?"inlineSize":"blockSize"])}return Math.round(n.getBoundingClientRect()[e.options.horizontal?"width":"height"])},Ke=(n,{adjustments:l=0,behavior:e},t)=>{var s,o;const r=n+l;(o=(s=t.scrollElement)==null?void 0:s.scrollTo)==null||o.call(s,{[t.options.horizontal?"left":"top"]:r,behavior:e})};class Xe{constructor(l){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollToIndexTimeoutId=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let e=null;const t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(s=>{s.forEach(o=>{const r=()=>{this._measureElement(o.target,o)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()})}));return{disconnect:()=>{var s;(s=t())==null||s.disconnect(),e=null},observe:s=>{var o;return(o=t())==null?void 0:o.observe(s,{box:"border-box"})},unobserve:s=>{var o;return(o=t())==null?void 0:o.unobserve(s)}}})(),this.range=null,this.setOptions=e=>{Object.entries(e).forEach(([t,s])=>{typeof s>"u"&&delete e[t]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Be,rangeExtractor:Ue,onChange:()=>{},measureElement:Ge,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...e}},this.notify=e=>{var t,s;(s=(t=this.options).onChange)==null||s.call(t,this,e)},this.maybeNotify=O(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:process.env.NODE_ENV!=="production"&&"maybeNotify",debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var e;const t=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==t){if(this.cleanup(),!t){this.maybeNotify();return}this.scrollElement=t,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((e=this.scrollElement)==null?void 0:e.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,o)=>{this.scrollAdjustments=0,this.scrollDirection=o?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=o,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(e,t)=>{const s=new Map,o=new Map;for(let r=t-1;r>=0;r--){const i=e[r];if(s.has(i.lane))continue;const c=o.get(i.lane);if(c==null||i.end>c.end?o.set(i.lane,i):i.end<c.end&&s.set(i.lane,!0),s.size===this.options.lanes)break}return o.size===this.options.lanes?Array.from(o.values()).sort((r,i)=>r.end===i.end?r.index-i.index:r.end-i.end)[0]:void 0},this.getMeasurementOptions=O(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(e,t,s,o,r)=>(this.pendingMeasuredCacheIndexes=[],{count:e,paddingStart:t,scrollMargin:s,getItemKey:o,enabled:r}),{key:!1}),this.getMeasurements=O(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:e,paddingStart:t,scrollMargin:s,getItemKey:o,enabled:r},i)=>{if(!r)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(u=>{this.itemSizeCache.set(u.key,u.size)}));const c=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const h=this.measurementsCache.slice(0,c);for(let u=c;u<e;u++){const f=o(u),g=this.options.lanes===1?h[u-1]:this.getFurthestMeasurement(h,u),S=g?g.end+this.options.gap:t+s,x=i.get(f),a=typeof x=="number"?x:this.options.estimateSize(u),m=S+a,v=g?g.lane:u%this.options.lanes;h[u]={index:u,start:S,size:a,end:m,key:f,lane:v}}return this.measurementsCache=h,h},{key:process.env.NODE_ENV!=="production"&&"getMeasurements",debug:()=>this.options.debug}),this.calculateRange=O(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,s,o)=>this.range=e.length>0&&t>0?Ze({measurements:e,outerSize:t,scrollOffset:s,lanes:o}):null,{key:process.env.NODE_ENV!=="production"&&"calculateRange",debug:()=>this.options.debug}),this.getVirtualIndexes=O(()=>{let e=null,t=null;const s=this.calculateRange();return s&&(e=s.startIndex,t=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,s,o,r)=>o===null||r===null?[]:e({startIndex:o,endIndex:r,overscan:t,count:s}),{key:process.env.NODE_ENV!=="production"&&"getVirtualIndexes",debug:()=>this.options.debug}),this.indexFromElement=e=>{const t=this.options.indexAttribute,s=e.getAttribute(t);return s?parseInt(s,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this._measureElement=(e,t)=>{const s=this.indexFromElement(e),o=this.measurementsCache[s];if(!o)return;const r=o.key,i=this.elementsCache.get(r);i!==e&&(i&&this.observer.unobserve(i),this.observer.observe(e),this.elementsCache.set(r,e)),e.isConnected&&this.resizeItem(s,this.options.measureElement(e,t,this))},this.resizeItem=(e,t)=>{const s=this.measurementsCache[e];if(!s)return;const o=this.itemSizeCache.get(s.key)??s.size,r=t-o;r!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(s,r,this):s.start<this.getScrollOffset()+this.scrollAdjustments)&&(process.env.NODE_ENV!=="production"&&this.options.debug&&console.info("correction",r),this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=r,behavior:void 0})),this.pendingMeasuredCacheIndexes.push(s.index),this.itemSizeCache=new Map(this.itemSizeCache.set(s.key,t)),this.notify(!1))},this.measureElement=e=>{if(!e){this.elementsCache.forEach((t,s)=>{t.isConnected||(this.observer.unobserve(t),this.elementsCache.delete(s))});return}this._measureElement(e,void 0)},this.getVirtualItems=O(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{const s=[];for(let o=0,r=e.length;o<r;o++){const i=e[o],c=t[i];s.push(c)}return s},{key:process.env.NODE_ENV!=="production"&&"getVirtualItems",debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{const t=this.getMeasurements();if(t.length!==0)return F(t[le(0,t.length-1,s=>F(t[s]).start,e)])},this.getOffsetForAlignment=(e,t,s=0)=>{const o=this.getSize(),r=this.getScrollOffset();t==="auto"&&(t=e>=r+o?"end":"start"),t==="center"?e+=(s-o)/2:t==="end"&&(e-=o);const i=this.options.horizontal?"scrollWidth":"scrollHeight",h=(this.scrollElement?"document"in this.scrollElement?this.scrollElement.document.documentElement[i]:this.scrollElement[i]:0)-o;return Math.max(Math.min(h,e),0)},this.getOffsetForIndex=(e,t="auto")=>{e=Math.max(0,Math.min(e,this.options.count-1));const s=this.measurementsCache[e];if(!s)return;const o=this.getSize(),r=this.getScrollOffset();if(t==="auto")if(s.end>=r+o-this.options.scrollPaddingEnd)t="end";else if(s.start<=r+this.options.scrollPaddingStart)t="start";else return[r,t];const i=t==="end"?s.end+this.options.scrollPaddingEnd:s.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(i,t,s.size),t]},this.isDynamicMode=()=>this.elementsCache.size>0,this.cancelScrollToIndex=()=>{this.scrollToIndexTimeoutId!==null&&this.targetWindow&&(this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId),this.scrollToIndexTimeoutId=null)},this.scrollToOffset=(e,{align:t="start",behavior:s}={})=>{this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(e,t),{adjustments:void 0,behavior:s})},this.scrollToIndex=(e,{align:t="auto",behavior:s}={})=>{e=Math.max(0,Math.min(e,this.options.count-1)),this.cancelScrollToIndex(),s==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size.");const o=this.getOffsetForIndex(e,t);if(!o)return;const[r,i]=o;this._scrollToOffset(r,{adjustments:void 0,behavior:s}),s!=="smooth"&&this.isDynamicMode()&&this.targetWindow&&(this.scrollToIndexTimeoutId=this.targetWindow.setTimeout(()=>{if(this.scrollToIndexTimeoutId=null,this.elementsCache.has(this.options.getItemKey(e))){const[h]=F(this.getOffsetForIndex(e,i));Pe(h,this.getScrollOffset())||this.scrollToIndex(e,{align:i,behavior:s})}else this.scrollToIndex(e,{align:i,behavior:s})}))},this.scrollBy=(e,{behavior:t}={})=>{this.cancelScrollToIndex(),t==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+e,{adjustments:void 0,behavior:t})},this.getTotalSize=()=>{var e;const t=this.getMeasurements();let s;if(t.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((e=t[t.length-1])==null?void 0:e.end)??0;else{const o=Array(this.options.lanes).fill(null);let r=t.length-1;for(;r>=0&&o.some(i=>i===null);){const i=t[r];o[i.lane]===null&&(o[i.lane]=i.end),r--}s=Math.max(...o.filter(i=>i!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(e,{adjustments:t,behavior:s})=>{this.options.scrollToFn(e,{behavior:s,adjustments:t},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(l)}}const le=(n,l,e,t)=>{for(;n<=l;){const s=(n+l)/2|0,o=e(s);if(o<t)n=s+1;else if(o>t)l=s-1;else return s}return n>0?n-1:0};function Ze({measurements:n,outerSize:l,scrollOffset:e,lanes:t}){const s=n.length-1,o=c=>n[c].start;if(n.length<=t)return{startIndex:0,endIndex:s};let r=le(0,s,o,e),i=r;if(t===1)for(;i<s&&n[i].end<e+l;)i++;else if(t>1){const c=Array(t).fill(0);for(;i<s&&c.some(u=>u<e+l);){const u=n[i];c[u.lane]=u.end,i++}const h=Array(t).fill(e+l);for(;r>=0&&h.some(u=>u>=e);){const u=n[r];h[u.lane]=u.start,r--}r=Math.max(0,r-r%t),i=Math.min(s,i+(t-1-i%t))}return{startIndex:r,endIndex:i}}const Q=typeof document<"u"?A.useLayoutEffect:A.useEffect;function Ye(n){const l=A.useReducer(()=>({}),{})[1],e={...n,onChange:(s,o)=>{var r;o?we.flushSync(l):l(),(r=n.onChange)==null||r.call(n,s,o)}},[t]=A.useState(()=>new Xe(e));return t.setOptions(e),Q(()=>t._didMount(),[]),Q(()=>t._willUpdate()),t}function Qe(n){return Ye({observeElementRect:$e,observeElementOffset:He,scrollToFn:Ke,...n})}const ce=n=>n==null?!0:Array.isArray(n)||typeof n=="string"?n.length===0:!1,Je=[],et=[],ae=({data:n=Je,value:l=et,allowMultiple:e,allowNone:t,replaceOnSingle:s=!1,autoSelectOnNone:o=!1,onChange:r})=>{const i=d.useRef(null),c=j.useHeldRef({triggers:[["Shift"]],loose:!0}),h=j.useHeldRef({triggers:[["Control"]],loose:!0}),u=b.useSyncedRef(l),f=b.useSyncedRef(n),g=d.useCallback((a,m)=>{if(u.current=a,a.length===0&&t!==!1)return r(e!==!1?[]:null,m);if(e!==!1)return r(a,m);if(a.length>0)return r(a[0],m)},[r,t,e]);d.useEffect(()=>{let a=f.current;if(Array.isArray(a)||(a=a()),ce(l)&&t===!1&&a.length>0&&o){const m=a[0];i.current=m.key,g([m.key],{entries:[m],clicked:m.key,clickedIndex:0})}},[g,f,l,t]);const S=d.useCallback(a=>{const m=i.current;let v=f.current;Array.isArray(v)||(v=v());let y=[];const C=L.t.toArray(u.current).filter(R=>R!=null);if(e===!1)y=C.includes(a)?[]:[a];else if(h.current.held&&s)C.includes(a)?y=C.filter(R=>R!==a):y=[...C,a];else if(c.current.held&&m!==null){const[R,z]=[v.findIndex(I=>I.key===a),v.findIndex(I=>I.key===m)].sort((I,w)=>I-w),T=v.slice(R,z+1).map(({key:I})=>I);T.slice(1,T.length-1).every(I=>C.includes(I))&&C.includes(a)?y=C.filter(I=>!T.includes(I)):y=[...C,...T],i.current=null}else i.current=a,s?y=C.includes(a)&&C.length===1?[]:[a]:C.includes(a)?y=C.filter(R=>R!==a):y=[...C,a];const M=p.c.unique(y);if(t===!1&&M.length===0)return g(C,{entries:v.filter(({key:R})=>C.includes(R)),clicked:a,clickedIndex:v.findIndex(({key:R})=>R===a)});M.length===0&&(i.current=null),g(M,{entries:v.filter(({key:R})=>y.includes(R)),clicked:a,clickedIndex:v.findIndex(({key:R})=>R===a)})},[u,f,g,e,t]),x=d.useCallback(()=>g([],{entries:[],clicked:null,clickedIndex:0}),[g]);return{onSelect:S,clear:x}},ue=d.createContext({selected:[]}),de=d.createContext({onSelect:()=>{},clear:()=>{},getSelected:()=>[]}),B=()=>d.useContext(ue),he=()=>B().selected,_=()=>d.useContext(de),fe=d.memo(({value:n,children:l,...e})=>{const t=q(),{onSelect:s,clear:o}=ae({...e,value:n,data:t}),r=b.useSyncedRef(n),i=d.useMemo(()=>({selected:L.t.toArray(n)}),[n]),c=d.useMemo(()=>({onSelect:s,clear:o,getSelected:()=>L.t.toArray(r.current)}),[s,o]);return E.jsxRuntimeExports.jsx(de,{value:c,children:E.jsxRuntimeExports.jsx(ue,{value:i,children:l})})});fe.displayName="List.Selector";const tt=fe,me=["ArrowUp"],ge=["ArrowDown"],xe=["Enter"],st=[me,ge,xe],pe=d.createContext({hover:-1,setHover:()=>{}}),U=()=>d.use(pe),nt=({children:n,initialHover:l=-1,disabled:e=!1,onEnter:t})=>{const s=q(),{transformedData:o}=D(),{onSelect:r}=_(),[i,c,h]=b.useCombinedStateAndRef(l),u=d.useRef(l);d.useEffect(()=>{e&&(u.current=i),c(e?-1:u.current)},[e]),d.useEffect(()=>{i>=o.length&&c(0)},[o.length]);const f=d.useRef(null),g=d.useCallback(({triggers:x,stage:a})=>{if(f.current!=null&&(clearInterval(f.current),f.current=null),a!=="start"||e)return;const m=s();if(j.match(x,[xe])){if(h.current===-1)return;t==null||t(m[h.current].key),r==null||r(m[h.current].key);return}const v=()=>{const y=s();j.match(x,[me],{loose:!0})?c(C=>C<=0?y.length-1:C-1):j.match(x,[ge],{loose:!0})&&c(C=>C>=y.length-1?0:C+1)};v(),f.current=setTimeout(()=>{f.current=setInterval(v,100)},200)},[r,e]);j.use({triggers:st,callback:g,loose:!0});const S=d.useMemo(()=>({hover:i,setHover:c}),[i,c]);return E.jsxRuntimeExports.jsx(pe,{value:S,children:n})},Se=d.createContext({hasMore:!1,onFetchMore:()=>{}}),ve=d.createContext({setHasMore:()=>{},setOnFetchMore:()=>{}}),rt=()=>d.use(Se),ot=()=>d.use(ve),it=({children:n})=>{const[l,e]=d.useState(!1),[t,s]=b.useStateRef(()=>{}),o=d.useCallback(()=>{var c;(c=t.current)==null||c.call(t)},[t]),r=d.useMemo(()=>({hasMore:l,onFetchMore:o}),[l,o]),i=d.useMemo(()=>({setHasMore:e,setOnFetchMore:c=>{s(()=>c)}}),[e,s]);return E.jsxRuntimeExports.jsx(Se,{value:r,children:E.jsxRuntimeExports.jsx(ve,{value:i,children:n})})},lt=(n,l,e)=>{var r;const t=n>l?1:-1;let s;const o=n+t*2;p.G.contains({lower:0,upper:e.children.length},o)?s=n+t*2:s=n,(r=e.children[s])==null||r.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})},ct=({itemHeight:n,children:l,overscan:e=0,className:t,...s})=>{var z;const{hasMore:o,onFetchMore:r}=rt(),{hover:i,setHover:c}=U(),{transformedData:h,emptyContent:u,transformed:f,sourceData:g}=D(),S=he(),{onSelect:x}=_(),a=d.useRef(null),m=Qe({count:h.length,getScrollElement:()=>a.current,estimateSize:()=>n,overscan:e}),v=b.usePrevious(h);d.useLayoutEffect(()=>{v==null||v.length===0||h.length>0&&h[0].key!==v[0].key&&(m==null||m.scrollToIndex(0),c(0))},[h]),d.useEffect(()=>{if(a.current==null)return;const T=m.calculateRange();if(T==null)return;const I=p.G.construct(T.startIndex+2,T.endIndex-2);p.G.contains(I,i)||m.scrollToIndex(i)},[i,n]);const y=m.getVirtualItems(),C=(z=y.at(-1))==null?void 0:z.index,M=h.length;if(d.useEffect(()=>{C===M-1&&o&&(r==null||r())},[C,M,o]),n<=0)throw new Error("itemHeight must be greater than 0");const R=h.length===0;return E.jsxRuntimeExports.jsx("div",{ref:a,className:p.CSS(t,p.CSS.BE("list","container"),R&&p.CSS.BM("list","empty")),...s,children:R?u:E.jsxRuntimeExports.jsx("div",{className:p.CSS.BE("list","virtualizer"),style:{height:m.getTotalSize()},children:y.map(({index:T,start:I})=>{const w=h[T];let $=T;return f&&($=g.findIndex(Te=>Te.key===w.key)),l({key:w.key,sourceIndex:$,index:T,onSelect:x,entry:w,selected:S.includes(w.key),hovered:T===i,translate:I})})})})},Ee=({itemHeight:n=50,className:l,children:e,...t})=>{const{transformedData:s,transformed:o,emptyContent:r,sourceData:i}=D(),{hover:c}=U(),{selected:h}=B(),{onSelect:u}=_(),f=d.useRef(null),g=b.usePrevious(c)??0;d.useLayoutEffect(()=>{f.current!=null&&lt(c,g,f.current)},[c,n]);const S=d.useCallback((x,a)=>{let m=i.findIndex(v=>v.key===x.key);return o&&(m=i.findIndex(v=>v.key===x.key)),e({key:x.key,index:a,sourceIndex:m,onSelect:u,entry:x,selected:h.includes(x.key),hovered:a===c})},[e,o,h,c,i]);return E.jsxRuntimeExports.jsx(W.Space,{className:p.CSS(l,p.CSS.BE("list","container")),ref:f,size:0,...t,children:s.length===0?r:E.jsxRuntimeExports.jsx(E.jsxRuntimeExports.Fragment,{children:s.map((x,a)=>S(x,a))})})};Ee.Virtual=ct;const at=({children:n,data:l,emptyContent:e,omit:t})=>{const s=Oe.useMemoCompare(()=>t!=null?l==null?void 0:l.filter(r=>!t.includes(r.key)):l,([r,i],[c,h])=>{let u;return r!=null&&c!=null?u=p.L.unorderedPrimitiveArrays(r,c)===p.L.EQUAL:u=r==c,i===h&&u},[t,l]),o=typeof e=="string"?E.jsxRuntimeExports.jsx(b.Text,{level:"p",children:e}):e;return E.jsxRuntimeExports.jsx(it,{children:E.jsxRuntimeExports.jsx(re,{data:s,emptyContent:o,children:n})})},Ce=d.createContext([]),ye=d.createContext(()=>{}),ut=.9,dt=({children:n,maxHistory:l=500})=>{const[{path:e},{statuses:t},s]=K.use$1({type:V.Aggregator.TYPE,schema:V.aggregatorStateZ,initialState:{statuses:[]}});if(t.length>l){const r=Math.floor(l*ut);s(i=>({...i,statuses:t.slice(0,r)}))}const o=d.useCallback(r=>{const i={time:p.d.now(),key:p.we.create(),...r};s(c=>({...c,statuses:[i,...c.statuses]}))},[s]);return E.jsxRuntimeExports.jsx(Ce,{value:t,children:E.jsxRuntimeExports.jsx(ye,{value:o,children:E.jsxRuntimeExports.jsx(K.Composite,{path:e,children:n})})})},Re=()=>d.use(ye),ht=()=>{const n=Re();return d.useMemo(()=>V.createErrorHandler(n),[n])},ft=p.g$2.seconds(7),mt=p.g$2.seconds(1),gt=({expiration:n=ft,poll:l=mt}={})=>{const e=d.use(Ce),[t,s]=d.useState(new Set),[o,r]=d.useState(()=>p.d.now());d.useEffect(()=>{const u=setInterval(()=>r(p.d.now()),l.milliseconds);return()=>clearInterval(u)},[l.milliseconds]);const i=d.useMemo(()=>{const u=o.sub(n),g=e.filter(({key:S,time:x})=>x.afterEq(u)&&!t.has(S)).reduce((S,x)=>{const a=`${x.variant}:${x.message}`;if(!S.has(a))return S.set(a,{...x,count:1}),S;const m=S.get(a);return S.set(a,{...m,count:m.count+1,time:x.time.after(m.time)?x.time:m.time}),S},new Map);return Array.from(g.values())},[e,n,t,o]),c=b.useSyncedRef(e),h=d.useCallback(u=>{s(f=>{const g=new Set,S=c.current.find(({key:x})=>x===u);return f.has(u)||g.add(u),S!=null&&c.current.filter(({message:a,variant:m})=>a===S.message&&m===S.variant).forEach(a=>g.add(a.key)),g.size==0?f:new Set([...g,...f])})},[]);return{statuses:i,silence:h}},be={info:"var(--pluto-text-color)",error:"var(--pluto-error-z)",warning:"var(--pluto-warning-m1)",success:"var(--pluto-primary-z)",loading:"var(--pluto-text-color)",disabled:"var(--pluto-gray-l8)"},Ie=({variant:n="info",level:l="p",hideIcon:e=!1,className:t,...s})=>{let o;return e||(o=n==="loading"?E.jsxRuntimeExports.jsx(b.y4.Loading,{}):E.jsxRuntimeExports.jsx(b.y4.Circle,{})),E.jsxRuntimeExports.jsx(J.WithIcon,{color:be[n],className:p.CSS(t,p.CSS.B("status-text")),level:l,startIcon:o,...s})},xt=({style:n,...l})=>E.jsxRuntimeExports.jsx(je.Center,{style:n,grow:!0,children:E.jsxRuntimeExports.jsx(Ie,{...l})}),pt=Object.assign(Ie,{Centered:xt});exports.Aggregator=dt;exports.Column=We;exports.Core=Ee;exports.DataProvider=re;exports.Hover=nt;exports.ItemFrame=oe;exports.List=at;exports.Selector=tt;exports.Text=pt;exports.VARIANT_COLORS=be;exports.selectValueIsZero=ce;exports.useAdder=Re;exports.useDataContext=D;exports.useDataUtils=k;exports.useErrorHandler=ht;exports.useGetTransformedData=q;exports.useHoverContext=U;exports.useInfiniteUtils=ot;exports.useNotifications=gt;exports.useSelect=ae;exports.useSelection=he;exports.useSelectionContext=B;exports.useSelectionUtils=_;exports.useSetSourceData=Ae;exports.useSourceData=ne;exports.useTransformedData=ze;exports.useTransforms=ee;
@@ -1 +1 @@
1
- "use strict";const c=require("./jsx-runtime-CITbqOLs.cjs");require("./Text-CLsJyQGy.cjs");const e=require("./css-C7rJrqRi.cjs"),S=require("react");require("./Stack-BbwDtaE6.cjs");const Y=require("./Space-ByFmfiTa.cjs"),_=require("./Pack-80N7XB5O.cjs"),$=require("./Divider-D74_FAXn.cjs"),R=require("./state-DwM4WaEw.cjs"),k=require("./WithIcon-CCnlO2LC.cjs"),g=({size:s="medium",ref:P,value:u,onChange:r,className:T,onFocus:a,selectOnFocus:w=!1,centerPlaceholder:N=!1,placeholder:f,variant:o="outlined",sharp:D=!1,children:L,level:i,onBlur:p,disabled:d,resetOnBlurIfEmpty:W=!1,status:j,shade:q,weight:y,style:m,outlineColor:K,color:U,onlyChangeOnBlur:l=!1,endContent:E,borderWidth:V,borderShade:z=4,...B})=>{const M=S.useRef(""),[n,x]=S.useState(null),b=S.useRef(null),C=S.useRef(!1),I=t=>{C.current=!1,W&&t.target.value===""?r==null||r(M.current):l&&n!=null&&(r==null||r(n)),x(null),p==null||p(t)},Z=t=>{l?x(t.target.value):r==null||r(t.target.value)},A=t=>{l&&x(u),a==null||a(t),M.current=t.target.value},G=()=>{var t;!w||C.current||(C.current=!0,(t=b.current)==null||t.select())},H=t=>{l&&t.key==="Enter"?t.currentTarget.blur():t.key==="Escape"&&(t.currentTarget.blur(),t.stopPropagation())},J=$.useCombinedRefs(P,b),v=e.od.colorZ.safeParse(K),h=v.success&&o=="outlined";o==="preview"&&(d=!0),h&&(m={...m,[e.CSS.var("input-color")]:e.od.rgbString(v.data)});const Q=(u==null||u.length===0)&&n==null,X=o==="natural"?Y.Space:_.Pack;return c.jsxRuntimeExports.jsxs(X,{x:!0,empty:!0,style:m,className:e.CSS(e.CSS.B("input"),e.CSS.disabled(d),i==null&&e.CSS.size(s),q!=null&&e.CSS.shade(q),e.CSS.M(o),e.CSS.sharp(D),h&&e.CSS.BM("input","custom-color"),j!=null&&e.CSS.M(j),T),borderShade:z,borderWidth:V,align:"center",size:s,children:[c.jsxRuntimeExports.jsxs("div",{className:e.CSS(e.CSS.BE("input","internal"),e.CSS.BM("text",i??R.ComponentSizeLevels[s]),e.CSS.M("clickable"),e.CSS.M("outlined"),e.CSS.shade(0)),children:[Q&&c.jsxRuntimeExports.jsx("div",{className:e.CSS(e.CSS.BE("input","placeholder"),N&&e.CSS.M("centered")),children:k.formatChildren(i??R.ComponentSizeLevels[s],f)}),c.jsxRuntimeExports.jsx("input",{ref:J,value:n??u,role:"textbox",onChange:Z,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",onFocus:A,onKeyDown:H,onMouseUp:G,onBlur:I,disabled:d,placeholder:typeof f=="string"?f:void 0,style:{fontWeight:y,color:e.od.cssString(U)},...B}),E!=null&&c.jsxRuntimeExports.jsx("div",{className:e.CSS.BE("input","end-content"),children:k.formatChildren(i??R.ComponentSizeLevels[s],E)})]}),L]})};exports.Text=g;
1
+ "use strict";const c=require("./jsx-runtime-CITbqOLs.cjs");require("./Text-Dw0NDc2A.cjs");const e=require("./css-C7rJrqRi.cjs"),S=require("react");require("./Stack-BbwDtaE6.cjs");const Y=require("./Space-ByFmfiTa.cjs"),_=require("./Pack-80N7XB5O.cjs"),$=require("./Divider-D74_FAXn.cjs"),R=require("./state-DwM4WaEw.cjs"),k=require("./WithIcon-CCnlO2LC.cjs"),g=({size:s="medium",ref:P,value:u,onChange:r,className:T,onFocus:a,selectOnFocus:w=!1,centerPlaceholder:N=!1,placeholder:f,variant:o="outlined",sharp:D=!1,children:L,level:i,onBlur:p,disabled:d,resetOnBlurIfEmpty:W=!1,status:j,shade:q,weight:y,style:m,outlineColor:K,color:U,onlyChangeOnBlur:l=!1,endContent:E,borderWidth:V,borderShade:z=4,...B})=>{const M=S.useRef(""),[n,x]=S.useState(null),b=S.useRef(null),C=S.useRef(!1),I=t=>{C.current=!1,W&&t.target.value===""?r==null||r(M.current):l&&n!=null&&(r==null||r(n)),x(null),p==null||p(t)},Z=t=>{l?x(t.target.value):r==null||r(t.target.value)},A=t=>{l&&x(u),a==null||a(t),M.current=t.target.value},G=()=>{var t;!w||C.current||(C.current=!0,(t=b.current)==null||t.select())},H=t=>{l&&t.key==="Enter"?t.currentTarget.blur():t.key==="Escape"&&(t.currentTarget.blur(),t.stopPropagation())},J=$.useCombinedRefs(P,b),v=e.od.colorZ.safeParse(K),h=v.success&&o=="outlined";o==="preview"&&(d=!0),h&&(m={...m,[e.CSS.var("input-color")]:e.od.rgbString(v.data)});const Q=(u==null||u.length===0)&&n==null,X=o==="natural"?Y.Space:_.Pack;return c.jsxRuntimeExports.jsxs(X,{x:!0,empty:!0,style:m,className:e.CSS(e.CSS.B("input"),e.CSS.disabled(d),i==null&&e.CSS.size(s),q!=null&&e.CSS.shade(q),e.CSS.M(o),e.CSS.sharp(D),h&&e.CSS.BM("input","custom-color"),j!=null&&e.CSS.M(j),T),borderShade:z,borderWidth:V,align:"center",size:s,children:[c.jsxRuntimeExports.jsxs("div",{className:e.CSS(e.CSS.BE("input","internal"),e.CSS.BM("text",i??R.ComponentSizeLevels[s]),e.CSS.M("clickable"),e.CSS.M("outlined"),e.CSS.shade(0)),children:[Q&&c.jsxRuntimeExports.jsx("div",{className:e.CSS(e.CSS.BE("input","placeholder"),N&&e.CSS.M("centered")),children:k.formatChildren(i??R.ComponentSizeLevels[s],f)}),c.jsxRuntimeExports.jsx("input",{ref:J,value:n??u,role:"textbox",onChange:Z,autoCapitalize:"off",autoComplete:"off",autoCorrect:"off",onFocus:A,onKeyDown:H,onMouseUp:G,onBlur:I,disabled:d,placeholder:typeof f=="string"?f:void 0,style:{fontWeight:y,color:e.od.cssString(U)},...B}),E!=null&&c.jsxRuntimeExports.jsx("div",{className:e.CSS.BE("input","end-content"),children:k.formatChildren(i??R.ComponentSizeLevels[s],E)})]}),L]})};exports.Text=g;
@@ -9,9 +9,9 @@ import { a as Fe, C as Ne } from "./ContextMenu-DLM5eLLG.js";
9
9
  import { d as J } from "./dimensions-FnMV2fyj.js";
10
10
  import "./state-DAFH2z9y.js";
11
11
  import { W as ue } from "./WithIcon-B7VPBqA2.js";
12
- import { c as Ve, C as Le } from "./Provider-CAR23fYq.js";
13
- import { q as We, A as Be, s as Pe } from "./provider-CQqS-teQ.js";
14
- import { u as Ue } from "./font-Cy9UYjyY.js";
12
+ import { c as Ve, C as Le } from "./Provider-CLPfWTcl.js";
13
+ import { q as We, A as Be, s as Pe } from "./provider-gW90qzEG.js";
14
+ import { u as Ue } from "./font-Csp00pQP.js";
15
15
  import { flushSync as $e } from "react-dom";
16
16
  import { v as ee, m as W, a as He } from "./hooks-u_TgL0Xi.js";
17
17
  import { t as q } from "./array-CPtP5Oov.js";
@@ -5,8 +5,8 @@ import { t as ct } from "./array-CPtP5Oov.js";
5
5
  import { createContext as ut, use as at, useState as q, useRef as F, useCallback as _, createElement as it, useId as mt, cloneElement as J, isValidElement as dt } from "react";
6
6
  import { C as K, a as ft } from "./state-DAFH2z9y.js";
7
7
  import { W as pt } from "./WithIcon-B7VPBqA2.js";
8
- import { u as xt } from "./Provider-CAR23fYq.js";
9
- import "./provider-CQqS-teQ.js";
8
+ import { u as xt } from "./Provider-CLPfWTcl.js";
9
+ import "./provider-gW90qzEG.js";
10
10
  import { createPortal as Tt } from "react-dom";
11
11
  import "./Stack-D50qN0Vu.js";
12
12
  import { a as yt } from "./hooks-u_TgL0Xi.js";
@@ -1 +1 @@
1
- "use strict";const p=require("./jsx-runtime-CITbqOLs.cjs"),_=require("./Divider-D74_FAXn.cjs"),e=require("./css-C7rJrqRi.cjs"),re=require("./array-CZHEGH95.cjs"),u=require("react"),A=require("./state-DwM4WaEw.cjs"),le=require("./WithIcon-CCnlO2LC.cjs"),ce=require("./Provider-B1j7nPL9.cjs");require("./provider-B8IM-N4g.cjs");const ue=require("react-dom");require("./Stack-BbwDtaE6.cjs");const ie=require("./hooks-B92WH57y.cjs"),ae=require("./Text-DTPuORh0.cjs"),de={delay:e.g$2.milliseconds(750),startAccelerating:()=>{}},k=u.createContext(de),H=()=>u.use(k),me=({delay:t=e.g$2.milliseconds(700),accelerate:n=!0,acceleratedDelay:o=e.g$2.minutes(60),accelerationDelay:r=e.g$2.seconds(0),children:a})=>{const[m,s]=u.useState(!1),c=u.useRef(null),S=u.useCallback(()=>{m||!n||(s(!0),c.current=setTimeout(()=>{s(!1)},new e.g$2(r).milliseconds))},[m,r]);return p.jsxRuntimeExports.jsx(k,{value:{delay:m?o:t,startAccelerating:S},children:a})},Se=t=>({key:n,...o})=>u.createElement(t,{...o,key:n}),W=t=>typeof t=="function",fe=150,Y=["top","bottom"],G=["left","right"],U=[...G,...Y],X=[...U,"center"],xe={[e.K$1.xyToString(e.K$1.TOP_RIGHT)]:(t,n)=>e.K.translate(t,"x",-e.Pt.width(n)),[e.K$1.xyToString(e.K$1.TOP_LEFT)]:(t,n)=>e.K.translate(t,"x",e.Pt.width(n)),[e.K$1.xyToString(e.K$1.BOTTOM_RIGHT)]:(t,n)=>e.K.translate(t,"x",-e.Pt.width(n)),[e.K$1.xyToString(e.K$1.BOTTOM_LEFT)]:(t,n)=>e.K.translate(t,"x",e.Pt.width(n))},q=(t,n,o)=>{for(const r of o)if(Math.abs(e.Pt.loc(n,r)-e.Pt.loc(t,r))>fe)return r;return o[0]},V=(t,n,o)=>{const r=e.K$1.location.safeParse(t),a=s=>{let c;return s==="center"?c=U:e.K$1.isX(s)?c=["center",...Y]:c=["center",...G],e.K$1.construct(q(n,o,c))};if(r.success)return e.K$1.constructXY(r.data,a(r.data));if(t!=null){const s={...t};return s.x==null&&s.y!=null?s.x=a(e.K$1.construct(s.y)):s.y==null&&s.x!=null?s.y=a(e.K$1.construct(s.x)):s.x==null&&s.y==null&&(s.x=q(n,o,X),s.y=a(e.K$1.construct(s.x))),e.K$1.constructXY(s)}const m=q(n,o,X);return e.K$1.constructXY(m,a(m))},pe=(t,n)=>{let o=t;for(;o!=null;){if(o.id===n)return o;o=o.parentElement}return t},J=({delay:t,children:n,location:o,hide:r=!1})=>{const{startAccelerating:a,delay:m}=H(),s=new e.g$2(t??m),[c,S,R]=_.useCombinedStateAndRef(null),[K,y]=u.useState(""),E=u.useRef(null),f=u.useId(),d=u.useRef(null),g=u.useRef(null),T=u.useCallback(l=>{l==null&&R.current==null||g.current!=null||(l!=null?(S(l),g.current=setTimeout(()=>{y(e.CSS.M("loaded")),g.current=null},1)):(y(""),g.current=setTimeout(()=>{S(null),g.current=null},500)))},[]),L=u.useCallback((l,x)=>{var D,F,Z;if(!x||r)return(D=d.current)==null||D.call(d),T(null);a();const i=e.Pt.construct(pe(l.target,f));e.Pt.contains(i,e.K.construct(l))||((F=d.current)==null||F.call(d),T(null));const B=e.Pt.construct(document.documentElement),P=V(o,i,B);let j=e.Pt.xyLoc(i,P);const N=xe[e.K$1.xyToString(P)];N!=null&&(j=N(j,i));const C=e.Pt.construct(document.body);T({location:P,position:e.K.translate(j,e.K.scale(e.Pt.topLeft(C),-1)),triggerDims:e.Pt.dims(i)}),(Z=d.current)==null||Z.call(d);const I=M=>{const oe=e.K.construct(M);e.Pt.contains(i,oe)||(T(null),document.removeEventListener("mousemove",I),d.current=null,E.current!=null&&clearTimeout(E.current))};document.addEventListener("mousemove",I),d.current=()=>document.removeEventListener("mousemove",I),document.addEventListener("mousedown",()=>{var M;T(null),(M=d.current)==null||M.call(d)},{once:!0})},[a,o,r,f,s.milliseconds]);r&&c!=null&&T(null);const v=u.useCallback(l=>{E.current=setTimeout(()=>L(l,!0),s.milliseconds)},[L,s.milliseconds]),O=u.useCallback(l=>{E.current!=null&&clearTimeout(E.current),L(l,!1)},[L]),[$,b]=n,h=document.body;return p.jsxRuntimeExports.jsxs(p.jsxRuntimeExports.Fragment,{children:[c!=null&&ue.createPortal(p.jsxRuntimeExports.jsx("div",{className:e.CSS(e.CSS.B("tooltip"),e.CSS.loc(c.location.x),e.CSS.loc(c.location.y),K),style:{[e.CSS.var("pos-x")]:e.CSS.px(c.position.x),[e.CSS.var("pos-y")]:e.CSS.px(c.position.y)},children:W($)?$(c):Q($)},f),h),u.cloneElement(b,{id:f,onMouseEnter:l=>{var x,i;v(l),(i=(x=b.props).onMouseEnter)==null||i.call(x,l)},onMouseLeave:l=>{var x,i;O(l),(i=(x=b.props).onMouseLeave)==null||i.call(x,l)},onMouseDown:u.useCallback(l=>{var x,i;O(l),(i=(x=b.props).onMouseDown)==null||i.call(x,l)},[L])})]})},Q=t=>typeof t=="string"||typeof t=="number"||!u.isValidElement(t)?p.jsxRuntimeExports.jsx(_.Text,{level:"small",children:t}):t,w=t=>{const n=({tooltipDelay:o,tooltip:r,tooltipLocation:a,...m})=>{const s=p.jsxRuntimeExports.jsx(t,{...m});return r==null?s:p.jsxRuntimeExports.jsxs(J,{delay:o,location:a,children:[r,s]})};return n.displayName=`Tooltip.Wrap(${t.displayName??t.name})`,n},z=w(({size:t,variant:n="filled",type:o="button",className:r,children:a,iconSpacing:m,sharp:s=!1,disabled:c=!1,loading:S=!1,level:R,triggers:K,startIcon:y=[],onClickDelay:E=0,onClick:f,color:d,status:g,style:T,onMouseDown:L,shade:v=0,textShade:O,tabIndex:$,...b})=>{n=="outlined"&&v==null&&(v=0);const h=e.g$2.fromMilliseconds(E);S&&(y=[...re.t.toArray(y),p.jsxRuntimeExports.jsx(_.y4.Loading,{},"loader")]);const l=c||S;m??(m=t==="small"?"small":"medium"),n=="shadow"&&(n="text");const x=C=>{if(!(l||n==="preview")&&h.isZero)return f==null?void 0:f(C)},i=u.useRef(null),B=C=>{$==-1&&C.preventDefault(),L==null||L(C),!(l||n==="preview"||h.isZero)&&(document.addEventListener("mouseup",()=>i.current!=null&&clearTimeout(i.current)),i.current=setTimeout(()=>{f==null||f(C),i.current=null},h.milliseconds))};ie.use({triggers:K,callback:u.useCallback(({stage:C})=>{C!=="end"||l||n==="preview"||x(new MouseEvent("click"))},[x,l])});let P=T;const j=e.od.colorZ.safeParse(d),N=j.success&&(n==="filled"||n==="outlined");if(N){const C=ce.use();P={...P,[e.CSS.var("btn-color")]:e.od.rgbString(j.data),[e.CSS.var("btn-text-color")]:e.od.rgbCSS(e.od.pickByContrast(j.data,C.colors.text,C.colors.textInverted))}}return h.isZero||(P={...P,[e.CSS.var("btn-delay")]:`${h.seconds.toString()}s`}),t==null&&R!=null?t=A.LevelComponentSizes[R]:t!=null&&R==null?R=A.ComponentSizeLevels[t]:t??(t="medium"),p.jsxRuntimeExports.jsx(le.WithIcon,{el:"button",className:e.CSS(e.CSS.B("btn"),e.CSS.M("clickable"),e.CSS.size(t),e.CSS.sharp(s),e.CSS.shade(v),n!=="preview"&&e.CSS.disabled(l),g!=null&&e.CSS.M(g),e.CSS.M(n),N&&e.CSS.BM("btn","custom-color"),r),tabIndex:$,type:o,level:R??A.ComponentSizeLevels[t],size:m,onClick:x,onMouseDown:B,noWrap:!0,style:P,startIcon:y,color:d,...b,shade:O,children:a})}),ge=(t,n,o,r)=>n===!0?"var(--pluto-gray-l7)":o!=null?e.od.cssString(o):t==="filled"?"var(--pluto-text-on-primary)":"var(--pluto-text-color)",ee=w(({ref:t,children:n,className:o,variant:r="text",size:a="medium",sharp:m=!1,disabled:s=!1,loading:c=!1,onClick:S,shade:R=0,color:K,tabIndex:y,onMouseDown:E,triggerIndicator:f,...d})=>{c&&(n=p.jsxRuntimeExports.jsx(_.y4.Loading,{}));const g=s||c;return p.jsxRuntimeExports.jsxs("button",{ref:t,className:e.clsx(o,e.CSS.B("btn"),e.CSS.M("clickable"),e.CSS.B("btn-icon"),e.CSS.size(a),e.CSS.sharp(m),e.CSS.M(r),e.CSS.disabled(g),e.CSS.shade(R)),onClick:g?void 0:S,onMouseDown:T=>{y==-1&&T.preventDefault(),E==null||E(T)},tabIndex:y,...d,children:[f&&p.jsxRuntimeExports.jsx("div",{className:e.CSS.B("trigger-indicator"),children:p.jsxRuntimeExports.jsx(ae.Text,{trigger:f,level:"small"})}),typeof n=="string"?n:u.cloneElement(n,{color:ge(r,g,K),fill:"currentColor",...n.props})]})}),te=t=>({value:n,onClick:o,onChange:r,checkedVariant:a="filled",uncheckedVariant:m="outlined",rightClickToggle:s=!1,...c})=>p.jsxRuntimeExports.jsx(t,{...c,checked:n,onClick:S=>{o==null||o(S),!s&&r(!n)},onContextMenu:S=>{S.preventDefault(),S.stopPropagation(),s&&r(!n)},className:e.CSS(e.CSS.B("btn-toggle"),c.className),variant:n?a:m}),ne=te(z);ne.displayName="ButtonToggle";const se=te(ee);se.displayName="ButtonToggleIcon";exports.Button=z;exports.Config=me;exports.Dialog=J;exports.Icon=ee;exports.Toggle=ne;exports.ToggleIcon=se;exports.chooseLocation=V;exports.componentRenderProp=Se;exports.formatTip=Q;exports.isRenderProp=W;exports.useConfig=H;exports.wrap=w;
1
+ "use strict";const p=require("./jsx-runtime-CITbqOLs.cjs"),_=require("./Divider-D74_FAXn.cjs"),e=require("./css-C7rJrqRi.cjs"),re=require("./array-CZHEGH95.cjs"),u=require("react"),A=require("./state-DwM4WaEw.cjs"),le=require("./WithIcon-CCnlO2LC.cjs"),ce=require("./Provider-s70PZ9lg.cjs");require("./provider-YWPkhTn6.cjs");const ue=require("react-dom");require("./Stack-BbwDtaE6.cjs");const ie=require("./hooks-B92WH57y.cjs"),ae=require("./Text-DTPuORh0.cjs"),de={delay:e.g$2.milliseconds(750),startAccelerating:()=>{}},k=u.createContext(de),H=()=>u.use(k),me=({delay:t=e.g$2.milliseconds(700),accelerate:n=!0,acceleratedDelay:o=e.g$2.minutes(60),accelerationDelay:r=e.g$2.seconds(0),children:a})=>{const[m,s]=u.useState(!1),c=u.useRef(null),S=u.useCallback(()=>{m||!n||(s(!0),c.current=setTimeout(()=>{s(!1)},new e.g$2(r).milliseconds))},[m,r]);return p.jsxRuntimeExports.jsx(k,{value:{delay:m?o:t,startAccelerating:S},children:a})},Se=t=>({key:n,...o})=>u.createElement(t,{...o,key:n}),W=t=>typeof t=="function",fe=150,Y=["top","bottom"],G=["left","right"],U=[...G,...Y],X=[...U,"center"],xe={[e.K$1.xyToString(e.K$1.TOP_RIGHT)]:(t,n)=>e.K.translate(t,"x",-e.Pt.width(n)),[e.K$1.xyToString(e.K$1.TOP_LEFT)]:(t,n)=>e.K.translate(t,"x",e.Pt.width(n)),[e.K$1.xyToString(e.K$1.BOTTOM_RIGHT)]:(t,n)=>e.K.translate(t,"x",-e.Pt.width(n)),[e.K$1.xyToString(e.K$1.BOTTOM_LEFT)]:(t,n)=>e.K.translate(t,"x",e.Pt.width(n))},q=(t,n,o)=>{for(const r of o)if(Math.abs(e.Pt.loc(n,r)-e.Pt.loc(t,r))>fe)return r;return o[0]},V=(t,n,o)=>{const r=e.K$1.location.safeParse(t),a=s=>{let c;return s==="center"?c=U:e.K$1.isX(s)?c=["center",...Y]:c=["center",...G],e.K$1.construct(q(n,o,c))};if(r.success)return e.K$1.constructXY(r.data,a(r.data));if(t!=null){const s={...t};return s.x==null&&s.y!=null?s.x=a(e.K$1.construct(s.y)):s.y==null&&s.x!=null?s.y=a(e.K$1.construct(s.x)):s.x==null&&s.y==null&&(s.x=q(n,o,X),s.y=a(e.K$1.construct(s.x))),e.K$1.constructXY(s)}const m=q(n,o,X);return e.K$1.constructXY(m,a(m))},pe=(t,n)=>{let o=t;for(;o!=null;){if(o.id===n)return o;o=o.parentElement}return t},J=({delay:t,children:n,location:o,hide:r=!1})=>{const{startAccelerating:a,delay:m}=H(),s=new e.g$2(t??m),[c,S,R]=_.useCombinedStateAndRef(null),[K,y]=u.useState(""),E=u.useRef(null),f=u.useId(),d=u.useRef(null),g=u.useRef(null),T=u.useCallback(l=>{l==null&&R.current==null||g.current!=null||(l!=null?(S(l),g.current=setTimeout(()=>{y(e.CSS.M("loaded")),g.current=null},1)):(y(""),g.current=setTimeout(()=>{S(null),g.current=null},500)))},[]),L=u.useCallback((l,x)=>{var D,F,Z;if(!x||r)return(D=d.current)==null||D.call(d),T(null);a();const i=e.Pt.construct(pe(l.target,f));e.Pt.contains(i,e.K.construct(l))||((F=d.current)==null||F.call(d),T(null));const B=e.Pt.construct(document.documentElement),P=V(o,i,B);let j=e.Pt.xyLoc(i,P);const N=xe[e.K$1.xyToString(P)];N!=null&&(j=N(j,i));const C=e.Pt.construct(document.body);T({location:P,position:e.K.translate(j,e.K.scale(e.Pt.topLeft(C),-1)),triggerDims:e.Pt.dims(i)}),(Z=d.current)==null||Z.call(d);const I=M=>{const oe=e.K.construct(M);e.Pt.contains(i,oe)||(T(null),document.removeEventListener("mousemove",I),d.current=null,E.current!=null&&clearTimeout(E.current))};document.addEventListener("mousemove",I),d.current=()=>document.removeEventListener("mousemove",I),document.addEventListener("mousedown",()=>{var M;T(null),(M=d.current)==null||M.call(d)},{once:!0})},[a,o,r,f,s.milliseconds]);r&&c!=null&&T(null);const v=u.useCallback(l=>{E.current=setTimeout(()=>L(l,!0),s.milliseconds)},[L,s.milliseconds]),O=u.useCallback(l=>{E.current!=null&&clearTimeout(E.current),L(l,!1)},[L]),[$,b]=n,h=document.body;return p.jsxRuntimeExports.jsxs(p.jsxRuntimeExports.Fragment,{children:[c!=null&&ue.createPortal(p.jsxRuntimeExports.jsx("div",{className:e.CSS(e.CSS.B("tooltip"),e.CSS.loc(c.location.x),e.CSS.loc(c.location.y),K),style:{[e.CSS.var("pos-x")]:e.CSS.px(c.position.x),[e.CSS.var("pos-y")]:e.CSS.px(c.position.y)},children:W($)?$(c):Q($)},f),h),u.cloneElement(b,{id:f,onMouseEnter:l=>{var x,i;v(l),(i=(x=b.props).onMouseEnter)==null||i.call(x,l)},onMouseLeave:l=>{var x,i;O(l),(i=(x=b.props).onMouseLeave)==null||i.call(x,l)},onMouseDown:u.useCallback(l=>{var x,i;O(l),(i=(x=b.props).onMouseDown)==null||i.call(x,l)},[L])})]})},Q=t=>typeof t=="string"||typeof t=="number"||!u.isValidElement(t)?p.jsxRuntimeExports.jsx(_.Text,{level:"small",children:t}):t,w=t=>{const n=({tooltipDelay:o,tooltip:r,tooltipLocation:a,...m})=>{const s=p.jsxRuntimeExports.jsx(t,{...m});return r==null?s:p.jsxRuntimeExports.jsxs(J,{delay:o,location:a,children:[r,s]})};return n.displayName=`Tooltip.Wrap(${t.displayName??t.name})`,n},z=w(({size:t,variant:n="filled",type:o="button",className:r,children:a,iconSpacing:m,sharp:s=!1,disabled:c=!1,loading:S=!1,level:R,triggers:K,startIcon:y=[],onClickDelay:E=0,onClick:f,color:d,status:g,style:T,onMouseDown:L,shade:v=0,textShade:O,tabIndex:$,...b})=>{n=="outlined"&&v==null&&(v=0);const h=e.g$2.fromMilliseconds(E);S&&(y=[...re.t.toArray(y),p.jsxRuntimeExports.jsx(_.y4.Loading,{},"loader")]);const l=c||S;m??(m=t==="small"?"small":"medium"),n=="shadow"&&(n="text");const x=C=>{if(!(l||n==="preview")&&h.isZero)return f==null?void 0:f(C)},i=u.useRef(null),B=C=>{$==-1&&C.preventDefault(),L==null||L(C),!(l||n==="preview"||h.isZero)&&(document.addEventListener("mouseup",()=>i.current!=null&&clearTimeout(i.current)),i.current=setTimeout(()=>{f==null||f(C),i.current=null},h.milliseconds))};ie.use({triggers:K,callback:u.useCallback(({stage:C})=>{C!=="end"||l||n==="preview"||x(new MouseEvent("click"))},[x,l])});let P=T;const j=e.od.colorZ.safeParse(d),N=j.success&&(n==="filled"||n==="outlined");if(N){const C=ce.use();P={...P,[e.CSS.var("btn-color")]:e.od.rgbString(j.data),[e.CSS.var("btn-text-color")]:e.od.rgbCSS(e.od.pickByContrast(j.data,C.colors.text,C.colors.textInverted))}}return h.isZero||(P={...P,[e.CSS.var("btn-delay")]:`${h.seconds.toString()}s`}),t==null&&R!=null?t=A.LevelComponentSizes[R]:t!=null&&R==null?R=A.ComponentSizeLevels[t]:t??(t="medium"),p.jsxRuntimeExports.jsx(le.WithIcon,{el:"button",className:e.CSS(e.CSS.B("btn"),e.CSS.M("clickable"),e.CSS.size(t),e.CSS.sharp(s),e.CSS.shade(v),n!=="preview"&&e.CSS.disabled(l),g!=null&&e.CSS.M(g),e.CSS.M(n),N&&e.CSS.BM("btn","custom-color"),r),tabIndex:$,type:o,level:R??A.ComponentSizeLevels[t],size:m,onClick:x,onMouseDown:B,noWrap:!0,style:P,startIcon:y,color:d,...b,shade:O,children:a})}),ge=(t,n,o,r)=>n===!0?"var(--pluto-gray-l7)":o!=null?e.od.cssString(o):t==="filled"?"var(--pluto-text-on-primary)":"var(--pluto-text-color)",ee=w(({ref:t,children:n,className:o,variant:r="text",size:a="medium",sharp:m=!1,disabled:s=!1,loading:c=!1,onClick:S,shade:R=0,color:K,tabIndex:y,onMouseDown:E,triggerIndicator:f,...d})=>{c&&(n=p.jsxRuntimeExports.jsx(_.y4.Loading,{}));const g=s||c;return p.jsxRuntimeExports.jsxs("button",{ref:t,className:e.clsx(o,e.CSS.B("btn"),e.CSS.M("clickable"),e.CSS.B("btn-icon"),e.CSS.size(a),e.CSS.sharp(m),e.CSS.M(r),e.CSS.disabled(g),e.CSS.shade(R)),onClick:g?void 0:S,onMouseDown:T=>{y==-1&&T.preventDefault(),E==null||E(T)},tabIndex:y,...d,children:[f&&p.jsxRuntimeExports.jsx("div",{className:e.CSS.B("trigger-indicator"),children:p.jsxRuntimeExports.jsx(ae.Text,{trigger:f,level:"small"})}),typeof n=="string"?n:u.cloneElement(n,{color:ge(r,g,K),fill:"currentColor",...n.props})]})}),te=t=>({value:n,onClick:o,onChange:r,checkedVariant:a="filled",uncheckedVariant:m="outlined",rightClickToggle:s=!1,...c})=>p.jsxRuntimeExports.jsx(t,{...c,checked:n,onClick:S=>{o==null||o(S),!s&&r(!n)},onContextMenu:S=>{S.preventDefault(),S.stopPropagation(),s&&r(!n)},className:e.CSS(e.CSS.B("btn-toggle"),c.className),variant:n?a:m}),ne=te(z);ne.displayName="ButtonToggle";const se=te(ee);se.displayName="ButtonToggleIcon";exports.Button=z;exports.Config=me;exports.Dialog=J;exports.Icon=ee;exports.Toggle=ne;exports.ToggleIcon=se;exports.chooseLocation=V;exports.componentRenderProp=Se;exports.formatTip=Q;exports.isRenderProp=W;exports.useConfig=H;exports.wrap=w;
package/dist/button.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-BgKH42un.cjs");exports.Button=e.external;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-Bojct8Fy.cjs");exports.Button=e.external;
package/dist/button.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e } from "./external-DuvwfKLw.js";
1
+ import { e } from "./external-Dm9rg2x7.js";
2
2
  export {
3
3
  e as Button
4
4
  };
package/dist/color.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-D8mHEAIG.cjs");exports.Color=e.external;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-Cxwmal3D.cjs");exports.Color=e.external;
package/dist/color.js CHANGED
@@ -1,4 +1,4 @@
1
- import { e } from "./external-firJ8w9n.js";
1
+ import { e } from "./external-69bqTAcN.js";
2
2
  export {
3
3
  e as Color
4
4
  };
@@ -2,7 +2,7 @@ var z = Object.defineProperty;
2
2
  var H = (l, t, e) => t in l ? z(l, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : l[t] = e;
3
3
  var a = (l, t, e) => H(l, typeof t != "symbol" ? t + "" : t, e);
4
4
  import { P as n, A as C, K as u, q as M, o as y, c as V, C as Z } from "./css-DjQu2Qyf.js";
5
- import { h as _, j as $, k as J, m as Q, n as j, L as tt } from "./provider-CQqS-teQ.js";
5
+ import { h as _, j as $, k as J, m as Q, n as j, L as tt } from "./provider-gW90qzEG.js";
6
6
  import { o as N, _ as et, b as I, g as st } from "./state-DAFH2z9y.js";
7
7
  import { a as X } from "./dimensions-FnMV2fyj.js";
8
8
  const it = N({
@@ -773,7 +773,7 @@ const S = 2, f = 2, E = class E {
773
773
  }
774
774
  };
775
775
  // The default characters to include in the atlas.
776
- a(E, "DEFAULT_CHARS", "0123456789.:-umsNa∞ᴇ");
776
+ a(E, "DEFAULT_CHARS", "0123456789.:-µmsNa∞ᴇ");
777
777
  let v = E;
778
778
  class ut {
779
779
  constructor() {
@@ -1,4 +1,4 @@
1
- "use strict";var z=Object.defineProperty;var Z=(l,t,e)=>t in l?z(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e;var n=(l,t,e)=>Z(l,typeof t!="symbol"?t+"":t,e);const a=require("./css-C7rJrqRi.cjs"),u=require("./provider-B8IM-N4g.cjs"),_=require("./state-DwM4WaEw.cjs"),B=require("./dimensions-BmlCx5q4.cjs"),G=_.object({include:_.string().array().optional(),exclude:_.string().array().optional(),level:_._enum(u.g.LOG_LEVELS).optional().default("info")}),b="alamos-provider";class S extends u.Composite{constructor(){super(...arguments);n(this,"schema",G)}afterUpdate(e){if(e.getOptional(b)!=null)return;const i=[],{include:r,exclude:h,level:o}=this.state;(r!=null||h!=null)&&i.push(u.g.logLevelKeyFiler({include:r,exclude:h})),o!=null&&i.push(u.g.logThresholdFilter(o)),i.length===0&&i.push(()=>!1),this.internal.ins=new u.g.Instrumentation({key:"aether",logger:new u.g.Logger({filters:i})}),e.set(b,this.internal.ins)}}n(S,"TYPE","alamos.Provider");const Y=(l,t)=>{const e=l.get(b);if(e==null)throw new Error("No instrumentation provider");return t==null?e:e.child(t)},$={[S.TYPE]:S},C=(l,t)=>a.Pt.construct(a.Pt.left(l)-t.x,a.Pt.top(l)-t.y,a.Pt.width(l)+t.x*2,a.Pt.height(l)+t.y*2);class T{constructor(t,e,s,i=a.A.XY.IDENTITY){n(this,"scale_");n(this,"wrapped");n(this,"atlasRegistry");n(this,"cachedFont",null);n(this,"cachedFillStyle",null);n(this,"cachedStrokeStyle",null);n(this,"cachedLineWidth",null);n(this,"cachedGlobalAlpha",null);n(this,"cachedTextAlign",null);n(this,"cachedTextBaseline",null);n(this,"cachedLineCap",null);n(this,"cachedLineJoin",null);n(this,"cachedMiterLimit",null);n(this,"dpr");this.wrapped=t,this.scale_=i,this.atlasRegistry=e,this.dpr=s}get fontStretch(){return this.wrapped.fontStretch}set fontStretch(t){this.wrapped.fontStretch=t}get fontVariantCaps(){return this.wrapped.fontVariantCaps}set fontVariantCaps(t){this.wrapped.fontVariantCaps=t}isContextLost(){return this.wrapped.isContextLost()}get wordSpacing(){return this.wrapped.wordSpacing}set wordSpacing(t){this.wrapped.wordSpacing=t}get letterSpacing(){return this.wrapped.letterSpacing}set letterSpacing(t){this.wrapped.letterSpacing=t}get textRendering(){return this.wrapped.textRendering}set textRendering(t){this.wrapped.textRendering=t}checkAtlasFillStyle(t=!1){return t&&typeof this.fillStyle=="string"?[!0,this.fillStyle]:(t&&console.warn("attempted to use a text atlas with a gradient fill style. This is not supported. Falling back to default canvas fill."),[!1,null])}reset(){this.wrapped.reset()}applyScale(t){return new T(this,this.atlasRegistry,this.dpr,t)}get canvas(){return this.wrapped.canvas}get miterLimit(){return this.cachedMiterLimit??this.wrapped.miterLimit}set miterLimit(t){const e=this.scale_.x.dim(t);e!==this.cachedMiterLimit&&(this.cachedMiterLimit=e,this.wrapped.miterLimit=e)}get globalAlpha(){return this.cachedGlobalAlpha??this.wrapped.globalAlpha}set globalAlpha(t){t!==this.cachedGlobalAlpha&&(this.cachedGlobalAlpha=t,this.wrapped.globalAlpha=t)}get globalCompositeOperation(){return this.wrapped.globalCompositeOperation}set globalCompositeOperation(t){this.wrapped.globalCompositeOperation=t}get fillStyle(){return this.cachedFillStyle??this.wrapped.fillStyle}set fillStyle(t){t!==this.cachedFillStyle&&(this.cachedFillStyle=t,this.wrapped.fillStyle=t)}get strokeStyle(){return this.cachedStrokeStyle??this.wrapped.strokeStyle}set strokeStyle(t){t!==this.cachedStrokeStyle&&(this.cachedStrokeStyle=t,this.wrapped.strokeStyle=t)}drawImage(t,e,s,i,r,h,o,c,d){this.wrapped.drawImage(t,e,s,i,r,h!=null?this.scale_.x.pos(h):h,o!=null?this.scale_.y.pos(o):o,c!=null?this.scale_.x.dim(c):c,d!=null?this.scale_.y.dim(d):d)}beginPath(){this.wrapped.beginPath()}clip(t,e){this.wrapped.clip(t,e)}fill(t,e){if(t==null)return this.wrapped.fill();this.wrapped.fill(t,e)}isPointInPath(t,e,s,i){return this.wrapped.isPointInPath(t,e,s,i)}isPointInStroke(t,e,s){return this.wrapped.isPointInStroke(t,e,s)}stroke(t){if(t==null)return this.wrapped.stroke();this.wrapped.stroke(t)}createConicGradient(t,e,s){return this.wrapped.createConicGradient(t,e,s)}createLinearGradient(t,e,s,i){return this.wrapped.createLinearGradient(t,e,s,i)}createPattern(t,e){return this.wrapped.createPattern(t,e)}createRadialGradient(t,e,s,i,r,h){return this.wrapped.createRadialGradient(t,e,s,i,r,h)}get filter(){return this.wrapped.filter}set filter(t){this.wrapped.filter=t}createImageData(t,e,s){return this.wrapped.createImageData(t,e,s)}getImageData(t,e,s,i,r){return this.wrapped.getImageData(t,e,s,i,r)}putImageData(t,e,s,i,r,h,o){this.wrapped.putImageData(t,e,s,i,r,h,o)}get imageSmoothingEnabled(){return this.wrapped.imageSmoothingEnabled}set imageSmoothingEnabled(t){this.wrapped.imageSmoothingEnabled=t}get imageSmoothingQuality(){return this.wrapped.imageSmoothingQuality}set imageSmoothingQuality(t){this.wrapped.imageSmoothingQuality=t}arc(t,e,s,i,r,h){this.wrapped.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,h)}arcTo(t,e,s,i,r){this.wrapped.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,h){this.wrapped.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(h))}closePath(){this.wrapped.closePath()}ellipse(t,e,s,i,r,h,o,c){this.wrapped.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,h,o,c)}lineTo(t,e){this.wrapped.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.wrapped.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.wrapped.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.wrapped.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){this.wrapped.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),typeof r=="number"?this.scale_.x.dim(r):r)}get lineCap(){return this.cachedLineCap??this.wrapped.lineCap}set lineCap(t){t!==this.cachedLineCap&&(this.cachedLineCap=t,this.wrapped.lineCap=t)}get lineDashOffset(){return this.wrapped.lineDashOffset}set lineDashOffset(t){this.wrapped.lineDashOffset=this.scale_.x.dim(t)}get lineJoin(){return this.cachedLineJoin??this.wrapped.lineJoin}set lineJoin(t){t!==this.cachedLineJoin&&(this.cachedLineJoin=t,this.wrapped.lineJoin=t)}get lineWidth(){return this.cachedLineWidth??this.wrapped.lineWidth}set lineWidth(t){const e=this.scale_.x.dim(t);e!==this.cachedLineWidth&&(this.cachedLineWidth=e,this.wrapped.lineWidth=e)}getLineDash(){return this.wrapped.getLineDash()}setLineDash(t){const e=Array.from(t).map(s=>this.scale_.x.dim(s));this.wrapped.setLineDash(e)}clearRect(t,e,s,i){this.wrapped.clearRect(t,e,s,i)}fillRect(t,e,s,i){this.wrapped.fillRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}strokeRect(t,e,s,i){this.wrapped.strokeRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}get shadowBlur(){return this.wrapped.shadowBlur}set shadowBlur(t){this.wrapped.shadowBlur=t}get shadowColor(){return this.wrapped.shadowColor}set shadowColor(t){this.wrapped.shadowColor=t}get shadowOffsetX(){return this.wrapped.shadowOffsetX}set shadowOffsetX(t){this.wrapped.shadowOffsetX=t}get shadowOffsetY(){return this.wrapped.shadowOffsetY}restore(){this.cachedFillStyle=null,this.cachedStrokeStyle=null,this.cachedLineWidth=null,this.cachedGlobalAlpha=null,this.cachedTextAlign=null,this.cachedTextBaseline=null,this.cachedLineCap=null,this.cachedLineJoin=null,this.cachedMiterLimit=null,this.cachedFont=null,this.wrapped.restore()}save(){this.wrapped.save()}fillText(t,e,s,i,r={}){const[h,o]=this.checkAtlasFillStyle(r.useAtlas);if(h){this.atlasRegistry.get({font:this.font,textColor:o}).fillText(this,t,e,s);return}this.wrapped.fillText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}measureText(t){return this.wrapped.measureText(t)}textDimensions(t,e={}){const[s,i]=this.checkAtlasFillStyle(e.useAtlas);return s?this.atlasRegistry.get({font:this.font,textColor:i}).measureText(t):B.dimensionsFromMetrics(this.measureText(t))}strokeText(t,e,s,i){this.wrapped.strokeText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}get direction(){return this.wrapped.direction}set direction(t){this.wrapped.direction=t}get font(){return this.cachedFont!=null?this.cachedFont:this.wrapped.font}set font(t){t!==this.cachedFont&&(this.cachedFont=t,this.wrapped.font=this.cachedFont)}get fontKerning(){return this.wrapped.fontKerning}set fontKerning(t){this.wrapped.fontKerning=t}get textAlign(){return this.cachedTextAlign??this.wrapped.textAlign}set textAlign(t){t!==this.cachedTextAlign&&(this.cachedTextAlign=t,this.wrapped.textAlign=t)}get textBaseline(){return this.cachedTextBaseline??this.wrapped.textBaseline}set textBaseline(t){t!==this.cachedTextBaseline&&(this.cachedTextBaseline=t,this.wrapped.textBaseline=t)}getTransform(){return this.wrapped.getTransform()}resetTransform(){this.wrapped.resetTransform()}rotate(t){this.wrapped.rotate(t)}scale(t,e){this.wrapped.scale(t,e),this.dpr=t}scissor(t,e=a.K.ZERO){const s=new H(this.scale_);return t=C(t,e),s.rect(...a.K.couple(a.Pt.topLeft(t)),...a.A$1.couple(a.Pt.dims(t))),this.save(),this.clip(s.getPath()),()=>this.restore()}setTransform(t,e,s,i,r,h){this.wrapped.setTransform(t,e,s,i,r,h)}transform(t,e,s,i,r,h){this.wrapped.transform(t,e,s,i,r,h)}translate(t,e){this.wrapped.translate(t,e)}}class H{constructor(t=a.A.XY.IDENTITY,e){n(this,"scale_");n(this,"path");this.scale_=t,e instanceof Path2D||typeof e=="string"?this.path=new Path2D(e):this.path=new Path2D}addPath(t,e){this.path.addPath(t,e)}arc(t,e,s,i,r,h){this.path.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,h)}arcTo(t,e,s,i,r){this.path.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,h){this.path.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(h))}closePath(){this.path.closePath()}ellipse(t,e,s,i,r,h,o,c){this.path.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,h,o,c)}lineTo(t,e){this.path.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.path.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.path.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.path.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){const h=this.scaleRadii(r);this.path.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),h)}scaleRadii(t){return t==null?t:typeof t=="number"?this.scale_.x.dim(t):Array.isArray(t)?t.map(e=>this.scaleRadius(e)):this.scaleRadius(t)}scaleRadius(t){return typeof t=="number"?this.scale_.x.dim(t):{x:this.scale_.x.dim(t.x??0),y:this.scale_.y.dim(t.y??0)}}getPath(){return this.path}}const V=`precision mediump float;
1
+ "use strict";var z=Object.defineProperty;var Z=(l,t,e)=>t in l?z(l,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[t]=e;var n=(l,t,e)=>Z(l,typeof t!="symbol"?t+"":t,e);const a=require("./css-C7rJrqRi.cjs"),u=require("./provider-YWPkhTn6.cjs"),_=require("./state-DwM4WaEw.cjs"),B=require("./dimensions-BmlCx5q4.cjs"),G=_.object({include:_.string().array().optional(),exclude:_.string().array().optional(),level:_._enum(u.g.LOG_LEVELS).optional().default("info")}),b="alamos-provider";class S extends u.Composite{constructor(){super(...arguments);n(this,"schema",G)}afterUpdate(e){if(e.getOptional(b)!=null)return;const i=[],{include:r,exclude:h,level:o}=this.state;(r!=null||h!=null)&&i.push(u.g.logLevelKeyFiler({include:r,exclude:h})),o!=null&&i.push(u.g.logThresholdFilter(o)),i.length===0&&i.push(()=>!1),this.internal.ins=new u.g.Instrumentation({key:"aether",logger:new u.g.Logger({filters:i})}),e.set(b,this.internal.ins)}}n(S,"TYPE","alamos.Provider");const Y=(l,t)=>{const e=l.get(b);if(e==null)throw new Error("No instrumentation provider");return t==null?e:e.child(t)},$={[S.TYPE]:S},C=(l,t)=>a.Pt.construct(a.Pt.left(l)-t.x,a.Pt.top(l)-t.y,a.Pt.width(l)+t.x*2,a.Pt.height(l)+t.y*2);class T{constructor(t,e,s,i=a.A.XY.IDENTITY){n(this,"scale_");n(this,"wrapped");n(this,"atlasRegistry");n(this,"cachedFont",null);n(this,"cachedFillStyle",null);n(this,"cachedStrokeStyle",null);n(this,"cachedLineWidth",null);n(this,"cachedGlobalAlpha",null);n(this,"cachedTextAlign",null);n(this,"cachedTextBaseline",null);n(this,"cachedLineCap",null);n(this,"cachedLineJoin",null);n(this,"cachedMiterLimit",null);n(this,"dpr");this.wrapped=t,this.scale_=i,this.atlasRegistry=e,this.dpr=s}get fontStretch(){return this.wrapped.fontStretch}set fontStretch(t){this.wrapped.fontStretch=t}get fontVariantCaps(){return this.wrapped.fontVariantCaps}set fontVariantCaps(t){this.wrapped.fontVariantCaps=t}isContextLost(){return this.wrapped.isContextLost()}get wordSpacing(){return this.wrapped.wordSpacing}set wordSpacing(t){this.wrapped.wordSpacing=t}get letterSpacing(){return this.wrapped.letterSpacing}set letterSpacing(t){this.wrapped.letterSpacing=t}get textRendering(){return this.wrapped.textRendering}set textRendering(t){this.wrapped.textRendering=t}checkAtlasFillStyle(t=!1){return t&&typeof this.fillStyle=="string"?[!0,this.fillStyle]:(t&&console.warn("attempted to use a text atlas with a gradient fill style. This is not supported. Falling back to default canvas fill."),[!1,null])}reset(){this.wrapped.reset()}applyScale(t){return new T(this,this.atlasRegistry,this.dpr,t)}get canvas(){return this.wrapped.canvas}get miterLimit(){return this.cachedMiterLimit??this.wrapped.miterLimit}set miterLimit(t){const e=this.scale_.x.dim(t);e!==this.cachedMiterLimit&&(this.cachedMiterLimit=e,this.wrapped.miterLimit=e)}get globalAlpha(){return this.cachedGlobalAlpha??this.wrapped.globalAlpha}set globalAlpha(t){t!==this.cachedGlobalAlpha&&(this.cachedGlobalAlpha=t,this.wrapped.globalAlpha=t)}get globalCompositeOperation(){return this.wrapped.globalCompositeOperation}set globalCompositeOperation(t){this.wrapped.globalCompositeOperation=t}get fillStyle(){return this.cachedFillStyle??this.wrapped.fillStyle}set fillStyle(t){t!==this.cachedFillStyle&&(this.cachedFillStyle=t,this.wrapped.fillStyle=t)}get strokeStyle(){return this.cachedStrokeStyle??this.wrapped.strokeStyle}set strokeStyle(t){t!==this.cachedStrokeStyle&&(this.cachedStrokeStyle=t,this.wrapped.strokeStyle=t)}drawImage(t,e,s,i,r,h,o,c,d){this.wrapped.drawImage(t,e,s,i,r,h!=null?this.scale_.x.pos(h):h,o!=null?this.scale_.y.pos(o):o,c!=null?this.scale_.x.dim(c):c,d!=null?this.scale_.y.dim(d):d)}beginPath(){this.wrapped.beginPath()}clip(t,e){this.wrapped.clip(t,e)}fill(t,e){if(t==null)return this.wrapped.fill();this.wrapped.fill(t,e)}isPointInPath(t,e,s,i){return this.wrapped.isPointInPath(t,e,s,i)}isPointInStroke(t,e,s){return this.wrapped.isPointInStroke(t,e,s)}stroke(t){if(t==null)return this.wrapped.stroke();this.wrapped.stroke(t)}createConicGradient(t,e,s){return this.wrapped.createConicGradient(t,e,s)}createLinearGradient(t,e,s,i){return this.wrapped.createLinearGradient(t,e,s,i)}createPattern(t,e){return this.wrapped.createPattern(t,e)}createRadialGradient(t,e,s,i,r,h){return this.wrapped.createRadialGradient(t,e,s,i,r,h)}get filter(){return this.wrapped.filter}set filter(t){this.wrapped.filter=t}createImageData(t,e,s){return this.wrapped.createImageData(t,e,s)}getImageData(t,e,s,i,r){return this.wrapped.getImageData(t,e,s,i,r)}putImageData(t,e,s,i,r,h,o){this.wrapped.putImageData(t,e,s,i,r,h,o)}get imageSmoothingEnabled(){return this.wrapped.imageSmoothingEnabled}set imageSmoothingEnabled(t){this.wrapped.imageSmoothingEnabled=t}get imageSmoothingQuality(){return this.wrapped.imageSmoothingQuality}set imageSmoothingQuality(t){this.wrapped.imageSmoothingQuality=t}arc(t,e,s,i,r,h){this.wrapped.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,h)}arcTo(t,e,s,i,r){this.wrapped.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,h){this.wrapped.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(h))}closePath(){this.wrapped.closePath()}ellipse(t,e,s,i,r,h,o,c){this.wrapped.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,h,o,c)}lineTo(t,e){this.wrapped.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.wrapped.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.wrapped.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.wrapped.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){this.wrapped.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),typeof r=="number"?this.scale_.x.dim(r):r)}get lineCap(){return this.cachedLineCap??this.wrapped.lineCap}set lineCap(t){t!==this.cachedLineCap&&(this.cachedLineCap=t,this.wrapped.lineCap=t)}get lineDashOffset(){return this.wrapped.lineDashOffset}set lineDashOffset(t){this.wrapped.lineDashOffset=this.scale_.x.dim(t)}get lineJoin(){return this.cachedLineJoin??this.wrapped.lineJoin}set lineJoin(t){t!==this.cachedLineJoin&&(this.cachedLineJoin=t,this.wrapped.lineJoin=t)}get lineWidth(){return this.cachedLineWidth??this.wrapped.lineWidth}set lineWidth(t){const e=this.scale_.x.dim(t);e!==this.cachedLineWidth&&(this.cachedLineWidth=e,this.wrapped.lineWidth=e)}getLineDash(){return this.wrapped.getLineDash()}setLineDash(t){const e=Array.from(t).map(s=>this.scale_.x.dim(s));this.wrapped.setLineDash(e)}clearRect(t,e,s,i){this.wrapped.clearRect(t,e,s,i)}fillRect(t,e,s,i){this.wrapped.fillRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}strokeRect(t,e,s,i){this.wrapped.strokeRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}get shadowBlur(){return this.wrapped.shadowBlur}set shadowBlur(t){this.wrapped.shadowBlur=t}get shadowColor(){return this.wrapped.shadowColor}set shadowColor(t){this.wrapped.shadowColor=t}get shadowOffsetX(){return this.wrapped.shadowOffsetX}set shadowOffsetX(t){this.wrapped.shadowOffsetX=t}get shadowOffsetY(){return this.wrapped.shadowOffsetY}restore(){this.cachedFillStyle=null,this.cachedStrokeStyle=null,this.cachedLineWidth=null,this.cachedGlobalAlpha=null,this.cachedTextAlign=null,this.cachedTextBaseline=null,this.cachedLineCap=null,this.cachedLineJoin=null,this.cachedMiterLimit=null,this.cachedFont=null,this.wrapped.restore()}save(){this.wrapped.save()}fillText(t,e,s,i,r={}){const[h,o]=this.checkAtlasFillStyle(r.useAtlas);if(h){this.atlasRegistry.get({font:this.font,textColor:o}).fillText(this,t,e,s);return}this.wrapped.fillText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}measureText(t){return this.wrapped.measureText(t)}textDimensions(t,e={}){const[s,i]=this.checkAtlasFillStyle(e.useAtlas);return s?this.atlasRegistry.get({font:this.font,textColor:i}).measureText(t):B.dimensionsFromMetrics(this.measureText(t))}strokeText(t,e,s,i){this.wrapped.strokeText(t,this.scale_.x.pos(e),this.scale_.y.pos(s),i!=null?this.scale_.x.dim(i):void 0)}get direction(){return this.wrapped.direction}set direction(t){this.wrapped.direction=t}get font(){return this.cachedFont!=null?this.cachedFont:this.wrapped.font}set font(t){t!==this.cachedFont&&(this.cachedFont=t,this.wrapped.font=this.cachedFont)}get fontKerning(){return this.wrapped.fontKerning}set fontKerning(t){this.wrapped.fontKerning=t}get textAlign(){return this.cachedTextAlign??this.wrapped.textAlign}set textAlign(t){t!==this.cachedTextAlign&&(this.cachedTextAlign=t,this.wrapped.textAlign=t)}get textBaseline(){return this.cachedTextBaseline??this.wrapped.textBaseline}set textBaseline(t){t!==this.cachedTextBaseline&&(this.cachedTextBaseline=t,this.wrapped.textBaseline=t)}getTransform(){return this.wrapped.getTransform()}resetTransform(){this.wrapped.resetTransform()}rotate(t){this.wrapped.rotate(t)}scale(t,e){this.wrapped.scale(t,e),this.dpr=t}scissor(t,e=a.K.ZERO){const s=new H(this.scale_);return t=C(t,e),s.rect(...a.K.couple(a.Pt.topLeft(t)),...a.A$1.couple(a.Pt.dims(t))),this.save(),this.clip(s.getPath()),()=>this.restore()}setTransform(t,e,s,i,r,h){this.wrapped.setTransform(t,e,s,i,r,h)}transform(t,e,s,i,r,h){this.wrapped.transform(t,e,s,i,r,h)}translate(t,e){this.wrapped.translate(t,e)}}class H{constructor(t=a.A.XY.IDENTITY,e){n(this,"scale_");n(this,"path");this.scale_=t,e instanceof Path2D||typeof e=="string"?this.path=new Path2D(e):this.path=new Path2D}addPath(t,e){this.path.addPath(t,e)}arc(t,e,s,i,r,h){this.path.arc(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),i,r,h)}arcTo(t,e,s,i,r){this.path.arcTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.dim(r))}bezierCurveTo(t,e,s,i,r,h){this.path.bezierCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i),this.scale_.x.pos(r),this.scale_.y.pos(h))}closePath(){this.path.closePath()}ellipse(t,e,s,i,r,h,o,c){this.path.ellipse(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),r,h,o,c)}lineTo(t,e){this.path.lineTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}moveTo(t,e){this.path.moveTo(this.scale_.x.pos(t),this.scale_.y.pos(e))}quadraticCurveTo(t,e,s,i){this.path.quadraticCurveTo(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.pos(s),this.scale_.y.pos(i))}rect(t,e,s,i){this.path.rect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i))}roundRect(t,e,s,i,r){const h=this.scaleRadii(r);this.path.roundRect(this.scale_.x.pos(t),this.scale_.y.pos(e),this.scale_.x.dim(s),this.scale_.y.dim(i),h)}scaleRadii(t){return t==null?t:typeof t=="number"?this.scale_.x.dim(t):Array.isArray(t)?t.map(e=>this.scaleRadius(e)):this.scaleRadius(t)}scaleRadius(t){return typeof t=="number"?this.scale_.x.dim(t):{x:this.scale_.x.dim(t.x??0),y:this.scale_.y.dim(t.y??0)}}getPath(){return this.path}}const V=`precision mediump float;
2
2
 
3
3
  void main(void) {
4
4
  gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
@@ -8,4 +8,4 @@ void main(void) {
8
8
  void main(void) {
9
9
  gl_Position = a_position;
10
10
  }
11
- `,D=l=>new Error(`failed to compile webgl program: ${l}`),Q=new Error("null shader encountered");let K=class{constructor(t,e,s){n(this,"renderCtx");n(this,"prog");n(this,"vertShader");n(this,"fragShader");n(this,"uniformLocCache",new Map);this.renderCtx=t;const i=t.gl.createProgram();if(i==null)throw D("failed to create program");this.prog=i,this.vertShader=e,this.fragShader=s,this.compile()}setAsActive(){return this.renderCtx.gl.useProgram(this.prog),()=>this.renderCtx.gl.useProgram(null)}uniformXY(t,e){this.renderCtx.gl.uniform2fv(this.getUniformLoc(t),a.K.couple(e))}uniformColor(t,e){this.renderCtx.gl.uniform4fv(this.getUniformLoc(t),a.od.rgba1(e))}getUniformLoc(t){const e=this.uniformLocCache.get(t);if(e!=null)return e;const s=this.renderCtx.gl.getUniformLocation(this.prog,t);if(s==null)throw new Error(`unexpected missing uniform ${t}`);return this.uniformLocCache.set(t,s),s}compile(){const t=this.renderCtx.gl;this.compileShader(this.vertShader,t.VERTEX_SHADER),this.compileShader(this.fragShader,t.FRAGMENT_SHADER),t.linkProgram(this.prog)}compileShader(t,e){const s=this.renderCtx.gl,i=s.createShader(e);if(i==null)throw Q;if(s.shaderSource(i,t),s.compileShader(i),!s.getShaderParameter(i,s.COMPILE_STATUS)){const h=s.getShaderInfoLog(i);throw s.deleteShader(i),D(h??"unknown")}s.attachShader(this.prog,i)}};const j=new Float32Array([0,0,0,0,0,0]);class tt extends K{constructor(e){super(e,J,V);n(this,"positionBuffer");const s=e.gl.createBuffer();if(s==null)throw new u.ti("webgl: failed to create buffer");this.positionBuffer=s,e.gl.bindBuffer(e.gl.ARRAY_BUFFER,this.positionBuffer),e.gl.bufferData(e.gl.ARRAY_BUFFER,j,e.gl.STATIC_DRAW)}exec(){const{gl:e}=this.renderCtx,s=e.getAttribLocation(this.prog,"a_position");e.bindBuffer(e.ARRAY_BUFFER,this.positionBuffer);const i=e.createVertexArray();e.bindVertexArray(i),e.enableVertexAttribArray(s),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0),this.setAsActive(),e.drawArrays(e.TRIANGLES,0,3)}}const F={high:1,low:0};class M{constructor({afterRender:t,instrumentation:e=u.g.Instrumentation.NOOP,handleError:s}){n(this,"requests",new Map);n(this,"cleanup",new Map);n(this,"afterRender");n(this,"instrumentation");n(this,"handleError");this.afterRender=t,this.instrumentation=e,this.handleError=s,this.start()}set(t){const e=this.requests.get(t.key);if(e==null)this.requests.set(t.key,t);else{const s=F[t.priority]>=F[e.priority],i=t.canvases.length>=e.canvases.length;s&&i&&this.requests.set(t.key,t)}}render(){var e;const{requests:t}=this;t.size!==0&&(this.runCleanupsSync(),this.renderSync(),this.requests.clear(),(e=this.afterRender)==null||e.call(this))}runCleanupsSync(){const{cleanup:t,requests:e}=this;t.forEach((s,i)=>{const r=e.get(i);r!=null&&(s(r),t.delete(i))})}renderSync(){const{requests:t}=this;t.forEach(e=>{try{const s=e.render();s!=null&&this.cleanup.set(e.key,s)}catch(s){this.handleError(s,"render loop failed")}})}start(){const t=()=>{try{this.render()}catch(e){this.handleError(e,"render loop failed")}requestAnimationFrame(t)};requestAnimationFrame(t)}}const y=2,f=2,A=class A{constructor(t){n(this,"atlas");n(this,"charDims");n(this,"charMap");const{font:e,characters:s=A.DEFAULT_CHARS,textColor:i}=t;this.charMap=new Map;const r=a.c.unique(Array.from(s)),o=new OffscreenCanvas(1,1).getContext("2d");o.font=e;const c=o.measureText("0");this.charDims=B.dimensionsFromMetrics(c),this.charDims.width+=y,this.charDims.height+=y;const d=r.length,g=this.charDims.width,x=this.charDims.height,p=Math.ceil(Math.sqrt(d)),P=Math.ceil(d/p);this.atlas=new OffscreenCanvas(g*p*f,x*(P+1)*f);const m=this.atlas.getContext("2d");m.scale(f,f),m.font=e,m.textBaseline="alphabetic",m.textAlign="left",m.fillStyle=a.od.hex(i),m.clearRect(0,0,this.atlas.width,this.atlas.height),r.forEach((v,L)=>{const N=L%p,X=Math.floor(L/p),U=N*g,W=(X+1)*x;m.fillText(v,U,W),this.charMap.set(v,L)})}fillText(t,e,s,i){const{width:r,height:h}=this.charDims,o=Math.ceil(Math.sqrt(this.charMap.size));for(let c=0;c<e.length;c++){const d=e[c],g=this.charMap.get(d);if(g===void 0)continue;const x=g%o,p=Math.floor(g/o);t.drawImage(this.atlas,x*r*f,p*h*f+y,r*f,h*f,s+c*r,i-h-y/f,r,h)}}measureText(t){return{width:t.length*this.charDims.width,height:this.charDims.height}}};n(A,"DEFAULT_CHARS","0123456789.:-umsNa∞ᴇ");let O=A;class et{constructor(){n(this,"atlases");this.atlases=new Map}get(t){const e=`${t.font}-${a.od.hex(t.textColor)}-${t.characters}`;if(this.atlases.has(e))return this.atlases.get(e);const s=new O(t);return this.atlases.set(e,s),s}}const I=l=>(l.textRendering="optimizeSpeed",l.imageSmoothingEnabled=!1,l),w=class w{constructor(t,e,s,i,r,h,o){n(this,"glCanvas");n(this,"upper2dCanvas");n(this,"lower2dCanvas");n(this,"gl");n(this,"lower2d");n(this,"upper2d");n(this,"region");n(this,"dpr");n(this,"loop");n(this,"clearProgram");n(this,"os");n(this,"instrumentation");this.upper2dCanvas=s,this.lower2dCanvas=e,this.glCanvas=t,this.os=i,this.instrumentation=r,this.dpr=1;const c=this.lower2dCanvas.getContext("2d");if(c==null)throw new Error("Could not get 2D context");const d=new et;this.lower2d=I(new T(c,d,this.dpr));const g=this.upper2dCanvas.getContext("2d");if(g==null)throw new Error("Could not get 2D context");this.upper2d=I(new T(g,d,this.dpr));const x={preserveDrawingBuffer:!0,powerPreference:"high-performance",stencil:!1,depth:!1},p=this.glCanvas.getContext("webgl2",x);if(p==null)throw new Error("Could not get WebGL context");p.disable(p.DEPTH_TEST),p.disable(p.STENCIL_TEST),p.disable(p.CULL_FACE),p.disable(p.DITHER),this.gl=p,this.glCanvas.oncontextlost=()=>h({variant:"error",message:"WebGL context lost"});const P=()=>{this.gl.flush(),this.gl.finish()};this.loop=new M({afterRender:P,instrumentation:this.instrumentation,handleError:o}),this.region=a.Pt.ZERO,this.os==="Windows"&&(this.clearProgram=new tt(this))}static create(t,e,s,i,r){const h=Y(t,"render_context"),o=new w(e,s,i,r,h,u.useAdder(t),u.useErrorHandler(t));return t.set(w.CONTEXT_KEY,o),o}static useOptional(t){return t.getOptional(w.CONTEXT_KEY)}static use(t){return t.get(w.CONTEXT_KEY)}update(t){t.set(w.CONTEXT_KEY,this)}resize(t,e){a.Pt.equals(this.region,t)&&this.dpr===e||(this.region=t,this.dpr=e,this.resizeCanvas(this.glCanvas),this.resizeCanvas(this.upper2dCanvas),this.resizeCanvas(this.lower2dCanvas),this.lower2d.scale(this.dpr,this.dpr),this.upper2d.scale(this.dpr,this.dpr),this.gl.viewport(0,0,a.Pt.width(t)*e,a.Pt.height(t)*e))}resizeCanvas(t){t.width=a.Pt.width(this.region)*this.dpr,t.height=a.Pt.height(this.region)*this.dpr}get aspect(){return a.Pt.aspect(this.region)}scaleRegion(t){return new a.A.XY(a.A.Scale.scale(0,1).scale(a.Pt.width(t)).translate(a.Pt.left(t)).reBound(a.Pt.width(this.region)).scale(-1,1),a.A.Scale.scale(0,1).scale(a.Pt.height(t)).invert().translate(a.Pt.top(t)).reBound(a.Pt.height(this.region)).scale(-1,1).invert())}scissor(t,e=a.K.ZERO,s){const i=[];return s.includes("upper2d")&&i.push(this.upper2d.scissor(t,e)),s.includes("lower2d")&&i.push(this.lower2d.scissor(t,e)),s.includes("gl")&&i.push(this.scissorGL(t,e)),()=>i.forEach(r=>r())}scissorGL(t,e=a.K.ZERO){return this.gl.enable(this.gl.SCISSOR_TEST),t=C(t,e),this.gl.scissor(a.Pt.left(t)*this.dpr,(a.Pt.height(this.region)-a.Pt.bottom(t))*this.dpr,a.Pt.width(t)*this.dpr,a.Pt.height(t)*this.dpr),()=>this.gl.disable(this.gl.SCISSOR_TEST)}erase(t,e=a.K.ZERO,...s){e=a.K.construct(e),s.length===0&&(s=["upper2d","lower2d","gl"]),s.includes("upper2d")&&this.eraseCanvas(this.upper2d,t,e),s.includes("lower2d")&&this.eraseCanvas(this.lower2d,t,e),s.includes("gl")&&this.eraseGL(t,e)}eraseGL(t,e=a.K.ZERO){var r;const{gl:s}=this,i=this.scissorGL(C(t,e));s.clearColor(...a.od.rgba1(a.od.ZERO)),s.clear(s.COLOR_BUFFER_BIT),this.os==="Windows"&&((r=this.clearProgram)==null||r.exec()),i()}eraseCanvas(t,e,s=a.K.ZERO){const i=C(e,s);t.clearRect(...a.K.couple(a.Pt.topLeft(i)),...a.A$1.couple(a.Pt.dims(i)))}};n(w,"CONTEXT_KEY",a.CSS.B("render-context"));let R=w;const q=_.object({region:a.Pt.box,enabled:_.boolean().optional().default(!1)}),k=["gl","lower2d","upper2d"];class E extends u.Leaf{constructor(){super(...arguments);n(this,"schema",q)}afterUpdate(e){this.deleted||(this.internal.renderCtx=R.use(e),this.renderOnLifecycleChange())}afterDelete(){this.renderOnLifecycleChange()}renderOnLifecycleChange(){this.internal.renderCtx.loop.set({key:`${this.type}-${this.key}`,render:this.render.bind(this),priority:"high",canvases:k})}render(){this.deleted||!this.state.enabled||this.internal.renderCtx.erase(this.state.region,a.K.construct(0),...k)}}n(E,"TYPE","eraser");const st={[E.TYPE]:E};exports.Context=R;exports.Eraser=E;exports.GLProgram=K;exports.Loop=M;exports.Provider=S;exports.REGISTRY=st;exports.REGISTRY$1=$;exports.eraserStateZ=q;exports.providerStateZ=G;exports.useInstrumentation=Y;
11
+ `,D=l=>new Error(`failed to compile webgl program: ${l}`),Q=new Error("null shader encountered");let K=class{constructor(t,e,s){n(this,"renderCtx");n(this,"prog");n(this,"vertShader");n(this,"fragShader");n(this,"uniformLocCache",new Map);this.renderCtx=t;const i=t.gl.createProgram();if(i==null)throw D("failed to create program");this.prog=i,this.vertShader=e,this.fragShader=s,this.compile()}setAsActive(){return this.renderCtx.gl.useProgram(this.prog),()=>this.renderCtx.gl.useProgram(null)}uniformXY(t,e){this.renderCtx.gl.uniform2fv(this.getUniformLoc(t),a.K.couple(e))}uniformColor(t,e){this.renderCtx.gl.uniform4fv(this.getUniformLoc(t),a.od.rgba1(e))}getUniformLoc(t){const e=this.uniformLocCache.get(t);if(e!=null)return e;const s=this.renderCtx.gl.getUniformLocation(this.prog,t);if(s==null)throw new Error(`unexpected missing uniform ${t}`);return this.uniformLocCache.set(t,s),s}compile(){const t=this.renderCtx.gl;this.compileShader(this.vertShader,t.VERTEX_SHADER),this.compileShader(this.fragShader,t.FRAGMENT_SHADER),t.linkProgram(this.prog)}compileShader(t,e){const s=this.renderCtx.gl,i=s.createShader(e);if(i==null)throw Q;if(s.shaderSource(i,t),s.compileShader(i),!s.getShaderParameter(i,s.COMPILE_STATUS)){const h=s.getShaderInfoLog(i);throw s.deleteShader(i),D(h??"unknown")}s.attachShader(this.prog,i)}};const j=new Float32Array([0,0,0,0,0,0]);class tt extends K{constructor(e){super(e,J,V);n(this,"positionBuffer");const s=e.gl.createBuffer();if(s==null)throw new u.ti("webgl: failed to create buffer");this.positionBuffer=s,e.gl.bindBuffer(e.gl.ARRAY_BUFFER,this.positionBuffer),e.gl.bufferData(e.gl.ARRAY_BUFFER,j,e.gl.STATIC_DRAW)}exec(){const{gl:e}=this.renderCtx,s=e.getAttribLocation(this.prog,"a_position");e.bindBuffer(e.ARRAY_BUFFER,this.positionBuffer);const i=e.createVertexArray();e.bindVertexArray(i),e.enableVertexAttribArray(s),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0),this.setAsActive(),e.drawArrays(e.TRIANGLES,0,3)}}const F={high:1,low:0};class M{constructor({afterRender:t,instrumentation:e=u.g.Instrumentation.NOOP,handleError:s}){n(this,"requests",new Map);n(this,"cleanup",new Map);n(this,"afterRender");n(this,"instrumentation");n(this,"handleError");this.afterRender=t,this.instrumentation=e,this.handleError=s,this.start()}set(t){const e=this.requests.get(t.key);if(e==null)this.requests.set(t.key,t);else{const s=F[t.priority]>=F[e.priority],i=t.canvases.length>=e.canvases.length;s&&i&&this.requests.set(t.key,t)}}render(){var e;const{requests:t}=this;t.size!==0&&(this.runCleanupsSync(),this.renderSync(),this.requests.clear(),(e=this.afterRender)==null||e.call(this))}runCleanupsSync(){const{cleanup:t,requests:e}=this;t.forEach((s,i)=>{const r=e.get(i);r!=null&&(s(r),t.delete(i))})}renderSync(){const{requests:t}=this;t.forEach(e=>{try{const s=e.render();s!=null&&this.cleanup.set(e.key,s)}catch(s){this.handleError(s,"render loop failed")}})}start(){const t=()=>{try{this.render()}catch(e){this.handleError(e,"render loop failed")}requestAnimationFrame(t)};requestAnimationFrame(t)}}const y=2,f=2,A=class A{constructor(t){n(this,"atlas");n(this,"charDims");n(this,"charMap");const{font:e,characters:s=A.DEFAULT_CHARS,textColor:i}=t;this.charMap=new Map;const r=a.c.unique(Array.from(s)),o=new OffscreenCanvas(1,1).getContext("2d");o.font=e;const c=o.measureText("0");this.charDims=B.dimensionsFromMetrics(c),this.charDims.width+=y,this.charDims.height+=y;const d=r.length,g=this.charDims.width,x=this.charDims.height,p=Math.ceil(Math.sqrt(d)),P=Math.ceil(d/p);this.atlas=new OffscreenCanvas(g*p*f,x*(P+1)*f);const m=this.atlas.getContext("2d");m.scale(f,f),m.font=e,m.textBaseline="alphabetic",m.textAlign="left",m.fillStyle=a.od.hex(i),m.clearRect(0,0,this.atlas.width,this.atlas.height),r.forEach((v,L)=>{const N=L%p,X=Math.floor(L/p),U=N*g,W=(X+1)*x;m.fillText(v,U,W),this.charMap.set(v,L)})}fillText(t,e,s,i){const{width:r,height:h}=this.charDims,o=Math.ceil(Math.sqrt(this.charMap.size));for(let c=0;c<e.length;c++){const d=e[c],g=this.charMap.get(d);if(g===void 0)continue;const x=g%o,p=Math.floor(g/o);t.drawImage(this.atlas,x*r*f,p*h*f+y,r*f,h*f,s+c*r,i-h-y/f,r,h)}}measureText(t){return{width:t.length*this.charDims.width,height:this.charDims.height}}};n(A,"DEFAULT_CHARS","0123456789.:-µmsNa∞ᴇ");let O=A;class et{constructor(){n(this,"atlases");this.atlases=new Map}get(t){const e=`${t.font}-${a.od.hex(t.textColor)}-${t.characters}`;if(this.atlases.has(e))return this.atlases.get(e);const s=new O(t);return this.atlases.set(e,s),s}}const I=l=>(l.textRendering="optimizeSpeed",l.imageSmoothingEnabled=!1,l),w=class w{constructor(t,e,s,i,r,h,o){n(this,"glCanvas");n(this,"upper2dCanvas");n(this,"lower2dCanvas");n(this,"gl");n(this,"lower2d");n(this,"upper2d");n(this,"region");n(this,"dpr");n(this,"loop");n(this,"clearProgram");n(this,"os");n(this,"instrumentation");this.upper2dCanvas=s,this.lower2dCanvas=e,this.glCanvas=t,this.os=i,this.instrumentation=r,this.dpr=1;const c=this.lower2dCanvas.getContext("2d");if(c==null)throw new Error("Could not get 2D context");const d=new et;this.lower2d=I(new T(c,d,this.dpr));const g=this.upper2dCanvas.getContext("2d");if(g==null)throw new Error("Could not get 2D context");this.upper2d=I(new T(g,d,this.dpr));const x={preserveDrawingBuffer:!0,powerPreference:"high-performance",stencil:!1,depth:!1},p=this.glCanvas.getContext("webgl2",x);if(p==null)throw new Error("Could not get WebGL context");p.disable(p.DEPTH_TEST),p.disable(p.STENCIL_TEST),p.disable(p.CULL_FACE),p.disable(p.DITHER),this.gl=p,this.glCanvas.oncontextlost=()=>h({variant:"error",message:"WebGL context lost"});const P=()=>{this.gl.flush(),this.gl.finish()};this.loop=new M({afterRender:P,instrumentation:this.instrumentation,handleError:o}),this.region=a.Pt.ZERO,this.os==="Windows"&&(this.clearProgram=new tt(this))}static create(t,e,s,i,r){const h=Y(t,"render_context"),o=new w(e,s,i,r,h,u.useAdder(t),u.useErrorHandler(t));return t.set(w.CONTEXT_KEY,o),o}static useOptional(t){return t.getOptional(w.CONTEXT_KEY)}static use(t){return t.get(w.CONTEXT_KEY)}update(t){t.set(w.CONTEXT_KEY,this)}resize(t,e){a.Pt.equals(this.region,t)&&this.dpr===e||(this.region=t,this.dpr=e,this.resizeCanvas(this.glCanvas),this.resizeCanvas(this.upper2dCanvas),this.resizeCanvas(this.lower2dCanvas),this.lower2d.scale(this.dpr,this.dpr),this.upper2d.scale(this.dpr,this.dpr),this.gl.viewport(0,0,a.Pt.width(t)*e,a.Pt.height(t)*e))}resizeCanvas(t){t.width=a.Pt.width(this.region)*this.dpr,t.height=a.Pt.height(this.region)*this.dpr}get aspect(){return a.Pt.aspect(this.region)}scaleRegion(t){return new a.A.XY(a.A.Scale.scale(0,1).scale(a.Pt.width(t)).translate(a.Pt.left(t)).reBound(a.Pt.width(this.region)).scale(-1,1),a.A.Scale.scale(0,1).scale(a.Pt.height(t)).invert().translate(a.Pt.top(t)).reBound(a.Pt.height(this.region)).scale(-1,1).invert())}scissor(t,e=a.K.ZERO,s){const i=[];return s.includes("upper2d")&&i.push(this.upper2d.scissor(t,e)),s.includes("lower2d")&&i.push(this.lower2d.scissor(t,e)),s.includes("gl")&&i.push(this.scissorGL(t,e)),()=>i.forEach(r=>r())}scissorGL(t,e=a.K.ZERO){return this.gl.enable(this.gl.SCISSOR_TEST),t=C(t,e),this.gl.scissor(a.Pt.left(t)*this.dpr,(a.Pt.height(this.region)-a.Pt.bottom(t))*this.dpr,a.Pt.width(t)*this.dpr,a.Pt.height(t)*this.dpr),()=>this.gl.disable(this.gl.SCISSOR_TEST)}erase(t,e=a.K.ZERO,...s){e=a.K.construct(e),s.length===0&&(s=["upper2d","lower2d","gl"]),s.includes("upper2d")&&this.eraseCanvas(this.upper2d,t,e),s.includes("lower2d")&&this.eraseCanvas(this.lower2d,t,e),s.includes("gl")&&this.eraseGL(t,e)}eraseGL(t,e=a.K.ZERO){var r;const{gl:s}=this,i=this.scissorGL(C(t,e));s.clearColor(...a.od.rgba1(a.od.ZERO)),s.clear(s.COLOR_BUFFER_BIT),this.os==="Windows"&&((r=this.clearProgram)==null||r.exec()),i()}eraseCanvas(t,e,s=a.K.ZERO){const i=C(e,s);t.clearRect(...a.K.couple(a.Pt.topLeft(i)),...a.A$1.couple(a.Pt.dims(i)))}};n(w,"CONTEXT_KEY",a.CSS.B("render-context"));let R=w;const q=_.object({region:a.Pt.box,enabled:_.boolean().optional().default(!1)}),k=["gl","lower2d","upper2d"];class E extends u.Leaf{constructor(){super(...arguments);n(this,"schema",q)}afterUpdate(e){this.deleted||(this.internal.renderCtx=R.use(e),this.renderOnLifecycleChange())}afterDelete(){this.renderOnLifecycleChange()}renderOnLifecycleChange(){this.internal.renderCtx.loop.set({key:`${this.type}-${this.key}`,render:this.render.bind(this),priority:"high",canvases:k})}render(){this.deleted||!this.state.enabled||this.internal.renderCtx.erase(this.state.region,a.K.construct(0),...k)}}n(E,"TYPE","eraser");const st={[E.TYPE]:E};exports.Context=R;exports.Eraser=E;exports.GLProgram=K;exports.Loop=M;exports.Provider=S;exports.REGISTRY=st;exports.REGISTRY$1=$;exports.eraserStateZ=q;exports.providerStateZ=G;exports.useInstrumentation=Y;
package/dist/ether.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-B8IM-N4g.cjs");require("./css-C7rJrqRi.cjs");const r=require("./eraser-C0Kv4_kL.cjs"),e=require("./value-BVL4mfhG.cjs");require("./state-DwM4WaEw.cjs");const i=require("./fontString-CUy7T-OR.cjs"),l=Object.freeze(Object.defineProperty({__proto__:null,Provider:t.Provider,REGISTRY:t.REGISTRY,SYNNAX_DARK:t.SYNNAX_DARK,SYNNAX_LIGHT:t.SYNNAX_LIGHT,SYNNAX_THEMES:t.SYNNAX_THEMES,fontSpecZ:t.fontSpecZ,fontString:i.fontString,themeZ:t.themeZ,use:t.use},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,Context:r.Context,GLProgram:r.GLProgram,Loop:r.Loop,control:e.control,request:e.request,useOptionalRequestor:e.useOptionalRequestor,useRequestor:e.useRequestor},Symbol.toStringTag,{value:"Module"})),s=Object.freeze(Object.defineProperty({__proto__:null,BoundQuerier:e.BoundQuerier,LinePlot:e.LinePlot,REGISTRY:e.REGISTRY,XAxis:e.XAxis,YAxis:e.YAxis,boundQuerierStateZ:e.boundQuerierStateZ,linePlotStateZ:e.linePlotStateZ,xAxisStateZ:e.xAxisStateZ,yAxisStateZ:e.yAxisStateZ},Symbol.toStringTag,{value:"Module"})),a=()=>{const o=new t.l((R,S)=>postMessage(R,S));onmessage=o.handle.bind(o);const n={...r.REGISTRY$1,...e.REGISTRY$17,...e.REGISTRY$16,...e.REGISTRY$15,...e.REGISTRY$14,...r.REGISTRY,...e.REGISTRY$13,...e.REGISTRY$12,...e.REGISTRY,...e.REGISTRY$11,...e.REGISTRY$10,...e.REGISTRY$9,...e.REGISTRY$8,...t.REGISTRY$1,...e.REGISTRY$7,...e.REGISTRY$6,...t.REGISTRY,...e.REGISTRY$5,...e.REGISTRY$4,...e.REGISTRY$3,...e.REGISTRY$2,...e.REGISTRY$1};t.render({comms:o.route("vis"),registry:n,instrumentation:new t.C({logger:new t.P({filters:[t.Pe("info")]})})})},T=Object.freeze(Object.defineProperty({__proto__:null,render:a},Symbol.toStringTag,{value:"Module"}));exports.aether=t.aether;exports.canvas=e.canvas;exports.diagram=e.Diagram;exports.measure=e.measure;exports.rule=e.aether;exports.synnax=e.provider;exports.telem=e.external;exports.tooltip=e.tooltip;exports.value=e.value;exports.lineplot=s;exports.pluto=T;exports.render=u;exports.theming=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./provider-YWPkhTn6.cjs");require("./css-C7rJrqRi.cjs");const r=require("./eraser-CGxyWj3B.cjs"),e=require("./value--TYeJRXm.cjs");require("./state-DwM4WaEw.cjs");const i=require("./fontString-BWECl_1B.cjs"),l=Object.freeze(Object.defineProperty({__proto__:null,Provider:t.Provider,REGISTRY:t.REGISTRY,SYNNAX_DARK:t.SYNNAX_DARK,SYNNAX_LIGHT:t.SYNNAX_LIGHT,SYNNAX_THEMES:t.SYNNAX_THEMES,fontSpecZ:t.fontSpecZ,fontString:i.fontString,themeZ:t.themeZ,use:t.use},Symbol.toStringTag,{value:"Module"})),u=Object.freeze(Object.defineProperty({__proto__:null,Context:r.Context,GLProgram:r.GLProgram,Loop:r.Loop,control:e.control,request:e.request,useOptionalRequestor:e.useOptionalRequestor,useRequestor:e.useRequestor},Symbol.toStringTag,{value:"Module"})),s=Object.freeze(Object.defineProperty({__proto__:null,BoundQuerier:e.BoundQuerier,LinePlot:e.LinePlot,REGISTRY:e.REGISTRY,XAxis:e.XAxis,YAxis:e.YAxis,boundQuerierStateZ:e.boundQuerierStateZ,linePlotStateZ:e.linePlotStateZ,xAxisStateZ:e.xAxisStateZ,yAxisStateZ:e.yAxisStateZ},Symbol.toStringTag,{value:"Module"})),a=()=>{const o=new t.l((R,S)=>postMessage(R,S));onmessage=o.handle.bind(o);const n={...r.REGISTRY$1,...e.REGISTRY$17,...e.REGISTRY$16,...e.REGISTRY$15,...e.REGISTRY$14,...r.REGISTRY,...e.REGISTRY$13,...e.REGISTRY$12,...e.REGISTRY,...e.REGISTRY$11,...e.REGISTRY$10,...e.REGISTRY$9,...e.REGISTRY$8,...t.REGISTRY$1,...e.REGISTRY$7,...e.REGISTRY$6,...t.REGISTRY,...e.REGISTRY$5,...e.REGISTRY$4,...e.REGISTRY$3,...e.REGISTRY$2,...e.REGISTRY$1};t.render({comms:o.route("vis"),registry:n,instrumentation:new t.C({logger:new t.P({filters:[t.Pe("info")]})})})},T=Object.freeze(Object.defineProperty({__proto__:null,render:a},Symbol.toStringTag,{value:"Module"}));exports.aether=t.aether;exports.canvas=e.canvas;exports.diagram=e.Diagram;exports.measure=e.measure;exports.rule=e.aether;exports.synnax=e.provider;exports.telem=e.external;exports.tooltip=e.tooltip;exports.value=e.value;exports.lineplot=s;exports.pluto=T;exports.render=u;exports.theming=l;
package/dist/ether.js CHANGED
@@ -1,11 +1,11 @@
1
- import { P as R, R as a, S as n, a as S, b as l, f as i, t as u, u as T, l as m, c as G, r as Y, C as E, d as $, e as p } from "./provider-CQqS-teQ.js";
2
- import { g as me } from "./provider-CQqS-teQ.js";
1
+ import { P as R, R as a, S as n, a as S, b as l, f as i, t as u, u as T, l as m, c as G, r as Y, C as E, d as $, e as p } from "./provider-gW90qzEG.js";
2
+ import { g as me } from "./provider-gW90qzEG.js";
3
3
  import "./css-DjQu2Qyf.js";
4
- import { C as I, G as c, L as f, R as d, a as g } from "./eraser-CupVBBBp.js";
5
- import { c as _, r as b, u as x, a as y, B as P, L as j, R as s, X as v, Y as A, b as O, l as L, x as h, y as M, d as N, e as Z, f as w, g as z, h as X, i as q, j as C, k as H, m as k, n as B, o as D, p as Q, q as F, s as K, t as J, v as U, w as V } from "./value-DLy5XRhS.js";
6
- import { C as Ye, D as Ee, F as $e, G as pe, z as Ie, A as ce, E as fe, H as de } from "./value-DLy5XRhS.js";
4
+ import { C as I, G as c, L as f, R as d, a as g } from "./eraser-BJxXs5KS.js";
5
+ import { c as _, r as b, u as x, a as y, B as P, L as j, R as s, X as v, Y as A, b as O, l as L, x as h, y as M, d as N, e as Z, f as w, g as z, h as X, i as q, j as C, k as H, m as k, n as B, o as D, p as Q, q as F, s as K, t as J, v as U, w as V } from "./value-dkHk-BsO.js";
6
+ import { C as Ye, D as Ee, F as $e, G as pe, z as Ie, A as ce, E as fe, H as de } from "./value-dkHk-BsO.js";
7
7
  import "./state-DAFH2z9y.js";
8
- import { f as W } from "./fontString-CynarMI1.js";
8
+ import { f as W } from "./fontString-ap-NPnCD.js";
9
9
  const ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10
10
  __proto__: null,
11
11
  Provider: R,
@@ -3,14 +3,14 @@ import { t as U } from "./array-CPtP5Oov.js";
3
3
  import { j as N } from "./jsx-runtime-C5mzlN2N.js";
4
4
  import { y as Q, M as pe, e as ge, a as ye, d as xe, c as Ce } from "./Divider-CDFHLK9U.js";
5
5
  import { memo as Ne, useState as be, useCallback as b, useMemo as ve } from "react";
6
- import { B as Te, c as Ie } from "./Toggle-BC1o8qt5.js";
7
- import { L as je } from "./Link-y133HE5v.js";
6
+ import { B as Te, c as Ie } from "./Toggle-CbzT5wR_.js";
7
+ import { L as je } from "./Link-DcudTtgT.js";
8
8
  import { u as Ae } from "./Haul-D6kpOYBa.js";
9
- import { u as Le, a as $e, C as V, L as we, S as Ee } from "./Text-B1uUpUKk.js";
9
+ import { u as Le, a as $e, C as V, L as we, S as Ee } from "./Text-wL3te5S6.js";
10
10
  import "./Stack-D50qN0Vu.js";
11
11
  import { e as Se } from "./state-DAFH2z9y.js";
12
12
  import { a as _e, C as Oe } from "./ContextMenu-DLM5eLLG.js";
13
- import "./provider-CQqS-teQ.js";
13
+ import "./provider-gW90qzEG.js";
14
14
  import { v as Pe } from "./hooks-u_TgL0Xi.js";
15
15
  const Z = ({
16
16
  className: e,
@@ -3,10 +3,10 @@ import { K as mt, P as je, o as te, C as J, d as $c, A as ah, s as ih, W as oh }
3
3
  import f, { useCallback as Re, isValidElement as sh, PureComponent as Ir, Component as jr, createContext as uh, use as lh, useMemo as Lc, useRef as xt } from "react";
4
4
  import "./Stack-D50qN0Vu.js";
5
5
  import { S as Pr } from "./Space-DxHm2ok7.js";
6
- import { B as ch, I as fh } from "./Toggle-BC1o8qt5.js";
6
+ import { B as ch, I as fh } from "./Toggle-CbzT5wR_.js";
7
7
  import { b as hh, f as Fo, u as ph } from "./Haul-D6kpOYBa.js";
8
- import { u as dh } from "./Provider-CAR23fYq.js";
9
- import "./provider-CQqS-teQ.js";
8
+ import { u as dh } from "./Provider-CLPfWTcl.js";
9
+ import "./provider-gW90qzEG.js";
10
10
  import { o as Hc, n as _t, r as Ri, b as Ai } from "./state-DAFH2z9y.js";
11
11
  import { c as Nc, T as Gc, y as gh, E as vh } from "./Divider-CDFHLK9U.js";
12
12
  import { c as Gr, g as tt } from "./useVirtualCursorDragWebKit-CfxbToxm.js";
@@ -1 +1 @@
1
- "use strict";const o=require("./jsx-runtime-CITbqOLs.cjs"),j=require("./Divider-D74_FAXn.cjs"),r=require("./css-C7rJrqRi.cjs"),a=require("react");require("./Stack-BbwDtaE6.cjs");const k=require("./Space-ByFmfiTa.cjs"),H=require("./Pack-80N7XB5O.cjs"),M=require("./Toggle-D-vvd8lz.cjs"),Q=require("./deep-BRgXTyZn.cjs"),_=require("./ContextMenu-BC5x7XR5.cjs");require("./Item-BrHZi6Fl.cjs");const i=require("./state-DwM4WaEw.cjs"),T=(t,s)=>a.cloneElement(t,{className:r.CSS(t.props.className,r.CSS.B("sub"),r.CSS.M(s))}),q=({topRight:t,topLeft:s,bottomLeft:e,bottomRight:l,children:n,className:c,...u})=>o.jsxRuntimeExports.jsxs("div",{className:r.CSS(c,r.CSS.B("icon")),...u,children:[t&&T(t,"topRight"),s&&T(s,"topLeft"),e&&T(e,"bottomLeft"),l&&T(l,"bottomRight"),n]}),Y=t=>o.jsxRuntimeExports.jsx(q,{topRight:o.jsxRuntimeExports.jsx(j.y4.Add,{}),...t}),K=t=>o.jsxRuntimeExports.jsx(q,{topRight:o.jsxRuntimeExports.jsx(j.y4.Import,{}),...t}),B=(t,s)=>{if(t!=null){if(typeof t=="string")try{const e=Q.J.get(j.y4,t);return o.jsxRuntimeExports.jsx(e,{...s})}catch{throw new Error(`Unable to find icon with path ${t} in registry`)}return a.cloneElement(t,s)}},ee=Object.freeze(Object.defineProperty({__proto__:null,Create:Y,Icon:q,Import:K,resolve:B},Symbol.toStringTag,{value:"Module"})),L=a.createContext({tabs:[]}),D=L,I=()=>a.use(L),O="tabs-selector",A=({className:t,altColor:s=!1,size:e="medium",direction:l="x",contextMenu:n,addTooltip:c,...u})=>{const{tabs:x,selected:m,onSelect:d,onClose:y,closable:h,onDragEnd:b,onDragStart:P,onDrop:v,onRename:C,onCreate:f}=I(),R=_.useContextMenu(),[N,g]=a.useState(!1);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[n!=null&&o.jsxRuntimeExports.jsx(_.ContextMenu,{style:{height:"fit-content"},...R,menu:n}),o.jsxRuntimeExports.jsxs(k.Space,{className:r.CSS(r.CSS.B(O),r.CSS.size(e),t,R.className,N&&r.CSS.M("drag-over")),align:"center",justify:"spaceBetween",empty:!0,direction:l,onContextMenu:R.open,onDrop:v,...u,children:[o.jsxRuntimeExports.jsxs(k.Space,{direction:l,className:r.CSS.BE(O,"tabs"),empty:!0,children:[x.map(S=>o.jsxRuntimeExports.jsx(re,{selected:m,altColor:s,onSelect:d,onClose:y,onDragStart:P,onDragEnd:b,onRename:C,closable:S.closable??h,size:e,...S},S.tabKey)),v!=null&&o.jsxRuntimeExports.jsx(k.Space,{onDragOver:()=>g(!0),onDragLeave:()=>g(!1),onDragEnd:()=>g(!1),onDrop:()=>g(!1),grow:!0})]}),f!=null&&o.jsxRuntimeExports.jsx(k.Space,{className:r.CSS.BE(O,"actions"),children:o.jsxRuntimeExports.jsx(M.Icon,{size:e,sharp:!0,onClick:f,tooltip:c,children:o.jsxRuntimeExports.jsx(j.y4.Add,{})})})]})]})},te=({unsavedChanges:t,...s})=>{const e=o.jsxRuntimeExports.jsx(j.y4.Close,{...s});return t?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(j.y4.Circle,{}),e]}):e},se=t=>{const s=r.Pt.construct(t.target.closest(".pluto-tabs-selector__btn")),e=r.K.construct(t);return r.A.Scale.scale(r.Pt.left(s),r.Pt.right(s)).scale(0,1).pos(e.x)<.5?"left":"right"},ne=({loading:t,icon:s,level:e="p"})=>(t&&(s=o.jsxRuntimeExports.jsx(j.y4.Loading,{})),B(s,{className:r.CSS.BE(O,"icon"),style:{color:r.CSS.shadeVar(9),height:r.CSS.levelSizeVar(e),width:r.CSS.levelSizeVar(e)}})),re=({selected:t,altColor:s=!1,onSelect:e,onClose:l,tabKey:n,name:c,onDragStart:u,onDragEnd:x,onRename:m,closable:d=!0,icon:y,size:h,editable:b=!0,unsavedChanges:P=!1,loading:v=!1,onDrop:C})=>{const f=a.useCallback(p=>u==null?void 0:u(p,{tabKey:n,name:c}),[u,n,c]),R=a.useCallback(p=>x==null?void 0:x(p,{tabKey:n,name:c}),[x,n,c]),N=a.useCallback(p=>{p.preventDefault(),p.stopPropagation(),l==null||l(n)},[l,n]),g=a.useCallback(()=>e==null?void 0:e(n),[e,n]),[S,E]=a.useState(null),G=a.useCallback(p=>{E(se(p))},[E,C]),J=a.useCallback(p=>{C==null||C(p),E(null)},[C,E]),w=t===n,U=i.ComponentSizeLevels[h];return o.jsxRuntimeExports.jsxs(H.Pack,{size:h,id:n,className:r.CSS(r.CSS.BE(O,"btn"),_.CONTEXT_TARGET,w&&_.CONTEXT_SELECTED,r.CSS.selected(w),r.CSS.altColor(s),d&&l!=null&&r.CSS.M("closable"),r.CSS.editable(b&&m!=null),S!=null&&r.CSS.M("drag-over"),S!=null&&r.CSS.loc(S)),draggable:!0,x:!0,justify:"center",align:"center",onClick:g,onDragOver:G,onDrop:J,onDragLeave:()=>E(null),onDragStart:f,onDragEnd:p=>{E(null),R(p)},bordered:!1,rounded:!1,children:[o.jsxRuntimeExports.jsx(ne,{loading:v,icon:y,level:U}),o.jsxRuntimeExports.jsx(oe,{name:c,tabKey:n,onRename:m,editable:b,level:i.ComponentSizeLevels[h]}),d&&l!=null&&o.jsxRuntimeExports.jsx(M.Icon,{"aria-label":"pluto-tabs__close",onClick:N,className:r.CSS.E("close"),children:o.jsxRuntimeExports.jsx(te,{unsavedChanges:P})})]})},oe=({onRename:t,name:s,tabKey:e,editable:l=!0,...n})=>t==null||!l?o.jsxRuntimeExports.jsx(j.Text,{noWrap:!0,...n,children:s}):o.jsxRuntimeExports.jsx(j.Editable,{id:r.CSS.B(`tab-${e}`),onChange:c=>t(e,c),value:s,noWrap:!0,...n}),z=(t="",s=[])=>{var e;if(s.length!==0)return s.find(l=>l.tabKey===t)!=null?t:(e=s[s.length-1])==null?void 0:e.tabKey},V=(t,s,e)=>{if(s=s.trim(),s.length===0)return e;const l=e.find(n=>n.tabKey===t);return l==null||l.name===s?e:e.map(n=>n.tabKey===t?{...n,name:s}:n)},Z=({tabs:t,content:s,selected:e,onSelect:l})=>{var m;const[n,c]=i.usePurePassthrough({initial:e??((m=t[0])==null?void 0:m.tabKey)??"",value:e,onChange:l}),u=j.useSyncedRef(e??n),x=a.useCallback(d=>{c(d),u.current==null&&(l==null||l(d))},[n,l]);return{tabs:t,selected:n,content:s,onSelect:x}},$=({id:t,content:s,children:e,onSelect:l,selected:n,selectedAltColor:c,closable:u,tabs:x,onClose:m,onDragStart:d,onDragEnd:y,onCreate:h,onRename:b,emptyContent:P,className:v,onDragOver:C,onDrop:f,contextMenu:R,addTooltip:N,size:g="medium",direction:S="y",...E})=>o.jsxRuntimeExports.jsx(k.Space,{id:t,empty:!0,className:r.CSS(r.CSS.B("tabs"),v),onDragOver:C,onDrop:f,direction:S,...E,children:o.jsxRuntimeExports.jsxs(D,{value:{tabs:x,emptyContent:P,selected:n,closable:u,content:e??s,onSelect:l,onClose:m,onDragStart:d,onDragEnd:y,onRename:b,onCreate:h,onDrop:f},children:[o.jsxRuntimeExports.jsx(A,{size:g,direction:r.g.swap(S),altColor:c,contextMenu:R,addTooltip:N}),o.jsxRuntimeExports.jsx(F,{})]})}),F=()=>{const{tabs:t,selected:s,content:e,emptyContent:l,onSelect:n}=I();let c=null;const u=t.find(x=>x.tabKey===s);return s==null||u==null?c=l??null:e!=null?typeof e=="function"?c=e(u):c=e:u.content!=null&&(c=u.content),o.jsxRuntimeExports.jsx("div",{className:r.CSS.B("tabs-content"),onClick:()=>s!=null&&(n==null?void 0:n(s)),children:c})},W=i.object({tabKey:i.string(),name:i.string(),closable:i.boolean().optional(),icon:i.unknown().optional(),editable:i.boolean().optional(),visible:i.boolean().optional(),unsavedChanges:i.boolean().optional(),loading:i.boolean().optional()}),X=W.extend({content:i.unknown().optional()}),le=Object.freeze(Object.defineProperty({__proto__:null,Content:F,Provider:D,Selector:A,Tabs:$,rename:V,resetSelection:z,specZ:W,tabZ:X,useContext:I,useStatic:Z},Symbol.toStringTag,{value:"Module"}));exports.Icon=ee;exports.Tabs=$;exports.external=le;exports.rename=V;exports.resetSelection=z;exports.resolve=B;exports.tabZ=X;exports.useStatic=Z;
1
+ "use strict";const o=require("./jsx-runtime-CITbqOLs.cjs"),j=require("./Divider-D74_FAXn.cjs"),r=require("./css-C7rJrqRi.cjs"),a=require("react");require("./Stack-BbwDtaE6.cjs");const k=require("./Space-ByFmfiTa.cjs"),H=require("./Pack-80N7XB5O.cjs"),M=require("./Toggle-CpDGR6M6.cjs"),Q=require("./deep-BRgXTyZn.cjs"),_=require("./ContextMenu-BC5x7XR5.cjs");require("./Item-CB5c--eX.cjs");const i=require("./state-DwM4WaEw.cjs"),T=(t,s)=>a.cloneElement(t,{className:r.CSS(t.props.className,r.CSS.B("sub"),r.CSS.M(s))}),q=({topRight:t,topLeft:s,bottomLeft:e,bottomRight:l,children:n,className:c,...u})=>o.jsxRuntimeExports.jsxs("div",{className:r.CSS(c,r.CSS.B("icon")),...u,children:[t&&T(t,"topRight"),s&&T(s,"topLeft"),e&&T(e,"bottomLeft"),l&&T(l,"bottomRight"),n]}),Y=t=>o.jsxRuntimeExports.jsx(q,{topRight:o.jsxRuntimeExports.jsx(j.y4.Add,{}),...t}),K=t=>o.jsxRuntimeExports.jsx(q,{topRight:o.jsxRuntimeExports.jsx(j.y4.Import,{}),...t}),B=(t,s)=>{if(t!=null){if(typeof t=="string")try{const e=Q.J.get(j.y4,t);return o.jsxRuntimeExports.jsx(e,{...s})}catch{throw new Error(`Unable to find icon with path ${t} in registry`)}return a.cloneElement(t,s)}},ee=Object.freeze(Object.defineProperty({__proto__:null,Create:Y,Icon:q,Import:K,resolve:B},Symbol.toStringTag,{value:"Module"})),L=a.createContext({tabs:[]}),D=L,I=()=>a.use(L),O="tabs-selector",A=({className:t,altColor:s=!1,size:e="medium",direction:l="x",contextMenu:n,addTooltip:c,...u})=>{const{tabs:x,selected:m,onSelect:d,onClose:y,closable:h,onDragEnd:b,onDragStart:P,onDrop:v,onRename:C,onCreate:f}=I(),R=_.useContextMenu(),[N,g]=a.useState(!1);return o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[n!=null&&o.jsxRuntimeExports.jsx(_.ContextMenu,{style:{height:"fit-content"},...R,menu:n}),o.jsxRuntimeExports.jsxs(k.Space,{className:r.CSS(r.CSS.B(O),r.CSS.size(e),t,R.className,N&&r.CSS.M("drag-over")),align:"center",justify:"spaceBetween",empty:!0,direction:l,onContextMenu:R.open,onDrop:v,...u,children:[o.jsxRuntimeExports.jsxs(k.Space,{direction:l,className:r.CSS.BE(O,"tabs"),empty:!0,children:[x.map(S=>o.jsxRuntimeExports.jsx(re,{selected:m,altColor:s,onSelect:d,onClose:y,onDragStart:P,onDragEnd:b,onRename:C,closable:S.closable??h,size:e,...S},S.tabKey)),v!=null&&o.jsxRuntimeExports.jsx(k.Space,{onDragOver:()=>g(!0),onDragLeave:()=>g(!1),onDragEnd:()=>g(!1),onDrop:()=>g(!1),grow:!0})]}),f!=null&&o.jsxRuntimeExports.jsx(k.Space,{className:r.CSS.BE(O,"actions"),children:o.jsxRuntimeExports.jsx(M.Icon,{size:e,sharp:!0,onClick:f,tooltip:c,children:o.jsxRuntimeExports.jsx(j.y4.Add,{})})})]})]})},te=({unsavedChanges:t,...s})=>{const e=o.jsxRuntimeExports.jsx(j.y4.Close,{...s});return t?o.jsxRuntimeExports.jsxs(o.jsxRuntimeExports.Fragment,{children:[o.jsxRuntimeExports.jsx(j.y4.Circle,{}),e]}):e},se=t=>{const s=r.Pt.construct(t.target.closest(".pluto-tabs-selector__btn")),e=r.K.construct(t);return r.A.Scale.scale(r.Pt.left(s),r.Pt.right(s)).scale(0,1).pos(e.x)<.5?"left":"right"},ne=({loading:t,icon:s,level:e="p"})=>(t&&(s=o.jsxRuntimeExports.jsx(j.y4.Loading,{})),B(s,{className:r.CSS.BE(O,"icon"),style:{color:r.CSS.shadeVar(9),height:r.CSS.levelSizeVar(e),width:r.CSS.levelSizeVar(e)}})),re=({selected:t,altColor:s=!1,onSelect:e,onClose:l,tabKey:n,name:c,onDragStart:u,onDragEnd:x,onRename:m,closable:d=!0,icon:y,size:h,editable:b=!0,unsavedChanges:P=!1,loading:v=!1,onDrop:C})=>{const f=a.useCallback(p=>u==null?void 0:u(p,{tabKey:n,name:c}),[u,n,c]),R=a.useCallback(p=>x==null?void 0:x(p,{tabKey:n,name:c}),[x,n,c]),N=a.useCallback(p=>{p.preventDefault(),p.stopPropagation(),l==null||l(n)},[l,n]),g=a.useCallback(()=>e==null?void 0:e(n),[e,n]),[S,E]=a.useState(null),G=a.useCallback(p=>{E(se(p))},[E,C]),J=a.useCallback(p=>{C==null||C(p),E(null)},[C,E]),w=t===n,U=i.ComponentSizeLevels[h];return o.jsxRuntimeExports.jsxs(H.Pack,{size:h,id:n,className:r.CSS(r.CSS.BE(O,"btn"),_.CONTEXT_TARGET,w&&_.CONTEXT_SELECTED,r.CSS.selected(w),r.CSS.altColor(s),d&&l!=null&&r.CSS.M("closable"),r.CSS.editable(b&&m!=null),S!=null&&r.CSS.M("drag-over"),S!=null&&r.CSS.loc(S)),draggable:!0,x:!0,justify:"center",align:"center",onClick:g,onDragOver:G,onDrop:J,onDragLeave:()=>E(null),onDragStart:f,onDragEnd:p=>{E(null),R(p)},bordered:!1,rounded:!1,children:[o.jsxRuntimeExports.jsx(ne,{loading:v,icon:y,level:U}),o.jsxRuntimeExports.jsx(oe,{name:c,tabKey:n,onRename:m,editable:b,level:i.ComponentSizeLevels[h]}),d&&l!=null&&o.jsxRuntimeExports.jsx(M.Icon,{"aria-label":"pluto-tabs__close",onClick:N,className:r.CSS.E("close"),children:o.jsxRuntimeExports.jsx(te,{unsavedChanges:P})})]})},oe=({onRename:t,name:s,tabKey:e,editable:l=!0,...n})=>t==null||!l?o.jsxRuntimeExports.jsx(j.Text,{noWrap:!0,...n,children:s}):o.jsxRuntimeExports.jsx(j.Editable,{id:r.CSS.B(`tab-${e}`),onChange:c=>t(e,c),value:s,noWrap:!0,...n}),z=(t="",s=[])=>{var e;if(s.length!==0)return s.find(l=>l.tabKey===t)!=null?t:(e=s[s.length-1])==null?void 0:e.tabKey},V=(t,s,e)=>{if(s=s.trim(),s.length===0)return e;const l=e.find(n=>n.tabKey===t);return l==null||l.name===s?e:e.map(n=>n.tabKey===t?{...n,name:s}:n)},Z=({tabs:t,content:s,selected:e,onSelect:l})=>{var m;const[n,c]=i.usePurePassthrough({initial:e??((m=t[0])==null?void 0:m.tabKey)??"",value:e,onChange:l}),u=j.useSyncedRef(e??n),x=a.useCallback(d=>{c(d),u.current==null&&(l==null||l(d))},[n,l]);return{tabs:t,selected:n,content:s,onSelect:x}},$=({id:t,content:s,children:e,onSelect:l,selected:n,selectedAltColor:c,closable:u,tabs:x,onClose:m,onDragStart:d,onDragEnd:y,onCreate:h,onRename:b,emptyContent:P,className:v,onDragOver:C,onDrop:f,contextMenu:R,addTooltip:N,size:g="medium",direction:S="y",...E})=>o.jsxRuntimeExports.jsx(k.Space,{id:t,empty:!0,className:r.CSS(r.CSS.B("tabs"),v),onDragOver:C,onDrop:f,direction:S,...E,children:o.jsxRuntimeExports.jsxs(D,{value:{tabs:x,emptyContent:P,selected:n,closable:u,content:e??s,onSelect:l,onClose:m,onDragStart:d,onDragEnd:y,onRename:b,onCreate:h,onDrop:f},children:[o.jsxRuntimeExports.jsx(A,{size:g,direction:r.g.swap(S),altColor:c,contextMenu:R,addTooltip:N}),o.jsxRuntimeExports.jsx(F,{})]})}),F=()=>{const{tabs:t,selected:s,content:e,emptyContent:l,onSelect:n}=I();let c=null;const u=t.find(x=>x.tabKey===s);return s==null||u==null?c=l??null:e!=null?typeof e=="function"?c=e(u):c=e:u.content!=null&&(c=u.content),o.jsxRuntimeExports.jsx("div",{className:r.CSS.B("tabs-content"),onClick:()=>s!=null&&(n==null?void 0:n(s)),children:c})},W=i.object({tabKey:i.string(),name:i.string(),closable:i.boolean().optional(),icon:i.unknown().optional(),editable:i.boolean().optional(),visible:i.boolean().optional(),unsavedChanges:i.boolean().optional(),loading:i.boolean().optional()}),X=W.extend({content:i.unknown().optional()}),le=Object.freeze(Object.defineProperty({__proto__:null,Content:F,Provider:D,Selector:A,Tabs:$,rename:V,resetSelection:z,specZ:W,tabZ:X,useContext:I,useStatic:Z},Symbol.toStringTag,{value:"Module"}));exports.Icon=ee;exports.Tabs=$;exports.external=le;exports.rename=V;exports.resetSelection=z;exports.resolve=B;exports.tabZ=X;exports.useStatic=Z;
@@ -1 +1 @@
1
- "use strict";const r=require("./provider-B8IM-N4g.cjs"),e=require("./Provider-B1j7nPL9.cjs"),t=require("./font-C5EV9fq1.cjs"),o=Object.freeze(Object.defineProperty({__proto__:null,Provider:e.Provider,SYNNAX_DARK:r.SYNNAX_DARK,SYNNAX_LIGHT:r.SYNNAX_LIGHT,SYNNAX_THEMES:r.SYNNAX_THEMES,Switch:e.Switch,themeZ:r.themeZ,toCSSVars:e.toCSSVars,use:e.use,useContext:e.useContext,useProvider:e.useProvider,useTypography:t.useTypography},Symbol.toStringTag,{value:"Module"}));exports.external=o;
1
+ "use strict";const r=require("./provider-YWPkhTn6.cjs"),e=require("./Provider-s70PZ9lg.cjs"),t=require("./font-ifUcrCey.cjs"),o=Object.freeze(Object.defineProperty({__proto__:null,Provider:e.Provider,SYNNAX_DARK:r.SYNNAX_DARK,SYNNAX_LIGHT:r.SYNNAX_LIGHT,SYNNAX_THEMES:r.SYNNAX_THEMES,Switch:e.Switch,themeZ:r.themeZ,toCSSVars:e.toCSSVars,use:e.use,useContext:e.useContext,useProvider:e.useProvider,useTypography:t.useTypography},Symbol.toStringTag,{value:"Module"}));exports.external=o;
@@ -1 +1 @@
1
- "use strict";const o=require("./jsx-runtime-CITbqOLs.cjs"),n=require("./css-C7rJrqRi.cjs"),c=require("react");require("./Stack-BbwDtaE6.cjs");const x=require("./Space-ByFmfiTa.cjs"),d=require("./Toggle-D-vvd8lz.cjs"),S=require("./WithIcon-CCnlO2LC.cjs");require("./Divider-D74_FAXn.cjs");const j=require("./state-DwM4WaEw.cjs"),R=require("./array-CZHEGH95.cjs"),m=c.createContext({divided:!1,level:"h1"}),l=()=>c.use(m),p=({className:t,level:s="h1",divided:e=!1,...r})=>o.jsxRuntimeExports.jsx(m,{value:{level:s,divided:e},children:o.jsxRuntimeExports.jsx(x.Space,{el:"header",x:!0,justify:"spaceBetween",className:n.CSS(n.CSS.B("header"),n.CSS.bordered("bottom"),e&&n.CSS.BM("header","divided"),t),...r})}),v=({children:t=[],...s})=>{const{level:e,divided:r}=l();return o.jsxRuntimeExports.jsx(x.Space,{x:!0,size:"small",align:"center",className:n.CSS.BE("header","actions"),...s,children:R.t.toArray(t).map((i,a)=>o.jsxRuntimeExports.jsx(q,{index:a,level:e,divided:r,children:i},a))})},q=({index:t,level:s,children:e,divided:r})=>{let i=e;if(!c.isValidElement(e)){const{onClick:a,key:h,...E}=e;i=o.jsxRuntimeExports.jsx(d.Icon,{onClick:u=>{u.stopPropagation(),u.preventDefault(),a==null||a(u)},size:j.LevelComponentSizes[s],...E},h??t)}return o.jsxRuntimeExports.jsxs(c.Fragment,{children:[r&&o.jsxRuntimeExports.jsx(S.Divider,{}),i]},t)},C=({children:t="",className:s,onClick:e,...r})=>{const{level:i}=l();return o.jsxRuntimeExports.jsx(d.Button,{variant:"text",size:j.LevelComponentSizes[i],onClick:e,className:n.CSS(n.CSS.B("header-button-title"),s),sharp:!0,...r,children:t})},B=({className:t,level:s,...e})=>{const{level:r,divided:i}=l();return o.jsxRuntimeExports.jsx(S.WithIcon,{className:n.CSS(n.CSS.BE("header","text"),t),level:s??r,divided:i,size:1.5,...e})},f=Object.freeze(Object.defineProperty({__proto__:null,Actions:v,ButtonTitle:C,Header:p,Title:B,useContext:l},Symbol.toStringTag,{value:"Module"}));exports.Actions=v;exports.ButtonTitle=C;exports.Header=p;exports.external=f;
1
+ "use strict";const o=require("./jsx-runtime-CITbqOLs.cjs"),n=require("./css-C7rJrqRi.cjs"),c=require("react");require("./Stack-BbwDtaE6.cjs");const x=require("./Space-ByFmfiTa.cjs"),d=require("./Toggle-CpDGR6M6.cjs"),S=require("./WithIcon-CCnlO2LC.cjs");require("./Divider-D74_FAXn.cjs");const j=require("./state-DwM4WaEw.cjs"),R=require("./array-CZHEGH95.cjs"),m=c.createContext({divided:!1,level:"h1"}),l=()=>c.use(m),p=({className:t,level:s="h1",divided:e=!1,...r})=>o.jsxRuntimeExports.jsx(m,{value:{level:s,divided:e},children:o.jsxRuntimeExports.jsx(x.Space,{el:"header",x:!0,justify:"spaceBetween",className:n.CSS(n.CSS.B("header"),n.CSS.bordered("bottom"),e&&n.CSS.BM("header","divided"),t),...r})}),v=({children:t=[],...s})=>{const{level:e,divided:r}=l();return o.jsxRuntimeExports.jsx(x.Space,{x:!0,size:"small",align:"center",className:n.CSS.BE("header","actions"),...s,children:R.t.toArray(t).map((i,a)=>o.jsxRuntimeExports.jsx(q,{index:a,level:e,divided:r,children:i},a))})},q=({index:t,level:s,children:e,divided:r})=>{let i=e;if(!c.isValidElement(e)){const{onClick:a,key:h,...E}=e;i=o.jsxRuntimeExports.jsx(d.Icon,{onClick:u=>{u.stopPropagation(),u.preventDefault(),a==null||a(u)},size:j.LevelComponentSizes[s],...E},h??t)}return o.jsxRuntimeExports.jsxs(c.Fragment,{children:[r&&o.jsxRuntimeExports.jsx(S.Divider,{}),i]},t)},C=({children:t="",className:s,onClick:e,...r})=>{const{level:i}=l();return o.jsxRuntimeExports.jsx(d.Button,{variant:"text",size:j.LevelComponentSizes[i],onClick:e,className:n.CSS(n.CSS.B("header-button-title"),s),sharp:!0,...r,children:t})},B=({className:t,level:s,...e})=>{const{level:r,divided:i}=l();return o.jsxRuntimeExports.jsx(S.WithIcon,{className:n.CSS(n.CSS.BE("header","text"),t),level:s??r,divided:i,size:1.5,...e})},f=Object.freeze(Object.defineProperty({__proto__:null,Actions:v,ButtonTitle:C,Header:p,Title:B,useContext:l},Symbol.toStringTag,{value:"Module"}));exports.Actions=v;exports.ButtonTitle=C;exports.Header=p;exports.external=f;
@@ -1,6 +1,6 @@
1
- import { S as e, a, b as o, t as r } from "./provider-CQqS-teQ.js";
2
- import { P as t, S as s, t as S, u, a as i, b as m } from "./Provider-CAR23fYq.js";
3
- import { u as p } from "./font-Cy9UYjyY.js";
1
+ import { S as e, a, b as o, t as r } from "./provider-gW90qzEG.js";
2
+ import { P as t, S as s, t as S, u, a as i, b as m } from "./Provider-CLPfWTcl.js";
3
+ import { u as p } from "./font-Csp00pQP.js";
4
4
  const N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5
5
  __proto__: null,
6
6
  Provider: t,
@@ -1 +1 @@
1
- "use strict";const e=require("./Toggle-D-vvd8lz.cjs"),o=require("./Link-Bngd8rrL.cjs"),n=Object.freeze(Object.defineProperty({__proto__:null,Button:e.Button,Icon:e.Icon,Link:o.Link,Toggle:e.Toggle,ToggleIcon:e.ToggleIcon},Symbol.toStringTag,{value:"Module"}));exports.external=n;
1
+ "use strict";const e=require("./Toggle-CpDGR6M6.cjs"),o=require("./Link-CPnT8Xp9.cjs"),n=Object.freeze(Object.defineProperty({__proto__:null,Button:e.Button,Icon:e.Icon,Link:o.Link,Toggle:e.Toggle,ToggleIcon:e.ToggleIcon},Symbol.toStringTag,{value:"Module"}));exports.external=n;
@@ -1,14 +1,14 @@
1
- import { a as ce, b as Ye, T, c as We, C as ze, D as He, H as Ve, I as Ue, L as Ge, S as Je, s as Qe, d as Xe, e as Ze, f as qe, g as et, h as tt, i as st, u as rt, j as nt, k as it, l as ut } from "./Text-B1uUpUKk.js";
1
+ import { a as ce, b as Ye, T, c as We, C as ze, D as He, H as Ve, I as Ue, L as Ge, S as Je, s as Qe, d as Xe, e as Ze, f as qe, g as et, h as tt, i as st, u as rt, j as nt, k as it, l as ut } from "./Text-wL3te5S6.js";
2
2
  import { j as C } from "./jsx-runtime-C5mzlN2N.js";
3
3
  import { useCallback as X, useRef as H, useEffect as de } from "react";
4
4
  import { S as ct } from "./css-DjQu2Qyf.js";
5
5
  import { f as De } from "./state-DAFH2z9y.js";
6
6
  import { u as Me } from "./useDebouncedCallback-Cvo_HNow.js";
7
- import { T as Be } from "./Text-P0b041la.js";
7
+ import { T as Be } from "./Text-BiWcjO1i.js";
8
8
  import { c as ot, y as at } from "./Divider-CDFHLK9U.js";
9
- import "./provider-CQqS-teQ.js";
9
+ import "./provider-gW90qzEG.js";
10
10
  import "./Stack-D50qN0Vu.js";
11
- import "./Toggle-BC1o8qt5.js";
11
+ import "./Toggle-CbzT5wR_.js";
12
12
  const _e = Symbol(), oe = Symbol(), k = "a", N = "w";
13
13
  let lt = (t, e) => new Proxy(t, e);
14
14
  const Z = Object.getPrototypeOf, ge = /* @__PURE__ */ new WeakMap(), ae = (t) => t && (ge.has(t) ? ge.get(t) : Z(t) === Object.prototype || Z(t) === Array.prototype), pe = (t) => typeof t == "object" && t !== null, Ae = /* @__PURE__ */ new WeakMap(), Se = (t) => t[oe] || t, xe = (t, e, s) => {
@@ -5,10 +5,10 @@ import { cloneElement as A, createContext as se, use as ne, useState as D, useCa
5
5
  import "./Stack-D50qN0Vu.js";
6
6
  import { S as _ } from "./Space-DxHm2ok7.js";
7
7
  import { P as le } from "./Pack-BiS6QIuA.js";
8
- import { I as $ } from "./Toggle-BC1o8qt5.js";
8
+ import { I as $ } from "./Toggle-CbzT5wR_.js";
9
9
  import { J as re } from "./deep-D72Fid_q.js";
10
10
  import { u as oe, b as ae, a as ce, C as ie } from "./ContextMenu-DLM5eLLG.js";
11
- import "./Item-BgUwEjzV.js";
11
+ import "./Item-LAMTj0X2.js";
12
12
  import { C as L, f as ue, o as de, g as T, h as V, b as R } from "./state-DAFH2z9y.js";
13
13
  const S = (t, s) => A(t, {
14
14
  className: o(t.props.className, o.B("sub"), o.M(s))