@delali/narsil 0.3.1-next.154 → 0.3.1-next.156
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/NOTICE +45 -0
- package/README.md +1 -0
- package/dist/adapters/filesystem.mjs +2 -2
- package/dist/adapters/gcs.mjs +2 -2
- package/dist/adapters/indexeddb.mjs +1 -1
- package/dist/adapters/s3.mjs +2 -2
- package/dist/{analysis-change-4GCRVRBW.mjs → analysis-change-5BQOQ4BF.mjs} +35 -28
- package/dist/{react-native/chunks/analysis-change-entry-TNLUC6IZ.mjs → analysis-change-entry-TXX6JSMX.mjs} +1 -1
- package/dist/archive-history-E4R73RWD.mjs +29 -0
- package/dist/browser/{analysis-change-IXWPXXJJ.mjs → analysis-change-435CUEPZ.mjs} +32 -12
- package/dist/{analysis-change-entry-KYGSXW4K.mjs → browser/analysis-change-entry-HZXKPPGV.mjs} +1 -1
- package/dist/browser/archive-history-4IP5XQZY.mjs +29 -0
- package/dist/browser/{chunk-4PD752F6.mjs → chunk-23XRXIBW.mjs} +1 -1
- package/dist/browser/{chunk-J433A7P3.mjs → chunk-2CFI5VVV.mjs} +5 -5
- package/dist/{react-native/chunks/chunk-3XKMRNRE.mjs → browser/chunk-2TI4SSUP.mjs} +27 -10
- package/dist/browser/chunk-3SSRJMFN.mjs +100 -0
- package/dist/browser/{chunk-2SHAKW2Z.mjs → chunk-3V7DNNZL.mjs} +515 -733
- package/dist/browser/{chunk-C4KS2QNF.mjs → chunk-4NGKC4H4.mjs} +9 -9
- package/dist/browser/{chunk-XRV72TJD.mjs → chunk-6LWDPLTB.mjs} +2 -2
- package/dist/browser/chunk-7IGKGWSQ.mjs +79 -0
- package/dist/browser/{chunk-VCOYGVP7.mjs → chunk-7U3WVJUP.mjs} +3 -3
- package/dist/browser/chunk-ATEBYXP6.mjs +10 -0
- package/dist/browser/chunk-BHFQATSC.mjs +432 -0
- package/dist/browser/chunk-CRE3G7F3.mjs +1007 -0
- package/dist/browser/{chunk-QXTPSX2H.mjs → chunk-EA63E3D2.mjs} +7 -7
- package/dist/{react-native/chunks/chunk-DCKMICOB.mjs → browser/chunk-EXQZGUQH.mjs} +1 -1
- package/dist/browser/{chunk-ML6HY7T7.mjs → chunk-G64Q6OJF.mjs} +1 -1
- package/dist/browser/chunk-GPPOG6PT.mjs +9 -0
- package/dist/browser/{chunk-EUNBNLKM.mjs → chunk-IZXVW2ZJ.mjs} +5 -5
- package/dist/browser/{chunk-G7LUMBSG.mjs → chunk-K4Q6KX3R.mjs} +30 -20
- package/dist/browser/{chunk-H6QFBMVE.mjs → chunk-KZWSX6BH.mjs} +3 -3
- package/dist/browser/chunk-M3MQE2X7.mjs +151 -0
- package/dist/browser/chunk-MGI4BCXC.mjs +63 -0
- package/dist/browser/chunk-MOG4OVDK.mjs +51 -0
- package/dist/browser/{chunk-W5X2UFWQ.mjs → chunk-NLWTBAGB.mjs} +12 -3
- package/dist/browser/{chunk-AYY6PIKL.mjs → chunk-NQAME3RK.mjs} +2 -2
- package/dist/browser/{chunk-7MEYN7V6.mjs → chunk-NXQG7DRA.mjs} +29 -14
- package/dist/browser/chunk-OEDCEZXJ.mjs +92 -0
- package/dist/{chunk-KUZKUONM.mjs → browser/chunk-SRMZXJSL.mjs} +1 -0
- package/dist/browser/chunk-SSTPBZZX.mjs +1106 -0
- package/dist/browser/{chunk-7TTWXUH6.mjs → chunk-STOWQFT3.mjs} +3 -2
- package/dist/browser/{chunk-26A5JFT2.mjs → chunk-TK63WFXK.mjs} +2 -1
- package/dist/browser/{chunk-SJB6VIZG.mjs → chunk-U3JOQGWX.mjs} +1 -1
- package/dist/browser/{chunk-AJ4HHOVT.mjs → chunk-U4YDIBUT.mjs} +4 -4
- package/dist/browser/{chunk-2FX6ROWR.mjs → chunk-VLJQW4J6.mjs} +2986 -2986
- package/dist/{react-native/chunks/chunk-3O57C2ZO.mjs → browser/chunk-WI4MR75E.mjs} +2 -2
- package/dist/browser/{chunk-3U3QR5YP.mjs → chunk-WN464PTL.mjs} +2 -2
- package/dist/browser/{chunk-U2E3HMYW.mjs → chunk-XAWNZ4G2.mjs} +11 -11
- package/dist/browser/{cold-module-VTUGDYNY.mjs → cold-module-2EHCIV4K.mjs} +20 -18
- package/dist/browser/durability-config-TIYKW6XX.mjs +89 -0
- package/dist/browser/{durability-wiring-GL4A7KDV.mjs → durability-wiring-A7BVG2DW.mjs} +50 -153
- package/dist/browser/engine-hooks-E4UD67JD.mjs +17 -0
- package/dist/browser/geo-index-HHWGMNIS.mjs +1386 -0
- package/dist/browser/import-DXYB6756.mjs +19 -0
- package/dist/browser/{methods-LMUTS7OI.mjs → methods-KTQCSIN4.mjs} +3 -3
- package/dist/browser/{module-M4JNBV6V.mjs → module-NIYMEA5R.mjs} +16 -14
- package/dist/browser/{module-EC3FYW7N.mjs → module-TCT66FWA.mjs} +10 -9
- package/dist/browser/operations-OJ3BXS55.mjs +5 -0
- package/dist/browser/{phrase-module-NPYUVX75.mjs → phrase-module-HAT3TLZN.mjs} +2 -2
- package/dist/browser/{pool-WCGDZHJP.mjs → pool-3JLET5RO.mjs} +1 -1
- package/dist/browser/restore-hooks-YPN4ZFCY.mjs +114 -0
- package/dist/browser/restore-queue-G3RQGL3Y.mjs +55 -0
- package/dist/browser/{retention-6QMRS5VK.mjs → retention-ZWVMNC3Q.mjs} +18 -15
- package/dist/browser/{runtime-3EW2AGB6.mjs → runtime-OTAGEFQW.mjs} +1 -1
- package/dist/browser/{snapshot-DN3CRVUQ.mjs → snapshot-VEQNIE6C.mjs} +71 -36
- package/dist/browser/start-BM442C6R.mjs +25 -0
- package/dist/browser/{write-WAWAFGKQ.mjs → write-2EVMZWDE.mjs} +16 -14
- package/dist/{capabilities-B3Brs1Rc.d.ts → capabilities-Da4ywVVl.d.ts} +35 -3
- package/dist/{chunk-K4B7OH65.mjs → chunk-25KDNIZZ.mjs} +2 -2
- package/dist/{chunk-O43Z4MS6.mjs → chunk-2NE7VCYE.mjs} +2 -2
- package/dist/chunk-2UV4QBHW.mjs +1092 -0
- package/dist/{chunk-3Y3J4V2R.mjs → chunk-3C7MTCCI.mjs} +1 -1
- package/dist/{chunk-TRISKD4Q.mjs → chunk-3HYC4JRF.mjs} +2 -2
- package/dist/{chunk-HVYICDY3.mjs → chunk-3OH67G7R.mjs} +1 -1
- package/dist/{chunk-PFKM7VNZ.mjs → chunk-46KY2PJD.mjs} +30 -11
- package/dist/{chunk-IJU7LL7D.mjs → chunk-4KKXNJM6.mjs} +5 -5
- package/dist/{chunk-IQ4R2I6N.mjs → chunk-5FLRXF73.mjs} +5 -1
- package/dist/{chunk-BPSKLCS7.mjs → chunk-5VV4R6P7.mjs} +3017 -3017
- package/dist/chunk-5YNRKI2C.mjs +81 -0
- package/dist/chunk-6HTGOXIK.mjs +875 -0
- package/dist/{chunk-7HCZWC7B.mjs → chunk-6I6AYAXS.mjs} +50 -8
- package/dist/{chunk-C6ASEFZI.mjs → chunk-6OEGXLBX.mjs} +1 -1
- package/dist/{chunk-DVWYODEB.mjs → chunk-6RC4K46J.mjs} +2 -2
- package/dist/chunk-7GFE3PEY.mjs +40 -0
- package/dist/{chunk-QKZHLADX.mjs → chunk-7LXHHCXZ.mjs} +28 -19
- package/dist/{chunk-JUKYYXSP.mjs → chunk-7V5IUP2T.mjs} +1 -31
- package/dist/{react-native/chunks/chunk-7GWPJDOA.mjs → chunk-A4L7YTKX.mjs} +53 -90
- package/dist/{chunk-Z3TNWCI5.mjs → chunk-BU4SAIC4.mjs} +3 -3
- package/dist/chunk-BWZ3P4MU.mjs +20 -0
- package/dist/{chunk-OKX2BBNW.mjs → chunk-CITFCZKF.mjs} +5 -4
- package/dist/{chunk-4HWZV5MK.mjs → chunk-CSLGFPFQ.mjs} +5 -5
- package/dist/chunk-DP5C7YFQ.mjs +543 -0
- package/dist/{chunk-RVKFI3A2.mjs → chunk-DWEPMFJE.mjs} +11 -8
- package/dist/{chunk-LSM2YTKM.mjs → chunk-EFBDHH5P.mjs} +87 -144
- package/dist/{chunk-NZMAXR2S.mjs → chunk-FAKFUDZZ.mjs} +121 -11
- package/dist/chunk-FB6463IN.mjs +1499 -0
- package/dist/{chunk-REL7LFLR.mjs → chunk-FCJ553HS.mjs} +3 -3
- package/dist/{chunk-MMEMEUOO.mjs → chunk-FJKKCV4D.mjs} +2 -2
- package/dist/{chunk-K7KLL263.mjs → chunk-FNGAM5B7.mjs} +14 -13
- package/dist/{chunk-DMQPFLGI.mjs → chunk-FRBFVQFN.mjs} +6 -5
- package/dist/{chunk-IBNLW3AV.mjs → chunk-FYOVBEMM.mjs} +20 -6
- package/dist/chunk-G6HRSGOU.mjs +74 -0
- package/dist/{chunk-USR7FQRZ.mjs → chunk-GH4WQ22V.mjs} +2 -2
- package/dist/chunk-GQPTDQCL.mjs +54 -0
- package/dist/{chunk-VREK3MYG.mjs → chunk-HFPMMRQT.mjs} +3 -3
- package/dist/{chunk-MLHNSAPK.mjs → chunk-HHBUCIUY.mjs} +3 -3
- package/dist/{chunk-YROWNOMH.mjs → chunk-HJJI72X7.mjs} +1 -1
- package/dist/{chunk-ECX4SGX6.mjs → chunk-I2KPOLOZ.mjs} +9 -9
- package/dist/{chunk-TV2L3BN7.mjs → chunk-I53G4JAU.mjs} +266 -265
- package/dist/{chunk-3A5KI24C.mjs → chunk-I54T6CQP.mjs} +1 -1
- package/dist/{chunk-NTZOXVUZ.mjs → chunk-I5B7RXU7.mjs} +93 -24
- package/dist/{chunk-YBJDOA2T.mjs → chunk-INJYO3BU.mjs} +1 -1
- package/dist/{react-native/chunks/chunk-KWRW5U65.mjs → chunk-J4IJTTEX.mjs} +1 -1
- package/dist/{chunk-X6NSJYQ3.mjs → chunk-JDJBQLRO.mjs} +13 -13
- package/dist/{chunk-MMBEANB2.mjs → chunk-JWRUUCWD.mjs} +3 -3
- package/dist/{chunk-AO2FAYIZ.mjs → chunk-K4ZIGL2O.mjs} +1 -1
- package/dist/{chunk-JFNKIBDT.mjs → chunk-K5QFDYST.mjs} +2 -2
- package/dist/{chunk-C73JLU4E.mjs → chunk-KF4EXSM4.mjs} +2 -2
- package/dist/{chunk-WCBA2LVZ.mjs → chunk-KHKIRS5D.mjs} +1 -1
- package/dist/{chunk-7QUGDVFC.mjs → chunk-KJ3RTZDJ.mjs} +1 -1
- package/dist/{chunk-HVKXNBFL.mjs → chunk-KKQC526K.mjs} +20 -12
- package/dist/chunk-KP7TYHWT.mjs +92 -0
- package/dist/{chunk-VMXSVVXG.mjs → chunk-L6V6BST3.mjs} +9 -22
- package/dist/{chunk-URPCYQVJ.mjs → chunk-LHKOSI2J.mjs} +1 -1
- package/dist/chunk-LNGE7SLY.mjs +151 -0
- package/dist/{react-native/chunks/chunk-CUNGPR5R.mjs → chunk-MP7ABPTD.mjs} +1 -0
- package/dist/{chunk-5KGYQT6W.mjs → chunk-MQOJIO5B.mjs} +26 -9
- package/dist/{chunk-Q3TCTQCC.mjs → chunk-NF4DT3IH.mjs} +1 -1
- package/dist/{chunk-3OFU3NJT.mjs → chunk-OIJ64LGT.mjs} +1 -1
- package/dist/chunk-ORN5BLL7.mjs +11 -0
- package/dist/{chunk-HWEDFLB7.mjs → chunk-P5ZI2P2W.mjs} +126 -1701
- package/dist/{chunk-466PYR4P.mjs → chunk-PWC4VB3Q.mjs} +2 -2
- package/dist/{chunk-B7S6YEBP.mjs → chunk-QJVOLKU6.mjs} +12 -3
- package/dist/{chunk-KCUIFVVW.mjs → chunk-QOW2JPUI.mjs} +9 -9
- package/dist/chunk-RDXO6JST.mjs +63 -0
- package/dist/chunk-RLOES5SX.mjs +31 -0
- package/dist/{chunk-YPUEV6ZC.mjs → chunk-RVGRFOGN.mjs} +1 -1
- package/dist/{chunk-JCLTESFN.mjs → chunk-RZWWB2XR.mjs} +1 -1
- package/dist/chunk-S5LN746F.mjs +10 -0
- package/dist/chunk-SA5LOGO3.mjs +470 -0
- package/dist/chunk-SQJWAIF4.mjs +12 -0
- package/dist/{chunk-YTJCGKM4.mjs → chunk-TBC3XUL2.mjs} +29 -6
- package/dist/chunk-TDIK6NTV.mjs +10 -0
- package/dist/chunk-TGS5UXBE.mjs +216 -0
- package/dist/{chunk-CP5RRPJR.mjs → chunk-TQXHPFWT.mjs} +1 -1
- package/dist/{chunk-7NTMUDC5.mjs → chunk-TZ3355VS.mjs} +5 -5
- package/dist/{chunk-Q7MS6P2J.mjs → chunk-TZTRKM33.mjs} +2 -2
- package/dist/{chunk-4UMZ7KQL.mjs → chunk-U55XJEIG.mjs} +2 -1
- package/dist/{chunk-S2N75OTN.mjs → chunk-UHICS3JI.mjs} +1 -1
- package/dist/{chunk-5FUOVJKG.mjs → chunk-VTTRFF2C.mjs} +32 -19
- package/dist/{chunk-62G63NMH.mjs → chunk-WX4LAO6M.mjs} +4 -4
- package/dist/{chunk-LTUGDMV4.mjs → chunk-WZ7YV54N.mjs} +1 -1
- package/dist/chunk-XAXKV65G.mjs +72 -0
- package/dist/chunk-XXHN7J46.mjs +101 -0
- package/dist/{chunk-PGVPE7GJ.mjs → chunk-YEKL4JBK.mjs} +1 -1
- package/dist/chunk-YTWZVGCB.mjs +382 -0
- package/dist/chunk-Z2KAFCRT.mjs +30 -0
- package/dist/{chunk-LKUE5GXS.mjs → chunk-ZKP7G7TV.mjs} +2 -2
- package/dist/{client-Df76GNKm.d.ts → client-DRv7UVeY.d.ts} +123 -11
- package/dist/client.d.ts +9 -8
- package/dist/client.mjs +65 -3
- package/dist/{cold-module-YLWMTTZG.mjs → cold-module-6MO2XJF2.mjs} +45 -39
- package/dist/{config-B8DP2VwR.d.ts → config-CoSig5Ox.d.ts} +22 -3
- package/dist/{config-05G_hy-1.d.ts → config-DMwffLKn.d.ts} +20 -5
- package/dist/direct-executor-FTMYY3TI.mjs +34 -0
- package/dist/distribution/coordinator/etcd.d.ts +2 -2
- package/dist/distribution/coordinator/etcd.mjs +3 -3
- package/dist/distribution/coordinator/in-memory.d.ts +2 -2
- package/dist/distribution/coordinator/in-memory.mjs +2 -2
- package/dist/distribution/transport/grpc.mjs +4 -4
- package/dist/distribution/transport/in-memory.mjs +2 -2
- package/dist/distribution/transport/tcp.mjs +3 -3
- package/dist/distribution.d.ts +8 -8
- package/dist/distribution.mjs +6799 -5939
- package/dist/durability-config-GE4U7MCZ.mjs +89 -0
- package/dist/{durability-wiring-RHLXDIVF.mjs → durability-wiring-VIF5MOSY.mjs} +82 -179
- package/dist/embeddings/openai.mjs +2 -2
- package/dist/{sync-uXR7MmM7.d.ts → engine-CFxPYqEk.d.ts} +702 -2
- package/dist/engine-hooks-EGUGNZYE.mjs +54 -0
- package/dist/geo-index-MRH5JMIR.mjs +1387 -0
- package/dist/import-XKDPJQDP.mjs +56 -0
- package/dist/{index-nRqDM6uS.d.ts → index-C4AmUnl1.d.ts} +1 -1
- package/dist/index.browser.mjs +9 -7
- package/dist/index.d.ts +134 -9
- package/dist/index.mjs +33 -26
- package/dist/index.react-native.mjs +20 -17
- package/dist/invalidation/filesystem.mjs +2 -2
- package/dist/{long-query-thread-EMYTGSJP.mjs → long-query-thread-YA4IAYSY.mjs} +34 -28
- package/dist/{methods-ABM5ELBR.mjs → methods-7IOINERF.mjs} +3 -3
- package/dist/{module-MG7JMV2U.mjs → module-FQ4JWNQJ.mjs} +41 -34
- package/dist/{module-3OMJZUFT.mjs → module-N55W4Q5C.mjs} +14 -14
- package/dist/operations-G5EP6JPX.mjs +5 -0
- package/dist/{paged-partition-archive-UOLHOEZJ.mjs → paged-partition-archive-PXW5XAYU.mjs} +48 -38
- package/dist/partial-words.mjs +11 -9
- package/dist/pattern.mjs +6 -5
- package/dist/persistence/durability/checkpoint-worker.d.ts +8 -1
- package/dist/persistence/durability/checkpoint-worker.mjs +44 -35
- package/dist/{phrase-module-O3MDRQXP.mjs → phrase-module-XW5MKWP5.mjs} +4 -3
- package/dist/{pool-CQXYPFLG.mjs → pool-Y4A46T36.mjs} +1 -1
- package/dist/query-suggestions/merge-worker.d.ts +55 -0
- package/dist/query-suggestions/merge-worker.mjs +88 -0
- package/dist/query-suggestions-CBYkrQ5T.d.ts +311 -0
- package/dist/query-suggestions.browser.mjs +247 -0
- package/dist/query-suggestions.d.ts +20 -0
- package/dist/query-suggestions.mjs +69 -0
- package/dist/react-native/chunks/{analysis-change-EAYO3Y6Q.mjs → analysis-change-LT5QBQ3H.mjs} +43 -22
- package/dist/{browser/analysis-change-entry-FCSHFQSS.mjs → react-native/chunks/analysis-change-entry-SCVWK6OU.mjs} +1 -1
- package/dist/react-native/chunks/archive-history-MJKUQLSU.mjs +29 -0
- package/dist/{chunk-ZIFJXCKA.mjs → react-native/chunks/chunk-2PRHILX3.mjs} +54 -20
- package/dist/react-native/chunks/{chunk-VQSKZ3EZ.mjs → chunk-3JWDECAZ.mjs} +8 -8
- package/dist/{chunk-R6A773WK.mjs → react-native/chunks/chunk-3WI35N75.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-75VWIY35.mjs → chunk-4DII3ZSM.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-NKIZX26F.mjs → chunk-4J74WHQM.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-UWDNZDWK.mjs → chunk-4JYO3JD2.mjs} +6 -6
- package/dist/react-native/chunks/chunk-5CQX3XXV.mjs +17 -0
- package/dist/react-native/chunks/chunk-6VBXNFLE.mjs +9 -0
- package/dist/react-native/chunks/{chunk-SJWDBRNP.mjs → chunk-6WA3C3DV.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-OQQVRWZ2.mjs → chunk-C5G6TJ7A.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-RVAEBN74.mjs → chunk-CKNRFDTZ.mjs} +1 -1
- package/dist/react-native/chunks/chunk-DIYDOIM4.mjs +10 -0
- package/dist/react-native/chunks/{chunk-O32RB3BL.mjs → chunk-DNXOMPAQ.mjs} +4 -4
- package/dist/react-native/chunks/{chunk-YBEW6YTR.mjs → chunk-DVDX4SDR.mjs} +2 -2
- package/dist/react-native/chunks/chunk-DXRSEWA2.mjs +12 -0
- package/dist/{browser/chunk-MYITLCHT.mjs → react-native/chunks/chunk-DZ7H7D2C.mjs} +1 -0
- package/dist/react-native/chunks/{chunk-PPEPTUVV.mjs → chunk-EJ33LCHV.mjs} +29 -6
- package/dist/react-native/chunks/{chunk-RYMDHGL4.mjs → chunk-ENLMYKSX.mjs} +3045 -3075
- package/dist/react-native/chunks/chunk-FHPW7P2O.mjs +40 -0
- package/dist/react-native/chunks/{chunk-JV6VQY2S.mjs → chunk-FTZHMRD2.mjs} +2 -1
- package/dist/react-native/chunks/{chunk-YHKZSLOC.mjs → chunk-G43IPIDG.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-AUT7PMA4.mjs → chunk-GXX3DQXP.mjs} +8 -22
- package/dist/react-native/chunks/chunk-H3MDVPBO.mjs +151 -0
- package/dist/react-native/chunks/{chunk-DH3TVWWK.mjs → chunk-IYNT75CE.mjs} +12 -3
- package/dist/react-native/chunks/chunk-KV46CT4D.mjs +1007 -0
- package/dist/{browser/chunk-ZPTA75ZC.mjs → react-native/chunks/chunk-LZSLNSUN.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-63YSZOXB.mjs → chunk-MIP4SOR6.mjs} +1480 -826
- package/dist/react-native/chunks/{chunk-ZBSWRSBG.mjs → chunk-MJDQU5MW.mjs} +1 -1
- package/dist/react-native/chunks/{chunk-GFYFQLJD.mjs → chunk-MUWD2H2S.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-IOY2SM2P.mjs → chunk-MVXELMJX.mjs} +1 -1
- package/dist/{browser/chunk-TTD27VXX.mjs → react-native/chunks/chunk-NB3LP33V.mjs} +27 -10
- package/dist/react-native/chunks/{chunk-I5PGWQJF.mjs → chunk-PDRWWPKV.mjs} +33 -24
- package/dist/react-native/chunks/chunk-PJHAB5ZY.mjs +79 -0
- package/dist/react-native/chunks/{chunk-2CGSQM4O.mjs → chunk-POPDAGH6.mjs} +13 -13
- package/dist/react-native/chunks/{chunk-NP7DD4G5.mjs → chunk-QUKQNI3H.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-EH5CFV6Z.mjs → chunk-RDWG33MM.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-JX2RIAXH.mjs → chunk-SK2PWYDH.mjs} +5 -5
- package/dist/react-native/chunks/{chunk-ZYDKJXQJ.mjs → chunk-SUPXRTMD.mjs} +1 -1
- package/dist/react-native/chunks/chunk-TP6KCKER.mjs +63 -0
- package/dist/react-native/chunks/{chunk-JPAJWO6D.mjs → chunk-U4KSKA4Z.mjs} +1 -1
- package/dist/react-native/chunks/chunk-UQ4OAXKU.mjs +1106 -0
- package/dist/react-native/chunks/{chunk-VVFYOADG.mjs → chunk-VWUDIOT6.mjs} +6 -6
- package/dist/{browser/chunk-SIR3LMTV.mjs → react-native/chunks/chunk-WBYQRHDY.mjs} +2 -2
- package/dist/react-native/chunks/{chunk-C2H2QQFW.mjs → chunk-YH7QY657.mjs} +3 -3
- package/dist/react-native/chunks/{chunk-NCJS3WIY.mjs → chunk-YZW4CHM6.mjs} +51 -12
- package/dist/react-native/chunks/chunk-ZLWVW734.mjs +100 -0
- package/dist/react-native/chunks/chunk-ZXZFN7FI.mjs +432 -0
- package/dist/react-native/chunks/chunk-ZZT7CEN7.mjs +92 -0
- package/dist/react-native/chunks/{cold-module-TJL6AFAD.mjs → cold-module-KVZYUGRY.mjs} +31 -28
- package/dist/react-native/chunks/durability-config-QXVZEO7T.mjs +89 -0
- package/dist/react-native/chunks/{durability-wiring-RRDYJLLM.mjs → durability-wiring-34OYO32E.mjs} +60 -162
- package/dist/react-native/chunks/engine-hooks-M7JV46NH.mjs +30 -0
- package/dist/react-native/chunks/geo-index-PX3BIHAH.mjs +1387 -0
- package/dist/react-native/chunks/gzip.react-native-HLEPDKZ3.mjs +3 -0
- package/dist/react-native/chunks/import-H6AQREWI.mjs +32 -0
- package/dist/react-native/chunks/{methods-X6F36SJE.mjs → methods-6W5U4C3H.mjs} +3 -3
- package/dist/react-native/chunks/module-LBZPGOWH.mjs +36 -0
- package/dist/react-native/chunks/{module-S4DKSWMF.mjs → module-TTEVPRCW.mjs} +14 -13
- package/dist/react-native/chunks/operations-GNRMD6EX.mjs +5 -0
- package/dist/react-native/chunks/{phrase-module-JZ37TB7N.mjs → phrase-module-QK22HSQ2.mjs} +2 -2
- package/dist/react-native/chunks/{pool-RTGXJXPU.mjs → pool-JR3NJCAF.mjs} +1 -1
- package/dist/react-native/chunks/restore-hooks-IBGIY3DR.mjs +127 -0
- package/dist/react-native/chunks/restore-queue-ZZX54AH7.mjs +55 -0
- package/dist/react-native/chunks/{retention-PPCTP2VY.mjs → retention-EW4TTDFB.mjs} +29 -25
- package/dist/react-native/chunks/{runtime-KUATOLYB.mjs → runtime-R5E3TB3J.mjs} +1 -1
- package/dist/react-native/chunks/{snapshot-ZBIEOZTZ.mjs → snapshot-REYVIN3X.mjs} +80 -44
- package/dist/react-native/chunks/start-BQK6KN3R.mjs +38 -0
- package/dist/react-native/chunks/{write-2W4FTX7J.mjs → write-FQAYCZF5.mjs} +27 -24
- package/dist/react-native/partial-words.mjs +11 -9
- package/dist/react-native/pattern.mjs +4 -4
- package/dist/react-native/query-suggestions.mjs +260 -0
- package/dist/react-native/sync.mjs +78 -15
- package/dist/react-native/synonyms.mjs +95 -27
- package/dist/react.d.ts +11 -11
- package/dist/react.mjs +1 -0
- package/dist/{rerank-IZOB6NII.mjs → rerank-MQ37IYRV.mjs} +4 -4
- package/dist/rerankers/http.mjs +2 -2
- package/dist/restore-hooks-CDERDEF4.mjs +153 -0
- package/dist/restore-queue-7NNSTROA.mjs +55 -0
- package/dist/retention-QSVBBNRM.mjs +66 -0
- package/dist/{runtime-UZOC3NPY.mjs → runtime-COIUORCN.mjs} +5 -5
- package/dist/{schema-DDauvDOv.d.ts → schema-Jwt928nJ.d.ts} +1 -1
- package/dist/server.d.ts +108 -12
- package/dist/server.mjs +303 -50
- package/dist/{snapshot-NFX2EYN2.mjs → snapshot-RH4NSKIZ.mjs} +98 -61
- package/dist/start-MCKCOGIW.mjs +66 -0
- package/dist/sync/filesystem.d.ts +4 -4
- package/dist/sync/filesystem.mjs +6 -6
- package/dist/sync/indexeddb.d.ts +4 -4
- package/dist/sync/indexeddb.mjs +2 -2
- package/dist/sync.browser.mjs +74 -11
- package/dist/sync.d.ts +5 -5
- package/dist/sync.mjs +78 -16
- package/dist/synonyms.mjs +9 -8
- package/dist/{tasks-BShx8pdK.d.ts → tasks-qrJojgST.d.ts} +13 -5
- package/dist/thread-O4SBJJJS.mjs +50 -0
- package/dist/{types-SnO7_tAI.d.ts → types-BZCGjfLn.d.ts} +2 -3
- package/dist/vector/search-worker.d.ts +1 -1
- package/dist/vector/search-worker.mjs +8 -8
- package/dist/workers/entry.mjs +19 -8
- package/dist/{write-FGB62BHQ.mjs → write-3FK7NG3Y.mjs} +40 -33
- package/openapi.json +798 -7
- package/package.json +32 -8
- package/dist/browser/import-YI5GNB4H.mjs +0 -17
- package/dist/browser/operations-WVYLF72Q.mjs +0 -5
- package/dist/browser/restore-queue-TYIGDL5L.mjs +0 -41
- package/dist/chunk-37IVJLP6.mjs +0 -44
- package/dist/chunk-DJHHF2L5.mjs +0 -17
- package/dist/direct-executor-FI5GJHWX.mjs +0 -29
- package/dist/engine-DYu-e0oR.d.ts +0 -674
- package/dist/import-SRBNC6TE.mjs +0 -49
- package/dist/operations-PGOAY2KS.mjs +0 -5
- package/dist/react-native/chunks/chunk-TJMSKBEM.mjs +0 -25
- package/dist/react-native/chunks/gzip.react-native-DNB5YNFA.mjs +0 -3
- package/dist/react-native/chunks/import-JYBMEJPQ.mjs +0 -29
- package/dist/react-native/chunks/module-QT5HZAY4.mjs +0 -33
- package/dist/react-native/chunks/operations-RYKTSZQA.mjs +0 -5
- package/dist/react-native/chunks/restore-queue-ZBVIKJWI.mjs +0 -41
- package/dist/restore-queue-COI2GSSK.mjs +0 -41
- package/dist/retention-55WA7GPU.mjs +0 -58
- package/dist/thread-P2G2FWM2.mjs +0 -44
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { withOpenIndex, oneAtATime, emitSyncChange } from './chunk-Y4WPNHMC.mjs';
|
|
2
|
-
import { resolveIndexAnalysis, getLanguage } from './chunk-
|
|
3
|
-
import { encodeStringBlob,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { resolveIndexAnalysis, getLanguage } from './chunk-RZWWB2XR.mjs';
|
|
3
|
+
import { encodeStringBlob, encodeLookupKey } from './chunk-G6HRSGOU.mjs';
|
|
4
|
+
import { tokenize } from './chunk-A4L7YTKX.mjs';
|
|
5
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
6
|
+
import { compareCodePoints } from './chunk-TBC3XUL2.mjs';
|
|
6
7
|
import { decode, encode } from '@msgpack/msgpack';
|
|
7
8
|
|
|
8
9
|
// src/engine/analysis-change/pending-target.ts
|
|
@@ -38,14 +39,49 @@ var SYNONYM_EXPANSION_CACHE_ENTRIES = 1024;
|
|
|
38
39
|
// src/core/synonyms/combined-postings.ts
|
|
39
40
|
var NO_DELETED = { size: 0, has: () => false };
|
|
40
41
|
var FIELD_SLOTS = 65536;
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
var NO_ROW = -1;
|
|
43
|
+
var rowOfField = null;
|
|
44
|
+
function addRow(combined, rowOf, docId, field, frequency) {
|
|
45
|
+
combined.totalTermFrequency += frequency;
|
|
46
|
+
const existing = rowOf[field];
|
|
47
|
+
if (existing !== NO_ROW) {
|
|
48
|
+
combined.frequencies[existing] += frequency;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
rowOf[field] = combined.docIds.length;
|
|
52
|
+
combined.docIds.push(docId);
|
|
53
|
+
combined.fieldNameIndices.push(field);
|
|
54
|
+
combined.frequencies.push(frequency);
|
|
55
|
+
combined.documents.add(docId);
|
|
56
|
+
}
|
|
57
|
+
function lowestDocumentAt(lists, cursors) {
|
|
58
|
+
let lowest = Number.POSITIVE_INFINITY;
|
|
59
|
+
for (let at = 0; at < lists.length; at++) {
|
|
60
|
+
if (cursors[at] < lists[at].length && lists[at].docIds[cursors[at]] < lowest) lowest = lists[at].docIds[cursors[at]];
|
|
61
|
+
}
|
|
62
|
+
return lowest;
|
|
63
|
+
}
|
|
64
|
+
function mergeOrderedLists(lists, combined) {
|
|
65
|
+
rowOfField ??= new Int32Array(FIELD_SLOTS).fill(NO_ROW);
|
|
66
|
+
const rowOf = rowOfField;
|
|
67
|
+
const cursors = new Uint32Array(lists.length);
|
|
68
|
+
for (let docId = lowestDocumentAt(lists, cursors); docId !== Number.POSITIVE_INFINITY; ) {
|
|
69
|
+
const runStart = combined.docIds.length;
|
|
70
|
+
for (let at = 0; at < lists.length; at++) {
|
|
71
|
+
const list = lists[at];
|
|
72
|
+
const deleted = list.deletedDocs.size > 0 && list.deletedDocs.has(docId);
|
|
73
|
+
let row = cursors[at];
|
|
74
|
+
for (; row < list.length && list.docIds[row] === docId; row++) {
|
|
75
|
+
if (!deleted) addRow(combined, rowOf, docId, list.fieldNameIndices[row], list.termFrequencies[row]);
|
|
76
|
+
}
|
|
77
|
+
cursors[at] = row;
|
|
78
|
+
}
|
|
79
|
+
for (let row = runStart; row < combined.docIds.length; row++) rowOf[combined.fieldNameIndices[row]] = NO_ROW;
|
|
80
|
+
docId = lowestDocumentAt(lists, cursors);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
function combineUnorderedLists(lists, combined) {
|
|
43
84
|
const rowOf = /* @__PURE__ */ new Map();
|
|
44
|
-
const docIds = [];
|
|
45
|
-
const fieldNameIndices = [];
|
|
46
|
-
const frequencies = [];
|
|
47
|
-
const documents = /* @__PURE__ */ new Set();
|
|
48
|
-
let totalTermFrequency = 0;
|
|
49
85
|
for (const list of lists) {
|
|
50
86
|
const deleted = list.deletedDocs;
|
|
51
87
|
const hasDeleted = deleted.size > 0;
|
|
@@ -54,33 +90,66 @@ function combinePostingLists(lists) {
|
|
|
54
90
|
if (hasDeleted && deleted.has(docId)) continue;
|
|
55
91
|
const field = list.fieldNameIndices[row];
|
|
56
92
|
const frequency = list.termFrequencies[row];
|
|
57
|
-
totalTermFrequency += frequency;
|
|
93
|
+
combined.totalTermFrequency += frequency;
|
|
58
94
|
const key = docId * FIELD_SLOTS + field;
|
|
59
95
|
const existing = rowOf.get(key);
|
|
60
96
|
if (existing !== void 0) {
|
|
61
|
-
frequencies[existing] += frequency;
|
|
97
|
+
combined.frequencies[existing] += frequency;
|
|
62
98
|
continue;
|
|
63
99
|
}
|
|
64
|
-
rowOf.set(key, docIds.length);
|
|
65
|
-
docIds.push(docId);
|
|
66
|
-
fieldNameIndices.push(field);
|
|
67
|
-
frequencies.push(frequency);
|
|
68
|
-
documents.add(docId);
|
|
100
|
+
rowOf.set(key, combined.docIds.length);
|
|
101
|
+
combined.docIds.push(docId);
|
|
102
|
+
combined.fieldNameIndices.push(field);
|
|
103
|
+
combined.frequencies.push(frequency);
|
|
104
|
+
combined.documents.add(docId);
|
|
69
105
|
}
|
|
70
106
|
}
|
|
107
|
+
}
|
|
108
|
+
function rowsByDocument(docIds) {
|
|
109
|
+
const order = new Uint32Array(docIds.length);
|
|
110
|
+
for (let row = 0; row < order.length; row++) order[row] = row;
|
|
111
|
+
return order.sort((left, right) => docIds[left] - docIds[right] || left - right);
|
|
112
|
+
}
|
|
113
|
+
function listOf(combined, order) {
|
|
114
|
+
const length = combined.docIds.length;
|
|
115
|
+
const docIds = new Uint32Array(length);
|
|
116
|
+
const termFrequencies = new Float64Array(length);
|
|
117
|
+
const fieldNameIndices = new Uint16Array(length);
|
|
118
|
+
for (let at = 0; at < length; at++) {
|
|
119
|
+
const row = order === null ? at : order[at];
|
|
120
|
+
docIds[at] = combined.docIds[row];
|
|
121
|
+
termFrequencies[at] = combined.frequencies[row];
|
|
122
|
+
fieldNameIndices[at] = combined.fieldNameIndices[row];
|
|
123
|
+
}
|
|
71
124
|
return {
|
|
72
|
-
length
|
|
73
|
-
docIds
|
|
74
|
-
termFrequencies
|
|
75
|
-
fieldNameIndices
|
|
125
|
+
length,
|
|
126
|
+
docIds,
|
|
127
|
+
termFrequencies,
|
|
128
|
+
fieldNameIndices,
|
|
76
129
|
positions: null,
|
|
77
|
-
docIdSet: documents,
|
|
130
|
+
docIdSet: combined.documents,
|
|
78
131
|
deletedDocs: NO_DELETED,
|
|
79
|
-
totalTermFrequency,
|
|
132
|
+
totalTermFrequency: combined.totalTermFrequency,
|
|
80
133
|
structureRevision: 0,
|
|
81
134
|
ordered: false
|
|
82
135
|
};
|
|
83
136
|
}
|
|
137
|
+
function combinePostingLists(lists) {
|
|
138
|
+
if (lists.length === 1) return lists[0];
|
|
139
|
+
const combined = {
|
|
140
|
+
docIds: [],
|
|
141
|
+
fieldNameIndices: [],
|
|
142
|
+
frequencies: [],
|
|
143
|
+
documents: /* @__PURE__ */ new Set(),
|
|
144
|
+
totalTermFrequency: 0
|
|
145
|
+
};
|
|
146
|
+
if (lists.every((list) => list.ordered)) {
|
|
147
|
+
mergeOrderedLists(lists, combined);
|
|
148
|
+
return listOf(combined, null);
|
|
149
|
+
}
|
|
150
|
+
combineUnorderedLists(lists, combined);
|
|
151
|
+
return listOf(combined, rowsByDocument(combined.docIds));
|
|
152
|
+
}
|
|
84
153
|
|
|
85
154
|
// src/core/synonyms/expand.ts
|
|
86
155
|
function groupSynonymsOf(tokens) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { compareCodePoints } from './chunk-
|
|
1
|
+
import { compareCodePoints } from './chunk-TBC3XUL2.mjs';
|
|
2
2
|
|
|
3
3
|
// src/core/ordering/fold-table.ts
|
|
4
4
|
var SINGLE_FOLDS = "1t,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;2j,lj;b,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;2,w;1,w;1,w;1,w;1,w;1,w;1,w;y,1;2,1;2,1;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-tzk;1,-tzk;1,-tzk;1,-tzk;1,-tzk;ggy,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;xy,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;3t,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;1,14;4d,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;2,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;1,13;2,13;1,13;1,13;1,13;1,13;1,13;1,13;2,13;1,13;1d7,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;1,1s;4e,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;27v,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;gw1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1,w;1t,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;1,r;o5k,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;1,y;";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { encodeSegmentManifest } from './chunk-
|
|
1
|
+
import { encodeSegmentManifest } from './chunk-3HYC4JRF.mjs';
|
|
2
|
+
import { writeSegmentsOf, readSegmentFile, MERGED_SEGMENT_GROWTH_ALLOWANCE, MERGED_SEGMENT_TARGET_BYTES } from './chunk-QOW2JPUI.mjs';
|
|
3
|
+
import { restoreVectorFields } from './chunk-WX4LAO6M.mjs';
|
|
4
|
+
import { ReplicationMessageTypes } from './chunk-5FLRXF73.mjs';
|
|
2
5
|
import { WIRE_BATCH_BUDGET } from './chunk-JDDXV6UF.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import { restoreVectorFields } from './chunk-62G63NMH.mjs';
|
|
5
|
-
import { SEGMENT_MANIFEST_VERSION, manifestKey, manifestReferencedKeys, segmentsPrefix, snapshotBundleKey, MAX_SEGMENTS_PER_PARTITION } from './chunk-Q3TCTQCC.mjs';
|
|
6
|
+
import { SEGMENT_MANIFEST_VERSION, manifestKey, manifestReferencedKeys, segmentsPrefix, snapshotBundleKey, MAX_SEGMENTS_PER_PARTITION } from './chunk-NF4DT3IH.mjs';
|
|
6
7
|
import { DEFAULT_COMPACTION_THRESHOLD, COMPACTION_LARGEST_MERGED_DOCUMENT_COUNT, SEGMENT_FILE_FRAMING_SLACK_BYTES } from './chunk-QDZJM7NI.mjs';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-HWEDFLB7.mjs';
|
|
8
|
+
import { reconstructSchemaFromMetadata, prepareDocumentVectors } from './chunk-EFBDHH5P.mjs';
|
|
9
|
+
import { generateId, freezeSegmentShared, createSharedFrozenSegment, createFrozenSegment, createPartitionManager, createPartitionRouter, buildSegmentPayload, resolvePartitionInsertOptions, decodeMapWithoutFields, shareSegmentArrays } from './chunk-VTTRFF2C.mjs';
|
|
10
|
+
import { isCompositePartition, survivorDocumentsOf, partitionStateOf } from './chunk-P5ZI2P2W.mjs';
|
|
11
11
|
import { crc32 } from './chunk-7GXJUJ24.mjs';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
12
|
+
import { extractVectorFieldsFromSchema, partialFieldsOf } from './chunk-BU4SAIC4.mjs';
|
|
13
|
+
import { getLanguage, resolveIndexAnalysis } from './chunk-RZWWB2XR.mjs';
|
|
14
14
|
import { MAX_FILE_BYTES } from './chunk-U476IXKQ.mjs';
|
|
15
|
-
import { ErrorCodes, NarsilError } from './chunk-
|
|
15
|
+
import { ErrorCodes, NarsilError } from './chunk-MP7ABPTD.mjs';
|
|
16
16
|
import { encode, decode } from '@msgpack/msgpack';
|
|
17
17
|
|
|
18
18
|
// src/persistence/durability/segment/captured-partition.ts
|
|
@@ -879,7 +879,7 @@ async function compactPartitionSegments(input) {
|
|
|
879
879
|
if (paged) {
|
|
880
880
|
const { directory } = input.store;
|
|
881
881
|
if (directory === void 0) return { segments, nextSegmentId: input.nextSegmentId };
|
|
882
|
-
const { mergePagedWindow } = await import('./module-
|
|
882
|
+
const { mergePagedWindow } = await import('./module-FQ4JWNQJ.mjs');
|
|
883
883
|
return replacing(
|
|
884
884
|
await mergePagedWindow({
|
|
885
885
|
store: input.store,
|
|
@@ -967,7 +967,7 @@ function pagedSettingsOf(context) {
|
|
|
967
967
|
async function tombstonesOfDelta(context, older, selections, deleted) {
|
|
968
968
|
const { directory } = context.input.store;
|
|
969
969
|
if (context.input.metadata.textStorage !== "disk" || directory === void 0) return deleted;
|
|
970
|
-
const { pagedTombstonesFor } = await import('./module-
|
|
970
|
+
const { pagedTombstonesFor } = await import('./module-FQ4JWNQJ.mjs');
|
|
971
971
|
return pagedTombstonesFor(
|
|
972
972
|
directory,
|
|
973
973
|
older,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { RESTORE_ESTIMATE_MARGIN, RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR_DIMENSION, RESTORE_WORST_EXTERNAL_BYTES_PER_VECTOR, RESTORE_WORST_EXTERNAL_BYTES_PER_STORED_BYTE, RESTORE_WORST_HEAP_BYTES_PER_VECTOR_DIMENSION, RESTORE_WORST_HEAP_BYTES_PER_VECTOR, RESTORE_WORST_HEAP_BYTES_PER_STORED_BYTE, RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR_DIMENSION, RESTORE_FLOOR_EXTERNAL_BYTES_PER_VECTOR, RESTORE_FLOOR_EXTERNAL_BYTES_PER_STORED_BYTE, RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR_DIMENSION, RESTORE_FLOOR_HEAP_BYTES_PER_VECTOR, RESTORE_FLOOR_HEAP_BYTES_PER_STORED_BYTE, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_WORST_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_WORST_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_FLOOR_EXTERNAL_BYTES_PER_EARLIER_SNAPSHOT_BYTE, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR_DIMENSION, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_VECTOR, RESTORE_FLOOR_HEAP_BYTES_PER_EARLIER_SNAPSHOT_BYTE } from './chunk-ZYAY26KG.mjs';
|
|
2
|
-
import { readResidentMemory } from './chunk-
|
|
2
|
+
import { readResidentMemory } from './chunk-P5ZI2P2W.mjs';
|
|
3
3
|
import { readHeapStatistics } from './chunk-IPN7S4KX.mjs';
|
|
4
|
+
import { extractVectorFieldsFromSchema } from './chunk-BU4SAIC4.mjs';
|
|
4
5
|
import { collectAndReturnPages } from './chunk-QYRNLLLI.mjs';
|
|
5
|
-
import {
|
|
6
|
-
import { NarsilError, ErrorCodes } from './chunk-KUZKUONM.mjs';
|
|
6
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
7
7
|
|
|
8
8
|
// src/engine/snapshot/memory-budget.ts
|
|
9
9
|
var MEGABYTE_BYTES = 1048576;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { osqRecordBytes } from './chunk-37CD3OKS.mjs';
|
|
2
2
|
import { MAX_M, EARLIER_RELEASE_MIN_M, MIN_M } from './chunk-ZXX5GZEX.mjs';
|
|
3
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
4
4
|
|
|
5
5
|
// src/vector/vector-index/dead-bits.ts
|
|
6
6
|
var NO_LIVE_VECTOR_AT_POSITION = -1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getIndexMetadata } from './chunk-
|
|
1
|
+
import { getIndexMetadata } from './chunk-6I6AYAXS.mjs';
|
|
2
2
|
import { fnv1a } from './chunk-KAKQ74LS.mjs';
|
|
3
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
3
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
4
4
|
|
|
5
5
|
// src/distribution/cluster-node/routable-allocation.ts
|
|
6
6
|
async function routableAllocation(coordinator, indexName) {
|
|
@@ -4,14 +4,14 @@ function holdsChangeWork(entry) {
|
|
|
4
4
|
}
|
|
5
5
|
async function abandonChangeOf(core, indexName) {
|
|
6
6
|
if (!holdsChangeWork(core.indexRegistry.get(indexName))) return;
|
|
7
|
-
const { abandonAnalysisChange } = await import('./analysis-change-
|
|
7
|
+
const { abandonAnalysisChange } = await import('./analysis-change-5BQOQ4BF.mjs');
|
|
8
8
|
await abandonAnalysisChange(core, indexName);
|
|
9
9
|
}
|
|
10
10
|
async function resumeChangeOf(core, indexName) {
|
|
11
11
|
if ((core.indexRegistry.get(indexName)?.pendingAnalysis ?? null) === null) return;
|
|
12
12
|
if (core.mutationCtx.capacityScope === "partition") return;
|
|
13
13
|
if (core.executor.getManager(indexName) === void 0) return;
|
|
14
|
-
const { resumeAnalysisChange } = await import('./analysis-change-
|
|
14
|
+
const { resumeAnalysisChange } = await import('./analysis-change-5BQOQ4BF.mjs');
|
|
15
15
|
void resumeAnalysisChange(core, indexName).catch(() => void 0);
|
|
16
16
|
}
|
|
17
17
|
async function resumeEveryChange(core) {
|
|
@@ -1,23 +1,31 @@
|
|
|
1
|
-
import { NarsilError, ErrorCodes } from './chunk-
|
|
1
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
2
2
|
import { existsSync } from 'fs';
|
|
3
3
|
import { createRequire } from 'module';
|
|
4
4
|
import { join, dirname } from 'path';
|
|
5
5
|
|
|
6
|
-
// src/vector/
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
6
|
+
// src/vector/native/backend.ts
|
|
7
|
+
var nativeSearchCoreEnabled = true;
|
|
8
|
+
function nativeSearchCoreIsEnabled() {
|
|
9
|
+
return nativeSearchCoreEnabled;
|
|
10
|
+
}
|
|
11
|
+
function stopUsingTheNativeSearchCore(error) {
|
|
12
|
+
if (!nativeSearchCoreEnabled) return;
|
|
13
|
+
nativeSearchCoreEnabled = false;
|
|
14
|
+
console.warn(
|
|
15
|
+
"The native search core raised an error, so this thread searches through WebAssembly from now on:",
|
|
16
|
+
error instanceof Error ? error.message : String(error)
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
function noteFallback(operation) {
|
|
20
|
+
}
|
|
15
21
|
|
|
16
22
|
// src/vector/native/types.ts
|
|
17
|
-
var NATIVE_CORE_ABI_VERSION =
|
|
23
|
+
var NATIVE_CORE_ABI_VERSION = 8;
|
|
18
24
|
var NATIVE_OK = 0;
|
|
19
25
|
var NATIVE_NEEDS_ROOM = 3;
|
|
20
26
|
var NATIVE_GRAPH_NOT_HELD_ALONE = 4;
|
|
27
|
+
|
|
28
|
+
// src/vector/native/loader.ts
|
|
21
29
|
var BINARY_FILE_NAME = "narsil-core.node";
|
|
22
30
|
var MUSL_DIRECTORY = "musl";
|
|
23
31
|
var PLATFORMS_WITH_A_BINARY = /* @__PURE__ */ new Set([
|
|
@@ -125,4 +133,4 @@ function loadNativeCore() {
|
|
|
125
133
|
return loaded;
|
|
126
134
|
}
|
|
127
135
|
|
|
128
|
-
export {
|
|
136
|
+
export { NATIVE_GRAPH_NOT_HELD_ALONE, NATIVE_NEEDS_ROOM, NATIVE_OK, loadNativeCore, nativeSearchCoreIsEnabled, noteFallback, requireSearchBackendSettings, stopUsingTheNativeSearchCore };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { QUERY_HISTORY_FOLDER, RESTORED_HISTORY_FOLDER, RESTORE_STAGING_INFIX, MAX_HISTORY_FILE_BYTES } from './chunk-5YNRKI2C.mjs';
|
|
2
|
+
|
|
3
|
+
// src/query-suggestions/history-files.ts
|
|
4
|
+
var BUILD_RECORD_FILE = "build.nrsl";
|
|
5
|
+
var DAY_FILE = /^(\d{4}-\d{2}-\d{2})\.nrsl$/;
|
|
6
|
+
var RESTORED_FILE = /^(\d{4}-\d{2}-\d{2})-(\d{4})\.nrsl$/;
|
|
7
|
+
function historyFolderOf(indexName) {
|
|
8
|
+
return `${QUERY_HISTORY_FOLDER}/${indexName}/`;
|
|
9
|
+
}
|
|
10
|
+
function dayFileKey(indexName, day) {
|
|
11
|
+
return `${historyFolderOf(indexName)}${day}.nrsl`;
|
|
12
|
+
}
|
|
13
|
+
function restoredFileKey(indexName, day, sequence) {
|
|
14
|
+
return `${historyFolderOf(indexName)}${RESTORED_HISTORY_FOLDER}/${day}-${String(sequence).padStart(4, "0")}.nrsl`;
|
|
15
|
+
}
|
|
16
|
+
function buildRecordKey(indexName) {
|
|
17
|
+
return `${historyFolderOf(indexName)}${BUILD_RECORD_FILE}`;
|
|
18
|
+
}
|
|
19
|
+
function historyFileOf(indexName, key) {
|
|
20
|
+
const folder = historyFolderOf(indexName);
|
|
21
|
+
if (!key.startsWith(folder)) return null;
|
|
22
|
+
const rest = key.slice(folder.length);
|
|
23
|
+
const own = DAY_FILE.exec(rest);
|
|
24
|
+
if (own !== null) return { key, day: own[1], restored: false };
|
|
25
|
+
const restoredPrefix = `${RESTORED_HISTORY_FOLDER}/`;
|
|
26
|
+
if (!rest.startsWith(restoredPrefix)) return null;
|
|
27
|
+
const restored = RESTORED_FILE.exec(rest.slice(restoredPrefix.length));
|
|
28
|
+
return restored === null ? null : { key, day: restored[1], restored: true };
|
|
29
|
+
}
|
|
30
|
+
function directoryFiles(storage) {
|
|
31
|
+
const { directory } = storage;
|
|
32
|
+
return {
|
|
33
|
+
listUnder: (prefix) => directory.list(prefix),
|
|
34
|
+
async read(key) {
|
|
35
|
+
const length = await directory.byteLength?.(key) ?? null;
|
|
36
|
+
if (length !== null && length > MAX_HISTORY_FILE_BYTES) return "too-long";
|
|
37
|
+
const bytes = await directory.read(key);
|
|
38
|
+
if (bytes !== null && bytes.byteLength > MAX_HISTORY_FILE_BYTES) return "too-long";
|
|
39
|
+
return bytes;
|
|
40
|
+
},
|
|
41
|
+
write: (key, bytes) => directory.atomicWrite(key, bytes),
|
|
42
|
+
remove: (key) => directory.remove(key)
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function adapterFiles(storage) {
|
|
46
|
+
const { adapter } = storage;
|
|
47
|
+
return {
|
|
48
|
+
listUnder: (prefix) => adapter.list(prefix),
|
|
49
|
+
async read(key) {
|
|
50
|
+
const bytes = await adapter.load(key);
|
|
51
|
+
if (bytes !== null && bytes.byteLength > MAX_HISTORY_FILE_BYTES) return "too-long";
|
|
52
|
+
return bytes;
|
|
53
|
+
},
|
|
54
|
+
write: (key, bytes) => adapter.save(key, bytes),
|
|
55
|
+
remove: (key) => adapter.delete(key)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function memoryFiles() {
|
|
59
|
+
const files = /* @__PURE__ */ new Map();
|
|
60
|
+
return {
|
|
61
|
+
async listUnder(prefix) {
|
|
62
|
+
return [...files.keys()].filter((key) => key.startsWith(prefix)).sort();
|
|
63
|
+
},
|
|
64
|
+
async read(key) {
|
|
65
|
+
return files.get(key) ?? null;
|
|
66
|
+
},
|
|
67
|
+
async write(key, bytes) {
|
|
68
|
+
files.set(key, bytes);
|
|
69
|
+
},
|
|
70
|
+
async remove(key) {
|
|
71
|
+
files.delete(key);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function historyFilesOf(storage) {
|
|
76
|
+
if (storage === null) return memoryFiles();
|
|
77
|
+
return storage.kind === "directory" ? directoryFiles(storage) : adapterFiles(storage);
|
|
78
|
+
}
|
|
79
|
+
function listHistoryFolder(files, indexName) {
|
|
80
|
+
return files.listUnder(historyFolderOf(indexName));
|
|
81
|
+
}
|
|
82
|
+
async function removeHistoryFolder(files, indexName) {
|
|
83
|
+
for (const key of await listHistoryFolder(files, indexName)) await files.remove(key);
|
|
84
|
+
}
|
|
85
|
+
function restoreStagingPrefix() {
|
|
86
|
+
return `${QUERY_HISTORY_FOLDER}/${RESTORE_STAGING_INFIX}${globalThis.crypto.randomUUID()}/`;
|
|
87
|
+
}
|
|
88
|
+
async function removeRestoreLeftovers(files) {
|
|
89
|
+
for (const key of await files.listUnder(`${QUERY_HISTORY_FOLDER}/${RESTORE_STAGING_INFIX}`)) await files.remove(key);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { buildRecordKey, dayFileKey, historyFileOf, historyFilesOf, historyFolderOf, listHistoryFolder, removeHistoryFolder, removeRestoreLeftovers, restoreStagingPrefix, restoredFileKey };
|
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MAX_LATITUDE_DEGREES, MAX_LONGITUDE_DEGREES } from './chunk-SQJWAIF4.mjs';
|
|
2
2
|
import { PARTIAL_WORD_MIN_CODE_POINTS, PARTIAL_WORDS_ADDED_PER_QUERY, DEFAULT_FUZZY_PREFIX_LENGTH } from './chunk-FQBFZAWG.mjs';
|
|
3
|
-
import {
|
|
4
|
-
import { EARLIER_RELEASE_MIN_M, MIN_M, MAX_M } from './chunk-ZXX5GZEX.mjs';
|
|
3
|
+
import { flattenSchema, encodeDocument } from './chunk-BU4SAIC4.mjs';
|
|
5
4
|
import { fuzzyTermMatches } from './chunk-GES7U2PM.mjs';
|
|
6
|
-
import { isWordIndexedBase, parseFieldType } from './chunk-
|
|
5
|
+
import { isWordIndexedBase, parseFieldType } from './chunk-I54T6CQP.mjs';
|
|
6
|
+
import { encodeStringBlob } from './chunk-G6HRSGOU.mjs';
|
|
7
7
|
import { DEFAULT_PATTERN_VALUE_LIMIT, isPlainObject, MAX_DOCUMENT_BYTES, MAX_DOCUMENT_NESTING_DEPTH, VECTOR_PATTERN } from './chunk-L5ORED7V.mjs';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var DEG_TO_RAD = Math.PI / 180;
|
|
13
|
-
var MAX_LATITUDE_DEGREES = 90;
|
|
14
|
-
var MAX_LONGITUDE_DEGREES = 180;
|
|
15
|
-
var MIN_POLYGON_POINTS = 3;
|
|
16
|
-
var ANTIMERIDIAN_SPAN_DEGREES = 180;
|
|
17
|
-
var FULL_TURN_DEGREES = 360;
|
|
18
|
-
var EARTH_RADIUS_METERS = 63710088e-1;
|
|
19
|
-
var LOCATION_CODE_BITS_PER_AXIS = 26;
|
|
20
|
-
var MAX_COVERING_CELLS = 16;
|
|
21
|
-
var RADIUS_BOX_MARGIN_RATIO = 1.02;
|
|
22
|
-
var RADIUS_BOX_MARGIN_RADIANS = 1e-9;
|
|
23
|
-
var VINCENTY_MAX_ITERATIONS = 200;
|
|
24
|
-
var VINCENTY_CONVERGENCE_THRESHOLD = 1e-12;
|
|
8
|
+
import { tokenize, resolveStopWords, transformToken, visitTokens, visitSurfaceSpellings } from './chunk-A4L7YTKX.mjs';
|
|
9
|
+
import { EARLIER_RELEASE_MIN_M, MIN_M, MAX_M } from './chunk-ZXX5GZEX.mjs';
|
|
10
|
+
import { NarsilError, ErrorCodes } from './chunk-MP7ABPTD.mjs';
|
|
11
|
+
import { compareCodePoints, codePointCount, holdsUnpairedSurrogate, exceedsCodePoints } from './chunk-TBC3XUL2.mjs';
|
|
25
12
|
|
|
26
13
|
// src/geo/coordinates.ts
|
|
27
14
|
function isLatitude(value) {
|
|
@@ -1445,4 +1432,4 @@ var partialWordSearchModule = {
|
|
|
1445
1432
|
highlightWords: partialWordsToHighlight
|
|
1446
1433
|
};
|
|
1447
1434
|
|
|
1448
|
-
export {
|
|
1435
|
+
export { expandTermPrefix, getFlatSchema, getNestedValue, getOrCreateFieldNameIndex, isLatitude, isLongitude, isQuantizationMode, isStorageMode, messagePackUpperBoundBytes, parseVectorDimension, partialWordSearchModule, partitionDocumentFrequency, raiseEarlierReleaseGraphSetting, requireDocumentWithinSizeLimit, sameFields, suggestDisplayTerms, textFieldsChanged, tokenizeOptions, validateDocument, validateDocumentStrict, validateRequiredFields, validateTextStorage, validateVectorPromotion, validateVectorStorage, visitDocumentSpellings, visitDocumentSurfaceSpellings };
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
// src/persistence/durability/sha256.ts
|
|
2
|
+
var ROUND_CONSTANTS = new Uint32Array([
|
|
3
|
+
1116352408,
|
|
4
|
+
1899447441,
|
|
5
|
+
3049323471,
|
|
6
|
+
3921009573,
|
|
7
|
+
961987163,
|
|
8
|
+
1508970993,
|
|
9
|
+
2453635748,
|
|
10
|
+
2870763221,
|
|
11
|
+
3624381080,
|
|
12
|
+
310598401,
|
|
13
|
+
607225278,
|
|
14
|
+
1426881987,
|
|
15
|
+
1925078388,
|
|
16
|
+
2162078206,
|
|
17
|
+
2614888103,
|
|
18
|
+
3248222580,
|
|
19
|
+
3835390401,
|
|
20
|
+
4022224774,
|
|
21
|
+
264347078,
|
|
22
|
+
604807628,
|
|
23
|
+
770255983,
|
|
24
|
+
1249150122,
|
|
25
|
+
1555081692,
|
|
26
|
+
1996064986,
|
|
27
|
+
2554220882,
|
|
28
|
+
2821834349,
|
|
29
|
+
2952996808,
|
|
30
|
+
3210313671,
|
|
31
|
+
3336571891,
|
|
32
|
+
3584528711,
|
|
33
|
+
113926993,
|
|
34
|
+
338241895,
|
|
35
|
+
666307205,
|
|
36
|
+
773529912,
|
|
37
|
+
1294757372,
|
|
38
|
+
1396182291,
|
|
39
|
+
1695183700,
|
|
40
|
+
1986661051,
|
|
41
|
+
2177026350,
|
|
42
|
+
2456956037,
|
|
43
|
+
2730485921,
|
|
44
|
+
2820302411,
|
|
45
|
+
3259730800,
|
|
46
|
+
3345764771,
|
|
47
|
+
3516065817,
|
|
48
|
+
3600352804,
|
|
49
|
+
4094571909,
|
|
50
|
+
275423344,
|
|
51
|
+
430227734,
|
|
52
|
+
506948616,
|
|
53
|
+
659060556,
|
|
54
|
+
883997877,
|
|
55
|
+
958139571,
|
|
56
|
+
1322822218,
|
|
57
|
+
1537002063,
|
|
58
|
+
1747873779,
|
|
59
|
+
1955562222,
|
|
60
|
+
2024104815,
|
|
61
|
+
2227730452,
|
|
62
|
+
2361852424,
|
|
63
|
+
2428436474,
|
|
64
|
+
2756734187,
|
|
65
|
+
3204031479,
|
|
66
|
+
3329325298
|
|
67
|
+
]);
|
|
68
|
+
var SHA256_INITIAL_STATE = [
|
|
69
|
+
1779033703,
|
|
70
|
+
3144134277,
|
|
71
|
+
1013904242,
|
|
72
|
+
2773480762,
|
|
73
|
+
1359893119,
|
|
74
|
+
2600822924,
|
|
75
|
+
528734635,
|
|
76
|
+
1541459225
|
|
77
|
+
];
|
|
78
|
+
var SHA256_BLOCK_BYTES = 64;
|
|
79
|
+
var LENGTH_BYTES = 8;
|
|
80
|
+
function rotateRight(value, bits) {
|
|
81
|
+
return value >>> bits | value << 32 - bits;
|
|
82
|
+
}
|
|
83
|
+
function paddedSha256Message(bytes, precedingBytes = 0) {
|
|
84
|
+
const total = Math.ceil((bytes.byteLength + 1 + LENGTH_BYTES) / SHA256_BLOCK_BYTES) * SHA256_BLOCK_BYTES;
|
|
85
|
+
const message = new Uint8Array(total);
|
|
86
|
+
message.set(bytes);
|
|
87
|
+
message[bytes.byteLength] = 128;
|
|
88
|
+
const view = new DataView(message.buffer);
|
|
89
|
+
const bitLength = (precedingBytes + bytes.byteLength) * 8;
|
|
90
|
+
view.setUint32(total - LENGTH_BYTES, Math.floor(bitLength / 4294967296), false);
|
|
91
|
+
view.setUint32(total - 4, bitLength >>> 0, false);
|
|
92
|
+
return view;
|
|
93
|
+
}
|
|
94
|
+
function compressSha256Block(state, view, block, words) {
|
|
95
|
+
for (let i = 0; i < 16; i++) words[i] = view.getUint32(block + i * 4, false);
|
|
96
|
+
for (let i = 16; i < 64; i++) {
|
|
97
|
+
const w15 = words[i - 15];
|
|
98
|
+
const w2 = words[i - 2];
|
|
99
|
+
const s0 = rotateRight(w15, 7) ^ rotateRight(w15, 18) ^ w15 >>> 3;
|
|
100
|
+
const s1 = rotateRight(w2, 17) ^ rotateRight(w2, 19) ^ w2 >>> 10;
|
|
101
|
+
words[i] = words[i - 16] + s0 + words[i - 7] + s1 >>> 0;
|
|
102
|
+
}
|
|
103
|
+
let a = state[0];
|
|
104
|
+
let b = state[1];
|
|
105
|
+
let c = state[2];
|
|
106
|
+
let d = state[3];
|
|
107
|
+
let e = state[4];
|
|
108
|
+
let f = state[5];
|
|
109
|
+
let g = state[6];
|
|
110
|
+
let h = state[7];
|
|
111
|
+
for (let i = 0; i < 64; i++) {
|
|
112
|
+
const s1 = rotateRight(e, 6) ^ rotateRight(e, 11) ^ rotateRight(e, 25);
|
|
113
|
+
const choice = e & f ^ ~e & g;
|
|
114
|
+
const t1 = h + s1 + choice + ROUND_CONSTANTS[i] + words[i] >>> 0;
|
|
115
|
+
const s0 = rotateRight(a, 2) ^ rotateRight(a, 13) ^ rotateRight(a, 22);
|
|
116
|
+
const majority = a & b ^ a & c ^ b & c;
|
|
117
|
+
const t2 = s0 + majority >>> 0;
|
|
118
|
+
h = g;
|
|
119
|
+
g = f;
|
|
120
|
+
f = e;
|
|
121
|
+
e = d + t1 >>> 0;
|
|
122
|
+
d = c;
|
|
123
|
+
c = b;
|
|
124
|
+
b = a;
|
|
125
|
+
a = t1 + t2 >>> 0;
|
|
126
|
+
}
|
|
127
|
+
state[0] = state[0] + a >>> 0;
|
|
128
|
+
state[1] = state[1] + b >>> 0;
|
|
129
|
+
state[2] = state[2] + c >>> 0;
|
|
130
|
+
state[3] = state[3] + d >>> 0;
|
|
131
|
+
state[4] = state[4] + e >>> 0;
|
|
132
|
+
state[5] = state[5] + f >>> 0;
|
|
133
|
+
state[6] = state[6] + g >>> 0;
|
|
134
|
+
state[7] = state[7] + h >>> 0;
|
|
135
|
+
}
|
|
136
|
+
function sha256Digest(state) {
|
|
137
|
+
const digest = new Uint8Array(32);
|
|
138
|
+
const out = new DataView(digest.buffer);
|
|
139
|
+
for (let i = 0; i < 8; i++) out.setUint32(i * 4, state[i], false);
|
|
140
|
+
return digest;
|
|
141
|
+
}
|
|
142
|
+
function sha256(bytes) {
|
|
143
|
+
const view = paddedSha256Message(bytes);
|
|
144
|
+
const state = Uint32Array.from(SHA256_INITIAL_STATE);
|
|
145
|
+
const words = new Uint32Array(64);
|
|
146
|
+
for (let block = 0; block < view.byteLength; block += SHA256_BLOCK_BYTES)
|
|
147
|
+
compressSha256Block(state, view, block, words);
|
|
148
|
+
return sha256Digest(state);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export { SHA256_BLOCK_BYTES, SHA256_INITIAL_STATE, compressSha256Block, paddedSha256Message, sha256, sha256Digest };
|
|
@@ -39,6 +39,7 @@ var ErrorCodes = {
|
|
|
39
39
|
SYNC_NOT_READY: "SYNC_NOT_READY",
|
|
40
40
|
SYNC_NOT_ENABLED: "SYNC_NOT_ENABLED",
|
|
41
41
|
SYNC_SNAPSHOT_PREPARING: "SYNC_SNAPSHOT_PREPARING",
|
|
42
|
+
QUERY_SUGGESTIONS_NOT_ENABLED: "QUERY_SUGGESTIONS_NOT_ENABLED",
|
|
42
43
|
SEARCH_INVALID_FIELD: "SEARCH_INVALID_FIELD",
|
|
43
44
|
VECTOR_DIMENSION_MISMATCH: "VECTOR_DIMENSION_MISMATCH",
|
|
44
45
|
SEARCH_INVALID_FILTER: "SEARCH_INVALID_FILTER",
|