@kedem/okdb 3.0.0 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/CHANGELOG.md +114 -3
  2. package/README.md +72 -36
  3. package/bin/okdb +1 -1
  4. package/docs/auth-and-sync.md +30 -24
  5. package/docs/auth-permissions.md +5 -4
  6. package/docs/c-bridge.md +94 -0
  7. package/docs/change-log.md +79 -36
  8. package/docs/data-model.md +35 -9
  9. package/docs/deployment.md +42 -38
  10. package/docs/diagnostics.md +61 -125
  11. package/docs/embeddings.md +143 -51
  12. package/docs/encryption.md +132 -0
  13. package/docs/files.md +64 -27
  14. package/docs/fts.md +48 -23
  15. package/docs/functions.md +109 -56
  16. package/docs/getting-started.md +121 -9
  17. package/docs/http-api.md +66 -11
  18. package/docs/http-cluster.md +80 -88
  19. package/docs/index.md +33 -15
  20. package/docs/indexes.md +53 -17
  21. package/docs/licensing.md +19 -5
  22. package/docs/logging.md +11 -22
  23. package/docs/manifest.json +6 -3
  24. package/docs/migration.md +41 -16
  25. package/docs/pipelines.md +111 -46
  26. package/docs/plugins.md +47 -15
  27. package/docs/process-registry.md +23 -24
  28. package/docs/processors.md +26 -23
  29. package/docs/querying.md +102 -29
  30. package/docs/queue.md +165 -51
  31. package/docs/resolved-fields.md +24 -1
  32. package/docs/subscriptions.md +4 -4
  33. package/docs/sync.md +9 -6
  34. package/docs/time-machine.md +52 -14
  35. package/docs/transactions.md +63 -15
  36. package/docs/ttl.md +34 -13
  37. package/docs/upgrade-2.0.md +32 -15
  38. package/docs/upgrade-2.1.md +10 -12
  39. package/docs/upgrade-3.0.md +144 -0
  40. package/docs/views.md +165 -61
  41. package/index.js +1 -1
  42. package/native/linux-x64-gnu/okdb +0 -0
  43. package/native/linux-x64-gnu/okdb-node.linux-x64-gnu.node +0 -0
  44. package/native-loader.js +1 -1
  45. package/okdb-native.js +1 -1
  46. package/package.json +1 -1
  47. package/public/features/files/parts/files-blob-status.ok.js +1 -1
  48. package/types/environment.d.ts +32 -11
  49. package/types/errors.d.ts +20 -0
  50. package/types/features/admin.d.ts +3 -5
  51. package/types/features/api.d.ts +5 -7
  52. package/types/features/embeddings.d.ts +8 -7
  53. package/types/features/engines.d.ts +9 -1
  54. package/types/features/files.d.ts +2 -1
  55. package/types/features/fts.d.ts +3 -3
  56. package/types/features/functions.d.ts +14 -8
  57. package/types/features/pipelines.d.ts +10 -10
  58. package/types/features/queue.d.ts +15 -10
  59. package/types/features/sync.d.ts +7 -0
  60. package/types/features/time-machine.d.ts +3 -0
  61. package/types/index.d.ts +3 -0
  62. package/types/okdb.d.ts +70 -7
  63. package/types/options.d.ts +12 -8
  64. package/docs/OKDB-ARCHITECTURE.md +0 -1061
package/index.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0xc49158=_0x299a;(function(_0xe289e1,_0x577bf9){const _0x495766=_0x299a,_0xf456b1=_0xe289e1();while(!![]){try{const _0x5e10e0=parseInt(_0x495766(0xa5))/0x1+-parseInt(_0x495766(0xa4))/0x2+-parseInt(_0x495766(0x86))/0x3+-parseInt(_0x495766(0x8f))/0x4*(-parseInt(_0x495766(0x92))/0x5)+parseInt(_0x495766(0x84))/0x6+-parseInt(_0x495766(0x87))/0x7+-parseInt(_0x495766(0x9b))/0x8*(-parseInt(_0x495766(0x9e))/0x9);if(_0x5e10e0===_0x577bf9)break;else _0xf456b1['push'](_0xf456b1['shift']());}catch(_0xf0e741){_0xf456b1['push'](_0xf456b1['shift']());}}}(_0x1ceb,0xa840b));const loader=require('./native-loader.js'),p=loader[_0xc49158(0x9d)]();if(!p['ok']){const e=new Error(p['unsupported']?_0xc49158(0x97)+p['reason']+_0xc49158(0xa1)+_0xc49158(0xa7):_0xc49158(0x97)+p[_0xc49158(0x88)]+_0xc49158(0x8d)+_0xc49158(0x9a));e[_0xc49158(0x95)]=_0xc49158(0x94);if(p['error'])e[_0xc49158(0x8e)]=p[_0xc49158(0xa0)];throw e;}function _0x299a(_0x3b1a32,_0x341803){_0x3b1a32=_0x3b1a32-0x7f;const _0x1ceb2a=_0x1ceb();let _0x299a3b=_0x1ceb2a[_0x3b1a32];return _0x299a3b;}if(process.env.OKDB_NATIVE_DEBUG)process[_0xc49158(0x98)][_0xc49158(0x82)](_0xc49158(0x81)+p[_0xc49158(0xa2)]+'\x20('+p['source']+')\x20'+p[_0xc49158(0x90)]+'\x0a');{const path=require(_0xc49158(0x8b)),fs=require(_0xc49158(0x83));for(const [k,rel]of[[_0xc49158(0x89),_0xc49158(0x9c)],[_0xc49158(0x96),_0xc49158(0xa6)]]){const d=path[_0xc49158(0xa3)](__dirname,rel);if(!process.env[k]&&fs[_0xc49158(0x93)](d))process.env[k]=d;}}function _0x1ceb(){const _0x5ef682=['stderr','./okdb-native.js','native/),\x20or\x20set\x20OKDB_NATIVE_BINARY\x20to\x20an\x20okdb-node\x20.node\x20file.','729152jLSTWK','public','probe','72ElQFOB','prototype','error','.\x20okdb\x203.x\x20has\x20no\x20JavaScript\x20fallback:\x20run\x20it\x20on\x20Linux\x20x64\x20','key','join','2056834yUcRcc','627240WSJlST','docs','(glibc),\x20or\x20stay\x20on\x20okdb\x202.x\x20on\x20this\x20platform.\x20OKDB_NATIVE_BINARY=<okdb-node\x20.node>\x20loads\x20a\x20build\x20you\x20made\x20yourself.','native','implementation','[okdb]\x20native\x20core:\x20','write','node:fs','4969764ybhurH','call','1226532FtETlt','4627504meFBsA','reason','OKDB_ADMIN_PUBLIC_DIR','nativeBinaryPath','node:path','hasOwnProperty','.\x20Reinstall\x20@kedem/okdb\x20(the\x20addon\x20ships\x20inside\x20the\x20package\x20under\x20','cause','18548IfzUmK','path','defineProperty','650SgTsBS','existsSync','NATIVE_UNAVAILABLE','code','OKDB_DOCS_DIR','okdb:\x20the\x20native\x20core\x20is\x20unavailable\x20—\x20'];_0x1ceb=function(){return _0x5ef682;};return _0x1ceb();}const OKDB=require(_0xc49158(0x99));module['exports']=OKDB,Object[_0xc49158(0x91)](OKDB,_0xc49158(0x80),{'value':_0xc49158(0x7f),'enumerable':![],'configurable':!![]});if(!Object[_0xc49158(0x9f)][_0xc49158(0x8c)][_0xc49158(0x85)](OKDB,_0xc49158(0x8a)))Object[_0xc49158(0x91)](OKDB,'nativeBinaryPath',{'value':p[_0xc49158(0x90)],'enumerable':![],'configurable':!![]});
1
+ 'use strict';const _0x5f4eba=_0x2399;(function(_0x520d35,_0x331dda){const _0x55c99c=_0x2399,_0x15fd9c=_0x520d35();while(!![]){try{const _0x2513f4=-parseInt(_0x55c99c(0xff))/0x1+-parseInt(_0x55c99c(0xf3))/0x2*(parseInt(_0x55c99c(0x106))/0x3)+-parseInt(_0x55c99c(0x116))/0x4+parseInt(_0x55c99c(0x108))/0x5*(parseInt(_0x55c99c(0xf4))/0x6)+-parseInt(_0x55c99c(0x10d))/0x7+-parseInt(_0x55c99c(0xfc))/0x8+parseInt(_0x55c99c(0x10a))/0x9;if(_0x2513f4===_0x331dda)break;else _0x15fd9c['push'](_0x15fd9c['shift']());}catch(_0x196a19){_0x15fd9c['push'](_0x15fd9c['shift']());}}}(_0x2ca6,0x9f1b8));function _0x2399(_0x5d66ca,_0x17d434){_0x5d66ca=_0x5d66ca-0xf2;const _0x2ca6ac=_0x2ca6();let _0x239987=_0x2ca6ac[_0x5d66ca];return _0x239987;}const loader=require(_0x5f4eba(0x105)),p=loader[_0x5f4eba(0xf7)]();if(!p['ok']){const e=new Error(p[_0x5f4eba(0x10b)]?_0x5f4eba(0x110)+p[_0x5f4eba(0x109)]+_0x5f4eba(0xf5)+_0x5f4eba(0x117):_0x5f4eba(0x110)+p[_0x5f4eba(0x109)]+_0x5f4eba(0x113)+_0x5f4eba(0x10e));e[_0x5f4eba(0xfa)]=_0x5f4eba(0x10c);if(p['error'])e['cause']=p[_0x5f4eba(0xf9)];throw e;}if(process.env.OKDB_NATIVE_DEBUG)process[_0x5f4eba(0x100)][_0x5f4eba(0x107)]('[okdb]\x20native\x20core:\x20'+p[_0x5f4eba(0x10f)]+'\x20('+p[_0x5f4eba(0x115)]+')\x20'+p[_0x5f4eba(0xfe)]+'\x0a');{const path=require(_0x5f4eba(0x114)),fs=require('node:fs');for(const [k,rel]of[[_0x5f4eba(0xf2),_0x5f4eba(0xfb)],[_0x5f4eba(0xf8),'docs']]){const d=path[_0x5f4eba(0x111)](__dirname,rel);if(!process.env[k]&&fs['existsSync'](d))process.env[k]=d;}}function _0x2ca6(){const _0x2e637b=['key','okdb:\x20the\x20native\x20core\x20is\x20unavailable\x20—\x20','join','call','.\x20Reinstall\x20@kedem/okdb\x20(the\x20addon\x20ships\x20inside\x20the\x20package\x20under\x20','node:path','source','4706500TZkguR','(glibc),\x20or\x20stay\x20on\x20okdb\x202.x\x20on\x20this\x20platform.\x20OKDB_NATIVE_BINARY=<okdb-node\x20.node>\x20loads\x20a\x20build\x20you\x20made\x20yourself.','OKDB_ADMIN_PUBLIC_DIR','4EzIbHe','7459566cJNrAy','.\x20okdb\x203.x\x20has\x20no\x20JavaScript\x20fallback:\x20run\x20it\x20on\x20Linux\x20x64\x20','native','probe','OKDB_DOCS_DIR','error','code','public','463528QWgrWO','defineProperty','path','1196929DZmxFx','stderr','exports','nativeBinaryPath','./okdb-native.js','hasOwnProperty','./native-loader.js','907716dsEWuq','write','5wxltyv','reason','24137595MrCQxB','unsupported','NATIVE_UNAVAILABLE','1658111srmvBw','native/),\x20or\x20set\x20OKDB_NATIVE_BINARY\x20to\x20an\x20okdb-node\x20.node\x20file.'];_0x2ca6=function(){return _0x2e637b;};return _0x2ca6();}const OKDB=require(_0x5f4eba(0x103));module[_0x5f4eba(0x101)]=OKDB,Object[_0x5f4eba(0xfd)](OKDB,'implementation',{'value':_0x5f4eba(0xf6),'enumerable':![],'configurable':!![]});if(!Object['prototype'][_0x5f4eba(0x104)][_0x5f4eba(0x112)](OKDB,_0x5f4eba(0x102)))Object[_0x5f4eba(0xfd)](OKDB,'nativeBinaryPath',{'value':p[_0x5f4eba(0xfe)],'enumerable':![],'configurable':!![]});
Binary file
package/native-loader.js CHANGED
@@ -1 +1 @@
1
- 'use strict';const _0x4c4a16=_0x16a7;(function(_0x232305,_0xebbbff){const _0x13f677=_0x16a7,_0x490507=_0x232305();while(!![]){try{const _0x59429f=parseInt(_0x13f677(0x107))/0x1*(-parseInt(_0x13f677(0x108))/0x2)+-parseInt(_0x13f677(0x11b))/0x3*(-parseInt(_0x13f677(0x10d))/0x4)+parseInt(_0x13f677(0x132))/0x5*(parseInt(_0x13f677(0xf8))/0x6)+-parseInt(_0x13f677(0x130))/0x7*(-parseInt(_0x13f677(0xfd))/0x8)+parseInt(_0x13f677(0xee))/0x9+-parseInt(_0x13f677(0x119))/0xa*(-parseInt(_0x13f677(0x115))/0xb)+-parseInt(_0x13f677(0xfc))/0xc*(parseInt(_0x13f677(0x103))/0xd);if(_0x59429f===_0xebbbff)break;else _0x490507['push'](_0x490507['shift']());}catch(_0x1f8197){_0x490507['push'](_0x490507['shift']());}}}(_0x5834,0xde79e));const fs=require('node:fs'),path=require(_0x4c4a16(0x12a)),SCOPE=_0x4c4a16(0x117),PREFIX=_0x4c4a16(0xef),BUNDLED_DIR='native',KEYS=['linux-x64-gnu',_0x4c4a16(0x126),_0x4c4a16(0xf9),_0x4c4a16(0x120)];function isMusl(){const _0xa02c6c=_0x4c4a16;try{const _0x2510d0=process[_0xa02c6c(0x131)]&&process[_0xa02c6c(0x131)]['getReport']&&process[_0xa02c6c(0x131)][_0xa02c6c(0xf3)]();if(_0x2510d0&&_0x2510d0['header'])return!_0x2510d0[_0xa02c6c(0xfe)][_0xa02c6c(0x125)];}catch{}try{return fs[_0xa02c6c(0x124)](_0xa02c6c(0x12c),_0xa02c6c(0x111))['includes']('musl');}catch{}try{return require('node:child_process')[_0xa02c6c(0xfb)]('ldd\x20--version\x202>&1\x20||\x20true',{'encoding':'utf8'})['includes'](_0xa02c6c(0xf1));}catch{return![];}}function host(){const _0x41d4e9=_0x4c4a16,_0x4bdfd1=process.env.OKDB_NATIVE_PLATFORM;if(_0x4bdfd1){const [_0x5baba2,_0x515041,_0x58f2c0]=_0x4bdfd1[_0x41d4e9(0x12e)]('-');return{'platform':_0x5baba2,'arch':_0x515041,'libc':_0x5baba2===_0x41d4e9(0xf5)?_0x58f2c0===_0x41d4e9(0xf1)?'musl':_0x41d4e9(0x109):null};}const _0xd76484=process[_0x41d4e9(0x11c)];return{'platform':_0xd76484,'arch':process[_0x41d4e9(0x100)],'libc':_0xd76484===_0x41d4e9(0xf5)?isMusl()?_0x41d4e9(0xf1):_0x41d4e9(0x109):null};}function describeHost(){const _0x5c6d9f=_0x4c4a16,_0x52d5cf=host();return[_0x52d5cf['platform'],_0x52d5cf[_0x5c6d9f(0x100)],_0x52d5cf[_0x5c6d9f(0x122)]][_0x5c6d9f(0x101)](Boolean)[_0x5c6d9f(0x102)]('/');}function platformKey(){const _0x10da71=_0x4c4a16,_0x17092f=host();if(_0x17092f[_0x10da71(0x11c)]!==_0x10da71(0xf5))return null;const _0x32bb59=_0x17092f[_0x10da71(0x100)]===_0x10da71(0x114)?_0x10da71(0x114):_0x17092f['arch']==='arm64'?_0x10da71(0x135):null;if(!_0x32bb59)return null;return _0x10da71(0x10b)+_0x32bb59+'-'+(_0x17092f[_0x10da71(0x122)]===_0x10da71(0xf1)?_0x10da71(0xf1):'gnu');}function _0x5834(){const _0x3da756=['env','mod','message','okdb','12547647WsmDHD','native','this\x20package\x20has\x20no\x20','musl','cli','getReport','package','linux','realpathSync','\x20(a\x20build\x20without\x20the\x20','5336382MbiTJA','linux-x64-musl','bin','execSync','12JNQZWH','32kRcqeH','header','\x20failed:\x20','arch','filter','join','43463797GngzMN','\x20(a\x20build\x20without\x20it)','error','launcher','1lhhIFv','1822666cbAaGv','glibc','okdb-node.','linux-','function','19284kACKnl','replace','path','length','utf8','resolve','OKDB_NATIVE_BINARY','x64','7799BdeENn','\x20(this\x20package\x20bundles:\x20','@okdb','\x20points\x20to\x20a\x20missing\x20file:\x20','1510ukAyVX','code','1059cZcjga','platform','bindingVersion','unsupported','reason','linux-arm64-musl','existsSync','libc','readdirSync','readFileSync','glibcVersionRuntime','linux-arm64-gnu','includes',':\x20okdb\x203.0\x20ships\x20Linux\x20x64\x20(glibc)\x20only','addon','node:path','loading\x20','/usr/bin/ldd','key','split','source','1878646Lmwary','report','5OkPvoU','dirname','.node','arm64'];_0x5834=function(){return _0x3da756;};return _0x5834();}function packageName(_0x1325e0){return SCOPE+'/'+PREFIX+'-'+_0x1325e0;}function bundledKeys(){const _0x3304e3=_0x4c4a16;try{return fs[_0x3304e3(0x123)](path[_0x3304e3(0x102)](__dirname,BUNDLED_DIR))['filter'](_0x2065b9=>fs[_0x3304e3(0x121)](path['join'](__dirname,BUNDLED_DIR,_0x2065b9,_0x3304e3(0x10a)+_0x2065b9+_0x3304e3(0x134))))['sort']();}catch{return[];}}function _0x16a7(_0x50455b,_0x5588fb){_0x50455b=_0x50455b-0xec;const _0x583483=_0x5834();let _0x16a77=_0x583483[_0x50455b];return _0x16a77;}function bundledPath(_0x4469ff,_0x342992){const _0x10b23c=_0x4c4a16;if(_0x342992===_0x10b23c(0xf2))_0x342992=_0x10b23c(0x106);return path[_0x10b23c(0x102)](__dirname,BUNDLED_DIR,_0x4469ff,_0x342992==='addon'?_0x10b23c(0x10a)+_0x4469ff+'.node':_0x10b23c(0xed));}function fromPackage(_0x4c01f4,_0x550790){const _0x36574a=_0x4c4a16;let _0x44eae5;try{_0x44eae5=require['resolve'](packageName(_0x4c01f4)+'/package.json',{'paths':[__dirname]});}catch{return null;}const _0x23fe93=path[_0x36574a(0x102)](path[_0x36574a(0x133)](_0x44eae5),_0x550790);return fs[_0x36574a(0x121)](_0x23fe93)?{'path':_0x23fe93}:{'installed':!![]};}function unsupported(){const _0x5a7265=_0x4c4a16,_0x2f29ef=bundledKeys();return'no\x20native\x20build\x20for\x20'+describeHost()+_0x5a7265(0x128)+(_0x5a7265(0x116)+(_0x2f29ef[_0x5a7265(0x110)]?_0x2f29ef[_0x5a7265(0x102)](',\x20'):'nothing')+')');}function locate(_0x1d8696){const _0x5dfd6a=_0x4c4a16;if(_0x1d8696===_0x5dfd6a(0xf2))_0x1d8696=_0x5dfd6a(0x106);const _0x288d6f=platformKey(),_0x30de41=_0x1d8696===_0x5dfd6a(0x129)?process.env.OKDB_NATIVE_BINARY:process.env.OKDB_NATIVE_CLI;if(_0x30de41)return fs[_0x5dfd6a(0x121)](_0x30de41)?{'path':_0x30de41,'key':_0x288d6f,'source':_0x5dfd6a(0x136)}:{'path':null,'key':_0x288d6f,'reason':(_0x1d8696==='addon'?_0x5dfd6a(0x113):'OKDB_NATIVE_CLI')+_0x5dfd6a(0x118)+_0x30de41};if(!_0x288d6f)return{'path':null,'key':_0x288d6f,'unsupported':!![],'reason':unsupported()};const _0x271133=bundledPath(_0x288d6f,_0x1d8696);if(fs[_0x5dfd6a(0x121)](_0x271133))return{'path':_0x271133,'key':_0x288d6f,'source':'bundled'};const _0x456e0f=_0x1d8696===_0x5dfd6a(0x129)?_0x5dfd6a(0x10a)+_0x288d6f+_0x5dfd6a(0x134):path[_0x5dfd6a(0x102)](_0x5dfd6a(0xfa),_0x5dfd6a(0xed)),_0x547218=fromPackage(_0x288d6f,_0x456e0f);if(_0x547218&&_0x547218[_0x5dfd6a(0x10f)])return{'path':_0x547218[_0x5dfd6a(0x10f)],'key':_0x288d6f,'source':_0x5dfd6a(0xf4)};if(_0x547218)return{'path':null,'key':_0x288d6f,'reason':packageName(_0x288d6f)+'\x20is\x20installed\x20but\x20has\x20no\x20'+_0x456e0f[_0x5dfd6a(0x10e)](/\\/g,'/')+_0x5dfd6a(0x104)};if(bundledKeys()[_0x5dfd6a(0x127)](_0x288d6f))return{'path':null,'key':_0x288d6f,'reason':_0x5dfd6a(0xf0)+path['relative'](__dirname,_0x271133)['replace'](/\\/g,'/')+_0x5dfd6a(0xf7)+_0x1d8696+')'};return{'path':null,'key':_0x288d6f,'unsupported':!![],'reason':unsupported()};}let cached=null;function probe(){const _0x42cc38=_0x4c4a16;if(cached)return cached;const _0x2cec2b=locate(_0x42cc38(0x129));if(!_0x2cec2b[_0x42cc38(0x10f)])return cached={'ok':![],'reason':_0x2cec2b[_0x42cc38(0x11f)],'unsupported':!!_0x2cec2b[_0x42cc38(0x11e)]};try{const _0x220698=require(_0x2cec2b[_0x42cc38(0x10f)]),_0x298274=typeof _0x220698[_0x42cc38(0x11d)]===_0x42cc38(0x10c)?_0x220698['bindingVersion']():null;return cached={'ok':!![],'mod':_0x220698,'path':_0x2cec2b['path'],'key':_0x2cec2b[_0x42cc38(0x12d)],'source':_0x2cec2b[_0x42cc38(0x12f)],'bindingVersion':_0x298274};}catch(_0x3c933e){return cached={'ok':![],'reason':_0x42cc38(0x12b)+_0x2cec2b[_0x42cc38(0x10f)]+_0x42cc38(0xff)+(_0x3c933e&&_0x3c933e[_0x42cc38(0xec)]),'error':_0x3c933e};}}function load(){const _0x5dc41b=_0x4c4a16,_0xab20cf=probe();if(_0xab20cf['ok'])return _0xab20cf[_0x5dc41b(0x137)];const _0x1d0934=new Error('okdb:\x20native\x20core\x20unavailable\x20—\x20'+_0xab20cf['reason']);_0x1d0934[_0x5dc41b(0x11a)]='NATIVE_BINARY_MISSING';if(_0xab20cf[_0x5dc41b(0x105)])_0x1d0934['cause']=_0xab20cf[_0x5dc41b(0x105)];throw _0x1d0934;}function loadedPath(){const _0x3ea434=_0x4c4a16;if(!cached||!cached['ok'])return null;try{return fs[_0x3ea434(0xf6)](cached[_0x3ea434(0x10f)]);}catch{return path[_0x3ea434(0x112)](cached[_0x3ea434(0x10f)]);}}module['exports']={'load':load,'loadedPath':loadedPath,'probe':probe,'locate':locate,'platformKey':platformKey,'describeHost':describeHost,'bundledKeys':bundledKeys,'bundledPath':bundledPath,'packageName':packageName,'isMusl':isMusl,'KEYS':KEYS,'BUNDLED_DIR':BUNDLED_DIR};
1
+ 'use strict';const _0xc25bbd=_0x41a4;(function(_0x557a30,_0x343a2e){const _0x575620=_0x41a4,_0x398eee=_0x557a30();while(!![]){try{const _0x59db9f=-parseInt(_0x575620(0xec))/0x1+-parseInt(_0x575620(0xb3))/0x2+parseInt(_0x575620(0xd2))/0x3+parseInt(_0x575620(0xd0))/0x4+-parseInt(_0x575620(0xd6))/0x5*(-parseInt(_0x575620(0xc3))/0x6)+-parseInt(_0x575620(0xef))/0x7+-parseInt(_0x575620(0xbd))/0x8*(parseInt(_0x575620(0xb4))/0x9);if(_0x59db9f===_0x343a2e)break;else _0x398eee['push'](_0x398eee['shift']());}catch(_0x152cdf){_0x398eee['push'](_0x398eee['shift']());}}}(_0x3b33,0x736da));const fs=require('node:fs'),path=require(_0xc25bbd(0xdd)),SCOPE=_0xc25bbd(0xe5),PREFIX=_0xc25bbd(0xcf),BUNDLED_DIR=_0xc25bbd(0xcf),KEYS=[_0xc25bbd(0xbc),_0xc25bbd(0xce),'linux-x64-musl',_0xc25bbd(0xab)];function isMusl(){const _0x1337a9=_0xc25bbd;try{const _0x104fd8=process['report']&&process[_0x1337a9(0xd4)]['getReport']&&process['report'][_0x1337a9(0xb8)]();if(_0x104fd8&&_0x104fd8['header'])return!_0x104fd8['header'][_0x1337a9(0xc8)];}catch{}try{return fs[_0x1337a9(0xd3)](_0x1337a9(0xd9),_0x1337a9(0xeb))[_0x1337a9(0xb1)](_0x1337a9(0xe4));}catch{}try{return require(_0x1337a9(0xc0))[_0x1337a9(0xc5)](_0x1337a9(0xb9),{'encoding':_0x1337a9(0xeb)})['includes'](_0x1337a9(0xe4));}catch{return![];}}function host(){const _0x3ce539=_0xc25bbd,_0x24bf3e=process.env.OKDB_NATIVE_PLATFORM;if(_0x24bf3e){const [_0x9d38f5,_0x165682,_0x5d0b4a]=_0x24bf3e['split']('-');return{'platform':_0x9d38f5,'arch':_0x165682,'libc':_0x9d38f5===_0x3ce539(0xbf)?_0x5d0b4a==='musl'?_0x3ce539(0xe4):'glibc':null};}const _0x2e04f0=process[_0x3ce539(0xdf)];return{'platform':_0x2e04f0,'arch':process['arch'],'libc':_0x2e04f0===_0x3ce539(0xbf)?isMusl()?_0x3ce539(0xe4):_0x3ce539(0xa9):null};}function _0x41a4(_0x274e74,_0x539589){_0x274e74=_0x274e74-0xa8;const _0x3b3331=_0x3b33();let _0x41a4b6=_0x3b3331[_0x274e74];return _0x41a4b6;}function describeHost(){const _0x1e481a=_0xc25bbd,_0x55b924=host();return[_0x55b924[_0x1e481a(0xdf)],_0x55b924[_0x1e481a(0xb6)],_0x55b924[_0x1e481a(0xb2)]][_0x1e481a(0xb7)](Boolean)[_0x1e481a(0xf0)]('/');}function platformKey(){const _0x2caa3f=_0xc25bbd,_0x2828e5=host();if(_0x2828e5[_0x2caa3f(0xdf)]!==_0x2caa3f(0xbf))return null;const _0x46e975=_0x2828e5[_0x2caa3f(0xb6)]==='x64'?_0x2caa3f(0xaf):_0x2828e5[_0x2caa3f(0xb6)]==='arm64'?_0x2caa3f(0xba):null;if(!_0x46e975)return null;return _0x2caa3f(0xc9)+_0x46e975+'-'+(_0x2828e5[_0x2caa3f(0xb2)]===_0x2caa3f(0xe4)?'musl':'gnu');}function packageName(_0x6cd3cc){return SCOPE+'/'+PREFIX+'-'+_0x6cd3cc;}function bundledKeys(){const _0x9722f7=_0xc25bbd;try{return fs[_0x9722f7(0xca)](path[_0x9722f7(0xf0)](__dirname,BUNDLED_DIR))['filter'](_0x314b4b=>fs[_0x9722f7(0xaa)](path[_0x9722f7(0xf0)](__dirname,BUNDLED_DIR,_0x314b4b,_0x9722f7(0xae)+_0x314b4b+_0x9722f7(0xbe))))['sort']();}catch{return[];}}function bundledPath(_0x2187ca,_0x29191f){const _0x1c7441=_0xc25bbd;if(_0x29191f==='cli')_0x29191f=_0x1c7441(0xcc);return path[_0x1c7441(0xf0)](__dirname,BUNDLED_DIR,_0x2187ca,_0x29191f==='addon'?'okdb-node.'+_0x2187ca+_0x1c7441(0xbe):_0x1c7441(0xc6));}function fromPackage(_0x763f50,_0x8be564){const _0x52a0bf=_0xc25bbd;let _0x69c545;try{_0x69c545=require['resolve'](packageName(_0x763f50)+_0x52a0bf(0xc1),{'paths':[__dirname]});}catch{return null;}const _0x157c3b=path[_0x52a0bf(0xf0)](path[_0x52a0bf(0xe1)](_0x69c545),_0x8be564);return fs['existsSync'](_0x157c3b)?{'path':_0x157c3b}:{'installed':!![]};}function unsupported(){const _0x45da6b=_0xc25bbd,_0x10a045=bundledKeys();return _0x45da6b(0xdc)+describeHost()+':\x20okdb\x203.0\x20ships\x20Linux\x20x64\x20(glibc)\x20only'+(_0x45da6b(0xd7)+(_0x10a045['length']?_0x10a045[_0x45da6b(0xf0)](',\x20'):_0x45da6b(0xc7))+')');}function locate(_0x34baf1){const _0x35fdae=_0xc25bbd;if(_0x34baf1===_0x35fdae(0xa8))_0x34baf1='launcher';const _0x36022e=platformKey(),_0x4e68de=_0x34baf1===_0x35fdae(0xbb)?process.env.OKDB_NATIVE_BINARY:process.env.OKDB_NATIVE_CLI;if(_0x4e68de)return fs[_0x35fdae(0xaa)](_0x4e68de)?{'path':_0x4e68de,'key':_0x36022e,'source':_0x35fdae(0xe8)}:{'path':null,'key':_0x36022e,'reason':(_0x34baf1===_0x35fdae(0xbb)?_0x35fdae(0xd8):'OKDB_NATIVE_CLI')+_0x35fdae(0xe3)+_0x4e68de};if(!_0x36022e)return{'path':null,'key':_0x36022e,'unsupported':!![],'reason':unsupported()};const _0x2c616e=bundledPath(_0x36022e,_0x34baf1);if(fs[_0x35fdae(0xaa)](_0x2c616e))return{'path':_0x2c616e,'key':_0x36022e,'source':_0x35fdae(0xb5)};const _0x43c3ad=_0x34baf1==='addon'?'okdb-node.'+_0x36022e+_0x35fdae(0xbe):path[_0x35fdae(0xf0)](_0x35fdae(0xcd),_0x35fdae(0xc6)),_0x4992ee=fromPackage(_0x36022e,_0x43c3ad);if(_0x4992ee&&_0x4992ee['path'])return{'path':_0x4992ee[_0x35fdae(0xd1)],'key':_0x36022e,'source':_0x35fdae(0xee)};if(_0x4992ee)return{'path':null,'key':_0x36022e,'reason':packageName(_0x36022e)+_0x35fdae(0xcb)+_0x43c3ad[_0x35fdae(0xe6)](/\\/g,'/')+_0x35fdae(0xb0)};if(bundledKeys()[_0x35fdae(0xb1)](_0x36022e))return{'path':null,'key':_0x36022e,'reason':_0x35fdae(0xf1)+path[_0x35fdae(0xc2)](__dirname,_0x2c616e)[_0x35fdae(0xe6)](/\\/g,'/')+_0x35fdae(0xac)+_0x34baf1+')'};return{'path':null,'key':_0x36022e,'unsupported':!![],'reason':unsupported()};}let cached=null;function probe(){const _0x2c3e5c=_0xc25bbd;if(cached)return cached;const _0x53e066=locate('addon');if(!_0x53e066[_0x2c3e5c(0xd1)])return cached={'ok':![],'reason':_0x53e066[_0x2c3e5c(0xe9)],'unsupported':!!_0x53e066[_0x2c3e5c(0xed)]};try{const _0x30b830=require(_0x53e066['path']),_0xda081d=typeof _0x30b830[_0x2c3e5c(0xe0)]===_0x2c3e5c(0xdb)?_0x30b830['bindingVersion']():null;return cached={'ok':!![],'mod':_0x30b830,'path':_0x53e066[_0x2c3e5c(0xd1)],'key':_0x53e066[_0x2c3e5c(0xe2)],'source':_0x53e066['source'],'bindingVersion':_0xda081d};}catch(_0x2906c2){return cached={'ok':![],'reason':'loading\x20'+_0x53e066[_0x2c3e5c(0xd1)]+_0x2c3e5c(0xde)+(_0x2906c2&&_0x2906c2[_0x2c3e5c(0xad)]),'error':_0x2906c2};}}function load(){const _0x2e5cdd=_0xc25bbd,_0x5da53c=probe();if(_0x5da53c['ok'])return _0x5da53c['mod'];const _0x4199b2=new Error('okdb:\x20native\x20core\x20unavailable\x20—\x20'+_0x5da53c[_0x2e5cdd(0xe9)]);_0x4199b2['code']=_0x2e5cdd(0xe7);if(_0x5da53c['error'])_0x4199b2['cause']=_0x5da53c[_0x2e5cdd(0xc4)];throw _0x4199b2;}function loadedPath(){const _0x4861f6=_0xc25bbd;if(!cached||!cached['ok'])return null;try{return fs[_0x4861f6(0xea)](cached['path']);}catch{return path[_0x4861f6(0xd5)](cached[_0x4861f6(0xd1)]);}}module[_0xc25bbd(0xda)]={'load':load,'loadedPath':loadedPath,'probe':probe,'locate':locate,'platformKey':platformKey,'describeHost':describeHost,'bundledKeys':bundledKeys,'bundledPath':bundledPath,'packageName':packageName,'isMusl':isMusl,'KEYS':KEYS,'BUNDLED_DIR':BUNDLED_DIR};function _0x3b33(){const _0x5efa6b=['\x20is\x20installed\x20but\x20has\x20no\x20','launcher','bin','linux-arm64-gnu','native','2529824rmyOOi','path','423936QOLJyM','readFileSync','report','resolve','4405955lxuhOa','\x20(this\x20package\x20bundles:\x20','OKDB_NATIVE_BINARY','/usr/bin/ldd','exports','function','no\x20native\x20build\x20for\x20','node:path','\x20failed:\x20','platform','bindingVersion','dirname','key','\x20points\x20to\x20a\x20missing\x20file:\x20','musl','@okdb','replace','NATIVE_BINARY_MISSING','env','reason','realpathSync','utf8','768844XhIMEU','unsupported','package','1797852jfxNEM','join','this\x20package\x20has\x20no\x20','cli','glibc','existsSync','linux-arm64-musl','\x20(a\x20build\x20without\x20the\x20','message','okdb-node.','x64','\x20(a\x20build\x20without\x20it)','includes','libc','165044KLsnFH','665667vlfCmh','bundled','arch','filter','getReport','ldd\x20--version\x202>&1\x20||\x20true','arm64','addon','linux-x64-gnu','8IsXJxx','.node','linux','node:child_process','/package.json','relative','6lzpRAb','error','execSync','okdb','nothing','glibcVersionRuntime','linux-','readdirSync'];_0x3b33=function(){return _0x5efa6b;};return _0x3b33();}