@synnaxlabs/pluto 0.28.4 → 0.28.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Animated-e4uMRKwj.js → Animated-BpXi9NWe.js} +1 -1
- package/dist/{Animated-E__GTTTG.cjs → Animated-DFza4wCT.cjs} +1 -1
- package/dist/{Keyboard-D3mL0Zj8.cjs → Keyboard-CbKUH8Eh.cjs} +1 -1
- package/dist/{Keyboard-BhVmFFcl.js → Keyboard-D7ybWHn0.js} +1 -1
- package/dist/{Link-DacxhXPG.cjs → Link-B8NxnNli.cjs} +1 -1
- package/dist/{Link-5Ul3dBhL.js → Link-D2fnWjvq.js} +1 -1
- package/dist/{List-UfPZeEyc.cjs → List-DFXYScV1.cjs} +1 -1
- package/dist/{List-BF7beadf.js → List-Dukgv-S0.js} +1 -1
- package/dist/{Toggle-C-n_Itw1.cjs → Toggle-CGbCK-dz.cjs} +1 -1
- package/dist/{Toggle-B5c5wLIa.js → Toggle-m9N7HK8Z.js} +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{external-CkJO9AWA.cjs → external-BEfayRpy.cjs} +1 -1
- package/dist/{external-UXw3IMWv.js → external-BMtI6oH4.js} +1 -1
- package/dist/{external-D6UV0Kg7.cjs → external-Bad1CwNW.cjs} +1 -1
- package/dist/{external-BtMF07eP.js → external-BdCCLUUg.js} +4 -4
- package/dist/{external-D8Ek2KlK.cjs → external-BrqfXbHQ.cjs} +1 -1
- package/dist/{external-1UbQK-gE.js → external-CObl_IIp.js} +1 -1
- package/dist/{external-COUlw2hk.js → external-Cg7eMkiE.js} +2 -2
- package/dist/{external-CVIiAxAn.cjs → external-CpeeWTtO.cjs} +1 -1
- package/dist/{external-CbeV5FZI.js → external-CuEzRxQ1.js} +4 -4
- package/dist/{external-Cn3ddBfz.cjs → external-CwLyjDOU.cjs} +1 -1
- package/dist/{external-BH8CIUWK.js → external-D8deprwW.js} +2 -2
- package/dist/{external-CEUEDiz0.cjs → external-DVOz9Cj-.cjs} +1 -1
- package/dist/{external-BNK-Ar1a.cjs → external-DY98yrhu.cjs} +1 -1
- package/dist/{external-DSaMHj0l.js → external-DiHS7NGb.js} +2 -2
- package/dist/{external-D4LqxMnz.js → external-DqipSbJg.js} +1 -1
- package/dist/{external-NPFKR0s7.cjs → external-Drm1djcp.cjs} +1 -1
- package/dist/{external-BpF04wV3.js → external-DsWUD-xw.js} +1 -1
- package/dist/{external-DQ3_QbC3.cjs → external-PZRTTZBD.cjs} +1 -1
- package/dist/{external-DQczkG9j.cjs → external-QDpeV2Bg.cjs} +1 -1
- package/dist/{external-BaQx1Ppf.js → external-ecHPjGBQ.js} +1 -1
- package/dist/{external-CKnDDP8u.cjs → external-fuYYBaX1.cjs} +1 -1
- package/dist/{external-BKdSRjD9.js → external-qVdtuqZn.js} +2 -2
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +21 -21
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/style.css +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +1 -1
- package/dist/text.js +2 -2
- package/dist/theming.cjs +1 -1
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/package.json +2 -2
|
@@ -43664,7 +43664,7 @@ const vce = {
|
|
|
43664
43664
|
)
|
|
43665
43665
|
});
|
|
43666
43666
|
const m = { ...y }, w = B3.z.safeParse(v), x = w.success && r === "filled";
|
|
43667
|
-
return x && (m[me.var("btn-color")] = w.data.rgbString, m[me.var("text-color")] = w.data.pickByContrast(
|
|
43667
|
+
return x && (m[me.var("btn-color")] = w.data.rgbString, m[me.var("btn-text-color")] = w.data.pickByContrast(
|
|
43668
43668
|
"#000000",
|
|
43669
43669
|
"#ffffff"
|
|
43670
43670
|
).rgbCSS), e == null && l != null ? e = w3[l] : e != null && l == null ? l = Jl[e] : e == null && (e = "medium"), /* @__PURE__ */ Ce.jsx(
|
package/dist/button.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-DY98yrhu.cjs");exports.Button=e.external;
|
package/dist/button.js
CHANGED
package/dist/color.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-DVOz9Cj-.cjs");exports.Color=e.external;
|
package/dist/color.js
CHANGED
package/dist/dropdown.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./Toggle-CGbCK-dz.cjs");exports.Dropdown=e.Dropdown;
|
package/dist/dropdown.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const k=require("./aggregator-C5NNOlCt.cjs"),R=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./Toggle-
|
|
1
|
+
"use strict";const k=require("./aggregator-C5NNOlCt.cjs"),R=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./Toggle-CGbCK-dz.cjs"),x=require("react"),re=require("./Link-B8NxnNli.cjs"),se=require("./Animated-DFza4wCT.cjs"),h=require("./css-C4GOlJsi.cjs");require("./Pack-BNnq0Pnk.cjs");const le=require("./List-DFXYScV1.cjs"),z=(e,t)=>t.includes(e.key),H=(e,t)=>{t&&e.sort((n,s)=>k.y.stringsWithNumbers(n.name,s.name));let r=!1;for(let n=0;n<e.length;n++){const s=e[n];s.forcePosition!=null&&n!==s.forcePosition&&(r=!0,e.splice(n,1),e.splice(s.forcePosition,0,s))}return r?H(e,!1):e},K=({nodes:e,expanded:t,depth:r=0,sort:n=!0})=>{r===0&&n&&(e=e.sort((l,i)=>l.name.localeCompare(i.name)));const s=[];return e.forEach((l,i)=>{const o=z(l,t);s.push({...l,depth:r,expanded:o,index:i}),o&&l.children!=null&&(l.children=H(l.children,n),s.push(...K({nodes:l.children,expanded:t,depth:r+1,sort:n})))}),s},ae=({tree:e,destination:t,keys:r})=>(r=k.A(r),r.forEach(n=>{const s=j({tree:e,key:n});s!=null&&(F({tree:e,keys:n}),V({tree:e,destination:t,additions:s}))}),e),F=({tree:e,keys:t})=>{t=k.A(t);const r=e.map(n=>n.key);return t.forEach(n=>{var l;const s=r.indexOf(n);if(s!==-1)e.splice(s,1);else{const i=q({tree:e,key:n});i!=null&&(i.children=(l=i.children)==null?void 0:l.filter(o=>o.key!==n))}}),e},V=({tree:e,destination:t,additions:r})=>{r=k.A(r);const n=j({tree:e,key:t});if(n==null)throw new Error(`Could not find node with key ${t}`);n.children==null&&(n.children=[]);const s=r.map(l=>l.key);return n.children=[...r,...n.children.filter(l=>!s.includes(l.key))],e},ie=({tree:e,key:t,updater:r,throwOnMissing:n=!0})=>{var i,o;const s=j({tree:e,key:t});if(s==null){if(n)throw new Error(`Could not find node with key ${t}`);return e}const l=q({tree:e,key:t});if(l!=null){const a=(i=l.children)==null?void 0:i.findIndex(S=>S.key===t);a!=null&&a!==-1&&((o=l.children)==null||o.splice(a,1,r(s)))}else e.splice(e.findIndex(a=>a.key===t),1,r(s));return e},oe=({tree:e,parent:t,updater:r,throwOnMissing:n=!0})=>{const s=j({tree:e,key:t});if(s==null){if(n)throw new Error(`Could not find node with key ${t}`);return e}return s.children=r(s.children??[]),e},j=({tree:e,key:t,depth:r=0})=>{for(let n=0;n<e.length;n++){const s=e[n];if(s.key===t){const l=s;return l.depth=r,l.position=n,l}if(s.children!=null){const l=j({tree:s.children,key:t,depth:r+1});if(l!=null)return l}}return null},ce=({tree:e,keys:t})=>{const r=[];for(const n of t){const s=j({tree:e,key:n});s!=null&&r.push(s)}return r},q=({tree:e,key:t})=>{for(const r of e)if(r.children!=null){if(r.children.some(s=>s.key===t))return r;const n=q({tree:r.children,key:t});if(n!=null)return n}return null},J=e=>e.map(t=>({...t,children:J(t.children??[])})),Q=(...e)=>{const t=[];return e.forEach(r=>{t.push(r),r.children!=null&&t.push(...Q(...r.children))}),t},M="tree-item",de=[["Shift"]],ue=e=>{const{onExpand:t,nodes:r,initialExpanded:n=[],sort:s=!0,selected:l,onSelectedChange:i}=e??{},[o,a,S]=d.useCombinedStateAndRef(n),[c,N]=k.usePassthrough({initial:[],value:l,onChange:i}),T=x.useMemo(()=>K({nodes:r,expanded:o,sort:s}),[r,o,s]),v=d.useSyncedRef(T),w=d.useHeldRef({triggers:de}),P=x.useCallback((f,{clicked:u})=>{N(f);const C=v.current.find(b=>b.key===u);if((C==null?void 0:C.hasChildren)===!1||u==null||w.current.held)return;const E=S.current,I=E.some(b=>b===u)?"contract":"expand";let y=E;I==="contract"?y=E.filter(b=>b!==u):y=[...E,u],a(y),t==null||t({current:y,action:I,clicked:u})},[t,v,a,N]),p=x.useCallback(f=>{a(u=>k.n([...u,f])),t==null||t({current:o,action:"expand",clicked:f})},[a]),L=x.useCallback(f=>{a(u=>u.filter(C=>C!==f)),t==null||t({current:o,action:"contract",clicked:f})},[a]),_=x.useCallback(()=>a([]),[a]);return{onSelect:P,selected:c,expanded:o,contract:L,expand:p,nodes:T,clearExpanded:_}},G=x.memo(({entry:e,selected:t,onSelect:r,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i,loading:o=!1,useMargin:a=!0,translate:S})=>{const{key:c,hasChildren:N=!1,allowRename:T=!1,children:v,icon:w,name:P,depth:p,expanded:L,href:_,haulItems:f=[]}=e,{getSelected:u}=d.useSelectionUtils(),{getSourceData:C}=d.useDataUtilContext(),E=N||v!=null&&v.length>0,I=[];E&&I.push(R.jsxRuntimeExports.jsx(se.Animated,{enabled:L,enabledLoc:"bottom",disabledLoc:"right"})),w!=null&&I.push(w);const y=[];o&&y.push(R.jsxRuntimeExports.jsx(d.St.Loading,{className:h.CSS.B("loading-indicator")}));const[b,O]=x.useState(!1),{startDrag:U,...Z}=d.useDragAndDrop({type:"Tree.Item",key:c,canDrop:x.useCallback(({items:m,source:$})=>{const g=m.map(A=>A.key);return O(!1),$.type==="Tree.Item"&&!g.includes(c)},[]),onDrop:x.useCallback(m=>(n==null?void 0:n(c,m))??[],[c,n]),onDragOver:x.useCallback(()=>O(!0),[])}),D=()=>{const m=u(),$=C().filter(g=>m.includes(g.key));if(m.includes(c)){const g=$.map(({key:A,haulItems:B,depth:X})=>[{type:M,key:A,data:{depth:X}},...(B==null?void 0:B.map(Y=>({...Y,data:{...Y.data,depth:X}})))??[]]).flat();return U(g,A=>l==null?void 0:l(c,A))}U([{type:M,key:c,data:{depth:p}},...f.map(g=>({...g,data:{...g.data,depth:p}}))],g=>l==null?void 0:l(c,g))},ee=a?"marginLeft":"paddingLeft";let W=p*2+1;E&&a&&(W-=1);const te={id:c,variant:"text",draggable:f.length>0,className:h.CSS(h.CSS.BE("list","item"),d.CONTEXT_TARGET,b&&h.CSS.M("dragging-over"),t&&d.CONTEXT_SELECTED,h.CSS.selected(t),E&&h.CSS.M("has-children"),h.CSS.BM("depth",p.toString())),onDragLeave:()=>O(!1),onDragStart:D,onClick:()=>r==null?void 0:r(c),style:{border:"none",position:S!=null?"absolute":"relative",transform:`translateY(${S}px)`,[ee]:`${W}rem`,"--pluto-tree-indicator-offset":`${p*1.5+(p===0?0:.5)}rem`},startIcon:I,iconSpacing:"small",noWrap:!0,endIcon:y,onDoubleClick:m=>i==null?void 0:i(c,m),href:_,...Z},ne=_!=null?re.Link:d.Button;return R.jsxRuntimeExports.jsx(ne,{className:h.CSS.BE("list","item"),...te,children:R.jsxRuntimeExports.jsx(d.MaybeEditable,{id:`text-${c}`,level:"p",allowDoubleClick:!1,value:P,disabled:!T,onChange:m=>s==null?void 0:s(c,m)})})});G.displayName="Tree.Item";const fe=d.componentRenderProp(G),he=({nodes:e,selected:t=[],onSelect:r,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i,className:o,children:a=fe,itemHeight:S=27,useMargin:c=!1,showRules:N=!1,virtual:T=!0,clearExpanded:v,expand:w,contract:P,emptyContent:p,loading:L,..._})=>{const f=T?d.Core.Virtual:d.Core;return R.jsxRuntimeExports.jsx(le.List,{data:e,emptyContent:p,children:R.jsxRuntimeExports.jsx(d.Selector,{value:t,onChange:r,allowMultiple:!0,replaceOnSingle:!0,children:R.jsxRuntimeExports.jsx(f,{itemHeight:S,className:h.CSS(o,h.CSS.B("tree"),N&&h.CSS.M("rules")),..._,children:({key:u,...C})=>a({...C,key:u,loading:L===u,useMargin:c,onDrop:n,onRename:s,onSuccessfulDrop:l,onDoubleClick:i})})})})},pe=(e,t)=>d.edit(`text-${e}`,t),me=e=>d.asyncEdit(`text-${e}`),ge=Object.freeze(Object.defineProperty({__proto__:null,DefaultItem:G,HAUL_TYPE:M,Tree:he,asyncRename:me,deepCopy:J,findNode:j,findNodeParent:q,findNodes:ce,flatten:K,getDescendants:Q,moveNode:ae,removeNode:F,setNode:V,shouldExpand:z,sortAndSplice:H,startRenaming:pe,updateNode:ie,updateNodeChildren:oe,use:ue},Symbol.toStringTag,{value:"Module"}));exports.external=ge;
|
|
@@ -2,7 +2,7 @@ import { j as a } from "./jsx-runtime-B6kdoens.js";
|
|
|
2
2
|
import { A as u, g as d } from "./aggregator-J7DZKy5x.js";
|
|
3
3
|
import { createContext as v, useContext as j, isValidElement as f, Fragment as h } from "react";
|
|
4
4
|
import { S as m } from "./Pack-CcDPYCmE.js";
|
|
5
|
-
import { I as B, p as C, B as S, W as b } from "./Toggle-
|
|
5
|
+
import { I as B, p as C, B as S, W as b } from "./Toggle-m9N7HK8Z.js";
|
|
6
6
|
import { C as n } from "./css-BHfxGWOW.js";
|
|
7
7
|
const x = v({
|
|
8
8
|
divided: !1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const i=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./aggregator-C5NNOlCt.cjs"),c=require("react"),S=require("./Pack-BNnq0Pnk.cjs"),a=require("./Toggle-
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./aggregator-C5NNOlCt.cjs"),c=require("react"),S=require("./Pack-BNnq0Pnk.cjs"),a=require("./Toggle-CGbCK-dz.cjs"),o=require("./css-C4GOlJsi.cjs"),p=c.createContext({divided:!1,level:"h1"}),l=()=>c.useContext(p),j=({children:s,className:r,level:e="h1",divided:n=!1,...t})=>i.jsxRuntimeExports.jsx(p.Provider,{value:{level:e,divided:n},children:i.jsxRuntimeExports.jsx(S.Space,{el:"header",direction:"x",justify:"spaceBetween",className:o.CSS(o.CSS.B("header"),o.CSS.bordered("bottom"),n&&o.CSS.BM("header","divided"),r),...t,children:s})}),m=({children:s=[]})=>{const{level:r,divided:e}=l();return i.jsxRuntimeExports.jsx(S.Space,{direction:"x",size:"small",align:"center",className:o.CSS.BE("header","actions"),children:d.A(s).map((n,t)=>i.jsxRuntimeExports.jsx(h,{index:t,level:r,divided:e,children:n},t))})},h=({index:s,level:r,children:e,divided:n})=>{let t=e;if(!c.isValidElement(e)){const{onClick:x,...C}=e;t=i.jsxRuntimeExports.jsx(a.Icon,{onClick:u=>{u.stopPropagation(),u.preventDefault(),x==null||x(u)},size:d.LevelComponentSizes[r],...C},s)}return i.jsxRuntimeExports.jsxs(c.Fragment,{children:[n&&i.jsxRuntimeExports.jsx(a.Divider,{}),t]},s)},v=({children:s="",className:r,onClick:e,...n})=>{const{level:t}=l();return i.jsxRuntimeExports.jsx(a.Button,{variant:"text",size:d.LevelComponentSizes[t],onClick:e,className:o.CSS(o.CSS.B("header-button-title"),r),sharp:!0,...n,children:s})},E=({className:s,level:r,...e})=>{const{level:n,divided:t}=l();return i.jsxRuntimeExports.jsx(a.WithIcon,{className:o.CSS(o.CSS.BE("header","text"),s),level:r??n,divided:t,size:1.5,...e})},R=Object.freeze(Object.defineProperty({__proto__:null,Actions:m,ButtonTitle:v,Header:j,Title:E,useContext:l},Symbol.toStringTag,{value:"Module"}));exports.Actions=m;exports.ButtonTitle=v;exports.Header=j;exports.external=R;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { C as A, L as D, g as M, h as N, i as T, s as O } from "./aggregator-J7DZKy5x.js";
|
|
2
|
-
import { J as P, K as C, A as _, E as v, o as H, H as B, L as K, B as L, k as w, N as z, O as F, Q as R, R as U, M as V, U as X, f as I, W, G as Z, F as $, V as G, X as J } from "./Toggle-
|
|
3
|
-
import { K as Q } from "./Keyboard-
|
|
2
|
+
import { J as P, K as C, A as _, E as v, o as H, H as B, L as K, B as L, k as w, N as z, O as F, Q as R, R as U, M as V, U as X, f as I, W, G as Z, F as $, V as G, X as J } from "./Toggle-m9N7HK8Z.js";
|
|
3
|
+
import { K as Q } from "./Keyboard-D7ybWHn0.js";
|
|
4
4
|
import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
5
5
|
import { useState as q, useEffect as Y, useCallback as ee } from "react";
|
|
6
6
|
import { P as g } from "./Pack-CcDPYCmE.js";
|
|
7
|
-
import { A as se } from "./Animated-
|
|
7
|
+
import { A as se } from "./Animated-BpXi9NWe.js";
|
|
8
8
|
import { C as y } from "./css-BHfxGWOW.js";
|
|
9
|
-
import { L as te } from "./List-
|
|
9
|
+
import { L as te } from "./List-Dukgv-S0.js";
|
|
10
10
|
const le = [], ne = ({
|
|
11
11
|
data: e,
|
|
12
12
|
emptyContent: s,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("./aggregator-C5NNOlCt.cjs"),e=require("./Toggle-
|
|
1
|
+
"use strict";const r=require("./aggregator-C5NNOlCt.cjs"),e=require("./Toggle-CGbCK-dz.cjs"),t=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,get Theming(){return t},themeZ:r.themeZ,toCSSVars:e.toCSSVars,use:e.use,useContext:e.useContext,useProvider:e.useProvider,useTypography:e.useTypography},Symbol.toStringTag,{value:"Module"}));exports.external=t;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ak as T, f as D, al as N, am as O, an as w, ao as I, ap as z, aq as A, ar as B, as as C, at as _ } from "./Toggle-
|
|
1
|
+
import { ak as T, f as D, al as N, am as O, an as w, ao as I, ap as z, aq as A, ar as B, as as C, at as _ } from "./Toggle-m9N7HK8Z.js";
|
|
2
2
|
import { j as t } from "./jsx-runtime-B6kdoens.js";
|
|
3
3
|
import { m as S, w as k } from "./aggregator-J7DZKy5x.js";
|
|
4
4
|
import { useState as q } from "react";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { w as he, au as Ae, ak as Oe, K as ke, av as Le, A as Re, i as Ce, J as je, aw as ve, ax as $e, E as Ne, ay as Fe, az as Te, aA as Pe, aB as De, aC as Ke, L as We, aD as ze, aE as He, v as Ve, aF as Be, aG as Ge, aH as Ue } from "./Toggle-
|
|
1
|
+
import { w as he, au as Ae, ak as Oe, K as ke, av as Le, A as Re, i as Ce, J as je, aw as ve, ax as $e, E as Ne, ay as Fe, az as Te, aA as Pe, aB as De, aC as Ke, L as We, aD as ze, aE as He, v as Ve, aF as Be, aG as Ge, aH as Ue } from "./Toggle-m9N7HK8Z.js";
|
|
2
2
|
import { j as Ye } from "./jsx-runtime-B6kdoens.js";
|
|
3
3
|
import { useCallback as Je } from "react";
|
|
4
4
|
import { k as Qe, j as Xe } from "./aggregator-J7DZKy5x.js";
|
|
5
5
|
import "./css-BHfxGWOW.js";
|
|
6
6
|
import "./Pack-CcDPYCmE.js";
|
|
7
|
-
import { L as Ze } from "./List-
|
|
7
|
+
import { L as Ze } from "./List-Dukgv-S0.js";
|
|
8
8
|
const K = Symbol(), le = Symbol(), J = Symbol();
|
|
9
9
|
let qe = (t, e) => new Proxy(t, e);
|
|
10
10
|
const W = Object.getPrototypeOf, te = /* @__PURE__ */ new WeakMap(), Q = (t) => t && (te.has(t) ? te.get(t) : W(t) === Object.prototype || W(t) === Array.prototype), se = (t) => typeof t == "object" && t !== null, re = /* @__PURE__ */ new WeakMap(), ue = (t) => t[J] || t, fe = (t, e, s) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const m=require("./Toggle-C-n_Itw1.cjs"),ke=require("./jsx-runtime-Cek9Ww4S.cjs"),$e=require("react"),he=require("./aggregator-C5NNOlCt.cjs");require("./css-C4GOlJsi.cjs");require("./Pack-BNnq0Pnk.cjs");const ve=require("./List-UfPZeEyc.cjs"),W=Symbol(),ue=Symbol(),X=Symbol();let je=(t,e)=>new Proxy(t,e);const z=Object.getPrototypeOf,se=new WeakMap,J=t=>t&&(se.has(t)?se.get(t):z(t)===Object.prototype||z(t)===Array.prototype),re=t=>typeof t=="object"&&t!==null,ne=new WeakMap,fe=t=>t[X]||t,de=(t,e,s)=>{if(!J(t))return t;const r=fe(t),n=(c=>Object.isFrozen(c)||Object.values(Object.getOwnPropertyDescriptors(c)).some(o=>!o.writable))(r);let i=s&&s.get(r);return i&&i[1].f===n||(i=((c,o)=>{const a={f:o};let h=!1;const l=(d,g)=>{if(!h){let p=a.a.get(c);p||(p=new Set,a.a.set(c,p)),g&&p.has(W)||p.add(d)}},u={get:(d,g)=>g===X?c:(l(g),de(d[g],a.a,a.c)),has:(d,g)=>g===ue?(h=!0,a.a.delete(c),!0):(l(g),g in d),getOwnPropertyDescriptor:(d,g)=>(l(g,!0),Object.getOwnPropertyDescriptor(d,g)),ownKeys:d=>(l(W),Reflect.ownKeys(d))};return o&&(u.set=u.deleteProperty=()=>!1),[u,a]})(r,n),i[1].p=je(n?(c=>{let o=ne.get(c);if(!o){if(Array.isArray(c))o=Array.from(c);else{const a=Object.getOwnPropertyDescriptors(c);Object.values(a).forEach(h=>{h.configurable=!0}),o=Object.create(z(c),a)}ne.set(c,o)}return o})(r):r,i[0]),s&&s.set(r,i)),i[1].a=e,i[1].c=s,i[1].p},Te=(t,e)=>{const s=Reflect.ownKeys(t),r=Reflect.ownKeys(e);return s.length!==r.length||s.some((n,i)=>n!==r[i])},ge=(t,e,s,r)=>{if(Object.is(t,e))return!1;if(!re(t)||!re(e))return!0;const n=s.get(fe(t));if(!n)return!0;if(r){const c=r.get(t);if(c&&c.n===e)return c.g;r.set(t,{n:e,g:!1})}let i=null;for(const c of n){const o=c===W?Te(t,e):ge(t[c],e[c],s,r);if(o!==!0&&o!==!1||(i=o),i)break}return i===null&&(i=!0),r&&r.set(t,{n:e,g:i}),i},Fe=t=>!!J(t)&&ue in t,Z=t=>J(t)&&t[X]||null,H=t=>typeof t=="object"&&t!==null,pe=(t,e)=>{if(!H(t))return t;const s=Z(t);return s!==null?(Fe(t),s):(e.has(t)||(e.add(t),Object.entries(t).forEach(([r,n])=>{const i=pe(n,e);Object.is(i,n)||(t[r]=i)})),t)},F=(t,e,s)=>{if(!H(t)||!H(e))return;const r=s.get(Z(e)||e);r&&r.forEach(n=>{F(t[n],e[n],s)})},Ne=(t,e)=>{var s;let r=0;const n=(s=e==null?void 0:e.size)!=null?s:1,i=[],c=new WeakMap,o=new WeakMap;return a=>{const h=Z(a)||a,l=c.get(h);if(l)return F(a,l.o,l.a),l.r;for(let M=0;M<n;M+=1){const y=i[(r+M)%n];if(!y)break;if(!ge(y.o,a,y.a,new WeakMap))return c.set(h,y),F(a,y.o,y.a),y.r}const u=new WeakMap,d=de(a,u,o),g=pe(t(d),new Set);F(a,a,u);const p={o:a,r:g,a:u};return r=(r-1+n)%n,i[r]=p,c.set(h,p),g}},me=(t,e)=>he.w$1.RUNTIME==="browser"?Ne(t,e):t;function I(t){return Array.isArray?Array.isArray(t):xe(t)==="[object Array]"}const De=1/0;function Pe(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-De?"-0":e}function Ke(t){return t==null?"":Pe(t)}function _(t){return typeof t=="string"}function Me(t){return typeof t=="number"}function We(t){return t===!0||t===!1||ze(t)&&xe(t)=="[object Boolean]"}function ye(t){return typeof t=="object"}function ze(t){return ye(t)&&t!==null}function x(t){return t!=null}function K(t){return!t.trim().length}function xe(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const He="Incorrect 'index' type",Ue=t=>`Invalid value for key ${t}`,Ve=t=>`Pattern length exceeds max of ${t}.`,Be=t=>`Missing ${t} property in key`,Ge=t=>`Property 'weight' in key '${t}' must be a positive integer`,ie=Object.prototype.hasOwnProperty;class Ye{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(r=>{let n=Se(r);this._keys.push(n),this._keyMap[n.id]=n,s+=n.weight}),this._keys.forEach(r=>{r.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Se(t){let e=null,s=null,r=null,n=1,i=null;if(_(t)||I(t))r=t,e=ce(t),s=U(t);else{if(!ie.call(t,"name"))throw new Error(Be("name"));const c=t.name;if(r=c,ie.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(Ge(c));e=ce(c),s=U(c),i=t.getFn}return{path:e,id:s,weight:n,src:r,getFn:i}}function ce(t){return I(t)?t:t.split(".")}function U(t){return I(t)?t.join("."):t}function Qe(t,e){let s=[],r=!1;const n=(i,c,o)=>{if(x(i))if(!c[o])s.push(i);else{let a=c[o];const h=i[a];if(!x(h))return;if(o===c.length-1&&(_(h)||Me(h)||We(h)))s.push(Ke(h));else if(I(h)){r=!0;for(let l=0,u=h.length;l<u;l+=1)n(h[l],c,o+1)}else c.length&&n(h,c,o+1)}};return n(t,_(e)?e.split("."):e,0),r?s:s[0]}const Xe={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Je={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},Ze={location:0,threshold:.6,distance:100},qe={useExtendedSearch:!1,getFn:Qe,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var f={...Je,...Xe,...Ze,...qe};const et=/[^ ]+/g;function tt(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(n){const i=n.match(et).length;if(s.has(i))return s.get(i);const c=1/Math.pow(i,.5*t),o=parseFloat(Math.round(c*r)/r);return s.set(i,o),o},clear(){s.clear()}}}class q{constructor({getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){this.norm=tt(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,r)=>{this._keysMap[s.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,_(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();_(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,r=this.size();s<r;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!x(e)||K(e))return;let r={v:e,i:s,n:this.norm.get(e)};this.records.push(r)}_addObject(e,s){let r={i:s,$:{}};this.keys.forEach((n,i)=>{let c=n.getFn?n.getFn(e):this.getFn(e,n.path);if(x(c)){if(I(c)){let o=[];const a=[{nestedArrIndex:-1,value:c}];for(;a.length;){const{nestedArrIndex:h,value:l}=a.pop();if(x(l))if(_(l)&&!K(l)){let u={v:l,i:h,n:this.norm.get(l)};o.push(u)}else I(l)&&l.forEach((u,d)=>{a.push({nestedArrIndex:d,value:u})})}r.$[i]=o}else if(_(c)&&!K(c)){let o={v:c,n:this.norm.get(c)};r.$[i]=o}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Ee(t,e,{getFn:s=f.getFn,fieldNormWeight:r=f.fieldNormWeight}={}){const n=new q({getFn:s,fieldNormWeight:r});return n.setKeys(t.map(Se)),n.setSources(e),n.create(),n}function st(t,{getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const{keys:r,records:n}=t,i=new q({getFn:e,fieldNormWeight:s});return i.setKeys(r),i.setIndexRecords(n),i}function T(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:n=f.distance,ignoreLocation:i=f.ignoreLocation}={}){const c=e/t.length;if(i)return c;const o=Math.abs(r-s);return n?c+o/n:o?1:c}function rt(t=[],e=f.minMatchCharLength){let s=[],r=-1,n=-1,i=0;for(let c=t.length;i<c;i+=1){let o=t[i];o&&r===-1?r=i:!o&&r!==-1&&(n=i-1,n-r+1>=e&&s.push([r,n]),r=-1)}return t[i-1]&&i-r>=e&&s.push([r,i-1]),s}const L=32;function nt(t,e,s,{location:r=f.location,distance:n=f.distance,threshold:i=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,includeMatches:a=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(e.length>L)throw new Error(Ve(L));const l=e.length,u=t.length,d=Math.max(0,Math.min(r,u));let g=i,p=d;const M=o>1||a,y=M?Array(u):[];let b;for(;(b=t.indexOf(e,p))>-1;){let S=T(e,{currentLocation:b,expectedLocation:d,distance:n,ignoreLocation:h});if(g=Math.min(S,g),p=b+l,M){let w=0;for(;w<l;)y[b+w]=1,w+=1}}p=-1;let R=[],C=1,v=l+u;const Re=1<<l-1;for(let S=0;S<l;S+=1){let w=0,A=v;for(;w<A;)T(e,{errors:S,currentLocation:d+A,expectedLocation:d,distance:n,ignoreLocation:h})<=g?w=A:v=A,A=Math.floor((v-w)/2+w);v=A;let ee=Math.max(1,d-A+1),P=c?u:Math.min(d+A,u)+l,k=Array(P+2);k[P+1]=(1<<S)-1;for(let E=P;E>=ee;E-=1){let j=E-1,te=s[t.charAt(j)];if(M&&(y[j]=+!!te),k[E]=(k[E+1]<<1|1)&te,S&&(k[E]|=(R[E+1]|R[E])<<1|1|R[E+1]),k[E]&Re&&(C=T(e,{errors:S,currentLocation:j,expectedLocation:d,distance:n,ignoreLocation:h}),C<=g)){if(g=C,p=j,p<=d)break;ee=Math.max(1,2*d-p)}}if(T(e,{errors:S+1,currentLocation:d,expectedLocation:d,distance:n,ignoreLocation:h})>g)break;R=k}const D={isMatch:p>=0,score:Math.max(.001,C)};if(M){const S=rt(y,o);S.length?a&&(D.indices=S):D.isMatch=!1}return D}function it(t){let e={};for(let s=0,r=t.length;s<r;s+=1){const n=t.charAt(s);e[n]=(e[n]||0)|1<<r-s-1}return e}class _e{constructor(e,{location:s=f.location,threshold:r=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:s,threshold:r,distance:n,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(d,g)=>{this.chunks.push({pattern:d,alphabet:it(d),startIndex:g})},u=this.pattern.length;if(u>L){let d=0;const g=u%L,p=u-g;for(;d<p;)l(this.pattern.substr(d,L),d),d+=L;if(g){const M=u-L;l(this.pattern.substr(M),M)}}else l(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,includeMatches:r}=this.options;if(s||(e=e.toLowerCase()),this.pattern===e){let p={isMatch:!0,score:0};return r&&(p.indices=[[0,e.length-1]]),p}const{location:n,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:a,ignoreLocation:h}=this.options;let l=[],u=0,d=!1;this.chunks.forEach(({pattern:p,alphabet:M,startIndex:y})=>{const{isMatch:b,score:R,indices:C}=nt(e,p,M,{location:n+y,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:a,includeMatches:r,ignoreLocation:h});b&&(d=!0),u+=R,b&&C&&(l=[...l,...C])});let g={isMatch:d,score:d?u/this.chunks.length:1};return d&&r&&(g.indices=l),g}}class O{constructor(e){this.pattern=e}static isMultiMatch(e){return oe(e,this.multiRegex)}static isSingleMatch(e){return oe(e,this.singleRegex)}search(){}}function oe(t,e){const s=t.match(e);return s?s[1]:null}class ct extends O{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const s=e===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class ot extends O{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class at extends O{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const s=e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class lt extends O{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const s=!e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class ht extends O{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const s=e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ut extends O{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const s=!e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class be extends O{constructor(e,{location:s=f.location,threshold:r=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){super(e),this._bitapSearch=new _e(e,{location:s,threshold:r,distance:n,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Ie extends O{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s=0,r;const n=[],i=this.pattern.length;for(;(r=e.indexOf(this.pattern,s))>-1;)s=r+i,n.push([r,s-1]);const c=!!n.length;return{isMatch:c,score:c?0:1,indices:n}}}const V=[ct,Ie,at,lt,ut,ht,ot,be],ae=V.length,ft=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,dt="|";function gt(t,e={}){return t.split(dt).map(s=>{let r=s.trim().split(ft).filter(i=>i&&!!i.trim()),n=[];for(let i=0,c=r.length;i<c;i+=1){const o=r[i];let a=!1,h=-1;for(;!a&&++h<ae;){const l=V[h];let u=l.isMultiMatch(o);u&&(n.push(new l(u,e)),a=!0)}if(!a)for(h=-1;++h<ae;){const l=V[h];let u=l.isSingleMatch(o);if(u){n.push(new l(u,e));break}}}return n})}const pt=new Set([be.type,Ie.type]);class mt{constructor(e,{isCaseSensitive:s=f.isCaseSensitive,includeMatches:r=f.includeMatches,minMatchCharLength:n=f.minMatchCharLength,ignoreLocation:i=f.ignoreLocation,findAllMatches:c=f.findAllMatches,location:o=f.location,threshold:a=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:s,includeMatches:r,minMatchCharLength:n,findAllMatches:c,ignoreLocation:i,location:o,threshold:a,distance:h},this.pattern=s?e:e.toLowerCase(),this.query=gt(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let i=0,c=[],o=0;for(let a=0,h=s.length;a<h;a+=1){const l=s[a];c.length=0,i=0;for(let u=0,d=l.length;u<d;u+=1){const g=l[u],{isMatch:p,indices:M,score:y}=g.search(e);if(p){if(i+=1,o+=y,r){const b=g.constructor.type;pt.has(b)?c=[...c,...M]:c.push(M)}}else{o=0,i=0,c.length=0;break}}if(i){let u={isMatch:!0,score:o/i};return r&&(u.indices=c),u}}return{isMatch:!1,score:1}}}const B=[];function Mt(...t){B.push(...t)}function G(t,e){for(let s=0,r=B.length;s<r;s+=1){let n=B[s];if(n.condition(t,e))return new n(t,e)}return new _e(t,e)}const N={AND:"$and",OR:"$or"},Y={PATH:"$path",PATTERN:"$val"},Q=t=>!!(t[N.AND]||t[N.OR]),yt=t=>!!t[Y.PATH],xt=t=>!I(t)&&ye(t)&&!Q(t),le=t=>({[N.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function we(t,e,{auto:s=!0}={}){const r=n=>{let i=Object.keys(n);const c=yt(n);if(!c&&i.length>1&&!Q(n))return r(le(n));if(xt(n)){const a=c?n[Y.PATH]:i[0],h=c?n[Y.PATTERN]:n[a];if(!_(h))throw new Error(Ue(a));const l={keyId:U(a),pattern:h};return s&&(l.searcher=G(h,e)),l}let o={children:[],operator:i[0]};return i.forEach(a=>{const h=n[a];I(h)&&h.forEach(l=>{o.children.push(r(l))})}),o};return Q(t)||(t=le(t)),r(t)}function St(t,{ignoreFieldNorm:e=f.ignoreFieldNorm}){t.forEach(s=>{let r=1;s.matches.forEach(({key:n,norm:i,score:c})=>{const o=n?n.weight:null;r*=Math.pow(c===0&&o?Number.EPSILON:c,(o||1)*(e?1:i))}),s.score=r})}function Et(t,e){const s=t.matches;e.matches=[],x(s)&&s.forEach(r=>{if(!x(r.indices)||!r.indices.length)return;const{indices:n,value:i}=r;let c={indices:n,value:i};r.key&&(c.key=r.key.src),r.idx>-1&&(c.refIndex=r.idx),e.matches.push(c)})}function _t(t,e){e.score=t.score}function bt(t,e,{includeMatches:s=f.includeMatches,includeScore:r=f.includeScore}={}){const n=[];return s&&n.push(Et),r&&n.push(_t),t.map(i=>{const{idx:c}=i,o={item:e[c],refIndex:c};return n.length&&n.forEach(a=>{a(i,o)}),o})}class ${constructor(e,s={},r){this.options={...f,...s},this.options.useExtendedSearch,this._keyStore=new Ye(this.options.keys),this.setCollection(e,r)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof q))throw new Error(He);this._myIndex=s||Ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){x(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let r=0,n=this._docs.length;r<n;r+=1){const i=this._docs[r];e(i,r)&&(this.removeAt(r),r-=1,n-=1,s.push(i))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:r,includeScore:n,shouldSort:i,sortFn:c,ignoreFieldNorm:o}=this.options;let a=_(e)?_(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return St(a,{ignoreFieldNorm:o}),i&&a.sort(c),Me(s)&&s>-1&&(a=a.slice(0,s)),bt(a,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){const s=G(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach(({v:i,i:c,n:o})=>{if(!x(i))return;const{isMatch:a,score:h,indices:l}=s.searchIn(i);a&&n.push({item:i,idx:c,matches:[{score:h,value:i,norm:o,indices:l}]})}),n}_searchLogical(e){const s=we(e,this.options),r=(o,a,h)=>{if(!o.children){const{keyId:u,searcher:d}=o,g=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(a,u),searcher:d});return g&&g.length?[{idx:h,item:a,matches:g}]:[]}const l=[];for(let u=0,d=o.children.length;u<d;u+=1){const g=o.children[u],p=r(g,a,h);if(p.length)l.push(...p);else if(o.operator===N.AND)return[]}return l},n=this._myIndex.records,i={},c=[];return n.forEach(({$:o,i:a})=>{if(x(o)){let h=r(s,o,a);h.length&&(i[a]||(i[a]={idx:a,item:o,matches:[]},c.push(i[a])),h.forEach(({matches:l})=>{i[a].matches.push(...l)}))}}),c}_searchObjectList(e){const s=G(e,this.options),{keys:r,records:n}=this._myIndex,i=[];return n.forEach(({$:c,i:o})=>{if(!x(c))return;let a=[];r.forEach((h,l)=>{a.push(...this._findMatches({key:h,value:c[l],searcher:s}))}),a.length&&i.push({idx:o,item:c,matches:a})}),i}_findMatches({key:e,value:s,searcher:r}){if(!x(s))return[];let n=[];if(I(s))s.forEach(({v:i,i:c,n:o})=>{if(!x(i))return;const{isMatch:a,score:h,indices:l}=r.searchIn(i);a&&n.push({score:h,key:e,value:i,idx:c,norm:o,indices:l})});else{const{v:i,n:c}=s,{isMatch:o,score:a,indices:h}=r.searchIn(i);o&&n.push({score:a,key:e,value:i,norm:c,indices:h})}return n}}$.version="7.0.0";$.createIndex=Ee;$.parseIndex=st;$.config=f;$.parseQuery=we;Mt(mt);const It={threshold:.3},Ae=t=>e=>{const s=new $(e,{keys:Object.keys(e[0]),...It,...t});return{type:"fuse",page:(r,n)=>e.slice(r*n,(r+1)*n),search:r=>s.search(r).map(({item:n})=>n),retrieve:r=>e.filter(n=>r.includes(n.key))}},wt=Ae(),Oe=({term:t,searcher:e=wt})=>me(({data:s})=>typeof e=="function"?t.length===0||(s==null?void 0:s.length)===0?{data:s,transformed:!1}:{data:e(s).search(t),transformed:!0}:{data:e.search(t),transformed:!0}),Ce=({debounce:t=250,value:e,onChange:s,transformBefore:r})=>{const[n,i]=he.usePurePassthrough({onChange:s,value:e,initial:""}),{setTransform:c,deleteTransform:o}=m.useDataUtilContext(),a=m.useDebouncedCallback(c,t,[]),h=$e.useCallback(l=>{i(l),l.length===0?o("filter"):(r!=null&&(l=r(l)),a("filter",Oe({term:l})))},[i,r]);return{value:n,onChange:h}},Le=({children:t=s=>ke.jsxRuntimeExports.jsx(m.Text$1,{placeholder:"Filter",...s}),...e})=>t(Ce(e)),At=Object.freeze(Object.defineProperty({__proto__:null,Column:m.Column,ColumnContext:m.ColumnContext,Core:m.Core,DataProvider:m.DataProvider,Filter:Le,Hover:m.Hover,ItemFrame:m.ItemFrame,List:ve.List,Search:m.Search,Selector:m.Selector,selectValueIsZero:m.selectValueIsZero,useDataContext:m.useDataContext,useDataUtilContext:m.useDataUtilContext,useFilter:Ce,useGetTransformedData:m.useGetTransformedData,useHoverContext:m.useHoverContext,useSearch:m.useSearch,useSelect:m.useSelect,useSelection:m.useSelection,useSelectionContext:m.useSelectionContext,useSelectionUtils:m.useSelectionUtils,useSetSourceData:m.useSetSourceData,useSourceData:m.useSourceData,useTransformedData:m.useTransformedData},Symbol.toStringTag,{value:"Module"}));exports.Filter=Le;exports.createFilterTransform=Oe;exports.external=At;exports.fuseFilter=Ae;exports.proxyMemo=me;
|
|
1
|
+
"use strict";const m=require("./Toggle-CGbCK-dz.cjs"),ke=require("./jsx-runtime-Cek9Ww4S.cjs"),$e=require("react"),he=require("./aggregator-C5NNOlCt.cjs");require("./css-C4GOlJsi.cjs");require("./Pack-BNnq0Pnk.cjs");const ve=require("./List-DFXYScV1.cjs"),W=Symbol(),ue=Symbol(),X=Symbol();let je=(t,e)=>new Proxy(t,e);const z=Object.getPrototypeOf,se=new WeakMap,J=t=>t&&(se.has(t)?se.get(t):z(t)===Object.prototype||z(t)===Array.prototype),re=t=>typeof t=="object"&&t!==null,ne=new WeakMap,fe=t=>t[X]||t,de=(t,e,s)=>{if(!J(t))return t;const r=fe(t),n=(c=>Object.isFrozen(c)||Object.values(Object.getOwnPropertyDescriptors(c)).some(o=>!o.writable))(r);let i=s&&s.get(r);return i&&i[1].f===n||(i=((c,o)=>{const a={f:o};let h=!1;const l=(d,g)=>{if(!h){let p=a.a.get(c);p||(p=new Set,a.a.set(c,p)),g&&p.has(W)||p.add(d)}},u={get:(d,g)=>g===X?c:(l(g),de(d[g],a.a,a.c)),has:(d,g)=>g===ue?(h=!0,a.a.delete(c),!0):(l(g),g in d),getOwnPropertyDescriptor:(d,g)=>(l(g,!0),Object.getOwnPropertyDescriptor(d,g)),ownKeys:d=>(l(W),Reflect.ownKeys(d))};return o&&(u.set=u.deleteProperty=()=>!1),[u,a]})(r,n),i[1].p=je(n?(c=>{let o=ne.get(c);if(!o){if(Array.isArray(c))o=Array.from(c);else{const a=Object.getOwnPropertyDescriptors(c);Object.values(a).forEach(h=>{h.configurable=!0}),o=Object.create(z(c),a)}ne.set(c,o)}return o})(r):r,i[0]),s&&s.set(r,i)),i[1].a=e,i[1].c=s,i[1].p},Te=(t,e)=>{const s=Reflect.ownKeys(t),r=Reflect.ownKeys(e);return s.length!==r.length||s.some((n,i)=>n!==r[i])},ge=(t,e,s,r)=>{if(Object.is(t,e))return!1;if(!re(t)||!re(e))return!0;const n=s.get(fe(t));if(!n)return!0;if(r){const c=r.get(t);if(c&&c.n===e)return c.g;r.set(t,{n:e,g:!1})}let i=null;for(const c of n){const o=c===W?Te(t,e):ge(t[c],e[c],s,r);if(o!==!0&&o!==!1||(i=o),i)break}return i===null&&(i=!0),r&&r.set(t,{n:e,g:i}),i},Fe=t=>!!J(t)&&ue in t,Z=t=>J(t)&&t[X]||null,H=t=>typeof t=="object"&&t!==null,pe=(t,e)=>{if(!H(t))return t;const s=Z(t);return s!==null?(Fe(t),s):(e.has(t)||(e.add(t),Object.entries(t).forEach(([r,n])=>{const i=pe(n,e);Object.is(i,n)||(t[r]=i)})),t)},F=(t,e,s)=>{if(!H(t)||!H(e))return;const r=s.get(Z(e)||e);r&&r.forEach(n=>{F(t[n],e[n],s)})},Ne=(t,e)=>{var s;let r=0;const n=(s=e==null?void 0:e.size)!=null?s:1,i=[],c=new WeakMap,o=new WeakMap;return a=>{const h=Z(a)||a,l=c.get(h);if(l)return F(a,l.o,l.a),l.r;for(let M=0;M<n;M+=1){const y=i[(r+M)%n];if(!y)break;if(!ge(y.o,a,y.a,new WeakMap))return c.set(h,y),F(a,y.o,y.a),y.r}const u=new WeakMap,d=de(a,u,o),g=pe(t(d),new Set);F(a,a,u);const p={o:a,r:g,a:u};return r=(r-1+n)%n,i[r]=p,c.set(h,p),g}},me=(t,e)=>he.w$1.RUNTIME==="browser"?Ne(t,e):t;function I(t){return Array.isArray?Array.isArray(t):xe(t)==="[object Array]"}const De=1/0;function Pe(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-De?"-0":e}function Ke(t){return t==null?"":Pe(t)}function _(t){return typeof t=="string"}function Me(t){return typeof t=="number"}function We(t){return t===!0||t===!1||ze(t)&&xe(t)=="[object Boolean]"}function ye(t){return typeof t=="object"}function ze(t){return ye(t)&&t!==null}function x(t){return t!=null}function K(t){return!t.trim().length}function xe(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const He="Incorrect 'index' type",Ue=t=>`Invalid value for key ${t}`,Ve=t=>`Pattern length exceeds max of ${t}.`,Be=t=>`Missing ${t} property in key`,Ge=t=>`Property 'weight' in key '${t}' must be a positive integer`,ie=Object.prototype.hasOwnProperty;class Ye{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(r=>{let n=Se(r);this._keys.push(n),this._keyMap[n.id]=n,s+=n.weight}),this._keys.forEach(r=>{r.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Se(t){let e=null,s=null,r=null,n=1,i=null;if(_(t)||I(t))r=t,e=ce(t),s=U(t);else{if(!ie.call(t,"name"))throw new Error(Be("name"));const c=t.name;if(r=c,ie.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(Ge(c));e=ce(c),s=U(c),i=t.getFn}return{path:e,id:s,weight:n,src:r,getFn:i}}function ce(t){return I(t)?t:t.split(".")}function U(t){return I(t)?t.join("."):t}function Qe(t,e){let s=[],r=!1;const n=(i,c,o)=>{if(x(i))if(!c[o])s.push(i);else{let a=c[o];const h=i[a];if(!x(h))return;if(o===c.length-1&&(_(h)||Me(h)||We(h)))s.push(Ke(h));else if(I(h)){r=!0;for(let l=0,u=h.length;l<u;l+=1)n(h[l],c,o+1)}else c.length&&n(h,c,o+1)}};return n(t,_(e)?e.split("."):e,0),r?s:s[0]}const Xe={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Je={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,e)=>t.score===e.score?t.idx<e.idx?-1:1:t.score<e.score?-1:1},Ze={location:0,threshold:.6,distance:100},qe={useExtendedSearch:!1,getFn:Qe,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var f={...Je,...Xe,...Ze,...qe};const et=/[^ ]+/g;function tt(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(n){const i=n.match(et).length;if(s.has(i))return s.get(i);const c=1/Math.pow(i,.5*t),o=parseFloat(Math.round(c*r)/r);return s.set(i,o),o},clear(){s.clear()}}}class q{constructor({getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){this.norm=tt(s,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,r)=>{this._keysMap[s.id]=r})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,_(this.docs[0])?this.docs.forEach((e,s)=>{this._addString(e,s)}):this.docs.forEach((e,s)=>{this._addObject(e,s)}),this.norm.clear())}add(e){const s=this.size();_(e)?this._addString(e,s):this._addObject(e,s)}removeAt(e){this.records.splice(e,1);for(let s=e,r=this.size();s<r;s+=1)this.records[s].i-=1}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_addString(e,s){if(!x(e)||K(e))return;let r={v:e,i:s,n:this.norm.get(e)};this.records.push(r)}_addObject(e,s){let r={i:s,$:{}};this.keys.forEach((n,i)=>{let c=n.getFn?n.getFn(e):this.getFn(e,n.path);if(x(c)){if(I(c)){let o=[];const a=[{nestedArrIndex:-1,value:c}];for(;a.length;){const{nestedArrIndex:h,value:l}=a.pop();if(x(l))if(_(l)&&!K(l)){let u={v:l,i:h,n:this.norm.get(l)};o.push(u)}else I(l)&&l.forEach((u,d)=>{a.push({nestedArrIndex:d,value:u})})}r.$[i]=o}else if(_(c)&&!K(c)){let o={v:c,n:this.norm.get(c)};r.$[i]=o}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function Ee(t,e,{getFn:s=f.getFn,fieldNormWeight:r=f.fieldNormWeight}={}){const n=new q({getFn:s,fieldNormWeight:r});return n.setKeys(t.map(Se)),n.setSources(e),n.create(),n}function st(t,{getFn:e=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const{keys:r,records:n}=t,i=new q({getFn:e,fieldNormWeight:s});return i.setKeys(r),i.setIndexRecords(n),i}function T(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:n=f.distance,ignoreLocation:i=f.ignoreLocation}={}){const c=e/t.length;if(i)return c;const o=Math.abs(r-s);return n?c+o/n:o?1:c}function rt(t=[],e=f.minMatchCharLength){let s=[],r=-1,n=-1,i=0;for(let c=t.length;i<c;i+=1){let o=t[i];o&&r===-1?r=i:!o&&r!==-1&&(n=i-1,n-r+1>=e&&s.push([r,n]),r=-1)}return t[i-1]&&i-r>=e&&s.push([r,i-1]),s}const L=32;function nt(t,e,s,{location:r=f.location,distance:n=f.distance,threshold:i=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,includeMatches:a=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(e.length>L)throw new Error(Ve(L));const l=e.length,u=t.length,d=Math.max(0,Math.min(r,u));let g=i,p=d;const M=o>1||a,y=M?Array(u):[];let b;for(;(b=t.indexOf(e,p))>-1;){let S=T(e,{currentLocation:b,expectedLocation:d,distance:n,ignoreLocation:h});if(g=Math.min(S,g),p=b+l,M){let w=0;for(;w<l;)y[b+w]=1,w+=1}}p=-1;let R=[],C=1,v=l+u;const Re=1<<l-1;for(let S=0;S<l;S+=1){let w=0,A=v;for(;w<A;)T(e,{errors:S,currentLocation:d+A,expectedLocation:d,distance:n,ignoreLocation:h})<=g?w=A:v=A,A=Math.floor((v-w)/2+w);v=A;let ee=Math.max(1,d-A+1),P=c?u:Math.min(d+A,u)+l,k=Array(P+2);k[P+1]=(1<<S)-1;for(let E=P;E>=ee;E-=1){let j=E-1,te=s[t.charAt(j)];if(M&&(y[j]=+!!te),k[E]=(k[E+1]<<1|1)&te,S&&(k[E]|=(R[E+1]|R[E])<<1|1|R[E+1]),k[E]&Re&&(C=T(e,{errors:S,currentLocation:j,expectedLocation:d,distance:n,ignoreLocation:h}),C<=g)){if(g=C,p=j,p<=d)break;ee=Math.max(1,2*d-p)}}if(T(e,{errors:S+1,currentLocation:d,expectedLocation:d,distance:n,ignoreLocation:h})>g)break;R=k}const D={isMatch:p>=0,score:Math.max(.001,C)};if(M){const S=rt(y,o);S.length?a&&(D.indices=S):D.isMatch=!1}return D}function it(t){let e={};for(let s=0,r=t.length;s<r;s+=1){const n=t.charAt(s);e[n]=(e[n]||0)|1<<r-s-1}return e}class _e{constructor(e,{location:s=f.location,threshold:r=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:s,threshold:r,distance:n,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h},this.pattern=a?e:e.toLowerCase(),this.chunks=[],!this.pattern.length)return;const l=(d,g)=>{this.chunks.push({pattern:d,alphabet:it(d),startIndex:g})},u=this.pattern.length;if(u>L){let d=0;const g=u%L,p=u-g;for(;d<p;)l(this.pattern.substr(d,L),d),d+=L;if(g){const M=u-L;l(this.pattern.substr(M),M)}}else l(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,includeMatches:r}=this.options;if(s||(e=e.toLowerCase()),this.pattern===e){let p={isMatch:!0,score:0};return r&&(p.indices=[[0,e.length-1]]),p}const{location:n,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:a,ignoreLocation:h}=this.options;let l=[],u=0,d=!1;this.chunks.forEach(({pattern:p,alphabet:M,startIndex:y})=>{const{isMatch:b,score:R,indices:C}=nt(e,p,M,{location:n+y,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:a,includeMatches:r,ignoreLocation:h});b&&(d=!0),u+=R,b&&C&&(l=[...l,...C])});let g={isMatch:d,score:d?u/this.chunks.length:1};return d&&r&&(g.indices=l),g}}class O{constructor(e){this.pattern=e}static isMultiMatch(e){return oe(e,this.multiRegex)}static isSingleMatch(e){return oe(e,this.singleRegex)}search(){}}function oe(t,e){const s=t.match(e);return s?s[1]:null}class ct extends O{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const s=e===this.pattern;return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class ot extends O{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const r=e.indexOf(this.pattern)===-1;return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class at extends O{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const s=e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,this.pattern.length-1]}}}class lt extends O{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const s=!e.startsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class ht extends O{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const s=e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class ut extends O{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const s=!e.endsWith(this.pattern);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}}class be extends O{constructor(e,{location:s=f.location,threshold:r=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:c=f.findAllMatches,minMatchCharLength:o=f.minMatchCharLength,isCaseSensitive:a=f.isCaseSensitive,ignoreLocation:h=f.ignoreLocation}={}){super(e),this._bitapSearch=new _e(e,{location:s,threshold:r,distance:n,includeMatches:i,findAllMatches:c,minMatchCharLength:o,isCaseSensitive:a,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class Ie extends O{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let s=0,r;const n=[],i=this.pattern.length;for(;(r=e.indexOf(this.pattern,s))>-1;)s=r+i,n.push([r,s-1]);const c=!!n.length;return{isMatch:c,score:c?0:1,indices:n}}}const V=[ct,Ie,at,lt,ut,ht,ot,be],ae=V.length,ft=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,dt="|";function gt(t,e={}){return t.split(dt).map(s=>{let r=s.trim().split(ft).filter(i=>i&&!!i.trim()),n=[];for(let i=0,c=r.length;i<c;i+=1){const o=r[i];let a=!1,h=-1;for(;!a&&++h<ae;){const l=V[h];let u=l.isMultiMatch(o);u&&(n.push(new l(u,e)),a=!0)}if(!a)for(h=-1;++h<ae;){const l=V[h];let u=l.isSingleMatch(o);if(u){n.push(new l(u,e));break}}}return n})}const pt=new Set([be.type,Ie.type]);class mt{constructor(e,{isCaseSensitive:s=f.isCaseSensitive,includeMatches:r=f.includeMatches,minMatchCharLength:n=f.minMatchCharLength,ignoreLocation:i=f.ignoreLocation,findAllMatches:c=f.findAllMatches,location:o=f.location,threshold:a=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:s,includeMatches:r,minMatchCharLength:n,findAllMatches:c,ignoreLocation:i,location:o,threshold:a,distance:h},this.pattern=s?e:e.toLowerCase(),this.query=gt(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:r,isCaseSensitive:n}=this.options;e=n?e:e.toLowerCase();let i=0,c=[],o=0;for(let a=0,h=s.length;a<h;a+=1){const l=s[a];c.length=0,i=0;for(let u=0,d=l.length;u<d;u+=1){const g=l[u],{isMatch:p,indices:M,score:y}=g.search(e);if(p){if(i+=1,o+=y,r){const b=g.constructor.type;pt.has(b)?c=[...c,...M]:c.push(M)}}else{o=0,i=0,c.length=0;break}}if(i){let u={isMatch:!0,score:o/i};return r&&(u.indices=c),u}}return{isMatch:!1,score:1}}}const B=[];function Mt(...t){B.push(...t)}function G(t,e){for(let s=0,r=B.length;s<r;s+=1){let n=B[s];if(n.condition(t,e))return new n(t,e)}return new _e(t,e)}const N={AND:"$and",OR:"$or"},Y={PATH:"$path",PATTERN:"$val"},Q=t=>!!(t[N.AND]||t[N.OR]),yt=t=>!!t[Y.PATH],xt=t=>!I(t)&&ye(t)&&!Q(t),le=t=>({[N.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function we(t,e,{auto:s=!0}={}){const r=n=>{let i=Object.keys(n);const c=yt(n);if(!c&&i.length>1&&!Q(n))return r(le(n));if(xt(n)){const a=c?n[Y.PATH]:i[0],h=c?n[Y.PATTERN]:n[a];if(!_(h))throw new Error(Ue(a));const l={keyId:U(a),pattern:h};return s&&(l.searcher=G(h,e)),l}let o={children:[],operator:i[0]};return i.forEach(a=>{const h=n[a];I(h)&&h.forEach(l=>{o.children.push(r(l))})}),o};return Q(t)||(t=le(t)),r(t)}function St(t,{ignoreFieldNorm:e=f.ignoreFieldNorm}){t.forEach(s=>{let r=1;s.matches.forEach(({key:n,norm:i,score:c})=>{const o=n?n.weight:null;r*=Math.pow(c===0&&o?Number.EPSILON:c,(o||1)*(e?1:i))}),s.score=r})}function Et(t,e){const s=t.matches;e.matches=[],x(s)&&s.forEach(r=>{if(!x(r.indices)||!r.indices.length)return;const{indices:n,value:i}=r;let c={indices:n,value:i};r.key&&(c.key=r.key.src),r.idx>-1&&(c.refIndex=r.idx),e.matches.push(c)})}function _t(t,e){e.score=t.score}function bt(t,e,{includeMatches:s=f.includeMatches,includeScore:r=f.includeScore}={}){const n=[];return s&&n.push(Et),r&&n.push(_t),t.map(i=>{const{idx:c}=i,o={item:e[c],refIndex:c};return n.length&&n.forEach(a=>{a(i,o)}),o})}class ${constructor(e,s={},r){this.options={...f,...s},this.options.useExtendedSearch,this._keyStore=new Ye(this.options.keys),this.setCollection(e,r)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof q))throw new Error(He);this._myIndex=s||Ee(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){x(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const s=[];for(let r=0,n=this._docs.length;r<n;r+=1){const i=this._docs[r];e(i,r)&&(this.removeAt(r),r-=1,n-=1,s.push(i))}return s}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:s=-1}={}){const{includeMatches:r,includeScore:n,shouldSort:i,sortFn:c,ignoreFieldNorm:o}=this.options;let a=_(e)?_(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return St(a,{ignoreFieldNorm:o}),i&&a.sort(c),Me(s)&&s>-1&&(a=a.slice(0,s)),bt(a,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){const s=G(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach(({v:i,i:c,n:o})=>{if(!x(i))return;const{isMatch:a,score:h,indices:l}=s.searchIn(i);a&&n.push({item:i,idx:c,matches:[{score:h,value:i,norm:o,indices:l}]})}),n}_searchLogical(e){const s=we(e,this.options),r=(o,a,h)=>{if(!o.children){const{keyId:u,searcher:d}=o,g=this._findMatches({key:this._keyStore.get(u),value:this._myIndex.getValueForItemAtKeyId(a,u),searcher:d});return g&&g.length?[{idx:h,item:a,matches:g}]:[]}const l=[];for(let u=0,d=o.children.length;u<d;u+=1){const g=o.children[u],p=r(g,a,h);if(p.length)l.push(...p);else if(o.operator===N.AND)return[]}return l},n=this._myIndex.records,i={},c=[];return n.forEach(({$:o,i:a})=>{if(x(o)){let h=r(s,o,a);h.length&&(i[a]||(i[a]={idx:a,item:o,matches:[]},c.push(i[a])),h.forEach(({matches:l})=>{i[a].matches.push(...l)}))}}),c}_searchObjectList(e){const s=G(e,this.options),{keys:r,records:n}=this._myIndex,i=[];return n.forEach(({$:c,i:o})=>{if(!x(c))return;let a=[];r.forEach((h,l)=>{a.push(...this._findMatches({key:h,value:c[l],searcher:s}))}),a.length&&i.push({idx:o,item:c,matches:a})}),i}_findMatches({key:e,value:s,searcher:r}){if(!x(s))return[];let n=[];if(I(s))s.forEach(({v:i,i:c,n:o})=>{if(!x(i))return;const{isMatch:a,score:h,indices:l}=r.searchIn(i);a&&n.push({score:h,key:e,value:i,idx:c,norm:o,indices:l})});else{const{v:i,n:c}=s,{isMatch:o,score:a,indices:h}=r.searchIn(i);o&&n.push({score:a,key:e,value:i,norm:c,indices:h})}return n}}$.version="7.0.0";$.createIndex=Ee;$.parseIndex=st;$.config=f;$.parseQuery=we;Mt(mt);const It={threshold:.3},Ae=t=>e=>{const s=new $(e,{keys:Object.keys(e[0]),...It,...t});return{type:"fuse",page:(r,n)=>e.slice(r*n,(r+1)*n),search:r=>s.search(r).map(({item:n})=>n),retrieve:r=>e.filter(n=>r.includes(n.key))}},wt=Ae(),Oe=({term:t,searcher:e=wt})=>me(({data:s})=>typeof e=="function"?t.length===0||(s==null?void 0:s.length)===0?{data:s,transformed:!1}:{data:e(s).search(t),transformed:!0}:{data:e.search(t),transformed:!0}),Ce=({debounce:t=250,value:e,onChange:s,transformBefore:r})=>{const[n,i]=he.usePurePassthrough({onChange:s,value:e,initial:""}),{setTransform:c,deleteTransform:o}=m.useDataUtilContext(),a=m.useDebouncedCallback(c,t,[]),h=$e.useCallback(l=>{i(l),l.length===0?o("filter"):(r!=null&&(l=r(l)),a("filter",Oe({term:l})))},[i,r]);return{value:n,onChange:h}},Le=({children:t=s=>ke.jsxRuntimeExports.jsx(m.Text$1,{placeholder:"Filter",...s}),...e})=>t(Ce(e)),At=Object.freeze(Object.defineProperty({__proto__:null,Column:m.Column,ColumnContext:m.ColumnContext,Core:m.Core,DataProvider:m.DataProvider,Filter:Le,Hover:m.Hover,ItemFrame:m.ItemFrame,List:ve.List,Search:m.Search,Selector:m.Selector,selectValueIsZero:m.selectValueIsZero,useDataContext:m.useDataContext,useDataUtilContext:m.useDataUtilContext,useFilter:Ce,useGetTransformedData:m.useGetTransformedData,useHoverContext:m.useHoverContext,useSearch:m.useSearch,useSelect:m.useSelect,useSelection:m.useSelection,useSelectionContext:m.useSelectionContext,useSelectionUtils:m.useSelectionUtils,useSetSourceData:m.useSetSourceData,useSourceData:m.useSourceData,useTransformedData:m.useTransformedData},Symbol.toStringTag,{value:"Module"}));exports.Filter=Le;exports.createFilterTransform=Oe;exports.external=At;exports.fuseFilter=Ae;exports.proxyMemo=me;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { y as re, A as H, e as se, n as ae } from "./aggregator-J7DZKy5x.js";
|
|
2
2
|
import { j as N } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import { v as le, w as oe, e as ie, n as ce, q as de, C as fe, M as ue, x as he, y as pe, z as me, B as ge, A as X, E as xe, F as ye, G as Ce, H as Ee } from "./Toggle-
|
|
3
|
+
import { v as le, w as oe, e as ie, n as ce, q as de, C as fe, M as ue, x as he, y as pe, z as me, B as ge, A as X, E as xe, F as ye, G as Ce, H as Ee } from "./Toggle-m9N7HK8Z.js";
|
|
4
4
|
import { memo as Ne, useState as be, useCallback as b, useMemo as ve } from "react";
|
|
5
|
-
import { L as Te } from "./Link-
|
|
6
|
-
import { A as Se } from "./Animated-
|
|
5
|
+
import { L as Te } from "./Link-D2fnWjvq.js";
|
|
6
|
+
import { A as Se } from "./Animated-BpXi9NWe.js";
|
|
7
7
|
import { C as u } from "./css-BHfxGWOW.js";
|
|
8
8
|
import "./Pack-CcDPYCmE.js";
|
|
9
|
-
import { L as _e } from "./List-
|
|
9
|
+
import { L as _e } from "./List-Dukgv-S0.js";
|
|
10
10
|
const Y = (e, t) => t.includes(e.key), k = (e, t) => {
|
|
11
11
|
t && e.sort((n, s) => re.stringsWithNumbers(n.name, s.name));
|
|
12
12
|
let r = !1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./Toggle-
|
|
1
|
+
"use strict";const e=require("./Toggle-CGbCK-dz.cjs"),o=require("./jsx-runtime-Cek9Ww4S.cjs"),i=require("react");require("./aggregator-C5NNOlCt.cjs");const c=require("./css-C4GOlJsi.cjs");require("./Pack-BNnq0Pnk.cjs");const R=require("./Keyboard-CbKUH8Eh.cjs"),S=t=>{const{listen:r}=e.useContext$1(),[l,a]=i.useState([]);return i.useEffect(()=>r(({next:[s]})=>a(s??[])),[r,a]),o.jsxRuntimeExports.jsx(e.Text,{...t,children:l.join(" ")})},y={Control:()=>o.jsxRuntimeExports.jsx(e.Symbols.Meta,{},"control"),Alt:()=>o.jsxRuntimeExports.jsx(e.Symbols.Alt,{},"alt"),Shift:()=>o.jsxRuntimeExports.jsx(e.St.Keyboard.Shift,{},"shift"),MouseLeft:"Left Click",MouseRight:"Right Click",MouseMiddle:"Middle Click",Enter:()=>o.jsxRuntimeExports.jsx(e.St.Keyboard.Return,{},"enter")},x=t=>{const r=y[t];return r!=null?typeof r=="function"?r():r:t},C=t=>t.map(r=>x(r)),f=({className:t,style:r,trigger:l,children:a,...s})=>o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:l.map(n=>o.jsxRuntimeExports.jsx(R.Keyboard,{...s,children:x(n)},n))}),E=({onDrag:t,triggers:r=[["MouseLeft"],["MouseRight"]],bound:l,loose:a=!1})=>{const s=i.useRef(null),n=i.useRef(c.q.ZERO),m=i.useCallback(u=>{const d=c.q.construct(u);if(s.current===null)return;const{triggers:g}=s.current;t({box:c.To.construct(n.current,d),cursor:d,triggers:g,stage:"during"})},[t]),M=i.useCallback(u=>{const{stage:d,cursor:g}=u;d==="start"?(t({box:c.To.construct(g),...u}),window.addEventListener("mousemove",m),s.current=u,n.current=g):d==="end"&&s.current!=null&&(t({box:c.To.construct(n.current,g),...u}),window.removeEventListener("mousemove",m),s.current=null,n.current=c.q.ZERO)},[t]);e.use$2({triggers:r,callback:M,region:l,loose:a})},b=Object.freeze(Object.defineProperty({__proto__:null,ALPHANUMERIC_KEYS:e.ALPHANUMERIC_KEYS,ALPHANUMERIC_KEYS_SET:e.ALPHANUMERIC_KEYS_SET,KEYS:e.KEYS,MOUSE_KEYS:e.MOUSE_KEYS,Provider:e.Provider$1,Status:S,Text:f,compareModeConfigs:e.compareModeConfigs,determineMode:e.determineMode,diff:e.diff,eventKey:e.eventKey,filter:e.filter,flattenConfig:e.flattenConfig,keyZ:e.keyZ,keyboardKey:e.keyboardKey,match:e.match,matchCallback:e.matchCallback,mouseKey:e.mouseKey,mouseKeyZ:e.mouseKeyZ,purge:e.purge,purgeMouse:e.purgeMouse,toSymbols:C,triggerZ:e.triggerZ,use:e.use$2,useContext:e.useContext$1,useDrag:E,useFlattenedMemoConfig:e.useFlattenedMemoConfig,useHeld:e.useHeld,useHeldRef:e.useHeldRef},Symbol.toStringTag,{value:"Module"}));exports.Text=f;exports.external=b;exports.useDrag=E;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as M, B as _, I as k, C as L, q as O, r as S, s as b } from "./Toggle-
|
|
1
|
+
import { p as M, B as _, I as k, C as L, q as O, r as S, s as b } from "./Toggle-m9N7HK8Z.js";
|
|
2
2
|
import { j as u } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import { L as N } from "./Link-
|
|
3
|
+
import { L as N } from "./Link-D2fnWjvq.js";
|
|
4
4
|
import { C as a } from "./css-BHfxGWOW.js";
|
|
5
5
|
import { createContext as z, useContext as B, useCallback as D, useMemo as y } from "react";
|
|
6
6
|
const m = z({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./css-C4GOlJsi.cjs"),l=require("./jsx-runtime-Cek9Ww4S.cjs"),r=require("./Toggle-
|
|
1
|
+
"use strict";const e=require("./css-C4GOlJsi.cjs"),l=require("./jsx-runtime-Cek9Ww4S.cjs"),r=require("./Toggle-CGbCK-dz.cjs"),b=require("react");require("./aggregator-C5NNOlCt.cjs");require("./Pack-BNnq0Pnk.cjs");const d=({value:o,onChange:t,...u})=>{const i=s=>{s.hex==="transparent"&&t(e.ZERO),t(new e.Color(s.hex,s.rgb.a))};return l.jsxRuntimeExports.jsx(r.SketchPicker,{className:e.CSS.B("color-picker"),color:new e.Color(o).hex,onChange:i,presetColors:[],...u})},x="color",g=({value:o,onChange:t,className:u,size:i="medium",onVisibleChange:s,initialVisible:m,draggable:h=!0,...j})=>{const{visible:k,open:y,close:C}=r.use$1({onVisibleChange:s,initialVisible:m}),f=r.use().colors.gray.l0,c=new e.Color(o),w=r.useDraggingState(),S=b.useCallback(({items:a})=>{const[n]=r.filterByType(x,a);return n!=null&&n.key!==c.hex},[c.hex]),{startDrag:R,...E}=r.useDragAndDrop({type:"Color.Swatch",onDrop:({items:a})=>{const n=r.filterByType(x,a);return a.length>0&&(t==null||t(new e.Color(n[0].key))),n},canDrop:S}),p=l.jsxRuntimeExports.jsx(r.Button,{className:e.CSS(e.CSS.B("color-swatch"),e.CSS.size(i),c.contrast(f)>1.5&&c.a>.5&&e.CSS.M("no-border"),e.CSS.dropRegion(S(w)),u),draggable:h,onDragStart:()=>R([{type:x,key:c.hex}]),style:{backgroundColor:e.cssString(o)},variant:"text",onClick:y,size:i,tooltip:t!=null?l.jsxRuntimeExports.jsx(r.Text,{level:"small",children:"Click to change color"}):void 0,...E,...j});return t==null?p:l.jsxRuntimeExports.jsxs(r.Dialog,{close:C,visible:k,className:e.CSS.BE("color-swatch","dropdown"),keepMounted:!1,variant:"floating",zIndex:100,children:[p,l.jsxRuntimeExports.jsx(d,{value:o,onChange:t})]})},D=Object.freeze(Object.defineProperty({__proto__:null,Color:e.Color,Picker:d,Swatch:g,ZERO:e.ZERO,crudeZ:e.crudeZ,cssString:e.cssString,fromHSLA:e.fromHSLA,toHex:e.toHex},Symbol.toStringTag,{value:"Module"}));exports.Swatch=g;exports.external=D;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("./Toggle-
|
|
1
|
+
"use strict";const e=require("./Toggle-CGbCK-dz.cjs"),o=require("./Link-B8NxnNli.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,5 +1,5 @@
|
|
|
1
|
-
import { B as o, I as e, T as t, d as r } from "./Toggle-
|
|
2
|
-
import { L as a } from "./Link-
|
|
1
|
+
import { B as o, I as e, T as t, d as r } from "./Toggle-m9N7HK8Z.js";
|
|
2
|
+
import { L as a } from "./Link-D2fnWjvq.js";
|
|
3
3
|
const s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
4
|
__proto__: null,
|
|
5
5
|
Button: o,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { S as e, a as t, b as a, t as r } from "./aggregator-J7DZKy5x.js";
|
|
2
|
-
import { P as s, S as o, t as S, u, a as i, b as n, c as m } from "./Toggle-
|
|
2
|
+
import { P as s, S as o, t as S, u, a as i, b as n, c as m } from "./Toggle-m9N7HK8Z.js";
|
|
3
3
|
const p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
4
|
__proto__: null,
|
|
5
5
|
Provider: s,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./Toggle-
|
|
1
|
+
"use strict";const o=require("./jsx-runtime-Cek9Ww4S.cjs"),d=require("./Toggle-CGbCK-dz.cjs"),S=require("react"),g=require("./Pack-BNnq0Pnk.cjs"),u=require("./css-C4GOlJsi.cjs"),z=require("./aggregator-C5NNOlCt.cjs"),m=require("zod"),T=(l="",s=[])=>{var t;if(s.length!==0)return s.find(n=>n.tabKey===l)!=null?l:(t=s[s.length-1])==null?void 0:t.tabKey},q=(l,s,t)=>{if(s=s.trim(),s.length===0)return t;const n=t.find(e=>e.tabKey===l);return n==null||n.name===s?t:t.map(e=>e.tabKey===l?{...e,name:s}:e)},y=({tabs:l,content:s,selected:t,onSelect:n})=>{var a;const[e,r]=z.usePurePassthrough({initial:t??((a=l[0])==null?void 0:a.tabKey)??"",value:t,onChange:n}),c=d.useSyncedRef(t??e),i=S.useCallback(x=>{r(x),c.current==null&&(n==null||n(x))},[e,n]);return{tabs:l,selected:e,content:s,onSelect:i}},k=S.createContext({tabs:[]}),B=()=>S.useContext(k),N=({id:l,content:s,children:t,onSelect:n,selected:e,selectedAltColor:r,closable:c,tabs:i,onClose:a,onDragStart:x,onDragEnd:h,onCreate:C,onRename:E,emptyContent:R,className:b,onDragOver:p,onDrop:v,size:j="medium",direction:P="y",...M})=>o.jsxRuntimeExports.jsx(g.Space,{id:l,empty:!0,className:u.CSS(u.CSS.B("tabs"),b),onDragOver:p,onDrop:v,direction:P,...M,children:o.jsxRuntimeExports.jsxs(k.Provider,{value:{tabs:i,emptyContent:R,selected:e,closable:c,content:t??s,onSelect:n,onClose:a,onDragStart:x,onDragEnd:h,onRename:E,onCreate:C,onDrop:v},children:[o.jsxRuntimeExports.jsx(w,{size:j,direction:u.g.swap(P),altColor:r}),o.jsxRuntimeExports.jsx(_,{})]})}),Z=k.Provider,_=()=>{const{tabs:l,selected:s,content:t,emptyContent:n,onSelect:e}=B();let r=null;const c=l.find(i=>i.tabKey===s);return s==null||c==null?n??null:(t!=null?typeof t=="function"?r=t(c):r=t:c.content!=null&&(r=c.content),o.jsxRuntimeExports.jsx("div",{className:u.CSS.B("tabs-content"),onClick:()=>e==null?void 0:e(s),children:r}))},f="tabs-selector",w=({className:l,altColor:s=!1,size:t="medium",direction:n="x",...e})=>{const{tabs:r,selected:c,onSelect:i,onClose:a,closable:x,onDragEnd:h,onDragStart:C,onDrop:E,onRename:R,onCreate:b}=B();return o.jsxRuntimeExports.jsxs(g.Space,{className:u.CSS(u.CSS.B(f),u.CSS.size(t),l),align:"center",justify:"spaceBetween",onDrop:E,empty:!0,direction:n,...e,children:[o.jsxRuntimeExports.jsx(g.Space,{direction:n,className:u.CSS.BE(f,"tabs"),empty:!0,children:r.map(p=>o.jsxRuntimeExports.jsx(L,{selected:c,altColor:s,onSelect:i,onClose:a,onDragStart:C,onDragEnd:h,onRename:R,closable:p.closable??x,size:t,...p},p.tabKey))}),b!=null&&o.jsxRuntimeExports.jsx(g.Space,{className:u.CSS.BE(f,"actions"),children:o.jsxRuntimeExports.jsx(d.Icon,{size:t,sharp:!0,onClick:b,children:o.jsxRuntimeExports.jsx(d.St.Add,{})})})]})},L=({selected:l,altColor:s=!1,onSelect:t,onClose:n,tabKey:e,name:r,onDragStart:c,onDragEnd:i,onRename:a,closable:x=!0,icon:h,size:C,editable:E=!0})=>{const R=S.useCallback(j=>c==null?void 0:c(j,{tabKey:e,name:r}),[c,e,r]),b=S.useCallback(j=>i==null?void 0:i(j,{tabKey:e,name:r}),[i,e,r]),p=S.useCallback(j=>{j.stopPropagation(),n==null||n(e)},[n,e]),v=S.useCallback(()=>t==null?void 0:t(e),[t,e]);return o.jsxRuntimeExports.jsxs(g.Pack,{size:C,id:e,className:u.CSS(u.CSS.BE(f,"btn"),a==null&&u.CSS.BEM(f,"btn","uneditable"),u.CSS.selected(l===e),u.CSS.altColor(s),x&&n!=null&&u.CSS.BEM(f,"btn","closable")),draggable:!0,direction:"x",justify:"center",align:"center",onClick:v,onDragStart:R,onDragEnd:b,bordered:!1,rounded:!1,children:[o.jsxRuntimeExports.jsx(O,{name:r,tabKey:e,onRename:a,icon:h,editable:E,level:z.ComponentSizeLevels[C]}),x&&n!=null&&o.jsxRuntimeExports.jsx(d.Icon,{onClick:p,children:o.jsxRuntimeExports.jsx(d.St.Close,{"aria-label":"pluto-tabs__close"})})]})},O=({onRename:l,name:s,tabKey:t,icon:n,editable:e=!0,...r})=>l==null||!e?n!=null?o.jsxRuntimeExports.jsx(d.WithIcon,{startIcon:n,noWrap:!0,...r,children:s}):o.jsxRuntimeExports.jsx(d.Text,{noWrap:!0,...r,children:s}):o.jsxRuntimeExports.jsx(d.Editable,{onChange:c=>l(t,c),value:s,noWrap:!0,...r}),I=m.z.object({tabKey:m.z.string(),name:m.z.string(),closable:m.z.boolean().optional(),icon:m.z.unknown().optional(),editable:m.z.boolean().optional()}),W=I.extend({content:m.z.unknown().optional()}),A=Object.freeze(Object.defineProperty({__proto__:null,Content:_,Provider:Z,Selector:w,Tabs:N,TabsContext:k,rename:q,resetSelection:T,specZ:I,tabZ:W,useStatic:y,useTabsContext:B},Symbol.toStringTag,{value:"Module"}));exports.Tabs=N;exports.external=A;exports.rename=q;exports.resetSelection=T;exports.tabZ=W;exports.useStatic=y;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as r, a as l, Z as f, c as g, b as v, f as E, t as T } from "./css-BHfxGWOW.js";
|
|
2
2
|
import { j as c } from "./jsx-runtime-B6kdoens.js";
|
|
3
|
-
import { j as A, k as C, u as H, l as M, m as x, n as N, B as O, f as R, o as Z } from "./Toggle-
|
|
3
|
+
import { j as A, k as C, u as H, l as M, m as x, n as N, B as O, f as R, o as Z } from "./Toggle-m9N7HK8Z.js";
|
|
4
4
|
import { useCallback as z } from "react";
|
|
5
5
|
import "./aggregator-J7DZKy5x.js";
|
|
6
6
|
import "./Pack-CcDPYCmE.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./Toggle-
|
|
1
|
+
"use strict";const t=require("./Toggle-CGbCK-dz.cjs"),s=require("./jsx-runtime-Cek9Ww4S.cjs"),j=require("./aggregator-C5NNOlCt.cjs"),y=require("react"),l=require("./css-C4GOlJsi.cjs"),E=require("./Pack-BNnq0Pnk.cjs"),C=({value:r,onChange:n,onBlur:e,onlyChangeOnBlur:a,...d})=>{const[m,c]=y.useState(null),x=(i,p=!1)=>{let u=i.toString();c(u);let o=new j.m(i,"UTC");u.length<23&&(u+=".000"),o=o.add(BigInt(j.m.now().date().getTimezoneOffset()-o.date().getTimezoneOffset())*j.w.MINUTE.valueOf());let T=!1;try{T=o.fString("ISO","local").slice(0,-1)===u}catch(D){console.error(D)}T&&!a&&(n(Number(o.valueOf())),c(null)),p&&(T&&n(Number(o.valueOf())),c(null))},g=i=>{x(i.target.value,!0),c(null),e==null||e(i)},S=i=>{a&&i.key==="Enter"&&i.currentTarget.blur()},f=new j.m(r,"UTC").fString("ISO","local").slice(0,-1);return s.jsxRuntimeExports.jsx(t.Text$1,{type:"datetime-local",onBlur:g,required:!1,onKeyDown:S,value:m??f,onChange:x,...d})},R=({className:r,variant:n="error",...e})=>s.jsxRuntimeExports.jsx(t.Text,{className:l.CSS(l.CSS.B("input-help-text"),l.CSS.BM("input-help-text",n),r),level:"small",...e}),b=({className:r,required:n=!1,children:e,...a})=>s.jsxRuntimeExports.jsxs("label",{className:l.CSS(l.CSS.B("input-label"),r),...a,children:[e," ",n&&s.jsxRuntimeExports.jsx("span",{className:l.CSS.B("required-indicator"),children:"*"})]}),v=(r,n="x")=>r??(l.g.construct(n)==="y"?"stretch":"center"),h=({label:r,showLabel:n=!0,helpText:e,direction:a="y",className:d,children:m,required:c,align:x,size:g="small",padHelpText:S=!1,helpTextVariant:f,showHelpText:i=!0,...p})=>{let u;return i===!1&&n===!1?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:m}):(a==="x"?u=s.jsxRuntimeExports.jsxs(E.Space,{direction:"y",size:"small",children:[m,(S||e!=null&&e.length>0)&&s.jsxRuntimeExports.jsx(R,{variant:f,children:e})]}):u=s.jsxRuntimeExports.jsxs(E.Space,{direction:"y",size:1/3,children:[m,(S||e!=null&&e.length>0)&&s.jsxRuntimeExports.jsx(R,{variant:f,children:e})]}),s.jsxRuntimeExports.jsxs(E.Space,{className:l.CSS(l.CSS.B("input-item"),d),direction:a,size:g,align:v(x,a),...p,children:[n&&s.jsxRuntimeExports.jsx(b,{required:c,children:r}),u]}))},N=Object.freeze(Object.defineProperty({__proto__:null,Date:t.Date,DateTime:C,DragButton:t.DragButton,HelpText:R,Item:h,Label:b,Numeric:t.Numeric,Switch:t.Switch$1,Text:t.Text$1,TextArea:t.TextArea,Time:t.Time,combineDateAndTimeValue:t.combineDateAndTimeValue,useDate:t.useDate,useTime:t.useTime},Symbol.toStringTag,{value:"Module"}));exports.Item=h;exports.external=N;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("./Toggle-
|
|
1
|
+
"use strict";const t=require("./Toggle-CGbCK-dz.cjs"),C=require("./jsx-runtime-Cek9Ww4S.cjs"),v=require("./Link-B8NxnNli.cjs"),x=require("./css-C4GOlJsi.cjs"),u=require("react"),a=u.createContext({onClick:()=>{},selected:""}),E=()=>u.useContext(a),O=({children:i,onChange:e,level:c,iconSpacing:o,value:r=""})=>{const n=u.useCallback(s=>{typeof e=="function"?e(s):e&&s in e&&e[s](s)},[e]),l=u.useMemo(()=>({onClick:n,selected:r,level:c,iconSpacing:o}),[r,n,c,o]);return C.jsxRuntimeExports.jsx(a.Provider,{value:l,children:i})},R=()=>C.jsxRuntimeExports.jsx(t.Divider,{direction:"x",padded:!0}),m=(i,e)=>c=>{const{itemKey:o,className:r,onClick:n,size:l,...s}={...e,...c},{onClick:S,selected:j,level:p,iconSpacing:M}=E(),_=k=>{S(o),n==null||n(k)},I=j===o;return C.jsxRuntimeExports.jsx(i,{level:p,...s,onClick:_,variant:"text",className:x.CSS(x.CSS.B("menu-item"),x.CSS.selected(I),r),size:l??M})},d=m(t.Button,{noWrap:!0}),f=m(t.Icon),L=m(v.Link,{noWrap:!0}),T=d;T.Icon=f;T.Link=L;const N=Object.freeze(Object.defineProperty({__proto__:null,CONTEXT_SELECTED:t.CONTEXT_SELECTED,CONTEXT_TARGET:t.CONTEXT_TARGET,ContextMenu:t.ContextMenu,CoreItem:d,Divider:R,Item:T,Menu:O,MenuContext:a,useContextMenu:t.useContextMenu,useMenuContext:E},Symbol.toStringTag,{value:"Module"}));exports.external=N;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as o } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { y as S, I as _, e as k, W as M, f as L, Q as O } from "./Toggle-
|
|
2
|
+
import { y as S, I as _, e as k, W as M, f as L, Q as O } from "./Toggle-m9N7HK8Z.js";
|
|
3
3
|
import { createContext as R, useCallback as v, useContext as Z } from "react";
|
|
4
4
|
import { S as P, P as z } from "./Pack-CcDPYCmE.js";
|
|
5
5
|
import { C as c, g as A } from "./css-BHfxGWOW.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const S=require("./aggregator-C5NNOlCt.cjs"),e=require("./Toggle-
|
|
1
|
+
"use strict";const S=require("./aggregator-C5NNOlCt.cjs"),e=require("./Toggle-CGbCK-dz.cjs"),A=require("./Keyboard-CbKUH8Eh.cjs"),o=require("./jsx-runtime-Cek9Ww4S.cjs"),L=require("react"),R=require("./Pack-BNnq0Pnk.cjs"),M=require("./Animated-DFza4wCT.cjs"),y=require("./css-C4GOlJsi.cjs"),P=require("./List-DFXYScV1.cjs"),z=[],B=({data:t,emptyContent:n,value:s,onChange:l,allowMultiple:u,allowNone:d,hideColumnHeader:i=!1,columns:E=z,visible:x,itemHeight:m=e.Column.itemHeight,listItem:p=e.componentRenderProp(e.Column.Item),replaceOnSingle:r,omit:b,autoSelectOnNone:C,trigger:f,extraDialogContent:h,variant:a="connected",...k})=>{let j=o.jsxRuntimeExports.jsxs(e.Hover,{disabled:!x,children:[h,o.jsxRuntimeExports.jsx(e.Column.Header,{hide:i||p!=null,columns:E,children:o.jsxRuntimeExports.jsx(e.Core.Virtual,{itemHeight:m,children:p})})]});return a!=="connected"&&(j=o.jsxRuntimeExports.jsx(R.Pack,{direction:"y",borderShade:4,className:y.CSS.B("select-dialog-content"),children:j})),o.jsxRuntimeExports.jsx(P.List,{data:t,emptyContent:n,omit:b,children:o.jsxRuntimeExports.jsx(e.Selector,{value:s,onChange:l,allowMultiple:u,allowNone:d,replaceOnSingle:r,autoSelectOnNone:C,children:o.jsxRuntimeExports.jsxs(e.Dialog,{visible:x,className:y.CSS.B("select"),keepMounted:!1,variant:a,...k,children:[f,j]})})})},g=({children:t=N,value:n,onChange:s,entryRenderKey:l="key",allowNone:u=!1,allowMultiple:d=!1,data:i,replaceOnSingle:E,className:x,...m})=>{const{onSelect:p}=e.useSelect({allowMultiple:d,allowNone:u,replaceOnSingle:E,data:i,value:n,onChange:s});return o.jsxRuntimeExports.jsx(R.Pack,{borderShade:4,className:y.CSS(y.CSS.B("select-button"),x),...m,children:i.map(r=>t({key:r.key,onClick:()=>p(r.key),selected:r.key===n,entry:r,title:r[l]}))})},N=({entry:t,onClick:n,selected:s,title:l})=>o.jsxRuntimeExports.jsx(e.Button,{onClick:n,variant:s?"filled":"outlined",children:l},t.key),D=({selected:t,renderKey:n,toggle:s,visible:l,children:u,...d})=>o.jsxRuntimeExports.jsx(e.Button,{className:y.CSS.B("select-dropdown-button"),onClick:s,variant:"outlined",endIcon:o.jsxRuntimeExports.jsx(M.Animated,{enabledLoc:"bottom",disabledLoc:"left",enabled:l}),...d,children:u??(t==null?void 0:t[n])}),T=e.componentRenderProp(D),_=({data:t,value:n,columns:s=[],children:l=T,entryRenderKey:u="key",allowNone:d=!1,onChange:i,disabled:E,hideColumnHeader:x=!0,variant:m,dropdownVariant:p,...r})=>{const{close:b,visible:C,toggle:f}=e.use$1(),[h,a]=L.useState((t==null?void 0:t.find(c=>c.key===n))??null);L.useEffect(()=>{a((t==null?void 0:t.find(c=>c.key===n))??null)},[t,n]);const k=L.useCallback((c,v)=>{if(!(Array.isArray(c)||c===null)){if(b(),c==null)return a(null),i(n);a(v.entries[0]),i(c)}},[i,n,b,a]),j={selected:h,renderKey:u,toggle:f,visible:C};return m!=null&&(j.variant=m),o.jsxRuntimeExports.jsx(B,{close:b,data:t,visible:C,value:n,onChange:k,allowMultiple:!1,allowNone:d,columns:s,hideColumnHeader:x,variant:p,trigger:o.jsxRuntimeExports.jsx(o.jsxRuntimeExports.Fragment,{children:l(j)}),...r})},w=[{key:"h2",label:"XL"},{key:"h3",label:"L"},{key:"h4",label:"M"},{key:"p",label:"S"},{key:"small",label:"XS"}],K=({key:t,entry:n,onClick:s,selected:l})=>o.jsxRuntimeExports.jsx(e.Button,{variant:l?"filled":"outlined",onClick:s,children:n.label},t),q=({children:t=K,...n})=>o.jsxRuntimeExports.jsx(g,{...n,data:w,children:t}),O=Object.freeze(Object.defineProperty({__proto__:null,ComponentSizeLevels:S.ComponentSizeLevels,CoreDateTime:e.CoreDateTime,DateTime:e.DateTime,Editable:e.Editable,Keyboard:A.Keyboard,LEVELS:S.LEVELS,LevelComponentSizes:S.LevelComponentSizes,Link:e.Link,MaybeEditable:e.MaybeEditable,SelectLevel:q,Symbols:e.Symbols,Text:e.Text,WithIcon:e.WithIcon,asyncEdit:e.asyncEdit,dimensions:S.dimensions,edit:e.edit,evalColor:e.evalColor,formatChildren:e.formatChildren,levelZ:S.levelZ,specZ:S.specZ},Symbol.toStringTag,{value:"Module"}));exports.BaseButton=D;exports.Button=g;exports.Core=B;exports.DropdownButton=_;exports.SelectLevel=q;exports.defaultButton=T;exports.external=O;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Y as p, f as y, U as d, e as g, Z as b, _ as h, $ as C, a0 as j, a1 as T, a2 as K, a3 as R, a4 as _, a5 as k, a6 as L, a7 as v, a8 as A, a9 as O, aa as Z, ab as U, ac as Y, ad as w, ae as H, af as P, ag as N, ah as z, ai as F, aj as I, z as $ } from "./Toggle-
|
|
1
|
+
import { Y as p, f as y, U as d, e as g, Z as b, _ as h, $ as C, a0 as j, a1 as T, a2 as K, a3 as R, a4 as _, a5 as k, a6 as L, a7 as v, a8 as A, a9 as O, aa as Z, ab as U, ac as Y, ad as w, ae as H, af as P, ag as N, ah as z, ai as F, aj as I, z as $ } from "./Toggle-m9N7HK8Z.js";
|
|
2
2
|
import { j as r } from "./jsx-runtime-B6kdoens.js";
|
|
3
3
|
import { useState as q, useEffect as X, useRef as x, useCallback as M } from "react";
|
|
4
4
|
import "./aggregator-J7DZKy5x.js";
|
|
5
5
|
import { q as l, T as f } from "./css-BHfxGWOW.js";
|
|
6
6
|
import "./Pack-CcDPYCmE.js";
|
|
7
|
-
import { K as B } from "./Keyboard-
|
|
7
|
+
import { K as B } from "./Keyboard-D7ybWHn0.js";
|
|
8
8
|
const G = (e) => {
|
|
9
9
|
const { listen: t } = p(), [n, c] = q([]);
|
|
10
10
|
return X(
|
package/dist/header.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-Bad1CwNW.cjs");exports.Header=e.external;
|
package/dist/header.js
CHANGED