@kedem/okdb 1.0.1 → 1.0.4

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 (142) hide show
  1. package/bin/okdb.js +1 -1
  2. package/keys/public.pem +3 -0
  3. package/okdb.js +1 -1
  4. package/package.json +2 -2
  5. package/public/admin-app.js +1 -1
  6. package/public/components/admin-route-host.ok.js +1 -1
  7. package/public/components/env-picker.ok.js +1 -1
  8. package/public/components/field-path-input.ok.js +1 -1
  9. package/public/components/field.html +154 -2
  10. package/public/components/geo-map.ok.js +1 -1
  11. package/public/components/ok-cron-input.ok.js +1 -1
  12. package/public/components/ok-dropzone.ok.js +1 -1
  13. package/public/components/ok-js-input.ok.js +1 -1
  14. package/public/components/ok-json-input.ok.js +1 -1
  15. package/public/components/ok-text-monaco-input.ok.js +1 -1
  16. package/public/components/theme-toggle.ok.js +1 -1
  17. package/public/index.html +29 -2
  18. package/public/layouts/_default.ok.html +1 -1
  19. package/public/layouts/okdb-cube.ok.html +1 -1
  20. package/public/login-app.js +1 -1
  21. package/public/login.html +205 -1
  22. package/public/modules/ok.js +1 -1
  23. package/public/sections/api/index.ok.html +1 -1
  24. package/public/sections/api/parts/api-endpoint.ok.js +1 -1
  25. package/public/sections/auth/index.ok.html +1 -1
  26. package/public/sections/auth/modals/create-token-modal.ok.js +1 -1
  27. package/public/sections/auth/modals/edit-token-modal.ok.js +1 -1
  28. package/public/sections/auth/modals/perm-info-popover.ok.js +1 -1
  29. package/public/sections/auth/parts/token-detail.ok.js +1 -1
  30. package/public/sections/auth/parts/token-list.ok.js +1 -1
  31. package/public/sections/db/index.ok.html +1 -1
  32. package/public/sections/db/modals/add-item-modal.ok.js +1 -1
  33. package/public/sections/db/modals/create-env-modal.ok.js +1 -1
  34. package/public/sections/db/modals/create-fts-modal.ok.js +1 -1
  35. package/public/sections/db/modals/create-index-modal.ok.js +1 -1
  36. package/public/sections/db/modals/create-pipeline-modal.ok.js +1 -1
  37. package/public/sections/db/modals/demo-env-modal.ok.js +1 -1
  38. package/public/sections/db/modals/remove-env-modal.ok.js +1 -1
  39. package/public/sections/db/modals/schema-edit-modal.ok.js +1 -1
  40. package/public/sections/db/parts/db-overview.ok.js +1 -1
  41. package/public/sections/db/parts/db-pipelines-panel.ok.js +1 -1
  42. package/public/sections/db/parts/edit-row.ok.js +1 -1
  43. package/public/sections/db/parts/tm-timeline.ok.js +1 -1
  44. package/public/sections/db/parts/type-changelog.ok.js +1 -1
  45. package/public/sections/db/parts/type-list.ok.js +1 -1
  46. package/public/sections/db/parts/type-pipelines-tab.ok.js +1 -1
  47. package/public/sections/db/parts/type-schema-tab.ok.js +1 -1
  48. package/public/sections/db/parts/type-viewer.ok.js +1 -1
  49. package/public/sections/db/parts/type-violations-tab.ok.js +1 -1
  50. package/public/sections/docs/index.ok.html +1 -1
  51. package/public/sections/embeddings/index.ok.html +1 -1
  52. package/public/sections/embeddings/modals/register-model-modal.ok.js +1 -1
  53. package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
  54. package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
  55. package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +1 -1
  56. package/public/sections/embeddings/parts/embed-engine-list.ok.js +1 -1
  57. package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
  58. package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +1 -1
  59. package/public/sections/embeddings/parts/embed-model-catalog.ok.js +1 -1
  60. package/public/sections/embeddings/parts/embed-overview.ok.js +1 -1
  61. package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
  62. package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
  63. package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +1 -1
  64. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  65. package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -1
  66. package/public/sections/engines/engine-panel-shared-style.js +1 -1
  67. package/public/sections/engines/engine-ui-utils.js +1 -1
  68. package/public/sections/engines/index.ok.html +1 -1
  69. package/public/sections/engines/modals/engine-modal.ok.js +1 -1
  70. package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
  71. package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
  72. package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
  73. package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
  74. package/public/sections/engines/parts/engine-row-item.ok.js +1 -1
  75. package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -1
  76. package/public/sections/files/index.ok.html +1 -1
  77. package/public/sections/files/parts/files-blob-status.ok.js +1 -1
  78. package/public/sections/files/parts/files-collection-list.ok.js +1 -1
  79. package/public/sections/files/parts/files-collection-panel.ok.js +1 -1
  80. package/public/sections/files/parts/files-file-list.ok.js +1 -1
  81. package/public/sections/files/parts/files-overview.ok.js +1 -1
  82. package/public/sections/files/parts/files-path-browser.ok.js +1 -1
  83. package/public/sections/files/parts/files-upload-panel.ok.js +1 -1
  84. package/public/sections/functions/index.ok.html +1 -1
  85. package/public/sections/functions/modals/function-modal.ok.js +1 -1
  86. package/public/sections/functions/parts/function-detail.ok.js +1 -1
  87. package/public/sections/functions/parts/function-logs.ok.js +1 -1
  88. package/public/sections/functions/parts/function-runner.ok.js +1 -1
  89. package/public/sections/functions/parts/functions-list.ok.js +1 -1
  90. package/public/sections/license/index.ok.html +1 -1
  91. package/public/sections/license/parts/license-panel.ok.js +1 -1
  92. package/public/sections/processors/index.ok.html +1 -1
  93. package/public/sections/queue/index.ok.html +1 -1
  94. package/public/sections/queue/modals/create-bucket-modal.ok.js +1 -1
  95. package/public/sections/queue/modals/edit-bucket-modal.ok.js +1 -1
  96. package/public/sections/queue/modals/edit-job-modal.ok.js +1 -1
  97. package/public/sections/queue/modals/enqueue-job-modal.ok.js +1 -1
  98. package/public/sections/queue/modals/job-type-modal.ok.js +1 -1
  99. package/public/sections/queue/parts/ok-job-form.ok.js +1 -1
  100. package/public/sections/queue/parts/queue-buckets.ok.js +1 -1
  101. package/public/sections/queue/parts/queue-job-types.ok.js +1 -1
  102. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  103. package/public/sections/queue/parts/queue-types.ok.js +1 -1
  104. package/public/sections/queue/parts/queue-workers.ok.js +1 -1
  105. package/public/sections/sync/index.ok.html +1 -1
  106. package/public/sections/sync/parts/sync-node-detail.ok.js +1 -1
  107. package/public/sections/sync/parts/sync-retention.ok.js +1 -1
  108. package/public/sections/sync/parts/sync-topology.ok.js +1 -1
  109. package/public/sections/system/index.ok.html +1 -1
  110. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  111. package/public/sections/system/parts/system-api-panel.ok.js +1 -1
  112. package/public/sections/system/parts/system-auth-panel.ok.js +1 -1
  113. package/public/sections/system/parts/system-log-history.ok.js +1 -1
  114. package/public/sections/system/parts/system-log.ok.js +1 -1
  115. package/public/sections/system/parts/system-status.ok.js +1 -1
  116. package/public/sections/system/parts/system-sync-panel.ok.js +1 -1
  117. package/public/sections/views/index.ok.html +1 -1
  118. package/public/sections/views/modals/create-view-modal.ok.js +1 -1
  119. package/public/sections/views/parts/view-detail.ok.js +1 -1
  120. package/public/sections/views/parts/views-list.ok.js +1 -1
  121. package/public/sections/views/parts/views-overview.ok.js +1 -1
  122. package/public/setup-app.js +1 -1
  123. package/public/setup.html +189 -1
  124. package/public/stores/auth-store.js +1 -1
  125. package/public/stores/events-store.js +1 -1
  126. package/public/stores/functions-store.js +1 -1
  127. package/public/stores/okdb-store.js +1 -1
  128. package/public/stores/theme-store.js +1 -1
  129. package/public/test-cron-input.html +53 -3
  130. package/public/test-json-input.html +182 -3
  131. package/public/util/permissions.js +1 -1
  132. package/public/util/sift-schema.js +1 -1
  133. package/public/vendor/okjs/ok.esm.min.js +1 -2
  134. package/public/view-models/type-query-vm.js +1 -1
  135. package/okdb-data/default/data.mdb +0 -0
  136. package/okdb-data/default/lock.mdb +0 -0
  137. package/okdb-data/~log/data.mdb +0 -0
  138. package/okdb-data/~log/lock.mdb +0 -0
  139. package/okdb-data/~system/data.mdb +0 -0
  140. package/okdb-data/~system/lock.mdb +0 -0
  141. package/public/images/logo.png +0 -0
  142. package/public/images/logo.svg +0 -333
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0xb5f572=_0x5741;(function(_0x33e5c1,_0x3f56d9){const _0xd58bda=_0x5741,_0x3e7b52=_0x33e5c1();while(!![]){try{const _0x809d9a=-parseInt(_0xd58bda(0x210))/0x1+-parseInt(_0xd58bda(0x3b8))/0x2*(-parseInt(_0xd58bda(0x171))/0x3)+parseInt(_0xd58bda(0x3bd))/0x4+-parseInt(_0xd58bda(0x178))/0x5*(parseInt(_0xd58bda(0x293))/0x6)+parseInt(_0xd58bda(0x246))/0x7*(-parseInt(_0xd58bda(0x2f5))/0x8)+parseInt(_0xd58bda(0x16d))/0x9*(parseInt(_0xd58bda(0x22b))/0xa)+parseInt(_0xd58bda(0x133))/0xb;if(_0x809d9a===_0x3f56d9)break;else _0x3e7b52['push'](_0x3e7b52['shift']());}catch(_0x84adcf){_0x3e7b52['push'](_0x3e7b52['shift']());}}}(_0xa312,0x3c98b));var require$$3=require(_0xb5f572(0x3ed)),require$$1=require('fs'),require$$3$1=require(_0xb5f572(0x13e)),require$$0$2=require(_0xb5f572(0x378)),require$$5=require('../okdb'),require$$0=require('crypto'),require$$0$1=require(_0xb5f572(0x19d)),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x425944){const _0x5b0fa8=_0xb5f572;return _0x425944&&_0x425944[_0x5b0fa8(0x237)]&&Object[_0x5b0fa8(0x30f)][_0x5b0fa8(0x2b0)][_0x5b0fa8(0x329)](_0x425944,'default')?_0x425944[_0x5b0fa8(0x195)]:_0x425944;}var okdb$1={},version='1.0.1',require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x5413be=require$$0;function _0x30b8c1(_0x59e2f0,_0xb13271){const _0x4ecd27=_0x5741;return _0x5413be[_0x4ecd27(0x2e8)]('sha256',_0xb13271)[_0x4ecd27(0x249)](_0x59e2f0)[_0x4ecd27(0x39f)](_0x4ecd27(0x2a5));}function _0x4ad3d4(_0x578955,_0x560c66){const _0x31e4a2=_0x5741;if(typeof _0x578955!==_0x31e4a2(0x36b)||typeof _0x560c66!==_0x31e4a2(0x36b))return![];if(Buffer['byteLength'](_0x578955)!==Buffer[_0x31e4a2(0x26c)](_0x560c66))return![];return _0x5413be[_0x31e4a2(0x163)](Buffer['from'](_0x578955),Buffer[_0x31e4a2(0x19a)](_0x560c66));}function _0x9dbbd6(_0x31c727){const _0x35e017=_0x5741;if(!_0x31c727?.['startsWith']('Bearer\x20'))return null;return _0x31c727[_0x35e017(0x3a7)](0x7);}function _0x207c2f(_0x5bfb93=0x20){const _0x49ba0e=_0x5741;return _0x5413be[_0x49ba0e(0x194)](_0x5bfb93)[_0x49ba0e(0x181)](_0x49ba0e(0x2a5));}function _0x5590f4(_0xb0d84e){const _0x601309=_0x5741;return _0x5413be[_0x601309(0x15e)]('sha256')['update'](_0xb0d84e)[_0x601309(0x39f)]('hex');}function _0x10a6fa(_0x7b419b,_0x5035f4,_0x5852bc=0x36ee80){const _0x5375cf=_0x5741;if(!_0x5035f4)throw new Error(_0x5375cf(0x1b9));const _0x32b182=Date['now'](),_0x457e9c=Buffer[_0x5375cf(0x19a)](JSON[_0x5375cf(0x3b2)]({'iat':_0x32b182,'exp':_0x32b182+_0x5852bc,'sub':_0x7b419b?.['id']??_0x7b419b?.[_0x5375cf(0x16a)]??null,'username':_0x7b419b?.[_0x5375cf(0x3cf)]??_0x7b419b?.[_0x5375cf(0x157)]??null,'roles':Array[_0x5375cf(0x218)](_0x7b419b?.[_0x5375cf(0x149)])?_0x7b419b[_0x5375cf(0x149)]:[]}))[_0x5375cf(0x181)](_0x5375cf(0x2a5)),_0x1bdc41=_0x30b8c1(_0x457e9c,_0x5035f4);return _0x457e9c+'.'+_0x1bdc41;}function _0x27e014(_0x3bcb5b,_0x53590d){const _0x375778=_0x5741;if(!_0x53590d||typeof _0x3bcb5b!==_0x375778(0x36b))return null;const [_0x49b3ef,_0x3e88f6]=_0x3bcb5b[_0x375778(0x253)]('.');if(!_0x49b3ef||!_0x3e88f6)return null;const _0x2c4fcd=_0x30b8c1(_0x49b3ef,_0x53590d);if(!_0x4ad3d4(_0x3e88f6,_0x2c4fcd))return null;try{const _0x3d1586=JSON[_0x375778(0x35a)](Buffer[_0x375778(0x19a)](_0x49b3ef,_0x375778(0x2a5))[_0x375778(0x181)]()),_0x290d99=0x7530;if(Date['now']()>Number(_0x3d1586?.[_0x375778(0x359)]??0x0)+_0x290d99)return null;return _0x3d1586;}catch{return null;}}async function _0x59dca2(_0x5751b3){return new Promise((_0x4a049e,_0x179db4)=>{const _0x82afe0=_0x5741,_0x4371dd=_0x5413be[_0x82afe0(0x194)](0x10);_0x5413be['scrypt'](_0x5751b3,_0x4371dd,0x40,(_0x15b8ad,_0x3cd2de)=>{const _0x44d132=_0x82afe0;if(_0x15b8ad)_0x179db4(_0x15b8ad);_0x4a049e(_0x4371dd[_0x44d132(0x181)]('hex')+':'+_0x3cd2de[_0x44d132(0x181)](_0x44d132(0x1fa)));});});}async function _0x1f426d(_0x463e22,_0x2581ad){const _0x9513dd=_0x5741,[_0xe4595,_0x1e5307]=_0x2581ad['split'](':');if(!_0xe4595||!_0x1e5307)return![];const _0x80413d=Buffer[_0x9513dd(0x19a)](_0xe4595,_0x9513dd(0x1fa));return new Promise((_0x3a4897,_0x36cd87)=>{_0x5413be['scrypt'](_0x463e22,_0x80413d,0x40,(_0x30d2dd,_0x341855)=>{const _0xe46720=_0x5741;if(_0x30d2dd)_0x36cd87(_0x30d2dd);_0x3a4897(_0x5413be['timingSafeEqual'](_0x341855,Buffer[_0xe46720(0x19a)](_0x1e5307,_0xe46720(0x1fa))));});});}return okdbAuthTokens={'hmac':_0x30b8c1,'timingSafeEqual':_0x4ad3d4,'parseBearer':_0x9dbbd6,'randomToken':_0x207c2f,'hashToken':_0x5590f4,'issueToken':_0x10a6fa,'authenticateToken':_0x27e014,'hashPassword':_0x59dca2,'verifyPassword':_0x1f426d},okdbAuthTokens;}function _0x5741(_0x322107,_0xca09bf){_0x322107=_0x322107-0x124;const _0xa31286=_0xa312();let _0x5741ac=_0xa31286[_0x322107];return _0x5741ac;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x54739f=_0xb5f572;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x2ce5f5=require$$0$1,_0x2ee104=_0x54739f(0x2df),_0x3f36f7=new Uint8Array(0x100)[_0x54739f(0x190)](0xff);for(let _0x60bc87=0x0;_0x60bc87<_0x2ee104[_0x54739f(0x1b1)];_0x60bc87++){_0x3f36f7[_0x2ee104['charCodeAt'](_0x60bc87)]=_0x60bc87,_0x3f36f7[_0x2ee104[_0x54739f(0x2ae)](_0x60bc87)+0x20]=_0x60bc87;}_0x3f36f7['O'[_0x54739f(0x2ae)](0x0)]=0x0,_0x3f36f7['o'[_0x54739f(0x2ae)](0x0)]=0x0,_0x3f36f7['I'['charCodeAt'](0x0)]=0x1,_0x3f36f7['i'[_0x54739f(0x2ae)](0x0)]=0x1,_0x3f36f7['L'[_0x54739f(0x2ae)](0x0)]=0x1,_0x3f36f7['l'[_0x54739f(0x2ae)](0x0)]=0x1;function _0x5a0338(_0x17d66f){const _0x302a69=_0x54739f;let _0x26024e=0x0,_0x46357b=0x0,_0x31e71e='';for(let _0x316d80=0x0;_0x316d80<_0x17d66f[_0x302a69(0x1b1)];_0x316d80++){_0x46357b=_0x46357b<<0x8|_0x17d66f[_0x316d80],_0x26024e+=0x8;while(_0x26024e>=0x5){_0x26024e-=0x5,_0x31e71e+=_0x2ee104[_0x46357b>>>_0x26024e&0x1f];}}return _0x26024e>0x0&&(_0x31e71e+=_0x2ee104[_0x46357b<<0x5-_0x26024e&0x1f]),_0x31e71e;}function _0x5c1182(_0x34f058){const _0x595644=_0x54739f;_0x34f058=_0x34f058[_0x595644(0x27d)](/-/g,'')[_0x595644(0x2a7)]();let _0x18b533=0x0,_0x28f5b6=0x0;const _0x26c4b0=[];for(let _0x13f5a3=0x0;_0x13f5a3<_0x34f058[_0x595644(0x1b1)];_0x13f5a3++){const _0x531062=_0x3f36f7[_0x34f058[_0x595644(0x2ae)](_0x13f5a3)];if(_0x531062===0xff)continue;_0x28f5b6=_0x28f5b6<<0x5|_0x531062,_0x18b533+=0x5,_0x18b533>=0x8&&(_0x18b533-=0x8,_0x26c4b0[_0x595644(0x2b4)](_0x28f5b6>>>_0x18b533&0xff));}return Buffer['from'](_0x26c4b0);}const _0x3be4c6=['sync',_0x54739f(0x3fa),_0x54739f(0x3c9),_0x54739f(0x208),'timeMachine',_0x54739f(0x38f),_0x54739f(0x214),_0x54739f(0x153)],_0x3d6451=0x0,_0x3f8f0a=0x1,_0x2c900c=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x11be05({issuedAt:_0x10eb34,expiresAt:_0xc0f30c,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x3d6451}){const _0x3c0ce7=_0x54739f,_0x524ea6=Buffer[_0x3c0ce7(0x19a)](licensee,_0x3c0ce7(0x394))['slice'](0x0,0x40),_0x48fff4=0x1+0x1+0x4+0x4+0x1+_0x524ea6['length']+0x2+0x10,_0x2f6e03=Buffer['allocUnsafe'](_0x48fff4);let _0xa40764=0x0;_0x2f6e03[_0x3c0ce7(0x395)](0x1,_0xa40764++),_0x2f6e03[_0x3c0ce7(0x395)](licenseType,_0xa40764++),_0x2f6e03[_0x3c0ce7(0x206)](Math[_0x3c0ce7(0x29e)](_0x10eb34/0x3e8),_0xa40764),_0xa40764+=0x4,_0x2f6e03[_0x3c0ce7(0x206)](Math[_0x3c0ce7(0x29e)](_0xc0f30c/0x3e8),_0xa40764),_0xa40764+=0x4,_0x2f6e03[_0x3c0ce7(0x395)](_0x524ea6[_0x3c0ce7(0x1b1)],_0xa40764++),_0x524ea6['copy'](_0x2f6e03,_0xa40764),_0xa40764+=_0x524ea6[_0x3c0ce7(0x1b1)];let _0x5de19=0x0;for(let _0x20302a=0x0;_0x20302a<_0x3be4c6[_0x3c0ce7(0x1b1)];_0x20302a++){if(features[_0x3be4c6[_0x20302a]])_0x5de19|=0x1<<_0x20302a;}_0x2f6e03[_0x3c0ce7(0x21c)](_0x5de19,_0xa40764),_0xa40764+=0x2;const _0x26d405=[_0x3c0ce7(0x37e),_0x3c0ce7(0x344),_0x3c0ce7(0x1a2),_0x3c0ce7(0x3e2)];for(const _0x702545 of _0x26d405){_0x2f6e03[_0x3c0ce7(0x206)](limits[_0x702545]||0x0,_0xa40764),_0xa40764+=0x4;}return _0x2f6e03;}function _0x4ca0cc(_0x179cf3){const _0x3606c6=_0x54739f;let _0x208d5f=0x0;const _0x520f00=_0x179cf3['readUInt8'](_0x208d5f++),_0x33e7e6=_0x179cf3[_0x3606c6(0x393)](_0x208d5f++),_0x427b42=_0x179cf3[_0x3606c6(0x16f)](_0x208d5f);_0x208d5f+=0x4;const _0x36b803=_0x179cf3['readUInt32BE'](_0x208d5f);_0x208d5f+=0x4;const _0x28cd76=_0x179cf3[_0x3606c6(0x393)](_0x208d5f++),_0x2281c2=_0x179cf3[_0x3606c6(0x3a7)](_0x208d5f,_0x208d5f+_0x28cd76)[_0x3606c6(0x181)](_0x3606c6(0x394));_0x208d5f+=_0x28cd76;const _0xc18b6e=_0x179cf3[_0x3606c6(0x409)](_0x208d5f);_0x208d5f+=0x2;const _0x14ee71={};for(let _0x204a97=0x0;_0x204a97<_0x3be4c6['length'];_0x204a97++){_0x14ee71[_0x3be4c6[_0x204a97]]=Boolean(_0xc18b6e&0x1<<_0x204a97);}const _0x61fae7=[_0x3606c6(0x37e),_0x3606c6(0x344),_0x3606c6(0x1a2),_0x3606c6(0x3e2)],_0x21daa3={};for(const _0x376f9c of _0x61fae7){const _0x2b618a=_0x179cf3[_0x3606c6(0x16f)](_0x208d5f);_0x208d5f+=0x4,_0x21daa3[_0x376f9c]=_0x2b618a===0x0?null:_0x2b618a;}return{'v':_0x520f00,'licenseType':_0x33e7e6,'issuedAt':_0x427b42*0x3e8,'expiresAt':_0x36b803*0x3e8,'licensee':_0x2281c2,'features':_0x14ee71,'limits':_0x21daa3};}function _0x3d955c(_0x3561a7,_0x272852){const _0x1e90fa=_0x54739f,_0x36faf2=Buffer[_0x1e90fa(0x374)]([_0x3561a7,_0x272852]),_0x50bd01=_0x5a0338(_0x36faf2),_0x50aa54=[];for(let _0x4f9a83=0x0;_0x4f9a83<_0x50bd01['length'];_0x4f9a83+=0x8){_0x50aa54[_0x1e90fa(0x2b4)](_0x50bd01[_0x1e90fa(0x3a7)](_0x4f9a83,_0x4f9a83+0x8));}return _0x50aa54[_0x1e90fa(0x2f7)]('-');}function _0x4454af(_0x38c319){const _0x4cd7c1=_0x54739f;if(typeof _0x38c319!==_0x4cd7c1(0x36b))throw new Error(_0x4cd7c1(0x2fb));const _0x2a705a=_0x5c1182(_0x38c319['replace'](/-/g,''));if(_0x2a705a[_0x4cd7c1(0x1b1)]<0x41)throw new Error(_0x4cd7c1(0x2cc)+_0x2a705a[_0x4cd7c1(0x1b1)]+_0x4cd7c1(0x191));const _0x481172=_0x2a705a['slice'](0x0,_0x2a705a['length']-0x40),_0x34bb4=_0x2a705a[_0x4cd7c1(0x3a7)](_0x2a705a[_0x4cd7c1(0x1b1)]-0x40);let _0x14a663;try{_0x14a663=_0x4ca0cc(_0x481172);}catch(_0x10bc5a){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x10bc5a[_0x4cd7c1(0x264)]);}return{'rawBuf':_0x2a705a,'payload':_0x481172,'sig':_0x34bb4,'decoded':_0x14a663};}function _0x373f6d(_0x5766e4){const _0x184c03=_0x54739f;return _0x2ce5f5[_0x184c03(0x15e)](_0x184c03(0x207))['update'](_0x5766e4)[_0x184c03(0x39f)]()[_0x184c03(0x3a7)](0x0,0x8);}function _0x4de885(_0x336efa,_0x2fe81d,_0x363dcd){const _0x438ff6=_0x54739f,_0x2ba384='OKDB-PIN-V1:'+_0x363dcd,_0x5756b9=Buffer['concat']([Buffer[_0x438ff6(0x19a)](_0x336efa,_0x438ff6(0x394)),_0x2fe81d]),_0x481432=_0x2ce5f5[_0x438ff6(0x2e8)]('sha256',_0x2ba384)['update'](_0x5756b9)[_0x438ff6(0x39f)](),_0x562c98=_0x5a0338(_0x481432[_0x438ff6(0x3a7)](0x0,0x5));return{'pin':_0x562c98,'pinHmac':_0x481432};}function _0x3d2267(_0x2ab95c,_0x11b5d5,_0x2c0736){const _0x4bb9a5=_0x54739f,_0x48c80b=Buffer['allocUnsafe'](0x4d);let _0x2d9d8c=0x0;_0x48c80b[_0x4bb9a5(0x395)](0x1,_0x2d9d8c++),_0x2ab95c[_0x4bb9a5(0x2ba)](_0x48c80b,_0x2d9d8c),_0x2d9d8c+=0x8,_0x48c80b[_0x4bb9a5(0x206)](_0x11b5d5,_0x2d9d8c),_0x2d9d8c+=0x4,_0x2c0736[_0x4bb9a5(0x2ba)](_0x48c80b,_0x2d9d8c);const _0x189bbc=_0x5a0338(_0x48c80b),_0x5c4849=[];for(let _0x115a24=0x0;_0x115a24<_0x189bbc[_0x4bb9a5(0x1b1)];_0x115a24+=0x6){_0x5c4849[_0x4bb9a5(0x2b4)](_0x189bbc[_0x4bb9a5(0x3a7)](_0x115a24,_0x115a24+0x6));}return _0x5c4849['join']('-');}function _0x1e288e(_0x19bc3e){const _0x349b97=_0x54739f;if(typeof _0x19bc3e!=='string')throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x3ce6fd=_0x5c1182(_0x19bc3e['replace'](/-/g,''));if(_0x3ce6fd[_0x349b97(0x1b1)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x3ce6fd[_0x349b97(0x1b1)]);let _0x31e78b=0x0;const _0x9cf244=_0x3ce6fd[_0x349b97(0x393)](_0x31e78b++),_0x53db0c=_0x3ce6fd[_0x349b97(0x3a7)](_0x31e78b,_0x31e78b+0x8);_0x31e78b+=0x8;const _0x49f1d3=_0x3ce6fd['readUInt32BE'](_0x31e78b);_0x31e78b+=0x4;const _0x22d96d=_0x3ce6fd[_0x349b97(0x3a7)](_0x31e78b);return{'v':_0x9cf244,'licenseHash':_0x53db0c,'expiry':_0x49f1d3,'sig':_0x22d96d};}function _0x5a8be0({tokenString:_0x432834,nodeId:_0x3f8ceb,rawBlobBuf:_0x504645,pubKeyPem:_0x753f3a,pubFingerprint:_0x917b2d}){const _0x55ef99=_0x54739f;let _0x4a786a;try{_0x4a786a=_0x1e288e(_0x432834);}catch(_0x52a01c){return{'valid':![],'reason':_0x55ef99(0x3bb)};}const _0x228d75=_0x373f6d(_0x504645);if(!_0x228d75[_0x55ef99(0x193)](_0x4a786a[_0x55ef99(0x13f)]))return{'valid':![],'reason':_0x55ef99(0x3cb)};const {pinHmac:_0x45d146}=_0x4de885(_0x3f8ceb,_0x228d75,_0x917b2d),_0x161321=Buffer[_0x55ef99(0x22e)](0x4);_0x161321[_0x55ef99(0x206)](_0x4a786a[_0x55ef99(0x32d)],0x0);const _0x59d98a=Buffer[_0x55ef99(0x374)]([Buffer[_0x55ef99(0x19a)]([_0x4a786a['v']]),_0x45d146['slice'](0x0,0x5),_0x4a786a[_0x55ef99(0x13f)],_0x161321]);try{const _0x16f385=_0x2ce5f5['verify'](null,_0x59d98a,_0x753f3a,_0x4a786a[_0x55ef99(0x281)]);if(!_0x16f385)return{'valid':![],'reason':_0x55ef99(0x377)};}catch(_0xd4ddf5){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x4a786a['expiry']<Date[_0x55ef99(0x227)]()/0x3e8)return{'valid':![],'reason':_0x55ef99(0x3a3)};return{'valid':!![],'reason':'ok'};}function _0x943ba5(_0x59fa55){const _0x359277=_0x54739f;if(typeof _0x59fa55!==_0x359277(0x36b))return _0x359277(0x28d);const _0x285835=_0x59fa55['trim']();if(_0x285835['startsWith']('/')||_0x285835[_0x359277(0x143)]('./')||_0x285835[_0x359277(0x143)](_0x359277(0x24d))||/^[A-Za-z]:[\\/]/['test'](_0x285835))return _0x359277(0x3ed);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x359277(0x39b)](_0x285835))return'uuid';const _0x728fbd=_0x285835[_0x359277(0x27d)](/[\s-]+/g,'')[_0x359277(0x1b1)];if(_0x728fbd===0x7c)return _0x359277(0x320);if(_0x728fbd>=0x95&&_0x728fbd<=0xfc)return _0x359277(0x1f1);return _0x359277(0x28d);}return okdbLicenseCodec={'toBase32':_0x5a0338,'fromBase32':_0x5c1182,'encodeLicensePayload':_0x11be05,'decodeLicensePayload':_0x4ca0cc,'encodeLicenseBlob':_0x3d955c,'decodeLicenseBlob':_0x4454af,'licenseHash':_0x373f6d,'derivePin':_0x4de885,'encodeActivationToken':_0x3d2267,'decodeActivationToken':_0x1e288e,'verifyActivation':_0x5a8be0,'detectInputType':_0x943ba5,'FEATURE_NAMES':_0x3be4c6,'LICENSE_TYPE_STANDARD':_0x3d6451,'LICENSE_TYPE_OPEN':_0x3f8f0a,'OPEN_LICENSE_MAX_DURATION_MS':_0x2c900c},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x1de091 extends Error{constructor(_0x5a503b,_0x267b34,_0x335480={}){const _0x511259=_0x5741;super(_0x5a503b),this[_0x511259(0x157)]='OKDBError',this[_0x511259(0x304)]=_0x267b34,this[_0x511259(0x21a)]=_0x335480,_0x335480['cause']&&(this[_0x511259(0x2b6)]=_0x335480['cause']),Error[_0x511259(0x37f)](this,this[_0x511259(0x364)]);}}class _0x48c02e extends _0x1de091{constructor(_0x214312,_0x47ce0a,_0x5a0d86,_0x2d9713){const _0x4f3344=_0x5741;super(_0x4f3344(0x252)+_0x214312+'@'+_0x47ce0a+_0x4f3344(0x201)+_0x5a0d86+_0x4f3344(0x2bc)+_0x2d9713,_0x4f3344(0x40c),{'type':_0x214312,'key':_0x47ce0a,'expectedVersion':_0x5a0d86,'actualVersion':_0x2d9713}),this['name']=_0x4f3344(0x19c);}}class _0x3c15bc extends _0x1de091{constructor(_0x40d166,_0x3e7f48){super(_0x40d166+'@'+_0x3e7f48+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x40d166,'key':_0x3e7f48}),this['name']='OKDBNotFoundError';}}class _0x7f5831 extends _0x1de091{constructor(_0x236aca,_0x433434){const _0x1a6d1c=_0x5741;super(_0x236aca+'@'+_0x433434+_0x1a6d1c(0x345),_0x1a6d1c(0x425),{'type':_0x236aca,'key':_0x433434}),this[_0x1a6d1c(0x157)]=_0x1a6d1c(0x3c0);}}class _0x3311e2 extends _0x1de091{constructor(_0x50a70c,_0x4f2fc3){const _0x5762a6=_0x5741,_0xf8f6e0=typeof _0x4f2fc3;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x50a70c+_0x5762a6(0x262)+_0xf8f6e0+_0x5762a6(0x12d)+_0x4f2fc3,_0x5762a6(0x2b8),{'index':_0x50a70c,'key':_0x4f2fc3,'keyType':_0xf8f6e0}),this[_0x5762a6(0x157)]=_0x5762a6(0x3e9);}}class _0x389a3e extends _0x1de091{constructor(_0x357760){const _0x172818=_0x5741,_0x50847a=typeof _0x357760;super(_0x172818(0x1c0)+_0x50847a+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x357760,_0x172818(0x3e5),{'key':_0x357760,'keyType':_0x50847a}),this['name']=_0x172818(0x2e3);}}class _0x385a17 extends _0x1de091{constructor(_0x5e1db8){const _0x5d4b32=_0x5741;super('Type\x20\x27'+_0x5e1db8+_0x5d4b32(0x3eb),_0x5d4b32(0x34e),{'type':_0x5e1db8}),this[_0x5d4b32(0x157)]=_0x5d4b32(0x30b);}}class _0xb8e589 extends _0x1de091{constructor(_0x374482){const _0x3f3b79=_0x5741;super(_0x3f3b79(0x3bc)+_0x374482+_0x3f3b79(0x2d2),_0x3f3b79(0x242),{'type':_0x374482}),this['name']=_0x3f3b79(0x20f);}}class _0x4d3478 extends _0x1de091{constructor(_0x45a935,_0x13931b){const _0x365d5f=_0x5741;super('Index\x20\x27'+_0x13931b+_0x365d5f(0x22a)+_0x45a935+'\x27\x20doesn\x27t\x20exist',_0x365d5f(0x240),{'type':_0x45a935,'index':_0x13931b}),this['name']='OKDBIndexNotRegisteredError';}}class _0x443fc9 extends _0x1de091{constructor(_0x10f1f6,_0x41dfbc){const _0x571a4b=_0x5741;super(_0x571a4b(0x26b)+_0x41dfbc+_0x571a4b(0x22a)+_0x10f1f6+'\x27\x20is\x20already\x20registered',_0x571a4b(0x372),{'type':_0x10f1f6,'index':_0x41dfbc}),this[_0x571a4b(0x157)]=_0x571a4b(0x3d5);}}class _0x4810d3 extends _0x1de091{constructor(_0x393305,_0x198229={}){const _0x4ef598=_0x5741;super(_0x393305,'INVALID_VALUE',_0x198229),this[_0x4ef598(0x157)]=_0x4ef598(0x12a);}}class _0x5d9fca extends _0x1de091{constructor(_0x3b1c9d,_0x55ab45,_0x3978b5,_0x2ec2e9,_0x2b872f){const _0x599769=_0x5741;super('Unique\x20constraint\x20violated\x20on\x20'+_0x3b1c9d+'@'+_0x55ab45+_0x599769(0x15f)+_0x3978b5+']\x20already\x20maps\x20to\x20\x27'+_0x2ec2e9+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x2b872f+'\x27',_0x599769(0x3b5),{'type':_0x3b1c9d,'index':_0x55ab45,'indexKey':_0x3978b5,'existingKey':_0x2ec2e9,'conflictingKey':_0x2b872f}),this[_0x599769(0x157)]=_0x599769(0x31f);}}class _0xe498a7 extends _0x1de091{constructor(_0x25a507,_0x522293,_0x28b393){const _0x341d29=_0x5741;super('Schema\x20validation\x20failed\x20for\x20'+_0x25a507+'@'+_0x522293,_0x341d29(0x356),{'type':_0x25a507,'key':_0x522293,'errors':_0x28b393}),this['name']=_0x341d29(0x129),this['type']=_0x25a507,this[_0x341d29(0x1d9)]=_0x522293,this[_0x341d29(0x3f8)]=_0x28b393;}}class _0x2ede7f extends _0x1de091{constructor(_0x230ed8,_0x4b4aed){const _0x1ff75b=_0x5741;super(_0x1ff75b(0x1dc)+_0x230ed8+':\x20'+_0x4b4aed[_0x1ff75b(0x1b1)]+'\x20documents\x20fail\x20validation',_0x1ff75b(0x1fe),{'type':_0x230ed8,'failures':_0x4b4aed}),this[_0x1ff75b(0x157)]=_0x1ff75b(0x286),this['type']=_0x230ed8,this[_0x1ff75b(0x23e)]=_0x4b4aed;}}class _0x5f4203 extends _0x1de091{constructor(_0x5520a7,_0x36daa6,_0x1dd18a,_0x4d4500,_0x365541){const _0x313e8a=_0x5741;super(_0x313e8a(0x319)+_0x5520a7+'@'+_0x36daa6+'.'+_0x1dd18a+'\x20references\x20'+_0x4d4500+'@'+_0x365541+_0x313e8a(0x15b),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x5520a7,'sourceKey':_0x36daa6,'fieldPath':_0x1dd18a,'targetType':_0x4d4500,'targetKey':_0x365541}),this['name']=_0x313e8a(0x1e7),this['sourceType']=_0x5520a7,this[_0x313e8a(0x37d)]=_0x36daa6,this[_0x313e8a(0x1c8)]=_0x1dd18a,this[_0x313e8a(0x402)]=_0x4d4500,this[_0x313e8a(0x2e4)]=_0x365541;}}class _0xd732f6 extends _0x1de091{constructor(_0x18a432,_0x296a3c,_0xca1dfd){const _0x460185=_0x5741;super('Cannot\x20delete\x20'+_0x18a432+'@'+_0x296a3c+':\x20'+_0xca1dfd[_0x460185(0x1b1)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x460185(0x1f7),{'targetType':_0x18a432,'targetKey':_0x296a3c,'references':_0xca1dfd}),this[_0x460185(0x157)]=_0x460185(0x2cf),this['targetType']=_0x18a432,this[_0x460185(0x2e4)]=_0x296a3c,this['references']=_0xca1dfd;}}class _0x193b38 extends _0x1de091{constructor(_0x3f8c2f,_0x1ca2e1,_0x16fa9f){const _0x43d78b=_0x5741;super(_0x43d78b(0x373)+_0x1ca2e1+_0x43d78b(0x2c2)+_0x3f8c2f+_0x43d78b(0x3e3)+_0x16fa9f[_0x43d78b(0x33d)](_0x11659f=>_0x11659f[_0x43d78b(0x379)]+':'+_0x11659f[_0x43d78b(0x157)])[_0x43d78b(0x2f7)](',\x20'),_0x43d78b(0x1bb),{'type':_0x3f8c2f,'index':_0x1ca2e1,'usedBy':_0x16fa9f}),this[_0x43d78b(0x157)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x1de091,'OKDBVersionMismatchError':_0x48c02e,'OKDBNotFoundError':_0x3c15bc,'OKDBAlreadyExistsError':_0x7f5831,'OKDBInvalidIndexKeyError':_0x3311e2,'OKDBInvalidPrimaryKeyError':_0x389a3e,'OKDBTypeNotRegisteredError':_0x385a17,'OKDBTypeAlreadyRegisteredError':_0xb8e589,'OKDBIndexNotRegisteredError':_0x4d3478,'OKDBIndexAlreadyRegisteredError':_0x443fc9,'OKDBInvalidValueError':_0x4810d3,'OKDBUniqueConstraintError':_0x5d9fca,'OKDBSchemaValidationError':_0xe498a7,'OKDBSchemaCollectionError':_0x2ede7f,'OKDBForeignKeyError':_0x5f4203,'OKDBForeignKeyDeleteError':_0xd732f6,'OKDBIndexHasConsumersError':_0x193b38},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2ff82b=_0xb5f572;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1f1181={'PUT':_0x2ff82b(0x148),'REMOVE':_0x2ff82b(0x38d),'INDEX_DROP':_0x2ff82b(0x1ba),'INDEX_REGISTER':_0x2ff82b(0x1a1),'INDEX_RESET':_0x2ff82b(0x295),'TYPE_REGISTER':_0x2ff82b(0x164),'TYPE_DROP':_0x2ff82b(0x126),'FTS_REGISTER':_0x2ff82b(0x1a6),'FTS_DROP':_0x2ff82b(0x24f),'FTS_RESET':_0x2ff82b(0x17d),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x2ff82b(0x221),'TTL_SET':_0x2ff82b(0x3cc),'TTL_CLEAR':_0x2ff82b(0x141)},_0x2d444e={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x2ff82b(0x263),'SYSTEM_CLOCK_CHANGE':_0x2ff82b(0x2af),'SYSTEM_POKE':_0x2ff82b(0x3c8),'SYSTEM_DRAIN':_0x2ff82b(0x14d),'SYSTEM_BUS_STATE_CHANGE':_0x2ff82b(0x1a3),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x2ff82b(0x2db),'ITEM_REMOVE':_0x2ff82b(0x3d2),'INDEX_RESET':_0x2ff82b(0x390),'INDEX_READY':_0x2ff82b(0x3c4),'INDEX_PROGRESS':'index:progress','INDEX_DROP':_0x2ff82b(0x26a),'INDEX_REGISTERED':_0x2ff82b(0x1e9),'FTS_REGISTERED':_0x2ff82b(0x2c5),'FTS_DROP':_0x2ff82b(0x2f2),'FTS_RESET':_0x2ff82b(0x1ee),'SCHEMA_SET':_0x2ff82b(0x31b),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x2ff82b(0x414),'REF_VIOLATION':_0x2ff82b(0x2bf),'REF_VIOLATION_RESOLVED':_0x2ff82b(0x22f),'SYNC_APPLY':_0x2ff82b(0x14e),'TXN_START':_0x2ff82b(0x2d7),'TXN_END':_0x2ff82b(0x369),'TXN_ROLLBACK':_0x2ff82b(0x368),'TYPE_REGISTERED':_0x2ff82b(0x3d4),'TYPE_DROP':'type:drop','ENV_OPENED':_0x2ff82b(0x260),'ENV_REMOVED':_0x2ff82b(0x39d),'TTL_EXPIRED':_0x2ff82b(0x2a8),'TTL_SET':_0x2ff82b(0x411),'TTL_CLEAR':_0x2ff82b(0x1fb),'LICENSE_INVALID':_0x2ff82b(0x3af),'LICENSE_ADDED':_0x2ff82b(0x2f6),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x2ff82b(0x3c2)},_0x417a56={'CREATING':_0x2ff82b(0x417),'RESETTING':_0x2ff82b(0x31d),'READY':'ready','DROPPING':_0x2ff82b(0x16e),'WAITING':_0x2ff82b(0x2c8)},_0x2a31d7={'CREATED':_0x2ff82b(0x288),'STARTING':'starting','STARTED':_0x2ff82b(0x12c),'STOPPING':_0x2ff82b(0x23a),'STOPPED':_0x2ff82b(0x2b1)},_0x52d66d={'CREATING':'creating','READY':'ready','HALTED':_0x2ff82b(0x3ec),'STOPPED':_0x2ff82b(0x2b1),'RESETTING':_0x2ff82b(0x31d)},_0x2a773c=Object[_0x2ff82b(0x3fd)]({'POKE':_0x2ff82b(0x386),'DRAIN':'bus:drain'});return okdbEnums={'BUS_EVENTS':_0x2a773c,'CHANGE_ACTIONS':_0x1f1181,'EVENTS':_0x2d444e,'INDEX_STATE':_0x417a56,'OKDB_STATE':_0x2a31d7,'VIEW_STATE':_0x52d66d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x57be05=_0xb5f572;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x2e20ce='-----BEGIN\x20PUBLIC\x20KEY-----\x0aMCowBQYDK2VwAyEAacrkExPrhxNVHyeQBLDwg8xfm1OwyxDAPNdGXABYS2s=\x0a-----END\x20PUBLIC\x20KEY-----',_0x391c0d=_0x57be05(0x26d);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2e20ce,'PUB_FINGERPRINT':_0x391c0d},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x4df479=_0xb5f572;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x10263a=require$$0,{OKDBError:_0x4019ef}=requireOkdbError(),{EVENTS:_0x3ebd06}=requireOkdbEnums(),_0x29162a=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x13fa78,OPEN_LICENSE_MAX_DURATION_MS:_0x553580}=_0x29162a,_0x42cfba=requireOkdbPubkey(),_0x4ce244={'LICENSED_BUILD':_0x4df479(0x3ac),'PUBLIC_KEY_PEM':_0x42cfba['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x42cfba['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':'log'},_0x4afb93=_0x4df479(0x156),_0x53ae88={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x15c19b(_0x364c50){const _0x15a3c3=_0x4df479;!_0x364c50[_0x15a3c3(0x347)](_0x4afb93)&&await _0x364c50[_0x15a3c3(0x164)](_0x4afb93);}class _0x1268ce{constructor(_0x2cf16b){const _0x1b56ef=_0x4df479;this[_0x1b56ef(0x35f)]=_0x2cf16b,this['_active']=null;}async['reload'](){const _0xffa837=_0x4df479,_0x45811f=this['okdb'][_0xffa837(0x2a1)];if(!_0x45811f||!_0x45811f[_0xffa837(0x347)](_0x4afb93)){this[_0xffa837(0x297)]=null;return;}const _0x516d0e=this[_0xffa837(0x35f)]['id'];let _0x33443e=null;for(const {key:_0xf9aa5a,value:_0x252853}of _0x45811f[_0xffa837(0x268)](_0x4afb93)){const _0x3a5255=this[_0xffa837(0x366)](_0x252853,_0x516d0e);_0x3a5255===_0xffa837(0x167)&&!_0x33443e&&(_0x33443e={..._0x252853,'id':_0xf9aa5a,'status':_0x3a5255});}this[_0xffa837(0x297)]=_0x33443e;if(this[_0xffa837(0x297)]&&this['_active'][_0xffa837(0x1ec)]===_0x13fa78){const _0x1677d1=Math[_0xffa837(0x1f0)]((this['_active']['expiresAt']-Date[_0xffa837(0x227)]())/0x5265c00);this['okdb'][_0xffa837(0x3ea)]?.[_0xffa837(0x1c2)](_0xffa837(0x36d)+_0x1677d1+_0xffa837(0x315),{'feature':'license','licensee':this[_0xffa837(0x297)][_0xffa837(0x40d)],'expiresAt':new Date(this[_0xffa837(0x297)]['expiresAt'])[_0xffa837(0x2b7)]()});}}[_0x4df479(0x366)](_0x1e2f5b,_0x32cddf){const _0x5c4438=_0x4df479;if(!_0x1e2f5b['blob'])return _0x5c4438(0x39e);let _0x1b702c;try{_0x1b702c=_0x29162a[_0x5c4438(0x41b)](_0x1e2f5b[_0x5c4438(0x1f1)]);}catch(_0x557850){return _0x5c4438(0x39e);}try{const _0x33e3a5=_0x10263a['verify'](null,_0x1b702c['payload'],_0x4ce244['PUBLIC_KEY_PEM'],_0x1b702c['sig']);if(!_0x33e3a5)return _0x5c4438(0x39e);}catch(_0x2468bb){return'invalid';}if(_0x1b702c['decoded'][_0x5c4438(0x27a)]<=Date['now']())return _0x5c4438(0x29c);if(_0x1b702c[_0x5c4438(0x1e0)][_0x5c4438(0x1ec)]===_0x13fa78)return _0x5c4438(0x167);if(!_0x1e2f5b['activation'])return _0x5c4438(0x2d6);const _0x3c917b=_0x29162a[_0x5c4438(0x2a3)]({'tokenString':_0x1e2f5b[_0x5c4438(0x320)],'nodeId':_0x32cddf,'rawBlobBuf':_0x1b702c['rawBuf'],'pubKeyPem':_0x4ce244[_0x5c4438(0x2d5)],'pubFingerprint':_0x4ce244[_0x5c4438(0x132)]});if(_0x3c917b[_0x5c4438(0x16b)]===_0x5c4438(0x3cb)||_0x3c917b['reason']===_0x5c4438(0x377))return _0x5c4438(0x3f7);if(_0x3c917b[_0x5c4438(0x16b)]===_0x5c4438(0x3a3))return _0x5c4438(0x29c);if(!_0x3c917b[_0x5c4438(0x3c7)])return _0x5c4438(0x3f7);return _0x5c4438(0x167);}get[_0x4df479(0x167)](){const _0x1306e4=_0x4df479;return this[_0x1306e4(0x297)];}get[_0x4df479(0x2f8)](){const _0x3ee5b8=_0x4df479;return this[_0x3ee5b8(0x297)]??_0x53ae88;}['assertFeature'](_0x3cd114){const _0x593ba0=_0x4df479;if(_0x4ce244[_0x593ba0(0x17c)]!==_0x593ba0(0x3ac))return;const _0x21bd6d=this[_0x593ba0(0x2f8)];if(!_0x21bd6d[_0x593ba0(0x3f5)]?.[_0x3cd114]){const _0x23ac18=_0x21bd6d[_0x593ba0(0x3c5)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x3cd114+_0x593ba0(0x14b)+_0x3cd114+'\x22\x20to\x20enable\x20it.':_0x593ba0(0x2f9)+_0x3cd114+_0x593ba0(0x338)+_0x3cd114+'\x22.';throw new _0x4019ef(_0x23ac18,_0x593ba0(0x1ac),{'feature':_0x3cd114});}}[_0x4df479(0x3b4)](_0x28708a){const _0x47c040=_0x4df479;if(_0x4ce244[_0x47c040(0x17c)]!==_0x47c040(0x3ac))return!![];return!!this[_0x47c040(0x2f8)][_0x47c040(0x3f5)]?.[_0x28708a];}[_0x4df479(0x19b)](_0x4aacff,_0x1e5cd2){const _0x54c894=_0x4df479;if(_0x4ce244[_0x54c894(0x17c)]!==_0x54c894(0x3ac))return;const _0x518cc=this['effective'],_0x32f56e=_0x518cc[_0x54c894(0x3f0)]?.[_0x4aacff];if(_0x32f56e===null||_0x32f56e===undefined||_0x32f56e===0x0)return;if(_0x1e5cd2>=_0x32f56e)throw new _0x4019ef('License\x20limit\x20exceeded:\x20'+_0x4aacff+'\x20('+_0x1e5cd2+'/'+_0x32f56e+')',_0x54c894(0x3b3),{'limit':_0x4aacff,'current':_0x1e5cd2,'max':_0x32f56e});}async['addLicense'](_0x152434){const _0x46abcc=_0x4df479;let _0x2e9b9e;try{_0x2e9b9e=_0x29162a[_0x46abcc(0x41b)](_0x152434);}catch(_0x395afc){throw new _0x4019ef(_0x46abcc(0x33e)+_0x395afc[_0x46abcc(0x264)],_0x46abcc(0x3d8));}let _0x4408d;try{_0x4408d=_0x10263a[_0x46abcc(0x25d)](null,_0x2e9b9e[_0x46abcc(0x231)],_0x4ce244[_0x46abcc(0x2d5)],_0x2e9b9e['sig']);}catch(_0x472835){throw new _0x4019ef(_0x46abcc(0x2c3)+_0x472835['message'],_0x46abcc(0x3d8));}if(!_0x4408d)throw new _0x4019ef(_0x46abcc(0x1e8)+(_0x46abcc(0x147)+_0x4ce244[_0x46abcc(0x132)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x46abcc(0x3d8),{'expectedFingerprint':_0x4ce244[_0x46abcc(0x132)]});if(_0x2e9b9e['decoded'][_0x46abcc(0x1ec)]===_0x13fa78){const _0x23b81d=_0x2e9b9e['decoded'][_0x46abcc(0x27a)]-_0x2e9b9e[_0x46abcc(0x1e0)][_0x46abcc(0x305)];if(_0x23b81d>_0x553580)throw new _0x4019ef('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math['ceil'](_0x23b81d/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x46abcc(0x3d8));}const _0x1848cb=this[_0x46abcc(0x35f)]['_systemEnv'];await _0x15c19b(_0x1848cb);const _0x46cbde=_0x29162a['licenseHash'](_0x2e9b9e[_0x46abcc(0x360)])[_0x46abcc(0x181)](_0x46abcc(0x1fa));for(const {value:_0x38e705}of _0x1848cb[_0x46abcc(0x268)](_0x4afb93)){if(_0x38e705[_0x46abcc(0x25c)]===_0x46cbde)throw new _0x4019ef(_0x46abcc(0x15c),_0x46abcc(0x3d8));}const _0x377fac=_0x10263a['randomUUID'](),_0x147cd0={'blob':_0x152434,'activation':null,'addedAt':Date[_0x46abcc(0x227)](),'_licenseHash':_0x46cbde,'licensee':_0x2e9b9e[_0x46abcc(0x1e0)][_0x46abcc(0x40d)],'expiresAt':_0x2e9b9e[_0x46abcc(0x1e0)][_0x46abcc(0x27a)],'features':_0x2e9b9e[_0x46abcc(0x1e0)][_0x46abcc(0x3f5)],'limits':_0x2e9b9e[_0x46abcc(0x1e0)]['limits'],'licenseType':_0x2e9b9e[_0x46abcc(0x1e0)][_0x46abcc(0x1ec)]};return await _0x1848cb[_0x46abcc(0x148)](_0x4afb93,_0x377fac,_0x147cd0),{'id':_0x377fac,..._0x147cd0};}async[_0x4df479(0x24e)](_0x378b0c){const _0x47d48=_0x4df479;let _0x1ce6bf;try{_0x1ce6bf=_0x29162a[_0x47d48(0x2ce)](_0x378b0c);}catch(_0x1099f9){throw new _0x4019ef('Invalid\x20activation\x20token:\x20'+_0x1099f9['message'],'LICENSE_ACTIVATION_INVALID');}const _0x1f5c4a=_0x1ce6bf[_0x47d48(0x13f)][_0x47d48(0x181)]('hex'),_0x596b34=this['okdb'][_0x47d48(0x2a1)];if(!_0x596b34||!_0x596b34[_0x47d48(0x347)](_0x4afb93))throw new _0x4019ef(_0x47d48(0x277),'LICENSE_ACTIVATION_INVALID');let _0x4f8ff1=null,_0x1514b2=null;for(const {key:_0x7beae5,value:_0x23fa8b}of _0x596b34[_0x47d48(0x268)](_0x4afb93)){if(_0x23fa8b['_licenseHash']===_0x1f5c4a){_0x4f8ff1=_0x7beae5,_0x1514b2=_0x23fa8b;break;}}if(!_0x4f8ff1)throw new _0x4019ef(_0x47d48(0x277),_0x47d48(0x154));const {rawBuf:_0xf8ca86}=_0x29162a[_0x47d48(0x41b)](_0x1514b2['blob']),_0x53765a=_0x29162a[_0x47d48(0x2a3)]({'tokenString':_0x378b0c,'nodeId':this[_0x47d48(0x35f)]['id'],'rawBlobBuf':_0xf8ca86,'pubKeyPem':_0x4ce244[_0x47d48(0x2d5)],'pubFingerprint':_0x4ce244['PUB_FINGERPRINT']});if(!_0x53765a[_0x47d48(0x3c7)])throw new _0x4019ef(_0x47d48(0x17f)+_0x53765a[_0x47d48(0x16b)],_0x47d48(0x154),{'reason':_0x53765a[_0x47d48(0x16b)]});const _0x1e0c7e={..._0x1514b2,'activation':_0x378b0c};return await _0x596b34[_0x47d48(0x249)](_0x4afb93,_0x4f8ff1,_0x1e0c7e),{'id':_0x4f8ff1,..._0x1e0c7e};}async[_0x4df479(0x2f4)](_0x1d6a00){const _0x2f5b2c=_0x4df479,_0x258afe=this[_0x2f5b2c(0x35f)][_0x2f5b2c(0x2a1)];if(!_0x258afe||!_0x258afe[_0x2f5b2c(0x347)](_0x4afb93))return;await _0x258afe[_0x2f5b2c(0x38d)](_0x4afb93,_0x1d6a00);}async[_0x4df479(0x335)](){const _0x9b0b22=_0x4df479,_0x39d9ee=this[_0x9b0b22(0x35f)]['_systemEnv'];if(!_0x39d9ee||!_0x39d9ee[_0x9b0b22(0x347)](_0x4afb93))return[];const _0x563419=this[_0x9b0b22(0x35f)]['id'],_0x5116c9=[];for(const {key:_0x5ef0f0,value:_0x580409}of _0x39d9ee['getRange'](_0x4afb93)){const _0x3b97d6=this[_0x9b0b22(0x366)](_0x580409,_0x563419);_0x5116c9[_0x9b0b22(0x2b4)]({..._0x580409,'id':_0x5ef0f0,'status':_0x3b97d6});}return _0x5116c9;}[_0x4df479(0x21e)](){const _0x126d64=_0x4df479,_0x44237e=this['okdb'][_0x126d64(0x2a1)];if(!_0x44237e||!_0x44237e[_0x126d64(0x347)](_0x4afb93))return[];const _0x1263cb=this[_0x126d64(0x35f)]['id'],_0x4d78de=[];for(const {key:_0x1e43aa,value:_0x2d9fae}of _0x44237e[_0x126d64(0x268)](_0x4afb93)){if(_0x2d9fae[_0x126d64(0x25c)]){if(_0x2d9fae[_0x126d64(0x1ec)]===_0x13fa78)_0x4d78de[_0x126d64(0x2b4)]({'licenseId':_0x1e43aa,'pin':null});else{const _0x57e6a2=Buffer[_0x126d64(0x19a)](_0x2d9fae[_0x126d64(0x25c)],_0x126d64(0x1fa)),{pin:_0x572467}=_0x29162a[_0x126d64(0x247)](_0x1263cb,_0x57e6a2,_0x4ce244['PUB_FINGERPRINT']);_0x4d78de[_0x126d64(0x2b4)]({'licenseId':_0x1e43aa,'pin':_0x572467});}}}return _0x4d78de;}async[_0x4df479(0x3c6)](){const _0x5b9fd1=_0x4df479,_0x2e93db=this[_0x5b9fd1(0x297)];await this[_0x5b9fd1(0x275)]();if(this[_0x5b9fd1(0x297)]&&this['_active'][_0x5b9fd1(0x1ec)]===_0x13fa78){const _0x136c8f=Math['ceil']((this[_0x5b9fd1(0x297)][_0x5b9fd1(0x27a)]-Date[_0x5b9fd1(0x227)]())/0x5265c00);this[_0x5b9fd1(0x35f)]['log']?.[_0x5b9fd1(0x1c2)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x136c8f+_0x5b9fd1(0x315),{'feature':'license','licensee':this[_0x5b9fd1(0x297)][_0x5b9fd1(0x40d)],'expiresAt':new Date(this[_0x5b9fd1(0x297)][_0x5b9fd1(0x27a)])[_0x5b9fd1(0x2b7)]()});}if(_0x2e93db&&!this[_0x5b9fd1(0x297)]){this[_0x5b9fd1(0x35f)][_0x5b9fd1(0x3ea)]?.['warn'](_0x5b9fd1(0x37a),{'feature':_0x5b9fd1(0x1b3)}),this[_0x5b9fd1(0x35f)][_0x5b9fd1(0x172)]?.['emit'](_0x3ebd06[_0x5b9fd1(0x3d8)],{'previous':_0x2e93db});const _0x13a050=this[_0x5b9fd1(0x35f)]['options']?.[_0x5b9fd1(0x222)]??_0x4ce244['LICENSE_EXPIRED_ACTION'];_0x13a050===_0x5b9fd1(0x23b)&&(this['okdb'][_0x5b9fd1(0x3ea)]?.[_0x5b9fd1(0x365)](_0x5b9fd1(0x1b0),{'feature':_0x5b9fd1(0x1b3)}),this['okdb']['close']()[_0x5b9fd1(0x30c)](()=>{})[_0x5b9fd1(0x325)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x1268ce,'_C':_0x4ce244},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x4f1ef7=_0xb5f572;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x390a87=require$$0$2,_0x5c602e=require$$1,_0x23f5f9=require$$2$1,_0x19dc3e=require$$3,_0x56bc01=_0x19dc3e[_0x4f1ef7(0x2f7)](_0x23f5f9['homedir'](),_0x4f1ef7(0x258)),_0x440196=0x3e8,_0x368d0f={'reset':_0x4f1ef7(0x176),'bold':_0x4f1ef7(0x1d2),'dim':_0x4f1ef7(0x158),'red':'\x1b[31m','green':'\x1b[32m','yellow':_0x4f1ef7(0x25a),'blue':_0x4f1ef7(0x2c9),'magenta':_0x4f1ef7(0x32b),'cyan':'\x1b[36m','white':'\x1b[37m','gray':_0x4f1ef7(0x352)},_0x3b8949=!process[_0x4f1ef7(0x136)][_0x4f1ef7(0x375)]||!!process.env.NO_COLOR,_0x28e5d2=(_0x46a0ca,_0x81d3f9)=>_0x3b8949?_0x81d3f9:''+_0x46a0ca+_0x81d3f9+_0x368d0f[_0x4f1ef7(0x290)],_0x172029={'error':_0x368d0f[_0x4f1ef7(0x1d5)],'warn':_0x368d0f[_0x4f1ef7(0x266)],'info':_0x368d0f['cyan'],'debug':_0x368d0f['gray']},_0x14785b={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x1f8e71(_0x41e912,_0x23a9b6=_0x4f1ef7(0x333)){const _0x53035d=_0x4f1ef7,{level:_0xe3590f,msg:_0x2aa01d,meta:_0x37a824,context:_0x34be57,ts:_0x4b2177}=_0x41e912;if((_0x14785b[_0xe3590f]??0x1)<(_0x14785b[_0x23a9b6]??0x1))return;const _0x36a966=_0x28e5d2(_0x368d0f['gray'],new Date(_0x4b2177)[_0x53035d(0x2b7)]()),_0x5b8d86=_0x28e5d2(_0x172029[_0xe3590f]??_0x368d0f[_0x53035d(0x3b9)],_0xe3590f[_0x53035d(0x1d1)](0x5));let _0x405c38='\x20\x20'+_0x36a966+'\x20'+_0x28e5d2(_0x368d0f['bold'],_0x5b8d86)+'\x20'+_0x2aa01d;if(_0x37a824&&Object[_0x53035d(0x284)](_0x37a824)[_0x53035d(0x1b1)]>0x0){const _0x1331b2=Object[_0x53035d(0x3a1)](_0x37a824)[_0x53035d(0x33d)](([_0x3bc293,_0x23246b])=>_0x3bc293+'='+_0x23246b)['join']('\x20');_0x405c38+=_0x28e5d2(_0x368d0f[_0x53035d(0x12f)],'\x20\x20['+_0x1331b2+']');}if(_0x34be57!==undefined){const _0x5ddbc2=typeof _0x34be57===_0x53035d(0x13a)?JSON[_0x53035d(0x3b2)](_0x34be57):String(_0x34be57);_0x405c38+=_0x28e5d2(_0x368d0f[_0x53035d(0x12f)],'\x20\x20'+_0x5ddbc2);}const _0x10f856=_0xe3590f===_0x53035d(0x365)||_0xe3590f===_0x53035d(0x1c2)?process[_0x53035d(0x2ac)][_0x53035d(0x251)][_0x53035d(0x3ca)](process[_0x53035d(0x2ac)]):process['stdout'][_0x53035d(0x251)]['bind'](process['stdout']);_0x10f856(_0x405c38+'\x0a');}function _0x484521(_0xeab7bf,_0x250562){const _0x34de63=_0x4f1ef7;if(_0xeab7bf===0xcc||_0xeab7bf>=0xc8&&_0xeab7bf<0x12c&&!_0x250562){console[_0x34de63(0x3ea)](_0x34de63(0x1eb)+_0x28e5d2(_0x368d0f[_0x34de63(0x3b0)],'✓')+'\x0a');return;}if(_0xeab7bf>=0x190||_0x250562?.[_0x34de63(0x365)]){const _0x15a5d8=_0x250562?.[_0x34de63(0x365)]??_0x250562?.['message']??'HTTP\x20'+_0xeab7bf;console[_0x34de63(0x3ea)](_0x34de63(0x1eb)+_0x28e5d2(_0x368d0f['red'],'✗')+'\x20'+_0x28e5d2(_0x368d0f[_0x34de63(0x29f)]+_0x368d0f[_0x34de63(0x1d5)],String(_0xeab7bf))+'\x20\x20'+_0x15a5d8+'\x0a');return;}const _0x465b53=Object[_0x34de63(0x30f)][_0x34de63(0x2b0)][_0x34de63(0x329)](_0x250562??{},'result')?_0x250562['result']:_0x250562,_0x1d5412=_0x250562?.[_0x34de63(0x165)];console[_0x34de63(0x3ea)](''),_0x22eb96(_0x465b53,'\x20\x20');if(_0x1d5412?.[_0x34de63(0x1ca)]!=null||_0x1d5412?.[_0x34de63(0x145)]!=null){const _0x5f1d1=[];if(_0x1d5412[_0x34de63(0x1ca)]!=null)_0x5f1d1['push'](_0x1d5412[_0x34de63(0x1ca)]+_0x34de63(0x1f6)+(_0x1d5412[_0x34de63(0x1ca)]!==0x1?'s':''));if(_0x1d5412['time']!=null)_0x5f1d1[_0x34de63(0x2b4)](_0x1d5412[_0x34de63(0x145)]+'ms');console[_0x34de63(0x3ea)](_0x34de63(0x1eb)+_0x28e5d2(_0x368d0f['dim'],_0x5f1d1[_0x34de63(0x2f7)](_0x34de63(0x3ae))));}console[_0x34de63(0x3ea)]('');}function _0x22eb96(_0x1ce28c,_0x628328=''){const _0x2acbdb=_0x4f1ef7;if(_0x1ce28c===null||_0x1ce28c===undefined){console[_0x2acbdb(0x3ea)](_0x628328+_0x28e5d2(_0x368d0f['dim'],_0x2acbdb(0x296)));return;}if(Array[_0x2acbdb(0x218)](_0x1ce28c)){if(_0x1ce28c['length']===0x0){console[_0x2acbdb(0x3ea)](_0x628328+_0x28e5d2(_0x368d0f[_0x2acbdb(0x12f)],'(empty)'));return;}if(_0x1ce28c[_0x2acbdb(0x18e)](_0x5c9452=>_0x5c9452&&typeof _0x5c9452===_0x2acbdb(0x13a)&&_0x2acbdb(0x1d9)in _0x5c9452&&_0x2acbdb(0x1fd)in _0x5c9452)){_0x412e4f(_0x1ce28c,_0x628328);return;}if(_0x1ce28c[_0x2acbdb(0x18e)](_0x4790c6=>_0x4790c6&&typeof _0x4790c6===_0x2acbdb(0x13a)&&'type'in _0x4790c6&&_0x2acbdb(0x1ca)in _0x4790c6)){_0x22ad13(_0x1ce28c,_0x628328);return;}if(_0x1ce28c['every'](_0x2ec296=>typeof _0x2ec296!==_0x2acbdb(0x13a)||_0x2ec296===null)){_0x1ce28c[_0x2acbdb(0x13c)]((_0x17ef1e,_0x496126)=>console[_0x2acbdb(0x3ea)](_0x628328+_0x28e5d2(_0x368d0f[_0x2acbdb(0x3a6)],_0x496126+0x1+'.')+'\x20'+_0x28e5d2(_0x368d0f[_0x2acbdb(0x3b9)],String(_0x17ef1e))));return;}_0x1ce28c[_0x2acbdb(0x13c)]((_0x9bd491,_0x23f684)=>{const _0xcc90f8=_0x2acbdb;console[_0xcc90f8(0x3ea)](_0x628328+_0x28e5d2(_0x368d0f[_0xcc90f8(0x12f)],'['+_0x23f684+']'));if(typeof _0x9bd491===_0xcc90f8(0x13a)&&_0x9bd491!==null)_0x59f83c(_0x9bd491,_0x628328+'\x20\x20');else console['log'](_0x628328+'\x20\x20'+String(_0x9bd491));});return;}if(typeof _0x1ce28c===_0x2acbdb(0x13a)){if('key'in _0x1ce28c&&_0x2acbdb(0x1fd)in _0x1ce28c&&Object[_0x2acbdb(0x284)](_0x1ce28c)[_0x2acbdb(0x1b1)]<=0x3){console['log'](_0x628328+_0x28e5d2(_0x368d0f['bold']+_0x368d0f[_0x2acbdb(0x127)],String(_0x1ce28c[_0x2acbdb(0x1d9)])));const _0x13bc93=_0x1ce28c[_0x2acbdb(0x1fd)];if(_0x13bc93&&typeof _0x13bc93==='object')_0x59f83c(_0x13bc93,_0x628328);else console[_0x2acbdb(0x3ea)](_0x628328+_0x28e5d2(_0x368d0f[_0x2acbdb(0x3b9)],String(_0x13bc93)));return;}_0x59f83c(_0x1ce28c,_0x628328);return;}console[_0x2acbdb(0x3ea)](_0x628328+_0x28e5d2(_0x368d0f[_0x2acbdb(0x3b9)],String(_0x1ce28c)));}function _0x59f83c(_0x5c1161,_0x438ee6=''){const _0x56916f=_0x4f1ef7,_0x5df33b=Object[_0x56916f(0x3a1)](_0x5c1161);if(_0x5df33b[_0x56916f(0x1b1)]===0x0){console[_0x56916f(0x3ea)](_0x438ee6+_0x28e5d2(_0x368d0f['dim'],'{}'));return;}const _0x1f5bb0=Math['min'](0x1c,Math['max'](..._0x5df33b[_0x56916f(0x33d)](([_0x2ac583])=>_0x2ac583[_0x56916f(0x1b1)])));for(const [_0x8bed1d,_0x30d611]of _0x5df33b){const _0x141682=_0x28e5d2(_0x368d0f['cyan'],_0x8bed1d[_0x56916f(0x1d1)](_0x1f5bb0));if(_0x30d611===null||_0x30d611===undefined)console[_0x56916f(0x3ea)](_0x438ee6+_0x141682+'\x20\x20'+_0x28e5d2(_0x368d0f['dim'],'null'));else{if(typeof _0x30d611===_0x56916f(0x13a)){const _0x469379=JSON['stringify'](_0x30d611);_0x469379[_0x56916f(0x1b1)]<=0x50?console[_0x56916f(0x3ea)](_0x438ee6+_0x141682+'\x20\x20'+_0x28e5d2(_0x368d0f['dim'],_0x469379)):(console[_0x56916f(0x3ea)](_0x438ee6+_0x141682),_0x22eb96(_0x30d611,_0x438ee6+'\x20\x20'));}else{const _0x52952b=typeof _0x30d611===_0x56916f(0x236)?_0x28e5d2(_0x30d611?_0x368d0f[_0x56916f(0x3b0)]:_0x368d0f[_0x56916f(0x266)],String(_0x30d611)):typeof _0x30d611==='number'?_0x28e5d2(_0x368d0f[_0x56916f(0x28f)],String(_0x30d611)):_0x28e5d2(_0x368d0f[_0x56916f(0x3b9)],String(_0x30d611));console[_0x56916f(0x3ea)](_0x438ee6+_0x141682+'\x20\x20'+_0x52952b);}}}}function _0x412e4f(_0x42e041,_0xfae66d=''){const _0x32ee79=_0x4f1ef7,_0x39942a=Math[_0x32ee79(0x274)](0x20,Math[_0x32ee79(0x2b2)](..._0x42e041[_0x32ee79(0x33d)](_0x2f15bb=>String(_0x2f15bb[_0x32ee79(0x1d9)])[_0x32ee79(0x1b1)])));for(const {key:_0x576356,value:_0x344889,score:_0x908123,clock:_0x45a288}of _0x42e041){const _0x34ea33=_0x28e5d2(_0x368d0f[_0x32ee79(0x29f)]+_0x368d0f[_0x32ee79(0x127)],String(_0x576356)['padEnd'](_0x39942a)),_0x428e80=_0x344889==null?_0x28e5d2(_0x368d0f[_0x32ee79(0x12f)],_0x32ee79(0x27b)):typeof _0x344889==='object'?_0x28e5d2(_0x368d0f[_0x32ee79(0x12f)],JSON[_0x32ee79(0x3b2)](_0x344889)):_0x28e5d2(_0x368d0f[_0x32ee79(0x3b9)],String(_0x344889)),_0x1bced0=_0x908123!=null?_0x28e5d2(_0x368d0f[_0x32ee79(0x3a6)],_0x32ee79(0x3fc)+_0x908123[_0x32ee79(0x336)](0x4)):'',_0x227c38=_0x45a288!=null?_0x28e5d2(_0x368d0f[_0x32ee79(0x3a6)],_0x32ee79(0x30e)+_0x45a288):'';console[_0x32ee79(0x3ea)](_0xfae66d+_0x34ea33+'\x20\x20'+_0x428e80+_0x1bced0+_0x227c38);}}function _0x22ad13(_0xea9e98,_0x180ce5=''){const _0x389e05=_0x4f1ef7,_0x5cbd3c=Math[_0x389e05(0x274)](0x20,Math['max'](..._0xea9e98[_0x389e05(0x33d)](_0x46a4fd=>_0x46a4fd[_0x389e05(0x187)][_0x389e05(0x1b1)])));for(const {type:_0x15a0ef,count:_0x370112,fields:_0x445d8c}of _0xea9e98){if(_0x15a0ef[_0x389e05(0x143)]('~'))continue;const _0x3466b1=_0x28e5d2(_0x368d0f[_0x389e05(0x29f)]+_0x368d0f['cyan'],_0x15a0ef[_0x389e05(0x1d1)](_0x5cbd3c)),_0x4d9473=_0x28e5d2(_0x368d0f[_0x389e05(0x28f)],String(_0x370112)[_0x389e05(0x140)](0x6))+_0x28e5d2(_0x368d0f[_0x389e05(0x12f)],'\x20records'),_0x4e9254=_0x445d8c&&Object[_0x389e05(0x284)](_0x445d8c)[_0x389e05(0x1b1)]?_0x28e5d2(_0x368d0f[_0x389e05(0x12f)],_0x389e05(0x144)+Object[_0x389e05(0x284)](_0x445d8c)[_0x389e05(0x3a7)](0x0,0x6)[_0x389e05(0x2f7)](',\x20')+(Object[_0x389e05(0x284)](_0x445d8c)[_0x389e05(0x1b1)]>0x6?'…':'')):'';console[_0x389e05(0x3ea)](_0x180ce5+_0x3466b1+'\x20\x20'+_0x4d9473+_0x4e9254);}}const _0x3cadab=[_0x4f1ef7(0x31e),_0x4f1ef7(0x238),'queue/',_0x4f1ef7(0x1b7),_0x4f1ef7(0x19f),_0x4f1ef7(0x34d)];function _0x24d5aa(_0xfc7968,_0x2d0fc8){const _0x126730=_0x4f1ef7;if(_0xfc7968[_0x126730(0x143)](_0x126730(0x14a)))return _0xfc7968;if(_0xfc7968[_0x126730(0x143)]('/'))return _0x126730(0x1d7)+_0xfc7968;if(_0xfc7968['startsWith'](_0x126730(0x280)))return _0x126730(0x14a)+_0xfc7968;const _0x2de163=_0x3cadab[_0x126730(0x15a)](_0x39ecec=>_0xfc7968===_0x39ecec[_0x126730(0x27d)](/\/$/,'')||_0xfc7968[_0x126730(0x143)](_0x39ecec));return _0x2de163?_0x126730(0x370)+_0x2d0fc8+'/'+_0xfc7968:'/api/'+_0xfc7968;}function _0x19fb70(_0x5ddff2){const _0x1db32e=_0x4f1ef7,_0x595d39={},_0x45d36e=[];let _0x24834a=0x0;while(_0x24834a<_0x5ddff2['length']){if((_0x5ddff2[_0x24834a]===_0x1db32e(0x180)||_0x5ddff2[_0x24834a]==='-e')&&_0x5ddff2[_0x24834a+0x1]&&!_0x5ddff2[_0x24834a+0x1]['startsWith']('-'))_0x595d39[_0x1db32e(0x387)]=_0x5ddff2[++_0x24834a];else _0x5ddff2[_0x24834a]===_0x1db32e(0x224)||_0x5ddff2[_0x24834a]==='-h'?_0x595d39['help']=!![]:_0x45d36e[_0x1db32e(0x2b4)](_0x5ddff2[_0x24834a]);_0x24834a++;}return{'flags':_0x595d39,'rest':_0x45d36e};}const _0x34535f={'system':_0x4f1ef7(0x367),'envs':'Environments','types':'Types','data':_0x4f1ef7(0x278),'indexes':_0x4f1ef7(0x3ab),'fts':_0x4f1ef7(0x1d0),'sync':'Sync','queue':'Queue','files':_0x4f1ef7(0x18f),'embeddings':'Embeddings','engines':_0x4f1ef7(0x341),'admin':'Admin','event':_0x4f1ef7(0x139),'processor':'Processors'},_0x14f8da=[_0x4f1ef7(0x35e),_0x4f1ef7(0x37e),'types',_0x4f1ef7(0x1d3),'indexes',_0x4f1ef7(0x208),_0x4f1ef7(0x382),_0x4f1ef7(0x209),_0x4f1ef7(0x153),_0x4f1ef7(0x3fa),_0x4f1ef7(0x3c9),_0x4f1ef7(0x354)];function _0xe47d1e(_0xcc3f7b){const _0x3d5e74=_0x4f1ef7;return _0xcc3f7b['replace'](/^\/api/,'')[_0x3d5e74(0x27d)](/^\[\/env\/:env=[^\]]*\]/,_0x3d5e74(0x3c1))[_0x3d5e74(0x27d)](/^\/env\/:env/,_0x3d5e74(0x287))[_0x3d5e74(0x27d)](/^\//,'');}function _0x4a1413(_0x233bb2,_0x5af487=''){const _0x326452=_0x4f1ef7,_0x5473e3=_0x233bb2['http'][_0x326452(0x3f1)]()[_0x326452(0x267)](_0x1c701e=>!_0x1c701e['meta']?.['hidden']),_0x374945=_0x5af487?_0x5473e3['filter'](_0x10377b=>_0x10377b['path']['toLowerCase']()[_0x326452(0x294)](_0x5af487[_0x326452(0x1ef)]())||(_0x3803af(_0x10377b)??'')[_0x326452(0x1ef)]()[_0x326452(0x294)](_0x5af487[_0x326452(0x1ef)]())||_0x1abf3f(_0x10377b)[_0x326452(0x15a)](_0x4c3d45=>_0x4c3d45[_0x326452(0x1ef)]()[_0x326452(0x294)](_0x5af487[_0x326452(0x1ef)]()))):_0x5473e3;if(!_0x374945[_0x326452(0x1b1)]){console[_0x326452(0x3ea)](_0x28e5d2(_0x368d0f[_0x326452(0x266)],_0x326452(0x3ad)+_0x5af487+'\x22\x0a'));return;}const _0x32ce2f=new Map();for(const _0x522615 of _0x374945){const _0x3b9b73=_0x1abf3f(_0x522615)[0x0]??_0x326452(0x38a);if(!_0x32ce2f[_0x326452(0x2ed)](_0x3b9b73))_0x32ce2f[_0x326452(0x135)](_0x3b9b73,[]);_0x32ce2f[_0x326452(0x17a)](_0x3b9b73)['push'](_0x522615);}const _0x35d519=[..._0x14f8da[_0x326452(0x267)](_0x3ce836=>_0x32ce2f['has'](_0x3ce836)),...[..._0x32ce2f[_0x326452(0x284)]()][_0x326452(0x267)](_0x2954a9=>!_0x14f8da[_0x326452(0x294)](_0x2954a9))];console[_0x326452(0x3ea)]('');for(const _0xa700f4 of _0x35d519){const _0x43bb7d=_0x32ce2f[_0x326452(0x17a)](_0xa700f4);if(!_0x43bb7d?.[_0x326452(0x1b1)])continue;console[_0x326452(0x3ea)](_0x28e5d2(_0x368d0f[_0x326452(0x29f)],'\x20\x20'+(_0x34535f[_0xa700f4]??_0xa700f4)));for(const _0xd241b of _0x43bb7d){const _0x1b7740=_0x28e5d2(_0x368d0f[_0x326452(0x28f)],_0xd241b[_0x326452(0x26e)][_0x326452(0x1d1)](0x7)),_0xb42cfd=_0x28e5d2(_0x368d0f['cyan'],_0xe47d1e(_0xd241b['path'])),_0x535dcc=_0x3803af(_0xd241b)?_0x28e5d2(_0x368d0f['dim'],'\x20\x20'+_0x3803af(_0xd241b)):'',_0x51c094=_0xd241b[_0x326452(0x25e)]?.['id']?_0x28e5d2(_0x368d0f[_0x326452(0x3a6)],'\x20\x20['+_0xd241b['operation']['id']+']'):'';console[_0x326452(0x3ea)](_0x326452(0x198)+_0x1b7740+'\x20'+_0xb42cfd+_0x535dcc+_0x51c094);}console['log']('');}}function _0x1f195d(_0x5b01b7,_0x4b21be){const _0x30dbfd=_0x4f1ef7,_0x474198=_0x4b21be[_0x30dbfd(0x27d)](/^\/api(\/env\/[^/]+)?\//,'')[_0x30dbfd(0x253)]('/')[0x0],_0x52f7a1=_0x5b01b7[_0x30dbfd(0x31c)][_0x30dbfd(0x3f1)]()[_0x30dbfd(0x267)](_0x11eb75=>_0x11eb75[_0x30dbfd(0x3ed)][_0x30dbfd(0x1ef)]()[_0x30dbfd(0x294)](_0x474198[_0x30dbfd(0x1ef)]()));if(!_0x52f7a1[_0x30dbfd(0x1b1)]){console[_0x30dbfd(0x3ea)](_0x28e5d2(_0x368d0f[_0x30dbfd(0x266)],_0x30dbfd(0x40b)+_0x4b21be+'\x0a'));return;}console['log']('');for(const _0x245632 of _0x52f7a1[_0x30dbfd(0x3a7)](0x0,0xc)){for(const _0x317c42 of _0xf34179(_0x245632)){console[_0x30dbfd(0x3ea)](_0x317c42);}console['log']('');}}function _0x3803af(_0x34aaa4){const _0x3807f4=_0x4f1ef7;return _0x34aaa4[_0x3807f4(0x25e)]?.[_0x3807f4(0x169)]??_0x34aaa4[_0x3807f4(0x165)]?.[_0x3807f4(0x169)]??'';}function _0x4e1abf(_0x20b4c1){const _0x48110b=_0x4f1ef7;return _0x20b4c1['operation']?.[_0x48110b(0x343)]??_0x20b4c1[_0x48110b(0x165)]?.[_0x48110b(0x343)]??'';}function _0x1abf3f(_0x619e7){const _0x14b1e6=_0x4f1ef7;return _0x619e7[_0x14b1e6(0x25e)]?.[_0x14b1e6(0x2a6)]?.[_0x14b1e6(0x1b1)]?_0x619e7[_0x14b1e6(0x25e)][_0x14b1e6(0x2a6)]:_0x619e7[_0x14b1e6(0x165)]?.['tags']??[];}function _0xf34179(_0x53bb53){const _0xabc9fd=_0x4f1ef7,_0x1ed0f6=[];_0x1ed0f6[_0xabc9fd(0x2b4)]('\x20\x20'+_0x28e5d2(_0x368d0f['bold']+_0x368d0f[_0xabc9fd(0x28f)],_0x53bb53[_0xabc9fd(0x26e)][_0xabc9fd(0x1d1)](0x7))+'\x20'+_0x28e5d2(_0x368d0f['bold']+_0x368d0f[_0xabc9fd(0x127)],_0x53bb53[_0xabc9fd(0x3ed)]));_0x53bb53[_0xabc9fd(0x25e)]?.['id']&&_0x1ed0f6[_0xabc9fd(0x2b4)](_0xabc9fd(0x2e5)+_0x28e5d2(_0x368d0f[_0xabc9fd(0x3a6)],_0xabc9fd(0x192)+_0x53bb53[_0xabc9fd(0x25e)]['id']));_0x3803af(_0x53bb53)&&_0x1ed0f6[_0xabc9fd(0x2b4)](_0xabc9fd(0x2e5)+_0x28e5d2(_0x368d0f[_0xabc9fd(0x3b9)],_0x3803af(_0x53bb53)));_0x4e1abf(_0x53bb53)&&_0x1ed0f6[_0xabc9fd(0x2b4)](_0xabc9fd(0x2e5)+_0x28e5d2(_0x368d0f[_0xabc9fd(0x12f)],_0x4e1abf(_0x53bb53)));_0x1abf3f(_0x53bb53)['length']&&_0x1ed0f6[_0xabc9fd(0x2b4)](_0xabc9fd(0x2e5)+_0x28e5d2(_0x368d0f[_0xabc9fd(0x3a6)],_0xabc9fd(0x403)+_0x1abf3f(_0x53bb53)[_0xabc9fd(0x2f7)](',\x20')));_0x53bb53[_0xabc9fd(0x25e)]?.['safety']?.[_0xabc9fd(0x1be)]&&_0x1ed0f6['push'](_0xabc9fd(0x2e5)+_0x28e5d2(_0x368d0f['gray'],_0xabc9fd(0x398)+_0x53bb53[_0xabc9fd(0x25e)][_0xabc9fd(0x21f)][_0xabc9fd(0x1be)]));_0x53bb53[_0xabc9fd(0x25e)]?.[_0xabc9fd(0x31c)]?.[_0xabc9fd(0x1ff)]&&_0x53bb53[_0xabc9fd(0x25e)][_0xabc9fd(0x31c)]['transport']!==_0xabc9fd(0x3f2)&&_0x1ed0f6[_0xabc9fd(0x2b4)](_0xabc9fd(0x2e5)+_0x28e5d2(_0x368d0f['gray'],_0xabc9fd(0x2da)+_0x53bb53[_0xabc9fd(0x25e)][_0xabc9fd(0x31c)][_0xabc9fd(0x1ff)]));if(_0x53bb53['operation']?.['inputSchema']){const _0x4d9c54=Object[_0xabc9fd(0x284)](_0x53bb53[_0xabc9fd(0x25e)]['inputSchema'][_0xabc9fd(0x155)]||{});if(_0x4d9c54[_0xabc9fd(0x1b1)])_0x1ed0f6['push'](_0xabc9fd(0x2e5)+_0x28e5d2(_0x368d0f['gray'],_0xabc9fd(0x41d)+_0x4d9c54[_0xabc9fd(0x2f7)](',\x20')));}return _0x53bb53[_0xabc9fd(0x165)]?.[_0xabc9fd(0x3df)]&&_0x1ed0f6[_0xabc9fd(0x2b4)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x28e5d2(_0x368d0f[_0xabc9fd(0x3a6)],_0xabc9fd(0x2b9)+JSON[_0xabc9fd(0x3b2)](_0x53bb53['meta']['body']))),_0x1ed0f6;}async function _0x454305(_0x3c2cea,_0x3aab19,_0xe3b35,_0x573980=null){const _0x246653=_0x4f1ef7,_0x3b1fd2=_0xe3b35[_0x246653(0x357)]('?'),_0x14cfae=_0x3b1fd2>=0x0?_0xe3b35[_0x246653(0x3a7)](0x0,_0x3b1fd2):_0xe3b35,_0x2289b7=_0x3b1fd2>=0x0?_0xe3b35['slice'](_0x3b1fd2+0x1):'',_0xf827dd=Object[_0x246653(0x3be)](new URLSearchParams(_0x2289b7)[_0x246653(0x3a1)]());return _0x3c2cea[_0x246653(0x31c)]['handle'](_0x3aab19,_0x14cfae,{'body':_0x573980,'query':_0xf827dd,'headers':{'content-type':_0x246653(0x313)}},{'internal':!![]});}function _0x53fba2(_0x5129c4){const _0x9af33=_0x4f1ef7;if(!_0x5129c4)return null;const _0x19af38=_0x5129c4[_0x9af33(0x134)]();if(!_0x19af38)return null;try{return JSON['parse'](_0x19af38);}catch{}try{return JSON[_0x9af33(0x35a)](_0x588720(_0x19af38));}catch(_0x407494){throw new SyntaxError(_0x407494[_0x9af33(0x264)],{'cause':_0x407494});}}function _0x588720(_0x3524e9){const _0x140ea9=_0x4f1ef7;let _0x334eac='',_0x4ea8bb=0x0;while(_0x4ea8bb<_0x3524e9['length']){const _0x4b93ff=_0x3524e9[_0x4ea8bb];if(_0x4b93ff==='\x22'){_0x334eac+='\x22',_0x4ea8bb++;while(_0x4ea8bb<_0x3524e9[_0x140ea9(0x1b1)]&&_0x3524e9[_0x4ea8bb]!=='\x22'){if(_0x3524e9[_0x4ea8bb]==='\x5c'){_0x334eac+=_0x3524e9[_0x4ea8bb++];if(_0x4ea8bb<_0x3524e9['length'])_0x334eac+=_0x3524e9[_0x4ea8bb++];}else _0x334eac+=_0x3524e9[_0x4ea8bb++];}_0x334eac+='\x22';if(_0x4ea8bb<_0x3524e9[_0x140ea9(0x1b1)])_0x4ea8bb++;continue;}if(_0x4b93ff==='\x27'){_0x334eac+='\x22',_0x4ea8bb++;while(_0x4ea8bb<_0x3524e9[_0x140ea9(0x1b1)]&&_0x3524e9[_0x4ea8bb]!=='\x27'){if(_0x3524e9[_0x4ea8bb]==='\x5c'&&_0x3524e9[_0x4ea8bb+0x1]==='\x27')_0x334eac+='\x27',_0x4ea8bb+=0x2;else _0x3524e9[_0x4ea8bb]==='\x22'?(_0x334eac+='\x5c\x22',_0x4ea8bb++):_0x334eac+=_0x3524e9[_0x4ea8bb++];}_0x334eac+='\x22';if(_0x4ea8bb<_0x3524e9['length'])_0x4ea8bb++;continue;}if(_0x140ea9(0x317)[_0x140ea9(0x294)](_0x4b93ff)){_0x334eac+=_0x4b93ff,_0x4ea8bb++;continue;}let _0x1064cb='';while(_0x4ea8bb<_0x3524e9[_0x140ea9(0x1b1)]&&!'{}[]:,\x27\x22'['includes'](_0x3524e9[_0x4ea8bb])&&_0x3524e9[_0x4ea8bb]!=='\x20'&&_0x3524e9[_0x4ea8bb]!=='\x09'&&_0x3524e9[_0x4ea8bb]!=='\x0a'&&_0x3524e9[_0x4ea8bb]!=='\x0d'){_0x1064cb+=_0x3524e9[_0x4ea8bb++];}let _0x52afe6=_0x4ea8bb;while(_0x52afe6<_0x3524e9[_0x140ea9(0x1b1)]&&(_0x3524e9[_0x52afe6]==='\x20'||_0x3524e9[_0x52afe6]==='\x09'))_0x52afe6++;if(_0x3524e9[_0x52afe6]===':')_0x334eac+='\x22'+_0x1064cb+'\x22';else _0x1064cb==='true'||_0x1064cb===_0x140ea9(0x34f)||_0x1064cb==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x140ea9(0x39b)](_0x1064cb)?_0x334eac+=_0x1064cb:_0x334eac+='\x22'+_0x1064cb+'\x22';}return _0x334eac['replace'](/,(\s*[}\]])/g,'$1');}function _0x2ac32d(_0x242f59){const _0x111f70=_0x4f1ef7,_0x4bae6d=[];let _0x154a01=0x0;while(_0x154a01<_0x242f59[_0x111f70(0x1b1)]){while(_0x154a01<_0x242f59[_0x111f70(0x1b1)]&&(_0x242f59[_0x154a01]==='\x20'||_0x242f59[_0x154a01]==='\x09'))_0x154a01++;if(_0x154a01>=_0x242f59[_0x111f70(0x1b1)])break;const _0x2c11fc=_0x242f59[_0x154a01];if(_0x2c11fc==='{'||_0x2c11fc==='['){const _0x44cd01=_0x2c11fc==='{'?'}':']',_0x39592b=_0x154a01++;let _0x419049=0x1,_0x1f36b2=![],_0x1f4209='';while(_0x154a01<_0x242f59[_0x111f70(0x1b1)]&&_0x419049>0x0){const _0x2cdcf7=_0x242f59[_0x154a01];if(_0x1f36b2){if(_0x2cdcf7==='\x5c')_0x154a01++;else{if(_0x2cdcf7===_0x1f4209)_0x1f36b2=![];}}else{if(_0x2cdcf7==='\x22'||_0x2cdcf7==='\x27')_0x1f36b2=!![],_0x1f4209=_0x2cdcf7;else{if(_0x2cdcf7===_0x2c11fc)_0x419049++;else{if(_0x2cdcf7===_0x44cd01)_0x419049--;}}}_0x154a01++;}_0x4bae6d[_0x111f70(0x2b4)](_0x242f59[_0x111f70(0x3a7)](_0x39592b,_0x154a01));continue;}if(_0x2c11fc==='\x22'||_0x2c11fc==='\x27'){const _0x599283=_0x2c11fc;_0x154a01++;let _0x3ebd36='';while(_0x154a01<_0x242f59[_0x111f70(0x1b1)]&&_0x242f59[_0x154a01]!==_0x599283){if(_0x242f59[_0x154a01]==='\x5c'&&_0x154a01+0x1<_0x242f59[_0x111f70(0x1b1)])_0x154a01++,_0x3ebd36+=_0x242f59[_0x154a01++];else _0x3ebd36+=_0x242f59[_0x154a01++];}if(_0x154a01<_0x242f59[_0x111f70(0x1b1)])_0x154a01++;_0x4bae6d[_0x111f70(0x2b4)](_0x3ebd36);continue;}let _0x3fdce2='';while(_0x154a01<_0x242f59[_0x111f70(0x1b1)]&&_0x242f59[_0x154a01]!=='\x20'&&_0x242f59[_0x154a01]!=='\x09'&&_0x242f59[_0x154a01]!=='{'&&_0x242f59[_0x154a01]!=='['){_0x3fdce2+=_0x242f59[_0x154a01++];}if(_0x3fdce2)_0x4bae6d['push'](_0x3fdce2);}return _0x4bae6d;}function _0x414136(_0xd6df51,_0x4b65bd){const _0x1e3107=_0x4f1ef7,_0xebaa4f=[..._0xd6df51[_0x1e3107(0x323)]['keys']()][_0x1e3107(0x267)](_0x582874=>!_0x582874[_0x1e3107(0x143)]('~'));console['log'](['',_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)]+_0x368d0f[_0x1e3107(0x127)],_0x1e3107(0x1e1)),_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)]+_0x368d0f[_0x1e3107(0x127)],_0x1e3107(0x1e5))+_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)],_0x1e3107(0x2fd))+_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)]+_0x368d0f[_0x1e3107(0x127)],'║'),_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)]+_0x368d0f['cyan'],_0x1e3107(0x316)),'','\x20\x20'+_0x28e5d2(_0x368d0f[_0x1e3107(0x3b0)],'✓')+'\x20'+_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)],_0x1e3107(0x388))+_0x1e3107(0x299)+_0x4b65bd[_0x1e3107(0x234)],'\x20\x20'+_0x28e5d2(_0x368d0f['green'],'✓')+'\x20'+_0x28e5d2(_0x368d0f['bold'],_0x1e3107(0x196))+_0x1e3107(0x424)+_0x4b65bd[_0x1e3107(0x234)]+_0x1e3107(0x1d7),'\x20\x20'+_0x28e5d2(_0x368d0f[_0x1e3107(0x3b0)],'✓')+'\x20'+_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)],'path')+'\x20\x20\x20\x20'+_0x4b65bd['dbPath'],'\x20\x20'+_0x28e5d2(_0x368d0f['green'],'✓')+'\x20'+_0x28e5d2(_0x368d0f['bold'],'id')+_0x1e3107(0x12b)+_0x28e5d2(_0x368d0f['gray'],_0xd6df51['id']),'\x20\x20'+_0x28e5d2(_0x368d0f['green'],'✓')+'\x20'+_0x28e5d2(_0x368d0f['bold'],_0x1e3107(0x37e))+_0x1e3107(0x198)+_0xebaa4f[_0x1e3107(0x33d)](_0x17aec9=>_0x28e5d2(_0x368d0f[_0x1e3107(0x127)],_0x17aec9))['join']('\x20\x20'),..._0x4b65bd[_0x1e3107(0x25f)]?[]:['\x20\x20'+_0x28e5d2(_0x368d0f[_0x1e3107(0x3b0)],'✓')+'\x20'+_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)],'admin')+'\x20\x20\x20http://localhost:'+_0x4b65bd['port']+'/admin/index.html'],'',_0x28e5d2(_0x368d0f[_0x1e3107(0x12f)],_0x1e3107(0x340)+_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)],_0x1e3107(0x3a4))+_0x1e3107(0x3de)+_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)],_0x1e3107(0x146))+_0x1e3107(0x308)+_0x28e5d2(_0x368d0f[_0x1e3107(0x29f)],'exit')+'\x20to\x20quit.'),'']['join']('\x0a'));}function _0x583f8f(_0x4e76e2){const _0x5acfce=_0x4f1ef7;console[_0x5acfce(0x3ea)]('\x0a'+_0x28e5d2(_0x368d0f['bold'],_0x5acfce(0x2ec))+'\x20\x20'+_0x28e5d2(_0x368d0f['dim'],_0x5acfce(0x1a7))+'\x0a\x0a\x20\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],'<path>')+_0x5acfce(0x226)+_0x28e5d2(_0x368d0f['cyan'],_0x5acfce(0x307))+'\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x266)],_0x5acfce(0x399))+_0x5acfce(0x24b)+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],'VERB')+'\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],_0x5acfce(0x307))+'\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x266)],'[body]')+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x12f)],'Examples')+_0x5acfce(0x1aa)+_0x28e5d2(_0x368d0f[_0x5acfce(0x3a6)],_0x5acfce(0x333))+_0x5acfce(0x3d9)+_0x28e5d2(_0x368d0f[_0x5acfce(0x3a6)],'envs')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x3a6)],_0x5acfce(0x31e))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x4e76e2['env']+_0x5acfce(0x2d4)+_0x28e5d2(_0x368d0f['gray'],_0x5acfce(0x1e3))+_0x5acfce(0x1d8)+_0x4e76e2[_0x5acfce(0x387)]+_0x5acfce(0x35c)+_0x28e5d2(_0x368d0f['gray'],_0x5acfce(0x310))+_0x5acfce(0x2d1)+_0x4e76e2[_0x5acfce(0x387)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x28e5d2(_0x368d0f['gray'],_0x5acfce(0x37c))+_0x5acfce(0x41e)+_0x4e76e2[_0x5acfce(0x387)]+_0x5acfce(0x199)+_0x28e5d2(_0x368d0f[_0x5acfce(0x3a6)],_0x5acfce(0x34b))+_0x5acfce(0x1aa)+_0x28e5d2(_0x368d0f[_0x5acfce(0x3a6)],_0x5acfce(0x350))+_0x5acfce(0x1aa)+_0x28e5d2(_0x368d0f[_0x5acfce(0x3a6)],_0x5acfce(0x2de))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a'+_0x28e5d2(_0x368d0f[_0x5acfce(0x29f)],_0x5acfce(0x331))+'\x20\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x12f)],_0x5acfce(0x270))+_0x5acfce(0x2e1)+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],_0x5acfce(0x1f9))+_0x5acfce(0x152)+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],'--help')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x12f)],_0x5acfce(0x3ef))+'\x0a\x20\x20\x20\x20'+_0x28e5d2(_0x368d0f['gray'],_0x5acfce(0x213))+_0x5acfce(0x1aa)+_0x28e5d2(_0x368d0f[_0x5acfce(0x3a6)],_0x5acfce(0x3ee))+_0x5acfce(0x1aa)+_0x28e5d2(_0x368d0f['gray'],'type/users\x20--help')+'\x0a\x0a'+_0x28e5d2(_0x368d0f[_0x5acfce(0x29f)],'\x20\x20Shell\x20commands')+_0x5acfce(0x2e1)+_0x28e5d2(_0x368d0f['cyan'],_0x5acfce(0x2dc))+_0x5acfce(0x1f5)+_0x28e5d2(_0x368d0f['cyan'],_0x5acfce(0x387))+_0x5acfce(0x2be)+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],_0x5acfce(0x146))+'\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x12f)],'[filter]')+_0x5acfce(0x1a0)+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],_0x5acfce(0x1e4))+'\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x12f)],_0x5acfce(0x1c7))+_0x5acfce(0x2f1)+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],'open')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],'help')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20'+_0x28e5d2(_0x368d0f[_0x5acfce(0x127)],_0x5acfce(0x311))+'\x20'+_0x28e5d2(_0x368d0f['dim'],_0x5acfce(0x363))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}async function _0x26f481(_0x18e15a,_0x1808f2=0x0){const _0x32189a=_0x4f1ef7;process[_0x32189a(0x136)][_0x32189a(0x251)]('\x0a'),console[_0x32189a(0x3ea)](_0x28e5d2(_0x368d0f[_0x32189a(0x266)],_0x32189a(0x415)));try{await _0x18e15a[_0x32189a(0x16c)]();}catch(_0x306986){console['error'](_0x28e5d2(_0x368d0f[_0x32189a(0x1d5)],'\x20\x20'+_0x306986[_0x32189a(0x264)]));}process[_0x32189a(0x311)](_0x1808f2);}function _0x4d3263(_0x2b5246){const _0x3cf3d3=_0x4f1ef7,_0x312ef0=_0x2b5246[_0x3cf3d3(0x387)]!==_0x3cf3d3(0x195)?_0x28e5d2(_0x368d0f[_0x3cf3d3(0x266)],'['+_0x2b5246[_0x3cf3d3(0x387)]+']'):'';return _0x28e5d2(_0x368d0f[_0x3cf3d3(0x29f)]+_0x368d0f[_0x3cf3d3(0x127)],_0x3cf3d3(0x35f))+_0x312ef0+_0x28e5d2(_0x368d0f[_0x3cf3d3(0x3a6)],'>\x20');}const _0x5b9959=new Set([_0x4f1ef7(0x37b),_0x4f1ef7(0x2d0),_0x4f1ef7(0x12e),_0x4f1ef7(0x1b5),'DELETE']);async function _0x7cf666(_0xe73b89,_0x434298,_0x2b286c,_0x2881e9,_0x25ca59,_0x64a374){const _0x53e52f=_0x4f1ef7;_0xe73b89=_0xe73b89['trim']();if(!_0xe73b89||_0xe73b89[_0x53e52f(0x143)]('#'))return;const _0x4b6474=_0x2ac32d(_0xe73b89),{flags:_0x2f7a94,rest:_0x492a1c}=_0x19fb70(_0x4b6474);if(!_0x492a1c['length'])return;const _0x540d32=_0x492a1c[0x0],_0x55e34d=_0x540d32[_0x53e52f(0x2a7)]();if(_0x55e34d===_0x53e52f(0x230)){if(_0x492a1c[0x1])_0x1f195d(_0x434298,_0x24d5aa(_0x492a1c[0x1],_0x2f7a94[_0x53e52f(0x387)]??_0x25ca59[_0x53e52f(0x387)]));else _0x583f8f(_0x25ca59);return;}if(_0x55e34d===_0x53e52f(0x2f0)){const _0x3fe709=_0x492a1c[0x1];if(!_0x3fe709){console['log'](_0x28e5d2(_0x368d0f[_0x53e52f(0x1d5)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x434298[_0x53e52f(0x387)](_0x3fe709),_0x25ca59[_0x53e52f(0x387)]=_0x3fe709,_0x64a374?.[_0x53e52f(0x1b6)](_0x4d3263(_0x25ca59)),console[_0x53e52f(0x3ea)](_0x53e52f(0x1eb)+_0x28e5d2(_0x368d0f[_0x53e52f(0x3b0)],'✓')+'\x20active\x20env:\x20'+_0x28e5d2(_0x368d0f[_0x53e52f(0x29f)]+_0x368d0f['cyan'],_0x3fe709)+'\x0a');}catch{console[_0x53e52f(0x3ea)](_0x53e52f(0x1eb)+_0x28e5d2(_0x368d0f[_0x53e52f(0x1d5)],'✗')+_0x53e52f(0x205)+_0x28e5d2(_0x368d0f[_0x53e52f(0x29f)],_0x3fe709)+_0x53e52f(0x20d)+_0x28e5d2(_0x368d0f['dim'],_0x53e52f(0x346)));}return;}if(_0x55e34d==='ENV'){const _0x36645b=[..._0x434298[_0x53e52f(0x323)][_0x53e52f(0x284)]()][_0x53e52f(0x267)](_0x346c4b=>!_0x346c4b[_0x53e52f(0x143)]('~'));console[_0x53e52f(0x3ea)]('');for(const _0x2640e9 of _0x36645b){const _0x1bbe6e=_0x2640e9===_0x25ca59[_0x53e52f(0x387)];console[_0x53e52f(0x3ea)]('\x20\x20'+(_0x1bbe6e?_0x28e5d2(_0x368d0f['green'],'●'):_0x28e5d2(_0x368d0f[_0x53e52f(0x12f)],'○'))+'\x20\x20'+(_0x1bbe6e?_0x28e5d2(_0x368d0f['bold']+_0x368d0f[_0x53e52f(0x127)],_0x2640e9):_0x28e5d2(_0x368d0f[_0x53e52f(0x12f)],_0x2640e9)));}console[_0x53e52f(0x3ea)](_0x53e52f(0x1eb)+_0x28e5d2(_0x368d0f['dim'],_0x53e52f(0x173))+'\x20'+_0x28e5d2(_0x368d0f[_0x53e52f(0x127)],_0x25ca59[_0x53e52f(0x387)])),console['log']('');return;}if(_0x55e34d===_0x53e52f(0x18b)){const _0x46cfc0=[..._0x434298['_envs'][_0x53e52f(0x186)]()][_0x53e52f(0x267)](_0x4f67cb=>!_0x4f67cb[_0x53e52f(0x157)]['startsWith']('~'));console[_0x53e52f(0x3ea)]('');const _0xa45bdf=Math[_0x53e52f(0x2b2)](..._0x46cfc0['map'](_0x16ee0d=>_0x16ee0d['name'][_0x53e52f(0x1b1)]));for(const _0x3116fd of _0x46cfc0){const _0x39e1eb=_0x3116fd['name']===_0x25ca59[_0x53e52f(0x387)],_0x2b3cf4=_0x39e1eb?_0x28e5d2(_0x368d0f[_0x53e52f(0x3b0)],'●'):_0x28e5d2(_0x368d0f['dim'],'○'),_0x56b53f=_0x39e1eb?_0x28e5d2(_0x368d0f[_0x53e52f(0x29f)]+_0x368d0f['cyan'],_0x3116fd[_0x53e52f(0x157)][_0x53e52f(0x1d1)](_0xa45bdf)):_0x28e5d2(_0x368d0f[_0x53e52f(0x12f)],_0x3116fd[_0x53e52f(0x157)]['padEnd'](_0xa45bdf)),_0x1743e0=[..._0x3116fd[_0x53e52f(0x1bc)][_0x53e52f(0x284)]()][_0x53e52f(0x267)](_0x568bfe=>!_0x568bfe[_0x53e52f(0x143)]('~')),_0x3a7e62=_0x1743e0[_0x53e52f(0x1b1)]?_0x28e5d2(_0x368d0f[_0x53e52f(0x12f)],_0x1743e0[_0x53e52f(0x3a7)](0x0,0x5)[_0x53e52f(0x2f7)](',\x20')+(_0x1743e0[_0x53e52f(0x1b1)]>0x5?_0x53e52f(0x39c)+(_0x1743e0['length']-0x5)+_0x53e52f(0x391):'')):_0x28e5d2(_0x368d0f[_0x53e52f(0x12f)],_0x53e52f(0x35d));console['log']('\x20\x20'+_0x2b3cf4+'\x20\x20'+_0x56b53f+'\x20\x20'+_0x3a7e62);}console['log']('');return;}if(_0x55e34d===_0x53e52f(0x3a5)){const _0x180782=_0x2f7a94[_0x53e52f(0x387)]??_0x492a1c[0x1]??_0x25ca59[_0x53e52f(0x387)];try{const _0x233ca4=_0x434298[_0x53e52f(0x387)](_0x180782),_0x194761=[..._0x233ca4[_0x53e52f(0x1bc)][_0x53e52f(0x284)]()]['filter'](_0x30c010=>!_0x30c010[_0x53e52f(0x143)]('~'))[_0x53e52f(0x401)]();console[_0x53e52f(0x3ea)](_0x53e52f(0x1eb)+_0x28e5d2(_0x368d0f['dim'],_0x194761[_0x53e52f(0x1b1)]+_0x53e52f(0x14f)+(_0x194761[_0x53e52f(0x1b1)]!==0x1?'s':'')+'\x20in\x20'+_0x180782));for(const _0x34c057 of _0x194761){const _0x486f9c=_0x233ca4[_0x53e52f(0x1bc)]['get'](_0x34c057),_0x4cc27f=_0x486f9c?.[_0x53e52f(0x1d3)]?.[_0x53e52f(0x3b7)]?.()??0x0,_0x3f1463=_0x28e5d2(_0x368d0f['bold']+_0x368d0f['cyan'],_0x34c057[_0x53e52f(0x1d1)](0x1c));console[_0x53e52f(0x3ea)](_0x53e52f(0x198)+_0x3f1463+'\x20\x20'+_0x28e5d2(_0x368d0f['magenta'],String(_0x4cc27f)[_0x53e52f(0x140)](0x6))+'\x20'+_0x28e5d2(_0x368d0f[_0x53e52f(0x12f)],_0x53e52f(0x200)));}console[_0x53e52f(0x3ea)]('');}catch(_0x7d0c79){console['error'](_0x28e5d2(_0x368d0f[_0x53e52f(0x1d5)],_0x53e52f(0x1eb)+_0x7d0c79[_0x53e52f(0x264)]+'\x0a'));}return;}if(_0x55e34d===_0x53e52f(0x41a)){_0x4a1413(_0x434298,_0x492a1c[_0x53e52f(0x3a7)](0x1)[_0x53e52f(0x2f7)]('\x20'));return;}if(_0x55e34d==='LOGS'){const _0x54a279=(_0x492a1c[0x1]??'')['toLowerCase']();if(!_0x54a279||_0x54a279==='on')_0x2881e9[_0x53e52f(0x3c3)]=!![],_0x2881e9[_0x53e52f(0x219)]=_0x53e52f(0x333),console['log']('\x0a\x20\x20'+_0x28e5d2(_0x368d0f[_0x53e52f(0x3b0)],'✓')+_0x53e52f(0x2aa)+_0x28e5d2(_0x368d0f['dim'],_0x53e52f(0x3db))+'\x0a');else{if(_0x54a279===_0x53e52f(0x223))_0x2881e9[_0x53e52f(0x3c3)]=![],console[_0x53e52f(0x3ea)](_0x53e52f(0x1eb)+_0x28e5d2(_0x368d0f['yellow'],'○')+'\x20logs\x20off\x0a');else _0x14785b[_0x54a279]!==undefined?(_0x2881e9['enabled']=!![],_0x2881e9[_0x53e52f(0x219)]=_0x54a279,console[_0x53e52f(0x3ea)]('\x0a\x20\x20'+_0x28e5d2(_0x368d0f[_0x53e52f(0x3b0)],'✓')+_0x53e52f(0x1f4)+_0x28e5d2(_0x368d0f[_0x53e52f(0x29f)],_0x54a279)+'\x0a')):console[_0x53e52f(0x365)](_0x28e5d2(_0x368d0f[_0x53e52f(0x1d5)],_0x53e52f(0x33c)));}return;}if(_0x55e34d===_0x53e52f(0x185)||_0x55e34d===_0x53e52f(0x2e2)){await _0x26f481(_0x434298,0x0);return;}if(_0x55e34d==='OPEN'){const _0x440e2b='http://localhost:'+_0x2b286c[_0x53e52f(0x234)]+_0x53e52f(0x289),_0x543536=process[_0x53e52f(0x2cb)]===_0x53e52f(0x1fc)?_0x53e52f(0x21b)+_0x440e2b:process[_0x53e52f(0x2cb)]===_0x53e52f(0x371)?_0x53e52f(0x215)+_0x440e2b:_0x53e52f(0x22d)+_0x440e2b;require$$4[_0x53e52f(0x2ff)](_0x543536),console[_0x53e52f(0x3ea)](_0x53e52f(0x1eb)+_0x28e5d2(_0x368d0f[_0x53e52f(0x3b0)],'✓')+_0x53e52f(0x35b)+_0x28e5d2(_0x368d0f['cyan'],_0x440e2b)+'\x0a');return;}let _0x382169,_0x26deb3,_0x22923c;if(_0x5b9959[_0x53e52f(0x2ed)](_0x55e34d)){_0x382169=_0x55e34d,_0x26deb3=_0x492a1c[0x1],_0x22923c=_0x492a1c['slice'](0x2);if(!_0x26deb3){console[_0x53e52f(0x365)](_0x28e5d2(_0x368d0f[_0x53e52f(0x1d5)],'\x20\x20Usage:\x20'+_0x540d32+_0x53e52f(0x309)));return;}}else _0x382169=null,_0x26deb3=_0x492a1c[0x0],_0x22923c=_0x492a1c[_0x53e52f(0x3a7)](0x1);const _0x4e02cf=_0x2f7a94[_0x53e52f(0x387)]??_0x25ca59[_0x53e52f(0x387)],_0x2607db=_0x24d5aa(_0x26deb3,_0x4e02cf);if(_0x2f7a94[_0x53e52f(0x3a4)]){_0x1f195d(_0x434298,_0x2607db);return;}let _0x28fc08=null;if(_0x22923c[_0x53e52f(0x1b1)]){const _0x57ea8b=_0x22923c[_0x53e52f(0x2f7)]('\x20');try{_0x28fc08=_0x53fba2(_0x57ea8b);}catch(_0x51079e){console['error'](_0x28e5d2(_0x368d0f[_0x53e52f(0x1d5)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x57ea8b+_0x53e52f(0x1eb)+_0x28e5d2(_0x368d0f[_0x53e52f(0x12f)],_0x51079e['message'])+'\x0a'));return;}}if(!_0x382169)_0x382169=_0x28fc08!==null?'POST':_0x53e52f(0x37b);try{const _0x400102=await _0x454305(_0x434298,_0x382169,_0x2607db,_0x28fc08);_0x484521(_0x400102[_0x53e52f(0x243)],_0x400102[_0x53e52f(0x3df)]);}catch(_0x4552a9){console[_0x53e52f(0x365)]('\x0a\x20\x20'+_0x28e5d2(_0x368d0f[_0x53e52f(0x1d5)],'✗')+'\x20'+_0x4552a9[_0x53e52f(0x264)]+'\x0a');}}class _0x40f9e8{constructor(){const _0x470ecf=_0x4f1ef7;this[_0x470ecf(0x332)]=new Map(),this[_0x470ecf(0x38c)]=null,this[_0x470ecf(0x272)]=![];}}function _0x1a3be0(_0x1723ed){const _0x1c3dd8=_0x4f1ef7,_0x143ab9=new _0x40f9e8();for(const _0x47cbbe of _0x1723ed){if(_0x47cbbe[_0x1c3dd8(0x165)]?.['hidden'])continue;const _0x3ec55e=_0x47cbbe[_0x1c3dd8(0x3ed)][_0x1c3dd8(0x27d)](/^\/api/,'')[_0x1c3dd8(0x27d)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x1c3dd8(0x27d)](/^\//,'');if(!_0x3ec55e)continue;let _0x464f51=_0x143ab9;for(const _0x99d306 of _0x3ec55e['split']('/')['filter'](Boolean)){if(_0x99d306[_0x1c3dd8(0x143)](':')){const _0x207dfb=_0x99d306['slice'](0x1);if(!_0x464f51[_0x1c3dd8(0x38c)])_0x464f51['dynamic']={'param':_0x207dfb,'node':new _0x40f9e8()};_0x464f51=_0x464f51[_0x1c3dd8(0x38c)][_0x1c3dd8(0x34a)];}else{if(!_0x464f51[_0x1c3dd8(0x332)][_0x1c3dd8(0x2ed)](_0x99d306))_0x464f51['children']['set'](_0x99d306,new _0x40f9e8());_0x464f51=_0x464f51[_0x1c3dd8(0x332)][_0x1c3dd8(0x17a)](_0x99d306);}}_0x464f51['terminal']=!![];}return _0x143ab9;}const _0x20a091=new Map();function _0x545730(_0x11eeb1,_0x4f555d,_0x1bc0b4){const _0xe9ae69=_0x4f1ef7,_0x2605c8=_0x20a091[_0xe9ae69(0x17a)](_0x11eeb1);if(_0x2605c8&&_0x2605c8[_0xe9ae69(0x359)]>Date[_0xe9ae69(0x227)]())return _0x2605c8[_0xe9ae69(0x385)];const _0x41ca0d=_0x1bc0b4();return _0x20a091[_0xe9ae69(0x135)](_0x11eeb1,{'val':_0x41ca0d,'exp':Date[_0xe9ae69(0x227)]()+_0x4f555d}),_0x41ca0d;}function _0x4c800a(_0x7cb9ea,_0x1732f9,_0x335a2b,_0x3c992b){const _0x12edec=_0x4f1ef7,_0x2515ad=_0x1732f9[_0x12edec(0x387)]??_0x3c992b[_0x12edec(0x387)];switch(_0x7cb9ea){case _0x12edec(0x387):return[..._0x335a2b[_0x12edec(0x323)][_0x12edec(0x284)]()][_0x12edec(0x267)](_0x58e837=>!_0x58e837[_0x12edec(0x143)]('~'));case _0x12edec(0x187):return _0x545730(_0x12edec(0x189)+_0x2515ad,0x7d0,()=>{const _0x86f87a=_0x12edec;try{return[..._0x335a2b[_0x86f87a(0x387)](_0x2515ad)[_0x86f87a(0x1bc)]['keys']()][_0x86f87a(0x267)](_0x7e2368=>!_0x7e2368[_0x86f87a(0x143)]('~'));}catch{return[];}});case _0x12edec(0x1d9):if(!_0x1732f9[_0x12edec(0x187)])return[];return _0x545730(_0x12edec(0x276)+_0x2515ad+':'+_0x1732f9['type'],0x5dc,()=>{const _0x6196e5=_0x12edec;try{const _0xb896ab=_0x335a2b[_0x6196e5(0x387)](_0x2515ad)[_0x6196e5(0x1bc)][_0x6196e5(0x17a)](_0x1732f9['type']);if(!_0xb896ab?.[_0x6196e5(0x1d3)])return[];const _0x4382c0=[];for(const {key:_0x9591ab}of _0xb896ab[_0x6196e5(0x1d3)][_0x6196e5(0x268)]({'limit':0x32})){_0x4382c0[_0x6196e5(0x2b4)](String(_0x9591ab));if(_0x4382c0[_0x6196e5(0x1b1)]>=0x32)break;}return _0x4382c0;}catch{return[];}});case'index':if(!_0x1732f9[_0x12edec(0x187)])return[];return _0x545730('idx:'+_0x2515ad+':'+_0x1732f9[_0x12edec(0x187)],0x7d0,()=>{const _0x4e7404=_0x12edec;try{const _0x57f3f0=_0x335a2b[_0x4e7404(0x387)](_0x2515ad)[_0x4e7404(0x1bc)][_0x4e7404(0x17a)](_0x1732f9[_0x4e7404(0x187)]);return _0x57f3f0?[..._0x57f3f0[_0x4e7404(0x38b)]?.[_0x4e7404(0x284)]()??[]]:[];}catch{return[];}});case _0x12edec(0x233):if(!_0x1732f9[_0x12edec(0x187)])return[];return _0x545730(_0x12edec(0x2e6)+_0x2515ad+':'+_0x1732f9['type'],0x7d0,()=>{const _0xd322d1=_0x12edec;try{return _0x335a2b['fts']?.[_0xd322d1(0x1c1)]?.(_0x1732f9[_0xd322d1(0x187)],_0x335a2b['env'](_0x2515ad))?.[_0xd322d1(0x33d)](_0x2cd660=>_0x2cd660[_0xd322d1(0x157)])??[];}catch{return[];}});default:return[];}}function _0xc3fc7e(_0x427008,_0x594fb7,_0x363518,_0x3f2a6a){const _0x2d8966=_0x4f1ef7,_0x4ff8ab=_0x427008['endsWith']('/'),_0xe54c91=_0x427008['split']('/'),_0x3a82d2=_0x4ff8ab?_0xe54c91['slice'](0x0,-0x1):_0xe54c91[_0x2d8966(0x3a7)](0x0,-0x1),_0x426e64=_0x4ff8ab?'':_0xe54c91[_0xe54c91['length']-0x1];let _0xf536a2=_0x594fb7;const _0x539fb5={};for(const _0x142136 of _0x3a82d2){if(!_0x142136)continue;if(_0xf536a2[_0x2d8966(0x332)][_0x2d8966(0x2ed)](_0x142136))_0xf536a2=_0xf536a2[_0x2d8966(0x332)]['get'](_0x142136);else{if(_0xf536a2[_0x2d8966(0x38c)])_0x539fb5[_0xf536a2[_0x2d8966(0x38c)]['param']]=_0x142136,_0xf536a2=_0xf536a2['dynamic'][_0x2d8966(0x34a)];else return[];}}const _0xa4e436=_0x3a82d2[_0x2d8966(0x267)](Boolean),_0x123eda=_0xa4e436['length']?_0xa4e436[_0x2d8966(0x2f7)]('/')+'/':'',_0x151b35=[];for(const [_0x1d4be9]of _0xf536a2[_0x2d8966(0x332)]){if(_0x1d4be9[_0x2d8966(0x143)](_0x426e64))_0x151b35['push'](_0x123eda+_0x1d4be9);}if(_0xf536a2[_0x2d8966(0x38c)])for(const _0x417c53 of _0x4c800a(_0xf536a2['dynamic']['param'],_0x539fb5,_0x363518,_0x3f2a6a)){if(String(_0x417c53)[_0x2d8966(0x143)](_0x426e64))_0x151b35[_0x2d8966(0x2b4)](_0x123eda+_0x417c53);}return _0x151b35[_0x2d8966(0x3a7)](0x0,0x64);}const _0x3f7508=['help',_0x4f1ef7(0x3e7),_0x4f1ef7(0x387),_0x4f1ef7(0x37e),_0x4f1ef7(0x31e),_0x4f1ef7(0x146),_0x4f1ef7(0x1e4),_0x4f1ef7(0x33b),'exit','quit'];function _0x16909c(_0x289099,_0x2210d6,_0x14e417){return function _0xd61c2(_0x22cc17){const _0x1c7f41=_0x5741;try{const _0x117770=_0x22cc17[_0x1c7f41(0x1d6)](/\s[{[]/),_0xbb3390=_0x117770>=0x0?_0x22cc17[_0x1c7f41(0x3a7)](0x0,_0x117770):_0x22cc17,_0x7676ab=_0xbb3390[_0x1c7f41(0x418)]();if(!_0x7676ab){const _0x3e2911=[..._0x3f7508,...[..._0x289099[_0x1c7f41(0x332)][_0x1c7f41(0x284)]()]][_0x1c7f41(0x3a7)](0x0,0x64);return[_0x3e2911,''];}const _0x2184b8=_0x7676ab[_0x1c7f41(0x253)](/\s+/),_0x660877=_0x2184b8[0x0],_0x544be7=_0x660877['toUpperCase']();if(_0x2184b8['length']===0x1){const _0x46d782=_0x660877[_0x1c7f41(0x1ef)](),_0x2e8614=_0x3f7508['filter'](_0x2e982c=>_0x2e982c[_0x1c7f41(0x143)](_0x46d782)),_0x5f3f49=_0xc3fc7e(_0x660877,_0x289099,_0x2210d6,_0x14e417),_0x21130d=[...new Set([..._0x2e8614,..._0x5f3f49])][_0x1c7f41(0x3a7)](0x0,0x64);return[_0x21130d,_0x660877];}if(_0x5b9959[_0x1c7f41(0x2ed)](_0x544be7)&&_0x2184b8['length']===0x2){const _0x13b005=_0x2184b8[0x1],_0x491fd3=_0xc3fc7e(_0x13b005,_0x289099,_0x2210d6,_0x14e417);return[_0x491fd3[_0x1c7f41(0x33d)](_0xc27cd4=>_0x660877+'\x20'+_0xc27cd4),_0x660877+'\x20'+_0x13b005];}if(!_0x5b9959['has'](_0x544be7)&&_0x2184b8[_0x1c7f41(0x1b1)]>0x1){const _0x315170=_0xc3fc7e(_0x660877,_0x289099,_0x2210d6,_0x14e417),_0x3f8cb='\x20'+_0x2184b8[_0x1c7f41(0x3a7)](0x1)[_0x1c7f41(0x2f7)]('\x20');return[_0x315170[_0x1c7f41(0x33d)](_0x173d8a=>_0x173d8a+_0x3f8cb),_0x660877+_0x3f8cb];}return[[],_0x22cc17];}catch{return[[],_0x22cc17];}};}async function _0x11f9e6(_0x8c7694,_0x3676cf){const _0x2f84e6=_0x4f1ef7,_0x3953f9={'enabled':!![],'level':_0x3676cf[_0x2f84e6(0x3f3)]??_0x2f84e6(0x333)},_0x36694c={'env':_0x2f84e6(0x195)},_0x5e939c={'current':null},_0x548151=_0x1a3be0(_0x8c7694[_0x2f84e6(0x31c)]['listRoutes']()),_0x4ff9ba=_0x16909c(_0x548151,_0x8c7694,_0x36694c);_0x8c7694[_0x2f84e6(0x3ea)][_0x2f84e6(0x271)](_0x1fc366=>{const _0x32cf25=_0x2f84e6;if(!_0x3953f9[_0x32cf25(0x3c3)])return;_0x1f8e71(_0x1fc366,_0x3953f9[_0x32cf25(0x219)]),_0x5e939c[_0x32cf25(0x188)]?.[_0x32cf25(0x1cb)](!![]);}),_0x414136(_0x8c7694,_0x3676cf);const _0x4c8a2d=_0x390a87[_0x2f84e6(0x2ee)]({'input':process[_0x2f84e6(0x353)],'output':process['stdout'],'terminal':!![],'completer':_0x4ff9ba,'prompt':_0x4d3263(_0x36694c),'historySize':_0x440196});try{const _0x106f51=_0x5c602e[_0x2f84e6(0x2ab)](_0x56bc01,_0x2f84e6(0x394))[_0x2f84e6(0x253)]('\x0a')['filter'](Boolean);_0x4c8a2d['history']=_0x106f51['reverse']()[_0x2f84e6(0x3a7)](0x0,_0x440196);}catch{}return _0x5e939c[_0x2f84e6(0x188)]=_0x4c8a2d,_0x4c8a2d['on'](_0x2f84e6(0x2b3),async _0x2351a7=>{const _0x114744=_0x2f84e6;_0x4c8a2d[_0x114744(0x2f3)]();try{await _0x7cf666(_0x2351a7,_0x8c7694,_0x3676cf,_0x3953f9,_0x36694c,_0x4c8a2d);}catch(_0x491fe0){console[_0x114744(0x365)](_0x28e5d2(_0x368d0f[_0x114744(0x1d5)],'\x20\x20Error:\x20'+_0x491fe0[_0x114744(0x264)]));}finally{_0x4c8a2d['resume'](),_0x4c8a2d['prompt']();}}),_0x4c8a2d['on'](_0x2f84e6(0x16c),()=>{const _0x2f5b0b=_0x2f84e6;try{const _0x2c7baf=[..._0x4c8a2d['history']][_0x2f5b0b(0x1cd)]()[_0x2f5b0b(0x267)](Boolean)[_0x2f5b0b(0x3a7)](0x0,_0x440196);_0x5c602e['writeFileSync'](_0x56bc01,_0x2c7baf[_0x2f5b0b(0x2f7)]('\x0a')+'\x0a');}catch{}_0x26f481(_0x8c7694,0x0);}),process['on'](_0x2f84e6(0x3dd),()=>{const _0x12214c=_0x2f84e6;if(_0x4c8a2d[_0x12214c(0x2b3)]==='')_0x26f481(_0x8c7694,0x0);else process[_0x12214c(0x136)][_0x12214c(0x251)]('\x0a'),_0x4c8a2d[_0x12214c(0x27e)](0x0),_0x4c8a2d[_0x12214c(0x1cb)]();}),process['on']('SIGTERM',()=>_0x26f481(_0x8c7694,0x0)),_0x4c8a2d[_0x2f84e6(0x1cb)](),_0x4c8a2d;}return okdbShell={'start':_0x11f9e6,'colorLog':_0x1f8e71,'lenientParse':_0x53fba2,'_splitLine':_0x2ac32d,'_formatRouteHelpLines':_0xf34179,'_routeSummary':_0x3803af,'_routeTags':_0x1abf3f},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x356019=_0xb5f572;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x356019(0x291)]();}catch{}const _0x5b9a2f=require$$3,_0x3471b6=require$$1;function _0x52a845(_0x3fd67a){const _0x2e65b1=_0x356019,_0x45915e=_0x3fd67a[_0x2e65b1(0x3a7)](0x2),_0x47c894={};let _0x3be8c8=0x0;while(_0x3be8c8<_0x45915e[_0x2e65b1(0x1b1)]){const _0x37c791=_0x45915e[_0x3be8c8];if(_0x37c791===_0x2e65b1(0x1cc)||_0x37c791==='-p')_0x47c894[_0x2e65b1(0x234)]=Number(_0x45915e[++_0x3be8c8]);else{if(_0x37c791===_0x2e65b1(0x412)||_0x37c791==='-d')_0x47c894[_0x2e65b1(0x3ed)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x1a4)||_0x37c791==='-k')_0x47c894[_0x2e65b1(0x1d9)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x33f)||_0x37c791==='-c')_0x47c894[_0x2e65b1(0x1a9)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x128))_0x47c894[_0x2e65b1(0x3f3)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x138))_0x47c894['noRepl']=!![];else{if(_0x37c791===_0x2e65b1(0x17e))_0x47c894[_0x2e65b1(0x25f)]=!![];else{if(_0x37c791===_0x2e65b1(0x180)||_0x37c791==='-e')_0x47c894[_0x2e65b1(0x387)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x410))_0x47c894[_0x2e65b1(0x31e)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x23c))_0x47c894[_0x2e65b1(0x2c1)]=!![];else{if(_0x37c791===_0x2e65b1(0x1c6))_0x47c894[_0x2e65b1(0x384)]=!![];else{if(_0x37c791===_0x2e65b1(0x19e))_0x47c894[_0x2e65b1(0x261)]=!![];else{if(_0x37c791===_0x2e65b1(0x250)){const _0x3e8884=[];while(_0x3be8c8+0x1<_0x45915e[_0x2e65b1(0x1b1)]&&!_0x45915e[_0x3be8c8+0x1][_0x2e65b1(0x143)]('--')){_0x3e8884[_0x2e65b1(0x2b4)](_0x45915e[++_0x3be8c8]);}_0x47c894[_0x2e65b1(0x33b)]=_0x3e8884['length']>0x0?_0x3e8884:!![];}else{if(_0x37c791===_0x2e65b1(0x41c))_0x47c894[_0x2e65b1(0x2bb)]=!![];else{if(_0x37c791===_0x2e65b1(0x217))_0x47c894[_0x2e65b1(0x157)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x2e9))_0x47c894[_0x2e65b1(0x244)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x1f3))_0x47c894['label']=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x330))_0x47c894['permissions']=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x1ce))_0x47c894[_0x2e65b1(0x18d)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791==='--ttl')_0x47c894[_0x2e65b1(0x24c)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x406))_0x47c894['token']=_0x45915e[++_0x3be8c8];else{if(_0x37c791==='--username'||_0x37c791==='-u')_0x47c894[_0x2e65b1(0x3cf)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x2c7))_0x47c894[_0x2e65b1(0x383)]=_0x45915e[++_0x3be8c8];else{if(_0x37c791===_0x2e65b1(0x179)||_0x37c791==='-v'){const _0x4558dd=require$$2;console[_0x2e65b1(0x3ea)](_0x4558dd[_0x2e65b1(0x413)]),process[_0x2e65b1(0x311)](0x0);}else(_0x37c791===_0x2e65b1(0x224)||_0x37c791==='-h')&&(_0x5d4230(),process[_0x2e65b1(0x311)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x3be8c8++;}return _0x47c894;}function _0x5d4230(){const _0x23b736=_0x356019;console[_0x23b736(0x3ea)]('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0x17615b=new Set([_0x356019(0x2a9),_0x356019(0x333),_0x356019(0x1c2),'error']);function _0x193366(_0x278e03){const _0x56e460=_0x356019,_0x3bd8c2=_0x278e03[_0x56e460(0x1a9)]?_0x5b9a2f[_0x56e460(0x2bd)](_0x278e03['config']):_0x5b9a2f[_0x56e460(0x2bd)](_0x56e460(0x419));let _0x1b328e={};if(_0x3471b6[_0x56e460(0x1af)](_0x3bd8c2))try{const _0x2cecd7=_0x3471b6[_0x56e460(0x2ab)](_0x3bd8c2,'utf8')[_0x56e460(0x27d)](/^\uFEFF/,'');_0x1b328e=JSON[_0x56e460(0x35a)](_0x2cecd7),console['log'](_0x56e460(0x427)+_0x3bd8c2);}catch(_0x5488cf){console[_0x56e460(0x365)](_0x56e460(0x1b2)+_0x3bd8c2+':\x20'+_0x5488cf[_0x56e460(0x264)]),process[_0x56e460(0x311)](0x1);}const _0xd3095b={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x45c4b4={'port':_0x278e03[_0x56e460(0x234)]??_0x1b328e['port']??_0xd3095b[_0x56e460(0x234)]??0x2124,'dbPath':_0x278e03[_0x56e460(0x3ed)]??_0x1b328e['path']??_0xd3095b[_0x56e460(0x3ed)]??'./okdb-data','key':_0x278e03[_0x56e460(0x1d9)]??_0x1b328e[_0x56e460(0x1d9)]??_0xd3095b[_0x56e460(0x1d9)]??undefined,'logLevel':_0x278e03['logLevel']??_0x1b328e[_0x56e460(0x3f3)]??_0xd3095b[_0x56e460(0x3f3)]??'info','noRepl':_0x278e03['noRepl']??_0x1b328e[_0x56e460(0x197)]??_0xd3095b[_0x56e460(0x197)]??![],'noAdmin':_0x278e03[_0x56e460(0x25f)]??_0x1b328e[_0x56e460(0x25f)]??_0xd3095b['noAdmin']??![],'admin':_0x1b328e['admin']??{},'api':_0x1b328e[_0x56e460(0x196)]??undefined,'auth':_0x1b328e['auth']??undefined,'mcp':_0x1b328e['mcp']??undefined,'timeMachine':_0x1b328e[_0x56e460(0x2a2)]!==![]?_0x1b328e[_0x56e460(0x2a2)]??{}:![]};return _0x278e03[_0x56e460(0x33b)]!==undefined&&(_0x45c4b4[_0x56e460(0x1c4)]=_0x45c4b4[_0x56e460(0x1c4)]||{},_0x45c4b4[_0x56e460(0x1c4)][_0x56e460(0x33b)]=_0x278e03[_0x56e460(0x33b)]),_0x278e03[_0x56e460(0x2bb)]&&(_0x45c4b4[_0x56e460(0x2a9)]=_0x45c4b4['debug']||{},_0x45c4b4[_0x56e460(0x2a9)][_0x56e460(0x2bb)]=!![]),(!Number[_0x56e460(0x328)](_0x45c4b4[_0x56e460(0x234)])||_0x45c4b4[_0x56e460(0x234)]<0x1||_0x45c4b4[_0x56e460(0x234)]>0xffff)&&(console[_0x56e460(0x365)](_0x56e460(0x3cd)+_0x45c4b4[_0x56e460(0x234)]+_0x56e460(0x342)),process[_0x56e460(0x311)](0x1)),!_0x17615b[_0x56e460(0x2ed)](_0x45c4b4[_0x56e460(0x3f3)])&&(console[_0x56e460(0x365)](_0x56e460(0x175)+_0x45c4b4[_0x56e460(0x3f3)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x56e460(0x311)](0x1)),_0x45c4b4;}function _0x33e1ed(_0x52bed0){const _0x1648e9=_0x356019;return!!(_0x52bed0&&typeof _0x52bed0==='object'&&!Array[_0x1648e9(0x218)](_0x52bed0)&&Object[_0x1648e9(0x284)](_0x52bed0)[_0x1648e9(0x1b1)]>0x0);}const _0x40809b=!process[_0x356019(0x136)][_0x356019(0x375)]||!!process.env.NO_COLOR;function _0x410b75(_0x24801d,_0x49b1f7){const _0x3f303d=_0x356019;return _0x40809b?_0x49b1f7:'\x1b['+_0x24801d+'m'+_0x49b1f7+_0x3f303d(0x176);}function _0x322de9(_0x5c1dc1){const _0x180579=_0x356019;if(!_0x5c1dc1||_0x5c1dc1['length']===0x0)return;const _0xa3cb77='─'['repeat'](0x38);process[_0x180579(0x2ac)][_0x180579(0x251)]('\x0a'),process[_0x180579(0x2ac)][_0x180579(0x251)](_0x410b75('33','\x20\x20⚠\x20\x20'+_0x5c1dc1['length']+_0x180579(0x245)+(_0x5c1dc1['length']>0x1?'S':'')+'\x0a')),process['stderr'][_0x180579(0x251)]('\x20\x20'+_0xa3cb77+'\x0a');for(const _0x26673e of _0x5c1dc1){const _0x1ada75=_0x26673e[_0x180579(0x219)]==='error'?_0x410b75('31','\x20\x20✗'):_0x410b75('33',_0x180579(0x2ca));process[_0x180579(0x2ac)][_0x180579(0x251)](_0x1ada75+'\x20\x20'+_0x410b75('1',_0x26673e[_0x180579(0x29b)])+'\x0a'),process[_0x180579(0x2ac)]['write'](_0x180579(0x3f6)+_0x26673e['message']+'\x0a');if(_0x26673e['hint'])process[_0x180579(0x2ac)]['write'](_0x180579(0x3f6)+_0x410b75('2',_0x180579(0x202)+_0x26673e['hint'])+'\x0a');process[_0x180579(0x2ac)]['write']('\x0a');}process[_0x180579(0x2ac)][_0x180579(0x251)]('\x20\x20'+_0xa3cb77+'\x0a\x0a');}function _0x2d9e82(_0x5661d3,_0x46a06f){const _0x1f2670=_0x356019,_0x5194a4=_0x5661d3[_0x1f2670(0x31c)][_0x1f2670(0x2c6)](_0x46a06f);return new Promise((_0x5c6a7a,_0x40c188)=>{const _0xeb8ef4=_0x1f2670;_0x5194a4[_0xeb8ef4(0x125)](_0xeb8ef4(0x292),_0x5c6a7a),_0x5194a4[_0xeb8ef4(0x125)](_0xeb8ef4(0x365),_0x40c188);});}async function _0x53005c(_0xd0e94){const _0x10f339=_0x356019,_0x2fc973=require$$3$1;console['log'](_0x10f339(0x3a8));let _0x115db8=!![];const _0x41e33f=(_0x13ce19,_0x37454a)=>{console['log']('\x20\x20'+(_0x13ce19?'✓':'✗')+'\x20'+_0x37454a);if(!_0x13ce19)_0x115db8=![];},_0x3050d1=Number(process[_0x10f339(0x413)][_0x10f339(0x27d)]('v','')['split']('.')[0x0]);_0x41e33f(_0x3050d1>=0x12,_0x10f339(0x177)+process['version']+(_0x3050d1<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x39dfce=_0x5b9a2f[_0x10f339(0x2bd)](_0xd0e94[_0x10f339(0x423)]);try{_0x3471b6[_0x10f339(0x32a)](_0x39dfce,{'recursive':!![]});const _0x35c616=_0x5b9a2f[_0x10f339(0x2f7)](_0x39dfce,_0x10f339(0x130));_0x3471b6[_0x10f339(0x1de)](_0x35c616,''),_0x3471b6[_0x10f339(0x302)](_0x35c616),_0x41e33f(!![],_0x10f339(0x407)+_0x39dfce);}catch(_0x1934e0){_0x41e33f(![],_0x10f339(0x298)+_0x39dfce+_0x10f339(0x3e1)+_0x1934e0['message']+')');}const _0x2a28b0=await new Promise(_0x1ab1aa=>{const _0x52ff4e=_0x10f339,_0x2614a6=_0x2fc973['createServer']();_0x2614a6['once'](_0x52ff4e(0x365),()=>_0x1ab1aa(![])),_0x2614a6[_0x52ff4e(0x125)](_0x52ff4e(0x292),()=>{const _0x4f70a0=_0x52ff4e;_0x2614a6[_0x4f70a0(0x16c)](),_0x1ab1aa(!![]);}),_0x2614a6[_0x52ff4e(0x2c6)](_0xd0e94[_0x52ff4e(0x234)],'127.0.0.1');});_0x41e33f(_0x2a28b0,_0x10f339(0x36f)+_0xd0e94[_0x10f339(0x234)]+'\x20'+(_0x2a28b0?_0x10f339(0x229):_0x10f339(0x160)));const _0x1a3e6b=_0x5b9a2f[_0x10f339(0x2bd)](_0x10f339(0x419));if(_0x3471b6['existsSync'](_0x1a3e6b))try{JSON[_0x10f339(0x35a)](_0x3471b6[_0x10f339(0x2ab)](_0x1a3e6b,_0x10f339(0x394))[_0x10f339(0x27d)](/^\uFEFF/,'')),_0x41e33f(!![],_0x10f339(0x3e8)+_0x1a3e6b);}catch(_0x3bc73e){_0x41e33f(![],'config\x20file\x20invalid:\x20'+_0x3bc73e[_0x10f339(0x264)]);}else _0x41e33f(!![],_0x10f339(0x303));console[_0x10f339(0x3ea)](''),_0x115db8?console[_0x10f339(0x3ea)]('\x20\x20All\x20checks\x20passed.\x0a'):(console[_0x10f339(0x3ea)](_0x10f339(0x28c)),process[_0x10f339(0x311)](0x1));}async function _0x251e0c(){const _0x29a4ad=_0x356019,_0x230232=_0x5b9a2f[_0x29a4ad(0x2bd)](_0x29a4ad(0x419));!_0x3471b6['existsSync'](_0x230232)?(_0x3471b6[_0x29a4ad(0x1de)](_0x230232,JSON[_0x29a4ad(0x3b2)]({'port':0x2124,'path':_0x29a4ad(0x334),'logLevel':_0x29a4ad(0x333),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0x29a4ad(0x142))):console[_0x29a4ad(0x3ea)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x1ac601=_0x5b9a2f[_0x29a4ad(0x2bd)]('./okdb-data');!_0x3471b6[_0x29a4ad(0x1af)](_0x1ac601)?(_0x3471b6['mkdirSync'](_0x1ac601,{'recursive':!![]}),console['log'](_0x29a4ad(0x1cf))):console['log'](_0x29a4ad(0x40a)),console[_0x29a4ad(0x3ea)](_0x29a4ad(0x408));}async function _0x4e61dd(_0x40335d){const _0x2e4e1b=_0x356019,_0x2668cf=_0x5b9a2f[_0x2e4e1b(0x2bd)](_0x40335d['dbPath']);if(!_0x3471b6['existsSync'](_0x2668cf)){console['log'](_0x2e4e1b(0x30d)+_0x2668cf+'\x20does\x20not\x20exist');return;}const _0x3a0a42=require$$0$2,_0x10858d=_0x3a0a42[_0x2e4e1b(0x2ee)]({'input':process[_0x2e4e1b(0x353)],'output':process['stdout']}),_0x2e5f8b=await new Promise(_0x15be99=>_0x10858d[_0x2e4e1b(0x18c)](_0x2e4e1b(0x2a4)+_0x2668cf+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x15be99));_0x10858d[_0x2e4e1b(0x16c)](),console[_0x2e4e1b(0x3ea)]('');if(_0x2e5f8b[_0x2e4e1b(0x134)]()[_0x2e4e1b(0x1ef)]()!==_0x2e4e1b(0x259)){console[_0x2e4e1b(0x3ea)](_0x2e4e1b(0x1c3));return;}_0x3471b6['rmSync'](_0x2668cf,{'recursive':!![],'force':!![]}),console[_0x2e4e1b(0x3ea)](_0x2e4e1b(0x282)+_0x2668cf+'\x20deleted');}async function _0xae89c5(_0x203290,_0x4c13ab){const _0x3da55e=_0x356019,_0x3a6f55=require$$5,_0x4fb2cd=_0x5b9a2f[_0x3da55e(0x2bd)](_0x4c13ab[_0x3da55e(0x423)]);console['log'](_0x3da55e(0x312)+_0x4fb2cd+'…');const _0x5b5d77=new _0x3a6f55(_0x4fb2cd,_0x4c13ab[_0x3da55e(0x1d9)]?{'encryptionKey':_0x4c13ab[_0x3da55e(0x1d9)]}:{});await _0x5b5d77[_0x3da55e(0x33b)](),console[_0x3da55e(0x3ea)]('[okdb]\x20backing\x20up\x20to\x20'+_0x203290+'…');const {envs:_0x3e413d}=await _0x5b5d77[_0x3da55e(0x33a)][_0x3da55e(0x255)](_0x203290);for(const _0x55e0c5 of _0x3e413d){const _0x4b72b8=_0x55e0c5[_0x3da55e(0x1b4)]>0x0?_0x3da55e(0x3e1)+(_0x55e0c5['sizeBefore']/0x400/0x400)[_0x3da55e(0x336)](0x2)+_0x3da55e(0x241)+(_0x55e0c5['sizeAfter']/0x400/0x400)[_0x3da55e(0x336)](0x2)+'\x20MB)':'';console[_0x3da55e(0x3ea)]('\x20\x20✓\x20'+_0x55e0c5[_0x3da55e(0x157)]+_0x3da55e(0x1d4)+_0x55e0c5[_0x3da55e(0x380)]+_0x4b72b8);}await _0x5b5d77[_0x3da55e(0x16c)](),console[_0x3da55e(0x3ea)](_0x3da55e(0x182));}async function _0x5abe1d(_0x53b04f,_0x4114d4,_0x4d140e){const _0x57dc22=_0x356019,_0x468691=require$$5,_0xb00d76=_0x5b9a2f['resolve'](_0x4114d4[_0x57dc22(0x423)]),_0x2dc8c6=_0x4d140e['env']??_0x57dc22(0x195),_0x33ae47=_0x4d140e[_0x57dc22(0x31e)]?_0x4d140e[_0x57dc22(0x31e)][_0x57dc22(0x253)](',')[_0x57dc22(0x33d)](_0x39fb59=>_0x39fb59[_0x57dc22(0x134)]()):null;console[_0x57dc22(0x3ea)](_0x57dc22(0x312)+_0xb00d76+'…');const _0x49e48e=new _0x468691(_0xb00d76,_0x4114d4[_0x57dc22(0x1d9)]?{'encryptionKey':_0x4114d4['key']}:{});await _0x49e48e[_0x57dc22(0x33b)](),console[_0x57dc22(0x3ea)](_0x57dc22(0x416)+_0x2dc8c6+_0x57dc22(0x184)+_0x53b04f+'…');const _0x57ce20=await _0x49e48e[_0x57dc22(0x33a)]['exportToFile'](_0x53b04f,{'envName':_0x2dc8c6,'types':_0x33ae47,'includeChanges':!!_0x4d140e[_0x57dc22(0x2c1)]});console[_0x57dc22(0x3ea)](_0x57dc22(0x225)+_0x57ce20[_0x57dc22(0x31e)]+_0x57dc22(0x3d6)+_0x57ce20[_0x57dc22(0x200)]+_0x57dc22(0x34c)+_0x57ce20[_0x57dc22(0x2c1)]);if(_0x4d140e[_0x57dc22(0x384)]){const _0x28071a=_0x5b9a2f['join'](_0x5b9a2f[_0x57dc22(0x3f4)](_0x53b04f),_0x57dc22(0x384));process[_0x57dc22(0x136)][_0x57dc22(0x251)]('[okdb]\x20exporting\x20blobs…');const {count:_0x6a451,bytes:_0x16e69b}=await _0x49e48e[_0x57dc22(0x33a)][_0x57dc22(0x151)](_0x28071a);console[_0x57dc22(0x3ea)](_0x57dc22(0x3ce)+_0x28071a+_0x57dc22(0x3e1)+_0x6a451+'\x20file'+(_0x6a451!==0x1?'s':'')+',\x20'+(_0x16e69b/0x400/0x400)[_0x57dc22(0x336)](0x2)+_0x57dc22(0x1da));}await _0x49e48e[_0x57dc22(0x16c)](),console['log'](_0x57dc22(0x20b));}async function _0x10b615(_0xe199e6,_0x242a37,_0x17fd1a){const _0xc012e2=_0x356019,_0xb63856=require$$5,_0x1e2c95=_0x5b9a2f['resolve'](_0x242a37['dbPath']),_0x448610=_0x17fd1a['env']??null,_0x40be52=_0x17fd1a[_0xc012e2(0x31e)]?_0x17fd1a['types'][_0xc012e2(0x253)](',')['map'](_0x12d799=>_0x12d799['trim']()):null,_0x5e50bf=!!_0x17fd1a[_0xc012e2(0x261)];console[_0xc012e2(0x3ea)](_0xc012e2(0x312)+_0x1e2c95+'…');const _0x308542=new _0xb63856(_0x1e2c95,_0x242a37['key']?{'encryptionKey':_0x242a37[_0xc012e2(0x1d9)]}:{});await _0x308542[_0xc012e2(0x33b)](),console[_0xc012e2(0x3ea)](_0xc012e2(0x1e6)+_0xe199e6+'…');const _0x217064=await _0x308542[_0xc012e2(0x33a)][_0xc012e2(0x3a0)](_0xe199e6,{'envName':_0x448610,'types':_0x40be52,'dropExisting':_0x5e50bf,'includeChanges':!!_0x17fd1a[_0xc012e2(0x2c1)],'onProgress':({type:_0x4cb2c8,count:_0x22da10})=>{const _0x53e211=_0xc012e2;process[_0x53e211(0x136)][_0x53e211(0x251)](_0x53e211(0x248)+_0x4cb2c8+':\x20'+_0x22da10+_0x53e211(0x1bd));}});process['stdout'][_0xc012e2(0x251)]('\x0a'),console['log'](_0xc012e2(0x3dc)+_0x217064[_0xc012e2(0x31e)]+_0xc012e2(0x3d6)+_0x217064[_0xc012e2(0x200)]+_0xc012e2(0x34c)+_0x217064[_0xc012e2(0x2c1)]);if(_0x17fd1a[_0xc012e2(0x384)]){const _0xb2f0f7=_0x5b9a2f[_0xc012e2(0x2f7)](_0x5b9a2f[_0xc012e2(0x3f4)](_0xe199e6),_0xc012e2(0x384));if(_0x3471b6['existsSync'](_0xb2f0f7)){const {imported:_0x215bc0,skipped:_0x1b1a39}=await _0x308542[_0xc012e2(0x33a)][_0xc012e2(0x3ff)](_0xb2f0f7);console['log'](_0xc012e2(0x1bf)+_0x215bc0+_0xc012e2(0x17b)+_0x1b1a39);}}await _0x308542[_0xc012e2(0x16c)](),console[_0xc012e2(0x3ea)](_0xc012e2(0x283));}async function _0x539a50(_0xef40b9,_0xd8fed1){const _0x216dc2=_0x356019;_0xd8fed1[_0x216dc2(0x244)]&&!_0xd8fed1[_0x216dc2(0x157)]&&(console[_0x216dc2(0x365)](_0x216dc2(0x405)),process[_0x216dc2(0x311)](0x1));const _0x2e2ae6=_0xd8fed1['permissions']?_0xd8fed1['permissions'][_0x216dc2(0x253)](',')[_0x216dc2(0x33d)](_0x240e27=>_0x240e27[_0x216dc2(0x134)]())[_0x216dc2(0x267)](Boolean):[];let _0x2e2cb3={};if(_0xd8fed1['grants'])try{_0x2e2cb3=JSON[_0x216dc2(0x35a)](_0xd8fed1[_0x216dc2(0x18d)]);if(typeof _0x2e2cb3!=='object'||Array[_0x216dc2(0x218)](_0x2e2cb3)||_0x2e2cb3===null)throw new Error();}catch{console[_0x216dc2(0x365)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x216dc2(0x311)](0x1);}const _0x95c8fa=require$$5,{randomToken:_0x2da12d,hashToken:_0x3e55b2,hashPassword:_0x38b95b}=requireOkdbAuthTokens(),_0x592e51=require$$0,_0x4e4994=_0x5b9a2f['resolve'](_0xef40b9['dbPath']),_0x28cd48=new _0x95c8fa(_0x4e4994,_0xef40b9[_0x216dc2(0x1d9)]?{'encryptionKey':_0xef40b9['key']}:{});await _0x28cd48[_0x216dc2(0x33b)]();try{await _0x28cd48[_0x216dc2(0x1c4)][_0x216dc2(0x3d1)]();if(_0xd8fed1[_0x216dc2(0x157)]){const _0x382052=await _0x28cd48[_0x216dc2(0x1c4)][_0x216dc2(0x1ae)](_0xd8fed1[_0x216dc2(0x157)]);_0x382052&&(console['error'](_0x216dc2(0x2e7)+_0xd8fed1['name']+'\x22\x20already\x20exists'),process[_0x216dc2(0x311)](0x1));}const _0x272d93=_0x2da12d(0x20),_0x548118=_0x3e55b2(_0x272d93),_0x572d4d=_0xd8fed1['password']?await _0x38b95b(_0xd8fed1[_0x216dc2(0x244)]):null,_0x2f5b87=_0x592e51['randomUUID'](),_0x144eb6={'tokenHash':_0x548118,'name':_0xd8fed1[_0x216dc2(0x157)]||null,'passwordHash':_0x572d4d,'label':_0xd8fed1['label']||null,'permissions':_0x2e2ae6,'grants':_0x2e2cb3,'createdAt':Date[_0x216dc2(0x227)](),'lastUsedAt':null},_0x2c5917=_0xd8fed1['ttl']?{'ttl':Number(_0xd8fed1[_0x216dc2(0x24c)])}:undefined;await _0x28cd48[_0x216dc2(0x2a1)][_0x216dc2(0x148)](_0x216dc2(0x348),_0x2f5b87,_0x144eb6,_0x2c5917),console[_0x216dc2(0x3ea)](_0x216dc2(0x1ed)),console[_0x216dc2(0x3ea)](_0x216dc2(0x28b)+_0x2f5b87),console['log'](_0x216dc2(0x32c)+(_0xd8fed1[_0x216dc2(0x157)]||_0x216dc2(0x220))),console[_0x216dc2(0x3ea)](_0x216dc2(0x40f)+(_0xd8fed1['label']||_0x216dc2(0x220))),console[_0x216dc2(0x3ea)](_0x216dc2(0x228)+(_0x2e2ae6[_0x216dc2(0x2f7)](',\x20')||_0x216dc2(0x2a0))),console['log'](_0x216dc2(0x36e)),console[_0x216dc2(0x3ea)](_0x216dc2(0x198)+_0x272d93+'\x0a');}finally{await _0x28cd48[_0x216dc2(0x16c)]();}}async function _0x77c61b(_0xdabd6e){const _0x44e0e4=_0x356019,_0x541032=require$$5,_0x3670ab=_0x5b9a2f[_0x44e0e4(0x2bd)](_0xdabd6e[_0x44e0e4(0x423)]),_0x352f34=new _0x541032(_0x3670ab,_0xdabd6e[_0x44e0e4(0x1d9)]?{'encryptionKey':_0xdabd6e[_0x44e0e4(0x1d9)]}:{});await _0x352f34[_0x44e0e4(0x33b)]();try{const _0x141856=_0x352f34[_0x44e0e4(0x2a1)];if(!_0x141856||!_0x141856[_0x44e0e4(0x347)]('~tokens')){console[_0x44e0e4(0x3ea)](_0x44e0e4(0x1a8));return;}const _0x2583bb=[];for(const {key:_0xe8a53c,value:_0x1e35e0}of _0x141856[_0x44e0e4(0x268)](_0x44e0e4(0x348))){_0x2583bb[_0x44e0e4(0x2b4)]({'id':_0xe8a53c,'name':_0x1e35e0['name']||_0x44e0e4(0x220),'label':_0x1e35e0[_0x44e0e4(0x396)]||_0x44e0e4(0x220),'permissions':Array['isArray'](_0x1e35e0[_0x44e0e4(0x21d)])?_0x1e35e0[_0x44e0e4(0x21d)][_0x44e0e4(0x2f7)](','):'','created':_0x1e35e0['createdAt']?new Date(_0x1e35e0[_0x44e0e4(0x2ea)])['toISOString']()[_0x44e0e4(0x3a7)](0x0,0xa):''});}if(_0x2583bb[_0x44e0e4(0x1b1)]===0x0){console[_0x44e0e4(0x3ea)](_0x44e0e4(0x1a8));return;}const _0x3aee32=!process[_0x44e0e4(0x136)]['columns']||process[_0x44e0e4(0x136)]['columns']>=0x64,_0x61a710=_0x3aee32?0x24:0xa,_0x29d82b=['ID'[_0x44e0e4(0x1d1)](_0x61a710),_0x44e0e4(0x1dd)[_0x44e0e4(0x1d1)](0x10),_0x44e0e4(0x183)[_0x44e0e4(0x1d1)](0x14),'PERMISSIONS'[_0x44e0e4(0x1d1)](0x14),'CREATED'][_0x44e0e4(0x2f7)]('\x20\x20');console[_0x44e0e4(0x3ea)]('\x0a'+_0x29d82b),console[_0x44e0e4(0x3ea)]('-'[_0x44e0e4(0x324)](_0x29d82b[_0x44e0e4(0x1b1)]));for(const _0x1ac775 of _0x2583bb){const _0x2bbd4b=_0x3aee32?_0x1ac775['id']:_0x1ac775['id'][_0x44e0e4(0x3a7)](0x0,0x8)+'…';console[_0x44e0e4(0x3ea)]([_0x2bbd4b['padEnd'](_0x61a710),_0x1ac775[_0x44e0e4(0x157)][_0x44e0e4(0x3a7)](0x0,0x10)[_0x44e0e4(0x1d1)](0x10),_0x1ac775['label'][_0x44e0e4(0x3a7)](0x0,0x14)[_0x44e0e4(0x1d1)](0x14),_0x1ac775[_0x44e0e4(0x21d)][_0x44e0e4(0x3a7)](0x0,0x14)['padEnd'](0x14),_0x1ac775['created']]['join']('\x20\x20'));}console[_0x44e0e4(0x3ea)]('');}finally{await _0x352f34['close']();}}async function _0x11fbf6(_0x551314,_0x87677b){const _0x107e0f=_0x356019;!_0x551314&&(console[_0x107e0f(0x365)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x107e0f(0x311)](0x1));const _0x104cc7=require$$5,_0x378fc7=_0x5b9a2f[_0x107e0f(0x2bd)](_0x87677b[_0x107e0f(0x423)]),_0x236164=new _0x104cc7(_0x378fc7,_0x87677b[_0x107e0f(0x1d9)]?{'encryptionKey':_0x87677b[_0x107e0f(0x1d9)]}:{});await _0x236164[_0x107e0f(0x33b)]();try{const _0x87dfa3=_0x236164[_0x107e0f(0x2a1)];(!_0x87dfa3||!_0x87dfa3[_0x107e0f(0x347)]('~tokens'))&&(console[_0x107e0f(0x365)](_0x107e0f(0x321)+_0x551314+'\x22'),process['exit'](0x1));let _0x33d5d6=null,_0x473a66=null;const _0x2a170c=_0x87dfa3['get'](_0x107e0f(0x348),_0x551314);if(_0x2a170c)_0x33d5d6=_0x551314,_0x473a66=_0x2a170c;else{const _0x1b673e=[];for(const {key:_0x31abee,value:_0x7339bf}of _0x87dfa3[_0x107e0f(0x268)](_0x107e0f(0x348))){if(_0x31abee['startsWith'](_0x551314))_0x1b673e[_0x107e0f(0x2b4)]({'key':_0x31abee,'value':_0x7339bf});}_0x1b673e['length']===0x0&&(console[_0x107e0f(0x365)](_0x107e0f(0x321)+_0x551314+'\x22'),process[_0x107e0f(0x311)](0x1));if(_0x1b673e['length']>0x1){console[_0x107e0f(0x365)](_0x107e0f(0x1f8)+_0x551314+_0x107e0f(0x265)+_0x1b673e[_0x107e0f(0x1b1)]+_0x107e0f(0x124));for(const _0x479ff0 of _0x1b673e){console[_0x107e0f(0x365)]('\x20\x20'+_0x479ff0[_0x107e0f(0x1d9)]+_0x107e0f(0x211)+(_0x479ff0['value']['name']||_0x107e0f(0x220))+')');}process[_0x107e0f(0x311)](0x1);}_0x33d5d6=_0x1b673e[0x0][_0x107e0f(0x1d9)],_0x473a66=_0x1b673e[0x0][_0x107e0f(0x1fd)];}await _0x87dfa3[_0x107e0f(0x38d)](_0x107e0f(0x348),_0x33d5d6),console[_0x107e0f(0x3ea)](_0x107e0f(0x3b6)+_0x33d5d6+'\x20\x20(name:\x20'+(_0x473a66[_0x107e0f(0x157)]||_0x107e0f(0x220))+_0x107e0f(0x170)+(_0x473a66['label']||'(unset)')+')');}finally{await _0x236164[_0x107e0f(0x16c)]();}}function _0x49dcd5(_0x1685db,_0x531c43){const _0x55614b=_0x356019;if(!_0x1685db[_0x55614b(0x320)])return _0x55614b(0x2d6);const _0x48cea9=_0x1685db[_0x55614b(0x27a)];if(!_0x48cea9)return'active';if(_0x531c43>_0x48cea9)return'expired';return _0x55614b(0x167);}function _0x28f1aa(_0x58b5b0){const _0x587922=_0x356019;if(!_0x58b5b0||typeof _0x58b5b0!==_0x587922(0x13a))return'';const _0x2de362=Object[_0x587922(0x3a1)](_0x58b5b0)[_0x587922(0x267)](([,_0x10f25d])=>_0x10f25d)[_0x587922(0x33d)](([_0x116f46])=>_0x116f46);if(_0x2de362['length']===0x0)return _0x587922(0x2a0);if(_0x2de362[_0x587922(0x1b1)]<=0x3)return _0x2de362[_0x587922(0x2f7)]('\x20');return _0x2de362[_0x587922(0x3a7)](0x0,0x3)[_0x587922(0x2f7)]('\x20')+('\x20+'+(_0x2de362[_0x587922(0x1b1)]-0x3));}async function _0x55c721(_0x3ee09e){const _0x539a97=_0x356019,_0x48d6d4=require$$5,_0x47b36c=requireOkdbLicenseCodec(),{_C:_0x3c279e}=requireOkdbLicense(),_0x26175e=_0x5b9a2f[_0x539a97(0x2bd)](_0x3ee09e[_0x539a97(0x423)]),_0x50e823=new _0x48d6d4(_0x26175e,_0x3ee09e['key']?{'encryptionKey':_0x3ee09e['key']}:{});await _0x50e823['open']();try{const _0x4081a9=_0x50e823[_0x539a97(0x2a1)],_0x38054c=_0x4081a9?.['db']?.[_0x539a97(0x17a)]?.(_0x539a97(0x25b))??0x0,_0x54b5f0=[..._0x50e823[_0x539a97(0x323)]['keys']()][_0x539a97(0x267)](_0x3ce233=>!_0x3ce233[_0x539a97(0x143)]('~'))[_0x539a97(0x1b1)],_0x544ed8=_0x50e823[_0x539a97(0x23d)]?.['effective'];if(_0x544ed8){const _0x1760af=_0x544ed8[_0x539a97(0x3c5)]===!![],_0x5f14f5=_0x1760af?'free\x20tier':_0x50e823[_0x539a97(0x23d)]['active']?.[_0x539a97(0x40d)]||_0x539a97(0x3d0);console[_0x539a97(0x3ea)](''),console[_0x539a97(0x3ea)](_0x539a97(0x285)+_0x5f14f5);const _0x45de42=_0x544ed8[_0x539a97(0x3f0)]||{};if(_0x45de42[_0x539a97(0x3e2)]){const _0xcd9e93=Math[_0x539a97(0x20c)](_0x38054c/_0x45de42[_0x539a97(0x3e2)]*0x64);console[_0x539a97(0x3ea)]('\x20\x20Writes:\x20\x20'+_0x38054c[_0x539a97(0x27c)]()+_0x539a97(0x2b5)+_0x45de42['maxWrites']['toLocaleString']()+'\x20\x20('+_0xcd9e93+'%)');}else console[_0x539a97(0x3ea)](_0x539a97(0x3fe)+_0x38054c[_0x539a97(0x27c)]());_0x45de42['envs']?console[_0x539a97(0x3ea)](_0x539a97(0x1f2)+_0x54b5f0+_0x539a97(0x2b5)+_0x45de42['envs']):console['log'](_0x539a97(0x1f2)+_0x54b5f0),_0x3c279e?.['PUB_FINGERPRINT']&&console[_0x539a97(0x3ea)](_0x539a97(0x32f)+_0x3c279e[_0x539a97(0x132)]+_0x539a97(0x2c4));}if(!_0x4081a9||!_0x4081a9[_0x539a97(0x347)]('~licenses')){console[_0x539a97(0x3ea)](''),console[_0x539a97(0x3ea)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x539a97(0x3ea)]('');return;}const _0x15aa51=[],_0x13faf9=Date[_0x539a97(0x227)](),_0x2e1dfd=_0x50e823['id'],_0x561575=_0x539a97(0x314);for(const {key:_0x184212,value:_0x283f41}of _0x4081a9['getRange'](_0x539a97(0x156))){const _0x157ac5=_0x283f41[_0x539a97(0x25c)]?Buffer[_0x539a97(0x19a)](_0x283f41[_0x539a97(0x25c)],'hex'):Buffer[_0x539a97(0x36c)](0x8);let _0x308f71='';try{_0x308f71=_0x47b36c['derivePin'](_0x2e1dfd,_0x157ac5,_0x561575)[_0x539a97(0x174)];}catch{}_0x15aa51[_0x539a97(0x2b4)]({'id':_0x184212,'licensee':_0x283f41[_0x539a97(0x40d)]||'','expires':_0x283f41[_0x539a97(0x27a)]?new Date(_0x283f41['expiresAt'])['toISOString']()[_0x539a97(0x3a7)](0x0,0xa):'','features':_0x28f1aa(_0x283f41[_0x539a97(0x3f5)]),'pin':_0x308f71,'status':_0x49dcd5(_0x283f41,_0x13faf9)});}if(_0x15aa51[_0x539a97(0x1b1)]===0x0){console[_0x539a97(0x3ea)](''),console[_0x539a97(0x3ea)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0x49c9bb=['\x20\x20'+'ID'[_0x539a97(0x1d1)](0xe),_0x539a97(0x239)[_0x539a97(0x1d1)](0xe),_0x539a97(0x279)[_0x539a97(0x1d1)](0xc),_0x539a97(0x301)[_0x539a97(0x1d1)](0x1e),_0x539a97(0x1e2)[_0x539a97(0x1d1)](0xa),'STATUS'][_0x539a97(0x2f7)]('\x20');console[_0x539a97(0x3ea)]('\x0a'+_0x49c9bb);for(const _0x4fc2b3 of _0x15aa51){const _0x4e109d=_0x4fc2b3['id'][_0x539a97(0x3a7)](0x0,0x8)+'…';console[_0x539a97(0x3ea)](['\x20\x20'+_0x4e109d['padEnd'](0xe),_0x4fc2b3[_0x539a97(0x40d)][_0x539a97(0x3a7)](0x0,0xe)['padEnd'](0xe),_0x4fc2b3[_0x539a97(0x3da)]['padEnd'](0xc),_0x4fc2b3[_0x539a97(0x3f5)][_0x539a97(0x3a7)](0x0,0x1e)['padEnd'](0x1e),_0x4fc2b3['pin'][_0x539a97(0x1d1)](0xa),_0x4fc2b3['status']][_0x539a97(0x2f7)]('\x20'));}console[_0x539a97(0x3ea)]('');}finally{await _0x50e823[_0x539a97(0x16c)]();}}async function _0x20798a(_0x6b7d91,_0x6d29bb){const _0x47807a=_0x356019,_0x534e5c=require$$5,_0x28c693=requireOkdbLicenseCodec();let _0x563c32=_0x6b7d91;(_0x28c693['detectInputType'](_0x6b7d91)==='path'||_0x3471b6['existsSync'](_0x6b7d91)&&_0x3471b6[_0x47807a(0x40e)](_0x6b7d91)[_0x47807a(0x15d)]())&&(_0x563c32=_0x3471b6[_0x47807a(0x2ab)](_0x6b7d91,_0x47807a(0x394))[_0x47807a(0x134)]());const _0x5820be=_0x5b9a2f[_0x47807a(0x2bd)](_0x6d29bb[_0x47807a(0x423)]),_0x29f39e=new _0x534e5c(_0x5820be,_0x6d29bb[_0x47807a(0x1d9)]?{'encryptionKey':_0x6d29bb[_0x47807a(0x1d9)]}:{});await _0x29f39e[_0x47807a(0x33b)]();try{!_0x29f39e[_0x47807a(0x23d)]&&(console['error'](_0x47807a(0x150)),process[_0x47807a(0x311)](0x1));let _0x170b1b;try{_0x170b1b=await _0x29f39e['_license'][_0x47807a(0x422)](_0x563c32);}catch(_0x1ba1fd){console['error'](_0x47807a(0x306)+_0x1ba1fd['message']),process['exit'](0x1);}const _0x3ef664=_0x29f39e[_0x47807a(0x23d)][_0x47807a(0x21e)](),_0x46def9=_0x3ef664[_0x47807a(0x355)](_0x52dcc6=>_0x52dcc6['licenseId']===_0x170b1b['id'])?.[_0x47807a(0x174)]||'',_0xf2f16e=Object[_0x47807a(0x3a1)](_0x170b1b[_0x47807a(0x3f5)]||{})[_0x47807a(0x267)](([,_0x3a9386])=>_0x3a9386)['map'](([_0x5f18ee])=>_0x5f18ee),_0x4b7db8=_0x170b1b['limits']||{},_0x3155df=[_0x4b7db8[_0x47807a(0x37e)]?_0x47807a(0x318)+_0x4b7db8['envs']:null,_0x4b7db8[_0x47807a(0x344)]?_0x47807a(0x159)+_0x4b7db8[_0x47807a(0x344)]:null,_0x4b7db8[_0x47807a(0x1a2)]?_0x47807a(0x349)+_0x4b7db8[_0x47807a(0x1a2)]:null,_0x4b7db8[_0x47807a(0x3e2)]?_0x47807a(0x421)+_0x4b7db8[_0x47807a(0x3e2)][_0x47807a(0x27c)]():null][_0x47807a(0x267)](Boolean)[_0x47807a(0x2f7)]('\x20\x20'),_0x4e81cd=_0x170b1b[_0x47807a(0x1ec)]===_0x28c693[_0x47807a(0x41f)];console[_0x47807a(0x3ea)](_0x47807a(0x337)),console[_0x47807a(0x3ea)](_0x47807a(0x29a)+_0x170b1b['id']),console[_0x47807a(0x3ea)](_0x47807a(0x20a)+_0x170b1b[_0x47807a(0x40d)]),console[_0x47807a(0x3ea)](_0x47807a(0x168)+new Date(_0x170b1b['expiresAt'])[_0x47807a(0x2b7)]()['slice'](0x0,0xa)),console[_0x47807a(0x3ea)](_0x47807a(0x232)+(_0xf2f16e[_0x47807a(0x2f7)](',\x20')||_0x47807a(0x2a0)));if(_0x3155df)console[_0x47807a(0x3ea)](_0x47807a(0x204)+_0x3155df);_0x4e81cd?(console[_0x47807a(0x3ea)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x47807a(0x3ea)]('')):(console['log']('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x46def9),console['log'](_0x47807a(0x269)),console[_0x47807a(0x3ea)](''),console[_0x47807a(0x3ea)](_0x47807a(0x300)),console[_0x47807a(0x3ea)](_0x47807a(0x2fa)+_0x46def9+_0x47807a(0x397)),console[_0x47807a(0x3ea)](_0x47807a(0x3f9)),console[_0x47807a(0x3ea)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console['log'](''));}finally{await _0x29f39e[_0x47807a(0x16c)]();}}async function _0x300bfb(_0x364cd5,_0x15a089){const _0x492f43=_0x356019,_0x2d7cab=require$$5,_0x2adf43=_0x5b9a2f[_0x492f43(0x2bd)](_0x15a089['dbPath']),_0x13715d=new _0x2d7cab(_0x2adf43,_0x15a089[_0x492f43(0x1d9)]?{'encryptionKey':_0x15a089[_0x492f43(0x1d9)]}:{});await _0x13715d[_0x492f43(0x33b)]();try{!_0x13715d[_0x492f43(0x23d)]&&(console[_0x492f43(0x365)](_0x492f43(0x150)),process[_0x492f43(0x311)](0x1));let _0x220337;try{_0x220337=await _0x13715d[_0x492f43(0x23d)]['activateLicense'](_0x364cd5[_0x492f43(0x134)]());}catch(_0x567931){console[_0x492f43(0x365)](_0x492f43(0x306)+_0x567931['message']),console[_0x492f43(0x365)](''),console[_0x492f43(0x365)](_0x492f43(0x254)),console[_0x492f43(0x365)](_0x492f43(0x3b1)),console[_0x492f43(0x365)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x492f43(0x365)](_0x492f43(0x26f)),console['error'](''),process['exit'](0x1);}console[_0x492f43(0x3ea)]('\x0a\x20\x20✓\x20License\x20activated'),console[_0x492f43(0x3ea)](_0x492f43(0x29a)+_0x220337['id']),console[_0x492f43(0x3ea)](_0x492f43(0x20a)+_0x220337['licensee']),console[_0x492f43(0x3ea)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x220337[_0x492f43(0x27a)])[_0x492f43(0x2b7)]()[_0x492f43(0x3a7)](0x0,0xa)),console[_0x492f43(0x3ea)](_0x492f43(0x1a5)),console[_0x492f43(0x3ea)]('');}finally{await _0x13715d[_0x492f43(0x16c)]();}}async function _0x5e2ad9(_0x48430a,_0x4b660e){const _0x4dd3f4=_0x356019;!_0x48430a&&(console['error'](_0x4dd3f4(0x2ad)),process[_0x4dd3f4(0x311)](0x1));const _0x1143f0=require$$5,_0x2668d9=requireOkdbLicenseCodec(),_0x5f0353=_0x5b9a2f[_0x4dd3f4(0x2bd)](_0x4b660e[_0x4dd3f4(0x423)]),_0x2f2e54=new _0x1143f0(_0x5f0353,_0x4b660e[_0x4dd3f4(0x1d9)]?{'encryptionKey':_0x4b660e[_0x4dd3f4(0x1d9)]}:{});await _0x2f2e54['open']();try{const _0x35d5e4=_0x2f2e54[_0x4dd3f4(0x2a1)];(!_0x35d5e4||!_0x35d5e4[_0x4dd3f4(0x347)]('~licenses'))&&(console[_0x4dd3f4(0x365)](_0x4dd3f4(0x2fc)+_0x48430a+'\x22'),process[_0x4dd3f4(0x311)](0x1));let _0x37e7f5=null,_0x575ac8=null;const _0x277b8c=_0x35d5e4[_0x4dd3f4(0x17a)](_0x4dd3f4(0x156),_0x48430a);if(_0x277b8c)_0x37e7f5=_0x48430a,_0x575ac8=_0x277b8c;else{const _0x35ec18=[];for(const {key:_0x239970,value:_0x436f20}of _0x35d5e4[_0x4dd3f4(0x268)](_0x4dd3f4(0x156))){if(_0x239970[_0x4dd3f4(0x143)](_0x48430a))_0x35ec18['push']({'key':_0x239970,'value':_0x436f20});}_0x35ec18[_0x4dd3f4(0x1b1)]===0x0&&(console[_0x4dd3f4(0x365)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x48430a+'\x22'),process[_0x4dd3f4(0x311)](0x1)),_0x35ec18[_0x4dd3f4(0x1b1)]>0x1&&(console[_0x4dd3f4(0x365)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x48430a+'\x22\x20matches\x20'+_0x35ec18[_0x4dd3f4(0x1b1)]+_0x4dd3f4(0x376)),process[_0x4dd3f4(0x311)](0x1)),_0x37e7f5=_0x35ec18[0x0][_0x4dd3f4(0x1d9)],_0x575ac8=_0x35ec18[0x0][_0x4dd3f4(0x1fd)];}const _0x3cb65b=Date[_0x4dd3f4(0x227)](),_0x5ea90f=_0x49dcd5(_0x575ac8,_0x3cb65b),_0x5b8f59=_0x2f2e54['id'],_0x46e3c8='__OKDB_PUB_FINGERPRINT__';let _0x5e176f='';try{const _0x533472=Buffer[_0x4dd3f4(0x19a)](_0x575ac8['_licenseHash'],_0x4dd3f4(0x1fa));_0x5e176f=_0x2668d9[_0x4dd3f4(0x247)](_0x5b8f59,_0x533472,_0x46e3c8)['pin'];}catch{}const _0x53c0b7=_0x575ac8['features']?Object[_0x4dd3f4(0x3a1)](_0x575ac8['features'])['filter'](([,_0x224348])=>_0x224348)[_0x4dd3f4(0x33d)](([_0x2b29e9])=>_0x2b29e9):[],_0x18a707=_0x575ac8[_0x4dd3f4(0x3f0)]||{},_0x305c39=_0x35d5e4?.['db']?.[_0x4dd3f4(0x17a)]?.(_0x4dd3f4(0x25b))??0x0,_0x29ffc4=[..._0x2f2e54['_envs'][_0x4dd3f4(0x284)]()][_0x4dd3f4(0x267)](_0x5ccbba=>!_0x5ccbba[_0x4dd3f4(0x143)]('~'))['length'];console['log'](_0x4dd3f4(0x1ad)),console['log'](_0x4dd3f4(0x29a)+_0x37e7f5),console[_0x4dd3f4(0x3ea)](_0x4dd3f4(0x20a)+(_0x575ac8[_0x4dd3f4(0x40d)]||'')),console[_0x4dd3f4(0x3ea)](_0x4dd3f4(0x168)+(_0x575ac8[_0x4dd3f4(0x27a)]?new Date(_0x575ac8[_0x4dd3f4(0x27a)])[_0x4dd3f4(0x2b7)]()['slice'](0x0,0xa):'')),console[_0x4dd3f4(0x3ea)]('\x20\x20\x20\x20features:\x20\x20'+(_0x53c0b7[_0x4dd3f4(0x2f7)](',\x20')||_0x4dd3f4(0x2a0))),console[_0x4dd3f4(0x3ea)](_0x4dd3f4(0x351)+_0x5e176f),console[_0x4dd3f4(0x3ea)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x5ea90f),console[_0x4dd3f4(0x3ea)](_0x4dd3f4(0x28a)+new Date(_0x575ac8[_0x4dd3f4(0x23f)])[_0x4dd3f4(0x2b7)]());if(_0x5ea90f==='active'){console[_0x4dd3f4(0x3ea)](''),console[_0x4dd3f4(0x3ea)]('\x20\x20Usage:');if(_0x18a707['maxWrites']){const _0x5c3837=Math[_0x4dd3f4(0x20c)](_0x305c39/_0x18a707[_0x4dd3f4(0x3e2)]*0x64);console[_0x4dd3f4(0x3ea)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x305c39['toLocaleString']()+'\x20/\x20'+_0x18a707[_0x4dd3f4(0x3e2)][_0x4dd3f4(0x27c)]()+'\x20\x20('+_0x5c3837+'%)');}else console[_0x4dd3f4(0x3ea)](_0x4dd3f4(0x339)+_0x305c39[_0x4dd3f4(0x27c)]()+_0x4dd3f4(0x1df));_0x18a707[_0x4dd3f4(0x37e)]?console[_0x4dd3f4(0x3ea)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x29ffc4+_0x4dd3f4(0x2b5)+_0x18a707[_0x4dd3f4(0x37e)]):console[_0x4dd3f4(0x3ea)](_0x4dd3f4(0x3fb)+_0x29ffc4+'\x20\x20(unlimited)');}console['log']('');}finally{await _0x2f2e54['close']();}}async function _0x218ec1(_0xc77190,_0x222b9e){const _0x3b6dda=_0x356019;!_0xc77190&&(console['error'](_0x3b6dda(0x2d8)),process[_0x3b6dda(0x311)](0x1));const _0x1f7d9a=require$$5,_0x488d37=_0x5b9a2f[_0x3b6dda(0x2bd)](_0x222b9e[_0x3b6dda(0x423)]),_0x46d999=new _0x1f7d9a(_0x488d37,_0x222b9e[_0x3b6dda(0x1d9)]?{'encryptionKey':_0x222b9e['key']}:{});await _0x46d999[_0x3b6dda(0x33b)]();try{const _0x3952e3=_0x46d999[_0x3b6dda(0x2a1)];(!_0x3952e3||!_0x3952e3[_0x3b6dda(0x347)](_0x3b6dda(0x156)))&&(console[_0x3b6dda(0x365)](_0x3b6dda(0x2fc)+_0xc77190+'\x22'),process[_0x3b6dda(0x311)](0x1));let _0x55610b=null,_0x3c2475=null;const _0x2bcbe5=_0x3952e3[_0x3b6dda(0x17a)]('~licenses',_0xc77190);if(_0x2bcbe5)_0x55610b=_0xc77190,_0x3c2475=_0x2bcbe5;else{const _0x4dd28e=[];for(const {key:_0x189675,value:_0x21d55d}of _0x3952e3[_0x3b6dda(0x268)](_0x3b6dda(0x156))){if(_0x189675[_0x3b6dda(0x143)](_0xc77190))_0x4dd28e[_0x3b6dda(0x2b4)]({'key':_0x189675,'value':_0x21d55d});}_0x4dd28e[_0x3b6dda(0x1b1)]===0x0&&(console[_0x3b6dda(0x365)](_0x3b6dda(0x2fc)+_0xc77190+'\x22'),process[_0x3b6dda(0x311)](0x1)),_0x4dd28e[_0x3b6dda(0x1b1)]>0x1&&(console['error'](_0x3b6dda(0x1f8)+_0xc77190+_0x3b6dda(0x265)+_0x4dd28e[_0x3b6dda(0x1b1)]+_0x3b6dda(0x376)),process[_0x3b6dda(0x311)](0x1)),_0x55610b=_0x4dd28e[0x0][_0x3b6dda(0x1d9)],_0x3c2475=_0x4dd28e[0x0]['value'];}await _0x3952e3[_0x3b6dda(0x38d)](_0x3b6dda(0x156),_0x55610b),console['log'](_0x3b6dda(0x257)+_0x55610b+_0x3b6dda(0x381)+(_0x3c2475[_0x3b6dda(0x40d)]||_0x3b6dda(0x220))+')');}finally{await _0x46d999['close']();}}async function _0x3d7f6e(_0x5bbdf6,_0xbbce21,_0x2e173e){const _0x4402b5=_0x356019;!_0x5bbdf6&&(console[_0x4402b5(0x365)](_0x4402b5(0x400)),process[_0x4402b5(0x311)](0x1));!_0x2e173e[_0x4402b5(0x162)]&&!(_0x2e173e[_0x4402b5(0x3cf)]&&_0x2e173e[_0x4402b5(0x244)])&&(console[_0x4402b5(0x365)](_0x4402b5(0x1c5)),process[_0x4402b5(0x311)](0x1));const _0x30099b=_0x2e173e['selfAddress']||_0xbbce21[_0x4402b5(0x382)]?.[_0x4402b5(0x392)];!_0x30099b&&(console[_0x4402b5(0x365)](_0x4402b5(0x361)+_0x4402b5(0x3a9)+_0x4402b5(0x2ef)),process[_0x4402b5(0x311)](0x1));const _0x2060fa=require$$5,_0x10cbd1=new _0x2060fa(_0xbbce21[_0x4402b5(0x423)],{'sync':{'address':_0x30099b,'auto_reconcile':![]}});await _0x10cbd1[_0x4402b5(0x33b)]();try{const _0x3370fd=_0x10cbd1[_0x4402b5(0x2a1)];if(_0x3370fd&&_0x3370fd['hasType'](_0x4402b5(0x348))){let _0x317292=![];for(const _0x1ae450 of _0x3370fd[_0x4402b5(0x268)](_0x4402b5(0x348))){_0x317292=!![];break;}_0x317292&&console[_0x4402b5(0x3ea)](_0x4402b5(0x326)+_0x4402b5(0x203));}console[_0x4402b5(0x3ea)](_0x4402b5(0x3e4)+_0x5bbdf6+'…'),await _0x10cbd1[_0x4402b5(0x382)]['join'](_0x5bbdf6[_0x4402b5(0x27d)](/\/+$/,''),{'token':_0x2e173e['token'],'username':_0x2e173e[_0x4402b5(0x3cf)],'password':_0x2e173e[_0x4402b5(0x244)]}),console[_0x4402b5(0x3ea)](_0x4402b5(0x420)),console['log'](_0x4402b5(0x2dd));}finally{await _0x10cbd1[_0x4402b5(0x16c)]();}}async function _0x393419(){const _0x527584=_0x356019,_0x350563=Date[_0x527584(0x227)](),_0x3c7e65=_0x52a845(process[_0x527584(0x362)]),_0x5aa580=_0x193366(_0x3c7e65),_0x4cd61c=_0x5b9a2f[_0x527584(0x2bd)](_0x5aa580[_0x527584(0x423)]);!_0x5aa580[_0x527584(0x197)]&&!process['stdin'][_0x527584(0x375)]&&(_0x5aa580[_0x527584(0x197)]=!![]);const _0x4d67ec=require$$5,{start:_0x2059fd,colorLog:_0x316cd2}=requireOkdbShell(),_0x27fe07={..._0x5aa580[_0x527584(0x1d9)]?{'encryptionKey':_0x5aa580['key']}:{},..._0x5aa580[_0x527584(0x25f)]?{}:_0x33e1ed(_0x5aa580[_0x527584(0x354)])?{'admin':_0x5aa580[_0x527584(0x354)]}:{},..._0x33e1ed(_0x5aa580['api'])?{'api':_0x5aa580[_0x527584(0x196)]}:{},..._0x33e1ed(_0x5aa580[_0x527584(0x1c4)])?{'auth':_0x5aa580[_0x527584(0x1c4)]}:{},..._0x33e1ed(_0x5aa580[_0x527584(0x214)])?{'mcp':_0x5aa580[_0x527584(0x214)]}:{},..._0x5aa580[_0x527584(0x2a2)]!==![]?{'timeMachine':_0x5aa580[_0x527584(0x2a2)]}:{}},_0x38ceac=new _0x4d67ec(_0x4cd61c,_0x27fe07);_0x38ceac[_0x527584(0x3ea)][_0x527584(0x3e0)]?.();const _0x143703=_0x38ceac[_0x527584(0x3ea)][_0x527584(0x271)](_0x1dca34=>_0x316cd2(_0x1dca34,_0x5aa580['logLevel']));if(_0x5aa580['noRepl'])process[_0x527584(0x136)][_0x527584(0x251)](_0x527584(0x32e));await _0x38ceac[_0x527584(0x33b)]();if(_0x5aa580['noRepl'])process[_0x527584(0x136)][_0x527584(0x251)](_0x527584(0x13d));try{await _0x2d9e82(_0x38ceac,_0x5aa580[_0x527584(0x234)]);}catch(_0x2d46d2){_0x2d46d2[_0x527584(0x304)]===_0x527584(0x389)&&(console[_0x527584(0x365)](_0x527584(0x31a)+_0x5aa580[_0x527584(0x234)]+_0x527584(0x24a)),process['exit'](0x1));throw _0x2d46d2;}if(_0x5aa580[_0x527584(0x197)])process[_0x527584(0x136)]['write']('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x5aa580[_0x527584(0x234)]+'\x0a');if(!_0x5aa580['noRepl'])_0x38ceac[_0x527584(0x3ea)][_0x527584(0x3e0)]?.(),_0x143703?.(),_0x322de9(_0x38ceac[_0x527584(0x1c4)]?.['getSecurityNotices']?.()??[]),await _0x2059fd(_0x38ceac,_0x5aa580);else{const _0x5c8e71=_0x5b9a2f[_0x527584(0x2f7)](_0x4cd61c,_0x527584(0x27f));try{_0x3471b6[_0x527584(0x1de)](_0x5c8e71,String(process[_0x527584(0x137)]));}catch{}const _0x4527cf=Date['now']()-_0x350563;console[_0x527584(0x3ea)](''),console[_0x527584(0x3ea)]('\x20\x20✓\x20OKDB\x20server\x20running'),console['log'](_0x527584(0x166)+_0x5aa580[_0x527584(0x234)]),console[_0x527584(0x3ea)](_0x527584(0x273)+_0x4cd61c),console[_0x527584(0x3ea)](_0x527584(0x404)+_0x38ceac['id']);{const _0x4290cd=_0x38ceac['_systemEnv']?.['db']?.['get']?.(_0x527584(0x25b))??0x0,_0x143445=[..._0x38ceac[_0x527584(0x323)][_0x527584(0x284)]()][_0x527584(0x267)](_0x460bd0=>!_0x460bd0['startsWith']('~'))[_0x527584(0x1b1)];if(_0x38ceac[_0x527584(0x23d)]?.[_0x527584(0x167)]?.[_0x527584(0x1ec)]===0x1){const _0x438d7a=Math[_0x527584(0x1f0)]((_0x38ceac[_0x527584(0x23d)][_0x527584(0x167)][_0x527584(0x27a)]-Date[_0x527584(0x227)]())/0x5265c00);console[_0x527584(0x3ea)](_0x527584(0x1b8)+_0x38ceac['_license'][_0x527584(0x167)][_0x527584(0x40d)]+'\x20(expires\x20in\x20'+_0x438d7a+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x38ceac[_0x527584(0x23d)]?.['active']){const _0x3d55ad=_0x38ceac[_0x527584(0x23d)]['active'];console[_0x527584(0x3ea)](_0x527584(0x131)+_0x3d55ad[_0x527584(0x40d)]+_0x527584(0x2fe)+new Date(_0x3d55ad['expiresAt'])[_0x527584(0x2b7)]()['slice'](0x0,0xa)+')');const _0x1933c9=_0x3d55ad[_0x527584(0x3f0)]||{};if(_0x1933c9[_0x527584(0x3e2)]){const _0x5176c8=Math[_0x527584(0x20c)](_0x4290cd/_0x1933c9[_0x527584(0x3e2)]*0x64);console[_0x527584(0x3ea)](_0x527584(0x3aa)+_0x4290cd['toLocaleString']()+'\x20/\x20'+_0x1933c9['maxWrites'][_0x527584(0x27c)]()+_0x527584(0x1c9)+_0x5176c8+_0x527584(0x39a)+_0x143445+(_0x1933c9[_0x527584(0x37e)]?'/'+_0x1933c9[_0x527584(0x37e)]:'')+_0x527584(0x256)+(_0x143445===0x1?'':'s'));}}else{if(_0x38ceac[_0x527584(0x23d)]){const _0x370069=_0x38ceac[_0x527584(0x23d)][_0x527584(0x21e)](),_0x280b89=_0x370069[_0x527584(0x1b1)]?_0x370069['map'](_0x474354=>_0x474354['pin'])['join'](',\x20'):_0x527584(0x38e),_0x59e470=_0x38ceac[_0x527584(0x23d)]['effective'],_0x5abf39=_0x59e470['limits'][_0x527584(0x3e2)]?Math[_0x527584(0x20c)](_0x4290cd/_0x59e470[_0x527584(0x3f0)][_0x527584(0x3e2)]*0x64):0x0;console[_0x527584(0x3ea)](_0x527584(0x3d3)),console[_0x527584(0x3ea)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x4290cd[_0x527584(0x27c)]()+_0x527584(0x2b5)+_0x59e470[_0x527584(0x3f0)][_0x527584(0x3e2)][_0x527584(0x27c)]()+_0x527584(0x1c9)+_0x5abf39+'%),\x20'+_0x143445+_0x527584(0x2b5)+_0x59e470[_0x527584(0x3f0)][_0x527584(0x37e)]+_0x527584(0x426)),console[_0x527584(0x3ea)](_0x527584(0x2c0)+_0x280b89);}}}}console[_0x527584(0x3ea)](_0x527584(0x3a2)+_0x5aa580[_0x527584(0x234)]+_0x527584(0x1d7));!_0x5aa580[_0x527584(0x25f)]&&console[_0x527584(0x3ea)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x5aa580[_0x527584(0x234)]+_0x527584(0x289));console[_0x527584(0x3ea)](''),console[_0x527584(0x3ea)](_0x527584(0x212)+_0x4527cf+'ms'),_0x322de9(_0x38ceac[_0x527584(0x1c4)]?.[_0x527584(0x20e)]?.()??[]);async function _0x17d311(){const _0x3e31f5=_0x527584;process[_0x3e31f5(0x136)][_0x3e31f5(0x251)](_0x3e31f5(0x2d3));try{_0x3471b6[_0x3e31f5(0x302)](_0x5c8e71);}catch{}await _0x38ceac[_0x3e31f5(0x16c)](),process['exit'](0x0);}process['on']('SIGINT',_0x17d311),process['on']('SIGTERM',_0x17d311);}}const _0x3c0a4a=new Set([_0x356019(0x413),_0x356019(0x322),_0x356019(0x327),_0x356019(0x255),_0x356019(0x28e),_0x356019(0x13b),_0x356019(0x290),_0x356019(0x162),_0x356019(0x2f7),'license']),_0x379107=process[_0x356019(0x362)][0x2];if(_0x379107===_0x356019(0x413))console[_0x356019(0x3ea)](require$$2[_0x356019(0x413)]),process['exit'](0x0);else{if(_0x379107&&_0x3c0a4a['has'](_0x379107)){const _0x4a7419=process[_0x356019(0x362)][_0x356019(0x3a7)](0x3),_0x15a728=_0x52a845([_0x356019(0x34a),_0x356019(0x35f),..._0x4a7419]),_0x1c7162=_0x193366(_0x15a728),_0x3f6171=new Set(['--path','-d',_0x356019(0x1a4),'-k',_0x356019(0x33f),'-c',_0x356019(0x1cc),'-p',_0x356019(0x128),'--env','-e',_0x356019(0x410),_0x356019(0x217),'--password',_0x356019(0x1f3),_0x356019(0x330),_0x356019(0x1ce),_0x356019(0x3d7),_0x356019(0x406),_0x356019(0x235),'-u',_0x356019(0x2c7)]);let _0x1bf289=null;for(let _0x20e384=0x0;_0x20e384<_0x4a7419['length'];_0x20e384++){if(_0x3f6171[_0x356019(0x2ed)](_0x4a7419[_0x20e384])){_0x20e384++;continue;}if(!_0x4a7419[_0x20e384][_0x356019(0x143)]('-')){_0x1bf289=_0x4a7419[_0x20e384];break;}}(async()=>{const _0x422fef=_0x356019;if(_0x379107===_0x422fef(0x162)){const _0x4d8256=process[_0x422fef(0x362)][0x3],_0x6978b1=process[_0x422fef(0x362)][_0x422fef(0x3a7)](0x4),_0x44e29a=_0x52a845(['node',_0x422fef(0x35f),..._0x6978b1]),_0x3fdd7a=_0x193366(_0x44e29a),_0xb4d6b0=new Set(['--path','-d',_0x422fef(0x1a4),'-k',_0x422fef(0x33f),'-c',_0x422fef(0x1cc),'-p','--name','--password','--label',_0x422fef(0x330),_0x422fef(0x1ce),_0x422fef(0x3d7),_0x422fef(0x128),_0x422fef(0x180),'-e','--types']),_0x95858=[];for(let _0x1e4e5f=0x0;_0x1e4e5f<_0x6978b1[_0x422fef(0x1b1)];_0x1e4e5f++){if(_0xb4d6b0[_0x422fef(0x2ed)](_0x6978b1[_0x1e4e5f])){_0x1e4e5f++;continue;}if(_0x6978b1[_0x1e4e5f][_0x422fef(0x143)]('-'))continue;_0x95858[_0x422fef(0x2b4)](_0x6978b1[_0x1e4e5f]);}switch(_0x4d8256){case _0x422fef(0x2d9):await _0x539a50(_0x3fdd7a,_0x44e29a);break;case _0x422fef(0x1c1):await _0x77c61b(_0x3fdd7a);break;case _0x422fef(0x2eb):await _0x11fbf6(_0x95858[0x0],_0x3fdd7a);break;default:console[_0x422fef(0x365)](_0x422fef(0x22c)+_0x4d8256+_0x422fef(0x216)),process[_0x422fef(0x311)](0x1);}return;}if(_0x379107==='license'){const _0x33df5d=requireOkdbLicenseCodec(),_0x5389c1=process[_0x422fef(0x362)][_0x422fef(0x3a7)](0x3),_0x41ae25=_0x52a845([_0x422fef(0x34a),_0x422fef(0x35f),..._0x5389c1]),_0x4405cd=_0x193366(_0x41ae25),_0x4f2abc=new Set(['--path','-d',_0x422fef(0x1a4),'-k',_0x422fef(0x33f),'-c',_0x422fef(0x1cc),'-p',_0x422fef(0x128)]),_0x2c5de5=[];for(let _0x1321ea=0x0;_0x1321ea<_0x5389c1[_0x422fef(0x1b1)];_0x1321ea++){if(_0x4f2abc[_0x422fef(0x2ed)](_0x5389c1[_0x1321ea])){_0x1321ea++;continue;}if(_0x5389c1[_0x1321ea]['startsWith']('-'))continue;_0x2c5de5[_0x422fef(0x2b4)](_0x5389c1[_0x1321ea]);}const _0x39faa2=_0x2c5de5[0x0]??null;if(_0x39faa2===_0x422fef(0x38d))await _0x218ec1(_0x2c5de5[0x1],_0x4405cd);else{if(!_0x39faa2)await _0x55c721(_0x4405cd);else{let _0x1cb92e=_0x33df5d[_0x422fef(0x3ba)](_0x39faa2);if(_0x1cb92e===_0x422fef(0x28d)&&_0x3471b6[_0x422fef(0x1af)](_0x39faa2))_0x1cb92e='path';if(_0x1cb92e===_0x422fef(0x3ed))try{const _0x43e71f=_0x3471b6[_0x422fef(0x2ab)](_0x39faa2,_0x422fef(0x394))[_0x422fef(0x134)](),_0x9df392=_0x33df5d[_0x422fef(0x3ba)](_0x43e71f);if(_0x9df392===_0x422fef(0x320)){await _0x300bfb(_0x43e71f,_0x4405cd);return;}await _0x20798a(_0x39faa2,_0x4405cd);return;}catch(_0x2caaf5){console[_0x422fef(0x365)](_0x422fef(0x1ab)+_0x39faa2+':\x20'+_0x2caaf5['message']),process['exit'](0x1);}switch(_0x1cb92e){case'blob':await _0x20798a(_0x39faa2,_0x4405cd);break;case _0x422fef(0x320):await _0x300bfb(_0x39faa2,_0x4405cd);break;case'uuid':await _0x5e2ad9(_0x39faa2,_0x4405cd);break;default:console[_0x422fef(0x365)](_0x422fef(0x36a)+_0x39faa2+'\x22'),console[_0x422fef(0x365)](''),console[_0x422fef(0x365)]('\x20\x20Expected\x20one\x20of:'),console[_0x422fef(0x365)](_0x422fef(0x3bf)),console['error'](_0x422fef(0x18a)),console[_0x422fef(0x365)](_0x422fef(0x358)),console[_0x422fef(0x365)](_0x422fef(0x29d)),console[_0x422fef(0x365)](''),console[_0x422fef(0x365)](_0x422fef(0x2e0)),process['exit'](0x1);}}}return;}switch(_0x379107){case'doctor':await _0x53005c(_0x1c7162);break;case _0x422fef(0x327):await _0x251e0c();break;case'reset':await _0x4e61dd(_0x1c7162);break;case'backup':await _0xae89c5(_0x1bf289??_0x5b9a2f[_0x422fef(0x2bd)](_0x422fef(0x3e6)),_0x1c7162);break;case _0x422fef(0x28e):await _0x5abe1d(_0x1bf289??_0x5b9a2f[_0x422fef(0x2bd)](_0x422fef(0x30a)),_0x1c7162,_0x15a728);break;case _0x422fef(0x13b):await _0x10b615(_0x1bf289??_0x5b9a2f[_0x422fef(0x2bd)](_0x422fef(0x30a)),_0x1c7162,_0x15a728);break;case'join':await _0x3d7f6e(_0x1bf289,_0x1c7162,_0x15a728);break;}})()[_0x356019(0x14c)](()=>process[_0x356019(0x311)](0x0))[_0x356019(0x30c)](_0x1b24bc=>{const _0x5df3ae=_0x356019;console[_0x5df3ae(0x365)](_0x5df3ae(0x1ea)+(_0x1b24bc['message']||_0x1b24bc)+'\x0a'),process[_0x5df3ae(0x311)](0x1);});}else _0x393419()[_0x356019(0x30c)](_0x284752=>{const _0x110ea6=_0x356019;console['error'](_0x110ea6(0x161)),console[_0x110ea6(0x365)](_0x284752[_0x110ea6(0x2cd)]||_0x284752),process[_0x110ea6(0x311)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0xb5f572(0x1db)]=okdb;function _0xa312(){const _0x559ecc=['waiting','\x1b[34m','\x20\x20⚠','platform','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','stack','decodeActivationToken','OKDBForeignKeyDeleteError','POST','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x27\x20already\x20registered','\x0a[okdb]\x20shutting\x20down…\x0a','/types\x0a\x20\x20\x20\x20','PUBLIC_KEY_PEM','pending','txn:start','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','create','transport:\x20','item:update','use\x20<env>','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','env/staging/info','0123456789ABCDEFGHJKMNPQRSTVWXYZ','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','\x0a\x0a\x20\x20','QUIT','OKDBInvalidPrimaryKeyError','targetKey','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','fts:','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','createHmac','--password','createdAt','revoke','\x20\x20Path\x20access','has','createInterface','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','USE','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','fts:drop','pause','removeLicense','407672ovaiwq','license:added','join','effective','Feature\x20not\x20licensed:\x20','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(expires\x20','exec','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','FEATURES','unlinkSync','no\x20.kdbconfig\x20(using\x20defaults)','code','issuedAt','[okdb]\x20error:\x20','<path>','\x20to\x20browse\x20the\x20API,\x20','\x20<path>\x20[json-body]','./okdb-export.ndjson','OKDBTypeNotRegisteredError','catch','[okdb]\x20nothing\x20to\x20reset\x20—\x20','\x20\x20@','prototype','type/users/item/alice','exit','[okdb]\x20opening\x20','application/json','__OKDB_PUB_FINGERPRINT__','\x20day(s).','\x20\x20╚═══════════════════════════╝','{}[]:,\x0a\x0d\x09\x20','envs=','Foreign\x20key\x20violation:\x20','[okdb]\x20port\x20','schema:set','http','resetting','types','OKDBUniqueConstraintError','activation','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','doctor','_envs','repeat','finally','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','init','isInteger','call','mkdirSync','\x1b[35m','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','expiry','[okdb]\x20starting…\x0a','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','--permissions','\x20\x20Flags','children','info','./okdb-data','listLicenses','toFixed','\x0a\x20\x20✓\x20License\x20added','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','\x20\x20\x20\x20writes:\x20\x20\x20\x20','migrate','open','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','map','Invalid\x20license\x20blob:\x20','--config','\x20\x20Type\x20','Engines','\x20(must\x20be\x201–65535)','description','typesPerEnv','\x20already\x20exists','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','hasType','~tokens','peers=','node','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x20\x20changes=','processors/','TYPE_NOT_REGISTERED','false','DELETE\x20type/users/item/x','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','\x1b[90m','stdin','admin','find','SCHEMA_VALIDATION_FAILED','indexOf','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','exp','parse','\x20opening\x20','/type/users\x0a\x20\x20\x20\x20','(no\x20types)','system','okdb','rawBuf','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','argv','/\x20quit\x20/\x20Ctrl+C','constructor','error','_computeStatus','System','txn:rollback','txn:end','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','string','alloc','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','port\x20','/api/env/','darwin','INDEX_ALREADY_REGISTERED','Index\x20\x22','concat','isTTY','\x20licenses','SIG_INVALID','readline','kind','License\x20expired\x20or\x20invalidated','GET','type/users/query\x20{\x22active\x22:true}','sourceKey','envs','captureStackTrace','dest','\x20\x20(licensee:\x20','sync','selfAddress','blobs','val','bus:poke','env','server','EADDRINUSE','other','indexToDb','dynamic','remove','(add\x20a\x20license\x20first)','views','index:reset','\x20more','address','readUInt8','utf8','writeUInt8','label',')\x20to\x20your\x20license\x20vendor.','access:\x20','<json-body>','%),\x20','test','\x20\x20+','env:removed','invalid','digest','importFromFile','entries','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','ACTIVATION_EXPIRED','help','TYPES','gray','slice','\x0a\x20\x20okdb\x20doctor\x0a','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','\x20\x20\x20\x20usage:\x20\x20\x20','Indexes','true','\x0a\x20\x20No\x20routes\x20matching\x20\x22','\x20\x20·\x20\x20','license:invalid','green','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','stringify','LICENSE_LIMIT_EXCEEDED','isFeatureEnabled','UNIQUE_CONSTRAINT','\x20\x20✓\x20Revoked\x20token\x20','getCount','108976RjboHx','white','detectInputType','MALFORMED_TOKEN','Type\x20\x27','121912CLLacm','fromEntries','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','OKDBAlreadyExistsError','[env]','license:removed','enabled','index:ready','_isFree','recheck','valid','system:poke','engines','bind','LICENSE_HASH_MISMATCH','setTtl','[okdb]\x20invalid\x20port:\x20','\x0d[okdb]\x20blobs:\x20','username','licensed','_ensureTokensType','item:remove','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','type:registered','OKDBIndexAlreadyRegisteredError','\x20\x20records=','--ttl','LICENSE_INVALID','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','expires','level:\x20info','[okdb]\x20imported\x20\x20types=','SIGINT','\x20for\x20commands,\x20','body','detachConsole','\x20\x20(','maxWrites','\x22\x20is\x20used\x20by:\x20','\x0a\x20\x20Joining\x20cluster\x20at\x20','INVALID_PRIMARY_KEY','./okdb-backup','use','config\x20file\x20valid:\x20','OKDBInvalidIndexKeyError','log','\x27\x20doesn\x27t\x20exist','halted','path','type/users/item/alice\x20--env\x20staging','Examples','limits','listRoutes','standard','logLevel','dirname','features','\x20\x20\x20\x20\x20\x20\x20','wrong_node','errors','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','embeddings','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','\x20\x20score:','freeze','\x20\x20Writes:\x20\x20','importBlobs','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','sort','targetType','tags:\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20','[okdb]\x20error:\x20--password\x20requires\x20--name','--token','database\x20path\x20writable:\x20','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','readUInt16BE','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','VERSION_MISMATCH','licensee','statSync','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','--types','ttl:set','--path','version','unique:violation_resolved','\x20\x20[okdb]\x20shutting\x20down…','[okdb]\x20exporting\x20env\x20\x22','creating','trimStart','.kdbconfig','ROUTES','decodeLicenseBlob','--log-requests','input:\x20','\x20→\x20POST\x20/api/env/','LICENSE_TYPE_OPEN','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','writes=','addLicense','dbPath','\x20\x20\x20\x20\x20http://localhost:','ALREADY_EXISTS','\x20envs','[okdb]\x20loaded\x20config:\x20','\x20tokens:','once','dropType','cyan','--log-level','OKDBSchemaValidationError','OKDBInvalidValueError','\x20\x20\x20\x20\x20\x20','started','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','PUT','dim','.okdb-write-test','\x20\x20\x20\x20license:\x20','PUB_FINGERPRINT','2838011EknUZz','trim','set','stdout','pid','--no-repl','Events','object','import','forEach','\x20\x20✓\x20database\x20opened\x0a','net','licenseHash','padStart','clearTtl','[okdb]\x20created\x20.kdbconfig','startsWith','\x20\x20·\x20','time','routes','Build\x20expects\x20public\x20key\x20fingerprint\x20','put','roles','/api/','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','then','system:drain','sync:apply','\x20type','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','exportBlobs','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','files','LICENSE_ACTIVATION_INVALID','properties','~licenses','name','\x1b[2m','types/env=','some','\x20which\x20does\x20not\x20exist','License\x20already\x20stored','isFile','createHash',':\x20key\x20[','already\x20in\x20use','\x0a[okdb]\x20fatal\x20error:','token','timingSafeEqual','registerType','meta','\x20\x20\x20\x20port:\x20\x20','active','\x20\x20\x20\x20expires:\x20\x20\x20','summary','sub','reason','close','3857715qnOjjV','dropping','readUInt32BE',',\x20label:\x20','15CmMHfI','events','active:','pin','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x1b[0m','node\x20','192025Zpusxi','--version','get','\x20\x20skipped=','LICENSED_BUILD','resetFts','--no-admin','Activation\x20invalid:\x20','--env','toString','[okdb]\x20backup\x20complete','LABEL','\x22\x20→\x20','EXIT','values','type','current','types:','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','ENVS','question','grants','every','Files','fill','\x20bytes,\x20need\x20>=\x2065)','id:\x20','equals','randomBytes','default','api','noRepl','\x20\x20\x20\x20','/type/users/query\x0a\x20\x20\x20\x20','from','assertLimit','OKDBVersionMismatchError','node:crypto','--drop','transaction','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','registerIndex','syncPeers','system:bus_state_change','--key','\x20\x20\x20\x20status:\x20\x20\x20\x20active','registerFts','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','No\x20tokens.','config','\x0a\x20\x20\x20\x20','[okdb]\x20error:\x20failed\x20to\x20read\x20','LICENSE_FEATURE_DISABLED','\x0a\x20\x20License\x20details:','_lookupByName','existsSync','Shutting\x20down\x20due\x20to\x20license\x20expiry','length','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','license','sizeBefore','PATCH','setPrompt','files/','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','Token\x20secret\x20not\x20configured','dropIndex','INDEX_HAS_CONSUMERS','typeSubDbs','\x20records…','access','[okdb]\x20blobs:\x20imported=','Invalid\x20primary\x20key\x20type:\x20','list','warn','[okdb]\x20reset\x20aborted','auth','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','--blobs','[on|off|level]','fieldPath','\x20writes\x20(','count','prompt','--port','reverse','--grants','[okdb]\x20created\x20./okdb-data','Full-text\x20search','padEnd','\x1b[1m','data','\x20\x20→\x20\x20','red','search','/api','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','key','\x20MB)','exports','Cannot\x20set\x20enforce\x20schema\x20on\x20','NAME','writeFileSync','\x20\x20(unlimited)','decoded','\x20\x20╔═══════════════════════════╗','PIN','type/users','logs','\x20\x20║','[okdb]\x20importing\x20','OKDBForeignKeyError','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','index:registered','\x0a[okdb]\x20error:\x20','\x0a\x20\x20','licenseType','\x0a\x20\x20✓\x20Token\x20created','fts:reset','toLowerCase','ceil','blob','\x20\x20Envs:\x20\x20\x20\x20','--label','\x20log\x20level:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','\x20result','FOREIGN_KEY_DELETE_RESTRICTED','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','--env\x20<name>','hex','ttl:clear','win32','value','SCHEMA_COLLECTION_INVALID','transport','records',':\x20expected\x20','Hint:\x20','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\x20\x20\x20\x20limits:\x20\x20\x20\x20','\x20environment\x20','writeUInt32BE','sha256','fts','queue','\x20\x20\x20\x20licensee:\x20\x20','[okdb]\x20export\x20complete','round','\x20not\x20found','getSecurityNotices','OKDBTypeAlreadyRegisteredError','115060BLcjRL','\x20\x20(name:\x20','[okdb]\x20started\x20in\x20','types\x20--env\x20staging','mcp','open\x20','\x22.\x20Use:\x20create,\x20list,\x20revoke','--name','isArray','level','details','start\x20','writeUInt16BE','permissions','getPins','safety','(unset)','dropSchema','onLicenseExpired','off','--help','[okdb]\x20exported\x20\x20types=','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','now','\x20\x20\x20\x20permissions:\x20','available','\x27\x20on\x20type\x20\x27','10eXWigK','[okdb]\x20unknown\x20token\x20action:\x20\x22','xdg-open\x20','allocUnsafe','ref:violation_resolved','HELP','payload','\x20\x20\x20\x20features:\x20\x20','ftsName','port','--username','boolean','__esModule','type/','LICENSEE','stopping','shutdown','--changes','_license','failures','addedAt','INDEX_NOT_REGISTERED','\x20MB\x20→\x20','TYPE_ALREADY_REGISTERED','status','password','\x20SECURITY\x20NOTICE','28IuSPha','derivePin','\x0d[okdb]\x20','update','\x20already\x20in\x20use','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','ttl','../','activateLicense','dropFts','--open','write','Version\x20mismatch\x20for\x20','split','\x20\x20Common\x20causes:','backup','\x20env','\x20\x20✓\x20Removed\x20license\x20','.kdb_history','yes','\x1b[33m','__writeCounter','_licenseHash','verify','operation','noAdmin','env:opened','drop','\x27:\x20','system:stopped','message','\x22\x20matches\x20','yellow','filter','getRange','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','index:drop','Index\x20\x27','byteLength','5cf671aada50aa8e','method','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','(on\x20any\x20path\x20command)','attach','terminal','\x20\x20\x20\x20path:\x20\x20','min','reload','keys:','No\x20license\x20found\x20matching\x20this\x20activation\x20token','Records','EXPIRES','expiresAt','null','toLocaleString','replace','clearLine','okdb.pid','env/','sig','[okdb]\x20reset:\x20','[okdb]\x20import\x20complete','keys','\x20\x20Tier:\x20\x20\x20\x20','OKDBSchemaCollectionError','env/:env','created','/admin/index.html','\x20\x20\x20\x20addedAt:\x20\x20\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Some\x20checks\x20failed.\x0a','unknown','export','magenta','reset','loadEnvFile','listening','66mJQgkJ','includes','resetIndex','(null)','_active','database\x20path\x20not\x20writable:\x20','\x20\x20http://localhost:','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','title','expired','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','floor','bold','(none)','_systemEnv','timeMachine','verifyActivation','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','base64url','tags','toUpperCase','ttl:expired','debug','\x20logs\x20on\x20\x20','readFileSync','stderr','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','charCodeAt','system:clock_change','hasOwnProperty','stopped','max','line','push','\x20/\x20','cause','toISOString','INVALID_INDEX_KEY','body:\x20','copy','logRequests',',\x20got\x20','resolve','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','ref:violation','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','changes','\x22\x20on\x20\x22','License\x20signature\x20invalid:\x20','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','fts:registered','listen','--address'];_0xa312=function(){return _0x559ecc;};return _0xa312();}
2
+ 'use strict';const _0x4778da=_0x4358;(function(_0x2552b0,_0x403a12){const _0x22e44f=_0x4358,_0xf3d065=_0x2552b0();while(!![]){try{const _0x2d91f1=parseInt(_0x22e44f(0x45d))/0x1*(-parseInt(_0x22e44f(0x1c5))/0x2)+parseInt(_0x22e44f(0x3d7))/0x3*(-parseInt(_0x22e44f(0x2d5))/0x4)+parseInt(_0x22e44f(0x3d5))/0x5*(-parseInt(_0x22e44f(0x1ac))/0x6)+-parseInt(_0x22e44f(0x2ce))/0x7+parseInt(_0x22e44f(0x1f8))/0x8+parseInt(_0x22e44f(0x197))/0x9+parseInt(_0x22e44f(0x2f7))/0xa;if(_0x2d91f1===_0x403a12)break;else _0xf3d065['push'](_0xf3d065['shift']());}catch(_0x2f7078){_0xf3d065['push'](_0xf3d065['shift']());}}}(_0x3b86,0xbd383));var require$$1$1=require(_0x4778da(0x2d6)),require$$1=require('fs'),require$$3=require(_0x4778da(0x3f3)),require$$0$2=require(_0x4778da(0x26d)),require$$5=require(_0x4778da(0x1ff)),require$$0=require(_0x4778da(0x357)),require$$0$1=require(_0x4778da(0x27f)),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x37788c){const _0x4363e7=_0x4778da;return _0x37788c&&_0x37788c[_0x4363e7(0x441)]&&Object[_0x4363e7(0x1cb)][_0x4363e7(0x3ee)][_0x4363e7(0x1e7)](_0x37788c,_0x4363e7(0x45b))?_0x37788c['default']:_0x37788c;}var okdb$1={},version=_0x4778da(0x19d),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x27468d=require$$0;function _0x4f96ba(_0x12e92d,_0x1b03fb){const _0x4a28ee=_0x4358;return _0x27468d[_0x4a28ee(0x232)](_0x4a28ee(0x1a7),_0x1b03fb)['update'](_0x12e92d)[_0x4a28ee(0x2f8)](_0x4a28ee(0x311));}function _0x9197e8(_0x51cf0f,_0x34fd3a){const _0x55a54f=_0x4358;if(typeof _0x51cf0f!==_0x55a54f(0x3e2)||typeof _0x34fd3a!=='string')return![];if(Buffer['byteLength'](_0x51cf0f)!==Buffer[_0x55a54f(0x361)](_0x34fd3a))return![];return _0x27468d['timingSafeEqual'](Buffer['from'](_0x51cf0f),Buffer['from'](_0x34fd3a));}function _0xf1d162(_0x448f65){if(!_0x448f65?.['startsWith']('Bearer\x20'))return null;return _0x448f65['slice'](0x7);}function _0x7bdaec(_0x56e201=0x20){const _0x4230cf=_0x4358;return _0x27468d[_0x4230cf(0x36e)](_0x56e201)[_0x4230cf(0x2b5)]('base64url');}function _0x6800ed(_0x6c3f0a){const _0xb041bd=_0x4358;return _0x27468d[_0xb041bd(0x3b4)](_0xb041bd(0x1a7))[_0xb041bd(0x20e)](_0x6c3f0a)['digest'](_0xb041bd(0x29d));}function _0x33910c(_0x41d85d,_0x2e556f,_0x32c667=0x36ee80){const _0x4a681a=_0x4358;if(!_0x2e556f)throw new Error(_0x4a681a(0x3c8));const _0x473c7b=Date[_0x4a681a(0x29e)](),_0x11af99=Buffer['from'](JSON[_0x4a681a(0x321)]({'iat':_0x473c7b,'exp':_0x473c7b+_0x32c667,'sub':_0x41d85d?.['id']??_0x41d85d?.[_0x4a681a(0x355)]??null,'username':_0x41d85d?.['username']??_0x41d85d?.[_0x4a681a(0x282)]??null,'roles':Array['isArray'](_0x41d85d?.[_0x4a681a(0x3a8)])?_0x41d85d[_0x4a681a(0x3a8)]:[]}))[_0x4a681a(0x2b5)]('base64url'),_0x16f4c3=_0x4f96ba(_0x11af99,_0x2e556f);return _0x11af99+'.'+_0x16f4c3;}function _0x4d6d03(_0x48cdf2,_0x35e864){const _0x23fb8a=_0x4358;if(!_0x35e864||typeof _0x48cdf2!==_0x23fb8a(0x3e2))return null;const [_0x416e1c,_0x4bec3d]=_0x48cdf2[_0x23fb8a(0x46e)]('.');if(!_0x416e1c||!_0x4bec3d)return null;const _0x4699dd=_0x4f96ba(_0x416e1c,_0x35e864);if(!_0x9197e8(_0x4bec3d,_0x4699dd))return null;try{const _0x3aafd8=JSON['parse'](Buffer['from'](_0x416e1c,_0x23fb8a(0x311))[_0x23fb8a(0x2b5)]()),_0x8b515c=0x7530;if(Date[_0x23fb8a(0x29e)]()>Number(_0x3aafd8?.[_0x23fb8a(0x315)]??0x0)+_0x8b515c)return null;return _0x3aafd8;}catch{return null;}}async function _0x3175a3(_0x429d22){return new Promise((_0x58dbc8,_0x3e884e)=>{const _0x5e984c=_0x4358,_0x207a88=_0x27468d[_0x5e984c(0x36e)](0x10);_0x27468d['scrypt'](_0x429d22,_0x207a88,0x40,(_0x127b99,_0xe7439)=>{const _0x413480=_0x5e984c;if(_0x127b99)_0x3e884e(_0x127b99);_0x58dbc8(_0x207a88[_0x413480(0x2b5)](_0x413480(0x29d))+':'+_0xe7439[_0x413480(0x2b5)](_0x413480(0x29d)));});});}async function _0x1405ed(_0x25be6e,_0x34903a){const _0x21086f=_0x4358,[_0x578a7c,_0x1f514f]=_0x34903a[_0x21086f(0x46e)](':');if(!_0x578a7c||!_0x1f514f)return![];const _0x39841b=Buffer[_0x21086f(0x2a8)](_0x578a7c,_0x21086f(0x29d));return new Promise((_0x69d632,_0x2de3dd)=>{const _0x34c5b0=_0x21086f;_0x27468d[_0x34c5b0(0x1ea)](_0x25be6e,_0x39841b,0x40,(_0x23d7e6,_0x469d21)=>{const _0x2399fb=_0x34c5b0;if(_0x23d7e6)_0x2de3dd(_0x23d7e6);_0x69d632(_0x27468d[_0x2399fb(0x426)](_0x469d21,Buffer['from'](_0x1f514f,_0x2399fb(0x29d))));});});}return okdbAuthTokens={'hmac':_0x4f96ba,'timingSafeEqual':_0x9197e8,'parseBearer':_0xf1d162,'randomToken':_0x7bdaec,'hashToken':_0x6800ed,'issueToken':_0x33910c,'authenticateToken':_0x4d6d03,'hashPassword':_0x3175a3,'verifyPassword':_0x1405ed},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x114cf=_0x4778da;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x330b2a=require$$0$1,_0x508625=_0x114cf(0x29b),_0x36a6d1=new Uint8Array(0x100)[_0x114cf(0x1df)](0xff);for(let _0x391513=0x0;_0x391513<_0x508625[_0x114cf(0x2ec)];_0x391513++){_0x36a6d1[_0x508625[_0x114cf(0x251)](_0x391513)]=_0x391513,_0x36a6d1[_0x508625[_0x114cf(0x251)](_0x391513)+0x20]=_0x391513;}_0x36a6d1['O'[_0x114cf(0x251)](0x0)]=0x0,_0x36a6d1['o'[_0x114cf(0x251)](0x0)]=0x0,_0x36a6d1['I'[_0x114cf(0x251)](0x0)]=0x1,_0x36a6d1['i'['charCodeAt'](0x0)]=0x1,_0x36a6d1['L'['charCodeAt'](0x0)]=0x1,_0x36a6d1['l'[_0x114cf(0x251)](0x0)]=0x1;function _0x53c8f8(_0x5cfea1){const _0x24e28c=_0x114cf;let _0x551ac8=0x0,_0x5acf52=0x0,_0x46ab23='';for(let _0x43529c=0x0;_0x43529c<_0x5cfea1[_0x24e28c(0x2ec)];_0x43529c++){_0x5acf52=_0x5acf52<<0x8|_0x5cfea1[_0x43529c],_0x551ac8+=0x8;while(_0x551ac8>=0x5){_0x551ac8-=0x5,_0x46ab23+=_0x508625[_0x5acf52>>>_0x551ac8&0x1f];}}return _0x551ac8>0x0&&(_0x46ab23+=_0x508625[_0x5acf52<<0x5-_0x551ac8&0x1f]),_0x46ab23;}function _0x4c9fc0(_0xc356a9){const _0x3717d0=_0x114cf;_0xc356a9=_0xc356a9['replace'](/-/g,'')[_0x3717d0(0x16f)]();let _0x5abbbb=0x0,_0x43d104=0x0;const _0x3048a9=[];for(let _0x41be5e=0x0;_0x41be5e<_0xc356a9['length'];_0x41be5e++){const _0x4da226=_0x36a6d1[_0xc356a9[_0x3717d0(0x251)](_0x41be5e)];if(_0x4da226===0xff)continue;_0x43d104=_0x43d104<<0x5|_0x4da226,_0x5abbbb+=0x5,_0x5abbbb>=0x8&&(_0x5abbbb-=0x8,_0x3048a9['push'](_0x43d104>>>_0x5abbbb&0xff));}return Buffer[_0x3717d0(0x2a8)](_0x3048a9);}const _0x3daa84=[_0x114cf(0x202),_0x114cf(0x450),_0x114cf(0x234),_0x114cf(0x348),_0x114cf(0x47a),'views','mcp','files'],_0x3b75b2=0x0,_0xc40c86=0x1,_0x9cdead=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x56890d({issuedAt:_0x18eef6,expiresAt:_0x33bd8b,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x3b75b2}){const _0x24a4b6=_0x114cf,_0x2af069=Buffer[_0x24a4b6(0x2a8)](licensee,_0x24a4b6(0x2a4))[_0x24a4b6(0x3db)](0x0,0x40),_0x3cbaf7=0x1+0x1+0x4+0x4+0x1+_0x2af069[_0x24a4b6(0x2ec)]+0x2+0x10,_0x51348a=Buffer[_0x24a4b6(0x285)](_0x3cbaf7);let _0x511857=0x0;_0x51348a[_0x24a4b6(0x220)](0x1,_0x511857++),_0x51348a['writeUInt8'](licenseType,_0x511857++),_0x51348a[_0x24a4b6(0x1c0)](Math['floor'](_0x18eef6/0x3e8),_0x511857),_0x511857+=0x4,_0x51348a[_0x24a4b6(0x1c0)](Math['floor'](_0x33bd8b/0x3e8),_0x511857),_0x511857+=0x4,_0x51348a[_0x24a4b6(0x220)](_0x2af069[_0x24a4b6(0x2ec)],_0x511857++),_0x2af069[_0x24a4b6(0x39a)](_0x51348a,_0x511857),_0x511857+=_0x2af069[_0x24a4b6(0x2ec)];let _0x1cbbbc=0x0;for(let _0x2f0cff=0x0;_0x2f0cff<_0x3daa84['length'];_0x2f0cff++){if(features[_0x3daa84[_0x2f0cff]])_0x1cbbbc|=0x1<<_0x2f0cff;}_0x51348a[_0x24a4b6(0x39d)](_0x1cbbbc,_0x511857),_0x511857+=0x2;const _0x31933b=[_0x24a4b6(0x261),_0x24a4b6(0x228),_0x24a4b6(0x301),_0x24a4b6(0x472)];for(const _0x34b48e of _0x31933b){_0x51348a[_0x24a4b6(0x1c0)](limits[_0x34b48e]||0x0,_0x511857),_0x511857+=0x4;}return _0x51348a;}function _0x1dd611(_0x49a448){const _0x8c58f7=_0x114cf;let _0x40ff8d=0x0;const _0x5421d5=_0x49a448[_0x8c58f7(0x208)](_0x40ff8d++),_0x2d5f70=_0x49a448[_0x8c58f7(0x208)](_0x40ff8d++),_0x4545f6=_0x49a448[_0x8c58f7(0x19e)](_0x40ff8d);_0x40ff8d+=0x4;const _0xb767aa=_0x49a448['readUInt32BE'](_0x40ff8d);_0x40ff8d+=0x4;const _0x4f5fcd=_0x49a448[_0x8c58f7(0x208)](_0x40ff8d++),_0xfe8595=_0x49a448[_0x8c58f7(0x3db)](_0x40ff8d,_0x40ff8d+_0x4f5fcd)[_0x8c58f7(0x2b5)]('utf8');_0x40ff8d+=_0x4f5fcd;const _0x2356dd=_0x49a448[_0x8c58f7(0x3c1)](_0x40ff8d);_0x40ff8d+=0x2;const _0x10598e={};for(let _0x4f0e31=0x0;_0x4f0e31<_0x3daa84[_0x8c58f7(0x2ec)];_0x4f0e31++){_0x10598e[_0x3daa84[_0x4f0e31]]=Boolean(_0x2356dd&0x1<<_0x4f0e31);}const _0x1deafe=[_0x8c58f7(0x261),_0x8c58f7(0x228),_0x8c58f7(0x301),_0x8c58f7(0x472)],_0x341ba0={};for(const _0x2f5ffb of _0x1deafe){const _0x4c205c=_0x49a448[_0x8c58f7(0x19e)](_0x40ff8d);_0x40ff8d+=0x4,_0x341ba0[_0x2f5ffb]=_0x4c205c===0x0?null:_0x4c205c;}return{'v':_0x5421d5,'licenseType':_0x2d5f70,'issuedAt':_0x4545f6*0x3e8,'expiresAt':_0xb767aa*0x3e8,'licensee':_0xfe8595,'features':_0x10598e,'limits':_0x341ba0};}function _0x1b2ffe(_0x42a770,_0x260c2a){const _0x1273b7=_0x114cf,_0x5c454b=Buffer[_0x1273b7(0x332)]([_0x42a770,_0x260c2a]),_0x433225=_0x53c8f8(_0x5c454b),_0x12b410=[];for(let _0x24ffca=0x0;_0x24ffca<_0x433225[_0x1273b7(0x2ec)];_0x24ffca+=0x8){_0x12b410['push'](_0x433225[_0x1273b7(0x3db)](_0x24ffca,_0x24ffca+0x8));}return _0x12b410[_0x1273b7(0x1bd)]('-');}function _0x19b8f5(_0x295b84){const _0x2c6ed3=_0x114cf;if(typeof _0x295b84!==_0x2c6ed3(0x3e2))throw new Error(_0x2c6ed3(0x262));const _0x5ce42e=_0x4c9fc0(_0x295b84[_0x2c6ed3(0x1ab)](/-/g,''));if(_0x5ce42e[_0x2c6ed3(0x2ec)]<0x41)throw new Error(_0x2c6ed3(0x275)+_0x5ce42e['length']+_0x2c6ed3(0x443));const _0x1de7ed=_0x5ce42e[_0x2c6ed3(0x3db)](0x0,_0x5ce42e['length']-0x40),_0x4091f1=_0x5ce42e['slice'](_0x5ce42e['length']-0x40);let _0x1d1ca7;try{_0x1d1ca7=_0x1dd611(_0x1de7ed);}catch(_0x594fa6){throw new Error(_0x2c6ed3(0x41b)+_0x594fa6[_0x2c6ed3(0x403)]);}return{'rawBuf':_0x5ce42e,'payload':_0x1de7ed,'sig':_0x4091f1,'decoded':_0x1d1ca7};}function _0x20e8aa(_0x4664e4){const _0x5b42e2=_0x114cf;return _0x330b2a[_0x5b42e2(0x3b4)](_0x5b42e2(0x1a7))['update'](_0x4664e4)['digest']()['slice'](0x0,0x8);}function _0x3c4423(_0x1ad4ad,_0xee75b7,_0x2b50d7){const _0x43f317=_0x114cf,_0xcea468=_0x43f317(0x179)+_0x2b50d7,_0x1f9c29=Buffer[_0x43f317(0x332)]([Buffer[_0x43f317(0x2a8)](_0x1ad4ad,_0x43f317(0x2a4)),_0xee75b7]),_0x348801=_0x330b2a[_0x43f317(0x232)](_0x43f317(0x1a7),_0xcea468)['update'](_0x1f9c29)['digest'](),_0x46e288=_0x53c8f8(_0x348801[_0x43f317(0x3db)](0x0,0x5));return{'pin':_0x46e288,'pinHmac':_0x348801};}function _0x3ea862(_0x56ca47,_0x2679a2,_0x1fe001){const _0x4b4d34=_0x114cf,_0x292334=Buffer[_0x4b4d34(0x285)](0x4d);let _0x1171e6=0x0;_0x292334['writeUInt8'](0x1,_0x1171e6++),_0x56ca47[_0x4b4d34(0x39a)](_0x292334,_0x1171e6),_0x1171e6+=0x8,_0x292334['writeUInt32BE'](_0x2679a2,_0x1171e6),_0x1171e6+=0x4,_0x1fe001[_0x4b4d34(0x39a)](_0x292334,_0x1171e6);const _0x599c35=_0x53c8f8(_0x292334),_0x2840da=[];for(let _0x25a8da=0x0;_0x25a8da<_0x599c35[_0x4b4d34(0x2ec)];_0x25a8da+=0x6){_0x2840da[_0x4b4d34(0x397)](_0x599c35[_0x4b4d34(0x3db)](_0x25a8da,_0x25a8da+0x6));}return _0x2840da[_0x4b4d34(0x1bd)]('-');}function _0x160e63(_0x29b9f7){const _0x23e623=_0x114cf;if(typeof _0x29b9f7!==_0x23e623(0x3e2))throw new Error(_0x23e623(0x253));const _0xefd558=_0x4c9fc0(_0x29b9f7[_0x23e623(0x1ab)](/-/g,''));if(_0xefd558[_0x23e623(0x2ec)]!==0x4d)throw new Error(_0x23e623(0x1ef)+_0xefd558[_0x23e623(0x2ec)]);let _0x28458d=0x0;const _0x4ea23c=_0xefd558[_0x23e623(0x208)](_0x28458d++),_0x17e90a=_0xefd558[_0x23e623(0x3db)](_0x28458d,_0x28458d+0x8);_0x28458d+=0x8;const _0x45ea73=_0xefd558[_0x23e623(0x19e)](_0x28458d);_0x28458d+=0x4;const _0x20c16e=_0xefd558[_0x23e623(0x3db)](_0x28458d);return{'v':_0x4ea23c,'licenseHash':_0x17e90a,'expiry':_0x45ea73,'sig':_0x20c16e};}function _0x17bd92({tokenString:_0x1d8159,nodeId:_0x3c2376,rawBlobBuf:_0xf11bd,pubKeyPem:_0x3bf259,pubFingerprint:_0x56dfb9}){const _0x4b4874=_0x114cf;let _0x3d1731;try{_0x3d1731=_0x160e63(_0x1d8159);}catch(_0x59f9e6){return{'valid':![],'reason':_0x4b4874(0x1fd)};}const _0x11f512=_0x20e8aa(_0xf11bd);if(!_0x11f512[_0x4b4874(0x3e9)](_0x3d1731[_0x4b4874(0x3b2)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x2b4e2f}=_0x3c4423(_0x3c2376,_0x11f512,_0x56dfb9),_0x4e421d=Buffer[_0x4b4874(0x285)](0x4);_0x4e421d[_0x4b4874(0x1c0)](_0x3d1731[_0x4b4874(0x3d4)],0x0);const _0x59074e=Buffer[_0x4b4874(0x332)]([Buffer['from']([_0x3d1731['v']]),_0x2b4e2f['slice'](0x0,0x5),_0x3d1731['licenseHash'],_0x4e421d]);try{const _0x286b57=_0x330b2a[_0x4b4874(0x32c)](null,_0x59074e,_0x3bf259,_0x3d1731['sig']);if(!_0x286b57)return{'valid':![],'reason':_0x4b4874(0x2b7)};}catch(_0x15afb8){return{'valid':![],'reason':_0x4b4874(0x2b7)};}if(_0x3d1731[_0x4b4874(0x3d4)]<Date[_0x4b4874(0x29e)]()/0x3e8)return{'valid':![],'reason':_0x4b4874(0x252)};return{'valid':!![],'reason':'ok'};}function _0x338fc6(_0x163b78){const _0x161538=_0x114cf;if(typeof _0x163b78!==_0x161538(0x3e2))return _0x161538(0x1bb);const _0x1fd82b=_0x163b78[_0x161538(0x47b)]();if(_0x1fd82b[_0x161538(0x392)]('/')||_0x1fd82b['startsWith']('./')||_0x1fd82b['startsWith']('../')||/^[A-Za-z]:[\\/]/[_0x161538(0x35c)](_0x1fd82b))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x161538(0x35c)](_0x1fd82b))return _0x161538(0x20d);const _0x4ec7f9=_0x1fd82b[_0x161538(0x1ab)](/[\s-]+/g,'')[_0x161538(0x2ec)];if(_0x4ec7f9===0x7c)return'activation';if(_0x4ec7f9>=0x95&&_0x4ec7f9<=0xfc)return'blob';return _0x161538(0x1bb);}return okdbLicenseCodec={'toBase32':_0x53c8f8,'fromBase32':_0x4c9fc0,'encodeLicensePayload':_0x56890d,'decodeLicensePayload':_0x1dd611,'encodeLicenseBlob':_0x1b2ffe,'decodeLicenseBlob':_0x19b8f5,'licenseHash':_0x20e8aa,'derivePin':_0x3c4423,'encodeActivationToken':_0x3ea862,'decodeActivationToken':_0x160e63,'verifyActivation':_0x17bd92,'detectInputType':_0x338fc6,'FEATURE_NAMES':_0x3daa84,'LICENSE_TYPE_STANDARD':_0x3b75b2,'LICENSE_TYPE_OPEN':_0xc40c86,'OPEN_LICENSE_MAX_DURATION_MS':_0x9cdead},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x55385d extends Error{constructor(_0x8cdab6,_0x104ab7,_0x128bb0={}){const _0x4a2128=_0x4358;super(_0x8cdab6),this[_0x4a2128(0x282)]=_0x4a2128(0x31c),this['code']=_0x104ab7,this[_0x4a2128(0x3da)]=_0x128bb0,_0x128bb0[_0x4a2128(0x257)]&&(this[_0x4a2128(0x257)]=_0x128bb0[_0x4a2128(0x257)]),Error[_0x4a2128(0x26c)](this,this['constructor']);}}class _0x4d9167 extends _0x55385d{constructor(_0x1dbbf8,_0x48cbf3,_0x5b3d91,_0x40eac0){const _0x18e370=_0x4358;super('Version\x20mismatch\x20for\x20'+_0x1dbbf8+'@'+_0x48cbf3+_0x18e370(0x1f7)+_0x5b3d91+_0x18e370(0x287)+_0x40eac0,_0x18e370(0x408),{'type':_0x1dbbf8,'key':_0x48cbf3,'expectedVersion':_0x5b3d91,'actualVersion':_0x40eac0}),this[_0x18e370(0x282)]='OKDBVersionMismatchError';}}class _0x1c6424 extends _0x55385d{constructor(_0x3d0df,_0x2db749){const _0x39ac8c=_0x4358;super(_0x3d0df+'@'+_0x2db749+_0x39ac8c(0x35e),_0x39ac8c(0x255),{'type':_0x3d0df,'key':_0x2db749}),this['name']=_0x39ac8c(0x1eb);}}class _0x188ad9 extends _0x55385d{constructor(_0x28c0e2,_0x12284c){const _0x3f16db=_0x4358;super(_0x28c0e2+'@'+_0x12284c+_0x3f16db(0x248),_0x3f16db(0x2df),{'type':_0x28c0e2,'key':_0x12284c}),this[_0x3f16db(0x282)]=_0x3f16db(0x1e9);}}class _0x245c44 extends _0x55385d{constructor(_0x45d59f,_0x1dfe7f){const _0x33401c=_0x4358,_0x2506d7=typeof _0x1dfe7f;super(_0x33401c(0x46a)+_0x45d59f+_0x33401c(0x3d3)+_0x2506d7+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x1dfe7f,_0x33401c(0x233),{'index':_0x45d59f,'key':_0x1dfe7f,'keyType':_0x2506d7}),this[_0x33401c(0x282)]=_0x33401c(0x461);}}class _0x51baf7 extends _0x55385d{constructor(_0x3ab7f4){const _0x120f55=_0x4358,_0x23fe26=typeof _0x3ab7f4;super(_0x120f55(0x38a)+_0x23fe26+_0x120f55(0x28e)+_0x3ab7f4,_0x120f55(0x2aa),{'key':_0x3ab7f4,'keyType':_0x23fe26}),this[_0x120f55(0x282)]=_0x120f55(0x349);}}class _0x26ce2a extends _0x55385d{constructor(_0x18c781){const _0x293a4b=_0x4358;super(_0x293a4b(0x1ec)+_0x18c781+'\x27\x20doesn\x27t\x20exist',_0x293a4b(0x40f),{'type':_0x18c781}),this[_0x293a4b(0x282)]=_0x293a4b(0x3aa);}}class _0x2e8374 extends _0x55385d{constructor(_0x397198){const _0x50e521=_0x4358;super('Type\x20\x27'+_0x397198+_0x50e521(0x415),_0x50e521(0x439),{'type':_0x397198}),this[_0x50e521(0x282)]='OKDBTypeAlreadyRegisteredError';}}class _0x59b4c3 extends _0x55385d{constructor(_0x585fbd,_0x2b9ba3){const _0x560a0f=_0x4358;super('Index\x20\x27'+_0x2b9ba3+_0x560a0f(0x177)+_0x585fbd+_0x560a0f(0x33f),_0x560a0f(0x421),{'type':_0x585fbd,'index':_0x2b9ba3}),this[_0x560a0f(0x282)]=_0x560a0f(0x335);}}class _0x1454dd extends _0x55385d{constructor(_0x5c82fd,_0x406159){const _0x5acf6b=_0x4358;super('Index\x20\x27'+_0x406159+'\x27\x20on\x20type\x20\x27'+_0x5c82fd+_0x5acf6b(0x309),_0x5acf6b(0x3ad),{'type':_0x5c82fd,'index':_0x406159}),this[_0x5acf6b(0x282)]='OKDBIndexAlreadyRegisteredError';}}class _0x512cc1 extends _0x55385d{constructor(_0x291aeb,_0x1380c1={}){const _0x515d42=_0x4358;super(_0x291aeb,_0x515d42(0x3af),_0x1380c1),this[_0x515d42(0x282)]='OKDBInvalidValueError';}}class _0x2c6484 extends _0x55385d{constructor(_0x55da0a,_0x4e03dd,_0xb9a84a,_0x6bfcdb,_0x598ea4){const _0x579c1e=_0x4358;super(_0x579c1e(0x25c)+_0x55da0a+'@'+_0x4e03dd+':\x20key\x20['+_0xb9a84a+_0x579c1e(0x372)+_0x6bfcdb+_0x579c1e(0x3c3)+_0x598ea4+'\x27',_0x579c1e(0x28b),{'type':_0x55da0a,'index':_0x4e03dd,'indexKey':_0xb9a84a,'existingKey':_0x6bfcdb,'conflictingKey':_0x598ea4}),this[_0x579c1e(0x282)]=_0x579c1e(0x22b);}}class _0x4076b0 extends _0x55385d{constructor(_0xb56bd2,_0x31234f,_0x408512){const _0x398817=_0x4358;super('Schema\x20validation\x20failed\x20for\x20'+_0xb56bd2+'@'+_0x31234f,_0x398817(0x284),{'type':_0xb56bd2,'key':_0x31234f,'errors':_0x408512}),this[_0x398817(0x282)]=_0x398817(0x2e5),this['type']=_0xb56bd2,this[_0x398817(0x431)]=_0x31234f,this[_0x398817(0x37d)]=_0x408512;}}class _0x2d11b9 extends _0x55385d{constructor(_0x2525e6,_0x1eb874){const _0x2da223=_0x4358;super(_0x2da223(0x35a)+_0x2525e6+':\x20'+_0x1eb874[_0x2da223(0x2ec)]+_0x2da223(0x1e1),'SCHEMA_COLLECTION_INVALID',{'type':_0x2525e6,'failures':_0x1eb874}),this['name']=_0x2da223(0x34f),this['type']=_0x2525e6,this[_0x2da223(0x174)]=_0x1eb874;}}class _0x4c61c4 extends _0x55385d{constructor(_0x48e48f,_0x247cec,_0x6add13,_0x1f00ba,_0x1822ea){const _0x3a4fb3=_0x4358;super(_0x3a4fb3(0x1dc)+_0x48e48f+'@'+_0x247cec+'.'+_0x6add13+_0x3a4fb3(0x22a)+_0x1f00ba+'@'+_0x1822ea+'\x20which\x20does\x20not\x20exist',_0x3a4fb3(0x189),{'sourceType':_0x48e48f,'sourceKey':_0x247cec,'fieldPath':_0x6add13,'targetType':_0x1f00ba,'targetKey':_0x1822ea}),this[_0x3a4fb3(0x282)]=_0x3a4fb3(0x341),this[_0x3a4fb3(0x2d2)]=_0x48e48f,this[_0x3a4fb3(0x3bd)]=_0x247cec,this[_0x3a4fb3(0x1a2)]=_0x6add13,this[_0x3a4fb3(0x199)]=_0x1f00ba,this[_0x3a4fb3(0x331)]=_0x1822ea;}}class _0x4225ee extends _0x55385d{constructor(_0xb8346e,_0x11ca72,_0xa05022){const _0x409476=_0x4358;super(_0x409476(0x425)+_0xb8346e+'@'+_0x11ca72+':\x20'+_0xa05022['length']+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0xb8346e,'targetKey':_0x11ca72,'references':_0xa05022}),this[_0x409476(0x282)]='OKDBForeignKeyDeleteError',this[_0x409476(0x199)]=_0xb8346e,this[_0x409476(0x331)]=_0x11ca72,this[_0x409476(0x1d4)]=_0xa05022;}}class _0x5617e2 extends _0x55385d{constructor(_0x21cc22,_0x5b0288,_0x3c8723){const _0x3376c5=_0x4358;super('Index\x20\x22'+_0x5b0288+_0x3376c5(0x38e)+_0x21cc22+_0x3376c5(0x41a)+_0x3c8723[_0x3376c5(0x318)](_0x429a7f=>_0x429a7f[_0x3376c5(0x304)]+':'+_0x429a7f['name'])[_0x3376c5(0x1bd)](',\x20'),_0x3376c5(0x40b),{'type':_0x21cc22,'index':_0x5b0288,'usedBy':_0x3c8723}),this[_0x3376c5(0x282)]=_0x3376c5(0x19a);}}return okdbError={'OKDBError':_0x55385d,'OKDBVersionMismatchError':_0x4d9167,'OKDBNotFoundError':_0x1c6424,'OKDBAlreadyExistsError':_0x188ad9,'OKDBInvalidIndexKeyError':_0x245c44,'OKDBInvalidPrimaryKeyError':_0x51baf7,'OKDBTypeNotRegisteredError':_0x26ce2a,'OKDBTypeAlreadyRegisteredError':_0x2e8374,'OKDBIndexNotRegisteredError':_0x59b4c3,'OKDBIndexAlreadyRegisteredError':_0x1454dd,'OKDBInvalidValueError':_0x512cc1,'OKDBUniqueConstraintError':_0x2c6484,'OKDBSchemaValidationError':_0x4076b0,'OKDBSchemaCollectionError':_0x2d11b9,'OKDBForeignKeyError':_0x4c61c4,'OKDBForeignKeyDeleteError':_0x4225ee,'OKDBIndexHasConsumersError':_0x5617e2},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x56bf68=_0x4778da;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x397931={'PUT':'put','REMOVE':'remove','INDEX_DROP':_0x56bf68(0x404),'INDEX_REGISTER':_0x56bf68(0x288),'INDEX_RESET':_0x56bf68(0x2ab),'TYPE_REGISTER':_0x56bf68(0x2a3),'TYPE_DROP':_0x56bf68(0x3cd),'FTS_REGISTER':_0x56bf68(0x207),'FTS_DROP':_0x56bf68(0x3b5),'FTS_RESET':_0x56bf68(0x196),'SCHEMA_SET':_0x56bf68(0x45e),'SCHEMA_DROP':_0x56bf68(0x2ed),'TTL_SET':_0x56bf68(0x212),'TTL_CLEAR':_0x56bf68(0x214)},_0xeb1c02={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x56bf68(0x28d),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x56bf68(0x172),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x56bf68(0x353),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x56bf68(0x19c),'INDEX_READY':_0x56bf68(0x390),'INDEX_PROGRESS':_0x56bf68(0x373),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x56bf68(0x254),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x56bf68(0x194),'FTS_RESET':_0x56bf68(0x2e9),'SCHEMA_SET':_0x56bf68(0x427),'SCHEMA_DROP':_0x56bf68(0x416),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x56bf68(0x24f),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x56bf68(0x3cf),'SYNC_APPLY':_0x56bf68(0x395),'TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x56bf68(0x236),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x56bf68(0x1ad),'ENV_OPENED':_0x56bf68(0x1c1),'ENV_REMOVED':_0x56bf68(0x466),'TTL_EXPIRED':_0x56bf68(0x28f),'TTL_SET':_0x56bf68(0x3d2),'TTL_CLEAR':_0x56bf68(0x17b),'LICENSE_INVALID':_0x56bf68(0x46d),'LICENSE_ADDED':_0x56bf68(0x240),'LICENSE_ACTIVATED':_0x56bf68(0x21b),'LICENSE_REMOVED':'license:removed'},_0x4a9544={'CREATING':_0x56bf68(0x1e5),'RESETTING':_0x56bf68(0x375),'READY':'ready','DROPPING':'dropping','WAITING':_0x56bf68(0x18c)},_0xb2fa9={'CREATED':_0x56bf68(0x41d),'STARTING':_0x56bf68(0x23a),'STARTED':_0x56bf68(0x1b1),'STOPPING':_0x56bf68(0x2b0),'STOPPED':_0x56bf68(0x43a)},_0x1f4447={'CREATING':_0x56bf68(0x1e5),'READY':_0x56bf68(0x38d),'HALTED':_0x56bf68(0x3f9),'STOPPED':_0x56bf68(0x43a),'RESETTING':'resetting'},_0x79a290=Object[_0x56bf68(0x34d)]({'POKE':_0x56bf68(0x2da),'DRAIN':_0x56bf68(0x43b)});return okdbEnums={'BUS_EVENTS':_0x79a290,'CHANGE_ACTIONS':_0x397931,'EVENTS':_0xeb1c02,'INDEX_STATE':_0x4a9544,'OKDB_STATE':_0xb2fa9,'VIEW_STATE':_0x1f4447},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x1b856c=_0x4778da;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x5153d1=require$$1,_0x59a4d1=require$$1$1,_0x5652ff=require$$0,_0x3394d7=_0x5153d1[_0x1b856c(0x369)](_0x59a4d1['join'](__dirname,'keys/public.pem'),_0x1b856c(0x2a4))[_0x1b856c(0x47b)](),_0x5db4a6=_0x5652ff[_0x1b856c(0x377)](_0x3394d7)[_0x1b856c(0x2fd)]({'type':_0x1b856c(0x32e),'format':_0x1b856c(0x43d)}),_0x5a5ea5=_0x5652ff[_0x1b856c(0x3b4)]('sha256')['update'](_0x5db4a6)[_0x1b856c(0x2f8)](_0x1b856c(0x29d))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x3394d7,'PUB_FINGERPRINT':_0x5a5ea5},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x14565e=_0x4778da;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x5e03bd=require$$0,{OKDBError:_0x820612}=requireOkdbError(),{EVENTS:_0xef21cf}=requireOkdbEnums(),_0x1875f0=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x3de599,OPEN_LICENSE_MAX_DURATION_MS:_0x4ec099}=_0x1875f0,_0x32592a=requireOkdbPubkey(),_0x4358cf={'LICENSED_BUILD':_0x14565e(0x267),'PUBLIC_KEY_PEM':_0x32592a['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x32592a['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':'log'},_0x459f39=_0x14565e(0x3c9),_0x396a07={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x5b0561(_0x113411){const _0x5a5c5c=_0x14565e;!_0x113411[_0x5a5c5c(0x3c5)](_0x459f39)&&await _0x113411[_0x5a5c5c(0x2a3)](_0x459f39);}class _0x460f64{constructor(_0x43e6ae){const _0x593260=_0x14565e;this[_0x593260(0x2f6)]=_0x43e6ae,this['_active']=null;}async[_0x14565e(0x44a)](){const _0x37bb67=_0x14565e,_0x5f46ed=this['okdb']['_systemEnv'];if(!_0x5f46ed||!_0x5f46ed[_0x37bb67(0x3c5)](_0x459f39)){this[_0x37bb67(0x438)]=null;return;}const _0xf5876d=this[_0x37bb67(0x2f6)]['id'];let _0xb1e6c4=null;for(const {key:_0xf4c47d,value:_0x3d0adf}of _0x5f46ed['getRange'](_0x459f39)){const _0x534e10=this[_0x37bb67(0x1c9)](_0x3d0adf,_0xf5876d);_0x534e10===_0x37bb67(0x276)&&!_0xb1e6c4&&(_0xb1e6c4={..._0x3d0adf,'id':_0xf4c47d,'status':_0x534e10});}this[_0x37bb67(0x438)]=_0xb1e6c4;if(this[_0x37bb67(0x438)]&&this[_0x37bb67(0x438)][_0x37bb67(0x42e)]===_0x3de599){const _0x5b8808=Math['ceil']((this[_0x37bb67(0x438)]['expiresAt']-Date['now']())/0x5265c00);this[_0x37bb67(0x2f6)][_0x37bb67(0x22d)]?.[_0x37bb67(0x1cf)](_0x37bb67(0x281)+_0x5b8808+_0x37bb67(0x2a7),{'feature':_0x37bb67(0x354),'licensee':this[_0x37bb67(0x438)][_0x37bb67(0x1e4)],'expiresAt':new Date(this[_0x37bb67(0x438)]['expiresAt'])['toISOString']()});}}[_0x14565e(0x1c9)](_0x571250,_0x2cf594){const _0x2e6e36=_0x14565e;if(!_0x571250[_0x2e6e36(0x474)])return _0x2e6e36(0x28c);let _0x21625f;try{_0x21625f=_0x1875f0[_0x2e6e36(0x24b)](_0x571250[_0x2e6e36(0x474)]);}catch(_0x2583dd){return _0x2e6e36(0x28c);}try{const _0x2d7812=_0x5e03bd[_0x2e6e36(0x32c)](null,_0x21625f[_0x2e6e36(0x2db)],_0x4358cf[_0x2e6e36(0x1fc)],_0x21625f[_0x2e6e36(0x42b)]);if(!_0x2d7812)return _0x2e6e36(0x28c);}catch(_0xd42e8){return _0x2e6e36(0x28c);}if(_0x21625f['decoded']['expiresAt']<=Date['now']())return _0x2e6e36(0x1d6);if(_0x21625f[_0x2e6e36(0x3b3)][_0x2e6e36(0x42e)]===_0x3de599)return'active';if(!_0x571250['activation'])return _0x2e6e36(0x358);const _0x312c7c=_0x1875f0[_0x2e6e36(0x1f2)]({'tokenString':_0x571250[_0x2e6e36(0x3a1)],'nodeId':_0x2cf594,'rawBlobBuf':_0x21625f[_0x2e6e36(0x3c4)],'pubKeyPem':_0x4358cf[_0x2e6e36(0x1fc)],'pubFingerprint':_0x4358cf['PUB_FINGERPRINT']});if(_0x312c7c[_0x2e6e36(0x238)]===_0x2e6e36(0x219)||_0x312c7c[_0x2e6e36(0x238)]===_0x2e6e36(0x2b7))return'wrong_node';if(_0x312c7c[_0x2e6e36(0x238)]===_0x2e6e36(0x252))return _0x2e6e36(0x1d6);if(!_0x312c7c[_0x2e6e36(0x424)])return _0x2e6e36(0x3bc);return'active';}get[_0x14565e(0x276)](){const _0x6f56f3=_0x14565e;return this[_0x6f56f3(0x438)];}get[_0x14565e(0x3e8)](){const _0x46239d=_0x14565e;return this[_0x46239d(0x438)]??_0x396a07;}[_0x14565e(0x2c2)](_0xecb396){const _0x2874e1=_0x14565e;if(_0x4358cf['LICENSED_BUILD']!=='true')return;const _0x6cc28b=this[_0x2874e1(0x3e8)];if(!_0x6cc28b['features']?.[_0xecb396]){const _0x56c1a0=_0x6cc28b['_isFree']?_0x2874e1(0x24a)+_0xecb396+_0x2874e1(0x325)+_0xecb396+_0x2874e1(0x319):_0x2874e1(0x434)+_0xecb396+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0xecb396+'\x22.';throw new _0x820612(_0x56c1a0,_0x2874e1(0x2e1),{'feature':_0xecb396});}}['isFeatureEnabled'](_0x2fdc5c){const _0x5134ff=_0x14565e;if(_0x4358cf[_0x5134ff(0x417)]!==_0x5134ff(0x267))return!![];return!!this[_0x5134ff(0x3e8)][_0x5134ff(0x1f3)]?.[_0x2fdc5c];}['assertLimit'](_0x1dce7c,_0x3a05b0){const _0x2f6653=_0x14565e;if(_0x4358cf[_0x2f6653(0x417)]!==_0x2f6653(0x267))return;const _0x4cd912=this[_0x2f6653(0x3e8)],_0x5d4d6c=_0x4cd912[_0x2f6653(0x1d3)]?.[_0x1dce7c];if(_0x5d4d6c===null||_0x5d4d6c===undefined||_0x5d4d6c===0x0)return;if(_0x3a05b0>=_0x5d4d6c)throw new _0x820612(_0x2f6653(0x381)+_0x1dce7c+'\x20('+_0x3a05b0+'/'+_0x5d4d6c+')',_0x2f6653(0x42d),{'limit':_0x1dce7c,'current':_0x3a05b0,'max':_0x5d4d6c});}async[_0x14565e(0x293)](_0x4b465e){const _0x174601=_0x14565e;let _0x1a7ac7;try{_0x1a7ac7=_0x1875f0[_0x174601(0x24b)](_0x4b465e);}catch(_0x5af5c7){throw new _0x820612(_0x174601(0x379)+_0x5af5c7[_0x174601(0x403)],'LICENSE_INVALID');}let _0x3cdccf;try{_0x3cdccf=_0x5e03bd[_0x174601(0x32c)](null,_0x1a7ac7[_0x174601(0x2db)],_0x4358cf[_0x174601(0x1fc)],_0x1a7ac7[_0x174601(0x42b)]);}catch(_0x13db2a){throw new _0x820612(_0x174601(0x47d)+_0x13db2a[_0x174601(0x403)],_0x174601(0x1de));}if(!_0x3cdccf)throw new _0x820612(_0x174601(0x31d)+(_0x174601(0x457)+_0x4358cf[_0x174601(0x442)]+'.\x20')+_0x174601(0x29f),_0x174601(0x1de),{'expectedFingerprint':_0x4358cf[_0x174601(0x442)]});if(_0x1a7ac7['decoded']['licenseType']===_0x3de599){const _0xd98a5f=_0x1a7ac7[_0x174601(0x3b3)]['expiresAt']-_0x1a7ac7['decoded'][_0x174601(0x29a)];if(_0xd98a5f>_0x4ec099)throw new _0x820612(_0x174601(0x2d4)+Math[_0x174601(0x436)](_0xd98a5f/(0x1e*0x5265c00))+_0x174601(0x27a),'LICENSE_INVALID');}const _0x1ca71a=this['okdb'][_0x174601(0x40e)];await _0x5b0561(_0x1ca71a);const _0x54b34b=_0x1875f0[_0x174601(0x3b2)](_0x1a7ac7[_0x174601(0x3c4)])['toString'](_0x174601(0x29d));for(const {value:_0x414d88}of _0x1ca71a[_0x174601(0x263)](_0x459f39)){if(_0x414d88[_0x174601(0x410)]===_0x54b34b)throw new _0x820612(_0x174601(0x2ea),'LICENSE_INVALID');}const _0x3ac040=_0x5e03bd['randomUUID'](),_0xf24e12={'blob':_0x4b465e,'activation':null,'addedAt':Date[_0x174601(0x29e)](),'_licenseHash':_0x54b34b,'licensee':_0x1a7ac7[_0x174601(0x3b3)]['licensee'],'expiresAt':_0x1a7ac7[_0x174601(0x3b3)]['expiresAt'],'features':_0x1a7ac7[_0x174601(0x3b3)][_0x174601(0x1f3)],'limits':_0x1a7ac7['decoded'][_0x174601(0x1d3)],'licenseType':_0x1a7ac7[_0x174601(0x3b3)]['licenseType']};return await _0x1ca71a['put'](_0x459f39,_0x3ac040,_0xf24e12),{'id':_0x3ac040,..._0xf24e12};}async['activateLicense'](_0x894978){const _0x50f1e6=_0x14565e;let _0x5c70b1;try{_0x5c70b1=_0x1875f0['decodeActivationToken'](_0x894978);}catch(_0x16e791){throw new _0x820612(_0x50f1e6(0x2ee)+_0x16e791[_0x50f1e6(0x403)],'LICENSE_ACTIVATION_INVALID');}const _0x45a1a3=_0x5c70b1[_0x50f1e6(0x3b2)][_0x50f1e6(0x2b5)]('hex'),_0x16be50=this[_0x50f1e6(0x2f6)][_0x50f1e6(0x40e)];if(!_0x16be50||!_0x16be50['hasType'](_0x459f39))throw new _0x820612(_0x50f1e6(0x430),_0x50f1e6(0x2dc));let _0x2f2230=null,_0x1ad852=null;for(const {key:_0x415bfa,value:_0x5ab74f}of _0x16be50[_0x50f1e6(0x263)](_0x459f39)){if(_0x5ab74f[_0x50f1e6(0x410)]===_0x45a1a3){_0x2f2230=_0x415bfa,_0x1ad852=_0x5ab74f;break;}}if(!_0x2f2230)throw new _0x820612(_0x50f1e6(0x430),_0x50f1e6(0x2dc));const {rawBuf:_0x52f956}=_0x1875f0[_0x50f1e6(0x24b)](_0x1ad852[_0x50f1e6(0x474)]),_0x2db9b6=_0x1875f0[_0x50f1e6(0x1f2)]({'tokenString':_0x894978,'nodeId':this[_0x50f1e6(0x2f6)]['id'],'rawBlobBuf':_0x52f956,'pubKeyPem':_0x4358cf['PUBLIC_KEY_PEM'],'pubFingerprint':_0x4358cf['PUB_FINGERPRINT']});if(!_0x2db9b6[_0x50f1e6(0x424)])throw new _0x820612('Activation\x20invalid:\x20'+_0x2db9b6['reason'],_0x50f1e6(0x2dc),{'reason':_0x2db9b6[_0x50f1e6(0x238)]});const _0x3ac07f={..._0x1ad852,'activation':_0x894978};return await _0x16be50[_0x50f1e6(0x20e)](_0x459f39,_0x2f2230,_0x3ac07f),{'id':_0x2f2230,..._0x3ac07f};}async[_0x14565e(0x30d)](_0x4d467d){const _0x293fe2=_0x14565e,_0x2dac0a=this[_0x293fe2(0x2f6)][_0x293fe2(0x40e)];if(!_0x2dac0a||!_0x2dac0a[_0x293fe2(0x3c5)](_0x459f39))return;await _0x2dac0a[_0x293fe2(0x31b)](_0x459f39,_0x4d467d);}async[_0x14565e(0x273)](){const _0x2e2e48=_0x14565e,_0x167cf9=this[_0x2e2e48(0x2f6)]['_systemEnv'];if(!_0x167cf9||!_0x167cf9['hasType'](_0x459f39))return[];const _0x3a9c56=this[_0x2e2e48(0x2f6)]['id'],_0x5143f9=[];for(const {key:_0x570e7d,value:_0x520c91}of _0x167cf9['getRange'](_0x459f39)){const _0x27ab7c=this[_0x2e2e48(0x1c9)](_0x520c91,_0x3a9c56);_0x5143f9[_0x2e2e48(0x397)]({..._0x520c91,'id':_0x570e7d,'status':_0x27ab7c});}return _0x5143f9;}[_0x14565e(0x247)](){const _0x2975eb=_0x14565e,_0x21c936=this[_0x2975eb(0x2f6)][_0x2975eb(0x40e)];if(!_0x21c936||!_0x21c936[_0x2975eb(0x3c5)](_0x459f39))return[];const _0x2bd437=this[_0x2975eb(0x2f6)]['id'],_0x5e0543=[];for(const {key:_0x47990c,value:_0x361ecd}of _0x21c936['getRange'](_0x459f39)){if(_0x361ecd[_0x2975eb(0x410)]){if(_0x361ecd[_0x2975eb(0x42e)]===_0x3de599)_0x5e0543[_0x2975eb(0x397)]({'licenseId':_0x47990c,'pin':null});else{const _0x544273=Buffer['from'](_0x361ecd[_0x2975eb(0x410)],_0x2975eb(0x29d)),{pin:_0xf87a8e}=_0x1875f0[_0x2975eb(0x3cc)](_0x2bd437,_0x544273,_0x4358cf[_0x2975eb(0x442)]);_0x5e0543[_0x2975eb(0x397)]({'licenseId':_0x47990c,'pin':_0xf87a8e});}}}return _0x5e0543;}async['recheck'](){const _0x3d1d7f=_0x14565e,_0x1d056d=this[_0x3d1d7f(0x438)];await this[_0x3d1d7f(0x44a)]();if(this[_0x3d1d7f(0x438)]&&this[_0x3d1d7f(0x438)]['licenseType']===_0x3de599){const _0x5ac170=Math['ceil']((this['_active'][_0x3d1d7f(0x38b)]-Date[_0x3d1d7f(0x29e)]())/0x5265c00);this[_0x3d1d7f(0x2f6)][_0x3d1d7f(0x22d)]?.[_0x3d1d7f(0x1cf)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x5ac170+'\x20day(s).',{'feature':_0x3d1d7f(0x354),'licensee':this[_0x3d1d7f(0x438)][_0x3d1d7f(0x1e4)],'expiresAt':new Date(this['_active']['expiresAt'])['toISOString']()});}if(_0x1d056d&&!this[_0x3d1d7f(0x438)]){this[_0x3d1d7f(0x2f6)][_0x3d1d7f(0x22d)]?.[_0x3d1d7f(0x1cf)](_0x3d1d7f(0x1c4),{'feature':_0x3d1d7f(0x354)}),this['okdb'][_0x3d1d7f(0x23b)]?.[_0x3d1d7f(0x39f)](_0xef21cf[_0x3d1d7f(0x1de)],{'previous':_0x1d056d});const _0x409a51=this[_0x3d1d7f(0x2f6)][_0x3d1d7f(0x1c7)]?.[_0x3d1d7f(0x27b)]??_0x4358cf[_0x3d1d7f(0x469)];_0x409a51===_0x3d1d7f(0x320)&&(this[_0x3d1d7f(0x2f6)][_0x3d1d7f(0x22d)]?.[_0x3d1d7f(0x447)](_0x3d1d7f(0x38c),{'feature':_0x3d1d7f(0x354)}),this[_0x3d1d7f(0x2f6)][_0x3d1d7f(0x305)]()['catch'](()=>{})['finally'](()=>process[_0x3d1d7f(0x3d6)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x460f64,'_C':_0x4358cf},okdbLicense;}function _0x4358(_0x525f3d,_0x21491c){_0x525f3d=_0x525f3d-0x16e;const _0x3b8691=_0x3b86();let _0x4358e6=_0x3b8691[_0x525f3d];return _0x4358e6;}var okdbShell,hasRequiredOkdbShell;function _0x3b86(){const _0x147dbb=['\x20MB\x20→\x20','password','toString','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','SIG_INVALID','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','\x20\x20[','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','Records','\x20writes\x20(','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','existsSync','toISOString','http://localhost:','.okdb-write-test','assertFeature','createInterface','\x20/\x20','find','logLevel','getSecurityNotices','LOGS','--config','files/','GET','POST','\x20\x20\x20\x20status:\x20\x20\x20\x20active','3586555EwNNqi','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','terminal','EADDRINUSE','sourceType','\x20\x20\x20\x20status:\x20\x20\x20\x20','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','2468LGPlVU','path','catch','\x1b[1m','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','bus:poke','payload','LICENSE_ACTIVATION_INVALID','\x20\x20║','clearLine','ALREADY_EXISTS','port','LICENSE_FEATURE_DISABLED','\x22.\x20Use:\x20create,\x20list,\x20revoke','open','grants','OKDBSchemaValidationError','toLowerCase','[filter]','isArray','fts:reset','License\x20already\x20stored','ENVS','length','dropSchema','Invalid\x20activation\x20token:\x20','type/users/item/alice\x20--env\x20staging','.kdbconfig','pin','val','argv','drop','yes','okdb','30185910sOlLQU','digest','open\x20','\x20licenses','line','\x20\x20changes=','export','homedir','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x20\x20Expected\x20one\x20of:','syncPeers','\x20\x20Error:\x20','reset','kind','close','activateLicense','endsWith','./okdb-export.ndjson','\x27\x20is\x20already\x20registered','No\x20tokens.','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','forEach','removeLicense','--ttl','\x20\x20\x20\x20path:\x20\x20','history','base64url','SIGINT','\x20\x20\x20\x20usage:\x20\x20\x20','\x20opening\x20','exp','id:\x20','/\x20quit\x20/\x20Ctrl+C','map','\x22\x20to\x20enable\x20it.','[okdb]\x20started\x20in\x20','remove','OKDBError','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','http','[okdb]\x20exported\x20\x20types=','shutdown','stringify','_envs','./okdb-backup','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x20\x20\x20\x20\x20\x20\x20','\x20\x20records=','/types\x0a\x20\x20\x20\x20','selfAddress','tags','\x20to\x20browse\x20the\x20API,\x20','verify','inputSchema','spki','\x20\x20Path\x20access','dim','targetKey','concat','./okdb-data','\x20(must\x20be\x201–65535)','OKDBIndexNotRegisteredError','--env\x20<name>','--log-requests','DELETE\x20type/users/item/x','setPrompt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','green','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','transport:\x20','dirname','\x27\x20doesn\x27t\x20exist','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','OKDBForeignKeyError','\x20\x20Envs:\x20\x20\x20\x20','children','start\x20','config','\x20\x20\x20\x20writes:\x20\x20\x20\x20','VERB','fts','OKDBInvalidPrimaryKeyError','revoke','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','darwin','freeze','fts:','OKDBSchemaCollectionError','node','[okdb]\x20unknown\x20token\x20action:\x20\x22','method','item:update','license','sub','USE','crypto','pending','indexOf','Cannot\x20set\x20enforce\x20schema\x20on\x20','backup','test','PUT','\x20does\x20not\x20exist','\x20\x20Type\x20','Environments','byteLength','type/','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20\x20\x20\x20limits:\x20\x20\x20\x20','listening','\x20\x20(','--help','alloc','readFileSync','[okdb]\x20error:\x20--password\x20requires\x20--name','config\x20file\x20valid:\x20','\x20\x20Shell\x20commands','/type/users/item/alice\x0a\x20\x20\x20\x20','randomBytes','set','ftsName','\x20file',']\x20already\x20maps\x20to\x20\x27','index:progress','exportToFile','resetting','\x20for\x20commands,\x20','createPublicKey','\x20\x20⚠\x20\x20','Invalid\x20license\x20blob:\x20','resume','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','errors','code','detectInputType','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','License\x20limit\x20exceeded:\x20','admin','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','noRepl','[okdb]\x20invalid\x20log\x20level:\x20\x22','[okdb]\x20error:\x20','false','\x20\x20Writes:\x20\x20','(null)','Invalid\x20primary\x20key\x20type:\x20','expiresAt','Shutting\x20down\x20due\x20to\x20license\x20expiry','ready','\x22\x20on\x20\x22','--log-level','index:ready','param','startsWith','\x0a\x20\x20\x20\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','sync:apply','\x22\x20→\x20','push','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','exportBlobs','copy','type/users','envs=','writeUInt16BE','ENV','emit','HTTP\x20','activation','dbPath','address','enabled','detachConsole','\x20logs\x20on\x20\x20','--label','roles','data','OKDBTypeNotRegisteredError','[on|off|level]','get','INDEX_ALREADY_REGISTERED','__OKDB_PUB_FINGERPRINT__','INVALID_VALUE','\x20\x20\x20\x20\x20\x20','_license','licenseHash','decoded','createHash','dropFts','database\x20path\x20writable:\x20','\x20\x20✓\x20','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','toLocaleString','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','rmSync','wrong_node','sourceKey','[okdb]\x20starting…\x0a','\x20env','logs','readUInt16BE','--key','\x27,\x20cannot\x20map\x20to\x20\x27','rawBuf','hasType','toFixed','\x0a\x20\x20Invalid\x20JSON:\x20','Token\x20secret\x20not\x20configured','~licenses','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','ROUTES','derivePin','dropType','time','ref:violation_resolved','\x20envs','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','ttl:set','\x27:\x20','expiry','240TngdkO','exit','7161ZSquXN','sizeAfter','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','details','slice','\x20logs\x20off\x0a','--path','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','token','listen','version','string','prompt','{}[]:,\x0a\x0d\x09\x20','records','pause','Full-text\x20search','effective','equals','type/users/query\x20{\x22active\x22:true}','\x1b[31m','CREATED','level','hasOwnProperty','%),\x20','exports','--token','entries','net','/api/env/','types\x20--env\x20staging','--open','\x0a[okdb]\x20fatal\x20error:','\x20(expires\x20in\x20','halted','env/staging/info','api','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','body','\x20\x20·\x20','xdg-open\x20','--types','\x20\x20\x20\x20','\x20\x20http://localhost:','message','dropIndex','\x20type','result','files','VERSION_MISMATCH','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','available','INDEX_HAS_CONSUMERS','transport','types','_systemEnv','TYPE_NOT_REGISTERED','_licenseHash','stdout','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','mkdirSync','peers=','\x27\x20already\x20registered','schema:drop','LICENSED_BUILD','<path>','/type/users/query\x0a\x20\x20\x20\x20','\x22\x20is\x20used\x20by:\x20','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','[okdb]\x20error:\x20failed\x20to\x20read\x20','created','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','.kdb_history','INDEX_NOT_REGISTERED','quit','current','valid','Cannot\x20delete\x20','timingSafeEqual','schema:set','stdin','/api','Embeddings','sig','[okdb]\x20reset:\x20','LICENSE_LIMIT_EXCEEDED','licenseType','--blobs','No\x20license\x20found\x20matching\x20this\x20activation\x20token','key','dynamic','username','Feature\x20not\x20licensed:\x20','EXIT','ceil','\x0a\x20\x20okdb\x20doctor\x0a','_active','TYPE_ALREADY_REGISTERED','stopped','bus:drain','columns','der','~tokens','init','\x0a[okdb]\x20shutting\x20down…\x0a','__esModule','PUB_FINGERPRINT','\x20bytes,\x20need\x20>=\x2065)','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','type','application/json','error','[okdb]\x20backup\x20complete','importBlobs','reload','keys:','NAME','\x20to\x20quit.','OPEN','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','embeddings','\x20records','indexToDb','changes','_ensureTokensType','sizeBefore','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','Build\x20expects\x20public\x20key\x20fingerprint\x20','typeSubDbs','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x22\x20(must\x20be\x20debug|info|warn|error)','default','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','575002EiYLEC','setSchema','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','unlinkSync','OKDBInvalidIndexKeyError','\x0d[okdb]\x20','attach','\x20\x20Flags','\x20\x20\x20\x20licensee:\x20\x20','env:removed','operation','keys','LICENSE_EXPIRED_ACTION','Invalid\x20index\x20key\x20type\x20for\x20\x27','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','\x20\x20╚═══════════════════════════╝','license:invalid','split','bind','PIN','\x0a\x20\x20✓\x20License\x20added','maxWrites','[okdb]\x20created\x20./okdb-data','blob','object','licenseId','\x20\x20\x20\x20features:\x20\x20','\x20\x20(licensee:\x20','[okdb]\x20importing\x20','timeMachine','trim','status','License\x20signature\x20invalid:\x20','level:\x20info','\x0a\x0a\x20\x20','toUpperCase','--env','--version','system:drain','\x20\x20Tier:\x20\x20\x20\x20','failures','\x20\x20\x20\x20\x20http://localhost:','createdAt','\x27\x20on\x20type\x20\x27','\x20tokens:','OKDB-PIN-V1:','once','ttl:clear','info','\x20\x20Usage:\x20','min','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','transaction','\x20\x20(unlimited)','\x20already\x20in\x20use','gray','\x0a\x20\x20No\x20routes\x20matching\x20\x22','Examples','\x0a\x20\x20License\x20details:','max','null','FOREIGN_KEY_VIOLATION','round','--no-admin','waiting','\x1b[2m','\x20\x20✓\x20http\x20listening\x20on\x20:','[okdb]\x20exporting\x20blobs…','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','tags:\x20','--port','resolve','fts:drop','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','resetFts','1363545ZjXwAf','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','targetType','OKDBIndexHasConsumersError','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','index:reset','1.0.4','readUInt32BE','[okdb]\x20opening\x20','\x22\x20already\x20exists','\x20result','fieldPath','database\x20path\x20not\x20writable:\x20','\x20\x20\x20\x20admin:\x20http://localhost:','auth','every','sha256','SIGTERM','repeat','\x20MB)','replace','109326MMkiyd','type:drop','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','access','started','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','input:\x20','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\x0a\x20\x20✓\x20License\x20activated','Sync','boolean','properties','migrate','unknown','\x20active\x20env:\x20','join','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','--changes','writeUInt32BE','env:opened','write','stderr','License\x20expired\x20or\x20invalidated','2iwpDDA','\x20\x20All\x20checks\x20passed.\x0a','options','doctor','_computeStatus','hint','prototype','yellow','\x22\x20matches\x20','question','warn','--password','label','\x0a\x20\x20','limits','references','\x20\x20╔═══════════════════════════╗','expired','\x20\x20\x20\x20id:\x20\x20\x20\x20','--name','system','ttl','\x1b[35m','Foreign\x20key\x20violation:\x20','off','LICENSE_INVALID','fill','__writeCounter','\x20documents\x20fail\x20validation','LABEL','win32','licensee','creating','\x20\x20✓\x20OKDB\x20server\x20running','call','\x20\x20(name:\x20','OKDBAlreadyExistsError','scrypt','OKDBNotFoundError','Type\x20\x27','[okdb]\x20reset\x20aborted','writeFileSync','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','addedAt','--permissions','verifyActivation','features','Hint:\x20','\x20\x20⚠','\x20\x20+',':\x20expected\x20','8317608oNdooe','\x20\x20score:','\x20\x20\x20\x20permissions:\x20','\x20\x20(need\x20≥\x2018)','PUBLIC_KEY_PEM','MALFORMED_TOKEN','no\x20.kdbconfig\x20(using\x20defaults)','../okdb','stack','/api/','sync','\x1b[0m','trimStart','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','--no-repl','registerFts','readUInt8','/admin/index.html','<json-body>','isFile','127.0.0.1','uuid','update','config\x20file\x20invalid:\x20','LICENSEE','parse','setTtl','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','clearTtl','_isFree','(add\x20a\x20license\x20first)','number','noAdmin','LICENSE_HASH_MISMATCH','\x20\x20·\x20\x20','license:activated','title','\x20\x20Some\x20checks\x20failed.\x0a','includes','platform','writeUInt8','create','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20http://localhost:','--address','\x1b[90m','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','[okdb]\x20loaded\x20config:\x20','typesPerEnv','value','\x20references\x20','OKDBUniqueConstraintError','has','log','\x20→\x20POST\x20/api/env/','--grants','padStart','logRequests','createHmac','INVALID_INDEX_KEY','engines','routes','txn:rollback','count','reason','use\x20<env>','starting','events','loadEnvFile','listRoutes','some','padEnd','license:added','env','licensed','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','permissions','isTTY','getCount','getPins','\x20already\x20exists','(none)','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','decodeLicenseBlob','hidden','\x20\x20[okdb]\x20shutting\x20down…','cyan','unique:violation_resolved','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','charCodeAt','ACTIVATION_EXPIRED','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','index:registered','NOT_FOUND','filter','cause','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','blobs','type/users\x20--help','--username','Unique\x20constraint\x20violated\x20on\x20','queue/','[okdb]\x20invalid\x20port:\x20','description','\x20\x20→\x20\x20','envs','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','getRange','statSync','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','bold','true','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','\x20environment\x20','types:','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','captureStackTrace','readline','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','\x20\x20@','env/','meta','(unset)','listLicenses','Admin','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','active','\x0a\x20\x20✓\x20Token\x20created','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','STATUS','\x20months\x20from\x20issuance)','onLicenseExpired','[okdb]\x20backing\x20up\x20to\x20','--drop','QUIT','node:crypto','\x20in\x20','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','name','reverse','SCHEMA_VALIDATION_FAILED','allocUnsafe','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.',',\x20got\x20','registerIndex','type/users/item/alice','\x20\x20\x20\x20expires:\x20\x20\x20','UNIQUE_CONSTRAINT','invalid','system:stopped','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','ttl:expired','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','FEATURES','help','addLicense','mcp','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','LICENSE_TYPE_OPEN','{}[]:,\x27\x22','standard','PATCH','issuedAt','0123456789ABCDEFGHJKMNPQRSTVWXYZ','body:\x20','hex','now','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','Processors','list','\x1b[37m','registerType','utf8','red','\x1b[32m','\x20day(s).','from','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','INVALID_PRIMARY_KEY','resetIndex','fromEntries','white','[okdb]\x20created\x20.kdbconfig','debug','stopping','magenta','\x20\x20✓\x20database\x20opened\x0a'];_0x3b86=function(){return _0x147dbb;};return _0x3b86();}function requireOkdbShell(){const _0x49259f=_0x4778da;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x4d4250=require$$0$2,_0x3fbb02=require$$1,_0x54a19e=require$$2$1,_0x575002=require$$1$1,_0x4d9989=_0x575002['join'](_0x54a19e[_0x49259f(0x2fe)](),_0x49259f(0x420)),_0x55d8a5=0x3e8,_0x2b646b={'reset':_0x49259f(0x203),'bold':_0x49259f(0x2d8),'dim':_0x49259f(0x18d),'red':_0x49259f(0x3eb),'green':_0x49259f(0x2a6),'yellow':'\x1b[33m','blue':'\x1b[34m','magenta':_0x49259f(0x1db),'cyan':'\x1b[36m','white':_0x49259f(0x2a2),'gray':_0x49259f(0x225)},_0x484a33=!process[_0x49259f(0x411)][_0x49259f(0x245)]||!!process.env.NO_COLOR,_0x361f76=(_0x239728,_0x4fc4dd)=>_0x484a33?_0x4fc4dd:''+_0x239728+_0x4fc4dd+_0x2b646b[_0x49259f(0x303)],_0x4e0da6={'error':_0x2b646b[_0x49259f(0x2a5)],'warn':_0x2b646b['yellow'],'info':_0x2b646b[_0x49259f(0x24e)],'debug':_0x2b646b['gray']},_0x646232={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x47e208(_0x4de669,_0xbb52a6='info'){const _0xa635f4=_0x49259f,{level:_0x436d9d,msg:_0x6fdc87,meta:_0x231f62,context:_0x189bb3,ts:_0x282914}=_0x4de669;if((_0x646232[_0x436d9d]??0x1)<(_0x646232[_0xbb52a6]??0x1))return;const _0x2b2a1f=_0x361f76(_0x2b646b[_0xa635f4(0x183)],new Date(_0x282914)['toISOString']()),_0x551f8d=_0x361f76(_0x4e0da6[_0x436d9d]??_0x2b646b[_0xa635f4(0x2ad)],_0x436d9d['padEnd'](0x5));let _0x27094a='\x20\x20'+_0x2b2a1f+'\x20'+_0x361f76(_0x2b646b[_0xa635f4(0x266)],_0x551f8d)+'\x20'+_0x6fdc87;if(_0x231f62&&Object[_0xa635f4(0x468)](_0x231f62)[_0xa635f4(0x2ec)]>0x0){const _0x375d8f=Object[_0xa635f4(0x3f2)](_0x231f62)['map'](([_0xe70a77,_0x41db82])=>_0xe70a77+'='+_0x41db82)[_0xa635f4(0x1bd)]('\x20');_0x27094a+=_0x361f76(_0x2b646b[_0xa635f4(0x330)],_0xa635f4(0x2b9)+_0x375d8f+']');}if(_0x189bb3!==undefined){const _0x239103=typeof _0x189bb3===_0xa635f4(0x475)?JSON[_0xa635f4(0x321)](_0x189bb3):String(_0x189bb3);_0x27094a+=_0x361f76(_0x2b646b['dim'],'\x20\x20'+_0x239103);}const _0x265850=_0x436d9d==='error'||_0x436d9d===_0xa635f4(0x1cf)?process[_0xa635f4(0x1c3)][_0xa635f4(0x1c2)][_0xa635f4(0x46f)](process['stderr']):process[_0xa635f4(0x411)][_0xa635f4(0x1c2)][_0xa635f4(0x46f)](process['stdout']);_0x265850(_0x27094a+'\x0a');}function _0x242dfb(_0x3a923b,_0x2cae69){const _0x473e54=_0x49259f;if(_0x3a923b===0xcc||_0x3a923b>=0xc8&&_0x3a923b<0x12c&&!_0x2cae69){console[_0x473e54(0x22d)](_0x473e54(0x1d2)+_0x361f76(_0x2b646b[_0x473e54(0x33b)],'✓')+'\x0a');return;}if(_0x3a923b>=0x190||_0x2cae69?.['error']){const _0x3e36c8=_0x2cae69?.['error']??_0x2cae69?.[_0x473e54(0x403)]??_0x473e54(0x3a0)+_0x3a923b;console[_0x473e54(0x22d)]('\x0a\x20\x20'+_0x361f76(_0x2b646b['red'],'✗')+'\x20'+_0x361f76(_0x2b646b[_0x473e54(0x266)]+_0x2b646b[_0x473e54(0x2a5)],String(_0x3a923b))+'\x20\x20'+_0x3e36c8+'\x0a');return;}const _0x5a3900=Object[_0x473e54(0x1cb)][_0x473e54(0x3ee)][_0x473e54(0x1e7)](_0x2cae69??{},_0x473e54(0x406))?_0x2cae69[_0x473e54(0x406)]:_0x2cae69,_0x5b650a=_0x2cae69?.[_0x473e54(0x271)];console[_0x473e54(0x22d)](''),_0x2fb5fb(_0x5a3900,'\x20\x20');if(_0x5b650a?.[_0x473e54(0x237)]!=null||_0x5b650a?.[_0x473e54(0x3ce)]!=null){const _0x52a217=[];if(_0x5b650a[_0x473e54(0x237)]!=null)_0x52a217['push'](_0x5b650a[_0x473e54(0x237)]+_0x473e54(0x1a1)+(_0x5b650a[_0x473e54(0x237)]!==0x1?'s':''));if(_0x5b650a['time']!=null)_0x52a217[_0x473e54(0x397)](_0x5b650a[_0x473e54(0x3ce)]+'ms');console[_0x473e54(0x22d)](_0x473e54(0x1d2)+_0x361f76(_0x2b646b[_0x473e54(0x330)],_0x52a217[_0x473e54(0x1bd)](_0x473e54(0x21a))));}console['log']('');}function _0x2fb5fb(_0x59e943,_0x4357b3=''){const _0x1c65ef=_0x49259f;if(_0x59e943===null||_0x59e943===undefined){console[_0x1c65ef(0x22d)](_0x4357b3+_0x361f76(_0x2b646b[_0x1c65ef(0x330)],_0x1c65ef(0x389)));return;}if(Array['isArray'](_0x59e943)){if(_0x59e943['length']===0x0){console[_0x1c65ef(0x22d)](_0x4357b3+_0x361f76(_0x2b646b['dim'],'(empty)'));return;}if(_0x59e943[_0x1c65ef(0x1a6)](_0x1ea9a5=>_0x1ea9a5&&typeof _0x1ea9a5==='object'&&_0x1c65ef(0x431)in _0x1ea9a5&&'value'in _0x1ea9a5)){_0x20f805(_0x59e943,_0x4357b3);return;}if(_0x59e943[_0x1c65ef(0x1a6)](_0x184795=>_0x184795&&typeof _0x184795===_0x1c65ef(0x475)&&'type'in _0x184795&&'count'in _0x184795)){_0x3894be(_0x59e943,_0x4357b3);return;}if(_0x59e943['every'](_0x2ba10=>typeof _0x2ba10!=='object'||_0x2ba10===null)){_0x59e943[_0x1c65ef(0x30c)]((_0x11b6d8,_0x13de95)=>console['log'](_0x4357b3+_0x361f76(_0x2b646b[_0x1c65ef(0x183)],_0x13de95+0x1+'.')+'\x20'+_0x361f76(_0x2b646b['white'],String(_0x11b6d8))));return;}_0x59e943[_0x1c65ef(0x30c)]((_0x364253,_0x431257)=>{const _0x5a185e=_0x1c65ef;console[_0x5a185e(0x22d)](_0x4357b3+_0x361f76(_0x2b646b[_0x5a185e(0x330)],'['+_0x431257+']'));if(typeof _0x364253===_0x5a185e(0x475)&&_0x364253!==null)_0x225cd0(_0x364253,_0x4357b3+'\x20\x20');else console['log'](_0x4357b3+'\x20\x20'+String(_0x364253));});return;}if(typeof _0x59e943==='object'){if(_0x1c65ef(0x431)in _0x59e943&&_0x1c65ef(0x229)in _0x59e943&&Object[_0x1c65ef(0x468)](_0x59e943)[_0x1c65ef(0x2ec)]<=0x3){console[_0x1c65ef(0x22d)](_0x4357b3+_0x361f76(_0x2b646b['bold']+_0x2b646b[_0x1c65ef(0x24e)],String(_0x59e943[_0x1c65ef(0x431)])));const _0xaada37=_0x59e943['value'];if(_0xaada37&&typeof _0xaada37===_0x1c65ef(0x475))_0x225cd0(_0xaada37,_0x4357b3);else console[_0x1c65ef(0x22d)](_0x4357b3+_0x361f76(_0x2b646b[_0x1c65ef(0x2ad)],String(_0xaada37)));return;}_0x225cd0(_0x59e943,_0x4357b3);return;}console[_0x1c65ef(0x22d)](_0x4357b3+_0x361f76(_0x2b646b[_0x1c65ef(0x2ad)],String(_0x59e943)));}function _0x225cd0(_0x4b94d5,_0x2055ae=''){const _0x2ff1ad=_0x49259f,_0x557c5e=Object['entries'](_0x4b94d5);if(_0x557c5e[_0x2ff1ad(0x2ec)]===0x0){console[_0x2ff1ad(0x22d)](_0x2055ae+_0x361f76(_0x2b646b['dim'],'{}'));return;}const _0x2c759f=Math[_0x2ff1ad(0x17e)](0x1c,Math[_0x2ff1ad(0x187)](..._0x557c5e[_0x2ff1ad(0x318)](([_0x448857])=>_0x448857[_0x2ff1ad(0x2ec)])));for(const [_0x405bdc,_0x28d775]of _0x557c5e){const _0xa8e3e6=_0x361f76(_0x2b646b[_0x2ff1ad(0x24e)],_0x405bdc[_0x2ff1ad(0x23f)](_0x2c759f));if(_0x28d775===null||_0x28d775===undefined)console['log'](_0x2055ae+_0xa8e3e6+'\x20\x20'+_0x361f76(_0x2b646b[_0x2ff1ad(0x330)],_0x2ff1ad(0x188)));else{if(typeof _0x28d775==='object'){const _0x449e9f=JSON['stringify'](_0x28d775);_0x449e9f['length']<=0x50?console[_0x2ff1ad(0x22d)](_0x2055ae+_0xa8e3e6+'\x20\x20'+_0x361f76(_0x2b646b[_0x2ff1ad(0x330)],_0x449e9f)):(console[_0x2ff1ad(0x22d)](_0x2055ae+_0xa8e3e6),_0x2fb5fb(_0x28d775,_0x2055ae+'\x20\x20'));}else{const _0x5d71cf=typeof _0x28d775===_0x2ff1ad(0x1b8)?_0x361f76(_0x28d775?_0x2b646b['green']:_0x2b646b[_0x2ff1ad(0x1cc)],String(_0x28d775)):typeof _0x28d775===_0x2ff1ad(0x217)?_0x361f76(_0x2b646b[_0x2ff1ad(0x2b1)],String(_0x28d775)):_0x361f76(_0x2b646b[_0x2ff1ad(0x2ad)],String(_0x28d775));console['log'](_0x2055ae+_0xa8e3e6+'\x20\x20'+_0x5d71cf);}}}}function _0x20f805(_0x107074,_0x14356b=''){const _0x5ce8b6=_0x49259f,_0x29c997=Math['min'](0x20,Math[_0x5ce8b6(0x187)](..._0x107074[_0x5ce8b6(0x318)](_0x50c040=>String(_0x50c040[_0x5ce8b6(0x431)])[_0x5ce8b6(0x2ec)])));for(const {key:_0x2f7739,value:_0x5581ff,score:_0x399d6c,clock:_0x1582bf}of _0x107074){const _0x13289e=_0x361f76(_0x2b646b['bold']+_0x2b646b[_0x5ce8b6(0x24e)],String(_0x2f7739)[_0x5ce8b6(0x23f)](_0x29c997)),_0x1a5317=_0x5581ff==null?_0x361f76(_0x2b646b['dim'],_0x5ce8b6(0x188)):typeof _0x5581ff===_0x5ce8b6(0x475)?_0x361f76(_0x2b646b[_0x5ce8b6(0x330)],JSON[_0x5ce8b6(0x321)](_0x5581ff)):_0x361f76(_0x2b646b[_0x5ce8b6(0x2ad)],String(_0x5581ff)),_0x19443b=_0x399d6c!=null?_0x361f76(_0x2b646b[_0x5ce8b6(0x183)],_0x5ce8b6(0x1f9)+_0x399d6c[_0x5ce8b6(0x3c6)](0x4)):'',_0x23000d=_0x1582bf!=null?_0x361f76(_0x2b646b[_0x5ce8b6(0x183)],_0x5ce8b6(0x26f)+_0x1582bf):'';console[_0x5ce8b6(0x22d)](_0x14356b+_0x13289e+'\x20\x20'+_0x1a5317+_0x19443b+_0x23000d);}}function _0x3894be(_0x5327c5,_0x45cd3e=''){const _0x46edb8=_0x49259f,_0x16ed17=Math[_0x46edb8(0x17e)](0x20,Math[_0x46edb8(0x187)](..._0x5327c5[_0x46edb8(0x318)](_0x3abf8f=>_0x3abf8f['type'][_0x46edb8(0x2ec)])));for(const {type:_0x55a684,count:_0x2e1a0b,fields:_0x2d7f82}of _0x5327c5){if(_0x55a684['startsWith']('~'))continue;const _0x46c207=_0x361f76(_0x2b646b[_0x46edb8(0x266)]+_0x2b646b['cyan'],_0x55a684[_0x46edb8(0x23f)](_0x16ed17)),_0x170e75=_0x361f76(_0x2b646b['magenta'],String(_0x2e1a0b)[_0x46edb8(0x230)](0x6))+_0x361f76(_0x2b646b[_0x46edb8(0x330)],_0x46edb8(0x451)),_0x25ca71=_0x2d7f82&&Object[_0x46edb8(0x468)](_0x2d7f82)[_0x46edb8(0x2ec)]?_0x361f76(_0x2b646b[_0x46edb8(0x330)],_0x46edb8(0x3fe)+Object['keys'](_0x2d7f82)[_0x46edb8(0x3db)](0x0,0x6)['join'](',\x20')+(Object[_0x46edb8(0x468)](_0x2d7f82)[_0x46edb8(0x2ec)]>0x6?'…':'')):'';console[_0x46edb8(0x22d)](_0x45cd3e+_0x46c207+'\x20\x20'+_0x170e75+_0x25ca71);}}const _0x2330ef=['types',_0x49259f(0x362),_0x49259f(0x25d),_0x49259f(0x2ca),_0x49259f(0x180),'processors/'];function _0x8224f1(_0x468ce9,_0x46fd71){const _0x112c5f=_0x49259f;if(_0x468ce9['startsWith'](_0x112c5f(0x201)))return _0x468ce9;if(_0x468ce9['startsWith']('/'))return _0x112c5f(0x429)+_0x468ce9;if(_0x468ce9[_0x112c5f(0x392)](_0x112c5f(0x270)))return _0x112c5f(0x201)+_0x468ce9;const _0x1f4d2a=_0x2330ef[_0x112c5f(0x23e)](_0x4d72dc=>_0x468ce9===_0x4d72dc[_0x112c5f(0x1ab)](/\/$/,'')||_0x468ce9[_0x112c5f(0x392)](_0x4d72dc));return _0x1f4d2a?_0x112c5f(0x3f4)+_0x46fd71+'/'+_0x468ce9:'/api/'+_0x468ce9;}function _0x3ffa3d(_0x1513fb){const _0x5a052f=_0x49259f,_0x41fbf0={},_0x26f190=[];let _0xa4680b=0x0;while(_0xa4680b<_0x1513fb[_0x5a052f(0x2ec)]){if((_0x1513fb[_0xa4680b]==='--env'||_0x1513fb[_0xa4680b]==='-e')&&_0x1513fb[_0xa4680b+0x1]&&!_0x1513fb[_0xa4680b+0x1][_0x5a052f(0x392)]('-'))_0x41fbf0[_0x5a052f(0x241)]=_0x1513fb[++_0xa4680b];else _0x1513fb[_0xa4680b]===_0x5a052f(0x367)||_0x1513fb[_0xa4680b]==='-h'?_0x41fbf0[_0x5a052f(0x292)]=!![]:_0x26f190[_0x5a052f(0x397)](_0x1513fb[_0xa4680b]);_0xa4680b++;}return{'flags':_0x41fbf0,'rest':_0x26f190};}const _0x4051c0={'system':'System','envs':_0x49259f(0x360),'types':'Types','data':_0x49259f(0x2bb),'indexes':'Indexes','fts':_0x49259f(0x3e7),'sync':_0x49259f(0x1b7),'queue':'Queue','files':'Files','embeddings':_0x49259f(0x42a),'engines':'Engines','admin':_0x49259f(0x274),'event':'Events','processor':_0x49259f(0x2a0)},_0x1fe57c=[_0x49259f(0x1d9),_0x49259f(0x261),_0x49259f(0x40d),'data','indexes',_0x49259f(0x348),_0x49259f(0x202),'queue',_0x49259f(0x407),_0x49259f(0x450),'engines',_0x49259f(0x382)];function _0x282417(_0xf842f){const _0x2420cd=_0x49259f;return _0xf842f[_0x2420cd(0x1ab)](/^\/api/,'')[_0x2420cd(0x1ab)](/^\[\/env\/:env=[^\]]*\]/,'[env]')[_0x2420cd(0x1ab)](/^\/env\/:env/,'env/:env')['replace'](/^\//,'');}function _0x2fdd60(_0x204d3a,_0x4b289d=''){const _0x5c0586=_0x49259f,_0x27949b=_0x204d3a[_0x5c0586(0x31e)][_0x5c0586(0x23d)]()[_0x5c0586(0x256)](_0x9c74f1=>!_0x9c74f1['meta']?.[_0x5c0586(0x24c)]),_0x3fb6fc=_0x4b289d?_0x27949b['filter'](_0x47d13f=>_0x47d13f[_0x5c0586(0x2d6)][_0x5c0586(0x2e6)]()[_0x5c0586(0x21e)](_0x4b289d[_0x5c0586(0x2e6)]())||(_0x151f06(_0x47d13f)??'')[_0x5c0586(0x2e6)]()['includes'](_0x4b289d[_0x5c0586(0x2e6)]())||_0x1743af(_0x47d13f)[_0x5c0586(0x23e)](_0x270fc1=>_0x270fc1['toLowerCase']()['includes'](_0x4b289d[_0x5c0586(0x2e6)]()))):_0x27949b;if(!_0x3fb6fc[_0x5c0586(0x2ec)]){console['log'](_0x361f76(_0x2b646b[_0x5c0586(0x1cc)],_0x5c0586(0x184)+_0x4b289d+'\x22\x0a'));return;}const _0x529439=new Map();for(const _0x16c87f of _0x3fb6fc){const _0x15e1d4=_0x1743af(_0x16c87f)[0x0]??'other';if(!_0x529439[_0x5c0586(0x22c)](_0x15e1d4))_0x529439[_0x5c0586(0x36f)](_0x15e1d4,[]);_0x529439[_0x5c0586(0x3ac)](_0x15e1d4)[_0x5c0586(0x397)](_0x16c87f);}const _0x3ab5e7=[..._0x1fe57c[_0x5c0586(0x256)](_0x30d5a4=>_0x529439[_0x5c0586(0x22c)](_0x30d5a4)),...[..._0x529439[_0x5c0586(0x468)]()][_0x5c0586(0x256)](_0x4b29c5=>!_0x1fe57c[_0x5c0586(0x21e)](_0x4b29c5))];console[_0x5c0586(0x22d)]('');for(const _0x134dbe of _0x3ab5e7){const _0x52578c=_0x529439[_0x5c0586(0x3ac)](_0x134dbe);if(!_0x52578c?.[_0x5c0586(0x2ec)])continue;console['log'](_0x361f76(_0x2b646b[_0x5c0586(0x266)],'\x20\x20'+(_0x4051c0[_0x134dbe]??_0x134dbe)));for(const _0x50ee9f of _0x52578c){const _0x5be33c=_0x361f76(_0x2b646b[_0x5c0586(0x2b1)],_0x50ee9f[_0x5c0586(0x352)]['padEnd'](0x7)),_0x5886de=_0x361f76(_0x2b646b[_0x5c0586(0x24e)],_0x282417(_0x50ee9f['path'])),_0x2f815b=_0x151f06(_0x50ee9f)?_0x361f76(_0x2b646b[_0x5c0586(0x330)],'\x20\x20'+_0x151f06(_0x50ee9f)):'',_0x540418=_0x50ee9f[_0x5c0586(0x467)]?.['id']?_0x361f76(_0x2b646b[_0x5c0586(0x183)],_0x5c0586(0x2b9)+_0x50ee9f['operation']['id']+']'):'';console['log']('\x20\x20\x20\x20'+_0x5be33c+'\x20'+_0x5886de+_0x2f815b+_0x540418);}console[_0x5c0586(0x22d)]('');}}function _0x4efcf9(_0x1084a8,_0x2dfa97){const _0x34151f=_0x49259f,_0x234fd2=_0x2dfa97['replace'](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x5403a3=_0x1084a8[_0x34151f(0x31e)][_0x34151f(0x23d)]()[_0x34151f(0x256)](_0x5d5b15=>_0x5d5b15[_0x34151f(0x2d6)][_0x34151f(0x2e6)]()['includes'](_0x234fd2['toLowerCase']()));if(!_0x5403a3['length']){console[_0x34151f(0x22d)](_0x361f76(_0x2b646b[_0x34151f(0x1cc)],_0x34151f(0x409)+_0x2dfa97+'\x0a'));return;}console['log']('');for(const _0x3234f0 of _0x5403a3[_0x34151f(0x3db)](0x0,0xc)){for(const _0x416faa of _0x4726d8(_0x3234f0)){console[_0x34151f(0x22d)](_0x416faa);}console[_0x34151f(0x22d)]('');}}function _0x151f06(_0x2082fa){return _0x2082fa['operation']?.['summary']??_0x2082fa['meta']?.['summary']??'';}function _0x2d9a64(_0x3f2ada){const _0x49369b=_0x49259f;return _0x3f2ada[_0x49369b(0x467)]?.[_0x49369b(0x25f)]??_0x3f2ada[_0x49369b(0x271)]?.[_0x49369b(0x25f)]??'';}function _0x1743af(_0x26419f){const _0x18aa63=_0x49259f;return _0x26419f[_0x18aa63(0x467)]?.[_0x18aa63(0x32a)]?.[_0x18aa63(0x2ec)]?_0x26419f[_0x18aa63(0x467)][_0x18aa63(0x32a)]:_0x26419f['meta']?.[_0x18aa63(0x32a)]??[];}function _0x4726d8(_0x113b37){const _0x135b95=_0x49259f,_0x511b9f=[];_0x511b9f[_0x135b95(0x397)]('\x20\x20'+_0x361f76(_0x2b646b[_0x135b95(0x266)]+_0x2b646b[_0x135b95(0x2b1)],_0x113b37[_0x135b95(0x352)][_0x135b95(0x23f)](0x7))+'\x20'+_0x361f76(_0x2b646b['bold']+_0x2b646b['cyan'],_0x113b37[_0x135b95(0x2d6)]));_0x113b37['operation']?.['id']&&_0x511b9f[_0x135b95(0x397)](_0x135b95(0x195)+_0x361f76(_0x2b646b[_0x135b95(0x183)],_0x135b95(0x316)+_0x113b37[_0x135b95(0x467)]['id']));_0x151f06(_0x113b37)&&_0x511b9f[_0x135b95(0x397)](_0x135b95(0x195)+_0x361f76(_0x2b646b['white'],_0x151f06(_0x113b37)));_0x2d9a64(_0x113b37)&&_0x511b9f['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x361f76(_0x2b646b[_0x135b95(0x330)],_0x2d9a64(_0x113b37)));_0x1743af(_0x113b37)['length']&&_0x511b9f[_0x135b95(0x397)](_0x135b95(0x195)+_0x361f76(_0x2b646b[_0x135b95(0x183)],_0x135b95(0x191)+_0x1743af(_0x113b37)[_0x135b95(0x1bd)](',\x20')));_0x113b37['operation']?.['safety']?.[_0x135b95(0x1b0)]&&_0x511b9f[_0x135b95(0x397)](_0x135b95(0x195)+_0x361f76(_0x2b646b['gray'],'access:\x20'+_0x113b37['operation']['safety'][_0x135b95(0x1b0)]));_0x113b37['operation']?.[_0x135b95(0x31e)]?.[_0x135b95(0x40c)]&&_0x113b37[_0x135b95(0x467)][_0x135b95(0x31e)][_0x135b95(0x40c)]!==_0x135b95(0x298)&&_0x511b9f[_0x135b95(0x397)](_0x135b95(0x195)+_0x361f76(_0x2b646b['gray'],_0x135b95(0x33d)+_0x113b37[_0x135b95(0x467)][_0x135b95(0x31e)]['transport']));if(_0x113b37['operation']?.[_0x135b95(0x32d)]){const _0x2025e9=Object['keys'](_0x113b37[_0x135b95(0x467)]['inputSchema'][_0x135b95(0x1b9)]||{});if(_0x2025e9[_0x135b95(0x2ec)])_0x511b9f[_0x135b95(0x397)](_0x135b95(0x195)+_0x361f76(_0x2b646b[_0x135b95(0x183)],_0x135b95(0x1b3)+_0x2025e9['join'](',\x20')));}return _0x113b37[_0x135b95(0x271)]?.['body']&&_0x511b9f[_0x135b95(0x397)](_0x135b95(0x195)+_0x361f76(_0x2b646b['gray'],_0x135b95(0x29c)+JSON[_0x135b95(0x321)](_0x113b37[_0x135b95(0x271)][_0x135b95(0x3fd)]))),_0x511b9f;}async function _0x4f714e(_0x265aba,_0x5f1701,_0xbb15a8,_0x5b5c70=null){const _0x486e0e=_0x49259f,_0x324ea1=_0xbb15a8[_0x486e0e(0x359)]('?'),_0x4d4962=_0x324ea1>=0x0?_0xbb15a8['slice'](0x0,_0x324ea1):_0xbb15a8,_0x408d68=_0x324ea1>=0x0?_0xbb15a8[_0x486e0e(0x3db)](_0x324ea1+0x1):'',_0x4d72c1=Object[_0x486e0e(0x2ac)](new URLSearchParams(_0x408d68)[_0x486e0e(0x3f2)]());return _0x265aba[_0x486e0e(0x31e)]['handle'](_0x5f1701,_0x4d4962,{'body':_0x5b5c70,'query':_0x4d72c1,'headers':{'content-type':_0x486e0e(0x446)}},{'internal':!![]});}function _0x45a396(_0x4af144){const _0x1e8e55=_0x49259f;if(!_0x4af144)return null;const _0x50b6e2=_0x4af144[_0x1e8e55(0x47b)]();if(!_0x50b6e2)return null;try{return JSON[_0x1e8e55(0x211)](_0x50b6e2);}catch{}try{return JSON['parse'](_0x5d52c3(_0x50b6e2));}catch(_0x25c40c){throw new SyntaxError(_0x25c40c[_0x1e8e55(0x403)],{'cause':_0x25c40c});}}function _0x5d52c3(_0x1affd8){const _0x4a7d4a=_0x49259f;let _0x36fe0b='',_0x22551e=0x0;while(_0x22551e<_0x1affd8['length']){const _0x3c974d=_0x1affd8[_0x22551e];if(_0x3c974d==='\x22'){_0x36fe0b+='\x22',_0x22551e++;while(_0x22551e<_0x1affd8['length']&&_0x1affd8[_0x22551e]!=='\x22'){if(_0x1affd8[_0x22551e]==='\x5c'){_0x36fe0b+=_0x1affd8[_0x22551e++];if(_0x22551e<_0x1affd8[_0x4a7d4a(0x2ec)])_0x36fe0b+=_0x1affd8[_0x22551e++];}else _0x36fe0b+=_0x1affd8[_0x22551e++];}_0x36fe0b+='\x22';if(_0x22551e<_0x1affd8['length'])_0x22551e++;continue;}if(_0x3c974d==='\x27'){_0x36fe0b+='\x22',_0x22551e++;while(_0x22551e<_0x1affd8[_0x4a7d4a(0x2ec)]&&_0x1affd8[_0x22551e]!=='\x27'){if(_0x1affd8[_0x22551e]==='\x5c'&&_0x1affd8[_0x22551e+0x1]==='\x27')_0x36fe0b+='\x27',_0x22551e+=0x2;else _0x1affd8[_0x22551e]==='\x22'?(_0x36fe0b+='\x5c\x22',_0x22551e++):_0x36fe0b+=_0x1affd8[_0x22551e++];}_0x36fe0b+='\x22';if(_0x22551e<_0x1affd8[_0x4a7d4a(0x2ec)])_0x22551e++;continue;}if(_0x4a7d4a(0x3e4)[_0x4a7d4a(0x21e)](_0x3c974d)){_0x36fe0b+=_0x3c974d,_0x22551e++;continue;}let _0x75fa48='';while(_0x22551e<_0x1affd8['length']&&!_0x4a7d4a(0x297)['includes'](_0x1affd8[_0x22551e])&&_0x1affd8[_0x22551e]!=='\x20'&&_0x1affd8[_0x22551e]!=='\x09'&&_0x1affd8[_0x22551e]!=='\x0a'&&_0x1affd8[_0x22551e]!=='\x0d'){_0x75fa48+=_0x1affd8[_0x22551e++];}let _0x4297ea=_0x22551e;while(_0x4297ea<_0x1affd8[_0x4a7d4a(0x2ec)]&&(_0x1affd8[_0x4297ea]==='\x20'||_0x1affd8[_0x4297ea]==='\x09'))_0x4297ea++;if(_0x1affd8[_0x4297ea]===':')_0x36fe0b+='\x22'+_0x75fa48+'\x22';else _0x75fa48===_0x4a7d4a(0x267)||_0x75fa48===_0x4a7d4a(0x387)||_0x75fa48===_0x4a7d4a(0x188)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x4a7d4a(0x35c)](_0x75fa48)?_0x36fe0b+=_0x75fa48:_0x36fe0b+='\x22'+_0x75fa48+'\x22';}return _0x36fe0b[_0x4a7d4a(0x1ab)](/,(\s*[}\]])/g,'$1');}function _0x44283a(_0x1a19fb){const _0x31892d=_0x49259f,_0x2f3024=[];let _0x566e53=0x0;while(_0x566e53<_0x1a19fb[_0x31892d(0x2ec)]){while(_0x566e53<_0x1a19fb[_0x31892d(0x2ec)]&&(_0x1a19fb[_0x566e53]==='\x20'||_0x1a19fb[_0x566e53]==='\x09'))_0x566e53++;if(_0x566e53>=_0x1a19fb['length'])break;const _0x87c14a=_0x1a19fb[_0x566e53];if(_0x87c14a==='{'||_0x87c14a==='['){const _0x575df9=_0x87c14a==='{'?'}':']',_0x30c4f1=_0x566e53++;let _0x4f8848=0x1,_0x478915=![],_0x148722='';while(_0x566e53<_0x1a19fb[_0x31892d(0x2ec)]&&_0x4f8848>0x0){const _0x18a0e4=_0x1a19fb[_0x566e53];if(_0x478915){if(_0x18a0e4==='\x5c')_0x566e53++;else{if(_0x18a0e4===_0x148722)_0x478915=![];}}else{if(_0x18a0e4==='\x22'||_0x18a0e4==='\x27')_0x478915=!![],_0x148722=_0x18a0e4;else{if(_0x18a0e4===_0x87c14a)_0x4f8848++;else{if(_0x18a0e4===_0x575df9)_0x4f8848--;}}}_0x566e53++;}_0x2f3024[_0x31892d(0x397)](_0x1a19fb[_0x31892d(0x3db)](_0x30c4f1,_0x566e53));continue;}if(_0x87c14a==='\x22'||_0x87c14a==='\x27'){const _0x207502=_0x87c14a;_0x566e53++;let _0x5ef940='';while(_0x566e53<_0x1a19fb['length']&&_0x1a19fb[_0x566e53]!==_0x207502){if(_0x1a19fb[_0x566e53]==='\x5c'&&_0x566e53+0x1<_0x1a19fb[_0x31892d(0x2ec)])_0x566e53++,_0x5ef940+=_0x1a19fb[_0x566e53++];else _0x5ef940+=_0x1a19fb[_0x566e53++];}if(_0x566e53<_0x1a19fb[_0x31892d(0x2ec)])_0x566e53++;_0x2f3024[_0x31892d(0x397)](_0x5ef940);continue;}let _0x51fefd='';while(_0x566e53<_0x1a19fb[_0x31892d(0x2ec)]&&_0x1a19fb[_0x566e53]!=='\x20'&&_0x1a19fb[_0x566e53]!=='\x09'&&_0x1a19fb[_0x566e53]!=='{'&&_0x1a19fb[_0x566e53]!=='['){_0x51fefd+=_0x1a19fb[_0x566e53++];}if(_0x51fefd)_0x2f3024[_0x31892d(0x397)](_0x51fefd);}return _0x2f3024;}function _0x4246e9(_0x3fe9b1,_0x9fd4c6){const _0x45170f=_0x49259f,_0x46f7dd=[..._0x3fe9b1['_envs'][_0x45170f(0x468)]()]['filter'](_0x50bd69=>!_0x50bd69[_0x45170f(0x392)]('~'));console[_0x45170f(0x22d)](['',_0x361f76(_0x2b646b['bold']+_0x2b646b[_0x45170f(0x24e)],_0x45170f(0x1d5)),_0x361f76(_0x2b646b[_0x45170f(0x266)]+_0x2b646b[_0x45170f(0x24e)],_0x45170f(0x2dd))+_0x361f76(_0x2b646b[_0x45170f(0x266)],_0x45170f(0x258))+_0x361f76(_0x2b646b['bold']+_0x2b646b['cyan'],'║'),_0x361f76(_0x2b646b[_0x45170f(0x266)]+_0x2b646b['cyan'],_0x45170f(0x46c)),'','\x20\x20'+_0x361f76(_0x2b646b[_0x45170f(0x33b)],'✓')+'\x20'+_0x361f76(_0x2b646b[_0x45170f(0x266)],'server')+_0x45170f(0x402)+_0x9fd4c6[_0x45170f(0x2e0)],'\x20\x20'+_0x361f76(_0x2b646b['green'],'✓')+'\x20'+_0x361f76(_0x2b646b[_0x45170f(0x266)],'api')+_0x45170f(0x175)+_0x9fd4c6[_0x45170f(0x2e0)]+_0x45170f(0x429),'\x20\x20'+_0x361f76(_0x2b646b[_0x45170f(0x33b)],'✓')+'\x20'+_0x361f76(_0x2b646b[_0x45170f(0x266)],'path')+_0x45170f(0x401)+_0x9fd4c6['dbPath'],'\x20\x20'+_0x361f76(_0x2b646b[_0x45170f(0x33b)],'✓')+'\x20'+_0x361f76(_0x2b646b[_0x45170f(0x266)],'id')+_0x45170f(0x3b0)+_0x361f76(_0x2b646b[_0x45170f(0x183)],_0x3fe9b1['id']),'\x20\x20'+_0x361f76(_0x2b646b[_0x45170f(0x33b)],'✓')+'\x20'+_0x361f76(_0x2b646b[_0x45170f(0x266)],_0x45170f(0x261))+_0x45170f(0x401)+_0x46f7dd[_0x45170f(0x318)](_0x3bd34b=>_0x361f76(_0x2b646b[_0x45170f(0x24e)],_0x3bd34b))['join']('\x20\x20'),..._0x9fd4c6[_0x45170f(0x218)]?[]:['\x20\x20'+_0x361f76(_0x2b646b['green'],'✓')+'\x20'+_0x361f76(_0x2b646b[_0x45170f(0x266)],'admin')+_0x45170f(0x223)+_0x9fd4c6['port']+_0x45170f(0x209)],'',_0x361f76(_0x2b646b[_0x45170f(0x330)],_0x45170f(0x35f)+_0x361f76(_0x2b646b[_0x45170f(0x266)],'help')+_0x45170f(0x376)+_0x361f76(_0x2b646b[_0x45170f(0x266)],_0x45170f(0x235))+_0x45170f(0x32b)+_0x361f76(_0x2b646b[_0x45170f(0x266)],_0x45170f(0x3d6))+_0x45170f(0x44d)),''][_0x45170f(0x1bd)]('\x0a'));}function _0x36463b(_0x5eca20){const _0x239e81=_0x49259f;console['log']('\x0a'+_0x361f76(_0x2b646b[_0x239e81(0x266)],_0x239e81(0x32f))+'\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x330)],_0x239e81(0x198))+_0x239e81(0x16e)+_0x361f76(_0x2b646b[_0x239e81(0x24e)],_0x239e81(0x418))+_0x239e81(0x33a)+_0x361f76(_0x2b646b[_0x239e81(0x24e)],_0x239e81(0x418))+'\x20'+_0x361f76(_0x2b646b[_0x239e81(0x1cc)],_0x239e81(0x20a))+_0x239e81(0x26b)+_0x361f76(_0x2b646b['cyan'],_0x239e81(0x347))+'\x20'+_0x361f76(_0x2b646b[_0x239e81(0x24e)],'<path>')+'\x20'+_0x361f76(_0x2b646b[_0x239e81(0x1cc)],'[body]')+_0x239e81(0x340)+_0x361f76(_0x2b646b['dim'],'Examples')+'\x0a\x20\x20\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x183)],'info')+_0x239e81(0x383)+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x261))+_0x239e81(0x190)+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x40d))+_0x239e81(0x290)+_0x5eca20['env']+_0x239e81(0x328)+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x39b))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x5eca20[_0x239e81(0x241)]+'/type/users\x0a\x20\x20\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x289))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x5eca20['env']+_0x239e81(0x36d)+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x3ea))+_0x239e81(0x22e)+_0x5eca20[_0x239e81(0x241)]+_0x239e81(0x419)+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x1b4))+_0x239e81(0x393)+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x338))+_0x239e81(0x393)+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x3fa))+_0x239e81(0x41f)+_0x361f76(_0x2b646b[_0x239e81(0x266)],_0x239e81(0x464))+'\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x330)],'(on\x20any\x20path\x20command)')+_0x239e81(0x16e)+_0x361f76(_0x2b646b[_0x239e81(0x24e)],_0x239e81(0x336))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x24e)],_0x239e81(0x367))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x330)],_0x239e81(0x185))+_0x239e81(0x393)+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x3f5))+'\x0a\x20\x20\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x2ef))+'\x0a\x20\x20\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x183)],_0x239e81(0x25a))+'\x0a\x0a'+_0x361f76(_0x2b646b[_0x239e81(0x266)],_0x239e81(0x36c))+'\x0a\x0a\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x24e)],_0x239e81(0x239))+_0x239e81(0x3de)+_0x361f76(_0x2b646b[_0x239e81(0x24e)],_0x239e81(0x241))+_0x239e81(0x1af)+_0x361f76(_0x2b646b[_0x239e81(0x24e)],_0x239e81(0x235))+'\x20'+_0x361f76(_0x2b646b[_0x239e81(0x330)],_0x239e81(0x2e7))+_0x239e81(0x265)+_0x361f76(_0x2b646b[_0x239e81(0x24e)],_0x239e81(0x3c0))+'\x20'+_0x361f76(_0x2b646b[_0x239e81(0x330)],_0x239e81(0x3ab))+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x361f76(_0x2b646b[_0x239e81(0x24e)],'open')+_0x239e81(0x1b2)+_0x361f76(_0x2b646b[_0x239e81(0x24e)],'help')+_0x239e81(0x1be)+_0x361f76(_0x2b646b['cyan'],_0x239e81(0x3d6))+'\x20'+_0x361f76(_0x2b646b[_0x239e81(0x330)],_0x239e81(0x317))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}async function _0x119754(_0x920239,_0x58025f=0x0){const _0x3e08e3=_0x49259f;process['stdout']['write']('\x0a'),console[_0x3e08e3(0x22d)](_0x361f76(_0x2b646b[_0x3e08e3(0x1cc)],_0x3e08e3(0x24d)));try{await _0x920239[_0x3e08e3(0x305)]();}catch(_0x4c8fa5){console[_0x3e08e3(0x447)](_0x361f76(_0x2b646b[_0x3e08e3(0x2a5)],'\x20\x20'+_0x4c8fa5[_0x3e08e3(0x403)]));}process[_0x3e08e3(0x3d6)](_0x58025f);}function _0x254f87(_0x4c56f0){const _0x5ad937=_0x49259f,_0x20bfbf=_0x4c56f0['env']!==_0x5ad937(0x45b)?_0x361f76(_0x2b646b[_0x5ad937(0x1cc)],'['+_0x4c56f0[_0x5ad937(0x241)]+']'):'';return _0x361f76(_0x2b646b['bold']+_0x2b646b[_0x5ad937(0x24e)],_0x5ad937(0x2f6))+_0x20bfbf+_0x361f76(_0x2b646b[_0x5ad937(0x183)],'>\x20');}const _0x451ede=new Set([_0x49259f(0x2cb),'POST',_0x49259f(0x35d),_0x49259f(0x299),'DELETE']);async function _0x21f17d(_0x14e6e7,_0x4d8581,_0x49891d,_0x102fb9,_0x29d121,_0x50c570){const _0x43fff=_0x49259f;_0x14e6e7=_0x14e6e7[_0x43fff(0x47b)]();if(!_0x14e6e7||_0x14e6e7[_0x43fff(0x392)]('#'))return;const _0xfd174f=_0x44283a(_0x14e6e7),{flags:_0x1131d8,rest:_0x29b9e3}=_0x3ffa3d(_0xfd174f);if(!_0x29b9e3['length'])return;const _0x45b123=_0x29b9e3[0x0],_0x31462c=_0x45b123[_0x43fff(0x16f)]();if(_0x31462c==='HELP'){if(_0x29b9e3[0x1])_0x4efcf9(_0x4d8581,_0x8224f1(_0x29b9e3[0x1],_0x1131d8[_0x43fff(0x241)]??_0x29d121[_0x43fff(0x241)]));else _0x36463b(_0x29d121);return;}if(_0x31462c===_0x43fff(0x356)){const _0x174caa=_0x29b9e3[0x1];if(!_0x174caa){console[_0x43fff(0x22d)](_0x361f76(_0x2b646b[_0x43fff(0x2a5)],_0x43fff(0x268)));return;}try{_0x4d8581['env'](_0x174caa),_0x29d121['env']=_0x174caa,_0x50c570?.[_0x43fff(0x339)](_0x254f87(_0x29d121)),console[_0x43fff(0x22d)]('\x0a\x20\x20'+_0x361f76(_0x2b646b['green'],'✓')+_0x43fff(0x1bc)+_0x361f76(_0x2b646b['bold']+_0x2b646b[_0x43fff(0x24e)],_0x174caa)+'\x0a');}catch{console[_0x43fff(0x22d)](_0x43fff(0x1d2)+_0x361f76(_0x2b646b[_0x43fff(0x2a5)],'✗')+_0x43fff(0x269)+_0x361f76(_0x2b646b[_0x43fff(0x266)],_0x174caa)+'\x20not\x20found'+_0x361f76(_0x2b646b[_0x43fff(0x330)],_0x43fff(0x3fc)));}return;}if(_0x31462c===_0x43fff(0x39e)){const _0x5311ee=[..._0x4d8581[_0x43fff(0x322)][_0x43fff(0x468)]()]['filter'](_0x28f424=>!_0x28f424[_0x43fff(0x392)]('~'));console['log']('');for(const _0x38def6 of _0x5311ee){const _0x571c79=_0x38def6===_0x29d121['env'];console[_0x43fff(0x22d)]('\x20\x20'+(_0x571c79?_0x361f76(_0x2b646b[_0x43fff(0x33b)],'●'):_0x361f76(_0x2b646b[_0x43fff(0x330)],'○'))+'\x20\x20'+(_0x571c79?_0x361f76(_0x2b646b['bold']+_0x2b646b[_0x43fff(0x24e)],_0x38def6):_0x361f76(_0x2b646b[_0x43fff(0x330)],_0x38def6)));}console['log']('\x0a\x20\x20'+_0x361f76(_0x2b646b[_0x43fff(0x330)],'active:')+'\x20'+_0x361f76(_0x2b646b[_0x43fff(0x24e)],_0x29d121[_0x43fff(0x241)])),console[_0x43fff(0x22d)]('');return;}if(_0x31462c===_0x43fff(0x2eb)){const _0x1d1bcc=[..._0x4d8581['_envs']['values']()][_0x43fff(0x256)](_0x4d029b=>!_0x4d029b['name'][_0x43fff(0x392)]('~'));console['log']('');const _0x3c4920=Math[_0x43fff(0x187)](..._0x1d1bcc[_0x43fff(0x318)](_0x207c5f=>_0x207c5f['name']['length']));for(const _0x460c1d of _0x1d1bcc){const _0x5e1fb5=_0x460c1d['name']===_0x29d121[_0x43fff(0x241)],_0x78cd04=_0x5e1fb5?_0x361f76(_0x2b646b[_0x43fff(0x33b)],'●'):_0x361f76(_0x2b646b[_0x43fff(0x330)],'○'),_0x2ac360=_0x5e1fb5?_0x361f76(_0x2b646b['bold']+_0x2b646b[_0x43fff(0x24e)],_0x460c1d[_0x43fff(0x282)][_0x43fff(0x23f)](_0x3c4920)):_0x361f76(_0x2b646b['dim'],_0x460c1d[_0x43fff(0x282)]['padEnd'](_0x3c4920)),_0x2c31ac=[..._0x460c1d['typeSubDbs'][_0x43fff(0x468)]()][_0x43fff(0x256)](_0x469d58=>!_0x469d58[_0x43fff(0x392)]('~')),_0x2958d5=_0x2c31ac[_0x43fff(0x2ec)]?_0x361f76(_0x2b646b[_0x43fff(0x330)],_0x2c31ac['slice'](0x0,0x5)[_0x43fff(0x1bd)](',\x20')+(_0x2c31ac[_0x43fff(0x2ec)]>0x5?_0x43fff(0x1f6)+(_0x2c31ac['length']-0x5)+'\x20more':'')):_0x361f76(_0x2b646b[_0x43fff(0x330)],'(no\x20types)');console['log']('\x20\x20'+_0x78cd04+'\x20\x20'+_0x2ac360+'\x20\x20'+_0x2958d5);}console[_0x43fff(0x22d)]('');return;}if(_0x31462c==='TYPES'){const _0x2be7f4=_0x1131d8['env']??_0x29b9e3[0x1]??_0x29d121[_0x43fff(0x241)];try{const _0x2fe993=_0x4d8581[_0x43fff(0x241)](_0x2be7f4),_0x4d95ad=[..._0x2fe993[_0x43fff(0x458)]['keys']()][_0x43fff(0x256)](_0xe5407=>!_0xe5407['startsWith']('~'))['sort']();console[_0x43fff(0x22d)](_0x43fff(0x1d2)+_0x361f76(_0x2b646b[_0x43fff(0x330)],_0x4d95ad[_0x43fff(0x2ec)]+_0x43fff(0x405)+(_0x4d95ad[_0x43fff(0x2ec)]!==0x1?'s':'')+_0x43fff(0x280)+_0x2be7f4));for(const _0x4c1e30 of _0x4d95ad){const _0xe8b83f=_0x2fe993[_0x43fff(0x458)][_0x43fff(0x3ac)](_0x4c1e30),_0x3f6f13=_0xe8b83f?.[_0x43fff(0x3a9)]?.[_0x43fff(0x246)]?.()??0x0,_0x330e57=_0x361f76(_0x2b646b[_0x43fff(0x266)]+_0x2b646b[_0x43fff(0x24e)],_0x4c1e30[_0x43fff(0x23f)](0x1c));console[_0x43fff(0x22d)]('\x20\x20\x20\x20'+_0x330e57+'\x20\x20'+_0x361f76(_0x2b646b['magenta'],String(_0x3f6f13)[_0x43fff(0x230)](0x6))+'\x20'+_0x361f76(_0x2b646b['dim'],_0x43fff(0x3e5)));}console[_0x43fff(0x22d)]('');}catch(_0x3b417c){console[_0x43fff(0x447)](_0x361f76(_0x2b646b[_0x43fff(0x2a5)],_0x43fff(0x1d2)+_0x3b417c[_0x43fff(0x403)]+'\x0a'));}return;}if(_0x31462c===_0x43fff(0x3cb)){_0x2fdd60(_0x4d8581,_0x29b9e3[_0x43fff(0x3db)](0x1)[_0x43fff(0x1bd)]('\x20'));return;}if(_0x31462c===_0x43fff(0x2c8)){const _0x40d308=(_0x29b9e3[0x1]??'')[_0x43fff(0x2e6)]();if(!_0x40d308||_0x40d308==='on')_0x102fb9[_0x43fff(0x3a4)]=!![],_0x102fb9[_0x43fff(0x3ed)]=_0x43fff(0x17c),console['log'](_0x43fff(0x1d2)+_0x361f76(_0x2b646b[_0x43fff(0x33b)],'✓')+_0x43fff(0x3a6)+_0x361f76(_0x2b646b['dim'],_0x43fff(0x47e))+'\x0a');else{if(_0x40d308===_0x43fff(0x1dd))_0x102fb9[_0x43fff(0x3a4)]=![],console[_0x43fff(0x22d)](_0x43fff(0x1d2)+_0x361f76(_0x2b646b[_0x43fff(0x1cc)],'○')+_0x43fff(0x3dc));else _0x646232[_0x40d308]!==undefined?(_0x102fb9['enabled']=!![],_0x102fb9[_0x43fff(0x3ed)]=_0x40d308,console[_0x43fff(0x22d)](_0x43fff(0x1d2)+_0x361f76(_0x2b646b['green'],'✓')+'\x20log\x20level:\x20'+_0x361f76(_0x2b646b[_0x43fff(0x266)],_0x40d308)+'\x0a')):console['error'](_0x361f76(_0x2b646b[_0x43fff(0x2a5)],_0x43fff(0x2d9)));}return;}if(_0x31462c===_0x43fff(0x435)||_0x31462c===_0x43fff(0x27e)){await _0x119754(_0x4d8581,0x0);return;}if(_0x31462c===_0x43fff(0x44e)){const _0x295308=_0x43fff(0x2c0)+_0x49891d[_0x43fff(0x2e0)]+_0x43fff(0x209),_0x9c9601=process[_0x43fff(0x21f)]===_0x43fff(0x1e3)?_0x43fff(0x344)+_0x295308:process['platform']===_0x43fff(0x34c)?_0x43fff(0x2f9)+_0x295308:_0x43fff(0x3ff)+_0x295308;require$$4['exec'](_0x9c9601),console[_0x43fff(0x22d)]('\x0a\x20\x20'+_0x361f76(_0x2b646b[_0x43fff(0x33b)],'✓')+_0x43fff(0x314)+_0x361f76(_0x2b646b[_0x43fff(0x24e)],_0x295308)+'\x0a');return;}let _0x5aaa33,_0x3b0988,_0x22c975;if(_0x451ede[_0x43fff(0x22c)](_0x31462c)){_0x5aaa33=_0x31462c,_0x3b0988=_0x29b9e3[0x1],_0x22c975=_0x29b9e3[_0x43fff(0x3db)](0x2);if(!_0x3b0988){console[_0x43fff(0x447)](_0x361f76(_0x2b646b[_0x43fff(0x2a5)],_0x43fff(0x17d)+_0x45b123+'\x20<path>\x20[json-body]'));return;}}else _0x5aaa33=null,_0x3b0988=_0x29b9e3[0x0],_0x22c975=_0x29b9e3[_0x43fff(0x3db)](0x1);const _0x55f79f=_0x1131d8[_0x43fff(0x241)]??_0x29d121[_0x43fff(0x241)],_0x4f3364=_0x8224f1(_0x3b0988,_0x55f79f);if(_0x1131d8['help']){_0x4efcf9(_0x4d8581,_0x4f3364);return;}let _0x37840a=null;if(_0x22c975[_0x43fff(0x2ec)]){const _0x4a3246=_0x22c975['join']('\x20');try{_0x37840a=_0x45a396(_0x4a3246);}catch(_0x517a08){console[_0x43fff(0x447)](_0x361f76(_0x2b646b[_0x43fff(0x2a5)],_0x43fff(0x3c7)+_0x4a3246+_0x43fff(0x1d2)+_0x361f76(_0x2b646b[_0x43fff(0x330)],_0x517a08[_0x43fff(0x403)])+'\x0a'));return;}}if(!_0x5aaa33)_0x5aaa33=_0x37840a!==null?_0x43fff(0x2cc):'GET';try{const _0x143672=await _0x4f714e(_0x4d8581,_0x5aaa33,_0x4f3364,_0x37840a);_0x242dfb(_0x143672[_0x43fff(0x47c)],_0x143672[_0x43fff(0x3fd)]);}catch(_0x327346){console[_0x43fff(0x447)](_0x43fff(0x1d2)+_0x361f76(_0x2b646b[_0x43fff(0x2a5)],'✗')+'\x20'+_0x327346['message']+'\x0a');}}class _0x28be01{constructor(){const _0x5b8fbd=_0x49259f;this[_0x5b8fbd(0x343)]=new Map(),this[_0x5b8fbd(0x432)]=null,this[_0x5b8fbd(0x2d0)]=![];}}function _0x1edaa7(_0x30baf1){const _0x36d6e8=_0x49259f,_0x41fa3b=new _0x28be01();for(const _0xdf0426 of _0x30baf1){if(_0xdf0426['meta']?.['hidden'])continue;const _0x3ae106=_0xdf0426[_0x36d6e8(0x2d6)][_0x36d6e8(0x1ab)](/^\/api/,'')[_0x36d6e8(0x1ab)](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x3ae106)continue;let _0x38e76e=_0x41fa3b;for(const _0x54d027 of _0x3ae106[_0x36d6e8(0x46e)]('/')[_0x36d6e8(0x256)](Boolean)){if(_0x54d027[_0x36d6e8(0x392)](':')){const _0x315710=_0x54d027['slice'](0x1);if(!_0x38e76e[_0x36d6e8(0x432)])_0x38e76e[_0x36d6e8(0x432)]={'param':_0x315710,'node':new _0x28be01()};_0x38e76e=_0x38e76e['dynamic'][_0x36d6e8(0x350)];}else{if(!_0x38e76e[_0x36d6e8(0x343)][_0x36d6e8(0x22c)](_0x54d027))_0x38e76e[_0x36d6e8(0x343)]['set'](_0x54d027,new _0x28be01());_0x38e76e=_0x38e76e[_0x36d6e8(0x343)]['get'](_0x54d027);}}_0x38e76e[_0x36d6e8(0x2d0)]=!![];}return _0x41fa3b;}const _0x137bdb=new Map();function _0x57b97f(_0x18fc79,_0x3bbdfd,_0x2e0d7d){const _0x4cdc36=_0x49259f,_0x3e8307=_0x137bdb[_0x4cdc36(0x3ac)](_0x18fc79);if(_0x3e8307&&_0x3e8307[_0x4cdc36(0x315)]>Date['now']())return _0x3e8307[_0x4cdc36(0x2f2)];const _0x2bcd64=_0x2e0d7d();return _0x137bdb[_0x4cdc36(0x36f)](_0x18fc79,{'val':_0x2bcd64,'exp':Date['now']()+_0x3bbdfd}),_0x2bcd64;}function _0x54ac50(_0x199293,_0x20a4c9,_0x112be4,_0x29111c){const _0x29c139=_0x49259f,_0x6e27c3=_0x20a4c9[_0x29c139(0x241)]??_0x29111c[_0x29c139(0x241)];switch(_0x199293){case _0x29c139(0x241):return[..._0x112be4['_envs'][_0x29c139(0x468)]()][_0x29c139(0x256)](_0x151342=>!_0x151342[_0x29c139(0x392)]('~'));case _0x29c139(0x445):return _0x57b97f(_0x29c139(0x26a)+_0x6e27c3,0x7d0,()=>{const _0xe34a7a=_0x29c139;try{return[..._0x112be4['env'](_0x6e27c3)[_0xe34a7a(0x458)][_0xe34a7a(0x468)]()][_0xe34a7a(0x256)](_0xd12114=>!_0xd12114[_0xe34a7a(0x392)]('~'));}catch{return[];}});case _0x29c139(0x431):if(!_0x20a4c9[_0x29c139(0x445)])return[];return _0x57b97f(_0x29c139(0x44b)+_0x6e27c3+':'+_0x20a4c9[_0x29c139(0x445)],0x5dc,()=>{const _0x32c4e4=_0x29c139;try{const _0x20c299=_0x112be4[_0x32c4e4(0x241)](_0x6e27c3)['typeSubDbs'][_0x32c4e4(0x3ac)](_0x20a4c9[_0x32c4e4(0x445)]);if(!_0x20c299?.[_0x32c4e4(0x3a9)])return[];const _0x4a0313=[];for(const {key:_0x2c4fba}of _0x20c299[_0x32c4e4(0x3a9)][_0x32c4e4(0x263)]({'limit':0x32})){_0x4a0313[_0x32c4e4(0x397)](String(_0x2c4fba));if(_0x4a0313[_0x32c4e4(0x2ec)]>=0x32)break;}return _0x4a0313;}catch{return[];}});case'index':if(!_0x20a4c9[_0x29c139(0x445)])return[];return _0x57b97f('idx:'+_0x6e27c3+':'+_0x20a4c9[_0x29c139(0x445)],0x7d0,()=>{const _0x328818=_0x29c139;try{const _0x3fdae1=_0x112be4['env'](_0x6e27c3)[_0x328818(0x458)]['get'](_0x20a4c9[_0x328818(0x445)]);return _0x3fdae1?[..._0x3fdae1[_0x328818(0x452)]?.[_0x328818(0x468)]()??[]]:[];}catch{return[];}});case _0x29c139(0x370):if(!_0x20a4c9[_0x29c139(0x445)])return[];return _0x57b97f(_0x29c139(0x34e)+_0x6e27c3+':'+_0x20a4c9[_0x29c139(0x445)],0x7d0,()=>{const _0x183bc6=_0x29c139;try{return _0x112be4['fts']?.[_0x183bc6(0x2a1)]?.(_0x20a4c9[_0x183bc6(0x445)],_0x112be4[_0x183bc6(0x241)](_0x6e27c3))?.[_0x183bc6(0x318)](_0x549a46=>_0x549a46[_0x183bc6(0x282)])??[];}catch{return[];}});default:return[];}}function _0x4df774(_0x4940ba,_0x160615,_0x900fde,_0x12c4c2){const _0x23171a=_0x49259f,_0xc1676a=_0x4940ba[_0x23171a(0x307)]('/'),_0x146100=_0x4940ba[_0x23171a(0x46e)]('/'),_0x5ce667=_0xc1676a?_0x146100[_0x23171a(0x3db)](0x0,-0x1):_0x146100[_0x23171a(0x3db)](0x0,-0x1),_0x347e5a=_0xc1676a?'':_0x146100[_0x146100['length']-0x1];let _0x378cc9=_0x160615;const _0x418ecc={};for(const _0x380af4 of _0x5ce667){if(!_0x380af4)continue;if(_0x378cc9['children'][_0x23171a(0x22c)](_0x380af4))_0x378cc9=_0x378cc9[_0x23171a(0x343)][_0x23171a(0x3ac)](_0x380af4);else{if(_0x378cc9[_0x23171a(0x432)])_0x418ecc[_0x378cc9[_0x23171a(0x432)][_0x23171a(0x391)]]=_0x380af4,_0x378cc9=_0x378cc9[_0x23171a(0x432)]['node'];else return[];}}const _0x1dfed8=_0x5ce667['filter'](Boolean),_0x35bbef=_0x1dfed8[_0x23171a(0x2ec)]?_0x1dfed8[_0x23171a(0x1bd)]('/')+'/':'',_0xef39ae=[];for(const [_0x2a0330]of _0x378cc9[_0x23171a(0x343)]){if(_0x2a0330[_0x23171a(0x392)](_0x347e5a))_0xef39ae[_0x23171a(0x397)](_0x35bbef+_0x2a0330);}if(_0x378cc9['dynamic'])for(const _0x3e3569 of _0x54ac50(_0x378cc9['dynamic']['param'],_0x418ecc,_0x900fde,_0x12c4c2)){if(String(_0x3e3569)[_0x23171a(0x392)](_0x347e5a))_0xef39ae[_0x23171a(0x397)](_0x35bbef+_0x3e3569);}return _0xef39ae[_0x23171a(0x3db)](0x0,0x64);}const _0x160a5a=['help','use','env',_0x49259f(0x261),'types','routes',_0x49259f(0x3c0),_0x49259f(0x2e3),_0x49259f(0x3d6),_0x49259f(0x422)];function _0x5c982e(_0x45f232,_0x7aebac,_0x4cc4f7){return function _0x242120(_0x137245){const _0x36555f=_0x4358;try{const _0x2df062=_0x137245['search'](/\s[{[]/),_0x5b8c59=_0x2df062>=0x0?_0x137245[_0x36555f(0x3db)](0x0,_0x2df062):_0x137245,_0x2da07d=_0x5b8c59[_0x36555f(0x204)]();if(!_0x2da07d){const _0x15860b=[..._0x160a5a,...[..._0x45f232[_0x36555f(0x343)]['keys']()]]['slice'](0x0,0x64);return[_0x15860b,''];}const _0x1a1f62=_0x2da07d[_0x36555f(0x46e)](/\s+/),_0x5ed547=_0x1a1f62[0x0],_0x21e900=_0x5ed547[_0x36555f(0x16f)]();if(_0x1a1f62[_0x36555f(0x2ec)]===0x1){const _0x427ee9=_0x5ed547[_0x36555f(0x2e6)](),_0x3a7925=_0x160a5a[_0x36555f(0x256)](_0x1c0e33=>_0x1c0e33[_0x36555f(0x392)](_0x427ee9)),_0xeea770=_0x4df774(_0x5ed547,_0x45f232,_0x7aebac,_0x4cc4f7),_0x3ce037=[...new Set([..._0x3a7925,..._0xeea770])][_0x36555f(0x3db)](0x0,0x64);return[_0x3ce037,_0x5ed547];}if(_0x451ede[_0x36555f(0x22c)](_0x21e900)&&_0x1a1f62['length']===0x2){const _0x172594=_0x1a1f62[0x1],_0x5d2f68=_0x4df774(_0x172594,_0x45f232,_0x7aebac,_0x4cc4f7);return[_0x5d2f68[_0x36555f(0x318)](_0x1f948d=>_0x5ed547+'\x20'+_0x1f948d),_0x5ed547+'\x20'+_0x172594];}if(!_0x451ede[_0x36555f(0x22c)](_0x21e900)&&_0x1a1f62[_0x36555f(0x2ec)]>0x1){const _0x5171fb=_0x4df774(_0x5ed547,_0x45f232,_0x7aebac,_0x4cc4f7),_0x4f9cae='\x20'+_0x1a1f62['slice'](0x1)[_0x36555f(0x1bd)]('\x20');return[_0x5171fb[_0x36555f(0x318)](_0xd709ac=>_0xd709ac+_0x4f9cae),_0x5ed547+_0x4f9cae];}return[[],_0x137245];}catch{return[[],_0x137245];}};}async function _0x5d85aa(_0x5ab1de,_0x42a143){const _0x55591c=_0x49259f,_0x46343e={'enabled':!![],'level':_0x42a143[_0x55591c(0x2c6)]??_0x55591c(0x17c)},_0xe3b36b={'env':_0x55591c(0x45b)},_0x3abb24={'current':null},_0xe24ab4=_0x1edaa7(_0x5ab1de[_0x55591c(0x31e)]['listRoutes']()),_0xd9f509=_0x5c982e(_0xe24ab4,_0x5ab1de,_0xe3b36b);_0x5ab1de[_0x55591c(0x22d)][_0x55591c(0x463)](_0x5480c3=>{const _0x450b86=_0x55591c;if(!_0x46343e['enabled'])return;_0x47e208(_0x5480c3,_0x46343e[_0x450b86(0x3ed)]),_0x3abb24[_0x450b86(0x423)]?.[_0x450b86(0x3e3)](!![]);}),_0x4246e9(_0x5ab1de,_0x42a143);const _0x12caa0=_0x4d4250[_0x55591c(0x2c3)]({'input':process[_0x55591c(0x428)],'output':process[_0x55591c(0x411)],'terminal':!![],'completer':_0xd9f509,'prompt':_0x254f87(_0xe3b36b),'historySize':_0x55d8a5});try{const _0x575442=_0x3fbb02['readFileSync'](_0x4d9989,_0x55591c(0x2a4))['split']('\x0a')[_0x55591c(0x256)](Boolean);_0x12caa0[_0x55591c(0x310)]=_0x575442[_0x55591c(0x283)]()[_0x55591c(0x3db)](0x0,_0x55d8a5);}catch{}return _0x3abb24[_0x55591c(0x423)]=_0x12caa0,_0x12caa0['on']('line',async _0x39316e=>{const _0x492d40=_0x55591c;_0x12caa0[_0x492d40(0x3e6)]();try{await _0x21f17d(_0x39316e,_0x5ab1de,_0x42a143,_0x46343e,_0xe3b36b,_0x12caa0);}catch(_0x388166){console[_0x492d40(0x447)](_0x361f76(_0x2b646b[_0x492d40(0x2a5)],_0x492d40(0x302)+_0x388166[_0x492d40(0x403)]));}finally{_0x12caa0[_0x492d40(0x37a)](),_0x12caa0['prompt']();}}),_0x12caa0['on']('close',()=>{const _0x43dd41=_0x55591c;try{const _0x20bce7=[..._0x12caa0['history']][_0x43dd41(0x283)]()[_0x43dd41(0x256)](Boolean)['slice'](0x0,_0x55d8a5);_0x3fbb02[_0x43dd41(0x1ee)](_0x4d9989,_0x20bce7[_0x43dd41(0x1bd)]('\x0a')+'\x0a');}catch{}_0x119754(_0x5ab1de,0x0);}),process['on'](_0x55591c(0x312),()=>{const _0x550358=_0x55591c;if(_0x12caa0[_0x550358(0x2fb)]==='')_0x119754(_0x5ab1de,0x0);else process[_0x550358(0x411)]['write']('\x0a'),_0x12caa0[_0x550358(0x2de)](0x0),_0x12caa0[_0x550358(0x3e3)]();}),process['on'](_0x55591c(0x1a8),()=>_0x119754(_0x5ab1de,0x0)),_0x12caa0[_0x55591c(0x3e3)](),_0x12caa0;}return okdbShell={'start':_0x5d85aa,'colorLog':_0x47e208,'lenientParse':_0x45a396,'_splitLine':_0x44283a,'_formatRouteHelpLines':_0x4726d8,'_routeSummary':_0x151f06,'_routeTags':_0x1743af},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x485277=_0x4778da;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x485277(0x23c)]();}catch{}const _0x259e32=require$$1$1,_0x59926a=require$$1;function _0x118a78(_0x1b6f69){const _0x3017d3=_0x485277,_0x22f09e=_0x1b6f69[_0x3017d3(0x3db)](0x2),_0x22dc9d={};let _0x4f4179=0x0;while(_0x4f4179<_0x22f09e[_0x3017d3(0x2ec)]){const _0x5eae4a=_0x22f09e[_0x4f4179];if(_0x5eae4a===_0x3017d3(0x192)||_0x5eae4a==='-p')_0x22dc9d[_0x3017d3(0x2e0)]=Number(_0x22f09e[++_0x4f4179]);else{if(_0x5eae4a===_0x3017d3(0x3dd)||_0x5eae4a==='-d')_0x22dc9d[_0x3017d3(0x2d6)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x3c2)||_0x5eae4a==='-k')_0x22dc9d[_0x3017d3(0x431)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x2c9)||_0x5eae4a==='-c')_0x22dc9d[_0x3017d3(0x345)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x38f))_0x22dc9d[_0x3017d3(0x2c6)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x206))_0x22dc9d[_0x3017d3(0x384)]=!![];else{if(_0x5eae4a===_0x3017d3(0x18b))_0x22dc9d[_0x3017d3(0x218)]=!![];else{if(_0x5eae4a===_0x3017d3(0x170)||_0x5eae4a==='-e')_0x22dc9d[_0x3017d3(0x241)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x400))_0x22dc9d[_0x3017d3(0x40d)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x1bf))_0x22dc9d['changes']=!![];else{if(_0x5eae4a===_0x3017d3(0x42f))_0x22dc9d[_0x3017d3(0x259)]=!![];else{if(_0x5eae4a===_0x3017d3(0x27d))_0x22dc9d['drop']=!![];else{if(_0x5eae4a===_0x3017d3(0x3f6)){const _0x5d326a=[];while(_0x4f4179+0x1<_0x22f09e[_0x3017d3(0x2ec)]&&!_0x22f09e[_0x4f4179+0x1]['startsWith']('--')){_0x5d326a[_0x3017d3(0x397)](_0x22f09e[++_0x4f4179]);}_0x22dc9d['open']=_0x5d326a[_0x3017d3(0x2ec)]>0x0?_0x5d326a:!![];}else{if(_0x5eae4a===_0x3017d3(0x337))_0x22dc9d[_0x3017d3(0x231)]=!![];else{if(_0x5eae4a===_0x3017d3(0x1d8))_0x22dc9d[_0x3017d3(0x282)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x1d0))_0x22dc9d[_0x3017d3(0x2b4)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x3a7))_0x22dc9d[_0x3017d3(0x1d1)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x1f1))_0x22dc9d[_0x3017d3(0x244)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x22f))_0x22dc9d[_0x3017d3(0x2e4)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a==='--ttl')_0x22dc9d['ttl']=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a==='--token')_0x22dc9d[_0x3017d3(0x3df)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x25b)||_0x5eae4a==='-u')_0x22dc9d[_0x3017d3(0x433)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x224))_0x22dc9d[_0x3017d3(0x329)]=_0x22f09e[++_0x4f4179];else{if(_0x5eae4a===_0x3017d3(0x171)||_0x5eae4a==='-v'){const _0x50c79c=require$$2;console[_0x3017d3(0x22d)](_0x50c79c[_0x3017d3(0x3e1)]),process['exit'](0x0);}else(_0x5eae4a===_0x3017d3(0x367)||_0x5eae4a==='-h')&&(_0x3f38d8(),process[_0x3017d3(0x3d6)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x4f4179++;}return _0x22dc9d;}function _0x3f38d8(){const _0x590485=_0x485277;console[_0x590485(0x22d)](_0x590485(0x44f));}const _0x34236a=new Set([_0x485277(0x2af),'info',_0x485277(0x1cf),_0x485277(0x447)]);function _0x4715b7(_0x598688){const _0x2434f3=_0x485277,_0x1e1327=_0x598688['config']?_0x259e32[_0x2434f3(0x193)](_0x598688['config']):_0x259e32[_0x2434f3(0x193)]('.kdbconfig');let _0x513dee={};if(_0x59926a[_0x2434f3(0x2be)](_0x1e1327))try{const _0x3a404d=_0x59926a['readFileSync'](_0x1e1327,_0x2434f3(0x2a4))[_0x2434f3(0x1ab)](/^\uFEFF/,'');_0x513dee=JSON[_0x2434f3(0x211)](_0x3a404d),console[_0x2434f3(0x22d)](_0x2434f3(0x227)+_0x1e1327);}catch(_0xb2b52a){console[_0x2434f3(0x447)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x1e1327+':\x20'+_0xb2b52a['message']),process[_0x2434f3(0x3d6)](0x1);}const _0x5988ae={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x136149={'port':_0x598688['port']??_0x513dee[_0x2434f3(0x2e0)]??_0x5988ae[_0x2434f3(0x2e0)]??0x2124,'dbPath':_0x598688[_0x2434f3(0x2d6)]??_0x513dee[_0x2434f3(0x2d6)]??_0x5988ae[_0x2434f3(0x2d6)]??_0x2434f3(0x333),'key':_0x598688[_0x2434f3(0x431)]??_0x513dee[_0x2434f3(0x431)]??_0x5988ae[_0x2434f3(0x431)]??undefined,'logLevel':_0x598688[_0x2434f3(0x2c6)]??_0x513dee[_0x2434f3(0x2c6)]??_0x5988ae[_0x2434f3(0x2c6)]??_0x2434f3(0x17c),'noRepl':_0x598688[_0x2434f3(0x384)]??_0x513dee['noRepl']??_0x5988ae[_0x2434f3(0x384)]??![],'noAdmin':_0x598688['noAdmin']??_0x513dee[_0x2434f3(0x218)]??_0x5988ae[_0x2434f3(0x218)]??![],'admin':_0x513dee[_0x2434f3(0x382)]??{},'api':_0x513dee[_0x2434f3(0x3fb)]??undefined,'auth':_0x513dee[_0x2434f3(0x1a5)]??undefined,'mcp':_0x513dee[_0x2434f3(0x294)]??undefined,'timeMachine':_0x513dee[_0x2434f3(0x47a)]!==![]?_0x513dee[_0x2434f3(0x47a)]??{}:![]};return _0x598688[_0x2434f3(0x2e3)]!==undefined&&(_0x136149[_0x2434f3(0x1a5)]=_0x136149['auth']||{},_0x136149[_0x2434f3(0x1a5)]['open']=_0x598688[_0x2434f3(0x2e3)]),_0x598688[_0x2434f3(0x231)]&&(_0x136149[_0x2434f3(0x2af)]=_0x136149[_0x2434f3(0x2af)]||{},_0x136149[_0x2434f3(0x2af)]['logRequests']=!![]),(!Number['isInteger'](_0x136149[_0x2434f3(0x2e0)])||_0x136149[_0x2434f3(0x2e0)]<0x1||_0x136149['port']>0xffff)&&(console['error'](_0x2434f3(0x25e)+_0x136149[_0x2434f3(0x2e0)]+_0x2434f3(0x334)),process[_0x2434f3(0x3d6)](0x1)),!_0x34236a['has'](_0x136149['logLevel'])&&(console['error'](_0x2434f3(0x385)+_0x136149[_0x2434f3(0x2c6)]+_0x2434f3(0x45a)),process[_0x2434f3(0x3d6)](0x1)),_0x136149;}function _0x363616(_0x5aaf35){const _0x2fca2b=_0x485277;return!!(_0x5aaf35&&typeof _0x5aaf35==='object'&&!Array[_0x2fca2b(0x2e8)](_0x5aaf35)&&Object[_0x2fca2b(0x468)](_0x5aaf35)[_0x2fca2b(0x2ec)]>0x0);}const _0x26357a=!process[_0x485277(0x411)][_0x485277(0x245)]||!!process.env.NO_COLOR;function _0x9b1277(_0x3e91c4,_0x5d5a13){return _0x26357a?_0x5d5a13:'\x1b['+_0x3e91c4+'m'+_0x5d5a13+'\x1b[0m';}function _0x20f12c(_0x3b0198){const _0x3ef884=_0x485277;if(!_0x3b0198||_0x3b0198[_0x3ef884(0x2ec)]===0x0)return;const _0x3261d3='─'[_0x3ef884(0x1a9)](0x38);process['stderr']['write']('\x0a'),process[_0x3ef884(0x1c3)][_0x3ef884(0x1c2)](_0x9b1277('33',_0x3ef884(0x378)+_0x3b0198[_0x3ef884(0x2ec)]+'\x20SECURITY\x20NOTICE'+(_0x3b0198['length']>0x1?'S':'')+'\x0a')),process[_0x3ef884(0x1c3)][_0x3ef884(0x1c2)]('\x20\x20'+_0x3261d3+'\x0a');for(const _0x30d785 of _0x3b0198){const _0x49fa28=_0x30d785['level']===_0x3ef884(0x447)?_0x9b1277('31','\x20\x20✗'):_0x9b1277('33',_0x3ef884(0x1f5));process[_0x3ef884(0x1c3)]['write'](_0x49fa28+'\x20\x20'+_0x9b1277('1',_0x30d785[_0x3ef884(0x21c)])+'\x0a'),process[_0x3ef884(0x1c3)][_0x3ef884(0x1c2)](_0x3ef884(0x326)+_0x30d785[_0x3ef884(0x403)]+'\x0a');if(_0x30d785[_0x3ef884(0x1ca)])process[_0x3ef884(0x1c3)]['write']('\x20\x20\x20\x20\x20\x20\x20'+_0x9b1277('2',_0x3ef884(0x1f4)+_0x30d785[_0x3ef884(0x1ca)])+'\x0a');process[_0x3ef884(0x1c3)][_0x3ef884(0x1c2)]('\x0a');}process[_0x3ef884(0x1c3)][_0x3ef884(0x1c2)]('\x20\x20'+_0x3261d3+'\x0a\x0a');}function _0x19a0b3(_0x3b02b8,_0x4404de){const _0x3eb82f=_0x485277,_0x2e7e51=_0x3b02b8[_0x3eb82f(0x31e)]['listen'](_0x4404de);return new Promise((_0x24e418,_0x2df638)=>{const _0x1604bb=_0x3eb82f;_0x2e7e51[_0x1604bb(0x17a)](_0x1604bb(0x365),_0x24e418),_0x2e7e51['once'](_0x1604bb(0x447),_0x2df638);});}async function _0x17810c(_0x2468c0){const _0x4174bb=_0x485277,_0x651019=require$$3;console[_0x4174bb(0x22d)](_0x4174bb(0x437));let _0x31d312=!![];const _0x3a8fc4=(_0x299d61,_0x275b7a)=>{const _0x529216=_0x4174bb;console[_0x529216(0x22d)]('\x20\x20'+(_0x299d61?'✓':'✗')+'\x20'+_0x275b7a);if(!_0x299d61)_0x31d312=![];},_0xc6c4bc=Number(process[_0x4174bb(0x3e1)]['replace']('v','')['split']('.')[0x0]);_0x3a8fc4(_0xc6c4bc>=0x12,'node\x20'+process[_0x4174bb(0x3e1)]+(_0xc6c4bc<0x12?_0x4174bb(0x1fb):''));const _0x277522=_0x259e32[_0x4174bb(0x193)](_0x2468c0[_0x4174bb(0x3a2)]);try{_0x59926a[_0x4174bb(0x413)](_0x277522,{'recursive':!![]});const _0x275901=_0x259e32[_0x4174bb(0x1bd)](_0x277522,_0x4174bb(0x2c1));_0x59926a[_0x4174bb(0x1ee)](_0x275901,''),_0x59926a[_0x4174bb(0x460)](_0x275901),_0x3a8fc4(!![],_0x4174bb(0x3b6)+_0x277522);}catch(_0xc0194c){_0x3a8fc4(![],_0x4174bb(0x1a3)+_0x277522+'\x20\x20('+_0xc0194c['message']+')');}const _0x11bbe5=await new Promise(_0x58496b=>{const _0xa214cb=_0x4174bb,_0x3d6cb1=_0x651019['createServer']();_0x3d6cb1[_0xa214cb(0x17a)]('error',()=>_0x58496b(![])),_0x3d6cb1[_0xa214cb(0x17a)](_0xa214cb(0x365),()=>{const _0x2bdad6=_0xa214cb;_0x3d6cb1[_0x2bdad6(0x305)](),_0x58496b(!![]);}),_0x3d6cb1[_0xa214cb(0x3e0)](_0x2468c0[_0xa214cb(0x2e0)],_0xa214cb(0x20c));});_0x3a8fc4(_0x11bbe5,'port\x20'+_0x2468c0[_0x4174bb(0x2e0)]+'\x20'+(_0x11bbe5?_0x4174bb(0x40a):'already\x20in\x20use'));const _0x466480=_0x259e32[_0x4174bb(0x193)](_0x4174bb(0x2f0));if(_0x59926a['existsSync'](_0x466480))try{JSON[_0x4174bb(0x211)](_0x59926a['readFileSync'](_0x466480,'utf8')[_0x4174bb(0x1ab)](/^\uFEFF/,'')),_0x3a8fc4(!![],_0x4174bb(0x36b)+_0x466480);}catch(_0x382348){_0x3a8fc4(![],_0x4174bb(0x20f)+_0x382348[_0x4174bb(0x403)]);}else _0x3a8fc4(!![],_0x4174bb(0x1fe));console['log'](''),_0x31d312?console[_0x4174bb(0x22d)](_0x4174bb(0x1c6)):(console['log'](_0x4174bb(0x21d)),process['exit'](0x1));}async function _0x5e3c5e(){const _0x563b3b=_0x485277,_0x3a97cd=_0x259e32[_0x563b3b(0x193)](_0x563b3b(0x2f0));!_0x59926a['existsSync'](_0x3a97cd)?(_0x59926a['writeFileSync'](_0x3a97cd,JSON[_0x563b3b(0x321)]({'port':0x2124,'path':'./okdb-data','logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x563b3b(0x22d)](_0x563b3b(0x2ae))):console[_0x563b3b(0x22d)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x3ebfc9=_0x259e32[_0x563b3b(0x193)](_0x563b3b(0x333));!_0x59926a['existsSync'](_0x3ebfc9)?(_0x59926a[_0x563b3b(0x413)](_0x3ebfc9,{'recursive':!![]}),console[_0x563b3b(0x22d)](_0x563b3b(0x473))):console['log'](_0x563b3b(0x2ff)),console['log'](_0x563b3b(0x380));}async function _0xff074(_0x505f84){const _0x2bc2ea=_0x485277,_0x4c739c=_0x259e32[_0x2bc2ea(0x193)](_0x505f84[_0x2bc2ea(0x3a2)]);if(!_0x59926a[_0x2bc2ea(0x2be)](_0x4c739c)){console[_0x2bc2ea(0x22d)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x4c739c+_0x2bc2ea(0x35e));return;}const _0x373d2f=require$$0$2,_0x3cd0be=_0x373d2f['createInterface']({'input':process['stdin'],'output':process[_0x2bc2ea(0x411)]}),_0x150508=await new Promise(_0x4cd486=>_0x3cd0be[_0x2bc2ea(0x1ce)](_0x2bc2ea(0x3b8)+_0x4c739c+_0x2bc2ea(0x3ca),_0x4cd486));_0x3cd0be[_0x2bc2ea(0x305)](),console[_0x2bc2ea(0x22d)]('');if(_0x150508[_0x2bc2ea(0x47b)]()[_0x2bc2ea(0x2e6)]()!==_0x2bc2ea(0x2f5)){console['log'](_0x2bc2ea(0x1ed));return;}_0x59926a[_0x2bc2ea(0x3bb)](_0x4c739c,{'recursive':!![],'force':!![]}),console[_0x2bc2ea(0x22d)](_0x2bc2ea(0x42c)+_0x4c739c+'\x20deleted');}async function _0x1518c2(_0x43e9a,_0x47176f){const _0x5c57a3=_0x485277,_0x1a3c2e=require$$5,_0x40dfbc=_0x259e32[_0x5c57a3(0x193)](_0x47176f['dbPath']);console[_0x5c57a3(0x22d)]('[okdb]\x20opening\x20'+_0x40dfbc+'…');const _0x28b5a0=new _0x1a3c2e(_0x40dfbc,_0x47176f[_0x5c57a3(0x431)]?{'encryptionKey':_0x47176f[_0x5c57a3(0x431)]}:{});await _0x28b5a0['open'](),console[_0x5c57a3(0x22d)](_0x5c57a3(0x27c)+_0x43e9a+'…');const {envs:_0x461df0}=await _0x28b5a0[_0x5c57a3(0x1ba)]['backup'](_0x43e9a);for(const _0x1e0614 of _0x461df0){const _0x3544b7=_0x1e0614[_0x5c57a3(0x455)]>0x0?'\x20\x20('+(_0x1e0614[_0x5c57a3(0x455)]/0x400/0x400)[_0x5c57a3(0x3c6)](0x2)+_0x5c57a3(0x2b3)+(_0x1e0614[_0x5c57a3(0x3d8)]/0x400/0x400)[_0x5c57a3(0x3c6)](0x2)+_0x5c57a3(0x1aa):'';console['log'](_0x5c57a3(0x3b7)+_0x1e0614[_0x5c57a3(0x282)]+_0x5c57a3(0x260)+_0x1e0614['dest']+_0x3544b7);}await _0x28b5a0[_0x5c57a3(0x305)](),console['log'](_0x5c57a3(0x448));}async function _0x5d3701(_0x4b4066,_0x26ac9b,_0x286dc3){const _0x3db5e5=_0x485277,_0x1a5095=require$$5,_0x4635bc=_0x259e32[_0x3db5e5(0x193)](_0x26ac9b[_0x3db5e5(0x3a2)]),_0x430b22=_0x286dc3[_0x3db5e5(0x241)]??_0x3db5e5(0x45b),_0x5ad496=_0x286dc3['types']?_0x286dc3[_0x3db5e5(0x40d)][_0x3db5e5(0x46e)](',')[_0x3db5e5(0x318)](_0x55415b=>_0x55415b[_0x3db5e5(0x47b)]()):null;console[_0x3db5e5(0x22d)]('[okdb]\x20opening\x20'+_0x4635bc+'…');const _0x56483b=new _0x1a5095(_0x4635bc,_0x26ac9b[_0x3db5e5(0x431)]?{'encryptionKey':_0x26ac9b[_0x3db5e5(0x431)]}:{});await _0x56483b[_0x3db5e5(0x2e3)](),console[_0x3db5e5(0x22d)]('[okdb]\x20exporting\x20env\x20\x22'+_0x430b22+_0x3db5e5(0x396)+_0x4b4066+'…');const _0x3f1d72=await _0x56483b[_0x3db5e5(0x1ba)][_0x3db5e5(0x374)](_0x4b4066,{'envName':_0x430b22,'types':_0x5ad496,'includeChanges':!!_0x286dc3[_0x3db5e5(0x453)]});console[_0x3db5e5(0x22d)](_0x3db5e5(0x31f)+_0x3f1d72[_0x3db5e5(0x40d)]+_0x3db5e5(0x327)+_0x3f1d72[_0x3db5e5(0x3e5)]+_0x3db5e5(0x2fc)+_0x3f1d72[_0x3db5e5(0x453)]);if(_0x286dc3['blobs']){const _0x594a71=_0x259e32['join'](_0x259e32[_0x3db5e5(0x33e)](_0x4b4066),_0x3db5e5(0x259));process[_0x3db5e5(0x411)]['write'](_0x3db5e5(0x18f));const {count:_0x240b25,bytes:_0xc0678a}=await _0x56483b['migrate'][_0x3db5e5(0x399)](_0x594a71);console['log']('\x0d[okdb]\x20blobs:\x20'+_0x594a71+_0x3db5e5(0x366)+_0x240b25+_0x3db5e5(0x371)+(_0x240b25!==0x1?'s':'')+',\x20'+(_0xc0678a/0x400/0x400)[_0x3db5e5(0x3c6)](0x2)+'\x20MB)');}await _0x56483b['close'](),console[_0x3db5e5(0x22d)]('[okdb]\x20export\x20complete');}async function _0x2c1ea6(_0x53128d,_0x293823,_0x16eca9){const _0x2e67c3=_0x485277,_0x26dc93=require$$5,_0x28fb0e=_0x259e32['resolve'](_0x293823[_0x2e67c3(0x3a2)]),_0x43728c=_0x16eca9[_0x2e67c3(0x241)]??null,_0x51875c=_0x16eca9['types']?_0x16eca9[_0x2e67c3(0x40d)][_0x2e67c3(0x46e)](',')[_0x2e67c3(0x318)](_0x500010=>_0x500010['trim']()):null,_0x139663=!!_0x16eca9[_0x2e67c3(0x2f4)];console['log'](_0x2e67c3(0x19f)+_0x28fb0e+'…');const _0x57ba96=new _0x26dc93(_0x28fb0e,_0x293823[_0x2e67c3(0x431)]?{'encryptionKey':_0x293823[_0x2e67c3(0x431)]}:{});await _0x57ba96[_0x2e67c3(0x2e3)](),console[_0x2e67c3(0x22d)](_0x2e67c3(0x479)+_0x53128d+'…');const _0x3ee370=await _0x57ba96[_0x2e67c3(0x1ba)]['importFromFile'](_0x53128d,{'envName':_0x43728c,'types':_0x51875c,'dropExisting':_0x139663,'includeChanges':!!_0x16eca9[_0x2e67c3(0x453)],'onProgress':({type:_0x17171c,count:_0x2dbcc1})=>{const _0x42d0b2=_0x2e67c3;process[_0x42d0b2(0x411)]['write'](_0x42d0b2(0x462)+_0x17171c+':\x20'+_0x2dbcc1+'\x20records…');}});process['stdout'][_0x2e67c3(0x1c2)]('\x0a'),console[_0x2e67c3(0x22d)]('[okdb]\x20imported\x20\x20types='+_0x3ee370[_0x2e67c3(0x40d)]+_0x2e67c3(0x327)+_0x3ee370[_0x2e67c3(0x3e5)]+_0x2e67c3(0x2fc)+_0x3ee370[_0x2e67c3(0x453)]);if(_0x16eca9[_0x2e67c3(0x259)]){const _0xb06731=_0x259e32['join'](_0x259e32[_0x2e67c3(0x33e)](_0x53128d),_0x2e67c3(0x259));if(_0x59926a['existsSync'](_0xb06731)){const {imported:_0x5adb67,skipped:_0x4b1c6a}=await _0x57ba96[_0x2e67c3(0x1ba)][_0x2e67c3(0x449)](_0xb06731);console[_0x2e67c3(0x22d)]('[okdb]\x20blobs:\x20imported='+_0x5adb67+'\x20\x20skipped='+_0x4b1c6a);}}await _0x57ba96[_0x2e67c3(0x305)](),console[_0x2e67c3(0x22d)]('[okdb]\x20import\x20complete');}async function _0x58ed62(_0x1cef68,_0x2eed83){const _0x12e699=_0x485277;_0x2eed83[_0x12e699(0x2b4)]&&!_0x2eed83['name']&&(console[_0x12e699(0x447)](_0x12e699(0x36a)),process[_0x12e699(0x3d6)](0x1));const _0x3eaab9=_0x2eed83[_0x12e699(0x244)]?_0x2eed83[_0x12e699(0x244)]['split'](',')[_0x12e699(0x318)](_0x4e22e0=>_0x4e22e0[_0x12e699(0x47b)]())[_0x12e699(0x256)](Boolean):[];let _0x2ca88a={};if(_0x2eed83['grants'])try{_0x2ca88a=JSON[_0x12e699(0x211)](_0x2eed83[_0x12e699(0x2e4)]);if(typeof _0x2ca88a!==_0x12e699(0x475)||Array[_0x12e699(0x2e8)](_0x2ca88a)||_0x2ca88a===null)throw new Error();}catch{console['error'](_0x12e699(0x456)),process[_0x12e699(0x3d6)](0x1);}const _0x3c3b73=require$$5,{randomToken:_0xc2988e,hashToken:_0x490169,hashPassword:_0x34c0a4}=requireOkdbAuthTokens(),_0x53def8=require$$0,_0x1e1b1e=_0x259e32['resolve'](_0x1cef68[_0x12e699(0x3a2)]),_0x4751dd=new _0x3c3b73(_0x1e1b1e,_0x1cef68[_0x12e699(0x431)]?{'encryptionKey':_0x1cef68[_0x12e699(0x431)]}:{});await _0x4751dd[_0x12e699(0x2e3)]();try{await _0x4751dd[_0x12e699(0x1a5)][_0x12e699(0x454)]();if(_0x2eed83[_0x12e699(0x282)]){const _0x211154=await _0x4751dd[_0x12e699(0x1a5)]['_lookupByName'](_0x2eed83['name']);_0x211154&&(console[_0x12e699(0x447)](_0x12e699(0x2cf)+_0x2eed83['name']+_0x12e699(0x1a0)),process[_0x12e699(0x3d6)](0x1));}const _0x4eedd8=_0xc2988e(0x20),_0x292dba=_0x490169(_0x4eedd8),_0x34da0c=_0x2eed83[_0x12e699(0x2b4)]?await _0x34c0a4(_0x2eed83[_0x12e699(0x2b4)]):null,_0x423b40=_0x53def8['randomUUID'](),_0x319b38={'tokenHash':_0x292dba,'name':_0x2eed83[_0x12e699(0x282)]||null,'passwordHash':_0x34da0c,'label':_0x2eed83[_0x12e699(0x1d1)]||null,'permissions':_0x3eaab9,'grants':_0x2ca88a,'createdAt':Date[_0x12e699(0x29e)](),'lastUsedAt':null},_0x25ea6d=_0x2eed83[_0x12e699(0x1da)]?{'ttl':Number(_0x2eed83[_0x12e699(0x1da)])}:undefined;await _0x4751dd['_systemEnv']['put'](_0x12e699(0x43e),_0x423b40,_0x319b38,_0x25ea6d),console[_0x12e699(0x22d)](_0x12e699(0x277)),console[_0x12e699(0x22d)](_0x12e699(0x412)+_0x423b40),console[_0x12e699(0x22d)](_0x12e699(0x45c)+(_0x2eed83[_0x12e699(0x282)]||_0x12e699(0x272))),console[_0x12e699(0x22d)](_0x12e699(0x3ba)+(_0x2eed83[_0x12e699(0x1d1)]||_0x12e699(0x272))),console['log'](_0x12e699(0x1fa)+(_0x3eaab9[_0x12e699(0x1bd)](',\x20')||_0x12e699(0x249))),console[_0x12e699(0x22d)](_0x12e699(0x2b6)),console[_0x12e699(0x22d)](_0x12e699(0x401)+_0x4eedd8+'\x0a');}finally{await _0x4751dd['close']();}}async function _0x5cdde7(_0x2c88b0){const _0x15fc40=_0x485277,_0x28e408=require$$5,_0x21ce07=_0x259e32[_0x15fc40(0x193)](_0x2c88b0['dbPath']),_0x2c5e14=new _0x28e408(_0x21ce07,_0x2c88b0[_0x15fc40(0x431)]?{'encryptionKey':_0x2c88b0[_0x15fc40(0x431)]}:{});await _0x2c5e14[_0x15fc40(0x2e3)]();try{const _0x3124a0=_0x2c5e14[_0x15fc40(0x40e)];if(!_0x3124a0||!_0x3124a0['hasType'](_0x15fc40(0x43e))){console[_0x15fc40(0x22d)](_0x15fc40(0x30a));return;}const _0x4210de=[];for(const {key:_0x458fa7,value:_0x37d7c5}of _0x3124a0[_0x15fc40(0x263)]('~tokens')){_0x4210de[_0x15fc40(0x397)]({'id':_0x458fa7,'name':_0x37d7c5['name']||_0x15fc40(0x272),'label':_0x37d7c5[_0x15fc40(0x1d1)]||_0x15fc40(0x272),'permissions':Array[_0x15fc40(0x2e8)](_0x37d7c5['permissions'])?_0x37d7c5['permissions'][_0x15fc40(0x1bd)](','):'','created':_0x37d7c5[_0x15fc40(0x176)]?new Date(_0x37d7c5[_0x15fc40(0x176)])[_0x15fc40(0x2bf)]()[_0x15fc40(0x3db)](0x0,0xa):''});}if(_0x4210de[_0x15fc40(0x2ec)]===0x0){console[_0x15fc40(0x22d)](_0x15fc40(0x30a));return;}const _0x364508=!process[_0x15fc40(0x411)][_0x15fc40(0x43c)]||process['stdout']['columns']>=0x64,_0x43c0f2=_0x364508?0x24:0xa,_0x304198=['ID'['padEnd'](_0x43c0f2),_0x15fc40(0x44c)[_0x15fc40(0x23f)](0x10),_0x15fc40(0x1e2)[_0x15fc40(0x23f)](0x14),'PERMISSIONS'[_0x15fc40(0x23f)](0x14),_0x15fc40(0x3ec)][_0x15fc40(0x1bd)]('\x20\x20');console[_0x15fc40(0x22d)]('\x0a'+_0x304198),console['log']('-'[_0x15fc40(0x1a9)](_0x304198['length']));for(const _0x31c826 of _0x4210de){const _0x5edec0=_0x364508?_0x31c826['id']:_0x31c826['id']['slice'](0x0,0x8)+'…';console['log']([_0x5edec0[_0x15fc40(0x23f)](_0x43c0f2),_0x31c826[_0x15fc40(0x282)][_0x15fc40(0x3db)](0x0,0x10)[_0x15fc40(0x23f)](0x10),_0x31c826[_0x15fc40(0x1d1)][_0x15fc40(0x3db)](0x0,0x14)[_0x15fc40(0x23f)](0x14),_0x31c826[_0x15fc40(0x244)][_0x15fc40(0x3db)](0x0,0x14)[_0x15fc40(0x23f)](0x14),_0x31c826[_0x15fc40(0x41d)]]['join']('\x20\x20'));}console[_0x15fc40(0x22d)]('');}finally{await _0x2c5e14[_0x15fc40(0x305)]();}}async function _0x441525(_0x2a7450,_0x158382){const _0x481794=_0x485277;!_0x2a7450&&(console['error'](_0x481794(0x3d1)),process[_0x481794(0x3d6)](0x1));const _0x4e13e7=require$$5,_0x59106a=_0x259e32[_0x481794(0x193)](_0x158382[_0x481794(0x3a2)]),_0x2bdd4b=new _0x4e13e7(_0x59106a,_0x158382[_0x481794(0x431)]?{'encryptionKey':_0x158382[_0x481794(0x431)]}:{});await _0x2bdd4b[_0x481794(0x2e3)]();try{const _0x2763e3=_0x2bdd4b[_0x481794(0x40e)];(!_0x2763e3||!_0x2763e3['hasType']('~tokens'))&&(console[_0x481794(0x447)](_0x481794(0x33c)+_0x2a7450+'\x22'),process[_0x481794(0x3d6)](0x1));let _0x3cd3cf=null,_0x2ca5b6=null;const _0x2c12ae=_0x2763e3['get'](_0x481794(0x43e),_0x2a7450);if(_0x2c12ae)_0x3cd3cf=_0x2a7450,_0x2ca5b6=_0x2c12ae;else{const _0x1ef5da=[];for(const {key:_0x37c51a,value:_0x5d99a9}of _0x2763e3[_0x481794(0x263)](_0x481794(0x43e))){if(_0x37c51a[_0x481794(0x392)](_0x2a7450))_0x1ef5da['push']({'key':_0x37c51a,'value':_0x5d99a9});}_0x1ef5da['length']===0x0&&(console[_0x481794(0x447)](_0x481794(0x33c)+_0x2a7450+'\x22'),process['exit'](0x1));if(_0x1ef5da[_0x481794(0x2ec)]>0x1){console[_0x481794(0x447)](_0x481794(0x278)+_0x2a7450+_0x481794(0x1cd)+_0x1ef5da[_0x481794(0x2ec)]+_0x481794(0x178));for(const _0x1bc797 of _0x1ef5da){console[_0x481794(0x447)]('\x20\x20'+_0x1bc797[_0x481794(0x431)]+_0x481794(0x1e8)+(_0x1bc797['value']['name']||'(unset)')+')');}process[_0x481794(0x3d6)](0x1);}_0x3cd3cf=_0x1ef5da[0x0][_0x481794(0x431)],_0x2ca5b6=_0x1ef5da[0x0][_0x481794(0x229)];}await _0x2763e3['remove'](_0x481794(0x43e),_0x3cd3cf),console[_0x481794(0x22d)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x3cd3cf+_0x481794(0x1e8)+(_0x2ca5b6['name']||'(unset)')+',\x20label:\x20'+(_0x2ca5b6[_0x481794(0x1d1)]||_0x481794(0x272))+')');}finally{await _0x2bdd4b[_0x481794(0x305)]();}}function _0x5606c9(_0x435cb2,_0xadc322){const _0x5f1464=_0x485277;if(!_0x435cb2[_0x5f1464(0x3a1)])return'pending';const _0xc46d15=_0x435cb2[_0x5f1464(0x38b)];if(!_0xc46d15)return _0x5f1464(0x276);if(_0xadc322>_0xc46d15)return'expired';return'active';}function _0x5c0965(_0x56b144){const _0x2c048e=_0x485277;if(!_0x56b144||typeof _0x56b144!=='object')return'';const _0x42a20e=Object[_0x2c048e(0x3f2)](_0x56b144)[_0x2c048e(0x256)](([,_0x4d5585])=>_0x4d5585)[_0x2c048e(0x318)](([_0x4d5438])=>_0x4d5438);if(_0x42a20e[_0x2c048e(0x2ec)]===0x0)return _0x2c048e(0x249);if(_0x42a20e['length']<=0x3)return _0x42a20e[_0x2c048e(0x1bd)]('\x20');return _0x42a20e['slice'](0x0,0x3)['join']('\x20')+('\x20+'+(_0x42a20e['length']-0x3));}async function _0x279d73(_0x41d7a1){const _0x138731=_0x485277,_0x122568=require$$5,_0x1d177b=requireOkdbLicenseCodec(),{_C:_0x25bff7}=requireOkdbLicense(),_0x15417c=_0x259e32[_0x138731(0x193)](_0x41d7a1[_0x138731(0x3a2)]),_0x3bae15=new _0x122568(_0x15417c,_0x41d7a1['key']?{'encryptionKey':_0x41d7a1[_0x138731(0x431)]}:{});await _0x3bae15['open']();try{const _0xc0a837=_0x3bae15[_0x138731(0x40e)],_0x460c8f=_0xc0a837?.['db']?.[_0x138731(0x3ac)]?.(_0x138731(0x1e0))??0x0,_0x435e76=[..._0x3bae15[_0x138731(0x322)][_0x138731(0x468)]()][_0x138731(0x256)](_0x4d4254=>!_0x4d4254['startsWith']('~'))[_0x138731(0x2ec)],_0x54051c=_0x3bae15[_0x138731(0x3b1)]?.['effective'];if(_0x54051c){const _0x4fa0e9=_0x54051c[_0x138731(0x215)]===!![],_0x943dc1=_0x4fa0e9?'free\x20tier':_0x3bae15['_license'][_0x138731(0x276)]?.[_0x138731(0x1e4)]||_0x138731(0x242);console[_0x138731(0x22d)](''),console[_0x138731(0x22d)](_0x138731(0x173)+_0x943dc1);const _0x3dbc0d=_0x54051c[_0x138731(0x1d3)]||{};if(_0x3dbc0d['maxWrites']){const _0xa54fee=Math[_0x138731(0x18a)](_0x460c8f/_0x3dbc0d['maxWrites']*0x64);console[_0x138731(0x22d)]('\x20\x20Writes:\x20\x20'+_0x460c8f[_0x138731(0x3b9)]()+_0x138731(0x2c4)+_0x3dbc0d['maxWrites'][_0x138731(0x3b9)]()+_0x138731(0x366)+_0xa54fee+'%)');}else console[_0x138731(0x22d)](_0x138731(0x388)+_0x460c8f[_0x138731(0x3b9)]());_0x3dbc0d['envs']?console[_0x138731(0x22d)](_0x138731(0x342)+_0x435e76+_0x138731(0x2c4)+_0x3dbc0d['envs']):console[_0x138731(0x22d)](_0x138731(0x342)+_0x435e76),_0x25bff7?.['PUB_FINGERPRINT']&&console[_0x138731(0x22d)](_0x138731(0x19b)+_0x25bff7['PUB_FINGERPRINT']+_0x138731(0x2bd));}if(!_0xc0a837||!_0xc0a837[_0x138731(0x3c5)](_0x138731(0x3c9))){console[_0x138731(0x22d)](''),console['log'](_0x138731(0x45f)),console[_0x138731(0x22d)]('');return;}const _0x42d08f=[],_0x1e9af4=Date['now'](),_0x2c28b6=_0x3bae15['id'],_0xdf3a9e=_0x138731(0x3ae);for(const {key:_0x512e5f,value:_0x5b9bbe}of _0xc0a837[_0x138731(0x263)](_0x138731(0x3c9))){const _0x21df57=_0x5b9bbe[_0x138731(0x410)]?Buffer[_0x138731(0x2a8)](_0x5b9bbe[_0x138731(0x410)],_0x138731(0x29d)):Buffer[_0x138731(0x368)](0x8);let _0x505db4='';try{_0x505db4=_0x1d177b[_0x138731(0x3cc)](_0x2c28b6,_0x21df57,_0xdf3a9e)['pin'];}catch{}_0x42d08f[_0x138731(0x397)]({'id':_0x512e5f,'licensee':_0x5b9bbe[_0x138731(0x1e4)]||'','expires':_0x5b9bbe[_0x138731(0x38b)]?new Date(_0x5b9bbe[_0x138731(0x38b)])[_0x138731(0x2bf)]()[_0x138731(0x3db)](0x0,0xa):'','features':_0x5c0965(_0x5b9bbe[_0x138731(0x1f3)]),'pin':_0x505db4,'status':_0x5606c9(_0x5b9bbe,_0x1e9af4)});}if(_0x42d08f['length']===0x0){console[_0x138731(0x22d)](''),console[_0x138731(0x22d)](_0x138731(0x45f)),console[_0x138731(0x22d)]('');return;}const _0x256e1f=['\x20\x20'+'ID'[_0x138731(0x23f)](0xe),_0x138731(0x210)['padEnd'](0xe),'EXPIRES'[_0x138731(0x23f)](0xc),_0x138731(0x291)[_0x138731(0x23f)](0x1e),_0x138731(0x470)[_0x138731(0x23f)](0xa),_0x138731(0x279)][_0x138731(0x1bd)]('\x20');console[_0x138731(0x22d)]('\x0a'+_0x256e1f);for(const _0x6174b2 of _0x42d08f){const _0x52a746=_0x6174b2['id']['slice'](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x52a746['padEnd'](0xe),_0x6174b2[_0x138731(0x1e4)][_0x138731(0x3db)](0x0,0xe)['padEnd'](0xe),_0x6174b2['expires'][_0x138731(0x23f)](0xc),_0x6174b2[_0x138731(0x1f3)][_0x138731(0x3db)](0x0,0x1e)[_0x138731(0x23f)](0x1e),_0x6174b2['pin'][_0x138731(0x23f)](0xa),_0x6174b2[_0x138731(0x47c)]]['join']('\x20'));}console['log']('');}finally{await _0x3bae15[_0x138731(0x305)]();}}async function _0xaa6d33(_0x43b9e2,_0x29c742){const _0x15e94=_0x485277,_0x30178a=require$$5,_0x1f964b=requireOkdbLicenseCodec();let _0x1dd26f=_0x43b9e2;(_0x1f964b['detectInputType'](_0x43b9e2)==='path'||_0x59926a[_0x15e94(0x2be)](_0x43b9e2)&&_0x59926a[_0x15e94(0x264)](_0x43b9e2)[_0x15e94(0x20b)]())&&(_0x1dd26f=_0x59926a[_0x15e94(0x369)](_0x43b9e2,_0x15e94(0x2a4))[_0x15e94(0x47b)]());const _0x1c32c4=_0x259e32['resolve'](_0x29c742[_0x15e94(0x3a2)]),_0x21e524=new _0x30178a(_0x1c32c4,_0x29c742[_0x15e94(0x431)]?{'encryptionKey':_0x29c742['key']}:{});await _0x21e524['open']();try{!_0x21e524[_0x15e94(0x3b1)]&&(console[_0x15e94(0x447)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x15e94(0x3d6)](0x1));let _0x3c623f;try{_0x3c623f=await _0x21e524[_0x15e94(0x3b1)]['addLicense'](_0x1dd26f);}catch(_0x16228c){console[_0x15e94(0x447)](_0x15e94(0x386)+_0x16228c['message']),process['exit'](0x1);}const _0x356a66=_0x21e524['_license'][_0x15e94(0x247)](),_0x1832b8=_0x356a66[_0x15e94(0x2c5)](_0x35ed5e=>_0x35ed5e[_0x15e94(0x476)]===_0x3c623f['id'])?.[_0x15e94(0x2f1)]||'',_0x8b2609=Object[_0x15e94(0x3f2)](_0x3c623f['features']||{})['filter'](([,_0x4ab5b4])=>_0x4ab5b4)[_0x15e94(0x318)](([_0x495c63])=>_0x495c63),_0x3d8cef=_0x3c623f[_0x15e94(0x1d3)]||{},_0x145bf3=[_0x3d8cef[_0x15e94(0x261)]?_0x15e94(0x39c)+_0x3d8cef['envs']:null,_0x3d8cef[_0x15e94(0x228)]?'types/env='+_0x3d8cef[_0x15e94(0x228)]:null,_0x3d8cef['syncPeers']?_0x15e94(0x414)+_0x3d8cef[_0x15e94(0x301)]:null,_0x3d8cef[_0x15e94(0x472)]?'writes='+_0x3d8cef[_0x15e94(0x472)][_0x15e94(0x3b9)]():null][_0x15e94(0x256)](Boolean)['join']('\x20\x20'),_0x28870d=_0x3c623f[_0x15e94(0x42e)]===_0x1f964b[_0x15e94(0x296)];console['log'](_0x15e94(0x471)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3c623f['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x3c623f[_0x15e94(0x1e4)]),console[_0x15e94(0x22d)](_0x15e94(0x28a)+new Date(_0x3c623f[_0x15e94(0x38b)])['toISOString']()[_0x15e94(0x3db)](0x0,0xa)),console['log'](_0x15e94(0x477)+(_0x8b2609[_0x15e94(0x1bd)](',\x20')||_0x15e94(0x249)));if(_0x145bf3)console[_0x15e94(0x22d)](_0x15e94(0x364)+_0x145bf3);_0x28870d?(console[_0x15e94(0x22d)](_0x15e94(0x444)),console[_0x15e94(0x22d)]('')):(console[_0x15e94(0x22d)](_0x15e94(0x222)+_0x1832b8),console[_0x15e94(0x22d)](_0x15e94(0x30b)),console[_0x15e94(0x22d)](''),console[_0x15e94(0x22d)](_0x15e94(0x34b)),console[_0x15e94(0x22d)](_0x15e94(0x250)+_0x1832b8+')\x20to\x20your\x20license\x20vendor.'),console[_0x15e94(0x22d)](_0x15e94(0x286)),console[_0x15e94(0x22d)](_0x15e94(0x37c)),console['log'](''));}finally{await _0x21e524[_0x15e94(0x305)]();}}async function _0x1917a7(_0x5cadb2,_0x54247c){const _0x3ce08e=_0x485277,_0x120fac=require$$5,_0x2dd752=_0x259e32[_0x3ce08e(0x193)](_0x54247c[_0x3ce08e(0x3a2)]),_0x26b87b=new _0x120fac(_0x2dd752,_0x54247c[_0x3ce08e(0x431)]?{'encryptionKey':_0x54247c[_0x3ce08e(0x431)]}:{});await _0x26b87b[_0x3ce08e(0x2e3)]();try{!_0x26b87b[_0x3ce08e(0x3b1)]&&(console[_0x3ce08e(0x447)](_0x3ce08e(0x2ba)),process[_0x3ce08e(0x3d6)](0x1));let _0x341e04;try{_0x341e04=await _0x26b87b[_0x3ce08e(0x3b1)][_0x3ce08e(0x306)](_0x5cadb2[_0x3ce08e(0x47b)]());}catch(_0x1abebe){console[_0x3ce08e(0x447)](_0x3ce08e(0x386)+_0x1abebe['message']),console['error'](''),console[_0x3ce08e(0x447)]('\x20\x20Common\x20causes:'),console[_0x3ce08e(0x447)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x3ce08e(0x447)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x3ce08e(0x447)](_0x3ce08e(0x394)),console[_0x3ce08e(0x447)](''),process['exit'](0x1);}console[_0x3ce08e(0x22d)](_0x3ce08e(0x1b6)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x341e04['id']),console[_0x3ce08e(0x22d)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x341e04['licensee']),console[_0x3ce08e(0x22d)](_0x3ce08e(0x28a)+new Date(_0x341e04[_0x3ce08e(0x38b)])[_0x3ce08e(0x2bf)]()['slice'](0x0,0xa)),console[_0x3ce08e(0x22d)](_0x3ce08e(0x2cd)),console[_0x3ce08e(0x22d)]('');}finally{await _0x26b87b[_0x3ce08e(0x305)]();}}async function _0x25b9d6(_0x47ff0e,_0x2f016e){const _0x2025e0=_0x485277;!_0x47ff0e&&(console['error'](_0x2025e0(0x3d9)),process['exit'](0x1));const _0x9f53b0=require$$5,_0x58ca32=requireOkdbLicenseCodec(),_0x565fef=_0x259e32[_0x2025e0(0x193)](_0x2f016e[_0x2025e0(0x3a2)]),_0x47784a=new _0x9f53b0(_0x565fef,_0x2f016e[_0x2025e0(0x431)]?{'encryptionKey':_0x2f016e['key']}:{});await _0x47784a[_0x2025e0(0x2e3)]();try{const _0x230ac1=_0x47784a[_0x2025e0(0x40e)];(!_0x230ac1||!_0x230ac1[_0x2025e0(0x3c5)](_0x2025e0(0x3c9)))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x47ff0e+'\x22'),process[_0x2025e0(0x3d6)](0x1));let _0x5c0a21=null,_0x1d3021=null;const _0x10d1d0=_0x230ac1[_0x2025e0(0x3ac)]('~licenses',_0x47ff0e);if(_0x10d1d0)_0x5c0a21=_0x47ff0e,_0x1d3021=_0x10d1d0;else{const _0x2b1875=[];for(const {key:_0x5c8346,value:_0x3d1d5a}of _0x230ac1[_0x2025e0(0x263)](_0x2025e0(0x3c9))){if(_0x5c8346[_0x2025e0(0x392)](_0x47ff0e))_0x2b1875[_0x2025e0(0x397)]({'key':_0x5c8346,'value':_0x3d1d5a});}_0x2b1875[_0x2025e0(0x2ec)]===0x0&&(console[_0x2025e0(0x447)](_0x2025e0(0x1ae)+_0x47ff0e+'\x22'),process[_0x2025e0(0x3d6)](0x1)),_0x2b1875['length']>0x1&&(console['error'](_0x2025e0(0x278)+_0x47ff0e+_0x2025e0(0x1cd)+_0x2b1875[_0x2025e0(0x2ec)]+_0x2025e0(0x2fa)),process[_0x2025e0(0x3d6)](0x1)),_0x5c0a21=_0x2b1875[0x0][_0x2025e0(0x431)],_0x1d3021=_0x2b1875[0x0][_0x2025e0(0x229)];}const _0x458b66=Date[_0x2025e0(0x29e)](),_0x5d0bd1=_0x5606c9(_0x1d3021,_0x458b66),_0x40fc20=_0x47784a['id'],_0x55ceab=_0x2025e0(0x3ae);let _0x41cb7a='';try{const _0x34c375=Buffer[_0x2025e0(0x2a8)](_0x1d3021['_licenseHash'],_0x2025e0(0x29d));_0x41cb7a=_0x58ca32[_0x2025e0(0x3cc)](_0x40fc20,_0x34c375,_0x55ceab)[_0x2025e0(0x2f1)];}catch{}const _0x48a440=_0x1d3021[_0x2025e0(0x1f3)]?Object[_0x2025e0(0x3f2)](_0x1d3021[_0x2025e0(0x1f3)])['filter'](([,_0x507897])=>_0x507897)[_0x2025e0(0x318)](([_0x8af4eb])=>_0x8af4eb):[],_0x32b37b=_0x1d3021[_0x2025e0(0x1d3)]||{},_0x37888e=_0x230ac1?.['db']?.[_0x2025e0(0x3ac)]?.('__writeCounter')??0x0,_0x4a77a7=[..._0x47784a[_0x2025e0(0x322)]['keys']()][_0x2025e0(0x256)](_0x14fc90=>!_0x14fc90['startsWith']('~'))['length'];console[_0x2025e0(0x22d)](_0x2025e0(0x186)),console[_0x2025e0(0x22d)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5c0a21),console[_0x2025e0(0x22d)](_0x2025e0(0x465)+(_0x1d3021[_0x2025e0(0x1e4)]||'')),console[_0x2025e0(0x22d)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x1d3021[_0x2025e0(0x38b)]?new Date(_0x1d3021[_0x2025e0(0x38b)])[_0x2025e0(0x2bf)]()[_0x2025e0(0x3db)](0x0,0xa):'')),console[_0x2025e0(0x22d)](_0x2025e0(0x477)+(_0x48a440[_0x2025e0(0x1bd)](',\x20')||_0x2025e0(0x249))),console[_0x2025e0(0x22d)](_0x2025e0(0x222)+_0x41cb7a),console[_0x2025e0(0x22d)](_0x2025e0(0x2d3)+_0x5d0bd1),console['log']('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x1d3021[_0x2025e0(0x1f0)])[_0x2025e0(0x2bf)]());if(_0x5d0bd1===_0x2025e0(0x276)){console['log'](''),console['log']('\x20\x20Usage:');if(_0x32b37b[_0x2025e0(0x472)]){const _0x53490c=Math['round'](_0x37888e/_0x32b37b['maxWrites']*0x64);console[_0x2025e0(0x22d)](_0x2025e0(0x346)+_0x37888e[_0x2025e0(0x3b9)]()+_0x2025e0(0x2c4)+_0x32b37b[_0x2025e0(0x472)][_0x2025e0(0x3b9)]()+_0x2025e0(0x366)+_0x53490c+'%)');}else console[_0x2025e0(0x22d)](_0x2025e0(0x346)+_0x37888e[_0x2025e0(0x3b9)]()+_0x2025e0(0x181));_0x32b37b[_0x2025e0(0x261)]?console[_0x2025e0(0x22d)](_0x2025e0(0x398)+_0x4a77a7+_0x2025e0(0x2c4)+_0x32b37b[_0x2025e0(0x261)]):console['log']('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x4a77a7+_0x2025e0(0x181));}console['log']('');}finally{await _0x47784a[_0x2025e0(0x305)]();}}async function _0x49330c(_0x1456f8,_0x5bd3af){const _0x455c48=_0x485277;!_0x1456f8&&(console[_0x455c48(0x447)](_0x455c48(0x459)),process['exit'](0x1));const _0x56bda0=require$$5,_0x4d863c=_0x259e32[_0x455c48(0x193)](_0x5bd3af[_0x455c48(0x3a2)]),_0x59a2d7=new _0x56bda0(_0x4d863c,_0x5bd3af[_0x455c48(0x431)]?{'encryptionKey':_0x5bd3af[_0x455c48(0x431)]}:{});await _0x59a2d7[_0x455c48(0x2e3)]();try{const _0x201690=_0x59a2d7[_0x455c48(0x40e)];(!_0x201690||!_0x201690[_0x455c48(0x3c5)](_0x455c48(0x3c9)))&&(console[_0x455c48(0x447)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x1456f8+'\x22'),process[_0x455c48(0x3d6)](0x1));let _0x2c5aec=null,_0x35c15f=null;const _0x1c8beb=_0x201690[_0x455c48(0x3ac)](_0x455c48(0x3c9),_0x1456f8);if(_0x1c8beb)_0x2c5aec=_0x1456f8,_0x35c15f=_0x1c8beb;else{const _0x177904=[];for(const {key:_0x4f1da4,value:_0x5c8d74}of _0x201690[_0x455c48(0x263)]('~licenses')){if(_0x4f1da4[_0x455c48(0x392)](_0x1456f8))_0x177904[_0x455c48(0x397)]({'key':_0x4f1da4,'value':_0x5c8d74});}_0x177904['length']===0x0&&(console[_0x455c48(0x447)](_0x455c48(0x1ae)+_0x1456f8+'\x22'),process[_0x455c48(0x3d6)](0x1)),_0x177904[_0x455c48(0x2ec)]>0x1&&(console[_0x455c48(0x447)](_0x455c48(0x278)+_0x1456f8+'\x22\x20matches\x20'+_0x177904['length']+_0x455c48(0x2fa)),process['exit'](0x1)),_0x2c5aec=_0x177904[0x0][_0x455c48(0x431)],_0x35c15f=_0x177904[0x0][_0x455c48(0x229)];}await _0x201690[_0x455c48(0x31b)](_0x455c48(0x3c9),_0x2c5aec),console['log']('\x20\x20✓\x20Removed\x20license\x20'+_0x2c5aec+_0x455c48(0x478)+(_0x35c15f['licensee']||_0x455c48(0x272))+')');}finally{await _0x59a2d7['close']();}}async function _0x425586(_0x3572c9,_0xbe64eb,_0xea9554){const _0x5684f3=_0x485277;!_0x3572c9&&(console[_0x5684f3(0x447)](_0x5684f3(0x2a9)),process[_0x5684f3(0x3d6)](0x1));!_0xea9554[_0x5684f3(0x3df)]&&!(_0xea9554[_0x5684f3(0x433)]&&_0xea9554[_0x5684f3(0x2b4)])&&(console[_0x5684f3(0x447)](_0x5684f3(0x295)),process[_0x5684f3(0x3d6)](0x1));const _0x1fc5cf=_0xea9554['selfAddress']||_0xbe64eb[_0x5684f3(0x202)]?.[_0x5684f3(0x3a3)];!_0x1fc5cf&&(console[_0x5684f3(0x447)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x5684f3(0x26e)+_0x5684f3(0x2b8)),process[_0x5684f3(0x3d6)](0x1));const _0x19c8ca=require$$5,_0x362391=new _0x19c8ca(_0xbe64eb[_0x5684f3(0x3a2)],{'sync':{'address':_0x1fc5cf,'auto_reconcile':![]}});await _0x362391[_0x5684f3(0x2e3)]();try{const _0x2541dd=_0x362391[_0x5684f3(0x40e)];if(_0x2541dd&&_0x2541dd[_0x5684f3(0x3c5)](_0x5684f3(0x43e))){let _0x3cecc4=![];for(const _0x40e487 of _0x2541dd[_0x5684f3(0x263)](_0x5684f3(0x43e))){_0x3cecc4=!![];break;}_0x3cecc4&&console[_0x5684f3(0x22d)]('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+_0x5684f3(0x1b5));}console[_0x5684f3(0x22d)](_0x5684f3(0x363)+_0x3572c9+'…'),await _0x362391[_0x5684f3(0x202)]['join'](_0x3572c9['replace'](/\/+$/,''),{'token':_0xea9554[_0x5684f3(0x3df)],'username':_0xea9554[_0x5684f3(0x433)],'password':_0xea9554[_0x5684f3(0x2b4)]}),console[_0x5684f3(0x22d)](_0x5684f3(0x46b)),console[_0x5684f3(0x22d)]('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x362391[_0x5684f3(0x305)]();}}async function _0x32e8dc(){const _0x21182e=_0x485277,_0x511e23=Date[_0x21182e(0x29e)](),_0x46f42c=_0x118a78(process[_0x21182e(0x2f3)]),_0x52b0eb=_0x4715b7(_0x46f42c),_0x576f81=_0x259e32[_0x21182e(0x193)](_0x52b0eb[_0x21182e(0x3a2)]);!_0x52b0eb[_0x21182e(0x384)]&&!process[_0x21182e(0x428)][_0x21182e(0x245)]&&(_0x52b0eb[_0x21182e(0x384)]=!![]);const _0x111bbd=require$$5,{start:_0x3dacc0,colorLog:_0x514646}=requireOkdbShell(),_0x1876b7={..._0x52b0eb['key']?{'encryptionKey':_0x52b0eb[_0x21182e(0x431)]}:{},..._0x52b0eb['noAdmin']?{}:_0x363616(_0x52b0eb[_0x21182e(0x382)])?{'admin':_0x52b0eb['admin']}:{},..._0x363616(_0x52b0eb['api'])?{'api':_0x52b0eb[_0x21182e(0x3fb)]}:{},..._0x363616(_0x52b0eb[_0x21182e(0x1a5)])?{'auth':_0x52b0eb[_0x21182e(0x1a5)]}:{},..._0x363616(_0x52b0eb[_0x21182e(0x294)])?{'mcp':_0x52b0eb['mcp']}:{},..._0x52b0eb['timeMachine']!==![]?{'timeMachine':_0x52b0eb[_0x21182e(0x47a)]}:{}},_0x3dd743=new _0x111bbd(_0x576f81,_0x1876b7);_0x3dd743[_0x21182e(0x22d)][_0x21182e(0x3a5)]?.();const _0x1d0afc=_0x3dd743[_0x21182e(0x22d)][_0x21182e(0x463)](_0x5057fc=>_0x514646(_0x5057fc,_0x52b0eb['logLevel']));if(_0x52b0eb[_0x21182e(0x384)])process[_0x21182e(0x411)][_0x21182e(0x1c2)](_0x21182e(0x3be));await _0x3dd743['open']();if(_0x52b0eb[_0x21182e(0x384)])process[_0x21182e(0x411)][_0x21182e(0x1c2)](_0x21182e(0x2b2));try{await _0x19a0b3(_0x3dd743,_0x52b0eb[_0x21182e(0x2e0)]);}catch(_0xe8f389){_0xe8f389[_0x21182e(0x37e)]===_0x21182e(0x2d1)&&(console['error']('[okdb]\x20port\x20'+_0x52b0eb['port']+_0x21182e(0x182)),process['exit'](0x1));throw _0xe8f389;}if(_0x52b0eb['noRepl'])process[_0x21182e(0x411)][_0x21182e(0x1c2)](_0x21182e(0x18e)+_0x52b0eb[_0x21182e(0x2e0)]+'\x0a');if(!_0x52b0eb[_0x21182e(0x384)])_0x3dd743[_0x21182e(0x22d)][_0x21182e(0x3a5)]?.(),_0x1d0afc?.(),_0x20f12c(_0x3dd743[_0x21182e(0x1a5)]?.[_0x21182e(0x2c7)]?.()??[]),await _0x3dacc0(_0x3dd743,_0x52b0eb);else{const _0x139cdc=_0x259e32[_0x21182e(0x1bd)](_0x576f81,'okdb.pid');try{_0x59926a['writeFileSync'](_0x139cdc,String(process['pid']));}catch{}const _0x15f8c9=Date[_0x21182e(0x29e)]()-_0x511e23;console[_0x21182e(0x22d)](''),console[_0x21182e(0x22d)](_0x21182e(0x1e6)),console[_0x21182e(0x22d)]('\x20\x20\x20\x20port:\x20\x20'+_0x52b0eb[_0x21182e(0x2e0)]),console[_0x21182e(0x22d)](_0x21182e(0x30f)+_0x576f81),console[_0x21182e(0x22d)](_0x21182e(0x1d7)+_0x3dd743['id']);{const _0x6562f9=_0x3dd743[_0x21182e(0x40e)]?.['db']?.[_0x21182e(0x3ac)]?.(_0x21182e(0x1e0))??0x0,_0x4d0c87=[..._0x3dd743[_0x21182e(0x322)][_0x21182e(0x468)]()][_0x21182e(0x256)](_0x375fbf=>!_0x375fbf['startsWith']('~'))[_0x21182e(0x2ec)];if(_0x3dd743[_0x21182e(0x3b1)]?.[_0x21182e(0x276)]?.[_0x21182e(0x42e)]===0x1){const _0x324609=Math['ceil']((_0x3dd743[_0x21182e(0x3b1)]['active'][_0x21182e(0x38b)]-Date[_0x21182e(0x29e)]())/0x5265c00);console[_0x21182e(0x22d)](_0x21182e(0x226)+_0x3dd743[_0x21182e(0x3b1)][_0x21182e(0x276)][_0x21182e(0x1e4)]+_0x21182e(0x3f8)+_0x324609+_0x21182e(0x17f));}else{if(_0x3dd743[_0x21182e(0x3b1)]?.['active']){const _0x50b4e8=_0x3dd743[_0x21182e(0x3b1)][_0x21182e(0x276)];console[_0x21182e(0x22d)]('\x20\x20\x20\x20license:\x20'+_0x50b4e8[_0x21182e(0x1e4)]+'\x20(expires\x20'+new Date(_0x50b4e8[_0x21182e(0x38b)])[_0x21182e(0x2bf)]()[_0x21182e(0x3db)](0x0,0xa)+')');const _0x27f422=_0x50b4e8[_0x21182e(0x1d3)]||{};if(_0x27f422[_0x21182e(0x472)]){const _0x160728=Math[_0x21182e(0x18a)](_0x6562f9/_0x27f422[_0x21182e(0x472)]*0x64);console[_0x21182e(0x22d)](_0x21182e(0x313)+_0x6562f9[_0x21182e(0x3b9)]()+_0x21182e(0x2c4)+_0x27f422[_0x21182e(0x472)][_0x21182e(0x3b9)]()+_0x21182e(0x2bc)+_0x160728+_0x21182e(0x3ef)+_0x4d0c87+(_0x27f422[_0x21182e(0x261)]?'/'+_0x27f422[_0x21182e(0x261)]:'')+_0x21182e(0x3bf)+(_0x4d0c87===0x1?'':'s'));}}else{if(_0x3dd743[_0x21182e(0x3b1)]){const _0x1d09e9=_0x3dd743[_0x21182e(0x3b1)][_0x21182e(0x247)](),_0x4e4f3c=_0x1d09e9['length']?_0x1d09e9[_0x21182e(0x318)](_0x4abf8e=>_0x4abf8e[_0x21182e(0x2f1)])[_0x21182e(0x1bd)](',\x20'):_0x21182e(0x216),_0x26e9fc=_0x3dd743[_0x21182e(0x3b1)][_0x21182e(0x3e8)],_0x4afb3f=_0x26e9fc[_0x21182e(0x1d3)][_0x21182e(0x472)]?Math[_0x21182e(0x18a)](_0x6562f9/_0x26e9fc[_0x21182e(0x1d3)][_0x21182e(0x472)]*0x64):0x0;console[_0x21182e(0x22d)](_0x21182e(0x213)),console[_0x21182e(0x22d)](_0x21182e(0x313)+_0x6562f9['toLocaleString']()+_0x21182e(0x2c4)+_0x26e9fc['limits'][_0x21182e(0x472)][_0x21182e(0x3b9)]()+_0x21182e(0x2bc)+_0x4afb3f+'%),\x20'+_0x4d0c87+_0x21182e(0x2c4)+_0x26e9fc[_0x21182e(0x1d3)][_0x21182e(0x261)]+_0x21182e(0x3d0)),console[_0x21182e(0x22d)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x4e4f3c);}}}}console['log'](_0x21182e(0x37b)+_0x52b0eb[_0x21182e(0x2e0)]+_0x21182e(0x429));!_0x52b0eb[_0x21182e(0x218)]&&console[_0x21182e(0x22d)](_0x21182e(0x1a4)+_0x52b0eb[_0x21182e(0x2e0)]+'/admin/index.html');console[_0x21182e(0x22d)](''),console[_0x21182e(0x22d)](_0x21182e(0x31a)+_0x15f8c9+'ms'),_0x20f12c(_0x3dd743[_0x21182e(0x1a5)]?.['getSecurityNotices']?.()??[]);async function _0x101ae7(){const _0x16c2e7=_0x21182e;process[_0x16c2e7(0x411)][_0x16c2e7(0x1c2)](_0x16c2e7(0x440));try{_0x59926a['unlinkSync'](_0x139cdc);}catch{}await _0x3dd743[_0x16c2e7(0x305)](),process[_0x16c2e7(0x3d6)](0x0);}process['on'](_0x21182e(0x312),_0x101ae7),process['on'](_0x21182e(0x1a8),_0x101ae7);}}const _0x481346=new Set([_0x485277(0x3e1),_0x485277(0x1c8),_0x485277(0x43f),_0x485277(0x35b),_0x485277(0x2fd),'import','reset','token',_0x485277(0x1bd),_0x485277(0x354)]),_0x1e41a3=process[_0x485277(0x2f3)][0x2];if(_0x1e41a3===_0x485277(0x3e1))console[_0x485277(0x22d)](require$$2[_0x485277(0x3e1)]),process[_0x485277(0x3d6)](0x0);else{if(_0x1e41a3&&_0x481346[_0x485277(0x22c)](_0x1e41a3)){const _0x230d25=process[_0x485277(0x2f3)][_0x485277(0x3db)](0x3),_0x324f65=_0x118a78([_0x485277(0x350),_0x485277(0x2f6),..._0x230d25]),_0x2c4ca2=_0x4715b7(_0x324f65),_0x3ea683=new Set([_0x485277(0x3dd),'-d','--key','-k',_0x485277(0x2c9),'-c',_0x485277(0x192),'-p',_0x485277(0x38f),'--env','-e','--types',_0x485277(0x1d8),_0x485277(0x1d0),_0x485277(0x3a7),_0x485277(0x1f1),_0x485277(0x22f),_0x485277(0x30e),_0x485277(0x3f1),_0x485277(0x25b),'-u','--address']);let _0x502a5f=null;for(let _0x564925=0x0;_0x564925<_0x230d25['length'];_0x564925++){if(_0x3ea683[_0x485277(0x22c)](_0x230d25[_0x564925])){_0x564925++;continue;}if(!_0x230d25[_0x564925][_0x485277(0x392)]('-')){_0x502a5f=_0x230d25[_0x564925];break;}}(async()=>{const _0x1ca7bf=_0x485277;if(_0x1e41a3==='token'){const _0x59a11f=process[_0x1ca7bf(0x2f3)][0x3],_0x19ddf7=process[_0x1ca7bf(0x2f3)]['slice'](0x4),_0x1ecb74=_0x118a78(['node',_0x1ca7bf(0x2f6),..._0x19ddf7]),_0x52a73c=_0x4715b7(_0x1ecb74),_0x44efd2=new Set([_0x1ca7bf(0x3dd),'-d',_0x1ca7bf(0x3c2),'-k','--config','-c',_0x1ca7bf(0x192),'-p','--name',_0x1ca7bf(0x1d0),_0x1ca7bf(0x3a7),'--permissions','--grants',_0x1ca7bf(0x30e),_0x1ca7bf(0x38f),_0x1ca7bf(0x170),'-e',_0x1ca7bf(0x400)]),_0x2caf65=[];for(let _0x19f55a=0x0;_0x19f55a<_0x19ddf7[_0x1ca7bf(0x2ec)];_0x19f55a++){if(_0x44efd2[_0x1ca7bf(0x22c)](_0x19ddf7[_0x19f55a])){_0x19f55a++;continue;}if(_0x19ddf7[_0x19f55a][_0x1ca7bf(0x392)]('-'))continue;_0x2caf65[_0x1ca7bf(0x397)](_0x19ddf7[_0x19f55a]);}switch(_0x59a11f){case _0x1ca7bf(0x221):await _0x58ed62(_0x52a73c,_0x1ecb74);break;case _0x1ca7bf(0x2a1):await _0x5cdde7(_0x52a73c);break;case _0x1ca7bf(0x34a):await _0x441525(_0x2caf65[0x0],_0x52a73c);break;default:console[_0x1ca7bf(0x447)](_0x1ca7bf(0x351)+_0x59a11f+_0x1ca7bf(0x2e2)),process[_0x1ca7bf(0x3d6)](0x1);}return;}if(_0x1e41a3===_0x1ca7bf(0x354)){const _0x586f15=requireOkdbLicenseCodec(),_0x519177=process[_0x1ca7bf(0x2f3)][_0x1ca7bf(0x3db)](0x3),_0x10343c=_0x118a78([_0x1ca7bf(0x350),_0x1ca7bf(0x2f6),..._0x519177]),_0x5b69a7=_0x4715b7(_0x10343c),_0x5ca845=new Set([_0x1ca7bf(0x3dd),'-d',_0x1ca7bf(0x3c2),'-k','--config','-c','--port','-p',_0x1ca7bf(0x38f)]),_0x2861c2=[];for(let _0x37cfe9=0x0;_0x37cfe9<_0x519177[_0x1ca7bf(0x2ec)];_0x37cfe9++){if(_0x5ca845[_0x1ca7bf(0x22c)](_0x519177[_0x37cfe9])){_0x37cfe9++;continue;}if(_0x519177[_0x37cfe9][_0x1ca7bf(0x392)]('-'))continue;_0x2861c2[_0x1ca7bf(0x397)](_0x519177[_0x37cfe9]);}const _0x3ab4ff=_0x2861c2[0x0]??null;if(_0x3ab4ff===_0x1ca7bf(0x31b))await _0x49330c(_0x2861c2[0x1],_0x5b69a7);else{if(!_0x3ab4ff)await _0x279d73(_0x5b69a7);else{let _0x45d818=_0x586f15[_0x1ca7bf(0x37f)](_0x3ab4ff);if(_0x45d818===_0x1ca7bf(0x1bb)&&_0x59926a[_0x1ca7bf(0x2be)](_0x3ab4ff))_0x45d818=_0x1ca7bf(0x2d6);if(_0x45d818===_0x1ca7bf(0x2d6))try{const _0x5bea01=_0x59926a[_0x1ca7bf(0x369)](_0x3ab4ff,_0x1ca7bf(0x2a4))[_0x1ca7bf(0x47b)](),_0x4cfce3=_0x586f15['detectInputType'](_0x5bea01);if(_0x4cfce3==='activation'){await _0x1917a7(_0x5bea01,_0x5b69a7);return;}await _0xaa6d33(_0x3ab4ff,_0x5b69a7);return;}catch(_0x28c5f4){console[_0x1ca7bf(0x447)](_0x1ca7bf(0x41c)+_0x3ab4ff+':\x20'+_0x28c5f4[_0x1ca7bf(0x403)]),process['exit'](0x1);}switch(_0x45d818){case _0x1ca7bf(0x474):await _0xaa6d33(_0x3ab4ff,_0x5b69a7);break;case _0x1ca7bf(0x3a1):await _0x1917a7(_0x3ab4ff,_0x5b69a7);break;case _0x1ca7bf(0x20d):await _0x25b9d6(_0x3ab4ff,_0x5b69a7);break;default:console[_0x1ca7bf(0x447)](_0x1ca7bf(0x205)+_0x3ab4ff+'\x22'),console[_0x1ca7bf(0x447)](''),console['error'](_0x1ca7bf(0x300)),console[_0x1ca7bf(0x447)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x1ca7bf(0x447)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x1ca7bf(0x447)](_0x1ca7bf(0x243)),console[_0x1ca7bf(0x447)](_0x1ca7bf(0x41e)),console[_0x1ca7bf(0x447)](''),console[_0x1ca7bf(0x447)](_0x1ca7bf(0x324)),process['exit'](0x1);}}}return;}switch(_0x1e41a3){case _0x1ca7bf(0x1c8):await _0x17810c(_0x2c4ca2);break;case'init':await _0x5e3c5e();break;case _0x1ca7bf(0x303):await _0xff074(_0x2c4ca2);break;case _0x1ca7bf(0x35b):await _0x1518c2(_0x502a5f??_0x259e32['resolve'](_0x1ca7bf(0x323)),_0x2c4ca2);break;case'export':await _0x5d3701(_0x502a5f??_0x259e32[_0x1ca7bf(0x193)]('./okdb-export.ndjson'),_0x2c4ca2,_0x324f65);break;case'import':await _0x2c1ea6(_0x502a5f??_0x259e32['resolve'](_0x1ca7bf(0x308)),_0x2c4ca2,_0x324f65);break;case'join':await _0x425586(_0x502a5f,_0x2c4ca2,_0x324f65);break;}})()['then'](()=>process['exit'](0x0))['catch'](_0x4f0d41=>{const _0xd8f971=_0x485277;console[_0xd8f971(0x447)]('\x0a[okdb]\x20error:\x20'+(_0x4f0d41[_0xd8f971(0x403)]||_0x4f0d41)+'\x0a'),process[_0xd8f971(0x3d6)](0x1);});}else _0x32e8dc()[_0x485277(0x2d7)](_0x53c1c5=>{const _0x239a61=_0x485277;console['error'](_0x239a61(0x3f7)),console[_0x239a61(0x447)](_0x53c1c5[_0x239a61(0x200)]||_0x53c1c5),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x4778da(0x3f0)]=okdb;