@synnaxlabs/pluto 0.39.1 → 0.40.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.
- package/dist/{Center-DoAxDY5V.js → Center-CFEPOi_x.js} +2 -2
- package/dist/{Center-BjxFDxgi.cjs → Center-bD2cOjI8.cjs} +1 -1
- package/dist/{ContextMenu-DX6j7Wwi.js → ContextMenu-BXNN2_7t.js} +4 -4
- package/dist/{ContextMenu-BWGS1vXl.cjs → ContextMenu-CNSewKSD.cjs} +1 -1
- package/dist/{DateTime-DUuYjZr8.cjs → DateTime-BfnGq6C2.cjs} +1 -1
- package/dist/{DateTime-sO15tvDD.js → DateTime-Djw6pb3W.js} +3 -3
- package/dist/Divider-CJNDIsD4.cjs +22 -0
- package/dist/{Divider-C5m3c4pv.js → Divider-CMyzWvRC.js} +701 -854
- package/dist/{Dropdown-DurKTABg.cjs → Dropdown-CL7BefC8.cjs} +1 -1
- package/dist/{Dropdown-FSmdakic.js → Dropdown-D-aMufnM.js} +8 -8
- package/dist/{Haul-CoG7Jmz6.cjs → Haul-4OcHX8__.cjs} +1 -1
- package/dist/{Haul-DrdXQaTq.js → Haul-CaLW9ULm.js} +2 -2
- package/dist/{Item-CZAsnOoO.js → Item-CW2A2nuL.js} +6 -6
- package/dist/{Item-Dj7cQJ8t.cjs → Item-CpAZC-dF.cjs} +1 -1
- package/dist/{Keyboard-lwCx7plR.js → Keyboard--YA9DHRz.js} +2 -2
- package/dist/{Keyboard-D4FRdVej.cjs → Keyboard-DHGtnfsf.cjs} +1 -1
- package/dist/{Link-lleSh5eG.js → Link-BT_Kwmlr.js} +2 -2
- package/dist/{Link-BSZ-HrRf.cjs → Link-Bhto2KVL.cjs} +1 -1
- package/dist/{Pack-CzZzxA2R.cjs → Pack-C4NdZWyf.cjs} +1 -1
- package/dist/{Pack-Dlj4dZzQ.js → Pack-UzJJ9OhY.js} +2 -2
- package/dist/{Provider-CCZPt2M5.js → Provider-BH1uv6QX.js} +5 -5
- package/dist/{Provider-YIru1nvE.cjs → Provider-lJARiq5i.cjs} +1 -1
- package/dist/{Space-NNqCWFbg.cjs → Space-BrQoodma.cjs} +1 -1
- package/dist/{Space-DBmhvGQL.js → Space-I_hidXYi.js} +1 -1
- package/dist/{Text-DT2rIwXL.js → Text-B7AC8Z1e.js} +423 -390
- package/dist/{Text-B3pNXYhh.js → Text-C-o1z9sP.js} +7 -7
- package/dist/{Text-DrXyKZwR.cjs → Text-C_j_F67Q.cjs} +1 -1
- package/dist/Text-ClTuQXMF.cjs +4 -0
- package/dist/{Text-D1GKnp9s.cjs → Text-DEbr1cmH.cjs} +1 -1
- package/dist/{Text-g6btwQ6E.js → Text-DVv04lTs.js} +5 -5
- package/dist/{Toggle-BzORI5sE.cjs → Toggle-CYB9Vt6b.cjs} +1 -1
- package/dist/{Toggle-DZMcFiiI.js → Toggle-v77mEVLE.js} +5 -5
- package/dist/{Video-DPIAdJ-g.js → Video-TjJf_tXI.js} +1 -1
- package/dist/{Video-BJudMCoc.cjs → Video-hdvNT3La.cjs} +1 -1
- package/dist/{WithIcon-C6COgbZq.js → WithIcon-BnDZ-Qu7.js} +12 -12
- package/dist/{WithIcon-CJvuPkSy.cjs → WithIcon-tr8ELI3W.cjs} +1 -1
- package/dist/{aggregator-5XpEdQtr.js → aggregator-AgOKLWHz.js} +2 -2
- package/dist/{aggregator-BAdXZfPY.cjs → aggregator-QqWwGnYH.cjs} +1 -1
- package/dist/align.cjs +1 -1
- package/dist/align.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/{deep-BjupBYvk.cjs → deep-DsH2ji6Z.cjs} +1 -1
- package/dist/{deep-ChDJVfub.js → deep-T1-57GfG.js} +1 -1
- package/dist/{dimensions-Bt1NqWz6.js → dimensions-C9PXLcE0.js} +1 -1
- package/dist/{dimensions-IEzi7AOM.cjs → dimensions-e5IPRZhn.cjs} +1 -1
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/{eraser-CnbMvm7W.cjs → eraser-D2I1qgOg.cjs} +1 -1
- package/dist/{eraser-DKQ5u3sz.js → eraser-Dmishn8h.js} +2 -2
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +8 -8
- package/dist/{external-vVwTqni5.cjs → external-B1ttDWzy.cjs} +1 -1
- package/dist/{external-C710XUvC.js → external-B9nbHICv.js} +5338 -5275
- package/dist/{external-DYUmsMj8.cjs → external-BWb18P9x.cjs} +2 -2
- package/dist/{external-DNC1e6Hi.js → external-BdxbwUpI.js} +9 -9
- package/dist/{external-BQtPGUNg.cjs → external-BpvGU0dZ.cjs} +1 -1
- package/dist/{external-D18IGHXh.js → external-C3e9emVy.js} +5 -5
- package/dist/{external-DYn3iC-U.js → external-C7Hy9XdI.js} +33 -33
- package/dist/{external-C8i1PCpN.js → external-CcIx4j5m.js} +12 -12
- package/dist/{external-Vjn4WKwt.cjs → external-ClyfPgqG.cjs} +35 -35
- package/dist/{external-CNyc2Q9k.cjs → external-CqhOyYDl.cjs} +1 -1
- package/dist/{external-DhX0dZoF.cjs → external-Cs8oKwvw.cjs} +1 -1
- package/dist/{external-Dmr3e50U.js → external-Csg4_wkz.js} +3 -3
- package/dist/{external-BJulb-Hm.cjs → external-CwvJvXL5.cjs} +1 -1
- package/dist/{external-BTGfIw_K.cjs → external-Cztvb3-K.cjs} +1 -1
- package/dist/{external-GUQ0NMxY.js → external-D12g_huj.js} +6 -6
- package/dist/{external-BOOtUi1D.js → external-DCflyFdb.js} +3 -3
- package/dist/{external-DrwngojV.cjs → external-DMEzx_kb.cjs} +1 -1
- package/dist/{external-Bxg2-RDn.js → external-DTjOTICM.js} +2 -2
- package/dist/{external-CL_RlqOT.cjs → external-D_21zZAf.cjs} +1 -1
- package/dist/{external-AOOzgEKd.cjs → external-DkQnAvKo.cjs} +1 -1
- package/dist/{external-DK_wU08V.js → external-JNlv7kxI.js} +2 -2
- package/dist/{external-BhaLdMzY.js → external-_b4lTCfZ.js} +12 -12
- package/dist/{external-CRbERCqd.cjs → external-dLVcM8tt.cjs} +1 -1
- package/dist/{external-CjZqwgDh.js → external-upiAayc4.js} +8 -8
- package/dist/{font-MRTGIokZ.cjs → font-Bas26Jn-.cjs} +1 -1
- package/dist/{font-CD9W5Tsh.js → font-CcRdsA3n.js} +2 -2
- package/dist/{fontString-MM82zgKY.cjs → fontString-C7H8Imxd.cjs} +1 -1
- package/dist/{fontString-p8gMjlA1.js → fontString-DdV9bi9l.js} +2 -2
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/{hooks-CwSxEEAh.js → hooks-B7ZV7Hz6.js} +4 -4
- package/dist/{hooks-BKLtEDxx.cjs → hooks-CJnV8Pt4.cjs} +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.js +6148 -6053
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/jsx-runtime-C5mzlN2N.js +284 -0
- package/dist/jsx-runtime-CITbqOLs.cjs +22 -0
- 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/pluto.css +1 -1
- package/dist/{provider-D3MPSb7n.cjs → provider-BrBEjlx5.cjs} +5 -5
- package/dist/{provider-DfVWtUxZ.js → provider-Dq9t3iAH.js} +40 -27
- package/dist/src/hardware/device/Select.d.ts +6 -2
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/status/aether/aggregator.d.ts.map +1 -1
- package/dist/src/status/aether/types.d.ts.map +1 -1
- package/dist/src/synnax/aether/provider.d.ts.map +1 -1
- package/dist/src/table/aether/Table.d.ts.map +1 -1
- package/dist/src/table/cells/Cells.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/transformers.d.ts.map +1 -1
- package/dist/src/telem/control/aether/chip.d.ts.map +1 -1
- package/dist/src/telem/control/aether/indicator.d.ts.map +1 -1
- package/dist/src/telem/control/aether/legend.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/viewport/Mask.d.ts.map +1 -1
- package/dist/src/viewport/SelectMode.d.ts +2 -1
- package/dist/src/viewport/SelectMode.d.ts.map +1 -1
- package/dist/src/viewport/use.d.ts +3 -3
- package/dist/src/viewport/use.d.ts.map +1 -1
- package/dist/src/vis/axis/preciseTimeScale.d.ts +102 -0
- package/dist/src/vis/axis/preciseTimeScale.d.ts.map +1 -0
- package/dist/src/vis/axis/preciseTimeScale.spec.d.ts +2 -0
- package/dist/src/vis/axis/preciseTimeScale.spec.d.ts.map +1 -0
- package/dist/src/vis/axis/ticks.d.ts.map +1 -1
- package/dist/src/vis/canvas/aether/canvas.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/Diagram.d.ts.map +1 -1
- package/dist/src/vis/diagram/aether/types.d.ts.map +1 -1
- package/dist/src/vis/eraser/aether/eraser.d.ts.map +1 -1
- package/dist/src/vis/legend/Container.d.ts.map +1 -1
- package/dist/src/vis/legend/Simple.d.ts +6 -3
- package/dist/src/vis/legend/Simple.d.ts.map +1 -1
- package/dist/src/vis/line/aether/line.d.ts +3 -1
- package/dist/src/vis/line/aether/line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/Line.d.ts +1 -1
- package/dist/src/vis/lineplot/Line.d.ts.map +1 -1
- package/dist/src/vis/lineplot/LinePlot.d.ts +1 -0
- package/dist/src/vis/lineplot/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/LinePlot.d.ts.map +1 -1
- package/dist/src/vis/lineplot/aether/axis.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/annotation.d.ts.map +1 -1
- package/dist/src/vis/lineplot/range/aether/provider.d.ts.map +1 -1
- package/dist/src/vis/lineplot/tooltip/aether/tooltip.d.ts.map +1 -1
- package/dist/src/vis/log/aether/Log.d.ts.map +1 -1
- package/dist/src/vis/measure/aether/measure.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts.map +1 -1
- package/dist/src/vis/value/use.d.ts.map +1 -1
- package/dist/{state-w46WTrh-.js → state-CUPEHHgf.js} +116 -110
- package/dist/{state-BKyv_jWZ.cjs → state-LaBGf4_k.cjs} +4 -4
- 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/dist/{useClickOutside-vpv_GiBw.js → useClickOutside-N6MHxbOe.js} +2 -2
- package/dist/{useClickOutside-EJHWO4Q9.cjs → useClickOutside-PFl3AvPU.cjs} +1 -1
- package/dist/{useDebouncedCallback-DDLuEZa8.js → useDebouncedCallback-D4Ec7whQ.js} +1 -1
- package/dist/{useDebouncedCallback-CVLx7N1s.cjs → useDebouncedCallback-vg2DKTH7.cjs} +1 -1
- package/dist/{useMemoCompare-ONEAVO05.cjs → useMemoCompare-BGEWpAJU.cjs} +1 -1
- package/dist/{useMemoCompare-B-Y9Ft2w.js → useMemoCompare-Cq_C2ddc.js} +2 -2
- package/dist/{useVirtualCursorDragWebKit-DFC-XFfl.js → useVirtualCursorDragWebKit-BBTGd7Xe.js} +11 -11
- package/dist/useVirtualCursorDragWebKit-Rnok8Nft.cjs +1 -0
- package/dist/value-C6JZdCF2.cjs +57 -0
- package/dist/{value-DbcZ1sQB.js → value-Dk2DJbst.js} +1528 -1399
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +7 -7
- package/dist/Divider-MIbyu5ZH.cjs +0 -31
- package/dist/Text-Hnsb1fus.cjs +0 -4
- package/dist/jsx-runtime-CYK1ROHF.js +0 -445
- package/dist/jsx-runtime-UYeBbnYT.cjs +0 -31
- package/dist/useVirtualCursorDragWebKit-BLtwRQY7.cjs +0 -1
- package/dist/value-DQqKhQvt.cjs +0 -57
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const E=require("./Text-Hnsb1fus.cjs"),x=require("./jsx-runtime-UYeBbnYT.cjs"),b=require("react"),ie=require("./state-BKyv_jWZ.cjs"),xe=require("./useDebouncedCallback-CVLx7N1s.cjs"),De=require("./Text-DrXyKZwR.cjs"),ye=require("./Divider-MIbyu5ZH.cjs");require("./aggregator-BAdXZfPY.cjs");require("./Pack-BbwDtaE6.cjs");require("./css-CU7tous7.cjs");require("./Toggle-BzORI5sE.cjs");const Fe=Symbol(),ce=Symbol(),L="a",K="w";let He=(t,e)=>new Proxy(t,e);const X=Object.getPrototypeOf,fe=new WeakMap,oe=t=>t&&(fe.has(t)?fe.get(t):X(t)===Object.prototype||X(t)===Array.prototype),de=t=>typeof t=="object"&&t!==null,ge=new WeakMap,Me=t=>t[ce]||t,Re=(t,e,s)=>{if(!oe(t))return t;const r=Me(t),n=(i=>Object.isFrozen(i)||Object.values(Object.getOwnPropertyDescriptors(i)).some(c=>!c.writable))(r);let u=s&&s.get(r);return u&&u[1].f===n||(u=((i,c)=>{const o={f:c};let l=!1;const a=(h,f)=>{if(!l){let p=o[L].get(i);if(p||(p={},o[L].set(i,p)),h===K)p[K]=!0;else{let A=p[h];A||(A=new Set,p[h]=A),A.add(f)}}},g={get:(h,f)=>f===ce?i:(a("k",f),Re(Reflect.get(h,f),o[L],o.c)),has:(h,f)=>f===Fe?(l=!0,o[L].delete(i),!0):(a("h",f),Reflect.has(h,f)),getOwnPropertyDescriptor:(h,f)=>(a("o",f),Reflect.getOwnPropertyDescriptor(h,f)),ownKeys:h=>(a(K),Reflect.ownKeys(h))};return c&&(g.set=g.deleteProperty=()=>!1),[g,o]})(r,n),u[1].p=He(n?(i=>{let c=ge.get(i);if(!c){if(Array.isArray(i))c=Array.from(i);else{const o=Object.getOwnPropertyDescriptors(i);Object.values(o).forEach(l=>{l.configurable=!0}),c=Object.create(X(i),o)}ge.set(i,c)}return c})(r):r,u[0]),s&&s.set(r,u)),u[1][L]=e,u[1].c=s,u[1].p},Be=(t,e,s,r)=>{if(Object.is(t,e))return!1;if(!de(t)||!de(e))return!0;const n=s.get(Me(t));if(!n)return!0;if(r){const i=r.get(t);if(i&&i.n===e)return i.g;r.set(t,{n:e,g:!1})}let u=null;try{for(const i of n.h||[])if(u=Reflect.has(t,i)!==Reflect.has(e,i),u)return u;if(n[K]===!0){if(u=((i,c)=>{const o=Reflect.ownKeys(i),l=Reflect.ownKeys(c);return o.length!==l.length||o.some((a,g)=>a!==l[g])})(t,e),u)return u}else for(const i of n.o||[])if(u=!!Reflect.getOwnPropertyDescriptor(t,i)!=!!Reflect.getOwnPropertyDescriptor(e,i),u)return u;for(const i of n.k||[])if(u=Be(t[i],e[i],s,r),u)return u;return u===null&&(u=!0),u}finally{r&&r.set(t,{n:e,g:u})}},Ue=t=>!!oe(t)&&Fe in t,Se=t=>oe(t)&&t[ce]||null,Ve="h",Ge="w",Je="o",Qe="k",Z=t=>typeof t=="object"&&t!==null,_e=(t,e)=>{if(!Z(t))return t;const s=Se(t);return s!==null?(Ue(t),s):(e.has(t)||(e.add(t),Object.entries(t).forEach(([r,n])=>{const u=_e(n,e);Object.is(u,n)||(t[r]=u)})),t)},q=(t,e,s)=>{var r,n,u;if(!Z(t)||!Z(e))return;const i=s.get(Se(e)||e);i&&((r=i[Ve])==null||r.forEach(c=>{Reflect.has(t,c)}),i[Ge]===!0&&Reflect.ownKeys(t),(n=i[Je])==null||n.forEach(c=>{Reflect.getOwnPropertyDescriptor(t,c)}),(u=i[Qe])==null||u.forEach(c=>{q(t[c],e[c],s)}))},U="o",V="r",G="a";function Xe(t,e){var s;let r=0;const n=(s=e==null?void 0:e.size)!=null?s:1,u=[],i=e!=null&&e.noWeakMap?null:new WeakMap;return o=>{const l=i==null?void 0:i.get(o);if(l)return l[V];for(let p=0;p<n;p+=1){const A=u[(r+p)%n];if(!A)break;if(!Be(A[U],o,A[G],new WeakMap))return q(o,A[U],A[G]),i==null||i.set(o,A),A[V]}const a=new WeakMap,g=Re(o,a),h=_e(t(g),new Set);q(o,o,a);const f={[U]:o,[V]:h,[G]:a};return r=(r-1+n)%n,u[r]=f,i==null||i.set(o,f),h}}const Oe=(t,e)=>ie.S.RUNTIME==="browser"?Xe(t,e):t;function _(t){return Array.isArray?Array.isArray(t):be(t)==="[object Array]"}function Ze(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function qe(t){return t==null?"":Ze(t)}function S(t){return typeof t=="string"}function Ie(t){return typeof t=="number"}function et(t){return t===!0||t===!1||tt(t)&&be(t)=="[object Boolean]"}function we(t){return typeof t=="object"}function tt(t){return we(t)&&t!==null}function F(t){return t!=null}function J(t){return!t.trim().length}function be(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const st="Incorrect 'index' type",rt=t=>`Invalid value for key ${t}`,nt=t=>`Pattern length exceeds max of ${t}.`,ut=t=>`Missing ${t} property in key`,it=t=>`Property 'weight' in key '${t}' must be a positive integer`,pe=Object.prototype.hasOwnProperty;class ct{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(r=>{let n=ve(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 ve(t){let e=null,s=null,r=null,n=1,u=null;if(S(t)||_(t))r=t,e=Ae(t),s=ee(t);else{if(!pe.call(t,"name"))throw new Error(ut("name"));const i=t.name;if(r=i,pe.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(it(i));e=Ae(i),s=ee(i),u=t.getFn}return{path:e,id:s,weight:n,src:r,getFn:u}}function Ae(t){return _(t)?t:t.split(".")}function ee(t){return _(t)?t.join("."):t}function ot(t,e){let s=[],r=!1;const n=(u,i,c)=>{if(F(u))if(!i[c])s.push(u);else{let o=i[c];const l=u[o];if(!F(l))return;if(c===i.length-1&&(S(l)||Ie(l)||et(l)))s.push(qe(l));else if(_(l)){r=!0;for(let a=0,g=l.length;a<g;a+=1)n(l[a],i,c+1)}else i.length&&n(l,i,c+1)}};return n(t,S(e)?e.split("."):e,0),r?s:s[0]}const lt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},at={isCaseSensitive:!1,ignoreDiacritics:!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},ht={location:0,threshold:.6,distance:100},ft={useExtendedSearch:!1,getFn:ot,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var d={...at,...lt,...ht,...ft};const dt=/[^ ]+/g;function gt(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(n){const u=n.match(dt).length;if(s.has(u))return s.get(u);const i=1/Math.pow(u,.5*t),c=parseFloat(Math.round(i*r)/r);return s.set(u,c),c},clear(){s.clear()}}}class le{constructor({getFn:e=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){this.norm=gt(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,S(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();S(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(!F(e)||J(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,u)=>{let i=n.getFn?n.getFn(e):this.getFn(e,n.path);if(F(i)){if(_(i)){let c=[];const o=[{nestedArrIndex:-1,value:i}];for(;o.length;){const{nestedArrIndex:l,value:a}=o.pop();if(F(a))if(S(a)&&!J(a)){let g={v:a,i:l,n:this.norm.get(a)};c.push(g)}else _(a)&&a.forEach((g,h)=>{o.push({nestedArrIndex:h,value:g})})}r.$[u]=c}else if(S(i)&&!J(i)){let c={v:i,n:this.norm.get(i)};r.$[u]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function je(t,e,{getFn:s=d.getFn,fieldNormWeight:r=d.fieldNormWeight}={}){const n=new le({getFn:s,fieldNormWeight:r});return n.setKeys(t.map(ve)),n.setSources(e),n.create(),n}function pt(t,{getFn:e=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){const{keys:r,records:n}=t,u=new le({getFn:e,fieldNormWeight:s});return u.setKeys(r),u.setIndexRecords(n),u}function N(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:n=d.distance,ignoreLocation:u=d.ignoreLocation}={}){const i=e/t.length;if(u)return i;const c=Math.abs(r-s);return n?i+c/n:c?1:i}function At(t=[],e=d.minMatchCharLength){let s=[],r=-1,n=-1,u=0;for(let i=t.length;u<i;u+=1){let c=t[u];c&&r===-1?r=u:!c&&r!==-1&&(n=u-1,n-r+1>=e&&s.push([r,n]),r=-1)}return t[u-1]&&u-r>=e&&s.push([r,u-1]),s}const T=32;function Et(t,e,s,{location:r=d.location,distance:n=d.distance,threshold:u=d.threshold,findAllMatches:i=d.findAllMatches,minMatchCharLength:c=d.minMatchCharLength,includeMatches:o=d.includeMatches,ignoreLocation:l=d.ignoreLocation}={}){if(e.length>T)throw new Error(nt(T));const a=e.length,g=t.length,h=Math.max(0,Math.min(r,g));let f=u,p=h;const A=c>1||o,D=A?Array(g):[];let y;for(;(y=t.indexOf(e,p))>-1;){let m=N(e,{currentLocation:y,expectedLocation:h,distance:n,ignoreLocation:l});if(f=Math.min(m,f),p=y+a,A){let I=0;for(;I<a;)D[y+I]=1,I+=1}}p=-1;let M=[],O=1,C=a+g;const j=1<<a-1;for(let m=0;m<a;m+=1){let I=0,w=C;for(;I<w;)N(e,{errors:m,currentLocation:h+w,expectedLocation:h,distance:n,ignoreLocation:l})<=f?I=w:C=w,w=Math.floor((C-I)/2+I);C=w;let ae=Math.max(1,h-w+1),H=i?g:Math.min(h+w,g)+a,P=Array(H+2);P[H+1]=(1<<m)-1;for(let B=H;B>=ae;B-=1){let $=B-1,he=s[t.charAt($)];if(A&&(D[$]=+!!he),P[B]=(P[B+1]<<1|1)&he,m&&(P[B]|=(M[B+1]|M[B])<<1|1|M[B+1]),P[B]&j&&(O=N(e,{errors:m,currentLocation:$,expectedLocation:h,distance:n,ignoreLocation:l}),O<=f)){if(f=O,p=$,p<=h)break;ae=Math.max(1,2*h-p)}}if(N(e,{errors:m+1,currentLocation:h,expectedLocation:h,distance:n,ignoreLocation:l})>f)break;M=P}const R={isMatch:p>=0,score:Math.max(.001,O)};if(A){const m=At(D,c);m.length?o&&(R.indices=m):R.isMatch=!1}return R}function Ct(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}const Y=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class Te{constructor(e,{location:s=d.location,threshold:r=d.threshold,distance:n=d.distance,includeMatches:u=d.includeMatches,findAllMatches:i=d.findAllMatches,minMatchCharLength:c=d.minMatchCharLength,isCaseSensitive:o=d.isCaseSensitive,ignoreDiacritics:l=d.ignoreDiacritics,ignoreLocation:a=d.ignoreLocation}={}){if(this.options={location:s,threshold:r,distance:n,includeMatches:u,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:o,ignoreDiacritics:l,ignoreLocation:a},e=o?e:e.toLowerCase(),e=l?Y(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const g=(f,p)=>{this.chunks.push({pattern:f,alphabet:Ct(f),startIndex:p})},h=this.pattern.length;if(h>T){let f=0;const p=h%T,A=h-p;for(;f<A;)g(this.pattern.substr(f,T),f),f+=T;if(p){const D=h-T;g(this.pattern.substr(D),D)}}else g(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,ignoreDiacritics:r,includeMatches:n}=this.options;if(e=s?e:e.toLowerCase(),e=r?Y(e):e,this.pattern===e){let A={isMatch:!0,score:0};return n&&(A.indices=[[0,e.length-1]]),A}const{location:u,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:l,ignoreLocation:a}=this.options;let g=[],h=0,f=!1;this.chunks.forEach(({pattern:A,alphabet:D,startIndex:y})=>{const{isMatch:M,score:O,indices:C}=Et(e,A,D,{location:u+y,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:l,includeMatches:n,ignoreLocation:a});M&&(f=!0),h+=O,M&&C&&(g=[...g,...C])});let p={isMatch:f,score:f?h/this.chunks.length:1};return f&&n&&(p.indices=g),p}}class v{constructor(e){this.pattern=e}static isMultiMatch(e){return Ee(e,this.multiRegex)}static isSingleMatch(e){return Ee(e,this.singleRegex)}search(){}}function Ee(t,e){const s=t.match(e);return s?s[1]:null}class mt extends v{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 xt extends v{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 Dt extends v{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 yt extends v{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 Ft extends v{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 Mt extends v{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 Pe extends v{constructor(e,{location:s=d.location,threshold:r=d.threshold,distance:n=d.distance,includeMatches:u=d.includeMatches,findAllMatches:i=d.findAllMatches,minMatchCharLength:c=d.minMatchCharLength,isCaseSensitive:o=d.isCaseSensitive,ignoreDiacritics:l=d.ignoreDiacritics,ignoreLocation:a=d.ignoreLocation}={}){super(e),this._bitapSearch=new Te(e,{location:s,threshold:r,distance:n,includeMatches:u,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:o,ignoreDiacritics:l,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class ke extends v{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=[],u=this.pattern.length;for(;(r=e.indexOf(this.pattern,s))>-1;)s=r+u,n.push([r,s-1]);const i=!!n.length;return{isMatch:i,score:i?0:1,indices:n}}}const te=[mt,ke,Dt,yt,Mt,Ft,xt,Pe],Ce=te.length,Rt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Bt="|";function St(t,e={}){return t.split(Bt).map(s=>{let r=s.trim().split(Rt).filter(u=>u&&!!u.trim()),n=[];for(let u=0,i=r.length;u<i;u+=1){const c=r[u];let o=!1,l=-1;for(;!o&&++l<Ce;){const a=te[l];let g=a.isMultiMatch(c);g&&(n.push(new a(g,e)),o=!0)}if(!o)for(l=-1;++l<Ce;){const a=te[l];let g=a.isSingleMatch(c);if(g){n.push(new a(g,e));break}}}return n})}const _t=new Set([Pe.type,ke.type]);class Ot{constructor(e,{isCaseSensitive:s=d.isCaseSensitive,ignoreDiacritics:r=d.ignoreDiacritics,includeMatches:n=d.includeMatches,minMatchCharLength:u=d.minMatchCharLength,ignoreLocation:i=d.ignoreLocation,findAllMatches:c=d.findAllMatches,location:o=d.location,threshold:l=d.threshold,distance:a=d.distance}={}){this.query=null,this.options={isCaseSensitive:s,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:u,findAllMatches:c,ignoreLocation:i,location:o,threshold:l,distance:a},e=s?e:e.toLowerCase(),e=r?Y(e):e,this.pattern=e,this.query=St(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,ignoreDiacritics:u}=this.options;e=n?e:e.toLowerCase(),e=u?Y(e):e;let i=0,c=[],o=0;for(let l=0,a=s.length;l<a;l+=1){const g=s[l];c.length=0,i=0;for(let h=0,f=g.length;h<f;h+=1){const p=g[h],{isMatch:A,indices:D,score:y}=p.search(e);if(A){if(i+=1,o+=y,r){const M=p.constructor.type;_t.has(M)?c=[...c,...D]:c.push(D)}}else{o=0,i=0,c.length=0;break}}if(i){let h={isMatch:!0,score:o/i};return r&&(h.indices=c),h}}return{isMatch:!1,score:1}}}const se=[];function It(...t){se.push(...t)}function re(t,e){for(let s=0,r=se.length;s<r;s+=1){let n=se[s];if(n.condition(t,e))return new n(t,e)}return new Te(t,e)}const W={AND:"$and",OR:"$or"},ne={PATH:"$path",PATTERN:"$val"},ue=t=>!!(t[W.AND]||t[W.OR]),wt=t=>!!t[ne.PATH],bt=t=>!_(t)&&we(t)&&!ue(t),me=t=>({[W.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Le(t,e,{auto:s=!0}={}){const r=n=>{let u=Object.keys(n);const i=wt(n);if(!i&&u.length>1&&!ue(n))return r(me(n));if(bt(n)){const o=i?n[ne.PATH]:u[0],l=i?n[ne.PATTERN]:n[o];if(!S(l))throw new Error(rt(o));const a={keyId:ee(o),pattern:l};return s&&(a.searcher=re(l,e)),a}let c={children:[],operator:u[0]};return u.forEach(o=>{const l=n[o];_(l)&&l.forEach(a=>{c.children.push(r(a))})}),c};return ue(t)||(t=me(t)),r(t)}function vt(t,{ignoreFieldNorm:e=d.ignoreFieldNorm}){t.forEach(s=>{let r=1;s.matches.forEach(({key:n,norm:u,score:i})=>{const c=n?n.weight:null;r*=Math.pow(i===0&&c?Number.EPSILON:i,(c||1)*(e?1:u))}),s.score=r})}function jt(t,e){const s=t.matches;e.matches=[],F(s)&&s.forEach(r=>{if(!F(r.indices)||!r.indices.length)return;const{indices:n,value:u}=r;let i={indices:n,value:u};r.key&&(i.key=r.key.src),r.idx>-1&&(i.refIndex=r.idx),e.matches.push(i)})}function Tt(t,e){e.score=t.score}function Pt(t,e,{includeMatches:s=d.includeMatches,includeScore:r=d.includeScore}={}){const n=[];return s&&n.push(jt),r&&n.push(Tt),t.map(u=>{const{idx:i}=u,c={item:e[i],refIndex:i};return n.length&&n.forEach(o=>{o(u,c)}),c})}class k{constructor(e,s={},r){this.options={...d,...s},this.options.useExtendedSearch,this._keyStore=new ct(this.options.keys),this.setCollection(e,r)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof le))throw new Error(st);this._myIndex=s||je(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){F(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 u=this._docs[r];e(u,r)&&(this.removeAt(r),r-=1,n-=1,s.push(u))}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:u,sortFn:i,ignoreFieldNorm:c}=this.options;let o=S(e)?S(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return vt(o,{ignoreFieldNorm:c}),u&&o.sort(i),Ie(s)&&s>-1&&(o=o.slice(0,s)),Pt(o,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){const s=re(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach(({v:u,i,n:c})=>{if(!F(u))return;const{isMatch:o,score:l,indices:a}=s.searchIn(u);o&&n.push({item:u,idx:i,matches:[{score:l,value:u,norm:c,indices:a}]})}),n}_searchLogical(e){const s=Le(e,this.options),r=(c,o,l)=>{if(!c.children){const{keyId:g,searcher:h}=c,f=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(o,g),searcher:h});return f&&f.length?[{idx:l,item:o,matches:f}]:[]}const a=[];for(let g=0,h=c.children.length;g<h;g+=1){const f=c.children[g],p=r(f,o,l);if(p.length)a.push(...p);else if(c.operator===W.AND)return[]}return a},n=this._myIndex.records,u={},i=[];return n.forEach(({$:c,i:o})=>{if(F(c)){let l=r(s,c,o);l.length&&(u[o]||(u[o]={idx:o,item:c,matches:[]},i.push(u[o])),l.forEach(({matches:a})=>{u[o].matches.push(...a)}))}}),i}_searchObjectList(e){const s=re(e,this.options),{keys:r,records:n}=this._myIndex,u=[];return n.forEach(({$:i,i:c})=>{if(!F(i))return;let o=[];r.forEach((l,a)=>{o.push(...this._findMatches({key:l,value:i[a],searcher:s}))}),o.length&&u.push({idx:c,item:i,matches:o})}),u}_findMatches({key:e,value:s,searcher:r}){if(!F(s))return[];let n=[];if(_(s))s.forEach(({v:u,i,n:c})=>{if(!F(u))return;const{isMatch:o,score:l,indices:a}=r.searchIn(u);o&&n.push({score:l,key:e,value:u,idx:i,norm:c,indices:a})});else{const{v:u,n:i}=s,{isMatch:c,score:o,indices:l}=r.searchIn(u);c&&n.push({score:o,key:e,value:u,norm:i,indices:l})}return n}}k.version="7.1.0";k.createIndex=je;k.parseIndex=pt;k.config=d;k.parseQuery=Le;It(Ot);const kt={threshold:.3},$e=t=>e=>{const s=new k(e,{keys:Object.keys(e[0]),...kt,...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))}},Lt=$e(),Ne=({term:t,searcher:e=Lt})=>Oe(({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}),Ke=({debounce:t=250,value:e,onChange:s,transformBefore:r})=>{const[n,u]=ie.usePurePassthrough({onChange:s,value:e,initial:""}),{setTransform:i,deleteTransform:c}=E.useDataUtils(),o=xe.useDebouncedCallback(i,t,[]),l=b.useCallback(a=>{u(a),a.length===0?c("filter"):(r!=null&&(a=r(a)),o("filter",Ne({term:a})))},[u,r]);return{value:n,onChange:l}},Ye=({children:t=s=>x.jsxRuntimeExports.jsx(De.Text,{placeholder:"Filter",...s}),...e})=>t(Ke(e)),z={height:150},Q=()=>x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h4",variant:"disabled",hideIcon:!0,style:z,children:"No Results"}),$t=()=>x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h4",variant:"disabled",hideIcon:!0,style:z,children:"Type to search"}),Nt=()=>x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h2",variant:"disabled",hideIcon:!0,style:z,children:x.jsxRuntimeExports.jsx(ye.E4.Loading,{})}),Kt=({error:t})=>x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h4",variant:"error",style:z,children:t.message}),Yt=t=>t,We=({debounce:t=250,searcher:e,value:s,onChange:r,pageSize:n=15,filter:u=Yt})=>{const[i,c]=ie.usePurePassthrough({value:s,onChange:r,initial:""}),o=ye.useSyncedRef(i),l=b.useRef(!1),a=b.useRef(!0),g=b.useRef(0),{setSourceData:h,setEmptyContent:f,getDefaultEmptyContent:p}=E.useDataUtils(),{setHasMore:A,setOnFetchMore:D}=E.useInfiniteUtils();b.useEffect(()=>f(x.jsxRuntimeExports.jsx($t,{})),[f]);const y=b.useCallback((C=!1)=>{if(o.current.length>0||l.current||e==null)return;C&&(g.current=0,a.current=!0,A(!0)),l.current=!0,f(x.jsxRuntimeExports.jsx(Nt,{})),(async()=>{try{let R=await e.page(g.current,n);R=u(R),R.length===0&&f(p()??x.jsxRuntimeExports.jsx(Q,{})),R.length<n&&(a.current=!1,A(!1)),g.current+=n,h(C?R:m=>[...m,...R])}catch(R){l.current=!1,f(x.jsxRuntimeExports.jsx(Kt,{error:R}))}finally{l.current=!1}})()},[e,h,n,u]);b.useEffect(()=>{y(!0),D(y)},[y]);const M=xe.useDebouncedCallback(C=>{if(C.length===0){y(!0);return}if(e==null)return f(x.jsxRuntimeExports.jsx(Q,{}));e.search(C).then(j=>{j.length===0&&f(x.jsxRuntimeExports.jsx(Q,{})),h(u(j))}).catch(j=>{f(x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h4",variant:"error",children:j.message}))})},t,[e,h,f,u]),O=b.useCallback(C=>{c(C),M(C)},[c,M]);return{value:i,onChange:O}},Wt=t=>x.jsxRuntimeExports.jsx(De.Text,{placeholder:"Search",...t}),ze=({children:t=Wt,...e})=>t(We(e)),zt=Object.freeze(Object.defineProperty({__proto__:null,Column:E.Column,Core:E.Core,DataProvider:E.DataProvider,Filter:Ye,Hover:E.Hover,ItemFrame:E.ItemFrame,List:E.List,Search:ze,Selector:E.Selector,selectValueIsZero:E.selectValueIsZero,useDataContext:E.useDataContext,useDataUtils:E.useDataUtils,useFilter:Ke,useGetTransformedData:E.useGetTransformedData,useHoverContext:E.useHoverContext,useSearch:We,useSelect:E.useSelect,useSelection:E.useSelection,useSelectionContext:E.useSelectionContext,useSelectionUtils:E.useSelectionUtils,useSetSourceData:E.useSetSourceData,useSourceData:E.useSourceData,useTransformedData:E.useTransformedData},Symbol.toStringTag,{value:"Module"}));exports.Filter=Ye;exports.Search=ze;exports.createFilterTransform=Ne;exports.external=zt;exports.fuseFilter=$e;exports.proxyMemo=Oe;
|
|
1
|
+
"use strict";const E=require("./Text-ClTuQXMF.cjs"),x=require("./jsx-runtime-CITbqOLs.cjs"),b=require("react"),ie=require("./state-LaBGf4_k.cjs"),xe=require("./useDebouncedCallback-vg2DKTH7.cjs"),De=require("./Text-C_j_F67Q.cjs"),ye=require("./Divider-CJNDIsD4.cjs");require("./aggregator-QqWwGnYH.cjs");require("./Pack-BbwDtaE6.cjs");require("./css-CU7tous7.cjs");require("./Toggle-CYB9Vt6b.cjs");const Fe=Symbol(),ce=Symbol(),L="a",K="w";let He=(t,e)=>new Proxy(t,e);const X=Object.getPrototypeOf,fe=new WeakMap,oe=t=>t&&(fe.has(t)?fe.get(t):X(t)===Object.prototype||X(t)===Array.prototype),de=t=>typeof t=="object"&&t!==null,ge=new WeakMap,Me=t=>t[ce]||t,Re=(t,e,s)=>{if(!oe(t))return t;const r=Me(t),n=(i=>Object.isFrozen(i)||Object.values(Object.getOwnPropertyDescriptors(i)).some(c=>!c.writable))(r);let u=s&&s.get(r);return u&&u[1].f===n||(u=((i,c)=>{const o={f:c};let l=!1;const a=(h,f)=>{if(!l){let p=o[L].get(i);if(p||(p={},o[L].set(i,p)),h===K)p[K]=!0;else{let A=p[h];A||(A=new Set,p[h]=A),A.add(f)}}},g={get:(h,f)=>f===ce?i:(a("k",f),Re(Reflect.get(h,f),o[L],o.c)),has:(h,f)=>f===Fe?(l=!0,o[L].delete(i),!0):(a("h",f),Reflect.has(h,f)),getOwnPropertyDescriptor:(h,f)=>(a("o",f),Reflect.getOwnPropertyDescriptor(h,f)),ownKeys:h=>(a(K),Reflect.ownKeys(h))};return c&&(g.set=g.deleteProperty=()=>!1),[g,o]})(r,n),u[1].p=He(n?(i=>{let c=ge.get(i);if(!c){if(Array.isArray(i))c=Array.from(i);else{const o=Object.getOwnPropertyDescriptors(i);Object.values(o).forEach(l=>{l.configurable=!0}),c=Object.create(X(i),o)}ge.set(i,c)}return c})(r):r,u[0]),s&&s.set(r,u)),u[1][L]=e,u[1].c=s,u[1].p},Be=(t,e,s,r)=>{if(Object.is(t,e))return!1;if(!de(t)||!de(e))return!0;const n=s.get(Me(t));if(!n)return!0;if(r){const i=r.get(t);if(i&&i.n===e)return i.g;r.set(t,{n:e,g:!1})}let u=null;try{for(const i of n.h||[])if(u=Reflect.has(t,i)!==Reflect.has(e,i),u)return u;if(n[K]===!0){if(u=((i,c)=>{const o=Reflect.ownKeys(i),l=Reflect.ownKeys(c);return o.length!==l.length||o.some((a,g)=>a!==l[g])})(t,e),u)return u}else for(const i of n.o||[])if(u=!!Reflect.getOwnPropertyDescriptor(t,i)!=!!Reflect.getOwnPropertyDescriptor(e,i),u)return u;for(const i of n.k||[])if(u=Be(t[i],e[i],s,r),u)return u;return u===null&&(u=!0),u}finally{r&&r.set(t,{n:e,g:u})}},Ue=t=>!!oe(t)&&Fe in t,Se=t=>oe(t)&&t[ce]||null,Ve="h",Ge="w",Je="o",Qe="k",Z=t=>typeof t=="object"&&t!==null,_e=(t,e)=>{if(!Z(t))return t;const s=Se(t);return s!==null?(Ue(t),s):(e.has(t)||(e.add(t),Object.entries(t).forEach(([r,n])=>{const u=_e(n,e);Object.is(u,n)||(t[r]=u)})),t)},q=(t,e,s)=>{var r,n,u;if(!Z(t)||!Z(e))return;const i=s.get(Se(e)||e);i&&((r=i[Ve])==null||r.forEach(c=>{Reflect.has(t,c)}),i[Ge]===!0&&Reflect.ownKeys(t),(n=i[Je])==null||n.forEach(c=>{Reflect.getOwnPropertyDescriptor(t,c)}),(u=i[Qe])==null||u.forEach(c=>{q(t[c],e[c],s)}))},U="o",V="r",G="a";function Xe(t,e){var s;let r=0;const n=(s=e==null?void 0:e.size)!=null?s:1,u=[],i=e!=null&&e.noWeakMap?null:new WeakMap;return o=>{const l=i==null?void 0:i.get(o);if(l)return l[V];for(let p=0;p<n;p+=1){const A=u[(r+p)%n];if(!A)break;if(!Be(A[U],o,A[G],new WeakMap))return q(o,A[U],A[G]),i==null||i.set(o,A),A[V]}const a=new WeakMap,g=Re(o,a),h=_e(t(g),new Set);q(o,o,a);const f={[U]:o,[V]:h,[G]:a};return r=(r-1+n)%n,u[r]=f,i==null||i.set(o,f),h}}const Oe=(t,e)=>ie.S.RUNTIME==="browser"?Xe(t,e):t;function _(t){return Array.isArray?Array.isArray(t):be(t)==="[object Array]"}function Ze(t){if(typeof t=="string")return t;let e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function qe(t){return t==null?"":Ze(t)}function S(t){return typeof t=="string"}function Ie(t){return typeof t=="number"}function et(t){return t===!0||t===!1||tt(t)&&be(t)=="[object Boolean]"}function we(t){return typeof t=="object"}function tt(t){return we(t)&&t!==null}function F(t){return t!=null}function J(t){return!t.trim().length}function be(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const st="Incorrect 'index' type",rt=t=>`Invalid value for key ${t}`,nt=t=>`Pattern length exceeds max of ${t}.`,ut=t=>`Missing ${t} property in key`,it=t=>`Property 'weight' in key '${t}' must be a positive integer`,pe=Object.prototype.hasOwnProperty;class ct{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(r=>{let n=ve(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 ve(t){let e=null,s=null,r=null,n=1,u=null;if(S(t)||_(t))r=t,e=Ae(t),s=ee(t);else{if(!pe.call(t,"name"))throw new Error(ut("name"));const i=t.name;if(r=i,pe.call(t,"weight")&&(n=t.weight,n<=0))throw new Error(it(i));e=Ae(i),s=ee(i),u=t.getFn}return{path:e,id:s,weight:n,src:r,getFn:u}}function Ae(t){return _(t)?t:t.split(".")}function ee(t){return _(t)?t.join("."):t}function ot(t,e){let s=[],r=!1;const n=(u,i,c)=>{if(F(u))if(!i[c])s.push(u);else{let o=i[c];const l=u[o];if(!F(l))return;if(c===i.length-1&&(S(l)||Ie(l)||et(l)))s.push(qe(l));else if(_(l)){r=!0;for(let a=0,g=l.length;a<g;a+=1)n(l[a],i,c+1)}else i.length&&n(l,i,c+1)}};return n(t,S(e)?e.split("."):e,0),r?s:s[0]}const lt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},at={isCaseSensitive:!1,ignoreDiacritics:!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},ht={location:0,threshold:.6,distance:100},ft={useExtendedSearch:!1,getFn:ot,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var d={...at,...lt,...ht,...ft};const dt=/[^ ]+/g;function gt(t=1,e=3){const s=new Map,r=Math.pow(10,e);return{get(n){const u=n.match(dt).length;if(s.has(u))return s.get(u);const i=1/Math.pow(u,.5*t),c=parseFloat(Math.round(i*r)/r);return s.set(u,c),c},clear(){s.clear()}}}class le{constructor({getFn:e=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){this.norm=gt(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,S(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();S(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(!F(e)||J(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,u)=>{let i=n.getFn?n.getFn(e):this.getFn(e,n.path);if(F(i)){if(_(i)){let c=[];const o=[{nestedArrIndex:-1,value:i}];for(;o.length;){const{nestedArrIndex:l,value:a}=o.pop();if(F(a))if(S(a)&&!J(a)){let g={v:a,i:l,n:this.norm.get(a)};c.push(g)}else _(a)&&a.forEach((g,h)=>{o.push({nestedArrIndex:h,value:g})})}r.$[u]=c}else if(S(i)&&!J(i)){let c={v:i,n:this.norm.get(i)};r.$[u]=c}}}),this.records.push(r)}toJSON(){return{keys:this.keys,records:this.records}}}function je(t,e,{getFn:s=d.getFn,fieldNormWeight:r=d.fieldNormWeight}={}){const n=new le({getFn:s,fieldNormWeight:r});return n.setKeys(t.map(ve)),n.setSources(e),n.create(),n}function pt(t,{getFn:e=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){const{keys:r,records:n}=t,u=new le({getFn:e,fieldNormWeight:s});return u.setKeys(r),u.setIndexRecords(n),u}function N(t,{errors:e=0,currentLocation:s=0,expectedLocation:r=0,distance:n=d.distance,ignoreLocation:u=d.ignoreLocation}={}){const i=e/t.length;if(u)return i;const c=Math.abs(r-s);return n?i+c/n:c?1:i}function At(t=[],e=d.minMatchCharLength){let s=[],r=-1,n=-1,u=0;for(let i=t.length;u<i;u+=1){let c=t[u];c&&r===-1?r=u:!c&&r!==-1&&(n=u-1,n-r+1>=e&&s.push([r,n]),r=-1)}return t[u-1]&&u-r>=e&&s.push([r,u-1]),s}const T=32;function Et(t,e,s,{location:r=d.location,distance:n=d.distance,threshold:u=d.threshold,findAllMatches:i=d.findAllMatches,minMatchCharLength:c=d.minMatchCharLength,includeMatches:o=d.includeMatches,ignoreLocation:l=d.ignoreLocation}={}){if(e.length>T)throw new Error(nt(T));const a=e.length,g=t.length,h=Math.max(0,Math.min(r,g));let f=u,p=h;const A=c>1||o,D=A?Array(g):[];let y;for(;(y=t.indexOf(e,p))>-1;){let m=N(e,{currentLocation:y,expectedLocation:h,distance:n,ignoreLocation:l});if(f=Math.min(m,f),p=y+a,A){let I=0;for(;I<a;)D[y+I]=1,I+=1}}p=-1;let M=[],O=1,C=a+g;const j=1<<a-1;for(let m=0;m<a;m+=1){let I=0,w=C;for(;I<w;)N(e,{errors:m,currentLocation:h+w,expectedLocation:h,distance:n,ignoreLocation:l})<=f?I=w:C=w,w=Math.floor((C-I)/2+I);C=w;let ae=Math.max(1,h-w+1),H=i?g:Math.min(h+w,g)+a,P=Array(H+2);P[H+1]=(1<<m)-1;for(let B=H;B>=ae;B-=1){let $=B-1,he=s[t.charAt($)];if(A&&(D[$]=+!!he),P[B]=(P[B+1]<<1|1)&he,m&&(P[B]|=(M[B+1]|M[B])<<1|1|M[B+1]),P[B]&j&&(O=N(e,{errors:m,currentLocation:$,expectedLocation:h,distance:n,ignoreLocation:l}),O<=f)){if(f=O,p=$,p<=h)break;ae=Math.max(1,2*h-p)}}if(N(e,{errors:m+1,currentLocation:h,expectedLocation:h,distance:n,ignoreLocation:l})>f)break;M=P}const R={isMatch:p>=0,score:Math.max(.001,O)};if(A){const m=At(D,c);m.length?o&&(R.indices=m):R.isMatch=!1}return R}function Ct(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}const Y=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class Te{constructor(e,{location:s=d.location,threshold:r=d.threshold,distance:n=d.distance,includeMatches:u=d.includeMatches,findAllMatches:i=d.findAllMatches,minMatchCharLength:c=d.minMatchCharLength,isCaseSensitive:o=d.isCaseSensitive,ignoreDiacritics:l=d.ignoreDiacritics,ignoreLocation:a=d.ignoreLocation}={}){if(this.options={location:s,threshold:r,distance:n,includeMatches:u,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:o,ignoreDiacritics:l,ignoreLocation:a},e=o?e:e.toLowerCase(),e=l?Y(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const g=(f,p)=>{this.chunks.push({pattern:f,alphabet:Ct(f),startIndex:p})},h=this.pattern.length;if(h>T){let f=0;const p=h%T,A=h-p;for(;f<A;)g(this.pattern.substr(f,T),f),f+=T;if(p){const D=h-T;g(this.pattern.substr(D),D)}}else g(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,ignoreDiacritics:r,includeMatches:n}=this.options;if(e=s?e:e.toLowerCase(),e=r?Y(e):e,this.pattern===e){let A={isMatch:!0,score:0};return n&&(A.indices=[[0,e.length-1]]),A}const{location:u,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:l,ignoreLocation:a}=this.options;let g=[],h=0,f=!1;this.chunks.forEach(({pattern:A,alphabet:D,startIndex:y})=>{const{isMatch:M,score:O,indices:C}=Et(e,A,D,{location:u+y,distance:i,threshold:c,findAllMatches:o,minMatchCharLength:l,includeMatches:n,ignoreLocation:a});M&&(f=!0),h+=O,M&&C&&(g=[...g,...C])});let p={isMatch:f,score:f?h/this.chunks.length:1};return f&&n&&(p.indices=g),p}}class v{constructor(e){this.pattern=e}static isMultiMatch(e){return Ee(e,this.multiRegex)}static isSingleMatch(e){return Ee(e,this.singleRegex)}search(){}}function Ee(t,e){const s=t.match(e);return s?s[1]:null}class mt extends v{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 xt extends v{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 Dt extends v{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 yt extends v{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 Ft extends v{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 Mt extends v{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 Pe extends v{constructor(e,{location:s=d.location,threshold:r=d.threshold,distance:n=d.distance,includeMatches:u=d.includeMatches,findAllMatches:i=d.findAllMatches,minMatchCharLength:c=d.minMatchCharLength,isCaseSensitive:o=d.isCaseSensitive,ignoreDiacritics:l=d.ignoreDiacritics,ignoreLocation:a=d.ignoreLocation}={}){super(e),this._bitapSearch=new Te(e,{location:s,threshold:r,distance:n,includeMatches:u,findAllMatches:i,minMatchCharLength:c,isCaseSensitive:o,ignoreDiacritics:l,ignoreLocation:a})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class ke extends v{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=[],u=this.pattern.length;for(;(r=e.indexOf(this.pattern,s))>-1;)s=r+u,n.push([r,s-1]);const i=!!n.length;return{isMatch:i,score:i?0:1,indices:n}}}const te=[mt,ke,Dt,yt,Mt,Ft,xt,Pe],Ce=te.length,Rt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Bt="|";function St(t,e={}){return t.split(Bt).map(s=>{let r=s.trim().split(Rt).filter(u=>u&&!!u.trim()),n=[];for(let u=0,i=r.length;u<i;u+=1){const c=r[u];let o=!1,l=-1;for(;!o&&++l<Ce;){const a=te[l];let g=a.isMultiMatch(c);g&&(n.push(new a(g,e)),o=!0)}if(!o)for(l=-1;++l<Ce;){const a=te[l];let g=a.isSingleMatch(c);if(g){n.push(new a(g,e));break}}}return n})}const _t=new Set([Pe.type,ke.type]);class Ot{constructor(e,{isCaseSensitive:s=d.isCaseSensitive,ignoreDiacritics:r=d.ignoreDiacritics,includeMatches:n=d.includeMatches,minMatchCharLength:u=d.minMatchCharLength,ignoreLocation:i=d.ignoreLocation,findAllMatches:c=d.findAllMatches,location:o=d.location,threshold:l=d.threshold,distance:a=d.distance}={}){this.query=null,this.options={isCaseSensitive:s,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:u,findAllMatches:c,ignoreLocation:i,location:o,threshold:l,distance:a},e=s?e:e.toLowerCase(),e=r?Y(e):e,this.pattern=e,this.query=St(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,ignoreDiacritics:u}=this.options;e=n?e:e.toLowerCase(),e=u?Y(e):e;let i=0,c=[],o=0;for(let l=0,a=s.length;l<a;l+=1){const g=s[l];c.length=0,i=0;for(let h=0,f=g.length;h<f;h+=1){const p=g[h],{isMatch:A,indices:D,score:y}=p.search(e);if(A){if(i+=1,o+=y,r){const M=p.constructor.type;_t.has(M)?c=[...c,...D]:c.push(D)}}else{o=0,i=0,c.length=0;break}}if(i){let h={isMatch:!0,score:o/i};return r&&(h.indices=c),h}}return{isMatch:!1,score:1}}}const se=[];function It(...t){se.push(...t)}function re(t,e){for(let s=0,r=se.length;s<r;s+=1){let n=se[s];if(n.condition(t,e))return new n(t,e)}return new Te(t,e)}const W={AND:"$and",OR:"$or"},ne={PATH:"$path",PATTERN:"$val"},ue=t=>!!(t[W.AND]||t[W.OR]),wt=t=>!!t[ne.PATH],bt=t=>!_(t)&&we(t)&&!ue(t),me=t=>({[W.AND]:Object.keys(t).map(e=>({[e]:t[e]}))});function Le(t,e,{auto:s=!0}={}){const r=n=>{let u=Object.keys(n);const i=wt(n);if(!i&&u.length>1&&!ue(n))return r(me(n));if(bt(n)){const o=i?n[ne.PATH]:u[0],l=i?n[ne.PATTERN]:n[o];if(!S(l))throw new Error(rt(o));const a={keyId:ee(o),pattern:l};return s&&(a.searcher=re(l,e)),a}let c={children:[],operator:u[0]};return u.forEach(o=>{const l=n[o];_(l)&&l.forEach(a=>{c.children.push(r(a))})}),c};return ue(t)||(t=me(t)),r(t)}function vt(t,{ignoreFieldNorm:e=d.ignoreFieldNorm}){t.forEach(s=>{let r=1;s.matches.forEach(({key:n,norm:u,score:i})=>{const c=n?n.weight:null;r*=Math.pow(i===0&&c?Number.EPSILON:i,(c||1)*(e?1:u))}),s.score=r})}function jt(t,e){const s=t.matches;e.matches=[],F(s)&&s.forEach(r=>{if(!F(r.indices)||!r.indices.length)return;const{indices:n,value:u}=r;let i={indices:n,value:u};r.key&&(i.key=r.key.src),r.idx>-1&&(i.refIndex=r.idx),e.matches.push(i)})}function Tt(t,e){e.score=t.score}function Pt(t,e,{includeMatches:s=d.includeMatches,includeScore:r=d.includeScore}={}){const n=[];return s&&n.push(jt),r&&n.push(Tt),t.map(u=>{const{idx:i}=u,c={item:e[i],refIndex:i};return n.length&&n.forEach(o=>{o(u,c)}),c})}class k{constructor(e,s={},r){this.options={...d,...s},this.options.useExtendedSearch,this._keyStore=new ct(this.options.keys),this.setCollection(e,r)}setCollection(e,s){if(this._docs=e,s&&!(s instanceof le))throw new Error(st);this._myIndex=s||je(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){F(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 u=this._docs[r];e(u,r)&&(this.removeAt(r),r-=1,n-=1,s.push(u))}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:u,sortFn:i,ignoreFieldNorm:c}=this.options;let o=S(e)?S(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return vt(o,{ignoreFieldNorm:c}),u&&o.sort(i),Ie(s)&&s>-1&&(o=o.slice(0,s)),Pt(o,this._docs,{includeMatches:r,includeScore:n})}_searchStringList(e){const s=re(e,this.options),{records:r}=this._myIndex,n=[];return r.forEach(({v:u,i,n:c})=>{if(!F(u))return;const{isMatch:o,score:l,indices:a}=s.searchIn(u);o&&n.push({item:u,idx:i,matches:[{score:l,value:u,norm:c,indices:a}]})}),n}_searchLogical(e){const s=Le(e,this.options),r=(c,o,l)=>{if(!c.children){const{keyId:g,searcher:h}=c,f=this._findMatches({key:this._keyStore.get(g),value:this._myIndex.getValueForItemAtKeyId(o,g),searcher:h});return f&&f.length?[{idx:l,item:o,matches:f}]:[]}const a=[];for(let g=0,h=c.children.length;g<h;g+=1){const f=c.children[g],p=r(f,o,l);if(p.length)a.push(...p);else if(c.operator===W.AND)return[]}return a},n=this._myIndex.records,u={},i=[];return n.forEach(({$:c,i:o})=>{if(F(c)){let l=r(s,c,o);l.length&&(u[o]||(u[o]={idx:o,item:c,matches:[]},i.push(u[o])),l.forEach(({matches:a})=>{u[o].matches.push(...a)}))}}),i}_searchObjectList(e){const s=re(e,this.options),{keys:r,records:n}=this._myIndex,u=[];return n.forEach(({$:i,i:c})=>{if(!F(i))return;let o=[];r.forEach((l,a)=>{o.push(...this._findMatches({key:l,value:i[a],searcher:s}))}),o.length&&u.push({idx:c,item:i,matches:o})}),u}_findMatches({key:e,value:s,searcher:r}){if(!F(s))return[];let n=[];if(_(s))s.forEach(({v:u,i,n:c})=>{if(!F(u))return;const{isMatch:o,score:l,indices:a}=r.searchIn(u);o&&n.push({score:l,key:e,value:u,idx:i,norm:c,indices:a})});else{const{v:u,n:i}=s,{isMatch:c,score:o,indices:l}=r.searchIn(u);c&&n.push({score:o,key:e,value:u,norm:i,indices:l})}return n}}k.version="7.1.0";k.createIndex=je;k.parseIndex=pt;k.config=d;k.parseQuery=Le;It(Ot);const kt={threshold:.3},$e=t=>e=>{const s=new k(e,{keys:Object.keys(e[0]),...kt,...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))}},Lt=$e(),Ne=({term:t,searcher:e=Lt})=>Oe(({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}),Ke=({debounce:t=250,value:e,onChange:s,transformBefore:r})=>{const[n,u]=ie.usePurePassthrough({onChange:s,value:e,initial:""}),{setTransform:i,deleteTransform:c}=E.useDataUtils(),o=xe.useDebouncedCallback(i,t,[]),l=b.useCallback(a=>{u(a),a.length===0?c("filter"):(r!=null&&(a=r(a)),o("filter",Ne({term:a})))},[u,r]);return{value:n,onChange:l}},Ye=({children:t=s=>x.jsxRuntimeExports.jsx(De.Text,{placeholder:"Filter",...s}),...e})=>t(Ke(e)),z={height:150},Q=()=>x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h4",variant:"disabled",hideIcon:!0,style:z,children:"No Results"}),$t=()=>x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h4",variant:"disabled",hideIcon:!0,style:z,children:"Type to search"}),Nt=()=>x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h2",variant:"disabled",hideIcon:!0,style:z,children:x.jsxRuntimeExports.jsx(ye.d4.Loading,{})}),Kt=({error:t})=>x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h4",variant:"error",style:z,children:t.message}),Yt=t=>t,We=({debounce:t=250,searcher:e,value:s,onChange:r,pageSize:n=15,filter:u=Yt})=>{const[i,c]=ie.usePurePassthrough({value:s,onChange:r,initial:""}),o=ye.useSyncedRef(i),l=b.useRef(!1),a=b.useRef(!0),g=b.useRef(0),{setSourceData:h,setEmptyContent:f,getDefaultEmptyContent:p}=E.useDataUtils(),{setHasMore:A,setOnFetchMore:D}=E.useInfiniteUtils();b.useEffect(()=>f(x.jsxRuntimeExports.jsx($t,{})),[f]);const y=b.useCallback((C=!1)=>{if(o.current.length>0||l.current||e==null)return;C&&(g.current=0,a.current=!0,A(!0)),l.current=!0,f(x.jsxRuntimeExports.jsx(Nt,{})),(async()=>{try{let R=await e.page(g.current,n);R=u(R),R.length===0&&f(p()??x.jsxRuntimeExports.jsx(Q,{})),R.length<n&&(a.current=!1,A(!1)),g.current+=n,h(C?R:m=>[...m,...R])}catch(R){l.current=!1,f(x.jsxRuntimeExports.jsx(Kt,{error:R}))}finally{l.current=!1}})()},[e,h,n,u]);b.useEffect(()=>{y(!0),D(y)},[y]);const M=xe.useDebouncedCallback(C=>{if(C.length===0){y(!0);return}if(e==null)return f(x.jsxRuntimeExports.jsx(Q,{}));e.search(C).then(j=>{j.length===0&&f(x.jsxRuntimeExports.jsx(Q,{})),h(u(j))}).catch(j=>{f(x.jsxRuntimeExports.jsx(E.Text.Centered,{level:"h4",variant:"error",children:j.message}))})},t,[e,h,f,u]),O=b.useCallback(C=>{c(C),M(C)},[c,M]);return{value:i,onChange:O}},Wt=t=>x.jsxRuntimeExports.jsx(De.Text,{placeholder:"Search",...t}),ze=({children:t=Wt,...e})=>t(We(e)),zt=Object.freeze(Object.defineProperty({__proto__:null,Column:E.Column,Core:E.Core,DataProvider:E.DataProvider,Filter:Ye,Hover:E.Hover,ItemFrame:E.ItemFrame,List:E.List,Search:ze,Selector:E.Selector,selectValueIsZero:E.selectValueIsZero,useDataContext:E.useDataContext,useDataUtils:E.useDataUtils,useFilter:Ke,useGetTransformedData:E.useGetTransformedData,useHoverContext:E.useHoverContext,useSearch:We,useSelect:E.useSelect,useSelection:E.useSelection,useSelectionContext:E.useSelectionContext,useSelectionUtils:E.useSelectionUtils,useSetSourceData:E.useSetSourceData,useSourceData:E.useSourceData,useTransformedData:E.useTransformedData},Symbol.toStringTag,{value:"Module"}));exports.Filter=Ye;exports.Search=ze;exports.createFilterTransform=Ne;exports.external=zt;exports.fuseFilter=$e;exports.proxyMemo=Oe;
|