@synnaxlabs/pluto 0.46.7 → 0.47.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/Animated-Bq6z2XkH.cjs +1 -0
- package/dist/Animated-CEx4LoLs.js +28 -0
- package/dist/Animated-CUFx-eAB.js +356 -0
- package/dist/Animated-NfnNvlbz.cjs +1 -0
- package/dist/Box-BvqALodh.cjs +1 -0
- package/dist/Box-D5Qv__kr.js +95 -0
- package/dist/Button-BMeq9Z2I.cjs +1 -0
- package/dist/Button-CMRdj9Ti.js +305 -0
- package/dist/Dialog-Bi1Sf3oc.js +58 -0
- package/dist/Dialog-BnPvG5WQ.cjs +1 -0
- package/dist/Editable-BXFY3-UW.cjs +1 -0
- package/dist/Editable-CxgdRDPb.js +193 -0
- package/dist/Haul-2Xa_nMgc.cjs +1 -0
- package/dist/Haul-BuI0PZpo.js +128 -0
- package/dist/Items-CHAbP2ZL.cjs +4 -0
- package/dist/Items-Cmc6otoS.js +777 -0
- package/dist/Menu-BImhHf24.cjs +1 -0
- package/dist/Menu-CQ_GMgB9.js +156 -0
- package/dist/Provider-BV7nN39a.cjs +5 -0
- package/dist/Provider-D0P_lzCo.js +434 -0
- package/dist/Tags-6IUFBvU-.js +604 -0
- package/dist/Tags-DtnStTuF.cjs +1 -0
- package/dist/Text-BnUGzpJq.js +1580 -0
- package/dist/Text-DY08sSZe.cjs +1 -0
- package/dist/{Video-CBAgqKPg.js → Video-CITi2j07.js} +1 -1
- package/dist/{Video-DqumxMbz.cjs → Video-VlT7jSYk.cjs} +1 -1
- package/dist/_commonjsHelpers-BH3jXuIh.cjs +1 -0
- package/dist/_commonjsHelpers-ByX85dGu.js +33 -0
- 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/{css-BYwooBtA.js → css-D6ZBcSwh.js} +800 -799
- package/dist/css-HnNQMUzV.cjs +8 -0
- package/dist/css.cjs +1 -1
- package/dist/css.js +2 -2
- package/dist/debounce-CW9Q-DsR.js +17 -0
- package/dist/debounce-heEWeOqL.cjs +1 -0
- package/dist/deep-DRVLw7iw.js +349 -0
- package/dist/deep-DtdcJG4q.cjs +1 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dimensions-BFCMI7yN.js +19 -0
- package/dist/dimensions-CGLhBwVq.cjs +1 -0
- package/dist/eraser-Dm5Du4PL.cjs +11 -0
- package/dist/eraser-DvzR9kLf.js +955 -0
- package/dist/eslint.config.d.ts +3 -0
- package/dist/eslint.config.d.ts.map +1 -0
- package/dist/ether.cjs +1 -1
- package/dist/ether.js +70 -67
- package/dist/external-6RyUkYAB.js +31 -0
- package/dist/external-6vmyay3h.js +46 -0
- package/dist/external-BSjAne2q.js +88 -0
- package/dist/external-BTlfU938.js +29 -0
- package/dist/external-BcZE443U.cjs +1 -0
- package/dist/external-BhOvtmPt.js +24 -0
- package/dist/external-Bo9Dyf8v.js +80 -0
- package/dist/external-BrQU-ZN8.cjs +1 -0
- package/dist/external-CAcL3DJP.js +130 -0
- package/dist/external-CMBnwYR4.cjs +1 -0
- package/dist/external-CSntN1is.cjs +1 -0
- package/dist/external-CTrkvlmd.cjs +1 -0
- package/dist/external-CTsR6bs9.cjs +46 -0
- package/dist/external-Clec0nDH.cjs +1 -0
- package/dist/external-CtiE4JLk.js +388 -0
- package/dist/external-D7EEjQaR.js +44 -0
- package/dist/external-DDzR-j7b.cjs +1 -0
- package/dist/{main-CEC8k4uE.js → external-DGNBXSAj.js} +16962 -22990
- package/dist/{external-CnSq_bSU.js → external-Daiy-vZ3.js} +29 -19
- package/dist/external-Ddn3rc_Q.cjs +85 -0
- package/dist/external-Dl0l3iHN.cjs +1 -0
- package/dist/external-Eaj0hgzm.cjs +1 -0
- package/dist/external-OLyg-4Ab.cjs +1 -0
- package/dist/{external-CafWN471.js → external-OzDazbiJ.js} +108 -97
- package/dist/flex.cjs +1 -1
- package/dist/flex.js +1 -1
- package/dist/{fontString-CVUEOEMw.js → fontString-CGd4NYXa.js} +11 -10
- package/dist/fontString-yPlq8smc.cjs +1 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/hooks-Bvv-S6WC.js +74 -0
- package/dist/hooks-CoF3Fkrn.cjs +1 -0
- package/dist/index.cjs +16 -16
- package/dist/index.js +11182 -10542
- 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/pluto.css +1 -1
- package/dist/{provider-CKYgKu3z.js → provider-C8In649C.js} +4955 -8152
- package/dist/provider-lNhTlIWj.cjs +72 -0
- package/dist/src/aether/aether/aether.d.ts.map +1 -1
- package/dist/src/aether/main.d.ts.map +1 -1
- package/dist/src/arc/external.d.ts +1 -1
- package/dist/src/arc/external.d.ts.map +1 -1
- package/dist/src/arc/functions/Base.d.ts.map +1 -0
- package/dist/src/arc/functions/constant/Constant.d.ts.map +1 -0
- package/dist/src/arc/functions/constant/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/constant/external.d.ts.map +1 -0
- package/dist/src/arc/functions/constant/index.d.ts.map +1 -0
- package/dist/src/arc/functions/external.d.ts.map +1 -0
- package/dist/src/arc/functions/index.d.ts.map +1 -0
- package/dist/src/arc/functions/operator/Operator.d.ts.map +1 -0
- package/dist/src/arc/functions/operator/external.d.ts.map +1 -0
- package/dist/src/arc/functions/operator/index.d.ts.map +1 -0
- package/dist/src/arc/functions/read/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/read/Read.d.ts.map +1 -0
- package/dist/src/arc/functions/read/external.d.ts.map +1 -0
- package/dist/src/arc/functions/read/index.d.ts.map +1 -0
- package/dist/src/arc/functions/registry.d.ts.map +1 -0
- package/dist/src/arc/functions/select/Select.d.ts.map +1 -0
- package/dist/src/arc/functions/select/external.d.ts.map +1 -0
- package/dist/src/arc/functions/select/index.d.ts.map +1 -0
- package/dist/src/arc/functions/sink/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/sink/Sink.d.ts.map +1 -0
- package/dist/src/arc/functions/sink/external.d.ts.map +1 -0
- package/dist/src/arc/functions/sink/index.d.ts.map +1 -0
- package/dist/src/arc/functions/source/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/source/Source.d.ts.map +1 -0
- package/dist/src/arc/functions/source/external.d.ts.map +1 -0
- package/dist/src/arc/functions/source/index.d.ts.map +1 -0
- package/dist/src/arc/functions/stable/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/stable/StableFor.d.ts.map +1 -0
- package/dist/src/arc/functions/stable/external.d.ts.map +1 -0
- package/dist/src/arc/functions/stable/index.d.ts.map +1 -0
- package/dist/src/arc/functions/status/Change.d.ts.map +1 -0
- package/dist/src/arc/functions/status/Form.d.ts.map +1 -0
- package/dist/src/arc/functions/status/external.d.ts.map +1 -0
- package/dist/src/arc/functions/status/index.d.ts.map +1 -0
- package/dist/src/arc/functions/types/index.d.ts.map +1 -0
- package/dist/src/arc/functions/types/spec.d.ts.map +1 -0
- package/dist/src/arc/handle/Core.d.ts.map +1 -1
- package/dist/src/arc/handle/Sink.d.ts.map +1 -1
- package/dist/src/arc/handle/Source.d.ts.map +1 -1
- package/dist/src/arc/handle/external.d.ts.map +1 -1
- package/dist/src/arc/handle/index.d.ts.map +1 -1
- package/dist/src/arc/queries.d.ts +6 -3
- package/dist/src/arc/queries.d.ts.map +1 -1
- package/dist/src/arc/queries.spec.d.ts +2 -0
- package/dist/src/arc/queries.spec.d.ts.map +1 -0
- package/dist/src/button/Button.d.ts +1 -1
- package/dist/src/button/Button.d.ts.map +1 -1
- package/dist/src/channel/AliasInput.d.ts +0 -1
- package/dist/src/channel/AliasInput.d.ts.map +1 -1
- package/dist/src/channel/CreateCalculatedIcon.d.ts +3 -0
- package/dist/src/channel/CreateCalculatedIcon.d.ts.map +1 -0
- package/dist/src/channel/LinePlot.d.ts +1 -3
- package/dist/src/channel/LinePlot.d.ts.map +1 -1
- package/dist/src/channel/external.d.ts +1 -0
- package/dist/src/channel/external.d.ts.map +1 -1
- package/dist/src/channel/queries.d.ts +77 -5
- package/dist/src/channel/queries.d.ts.map +1 -1
- package/dist/src/component/SelectSize.d.ts.map +1 -1
- package/dist/src/css/css.d.ts +1 -2
- package/dist/src/css/css.d.ts.map +1 -1
- package/dist/src/flex/Box.d.ts +1 -2
- package/dist/src/flex/Box.d.ts.map +1 -1
- package/dist/src/flex/index.d.ts +1 -1
- package/dist/src/flex/index.d.ts.map +1 -1
- package/dist/src/flux/Provider.d.ts.map +1 -1
- package/dist/src/flux/aether/provider.d.ts +1 -1
- package/dist/src/flux/aether/provider.d.ts.map +1 -1
- package/dist/src/flux/core/client.d.ts.map +1 -1
- package/dist/src/flux/core/external.d.ts.map +1 -1
- package/dist/src/flux/core/index.d.ts.map +1 -1
- package/dist/src/flux/list.d.ts +5 -1
- package/dist/src/flux/list.d.ts.map +1 -1
- package/dist/src/group/index.d.ts.map +1 -1
- package/dist/src/hardware/device/Select.d.ts +0 -1
- package/dist/src/hardware/device/Select.d.ts.map +1 -1
- package/dist/src/hardware/device/queries.d.ts +6 -6
- package/dist/src/hardware/rack/Select.d.ts +0 -1
- package/dist/src/hardware/rack/Select.d.ts.map +1 -1
- package/dist/src/header/Header.d.ts.map +1 -1
- package/dist/src/icon/registry.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/input/Item.d.ts +2 -2
- package/dist/src/input/Item.d.ts.map +1 -1
- package/dist/src/log/aether/Log.d.ts.map +1 -1
- package/dist/src/menu/ContextMenu.d.ts +0 -3
- package/dist/src/menu/ContextMenu.d.ts.map +1 -1
- package/dist/src/menu/external.d.ts +1 -0
- package/dist/src/menu/external.d.ts.map +1 -1
- package/dist/src/menu/types.d.ts +4 -0
- package/dist/src/menu/types.d.ts.map +1 -0
- package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
- package/dist/src/pluto/aether/pluto.d.ts.map +1 -1
- package/dist/src/schematic/symbol/Forms.d.ts +1 -0
- package/dist/src/schematic/symbol/Forms.d.ts.map +1 -1
- package/dist/src/schematic/symbol/Primitives.d.ts +11 -2
- package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
- package/dist/src/schematic/symbol/Symbols.d.ts +7 -0
- package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
- package/dist/src/schematic/symbol/registry.d.ts +2 -1
- package/dist/src/schematic/symbol/registry.d.ts.map +1 -1
- package/dist/src/select/Button.d.ts +0 -1
- package/dist/src/select/Button.d.ts.map +1 -1
- package/dist/src/select/Multiple.d.ts +5 -6
- package/dist/src/select/Multiple.d.ts.map +1 -1
- package/dist/src/select/MultipleTrigger.d.ts +0 -1
- package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
- package/dist/src/select/SearchInput.d.ts.map +1 -1
- package/dist/src/select/Single.d.ts +1 -2
- package/dist/src/select/Single.d.ts.map +1 -1
- package/dist/src/select/Static.d.ts +0 -1
- package/dist/src/select/Static.d.ts.map +1 -1
- package/dist/src/select/external.d.ts +1 -0
- package/dist/src/select/external.d.ts.map +1 -1
- package/dist/src/select/flex/Alignment.d.ts +7 -0
- package/dist/src/select/flex/Alignment.d.ts.map +1 -0
- package/dist/src/select/flex/index.d.ts +2 -0
- package/dist/src/select/flex/index.d.ts.map +1 -0
- package/dist/src/select/text/Level.d.ts.map +1 -1
- package/dist/src/select/text/Weight.d.ts.map +1 -1
- package/dist/src/status/aether/errorHandler.d.ts.map +1 -1
- package/dist/src/status/aether/external.d.ts.map +1 -1
- package/dist/src/status/core/external.d.ts +0 -1
- package/dist/src/status/core/external.d.ts.map +1 -1
- package/dist/src/status/core/index.d.ts.map +1 -1
- package/dist/src/status/external.d.ts +1 -0
- package/dist/src/status/external.d.ts.map +1 -1
- package/dist/src/status/index.d.ts.map +1 -1
- package/dist/src/status/queries.d.ts +5 -1
- package/dist/src/status/queries.d.ts.map +1 -1
- package/dist/src/synnax/Provider.d.ts.map +1 -1
- package/dist/src/tabs/Selector.d.ts.map +1 -1
- package/dist/src/telem/SelectDataType.d.ts.map +1 -1
- package/dist/src/telem/aether/context.d.ts +1 -2
- package/dist/src/telem/aether/context.d.ts.map +1 -1
- package/dist/src/telem/aether/noop.d.ts +2 -1
- package/dist/src/telem/aether/noop.d.ts.map +1 -1
- package/dist/src/telem/aether/remote.d.ts.map +1 -1
- package/dist/src/telem/aether/telem.d.ts +9 -0
- package/dist/src/telem/aether/telem.d.ts.map +1 -1
- package/dist/src/telem/client/reader.d.ts +1 -1
- package/dist/src/telem/client/reader.d.ts.map +1 -1
- package/dist/src/telem/control/Controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/controller.d.ts +0 -1
- package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
- package/dist/src/telem/control/aether/state.d.ts.map +1 -1
- package/dist/src/theming/Provider.d.ts +0 -2
- package/dist/src/theming/Provider.d.ts.map +1 -1
- package/dist/src/tooltip/Config.d.ts.map +1 -1
- package/dist/src/tree/Context.d.ts.map +1 -1
- package/dist/src/triggers/Provider.d.ts.map +1 -1
- package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
- package/dist/src/vis/input/aether/index.d.ts +2 -0
- package/dist/src/vis/input/aether/index.d.ts.map +1 -0
- package/dist/src/vis/input/aether/input.d.ts +40 -0
- package/dist/src/vis/input/aether/input.d.ts.map +1 -0
- package/dist/src/vis/input/index.d.ts +2 -0
- package/dist/src/vis/input/index.d.ts.map +1 -0
- package/dist/src/vis/input/use.d.ts +9 -0
- package/dist/src/vis/input/use.d.ts.map +1 -0
- package/dist/src/vis/rule/Rule.d.ts.map +1 -1
- package/dist/src/vis/value/aether/value.d.ts +1 -2
- package/dist/src/vis/value/aether/value.d.ts.map +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/theme.css +11 -0
- 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/types-BNX_Jj6k.js +80 -0
- package/dist/types-D-yz1qsT.cjs +1 -0
- package/dist/{units-CeCcz4O4.js → units-BqIfn6VX.js} +1 -1
- package/dist/units-DCifOxd9.cjs +1 -0
- package/dist/useStaticData-BTwIe0Il.cjs +1 -0
- package/dist/useStaticData-p8sk2VCJ.js +1051 -0
- package/dist/value-B3LTg1lE.cjs +53 -0
- package/dist/value-ChGMEPP3.js +6508 -0
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +8 -8
- package/dist/Toggle-BSJnQkJM.js +0 -26
- package/dist/Toggle-C0DIo816.cjs +0 -1
- package/dist/css-B0VZnJIa.cjs +0 -8
- package/dist/external-B0_MIms2.js +0 -78
- package/dist/external-B1ETpyFM.js +0 -89
- package/dist/external-B3WxrVX0.js +0 -30
- package/dist/external-BP7GC2X2.cjs +0 -1
- package/dist/external-Bf8170BC.js +0 -380
- package/dist/external-BgNRw5Al.js +0 -23
- package/dist/external-BgSmm_d3.js +0 -84
- package/dist/external-BmxkwvZQ.cjs +0 -1
- package/dist/external-BoVr9B-m.cjs +0 -1
- package/dist/external-BrDpLk_U.js +0 -42
- package/dist/external-CAiETio2.js +0 -10
- package/dist/external-CQpqJGka.cjs +0 -1
- package/dist/external-CmmZWsrB.cjs +0 -1
- package/dist/external-Cutp76YR.cjs +0 -1
- package/dist/external-Cux9mC64.js +0 -69
- package/dist/external-D8EUzT1C.cjs +0 -1
- package/dist/external-DEYDSJ_G.cjs +0 -1
- package/dist/external-DElBi-Q-.js +0 -87
- package/dist/external-DP8Ao5TN.cjs +0 -1
- package/dist/external-DS6CmLLZ.cjs +0 -46
- package/dist/external-DoerTjzk.js +0 -14
- package/dist/external-FJ3vTUtb.cjs +0 -1
- package/dist/external-V3s19XkB.cjs +0 -1
- package/dist/external-Zuxgy86I.cjs +0 -1
- package/dist/fontString-DBgTdlAe.cjs +0 -1
- package/dist/main-Bg0vBNCG.cjs +0 -92
- package/dist/provider-CSa0L57i.js +0 -4673
- package/dist/provider-CWezGpoq.cjs +0 -52
- package/dist/provider-Fw6FIHoE.cjs +0 -83
- package/dist/src/arc/stage/Base.d.ts.map +0 -1
- package/dist/src/arc/stage/constant/Constant.d.ts.map +0 -1
- package/dist/src/arc/stage/constant/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/constant/external.d.ts.map +0 -1
- package/dist/src/arc/stage/constant/index.d.ts.map +0 -1
- package/dist/src/arc/stage/external.d.ts.map +0 -1
- package/dist/src/arc/stage/index.d.ts.map +0 -1
- package/dist/src/arc/stage/operator/Operator.d.ts.map +0 -1
- package/dist/src/arc/stage/operator/external.d.ts.map +0 -1
- package/dist/src/arc/stage/operator/index.d.ts.map +0 -1
- package/dist/src/arc/stage/read/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/read/Read.d.ts.map +0 -1
- package/dist/src/arc/stage/read/external.d.ts.map +0 -1
- package/dist/src/arc/stage/read/index.d.ts.map +0 -1
- package/dist/src/arc/stage/registry.d.ts.map +0 -1
- package/dist/src/arc/stage/select/Select.d.ts.map +0 -1
- package/dist/src/arc/stage/select/external.d.ts.map +0 -1
- package/dist/src/arc/stage/select/index.d.ts.map +0 -1
- package/dist/src/arc/stage/sink/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/sink/Sink.d.ts.map +0 -1
- package/dist/src/arc/stage/sink/external.d.ts.map +0 -1
- package/dist/src/arc/stage/sink/index.d.ts.map +0 -1
- package/dist/src/arc/stage/source/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/source/Source.d.ts.map +0 -1
- package/dist/src/arc/stage/source/external.d.ts.map +0 -1
- package/dist/src/arc/stage/source/index.d.ts.map +0 -1
- package/dist/src/arc/stage/stable/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/stable/StableFor.d.ts.map +0 -1
- package/dist/src/arc/stage/stable/external.d.ts.map +0 -1
- package/dist/src/arc/stage/stable/index.d.ts.map +0 -1
- package/dist/src/arc/stage/status/Change.d.ts.map +0 -1
- package/dist/src/arc/stage/status/Form.d.ts.map +0 -1
- package/dist/src/arc/stage/status/external.d.ts.map +0 -1
- package/dist/src/arc/stage/status/index.d.ts.map +0 -1
- package/dist/src/arc/stage/types/index.d.ts.map +0 -1
- package/dist/src/arc/stage/types/spec.d.ts.map +0 -1
- package/dist/src/flex/Select.d.ts +0 -7
- package/dist/src/flex/Select.d.ts.map +0 -1
- package/dist/src/flex/external.d.ts +0 -3
- package/dist/src/flex/external.d.ts.map +0 -1
- package/dist/src/override/factory.d.ts +0 -3
- package/dist/src/override/factory.d.ts.map +0 -1
- package/dist/src/override/index.d.ts +0 -2
- package/dist/src/override/index.d.ts.map +0 -1
- package/dist/src/status/CreateIcon.d.ts +0 -1
- package/dist/src/status/CreateIcon.d.ts.map +0 -1
- package/dist/src/status/core/SelectVariant.d.ts +0 -7
- package/dist/src/status/core/SelectVariant.d.ts.map +0 -1
- package/dist/units-gFJ6UvpU.cjs +0 -1
- package/dist/useKeysData-DXXVQfXZ.js +0 -18
- package/dist/useKeysData-Do63LaI0.cjs +0 -1
- /package/dist/src/arc/{stage → functions}/Base.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/constant/Constant.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/constant/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/constant/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/constant/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/operator/Operator.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/operator/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/operator/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/read/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/read/Read.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/read/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/read/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/registry.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/select/Select.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/select/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/select/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/sink/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/sink/Sink.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/sink/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/sink/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/source/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/source/Source.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/source/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/source/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/stable/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/stable/StableFor.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/stable/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/stable/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/status/Change.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/status/Form.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/status/external.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/status/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/types/index.d.ts +0 -0
- /package/dist/src/arc/{stage → functions}/types/spec.d.ts +0 -0
|
@@ -0,0 +1,1051 @@
|
|
|
1
|
+
import { useMemo as O, useState as le, useCallback as fe } from "react";
|
|
2
|
+
function D(t) {
|
|
3
|
+
return Array.isArray ? Array.isArray(t) : re(t) === "[object Array]";
|
|
4
|
+
}
|
|
5
|
+
function de(t) {
|
|
6
|
+
if (typeof t == "string")
|
|
7
|
+
return t;
|
|
8
|
+
let e = t + "";
|
|
9
|
+
return e == "0" && 1 / t == -1 / 0 ? "-0" : e;
|
|
10
|
+
}
|
|
11
|
+
function ge(t) {
|
|
12
|
+
return t == null ? "" : de(t);
|
|
13
|
+
}
|
|
14
|
+
function M(t) {
|
|
15
|
+
return typeof t == "string";
|
|
16
|
+
}
|
|
17
|
+
function te(t) {
|
|
18
|
+
return typeof t == "number";
|
|
19
|
+
}
|
|
20
|
+
function Ae(t) {
|
|
21
|
+
return t === !0 || t === !1 || pe(t) && re(t) == "[object Boolean]";
|
|
22
|
+
}
|
|
23
|
+
function se(t) {
|
|
24
|
+
return typeof t == "object";
|
|
25
|
+
}
|
|
26
|
+
function pe(t) {
|
|
27
|
+
return se(t) && t !== null;
|
|
28
|
+
}
|
|
29
|
+
function E(t) {
|
|
30
|
+
return t != null;
|
|
31
|
+
}
|
|
32
|
+
function j(t) {
|
|
33
|
+
return !t.trim().length;
|
|
34
|
+
}
|
|
35
|
+
function re(t) {
|
|
36
|
+
return t == null ? t === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(t);
|
|
37
|
+
}
|
|
38
|
+
const Ee = "Incorrect 'index' type", Ce = (t) => `Invalid value for key ${t}`, me = (t) => `Pattern length exceeds max of ${t}.`, Fe = (t) => `Missing ${t} property in key`, Me = (t) => `Property 'weight' in key '${t}' must be a positive integer`, U = Object.prototype.hasOwnProperty;
|
|
39
|
+
class Be {
|
|
40
|
+
constructor(e) {
|
|
41
|
+
this._keys = [], this._keyMap = {};
|
|
42
|
+
let s = 0;
|
|
43
|
+
e.forEach((r) => {
|
|
44
|
+
let n = ne(r);
|
|
45
|
+
this._keys.push(n), this._keyMap[n.id] = n, s += n.weight;
|
|
46
|
+
}), this._keys.forEach((r) => {
|
|
47
|
+
r.weight /= s;
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
get(e) {
|
|
51
|
+
return this._keyMap[e];
|
|
52
|
+
}
|
|
53
|
+
keys() {
|
|
54
|
+
return this._keys;
|
|
55
|
+
}
|
|
56
|
+
toJSON() {
|
|
57
|
+
return JSON.stringify(this._keys);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
function ne(t) {
|
|
61
|
+
let e = null, s = null, r = null, n = 1, i = null;
|
|
62
|
+
if (M(t) || D(t))
|
|
63
|
+
r = t, e = X(t), s = K(t);
|
|
64
|
+
else {
|
|
65
|
+
if (!U.call(t, "name"))
|
|
66
|
+
throw new Error(Fe("name"));
|
|
67
|
+
const u = t.name;
|
|
68
|
+
if (r = u, U.call(t, "weight") && (n = t.weight, n <= 0))
|
|
69
|
+
throw new Error(Me(u));
|
|
70
|
+
e = X(u), s = K(u), i = t.getFn;
|
|
71
|
+
}
|
|
72
|
+
return { path: e, id: s, weight: n, src: r, getFn: i };
|
|
73
|
+
}
|
|
74
|
+
function X(t) {
|
|
75
|
+
return D(t) ? t : t.split(".");
|
|
76
|
+
}
|
|
77
|
+
function K(t) {
|
|
78
|
+
return D(t) ? t.join(".") : t;
|
|
79
|
+
}
|
|
80
|
+
function De(t, e) {
|
|
81
|
+
let s = [], r = !1;
|
|
82
|
+
const n = (i, u, c) => {
|
|
83
|
+
if (E(i))
|
|
84
|
+
if (!u[c])
|
|
85
|
+
s.push(i);
|
|
86
|
+
else {
|
|
87
|
+
let h = u[c];
|
|
88
|
+
const o = i[h];
|
|
89
|
+
if (!E(o))
|
|
90
|
+
return;
|
|
91
|
+
if (c === u.length - 1 && (M(o) || te(o) || Ae(o)))
|
|
92
|
+
s.push(ge(o));
|
|
93
|
+
else if (D(o)) {
|
|
94
|
+
r = !0;
|
|
95
|
+
for (let a = 0, f = o.length; a < f; a += 1)
|
|
96
|
+
n(o[a], u, c + 1);
|
|
97
|
+
} else u.length && n(o, u, c + 1);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
return n(t, M(e) ? e.split(".") : e, 0), r ? s : s[0];
|
|
101
|
+
}
|
|
102
|
+
const ye = {
|
|
103
|
+
// Whether the matches should be included in the result set. When `true`, each record in the result
|
|
104
|
+
// set will include the indices of the matched characters.
|
|
105
|
+
// These can consequently be used for highlighting purposes.
|
|
106
|
+
includeMatches: !1,
|
|
107
|
+
// When `true`, the matching function will continue to the end of a search pattern even if
|
|
108
|
+
// a perfect match has already been located in the string.
|
|
109
|
+
findAllMatches: !1,
|
|
110
|
+
// Minimum number of characters that must be matched before a result is considered a match
|
|
111
|
+
minMatchCharLength: 1
|
|
112
|
+
}, xe = {
|
|
113
|
+
// When `true`, the algorithm continues searching to the end of the input even if a perfect
|
|
114
|
+
// match is found before the end of the same input.
|
|
115
|
+
isCaseSensitive: !1,
|
|
116
|
+
// When `true`, the algorithm will ignore diacritics (accents) in comparisons
|
|
117
|
+
ignoreDiacritics: !1,
|
|
118
|
+
// When true, the matching function will continue to the end of a search pattern even if
|
|
119
|
+
includeScore: !1,
|
|
120
|
+
// List of properties that will be searched. This also supports nested properties.
|
|
121
|
+
keys: [],
|
|
122
|
+
// Whether to sort the result list, by score
|
|
123
|
+
shouldSort: !0,
|
|
124
|
+
// Default sort function: sort by ascending score, ascending index
|
|
125
|
+
sortFn: (t, e) => t.score === e.score ? t.idx < e.idx ? -1 : 1 : t.score < e.score ? -1 : 1
|
|
126
|
+
}, _e = {
|
|
127
|
+
// Approximately where in the text is the pattern expected to be found?
|
|
128
|
+
location: 0,
|
|
129
|
+
// At what point does the match algorithm give up. A threshold of '0.0' requires a perfect match
|
|
130
|
+
// (of both letters and location), a threshold of '1.0' would match anything.
|
|
131
|
+
threshold: 0.6,
|
|
132
|
+
// Determines how close the match must be to the fuzzy location (specified above).
|
|
133
|
+
// An exact letter match which is 'distance' characters away from the fuzzy location
|
|
134
|
+
// would score as a complete mismatch. A distance of '0' requires the match be at
|
|
135
|
+
// the exact location specified, a threshold of '1000' would require a perfect match
|
|
136
|
+
// to be within 800 characters of the fuzzy location to be found using a 0.8 threshold.
|
|
137
|
+
distance: 100
|
|
138
|
+
}, Ie = {
|
|
139
|
+
// When `true`, it enables the use of unix-like search commands
|
|
140
|
+
useExtendedSearch: !1,
|
|
141
|
+
// The get function to use when fetching an object's properties.
|
|
142
|
+
// The default will search nested paths *ie foo.bar.baz*
|
|
143
|
+
getFn: De,
|
|
144
|
+
// When `true`, search will ignore `location` and `distance`, so it won't matter
|
|
145
|
+
// where in the string the pattern appears.
|
|
146
|
+
// More info: https://fusejs.io/concepts/scoring-theory.html#fuzziness-score
|
|
147
|
+
ignoreLocation: !1,
|
|
148
|
+
// When `true`, the calculation for the relevance score (used for sorting) will
|
|
149
|
+
// ignore the field-length norm.
|
|
150
|
+
// More info: https://fusejs.io/concepts/scoring-theory.html#field-length-norm
|
|
151
|
+
ignoreFieldNorm: !1,
|
|
152
|
+
// The weight to determine how much field length norm effects scoring.
|
|
153
|
+
fieldNormWeight: 1
|
|
154
|
+
};
|
|
155
|
+
var l = {
|
|
156
|
+
...xe,
|
|
157
|
+
...ye,
|
|
158
|
+
..._e,
|
|
159
|
+
...Ie
|
|
160
|
+
};
|
|
161
|
+
const Se = /[^ ]+/g;
|
|
162
|
+
function we(t = 1, e = 3) {
|
|
163
|
+
const s = /* @__PURE__ */ new Map(), r = Math.pow(10, e);
|
|
164
|
+
return {
|
|
165
|
+
get(n) {
|
|
166
|
+
const i = n.match(Se).length;
|
|
167
|
+
if (s.has(i))
|
|
168
|
+
return s.get(i);
|
|
169
|
+
const u = 1 / Math.pow(i, 0.5 * t), c = parseFloat(Math.round(u * r) / r);
|
|
170
|
+
return s.set(i, c), c;
|
|
171
|
+
},
|
|
172
|
+
clear() {
|
|
173
|
+
s.clear();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
class V {
|
|
178
|
+
constructor({
|
|
179
|
+
getFn: e = l.getFn,
|
|
180
|
+
fieldNormWeight: s = l.fieldNormWeight
|
|
181
|
+
} = {}) {
|
|
182
|
+
this.norm = we(s, 3), this.getFn = e, this.isCreated = !1, this.setIndexRecords();
|
|
183
|
+
}
|
|
184
|
+
setSources(e = []) {
|
|
185
|
+
this.docs = e;
|
|
186
|
+
}
|
|
187
|
+
setIndexRecords(e = []) {
|
|
188
|
+
this.records = e;
|
|
189
|
+
}
|
|
190
|
+
setKeys(e = []) {
|
|
191
|
+
this.keys = e, this._keysMap = {}, e.forEach((s, r) => {
|
|
192
|
+
this._keysMap[s.id] = r;
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
create() {
|
|
196
|
+
this.isCreated || !this.docs.length || (this.isCreated = !0, M(this.docs[0]) ? this.docs.forEach((e, s) => {
|
|
197
|
+
this._addString(e, s);
|
|
198
|
+
}) : this.docs.forEach((e, s) => {
|
|
199
|
+
this._addObject(e, s);
|
|
200
|
+
}), this.norm.clear());
|
|
201
|
+
}
|
|
202
|
+
// Adds a doc to the end of the index
|
|
203
|
+
add(e) {
|
|
204
|
+
const s = this.size();
|
|
205
|
+
M(e) ? this._addString(e, s) : this._addObject(e, s);
|
|
206
|
+
}
|
|
207
|
+
// Removes the doc at the specified index of the index
|
|
208
|
+
removeAt(e) {
|
|
209
|
+
this.records.splice(e, 1);
|
|
210
|
+
for (let s = e, r = this.size(); s < r; s += 1)
|
|
211
|
+
this.records[s].i -= 1;
|
|
212
|
+
}
|
|
213
|
+
getValueForItemAtKeyId(e, s) {
|
|
214
|
+
return e[this._keysMap[s]];
|
|
215
|
+
}
|
|
216
|
+
size() {
|
|
217
|
+
return this.records.length;
|
|
218
|
+
}
|
|
219
|
+
_addString(e, s) {
|
|
220
|
+
if (!E(e) || j(e))
|
|
221
|
+
return;
|
|
222
|
+
let r = {
|
|
223
|
+
v: e,
|
|
224
|
+
i: s,
|
|
225
|
+
n: this.norm.get(e)
|
|
226
|
+
};
|
|
227
|
+
this.records.push(r);
|
|
228
|
+
}
|
|
229
|
+
_addObject(e, s) {
|
|
230
|
+
let r = { i: s, $: {} };
|
|
231
|
+
this.keys.forEach((n, i) => {
|
|
232
|
+
let u = n.getFn ? n.getFn(e) : this.getFn(e, n.path);
|
|
233
|
+
if (E(u)) {
|
|
234
|
+
if (D(u)) {
|
|
235
|
+
let c = [];
|
|
236
|
+
const h = [{ nestedArrIndex: -1, value: u }];
|
|
237
|
+
for (; h.length; ) {
|
|
238
|
+
const { nestedArrIndex: o, value: a } = h.pop();
|
|
239
|
+
if (E(a))
|
|
240
|
+
if (M(a) && !j(a)) {
|
|
241
|
+
let f = {
|
|
242
|
+
v: a,
|
|
243
|
+
i: o,
|
|
244
|
+
n: this.norm.get(a)
|
|
245
|
+
};
|
|
246
|
+
c.push(f);
|
|
247
|
+
} else D(a) && a.forEach((f, d) => {
|
|
248
|
+
h.push({
|
|
249
|
+
nestedArrIndex: d,
|
|
250
|
+
value: f
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
r.$[i] = c;
|
|
255
|
+
} else if (M(u) && !j(u)) {
|
|
256
|
+
let c = {
|
|
257
|
+
v: u,
|
|
258
|
+
n: this.norm.get(u)
|
|
259
|
+
};
|
|
260
|
+
r.$[i] = c;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}), this.records.push(r);
|
|
264
|
+
}
|
|
265
|
+
toJSON() {
|
|
266
|
+
return {
|
|
267
|
+
keys: this.keys,
|
|
268
|
+
records: this.records
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
function ie(t, e, { getFn: s = l.getFn, fieldNormWeight: r = l.fieldNormWeight } = {}) {
|
|
273
|
+
const n = new V({ getFn: s, fieldNormWeight: r });
|
|
274
|
+
return n.setKeys(t.map(ne)), n.setSources(e), n.create(), n;
|
|
275
|
+
}
|
|
276
|
+
function Le(t, { getFn: e = l.getFn, fieldNormWeight: s = l.fieldNormWeight } = {}) {
|
|
277
|
+
const { keys: r, records: n } = t, i = new V({ getFn: e, fieldNormWeight: s });
|
|
278
|
+
return i.setKeys(r), i.setIndexRecords(n), i;
|
|
279
|
+
}
|
|
280
|
+
function $(t, {
|
|
281
|
+
errors: e = 0,
|
|
282
|
+
currentLocation: s = 0,
|
|
283
|
+
expectedLocation: r = 0,
|
|
284
|
+
distance: n = l.distance,
|
|
285
|
+
ignoreLocation: i = l.ignoreLocation
|
|
286
|
+
} = {}) {
|
|
287
|
+
const u = e / t.length;
|
|
288
|
+
if (i)
|
|
289
|
+
return u;
|
|
290
|
+
const c = Math.abs(r - s);
|
|
291
|
+
return n ? u + c / n : c ? 1 : u;
|
|
292
|
+
}
|
|
293
|
+
function Re(t = [], e = l.minMatchCharLength) {
|
|
294
|
+
let s = [], r = -1, n = -1, i = 0;
|
|
295
|
+
for (let u = t.length; i < u; i += 1) {
|
|
296
|
+
let c = t[i];
|
|
297
|
+
c && r === -1 ? r = i : !c && r !== -1 && (n = i - 1, n - r + 1 >= e && s.push([r, n]), r = -1);
|
|
298
|
+
}
|
|
299
|
+
return t[i - 1] && i - r >= e && s.push([r, i - 1]), s;
|
|
300
|
+
}
|
|
301
|
+
const w = 32;
|
|
302
|
+
function be(t, e, s, {
|
|
303
|
+
location: r = l.location,
|
|
304
|
+
distance: n = l.distance,
|
|
305
|
+
threshold: i = l.threshold,
|
|
306
|
+
findAllMatches: u = l.findAllMatches,
|
|
307
|
+
minMatchCharLength: c = l.minMatchCharLength,
|
|
308
|
+
includeMatches: h = l.includeMatches,
|
|
309
|
+
ignoreLocation: o = l.ignoreLocation
|
|
310
|
+
} = {}) {
|
|
311
|
+
if (e.length > w)
|
|
312
|
+
throw new Error(me(w));
|
|
313
|
+
const a = e.length, f = t.length, d = Math.max(0, Math.min(r, f));
|
|
314
|
+
let g = i, A = d;
|
|
315
|
+
const p = c > 1 || h, m = p ? Array(f) : [];
|
|
316
|
+
let y;
|
|
317
|
+
for (; (y = t.indexOf(e, A)) > -1; ) {
|
|
318
|
+
let C = $(e, {
|
|
319
|
+
currentLocation: y,
|
|
320
|
+
expectedLocation: d,
|
|
321
|
+
distance: n,
|
|
322
|
+
ignoreLocation: o
|
|
323
|
+
});
|
|
324
|
+
if (g = Math.min(C, g), A = y + a, p) {
|
|
325
|
+
let x = 0;
|
|
326
|
+
for (; x < a; )
|
|
327
|
+
m[y + x] = 1, x += 1;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
A = -1;
|
|
331
|
+
let B = [], L = 1, S = a + f;
|
|
332
|
+
const ae = 1 << a - 1;
|
|
333
|
+
for (let C = 0; C < a; C += 1) {
|
|
334
|
+
let x = 0, _ = S;
|
|
335
|
+
for (; x < _; )
|
|
336
|
+
$(e, {
|
|
337
|
+
errors: C,
|
|
338
|
+
currentLocation: d + _,
|
|
339
|
+
expectedLocation: d,
|
|
340
|
+
distance: n,
|
|
341
|
+
ignoreLocation: o
|
|
342
|
+
}) <= g ? x = _ : S = _, _ = Math.floor((S - x) / 2 + x);
|
|
343
|
+
S = _;
|
|
344
|
+
let Q = Math.max(1, d - _ + 1), P = u ? f : Math.min(d + _, f) + a, R = Array(P + 2);
|
|
345
|
+
R[P + 1] = (1 << C) - 1;
|
|
346
|
+
for (let F = P; F >= Q; F -= 1) {
|
|
347
|
+
let k = F - 1, J = s[t.charAt(k)];
|
|
348
|
+
if (p && (m[k] = +!!J), R[F] = (R[F + 1] << 1 | 1) & J, C && (R[F] |= (B[F + 1] | B[F]) << 1 | 1 | B[F + 1]), R[F] & ae && (L = $(e, {
|
|
349
|
+
errors: C,
|
|
350
|
+
currentLocation: k,
|
|
351
|
+
expectedLocation: d,
|
|
352
|
+
distance: n,
|
|
353
|
+
ignoreLocation: o
|
|
354
|
+
}), L <= g)) {
|
|
355
|
+
if (g = L, A = k, A <= d)
|
|
356
|
+
break;
|
|
357
|
+
Q = Math.max(1, 2 * d - A);
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
if ($(e, {
|
|
361
|
+
errors: C + 1,
|
|
362
|
+
currentLocation: d,
|
|
363
|
+
expectedLocation: d,
|
|
364
|
+
distance: n,
|
|
365
|
+
ignoreLocation: o
|
|
366
|
+
}) > g)
|
|
367
|
+
break;
|
|
368
|
+
B = R;
|
|
369
|
+
}
|
|
370
|
+
const T = {
|
|
371
|
+
isMatch: A >= 0,
|
|
372
|
+
// Count exact matches (those with a score of 0) to be "almost" exact
|
|
373
|
+
score: Math.max(1e-3, L)
|
|
374
|
+
};
|
|
375
|
+
if (p) {
|
|
376
|
+
const C = Re(m, c);
|
|
377
|
+
C.length ? h && (T.indices = C) : T.isMatch = !1;
|
|
378
|
+
}
|
|
379
|
+
return T;
|
|
380
|
+
}
|
|
381
|
+
function ke(t) {
|
|
382
|
+
let e = {};
|
|
383
|
+
for (let s = 0, r = t.length; s < r; s += 1) {
|
|
384
|
+
const n = t.charAt(s);
|
|
385
|
+
e[n] = (e[n] || 0) | 1 << r - s - 1;
|
|
386
|
+
}
|
|
387
|
+
return e;
|
|
388
|
+
}
|
|
389
|
+
const N = 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);
|
|
390
|
+
class ue {
|
|
391
|
+
constructor(e, {
|
|
392
|
+
location: s = l.location,
|
|
393
|
+
threshold: r = l.threshold,
|
|
394
|
+
distance: n = l.distance,
|
|
395
|
+
includeMatches: i = l.includeMatches,
|
|
396
|
+
findAllMatches: u = l.findAllMatches,
|
|
397
|
+
minMatchCharLength: c = l.minMatchCharLength,
|
|
398
|
+
isCaseSensitive: h = l.isCaseSensitive,
|
|
399
|
+
ignoreDiacritics: o = l.ignoreDiacritics,
|
|
400
|
+
ignoreLocation: a = l.ignoreLocation
|
|
401
|
+
} = {}) {
|
|
402
|
+
if (this.options = {
|
|
403
|
+
location: s,
|
|
404
|
+
threshold: r,
|
|
405
|
+
distance: n,
|
|
406
|
+
includeMatches: i,
|
|
407
|
+
findAllMatches: u,
|
|
408
|
+
minMatchCharLength: c,
|
|
409
|
+
isCaseSensitive: h,
|
|
410
|
+
ignoreDiacritics: o,
|
|
411
|
+
ignoreLocation: a
|
|
412
|
+
}, e = h ? e : e.toLowerCase(), e = o ? N(e) : e, this.pattern = e, this.chunks = [], !this.pattern.length)
|
|
413
|
+
return;
|
|
414
|
+
const f = (g, A) => {
|
|
415
|
+
this.chunks.push({
|
|
416
|
+
pattern: g,
|
|
417
|
+
alphabet: ke(g),
|
|
418
|
+
startIndex: A
|
|
419
|
+
});
|
|
420
|
+
}, d = this.pattern.length;
|
|
421
|
+
if (d > w) {
|
|
422
|
+
let g = 0;
|
|
423
|
+
const A = d % w, p = d - A;
|
|
424
|
+
for (; g < p; )
|
|
425
|
+
f(this.pattern.substr(g, w), g), g += w;
|
|
426
|
+
if (A) {
|
|
427
|
+
const m = d - w;
|
|
428
|
+
f(this.pattern.substr(m), m);
|
|
429
|
+
}
|
|
430
|
+
} else
|
|
431
|
+
f(this.pattern, 0);
|
|
432
|
+
}
|
|
433
|
+
searchIn(e) {
|
|
434
|
+
const { isCaseSensitive: s, ignoreDiacritics: r, includeMatches: n } = this.options;
|
|
435
|
+
if (e = s ? e : e.toLowerCase(), e = r ? N(e) : e, this.pattern === e) {
|
|
436
|
+
let p = {
|
|
437
|
+
isMatch: !0,
|
|
438
|
+
score: 0
|
|
439
|
+
};
|
|
440
|
+
return n && (p.indices = [[0, e.length - 1]]), p;
|
|
441
|
+
}
|
|
442
|
+
const {
|
|
443
|
+
location: i,
|
|
444
|
+
distance: u,
|
|
445
|
+
threshold: c,
|
|
446
|
+
findAllMatches: h,
|
|
447
|
+
minMatchCharLength: o,
|
|
448
|
+
ignoreLocation: a
|
|
449
|
+
} = this.options;
|
|
450
|
+
let f = [], d = 0, g = !1;
|
|
451
|
+
this.chunks.forEach(({ pattern: p, alphabet: m, startIndex: y }) => {
|
|
452
|
+
const { isMatch: B, score: L, indices: S } = be(e, p, m, {
|
|
453
|
+
location: i + y,
|
|
454
|
+
distance: u,
|
|
455
|
+
threshold: c,
|
|
456
|
+
findAllMatches: h,
|
|
457
|
+
minMatchCharLength: o,
|
|
458
|
+
includeMatches: n,
|
|
459
|
+
ignoreLocation: a
|
|
460
|
+
});
|
|
461
|
+
B && (g = !0), d += L, B && S && (f = [...f, ...S]);
|
|
462
|
+
});
|
|
463
|
+
let A = {
|
|
464
|
+
isMatch: g,
|
|
465
|
+
score: g ? d / this.chunks.length : 1
|
|
466
|
+
};
|
|
467
|
+
return g && n && (A.indices = f), A;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
class I {
|
|
471
|
+
constructor(e) {
|
|
472
|
+
this.pattern = e;
|
|
473
|
+
}
|
|
474
|
+
static isMultiMatch(e) {
|
|
475
|
+
return Z(e, this.multiRegex);
|
|
476
|
+
}
|
|
477
|
+
static isSingleMatch(e) {
|
|
478
|
+
return Z(e, this.singleRegex);
|
|
479
|
+
}
|
|
480
|
+
search() {
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
function Z(t, e) {
|
|
484
|
+
const s = t.match(e);
|
|
485
|
+
return s ? s[1] : null;
|
|
486
|
+
}
|
|
487
|
+
class Oe extends I {
|
|
488
|
+
constructor(e) {
|
|
489
|
+
super(e);
|
|
490
|
+
}
|
|
491
|
+
static get type() {
|
|
492
|
+
return "exact";
|
|
493
|
+
}
|
|
494
|
+
static get multiRegex() {
|
|
495
|
+
return /^="(.*)"$/;
|
|
496
|
+
}
|
|
497
|
+
static get singleRegex() {
|
|
498
|
+
return /^=(.*)$/;
|
|
499
|
+
}
|
|
500
|
+
search(e) {
|
|
501
|
+
const s = e === this.pattern;
|
|
502
|
+
return {
|
|
503
|
+
isMatch: s,
|
|
504
|
+
score: s ? 0 : 1,
|
|
505
|
+
indices: [0, this.pattern.length - 1]
|
|
506
|
+
};
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
class $e extends I {
|
|
510
|
+
constructor(e) {
|
|
511
|
+
super(e);
|
|
512
|
+
}
|
|
513
|
+
static get type() {
|
|
514
|
+
return "inverse-exact";
|
|
515
|
+
}
|
|
516
|
+
static get multiRegex() {
|
|
517
|
+
return /^!"(.*)"$/;
|
|
518
|
+
}
|
|
519
|
+
static get singleRegex() {
|
|
520
|
+
return /^!(.*)$/;
|
|
521
|
+
}
|
|
522
|
+
search(e) {
|
|
523
|
+
const r = e.indexOf(this.pattern) === -1;
|
|
524
|
+
return {
|
|
525
|
+
isMatch: r,
|
|
526
|
+
score: r ? 0 : 1,
|
|
527
|
+
indices: [0, e.length - 1]
|
|
528
|
+
};
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
class Ne extends I {
|
|
532
|
+
constructor(e) {
|
|
533
|
+
super(e);
|
|
534
|
+
}
|
|
535
|
+
static get type() {
|
|
536
|
+
return "prefix-exact";
|
|
537
|
+
}
|
|
538
|
+
static get multiRegex() {
|
|
539
|
+
return /^\^"(.*)"$/;
|
|
540
|
+
}
|
|
541
|
+
static get singleRegex() {
|
|
542
|
+
return /^\^(.*)$/;
|
|
543
|
+
}
|
|
544
|
+
search(e) {
|
|
545
|
+
const s = e.startsWith(this.pattern);
|
|
546
|
+
return {
|
|
547
|
+
isMatch: s,
|
|
548
|
+
score: s ? 0 : 1,
|
|
549
|
+
indices: [0, this.pattern.length - 1]
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
class ve extends I {
|
|
554
|
+
constructor(e) {
|
|
555
|
+
super(e);
|
|
556
|
+
}
|
|
557
|
+
static get type() {
|
|
558
|
+
return "inverse-prefix-exact";
|
|
559
|
+
}
|
|
560
|
+
static get multiRegex() {
|
|
561
|
+
return /^!\^"(.*)"$/;
|
|
562
|
+
}
|
|
563
|
+
static get singleRegex() {
|
|
564
|
+
return /^!\^(.*)$/;
|
|
565
|
+
}
|
|
566
|
+
search(e) {
|
|
567
|
+
const s = !e.startsWith(this.pattern);
|
|
568
|
+
return {
|
|
569
|
+
isMatch: s,
|
|
570
|
+
score: s ? 0 : 1,
|
|
571
|
+
indices: [0, e.length - 1]
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
class Te extends I {
|
|
576
|
+
constructor(e) {
|
|
577
|
+
super(e);
|
|
578
|
+
}
|
|
579
|
+
static get type() {
|
|
580
|
+
return "suffix-exact";
|
|
581
|
+
}
|
|
582
|
+
static get multiRegex() {
|
|
583
|
+
return /^"(.*)"\$$/;
|
|
584
|
+
}
|
|
585
|
+
static get singleRegex() {
|
|
586
|
+
return /^(.*)\$$/;
|
|
587
|
+
}
|
|
588
|
+
search(e) {
|
|
589
|
+
const s = e.endsWith(this.pattern);
|
|
590
|
+
return {
|
|
591
|
+
isMatch: s,
|
|
592
|
+
score: s ? 0 : 1,
|
|
593
|
+
indices: [e.length - this.pattern.length, e.length - 1]
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
class Pe extends I {
|
|
598
|
+
constructor(e) {
|
|
599
|
+
super(e);
|
|
600
|
+
}
|
|
601
|
+
static get type() {
|
|
602
|
+
return "inverse-suffix-exact";
|
|
603
|
+
}
|
|
604
|
+
static get multiRegex() {
|
|
605
|
+
return /^!"(.*)"\$$/;
|
|
606
|
+
}
|
|
607
|
+
static get singleRegex() {
|
|
608
|
+
return /^!(.*)\$$/;
|
|
609
|
+
}
|
|
610
|
+
search(e) {
|
|
611
|
+
const s = !e.endsWith(this.pattern);
|
|
612
|
+
return {
|
|
613
|
+
isMatch: s,
|
|
614
|
+
score: s ? 0 : 1,
|
|
615
|
+
indices: [0, e.length - 1]
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
class ce extends I {
|
|
620
|
+
constructor(e, {
|
|
621
|
+
location: s = l.location,
|
|
622
|
+
threshold: r = l.threshold,
|
|
623
|
+
distance: n = l.distance,
|
|
624
|
+
includeMatches: i = l.includeMatches,
|
|
625
|
+
findAllMatches: u = l.findAllMatches,
|
|
626
|
+
minMatchCharLength: c = l.minMatchCharLength,
|
|
627
|
+
isCaseSensitive: h = l.isCaseSensitive,
|
|
628
|
+
ignoreDiacritics: o = l.ignoreDiacritics,
|
|
629
|
+
ignoreLocation: a = l.ignoreLocation
|
|
630
|
+
} = {}) {
|
|
631
|
+
super(e), this._bitapSearch = new ue(e, {
|
|
632
|
+
location: s,
|
|
633
|
+
threshold: r,
|
|
634
|
+
distance: n,
|
|
635
|
+
includeMatches: i,
|
|
636
|
+
findAllMatches: u,
|
|
637
|
+
minMatchCharLength: c,
|
|
638
|
+
isCaseSensitive: h,
|
|
639
|
+
ignoreDiacritics: o,
|
|
640
|
+
ignoreLocation: a
|
|
641
|
+
});
|
|
642
|
+
}
|
|
643
|
+
static get type() {
|
|
644
|
+
return "fuzzy";
|
|
645
|
+
}
|
|
646
|
+
static get multiRegex() {
|
|
647
|
+
return /^"(.*)"$/;
|
|
648
|
+
}
|
|
649
|
+
static get singleRegex() {
|
|
650
|
+
return /^(.*)$/;
|
|
651
|
+
}
|
|
652
|
+
search(e) {
|
|
653
|
+
return this._bitapSearch.searchIn(e);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
class oe extends I {
|
|
657
|
+
constructor(e) {
|
|
658
|
+
super(e);
|
|
659
|
+
}
|
|
660
|
+
static get type() {
|
|
661
|
+
return "include";
|
|
662
|
+
}
|
|
663
|
+
static get multiRegex() {
|
|
664
|
+
return /^'"(.*)"$/;
|
|
665
|
+
}
|
|
666
|
+
static get singleRegex() {
|
|
667
|
+
return /^'(.*)$/;
|
|
668
|
+
}
|
|
669
|
+
search(e) {
|
|
670
|
+
let s = 0, r;
|
|
671
|
+
const n = [], i = this.pattern.length;
|
|
672
|
+
for (; (r = e.indexOf(this.pattern, s)) > -1; )
|
|
673
|
+
s = r + i, n.push([r, s - 1]);
|
|
674
|
+
const u = !!n.length;
|
|
675
|
+
return {
|
|
676
|
+
isMatch: u,
|
|
677
|
+
score: u ? 0 : 1,
|
|
678
|
+
indices: n
|
|
679
|
+
};
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
const W = [
|
|
683
|
+
Oe,
|
|
684
|
+
oe,
|
|
685
|
+
Ne,
|
|
686
|
+
ve,
|
|
687
|
+
Pe,
|
|
688
|
+
Te,
|
|
689
|
+
$e,
|
|
690
|
+
ce
|
|
691
|
+
], q = W.length, je = / +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/, Ke = "|";
|
|
692
|
+
function We(t, e = {}) {
|
|
693
|
+
return t.split(Ke).map((s) => {
|
|
694
|
+
let r = s.trim().split(je).filter((i) => i && !!i.trim()), n = [];
|
|
695
|
+
for (let i = 0, u = r.length; i < u; i += 1) {
|
|
696
|
+
const c = r[i];
|
|
697
|
+
let h = !1, o = -1;
|
|
698
|
+
for (; !h && ++o < q; ) {
|
|
699
|
+
const a = W[o];
|
|
700
|
+
let f = a.isMultiMatch(c);
|
|
701
|
+
f && (n.push(new a(f, e)), h = !0);
|
|
702
|
+
}
|
|
703
|
+
if (!h)
|
|
704
|
+
for (o = -1; ++o < q; ) {
|
|
705
|
+
const a = W[o];
|
|
706
|
+
let f = a.isSingleMatch(c);
|
|
707
|
+
if (f) {
|
|
708
|
+
n.push(new a(f, e));
|
|
709
|
+
break;
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
return n;
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
const ze = /* @__PURE__ */ new Set([ce.type, oe.type]);
|
|
717
|
+
class Ge {
|
|
718
|
+
constructor(e, {
|
|
719
|
+
isCaseSensitive: s = l.isCaseSensitive,
|
|
720
|
+
ignoreDiacritics: r = l.ignoreDiacritics,
|
|
721
|
+
includeMatches: n = l.includeMatches,
|
|
722
|
+
minMatchCharLength: i = l.minMatchCharLength,
|
|
723
|
+
ignoreLocation: u = l.ignoreLocation,
|
|
724
|
+
findAllMatches: c = l.findAllMatches,
|
|
725
|
+
location: h = l.location,
|
|
726
|
+
threshold: o = l.threshold,
|
|
727
|
+
distance: a = l.distance
|
|
728
|
+
} = {}) {
|
|
729
|
+
this.query = null, this.options = {
|
|
730
|
+
isCaseSensitive: s,
|
|
731
|
+
ignoreDiacritics: r,
|
|
732
|
+
includeMatches: n,
|
|
733
|
+
minMatchCharLength: i,
|
|
734
|
+
findAllMatches: c,
|
|
735
|
+
ignoreLocation: u,
|
|
736
|
+
location: h,
|
|
737
|
+
threshold: o,
|
|
738
|
+
distance: a
|
|
739
|
+
}, e = s ? e : e.toLowerCase(), e = r ? N(e) : e, this.pattern = e, this.query = We(this.pattern, this.options);
|
|
740
|
+
}
|
|
741
|
+
static condition(e, s) {
|
|
742
|
+
return s.useExtendedSearch;
|
|
743
|
+
}
|
|
744
|
+
searchIn(e) {
|
|
745
|
+
const s = this.query;
|
|
746
|
+
if (!s)
|
|
747
|
+
return {
|
|
748
|
+
isMatch: !1,
|
|
749
|
+
score: 1
|
|
750
|
+
};
|
|
751
|
+
const { includeMatches: r, isCaseSensitive: n, ignoreDiacritics: i } = this.options;
|
|
752
|
+
e = n ? e : e.toLowerCase(), e = i ? N(e) : e;
|
|
753
|
+
let u = 0, c = [], h = 0;
|
|
754
|
+
for (let o = 0, a = s.length; o < a; o += 1) {
|
|
755
|
+
const f = s[o];
|
|
756
|
+
c.length = 0, u = 0;
|
|
757
|
+
for (let d = 0, g = f.length; d < g; d += 1) {
|
|
758
|
+
const A = f[d], { isMatch: p, indices: m, score: y } = A.search(e);
|
|
759
|
+
if (p) {
|
|
760
|
+
if (u += 1, h += y, r) {
|
|
761
|
+
const B = A.constructor.type;
|
|
762
|
+
ze.has(B) ? c = [...c, ...m] : c.push(m);
|
|
763
|
+
}
|
|
764
|
+
} else {
|
|
765
|
+
h = 0, u = 0, c.length = 0;
|
|
766
|
+
break;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
if (u) {
|
|
770
|
+
let d = {
|
|
771
|
+
isMatch: !0,
|
|
772
|
+
score: h / u
|
|
773
|
+
};
|
|
774
|
+
return r && (d.indices = c), d;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
return {
|
|
778
|
+
isMatch: !1,
|
|
779
|
+
score: 1
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
const z = [];
|
|
784
|
+
function He(...t) {
|
|
785
|
+
z.push(...t);
|
|
786
|
+
}
|
|
787
|
+
function G(t, e) {
|
|
788
|
+
for (let s = 0, r = z.length; s < r; s += 1) {
|
|
789
|
+
let n = z[s];
|
|
790
|
+
if (n.condition(t, e))
|
|
791
|
+
return new n(t, e);
|
|
792
|
+
}
|
|
793
|
+
return new ue(t, e);
|
|
794
|
+
}
|
|
795
|
+
const v = {
|
|
796
|
+
AND: "$and",
|
|
797
|
+
OR: "$or"
|
|
798
|
+
}, H = {
|
|
799
|
+
PATH: "$path",
|
|
800
|
+
PATTERN: "$val"
|
|
801
|
+
}, Y = (t) => !!(t[v.AND] || t[v.OR]), Ye = (t) => !!t[H.PATH], Ve = (t) => !D(t) && se(t) && !Y(t), ee = (t) => ({
|
|
802
|
+
[v.AND]: Object.keys(t).map((e) => ({
|
|
803
|
+
[e]: t[e]
|
|
804
|
+
}))
|
|
805
|
+
});
|
|
806
|
+
function he(t, e, { auto: s = !0 } = {}) {
|
|
807
|
+
const r = (n) => {
|
|
808
|
+
let i = Object.keys(n);
|
|
809
|
+
const u = Ye(n);
|
|
810
|
+
if (!u && i.length > 1 && !Y(n))
|
|
811
|
+
return r(ee(n));
|
|
812
|
+
if (Ve(n)) {
|
|
813
|
+
const h = u ? n[H.PATH] : i[0], o = u ? n[H.PATTERN] : n[h];
|
|
814
|
+
if (!M(o))
|
|
815
|
+
throw new Error(Ce(h));
|
|
816
|
+
const a = {
|
|
817
|
+
keyId: K(h),
|
|
818
|
+
pattern: o
|
|
819
|
+
};
|
|
820
|
+
return s && (a.searcher = G(o, e)), a;
|
|
821
|
+
}
|
|
822
|
+
let c = {
|
|
823
|
+
children: [],
|
|
824
|
+
operator: i[0]
|
|
825
|
+
};
|
|
826
|
+
return i.forEach((h) => {
|
|
827
|
+
const o = n[h];
|
|
828
|
+
D(o) && o.forEach((a) => {
|
|
829
|
+
c.children.push(r(a));
|
|
830
|
+
});
|
|
831
|
+
}), c;
|
|
832
|
+
};
|
|
833
|
+
return Y(t) || (t = ee(t)), r(t);
|
|
834
|
+
}
|
|
835
|
+
function Qe(t, { ignoreFieldNorm: e = l.ignoreFieldNorm }) {
|
|
836
|
+
t.forEach((s) => {
|
|
837
|
+
let r = 1;
|
|
838
|
+
s.matches.forEach(({ key: n, norm: i, score: u }) => {
|
|
839
|
+
const c = n ? n.weight : null;
|
|
840
|
+
r *= Math.pow(
|
|
841
|
+
u === 0 && c ? Number.EPSILON : u,
|
|
842
|
+
(c || 1) * (e ? 1 : i)
|
|
843
|
+
);
|
|
844
|
+
}), s.score = r;
|
|
845
|
+
});
|
|
846
|
+
}
|
|
847
|
+
function Je(t, e) {
|
|
848
|
+
const s = t.matches;
|
|
849
|
+
e.matches = [], E(s) && s.forEach((r) => {
|
|
850
|
+
if (!E(r.indices) || !r.indices.length)
|
|
851
|
+
return;
|
|
852
|
+
const { indices: n, value: i } = r;
|
|
853
|
+
let u = {
|
|
854
|
+
indices: n,
|
|
855
|
+
value: i
|
|
856
|
+
};
|
|
857
|
+
r.key && (u.key = r.key.src), r.idx > -1 && (u.refIndex = r.idx), e.matches.push(u);
|
|
858
|
+
});
|
|
859
|
+
}
|
|
860
|
+
function Ue(t, e) {
|
|
861
|
+
e.score = t.score;
|
|
862
|
+
}
|
|
863
|
+
function Xe(t, e, {
|
|
864
|
+
includeMatches: s = l.includeMatches,
|
|
865
|
+
includeScore: r = l.includeScore
|
|
866
|
+
} = {}) {
|
|
867
|
+
const n = [];
|
|
868
|
+
return s && n.push(Je), r && n.push(Ue), t.map((i) => {
|
|
869
|
+
const { idx: u } = i, c = {
|
|
870
|
+
item: e[u],
|
|
871
|
+
refIndex: u
|
|
872
|
+
};
|
|
873
|
+
return n.length && n.forEach((h) => {
|
|
874
|
+
h(i, c);
|
|
875
|
+
}), c;
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
class b {
|
|
879
|
+
constructor(e, s = {}, r) {
|
|
880
|
+
this.options = { ...l, ...s }, this.options.useExtendedSearch, this._keyStore = new Be(this.options.keys), this.setCollection(e, r);
|
|
881
|
+
}
|
|
882
|
+
setCollection(e, s) {
|
|
883
|
+
if (this._docs = e, s && !(s instanceof V))
|
|
884
|
+
throw new Error(Ee);
|
|
885
|
+
this._myIndex = s || ie(this.options.keys, this._docs, {
|
|
886
|
+
getFn: this.options.getFn,
|
|
887
|
+
fieldNormWeight: this.options.fieldNormWeight
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
add(e) {
|
|
891
|
+
E(e) && (this._docs.push(e), this._myIndex.add(e));
|
|
892
|
+
}
|
|
893
|
+
remove(e = () => !1) {
|
|
894
|
+
const s = [];
|
|
895
|
+
for (let r = 0, n = this._docs.length; r < n; r += 1) {
|
|
896
|
+
const i = this._docs[r];
|
|
897
|
+
e(i, r) && (this.removeAt(r), r -= 1, n -= 1, s.push(i));
|
|
898
|
+
}
|
|
899
|
+
return s;
|
|
900
|
+
}
|
|
901
|
+
removeAt(e) {
|
|
902
|
+
this._docs.splice(e, 1), this._myIndex.removeAt(e);
|
|
903
|
+
}
|
|
904
|
+
getIndex() {
|
|
905
|
+
return this._myIndex;
|
|
906
|
+
}
|
|
907
|
+
search(e, { limit: s = -1 } = {}) {
|
|
908
|
+
const {
|
|
909
|
+
includeMatches: r,
|
|
910
|
+
includeScore: n,
|
|
911
|
+
shouldSort: i,
|
|
912
|
+
sortFn: u,
|
|
913
|
+
ignoreFieldNorm: c
|
|
914
|
+
} = this.options;
|
|
915
|
+
let h = M(e) ? M(this._docs[0]) ? this._searchStringList(e) : this._searchObjectList(e) : this._searchLogical(e);
|
|
916
|
+
return Qe(h, { ignoreFieldNorm: c }), i && h.sort(u), te(s) && s > -1 && (h = h.slice(0, s)), Xe(h, this._docs, {
|
|
917
|
+
includeMatches: r,
|
|
918
|
+
includeScore: n
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
_searchStringList(e) {
|
|
922
|
+
const s = G(e, this.options), { records: r } = this._myIndex, n = [];
|
|
923
|
+
return r.forEach(({ v: i, i: u, n: c }) => {
|
|
924
|
+
if (!E(i))
|
|
925
|
+
return;
|
|
926
|
+
const { isMatch: h, score: o, indices: a } = s.searchIn(i);
|
|
927
|
+
h && n.push({
|
|
928
|
+
item: i,
|
|
929
|
+
idx: u,
|
|
930
|
+
matches: [{ score: o, value: i, norm: c, indices: a }]
|
|
931
|
+
});
|
|
932
|
+
}), n;
|
|
933
|
+
}
|
|
934
|
+
_searchLogical(e) {
|
|
935
|
+
const s = he(e, this.options), r = (c, h, o) => {
|
|
936
|
+
if (!c.children) {
|
|
937
|
+
const { keyId: f, searcher: d } = c, g = this._findMatches({
|
|
938
|
+
key: this._keyStore.get(f),
|
|
939
|
+
value: this._myIndex.getValueForItemAtKeyId(h, f),
|
|
940
|
+
searcher: d
|
|
941
|
+
});
|
|
942
|
+
return g && g.length ? [
|
|
943
|
+
{
|
|
944
|
+
idx: o,
|
|
945
|
+
item: h,
|
|
946
|
+
matches: g
|
|
947
|
+
}
|
|
948
|
+
] : [];
|
|
949
|
+
}
|
|
950
|
+
const a = [];
|
|
951
|
+
for (let f = 0, d = c.children.length; f < d; f += 1) {
|
|
952
|
+
const g = c.children[f], A = r(g, h, o);
|
|
953
|
+
if (A.length)
|
|
954
|
+
a.push(...A);
|
|
955
|
+
else if (c.operator === v.AND)
|
|
956
|
+
return [];
|
|
957
|
+
}
|
|
958
|
+
return a;
|
|
959
|
+
}, n = this._myIndex.records, i = {}, u = [];
|
|
960
|
+
return n.forEach(({ $: c, i: h }) => {
|
|
961
|
+
if (E(c)) {
|
|
962
|
+
let o = r(s, c, h);
|
|
963
|
+
o.length && (i[h] || (i[h] = { idx: h, item: c, matches: [] }, u.push(i[h])), o.forEach(({ matches: a }) => {
|
|
964
|
+
i[h].matches.push(...a);
|
|
965
|
+
}));
|
|
966
|
+
}
|
|
967
|
+
}), u;
|
|
968
|
+
}
|
|
969
|
+
_searchObjectList(e) {
|
|
970
|
+
const s = G(e, this.options), { keys: r, records: n } = this._myIndex, i = [];
|
|
971
|
+
return n.forEach(({ $: u, i: c }) => {
|
|
972
|
+
if (!E(u))
|
|
973
|
+
return;
|
|
974
|
+
let h = [];
|
|
975
|
+
r.forEach((o, a) => {
|
|
976
|
+
h.push(
|
|
977
|
+
...this._findMatches({
|
|
978
|
+
key: o,
|
|
979
|
+
value: u[a],
|
|
980
|
+
searcher: s
|
|
981
|
+
})
|
|
982
|
+
);
|
|
983
|
+
}), h.length && i.push({
|
|
984
|
+
idx: c,
|
|
985
|
+
item: u,
|
|
986
|
+
matches: h
|
|
987
|
+
});
|
|
988
|
+
}), i;
|
|
989
|
+
}
|
|
990
|
+
_findMatches({ key: e, value: s, searcher: r }) {
|
|
991
|
+
if (!E(s))
|
|
992
|
+
return [];
|
|
993
|
+
let n = [];
|
|
994
|
+
if (D(s))
|
|
995
|
+
s.forEach(({ v: i, i: u, n: c }) => {
|
|
996
|
+
if (!E(i))
|
|
997
|
+
return;
|
|
998
|
+
const { isMatch: h, score: o, indices: a } = r.searchIn(i);
|
|
999
|
+
h && n.push({
|
|
1000
|
+
score: o,
|
|
1001
|
+
key: e,
|
|
1002
|
+
value: i,
|
|
1003
|
+
idx: u,
|
|
1004
|
+
norm: c,
|
|
1005
|
+
indices: a
|
|
1006
|
+
});
|
|
1007
|
+
});
|
|
1008
|
+
else {
|
|
1009
|
+
const { v: i, n: u } = s, { isMatch: c, score: h, indices: o } = r.searchIn(i);
|
|
1010
|
+
c && n.push({ score: h, key: e, value: i, norm: u, indices: o });
|
|
1011
|
+
}
|
|
1012
|
+
return n;
|
|
1013
|
+
}
|
|
1014
|
+
}
|
|
1015
|
+
b.version = "7.1.0";
|
|
1016
|
+
b.createIndex = ie;
|
|
1017
|
+
b.parseIndex = Le;
|
|
1018
|
+
b.config = l;
|
|
1019
|
+
b.parseQuery = he;
|
|
1020
|
+
He(Ge);
|
|
1021
|
+
const et = ({
|
|
1022
|
+
data: t,
|
|
1023
|
+
filter: e,
|
|
1024
|
+
sort: s
|
|
1025
|
+
}) => {
|
|
1026
|
+
const r = O(() => {
|
|
1027
|
+
let o = t;
|
|
1028
|
+
return e != null && (o = o.filter((a) => e(a, {}))), s != null && (o = [...o].sort(s)), o;
|
|
1029
|
+
}, [t, e, s]), n = O(() => r.length === 0 ? null : new b(r, {
|
|
1030
|
+
keys: Object.keys(r[0]),
|
|
1031
|
+
threshold: 0.3
|
|
1032
|
+
}), [r]), [i, u] = le({}), c = fe(
|
|
1033
|
+
((o) => {
|
|
1034
|
+
if (Array.isArray(o)) {
|
|
1035
|
+
const a = new Set(o);
|
|
1036
|
+
return r.filter((f) => a.has(f.key));
|
|
1037
|
+
}
|
|
1038
|
+
return r.find((a) => a.key === o);
|
|
1039
|
+
}),
|
|
1040
|
+
[r]
|
|
1041
|
+
), h = O(() => {
|
|
1042
|
+
let o = r;
|
|
1043
|
+
i.searchTerm != null && i.searchTerm.length > 0 && n != null && (o = n.search(i.searchTerm).map((d) => d.item), s != null && (o = [...o].sort(s)));
|
|
1044
|
+
const a = o.map((f) => f.key);
|
|
1045
|
+
return { getItem: c, data: a };
|
|
1046
|
+
}, [r, i, c, n, s]);
|
|
1047
|
+
return O(() => ({ ...h, retrieve: u }), [h, u]);
|
|
1048
|
+
};
|
|
1049
|
+
export {
|
|
1050
|
+
et as u
|
|
1051
|
+
};
|