@lovrabet/rabetbase-cli 2.5.5-beta.1 → 2.5.5-beta.2

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 (363) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +1 -1
  358. package/skills/rabetbase-page-generation/SKILL.md +13 -9
  359. package/skills/rabetbase-page-generation/references/component-baseline.md +2 -2
  360. package/skills/rabetbase-page-generation/references/generation.md +64 -15
  361. package/skills/rabetbase-page-generation/templates/onepage/build.mjs +39 -54
  362. package/skills/rabetbase-page-generation/templates/onepage/list/index.jsx +6 -2
  363. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a288_0x1f47a7=a288_0x5d1a;(function(_0x2edf7a,_0x382b03){const _0x2b9b0d=a288_0x5d1a,_0x24ea4e=_0x2edf7a();while(!![]){try{const _0x36a72b=-parseInt(_0x2b9b0d(0x172))/0x1+-parseInt(_0x2b9b0d(0x168))/0x2*(-parseInt(_0x2b9b0d(0x147))/0x3)+parseInt(_0x2b9b0d(0x177))/0x4+parseInt(_0x2b9b0d(0x16a))/0x5+parseInt(_0x2b9b0d(0x158))/0x6*(-parseInt(_0x2b9b0d(0x161))/0x7)+parseInt(_0x2b9b0d(0x16b))/0x8*(parseInt(_0x2b9b0d(0x17b))/0x9)+parseInt(_0x2b9b0d(0x17a))/0xa;if(_0x36a72b===_0x382b03)break;else _0x24ea4e['push'](_0x24ea4e['shift']());}catch(_0x4ae71f){_0x24ea4e['push'](_0x24ea4e['shift']());}}}(a288_0x3f8f,0xf196f));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a288_0x1f47a7(0x167);export const INSTANT_API_POLICY_FILE_NAME=a288_0x1f47a7(0x166);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x366df0,_0x5e8151,_0x295c8c){return new CliError(_0x366df0,0x1,_0x5e8151,_0x295c8c);}export function loadInstantApiPolicyLocalConfig(_0x188895,_0x57cd1c){assertSafeAppCode(_0x188895);const _0x22f60d=resolve(_0x57cd1c??findProjectRootDirectory()),_0x5c3ba5=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x188895+'/'+INSTANT_API_POLICY_FILE_NAME,_0x57e21a=resolve(_0x22f60d,INSTANT_API_POLICY_RELATIVE_ROOT,_0x188895),_0x150e68=resolve(_0x57e21a,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x22f60d,'appCode':_0x188895,'policyRoot':_0x57e21a,'policyFilePath':_0x150e68,'policyRelativePath':_0x5c3ba5};}export function createDefaultInstantApiPolicyConfig(_0x2a0dc7,_0x5bfcc7=a288_0x1f47a7(0x178)){return assertSafeAppCode(_0x2a0dc7),{'version':'2','appCode':_0x2a0dc7,'defaults':{'instantApi':_0x5bfcc7},'rules':[]};}function a288_0x5d1a(_0x20946a,_0x1d997c){_0x20946a=_0x20946a-0x13d;const _0x3f8fdc=a288_0x3f8f();let _0x5d1ad8=_0x3f8fdc[_0x20946a];return _0x5d1ad8;}export async function readInstantApiPolicyConfigFile(_0x5f4249){const _0x518085=a288_0x1f47a7;let _0x5d65f7;try{_0x5d65f7=await stat(_0x5f4249['policyFilePath']);}catch(_0x513431){throw instantApiPolicyError(_0x518085(0x155),_0x518085(0x157)+_0x5f4249['policyFilePath'],_0x518085(0x15f));}if(!_0x5d65f7[_0x518085(0x15a)]())throw instantApiPolicyError(_0x518085(0x175),_0x518085(0x163)+_0x5f4249[_0x518085(0x16f)]);if(_0x5d65f7[_0x518085(0x141)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x518085(0x153),_0x518085(0x149));let _0x24e480;try{_0x24e480=await readFile(_0x5f4249[_0x518085(0x16f)]);}catch{throw instantApiPolicyError(_0x518085(0x16c),_0x518085(0x144)+_0x5f4249[_0x518085(0x16f)]);}if(_0x24e480[_0x518085(0x140)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x518085(0x149));let _0x525bf2;try{_0x525bf2=new TextDecoder(_0x518085(0x164),{'fatal':!![],'ignoreBOM':!![]})[_0x518085(0x145)](_0x24e480);}catch{throw instantApiPolicyError(_0x518085(0x175),_0x518085(0x13d)+_0x5f4249[_0x518085(0x16f)]);}let _0x35fefe;try{_0x35fefe=JSON[_0x518085(0x15e)](_0x525bf2);}catch{throw instantApiPolicyError(_0x518085(0x150),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x5f4249[_0x518085(0x16f)]);}return assertLocalPolicyContract(_0x35fefe,_0x5f4249[_0x518085(0x14f)]);}export async function writeInstantApiPolicyConfigFile(_0x3bc0d1,_0x2bc2ef,_0x4b8db1={}){const _0x1df1f5=a288_0x1f47a7,_0x4c1794=assertLocalPolicyContract(_0x2bc2ef,_0x3bc0d1[_0x1df1f5(0x14f)]),_0x381fab=JSON['stringify'](_0x4c1794,null,0x2)+'\x0a';if(Buffer[_0x1df1f5(0x140)](_0x381fab,_0x1df1f5(0x16d))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x1df1f5(0x149));await mkdir(_0x3bc0d1[_0x1df1f5(0x170)],{'recursive':!![]});let _0x2354c5;try{_0x2354c5=await readFile(_0x3bc0d1[_0x1df1f5(0x16f)],_0x1df1f5(0x16d));}catch(_0x4eb012){if(!isMissingFile(_0x4eb012))throw instantApiPolicyError(_0x1df1f5(0x16c),_0x1df1f5(0x14b)+_0x3bc0d1[_0x1df1f5(0x16f)]);}if(_0x2354c5===_0x381fab)return{'action':_0x1df1f5(0x16e),'filePath':_0x3bc0d1[_0x1df1f5(0x16f)]};if(_0x2354c5!==undefined&&!_0x4b8db1[_0x1df1f5(0x17d)])throw instantApiPolicyError('instant_api_policy_file_exists',_0x1df1f5(0x176)+_0x3bc0d1[_0x1df1f5(0x16f)],_0x1df1f5(0x15b));if(_0x2354c5===undefined)try{return await writeFile(_0x3bc0d1['policyFilePath'],_0x381fab,{'encoding':_0x1df1f5(0x16d),'flag':'wx'}),{'action':_0x1df1f5(0x171),'filePath':_0x3bc0d1[_0x1df1f5(0x16f)]};}catch(_0x2590c1){if(!isAlreadyExists(_0x2590c1))throw instantApiPolicyError('instant_api_policy_file_unwritable','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x3bc0d1[_0x1df1f5(0x16f)]);if(!_0x4b8db1['force'])throw instantApiPolicyError(_0x1df1f5(0x151),'Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20'+_0x3bc0d1[_0x1df1f5(0x16f)],'Review\x20the\x20file\x20before\x20retrying.');}const _0x285c81=resolve(dirname(_0x3bc0d1['policyFilePath']),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+_0x1df1f5(0x14d));try{await writeFile(_0x285c81,_0x381fab,{'encoding':_0x1df1f5(0x16d),'flag':'wx'}),await rename(_0x285c81,_0x3bc0d1['policyFilePath']);}catch{await unlink(_0x285c81)['catch'](()=>undefined);throw instantApiPolicyError(_0x1df1f5(0x162),_0x1df1f5(0x154)+_0x3bc0d1['policyFilePath']);}return{'action':_0x1df1f5(0x14a),'filePath':_0x3bc0d1[_0x1df1f5(0x16f)]};}function assertSafeAppCode(_0x22946d){const _0x5cc1ae=a288_0x1f47a7,_0x5bd2db=_0x22946d[_0x5cc1ae(0x13e)]();if(!_0x5bd2db||_0x5bd2db!==_0x22946d||_0x5bd2db[_0x5cc1ae(0x146)]>0x64||_0x5bd2db==='.'||_0x5bd2db==='..'||_0x5bd2db['includes']('/')||_0x5bd2db[_0x5cc1ae(0x14e)]('\x5c')||_0x5bd2db[_0x5cc1ae(0x14e)]('\x00'))throw instantApiPolicyError(_0x5cc1ae(0x169),_0x5cc1ae(0x14c));}function a288_0x3f8f(){const _0x3d9007=['utf8','unchanged','policyFilePath','policyRoot','created','1033784EUcszv','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','version','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','2654512HpvBll','allow','rules','561200ifqoQF','436851rtqsXv','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','force','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','trim','code','byteLength','size','ENOENT','isArray','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','decode','length','1440822cthSWx','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','overwritten','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','.tmp','includes','appCode','instant_api_policy_json_invalid','instant_api_policy_file_exists','defaults','instant_api_policy_file_too_large','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_missing','Policy\x20defaults.instantApi\x20is\x20required.','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','29058TOjLAX','instant_api_policy_defaults_invalid','isFile','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','instantApi','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','parse','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','instant_api_policy_rules_invalid','1918XcmPkL','instant_api_policy_file_unwritable','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','utf-8','object','policy.json','.rabetbase/instant-api-policy','4ETandO','instant_api_policy_app_code_invalid','4952375YfoTuN','112gORgfn','instant_api_policy_file_unreadable'];a288_0x3f8f=function(){return _0x3d9007;};return a288_0x3f8f();}function assertLocalPolicyContract(_0x1d2b0d,_0x271b27){const _0x280032=a288_0x1f47a7;if(!isObject(_0x1d2b0d))throw instantApiPolicyError(_0x280032(0x150),_0x280032(0x15d));if(_0x1d2b0d[_0x280032(0x174)]!=='1'&&_0x1d2b0d[_0x280032(0x174)]!=='2')throw instantApiPolicyError('instant_api_policy_version_invalid',_0x280032(0x148),_0x280032(0x173));if(_0x1d2b0d[_0x280032(0x14f)]!==_0x271b27)throw instantApiPolicyError('instant_api_policy_app_code_mismatch','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20'+_0x271b27+'.');if(!isObject(_0x1d2b0d['defaults'])||typeof _0x1d2b0d[_0x280032(0x152)][_0x280032(0x15c)]!=='string')throw instantApiPolicyError(_0x280032(0x159),_0x280032(0x156));if(_0x1d2b0d[_0x280032(0x179)]!==undefined&&_0x1d2b0d[_0x280032(0x179)]!==null&&!Array[_0x280032(0x143)](_0x1d2b0d[_0x280032(0x179)]))throw instantApiPolicyError(_0x280032(0x160),_0x280032(0x17c));return _0x1d2b0d;}function isObject(_0x24d448){const _0x1f9a40=a288_0x1f47a7;return _0x24d448!==null&&typeof _0x24d448==='object'&&!Array[_0x1f9a40(0x143)](_0x24d448);}function isMissingFile(_0x4e2992){const _0x54905d=a288_0x1f47a7;return Boolean(_0x4e2992&&typeof _0x4e2992===_0x54905d(0x165)&&_0x4e2992[_0x54905d(0x13f)]===_0x54905d(0x142));}function isAlreadyExists(_0x57bdaa){const _0x5b62ef=a288_0x1f47a7;return Boolean(_0x57bdaa&&typeof _0x57bdaa===_0x5b62ef(0x165)&&_0x57bdaa['code']==='EEXIST');}
1
+ const a288_0x2c127d=a288_0x1490;(function(_0x544222,_0xdb8b1b){const _0x5e0c4b=a288_0x1490,_0x57f591=_0x544222();while(!![]){try{const _0x3b6b0f=-parseInt(_0x5e0c4b(0x116))/0x1*(-parseInt(_0x5e0c4b(0x100))/0x2)+parseInt(_0x5e0c4b(0x106))/0x3*(-parseInt(_0x5e0c4b(0xf9))/0x4)+parseInt(_0x5e0c4b(0x115))/0x5*(-parseInt(_0x5e0c4b(0x121))/0x6)+parseInt(_0x5e0c4b(0x113))/0x7+parseInt(_0x5e0c4b(0x10e))/0x8*(parseInt(_0x5e0c4b(0x129))/0x9)+parseInt(_0x5e0c4b(0x10f))/0xa+-parseInt(_0x5e0c4b(0x109))/0xb;if(_0x3b6b0f===_0xdb8b1b)break;else _0x57f591['push'](_0x57f591['shift']());}catch(_0x116d79){_0x57f591['push'](_0x57f591['shift']());}}}(a288_0x252f,0x899d4));import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';function a288_0x1490(_0x4ac9d7,_0x496493){_0x4ac9d7=_0x4ac9d7-0xf7;const _0x252f80=a288_0x252f();let _0x149049=_0x252f80[_0x4ac9d7];return _0x149049;}import{dirname,resolve}from'node:path';import{TextDecoder}from'node:util';import{findProjectRootDirectory}from'../../context.js';import{CliError}from'../../errors.js';export const INSTANT_API_POLICY_RELATIVE_ROOT=a288_0x2c127d(0x119);export const INSTANT_API_POLICY_FILE_NAME='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x3cb261,_0x534518,_0xe62fe8){return new CliError(_0x3cb261,0x1,_0x534518,_0xe62fe8);}function a288_0x252f(){const _0x12ecf5=['policyRoot','3865OsfZhI','356VjEfsK','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','trim','.rabetbase/instant-api-policy','Review\x20the\x20file\x20before\x20retrying.','utf-8','instant_api_policy_file_missing','parse','instant_api_policy_version_invalid','instant_api_policy_file_unwritable','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','2418DOdwaY','appCode','force','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','overwritten','instant_api_policy_file_too_large','allow','285273mhRKzj','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','instant_api_policy_defaults_invalid','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','object','created','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','size','policyFilePath','instant_api_policy_file_unreadable','unchanged','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','instant_api_policy_file_exists','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','1862516KfLbrQ','isArray','EEXIST','isFile','version','stringify','code','4026UNIxCE','instant_api_policy_app_code_mismatch','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','defaults','ENOENT','instantApi','3nGwvTV','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','18566218DbvtaJ','Policy\x20defaults.instantApi\x20is\x20required.','rules','includes','instant_api_policy_json_invalid','168YGuZFo','10867290mrVfeM','utf8','length','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','3917620WfQTpM'];a288_0x252f=function(){return _0x12ecf5;};return a288_0x252f();}export function loadInstantApiPolicyLocalConfig(_0x1be92f,_0x14ae38){assertSafeAppCode(_0x1be92f);const _0x514545=resolve(_0x14ae38??findProjectRootDirectory()),_0x48e145=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x1be92f+'/'+INSTANT_API_POLICY_FILE_NAME,_0x40b5de=resolve(_0x514545,INSTANT_API_POLICY_RELATIVE_ROOT,_0x1be92f),_0x3f3214=resolve(_0x40b5de,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x514545,'appCode':_0x1be92f,'policyRoot':_0x40b5de,'policyFilePath':_0x3f3214,'policyRelativePath':_0x48e145};}export function createDefaultInstantApiPolicyConfig(_0x6ba7cc,_0x12f685=a288_0x2c127d(0x128)){return assertSafeAppCode(_0x6ba7cc),{'version':'2','appCode':_0x6ba7cc,'defaults':{'instantApi':_0x12f685},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x492adb){const _0x2f5555=a288_0x2c127d;let _0x251d50;try{_0x251d50=await stat(_0x492adb[_0x2f5555(0x136)]);}catch(_0x5584f6){throw instantApiPolicyError(_0x2f5555(0x11c),_0x2f5555(0x131)+_0x492adb[_0x2f5555(0x136)],_0x2f5555(0x130));}if(!_0x251d50[_0x2f5555(0xfc)]())throw instantApiPolicyError(_0x2f5555(0x124),_0x2f5555(0x12c)+_0x492adb[_0x2f5555(0x136)]);if(_0x251d50[_0x2f5555(0x135)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x2f5555(0x107));let _0x9912ae;try{_0x9912ae=await readFile(_0x492adb[_0x2f5555(0x136)]);}catch{throw instantApiPolicyError(_0x2f5555(0x137),_0x2f5555(0x102)+_0x492adb[_0x2f5555(0x136)]);}if(_0x9912ae['byteLength']>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.');let _0x460761;try{_0x460761=new TextDecoder(_0x2f5555(0x11b),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x9912ae);}catch{throw instantApiPolicyError(_0x2f5555(0x124),_0x2f5555(0x108)+_0x492adb[_0x2f5555(0x136)]);}let _0x35f21e;try{_0x35f21e=JSON[_0x2f5555(0x11d)](_0x460761);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid',_0x2f5555(0x12f)+_0x492adb[_0x2f5555(0x136)]);}return assertLocalPolicyContract(_0x35f21e,_0x492adb[_0x2f5555(0x122)]);}export async function writeInstantApiPolicyConfigFile(_0x343601,_0x2ee0fa,_0x452c9b={}){const _0x14d3a5=a288_0x2c127d,_0x238c7d=assertLocalPolicyContract(_0x2ee0fa,_0x343601['appCode']),_0x3b3ea6=JSON[_0x14d3a5(0xfe)](_0x238c7d,null,0x2)+'\x0a';if(Buffer['byteLength'](_0x3b3ea6,_0x14d3a5(0x110))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x14d3a5(0x127),_0x14d3a5(0x107));await mkdir(_0x343601[_0x14d3a5(0x114)],{'recursive':!![]});let _0x3d481e;try{_0x3d481e=await readFile(_0x343601[_0x14d3a5(0x136)],_0x14d3a5(0x110));}catch(_0x34e659){if(!isMissingFile(_0x34e659))throw instantApiPolicyError(_0x14d3a5(0x137),_0x14d3a5(0x12e)+_0x343601[_0x14d3a5(0x136)]);}if(_0x3d481e===_0x3b3ea6)return{'action':_0x14d3a5(0x138),'filePath':_0x343601[_0x14d3a5(0x136)]};if(_0x3d481e!==undefined&&!_0x452c9b['force'])throw instantApiPolicyError(_0x14d3a5(0x13a),_0x14d3a5(0x117)+_0x343601[_0x14d3a5(0x136)],_0x14d3a5(0xf7));if(_0x3d481e===undefined)try{return await writeFile(_0x343601[_0x14d3a5(0x136)],_0x3b3ea6,{'encoding':'utf8','flag':'wx'}),{'action':_0x14d3a5(0x133),'filePath':_0x343601[_0x14d3a5(0x136)]};}catch(_0x481f2c){if(!isAlreadyExists(_0x481f2c))throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x14d3a5(0xf8)+_0x343601[_0x14d3a5(0x136)]);if(!_0x452c9b[_0x14d3a5(0x123)])throw instantApiPolicyError(_0x14d3a5(0x13a),_0x14d3a5(0x134)+_0x343601[_0x14d3a5(0x136)],_0x14d3a5(0x11a));}const _0x2e92a9=resolve(dirname(_0x343601[_0x14d3a5(0x136)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process['pid']+'.'+randomUUID()+'.tmp');try{await writeFile(_0x2e92a9,_0x3b3ea6,{'encoding':_0x14d3a5(0x110),'flag':'wx'}),await rename(_0x2e92a9,_0x343601['policyFilePath']);}catch{await unlink(_0x2e92a9)['catch'](()=>undefined);throw instantApiPolicyError(_0x14d3a5(0x11f),_0x14d3a5(0x120)+_0x343601[_0x14d3a5(0x136)]);}return{'action':_0x14d3a5(0x126),'filePath':_0x343601['policyFilePath']};}function assertSafeAppCode(_0x57a73f){const _0x44fee9=a288_0x2c127d,_0x166eab=_0x57a73f[_0x44fee9(0x118)]();if(!_0x166eab||_0x166eab!==_0x57a73f||_0x166eab[_0x44fee9(0x111)]>0x64||_0x166eab==='.'||_0x166eab==='..'||_0x166eab[_0x44fee9(0x10c)]('/')||_0x166eab[_0x44fee9(0x10c)]('\x5c')||_0x166eab['includes']('\x00'))throw instantApiPolicyError('instant_api_policy_app_code_invalid','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function assertLocalPolicyContract(_0x16f0bf,_0x1e19fa){const _0x527f91=a288_0x2c127d;if(!isObject(_0x16f0bf))throw instantApiPolicyError(_0x527f91(0x10d),_0x527f91(0x125));if(_0x16f0bf[_0x527f91(0xfd)]!=='1'&&_0x16f0bf[_0x527f91(0xfd)]!=='2')throw instantApiPolicyError(_0x527f91(0x11e),_0x527f91(0x12a),_0x527f91(0x112));if(_0x16f0bf[_0x527f91(0x122)]!==_0x1e19fa)throw instantApiPolicyError(_0x527f91(0x101),_0x527f91(0x139)+_0x1e19fa+'.');if(!isObject(_0x16f0bf['defaults'])||typeof _0x16f0bf[_0x527f91(0x103)][_0x527f91(0x105)]!=='string')throw instantApiPolicyError(_0x527f91(0x12b),_0x527f91(0x10a));if(_0x16f0bf[_0x527f91(0x10b)]!==undefined&&_0x16f0bf[_0x527f91(0x10b)]!==null&&!Array[_0x527f91(0xfa)](_0x16f0bf[_0x527f91(0x10b)]))throw instantApiPolicyError('instant_api_policy_rules_invalid',_0x527f91(0x12d));return _0x16f0bf;}function isObject(_0x50eb96){const _0x4c7c88=a288_0x2c127d;return _0x50eb96!==null&&typeof _0x50eb96===_0x4c7c88(0x132)&&!Array[_0x4c7c88(0xfa)](_0x50eb96);}function isMissingFile(_0x3720cb){const _0x2cc830=a288_0x2c127d;return Boolean(_0x3720cb&&typeof _0x3720cb===_0x2cc830(0x132)&&_0x3720cb[_0x2cc830(0xff)]===_0x2cc830(0x104));}function isAlreadyExists(_0x408368){const _0x33f060=a288_0x2c127d;return Boolean(_0x408368&&typeof _0x408368===_0x33f060(0x132)&&_0x408368[_0x33f060(0xff)]===_0x33f060(0xfb));}
@@ -1 +1 @@
1
- const a289_0x5679c2=a289_0x8775;(function(_0x5de85a,_0x23b53d){const _0x11d846=a289_0x8775,_0x14bc6c=_0x5de85a();while(!![]){try{const _0x561eda=-parseInt(_0x11d846(0x201))/0x1+-parseInt(_0x11d846(0x1dd))/0x2+parseInt(_0x11d846(0x1f8))/0x3*(parseInt(_0x11d846(0x1e2))/0x4)+parseInt(_0x11d846(0x1d3))/0x5*(-parseInt(_0x11d846(0x206))/0x6)+-parseInt(_0x11d846(0x1fc))/0x7+-parseInt(_0x11d846(0x1ec))/0x8+parseInt(_0x11d846(0x1f0))/0x9*(parseInt(_0x11d846(0x215))/0xa);if(_0x561eda===_0x23b53d)break;else _0x14bc6c['push'](_0x14bc6c['shift']());}catch(_0x16ab46){_0x14bc6c['push'](_0x14bc6c['shift']());}}}(a289_0x5886,0xc5569));function a289_0x5886(){const _0x26c4f5=['total','hostname','status','headers','stringify','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','no-store','any','5210110eTAdGU','isSafeInteger','name','cookie','split','tags','strategyFingerprint','content-type','trim','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','public','documentId','KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.','TimeoutError','https:','hash','number','KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','timeout','test','aborted','error','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','revision','timingsMs','application/json','61600MNgvWb','some','length','title','development','signal','chunkId','query','pathname','finalScore','410540wJMjPQ','rank','string','response','entries','888564umWoys','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','validation','Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','/knowledge/search','\x20contract.','Knowledge\x20search\x20appCode\x20is\x20required.','AbortError','profile','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','12006952MXFbaz','protocol','hits','map','81WrZwaf','authRequired','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','networkError','Knowledge\x20search\x20query\x20is\x20required.','company','topK','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','6aeXSpo','toLowerCase','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','isArray','3927161iAeeiD','Knowledge\x20search\x20cancelled.','sort','rawScore','hits[','1257122BcARJH','object','username','/v2/development/apps/','search','390dqeWax','POST','isFinite','schemaVersion','scope','text','apiError'];a289_0x5886=function(){return _0x26c4f5;};return a289_0x5886();}import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a289_0x5679c2(0x209),a289_0x5679c2(0x1ea),'total',a289_0x5679c2(0x1ee),a289_0x5679c2(0x21b),a289_0x5679c2(0x1d1)],HIT_KEYS=[a289_0x5679c2(0x220),a289_0x5679c2(0x1d0),a289_0x5679c2(0x1d9),a289_0x5679c2(0x20a),a289_0x5679c2(0x1d6),a289_0x5679c2(0x20b),'tags',a289_0x5679c2(0x1de),a289_0x5679c2(0x1ff),'finalScore','scoreKind'];export function normalizeKbServiceOrigin(_0x45e0b5){const _0x4822f4=a289_0x5679c2,_0x4557bd=()=>CliErrors['validation'](_0x4822f4(0x1e5)),_0x127022=_0x45e0b5?.[_0x4822f4(0x21d)]();if(!_0x127022||/[\u0000-\u0020\u007f]/[_0x4822f4(0x1cc)](_0x127022)||!/^https:\/\/[^/?#@\\]+\/?$/i[_0x4822f4(0x1cc)](_0x127022))throw _0x4557bd();let _0x3cfcd2;try{_0x3cfcd2=new URL(_0x127022);}catch{throw _0x4557bd();}if(_0x3cfcd2[_0x4822f4(0x1ed)]!==_0x4822f4(0x223)||!_0x3cfcd2[_0x4822f4(0x20e)]||_0x3cfcd2[_0x4822f4(0x203)]||_0x3cfcd2['password']||_0x3cfcd2[_0x4822f4(0x1db)]!=='/'||_0x3cfcd2[_0x4822f4(0x205)]||_0x3cfcd2[_0x4822f4(0x1c8)])throw _0x4557bd();return _0x3cfcd2['origin'];}export async function searchDirectKnowledge(_0x285e86){const _0x263424=a289_0x5679c2,_0x302937=_0x285e86['appCode'][_0x263424(0x21d)](),_0x5bf676=_0x285e86[_0x263424(0x1da)][_0x263424(0x21d)]();if(!_0x302937)throw CliErrors[_0x263424(0x1e4)](_0x263424(0x1e8));if(!_0x285e86[_0x263424(0x218)][_0x263424(0x21d)]())throw CliErrors[_0x263424(0x1f1)]();if(!_0x5bf676)throw CliErrors[_0x263424(0x1e4)](_0x263424(0x1f4));validateTopK(_0x285e86[_0x263424(0x1f6)]);const _0x4cecaf=normalizeKbServiceOrigin(_0x285e86['serviceUrl']),_0x44108c=AbortSignal[_0x263424(0x1cb)](0xea60),_0x778368=_0x285e86[_0x263424(0x1d8)]?AbortSignal[_0x263424(0x214)]([_0x285e86[_0x263424(0x1d8)],_0x44108c]):_0x44108c;let _0x3d9150;try{_0x3d9150=await fetch(_0x4cecaf+_0x263424(0x204)+encodeURIComponent(_0x302937)+_0x263424(0x1e6),{'method':_0x263424(0x207),'redirect':_0x263424(0x1ce),'headers':{'Content-Type':'application/json','Cookie':_0x285e86[_0x263424(0x218)],'X-Invoke-Source':'cli:rabetbase'},'body':JSON[_0x263424(0x211)]({'query':_0x5bf676,..._0x285e86['topK']!==undefined?{'topK':_0x285e86[_0x263424(0x1f6)]}:{}}),'signal':_0x778368});}catch(_0x1e6188){if(_0x285e86['signal']?.[_0x263424(0x1cd)])throw new DOMException(_0x263424(0x1fd),_0x263424(0x1e9));if(_0x1e6188 instanceof Error&&_0x1e6188[_0x263424(0x217)]==='TimeoutError')throw CliErrors[_0x263424(0x1f3)](_0x263424(0x212));throw CliErrors[_0x263424(0x1f3)](_0x263424(0x1eb));}if(_0x3d9150[_0x263424(0x20f)]===0x191)throw CliErrors[_0x263424(0x1f1)]();if(_0x3d9150[_0x263424(0x20f)]===0x1ad)throw CliErrors[_0x263424(0x20c)](_0x263424(0x1f2));if(!_0x3d9150['ok'])throw CliErrors[_0x263424(0x20c)](_0x263424(0x1cf)+_0x3d9150['status']+').');if(!hasNoStore(_0x3d9150[_0x263424(0x210)]))throw CliErrors[_0x263424(0x20c)](_0x263424(0x1ca));if(!(_0x3d9150[_0x263424(0x210)]['get'](_0x263424(0x21c))??'')[_0x263424(0x1f9)]()['includes'](_0x263424(0x1d2)))throw CliErrors[_0x263424(0x20c)](_0x263424(0x1fa));let _0x15b30a;try{_0x15b30a=await _0x3d9150['json']();}catch(_0x4d42bd){if(_0x285e86[_0x263424(0x1d8)]?.[_0x263424(0x1cd)])throw new DOMException(_0x263424(0x1fd),_0x263424(0x1e9));if(_0x44108c[_0x263424(0x1cd)]||_0x4d42bd instanceof Error&&_0x4d42bd[_0x263424(0x217)]===_0x263424(0x222))throw CliErrors[_0x263424(0x1f3)](_0x263424(0x212));throw CliErrors[_0x263424(0x20c)](_0x263424(0x21e));}try{const _0x467b04=requireExactRecord(_0x15b30a,[_0x263424(0x1ee),'strategyFingerprint',_0x263424(0x1d1)],_0x263424(0x1e0));if(!Array[_0x263424(0x1fb)](_0x467b04[_0x263424(0x1ee)]))throw invalidContract('hits');return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x263424(0x1d7),'total':_0x467b04['hits']['length'],'hits':_0x467b04[_0x263424(0x1ee)],'strategyFingerprint':_0x467b04[_0x263424(0x21b)],'timingsMs':_0x467b04['timingsMs']},_0x285e86[_0x263424(0x1f6)]??0xa);}catch(_0x3860d3){if(_0x3860d3 instanceof CliError)throw CliErrors[_0x263424(0x20c)](_0x263424(0x221));throw _0x3860d3;}}function validateTopK(_0x4e9171){const _0x2f7e2c=a289_0x5679c2;if(_0x4e9171!==undefined&&(!Number[_0x2f7e2c(0x216)](_0x4e9171)||_0x4e9171<0x1||_0x4e9171>0x32))throw CliErrors['validation'](_0x2f7e2c(0x1f7));}function hasNoStore(_0x416300){const _0x1698cb=a289_0x5679c2;return(_0x416300['get']('cache-control')??'')[_0x1698cb(0x219)](',')[_0x1698cb(0x1d4)](_0x133488=>_0x133488['trim']()[_0x1698cb(0x1f9)]()===_0x1698cb(0x213));}function parseDevelopmentSearchResponse(_0x2776d0,_0x525756){const _0x428843=a289_0x5679c2,_0x1f5a4e=requireExactRecord(_0x2776d0,RESPONSE_KEYS,'response');if(_0x1f5a4e[_0x428843(0x209)]!==0x2||_0x1f5a4e[_0x428843(0x1ea)]!=='development')throw invalidContract('profile');if(!Array['isArray'](_0x1f5a4e[_0x428843(0x1ee)])||_0x1f5a4e[_0x428843(0x1ee)][_0x428843(0x1d5)]>(_0x525756??0x32))throw invalidContract(_0x428843(0x1ee));if(typeof _0x1f5a4e[_0x428843(0x21b)]!==_0x428843(0x1df)||!/^sha256:[0-9a-f]{64}$/[_0x428843(0x1cc)](_0x1f5a4e[_0x428843(0x21b)]))throw invalidContract(_0x428843(0x21b));const _0x22db48=requireRecord(_0x1f5a4e[_0x428843(0x1d1)],_0x428843(0x1d1)),_0x4595d4={};for(const [_0x2c30cf,_0x3910dd]of Object[_0x428843(0x1e1)](_0x22db48)){if(!/^[A-Za-z][A-Za-z0-9]*$/['test'](_0x2c30cf)||typeof _0x3910dd!=='number'||!Number[_0x428843(0x208)](_0x3910dd)||_0x3910dd<0x0)throw invalidContract(_0x428843(0x1d1));_0x4595d4[_0x2c30cf]=_0x3910dd;}const _0x2c910b=_0x1f5a4e[_0x428843(0x1ee)][_0x428843(0x1ef)]((_0x5dd356,_0x488913)=>parseHit(_0x5dd356,_0x488913));if(!Number[_0x428843(0x216)](_0x1f5a4e['total'])||_0x1f5a4e[_0x428843(0x20d)]!==_0x2c910b[_0x428843(0x1d5)])throw invalidContract('total');return{'schemaVersion':_0x1f5a4e[_0x428843(0x209)],'profile':_0x1f5a4e[_0x428843(0x1ea)],'total':_0x1f5a4e[_0x428843(0x20d)],'strategyFingerprint':_0x1f5a4e[_0x428843(0x21b)],'timingsMs':_0x4595d4,'hits':_0x2c910b};}function a289_0x8775(_0x5b02d0,_0x8e59cf){_0x5b02d0=_0x5b02d0-0x1c8;const _0x58863a=a289_0x5886();let _0x877585=_0x58863a[_0x5b02d0];return _0x877585;}function parseHit(_0xc09d15,_0x475508){const _0x3debd5=a289_0x5679c2,_0x2bef6d=requireExactRecord(_0xc09d15,HIT_KEYS,_0x3debd5(0x200)+_0x475508+']'),_0x2b8aca=_0xbb9251=>{const _0x21408b=_0x3debd5,_0x6ee997=_0x2bef6d[_0xbb9251];if(typeof _0x6ee997!==_0x21408b(0x1df)||!_0x6ee997)throw invalidContract(_0xbb9251);return _0x6ee997;};if(!Number[_0x3debd5(0x216)](_0x2bef6d[_0x3debd5(0x1d0)])||_0x2bef6d[_0x3debd5(0x1d0)]<0x1)throw invalidContract(_0x3debd5(0x1d0));if(_0x2bef6d[_0x3debd5(0x20a)]!==_0x3debd5(0x21f)&&_0x2bef6d[_0x3debd5(0x20a)]!==_0x3debd5(0x1f5))throw invalidContract(_0x3debd5(0x20a));if(typeof _0x2bef6d[_0x3debd5(0x1d6)]!=='string'||typeof _0x2bef6d[_0x3debd5(0x20b)]!==_0x3debd5(0x1df))throw invalidContract(_0x3debd5(0x20b));if(!Array[_0x3debd5(0x1fb)](_0x2bef6d[_0x3debd5(0x21a)])||_0x2bef6d[_0x3debd5(0x21a)]['some'](_0x39e6ca=>typeof _0x39e6ca!==_0x3debd5(0x1df)))throw invalidContract(_0x3debd5(0x21a));if(!Number[_0x3debd5(0x216)](_0x2bef6d[_0x3debd5(0x1de)])||_0x2bef6d[_0x3debd5(0x1de)]!==_0x475508+0x1)throw invalidContract(_0x3debd5(0x1de));if(!isFiniteNumber(_0x2bef6d[_0x3debd5(0x1ff)])||!isFiniteNumber(_0x2bef6d[_0x3debd5(0x1dc)]))throw invalidContract('score');return{'documentId':_0x2b8aca(_0x3debd5(0x220)),'revision':_0x2bef6d[_0x3debd5(0x1d0)],'chunkId':_0x2b8aca(_0x3debd5(0x1d9)),'scope':_0x2bef6d[_0x3debd5(0x20a)],'title':_0x2bef6d[_0x3debd5(0x1d6)],'text':_0x2bef6d[_0x3debd5(0x20b)],'tags':[..._0x2bef6d[_0x3debd5(0x21a)]],'rank':_0x2bef6d[_0x3debd5(0x1de)],'rawScore':_0x2bef6d['rawScore'],'finalScore':_0x2bef6d[_0x3debd5(0x1dc)],'scoreKind':_0x2b8aca('scoreKind')};}function requireExactRecord(_0x32f23f,_0x4cb63a,_0x475395){const _0x2a9474=a289_0x5679c2,_0x5a8479=requireRecord(_0x32f23f,_0x475395),_0x300f0a=Object['keys'](_0x5a8479)[_0x2a9474(0x1fe)](),_0x49296a=[..._0x4cb63a][_0x2a9474(0x1fe)]();if(_0x300f0a[_0x2a9474(0x1d5)]!==_0x49296a[_0x2a9474(0x1d5)]||_0x300f0a[_0x2a9474(0x1d4)]((_0x3c1bc4,_0x430c82)=>_0x3c1bc4!==_0x49296a[_0x430c82]))throw invalidContract(_0x475395);return _0x5a8479;}function requireRecord(_0x5c8d9c,_0x3a1698){const _0x7dd147=a289_0x5679c2;if(!_0x5c8d9c||typeof _0x5c8d9c!==_0x7dd147(0x202)||Array[_0x7dd147(0x1fb)](_0x5c8d9c))throw invalidContract(_0x3a1698);return _0x5c8d9c;}function isFiniteNumber(_0x518c3f){const _0x4f8fe9=a289_0x5679c2;return typeof _0x518c3f===_0x4f8fe9(0x1c9)&&Number[_0x4f8fe9(0x208)](_0x518c3f);}function invalidContract(_0x50296b){const _0x4c8d99=a289_0x5679c2;return CliErrors['apiError'](_0x4c8d99(0x1e3)+_0x50296b+_0x4c8d99(0x1e7));}
1
+ const a289_0x1ac01b=a289_0x470b;(function(_0x155e97,_0x9c50a0){const _0x5d7f0e=a289_0x470b,_0x23419b=_0x155e97();while(!![]){try{const _0x2004cf=-parseInt(_0x5d7f0e(0x1e2))/0x1*(-parseInt(_0x5d7f0e(0x1de))/0x2)+-parseInt(_0x5d7f0e(0x19d))/0x3*(-parseInt(_0x5d7f0e(0x1c7))/0x4)+parseInt(_0x5d7f0e(0x1b2))/0x5+-parseInt(_0x5d7f0e(0x19e))/0x6+parseInt(_0x5d7f0e(0x1d1))/0x7+-parseInt(_0x5d7f0e(0x1df))/0x8+parseInt(_0x5d7f0e(0x1a4))/0x9*(-parseInt(_0x5d7f0e(0x1ab))/0xa);if(_0x2004cf===_0x9c50a0)break;else _0x23419b['push'](_0x23419b['shift']());}catch(_0x468d6e){_0x23419b['push'](_0x23419b['shift']());}}}(a289_0x209a,0x93e01));import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a289_0x1ac01b(0x1b0),a289_0x1ac01b(0x1d5),a289_0x1ac01b(0x1ad),a289_0x1ac01b(0x1d2),a289_0x1ac01b(0x197),a289_0x1ac01b(0x1b9)],HIT_KEYS=[a289_0x1ac01b(0x1c6),a289_0x1ac01b(0x1bf),a289_0x1ac01b(0x1e0),a289_0x1ac01b(0x198),a289_0x1ac01b(0x1a0),a289_0x1ac01b(0x1a8),'tags',a289_0x1ac01b(0x199),a289_0x1ac01b(0x1e7),a289_0x1ac01b(0x1c1),a289_0x1ac01b(0x1a1)];export function normalizeKbServiceOrigin(_0x310127){const _0x398a23=a289_0x1ac01b,_0x57b1fe=()=>CliErrors[_0x398a23(0x1bc)]('Invalid\x20--kb-service-url:\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.'),_0x2361d6=_0x310127?.['trim']();if(!_0x2361d6||/[\u0000-\u0020\u007f]/[_0x398a23(0x1ae)](_0x2361d6)||!/^https:\/\/[^/?#@\\]+\/?$/i['test'](_0x2361d6))throw _0x57b1fe();let _0x548519;try{_0x548519=new URL(_0x2361d6);}catch{throw _0x57b1fe();}if(_0x548519[_0x398a23(0x1c4)]!==_0x398a23(0x1da)||!_0x548519['hostname']||_0x548519[_0x398a23(0x1a7)]||_0x548519[_0x398a23(0x19f)]||_0x548519[_0x398a23(0x1bd)]!=='/'||_0x548519['search']||_0x548519[_0x398a23(0x1af)])throw _0x57b1fe();return _0x548519[_0x398a23(0x1dd)];}function a289_0x470b(_0x55e773,_0xbe1f31){_0x55e773=_0x55e773-0x193;const _0x209ac4=a289_0x209a();let _0x470bcd=_0x209ac4[_0x55e773];return _0x470bcd;}export async function searchDirectKnowledge(_0xb90f7a){const _0x33b42d=a289_0x1ac01b,_0x11382a=_0xb90f7a[_0x33b42d(0x1d9)][_0x33b42d(0x1ac)](),_0x549750=_0xb90f7a[_0x33b42d(0x19b)][_0x33b42d(0x1ac)]();if(!_0x11382a)throw CliErrors[_0x33b42d(0x1bc)]('Knowledge\x20search\x20appCode\x20is\x20required.');if(!_0xb90f7a[_0x33b42d(0x1c3)][_0x33b42d(0x1ac)]())throw CliErrors[_0x33b42d(0x1e9)]();if(!_0x549750)throw CliErrors[_0x33b42d(0x1bc)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0xb90f7a['topK']);const _0x116b9d=normalizeKbServiceOrigin(_0xb90f7a[_0x33b42d(0x1ca)]),_0xbe211=AbortSignal['timeout'](0xea60),_0x32a556=_0xb90f7a[_0x33b42d(0x1e4)]?AbortSignal[_0x33b42d(0x19c)]([_0xb90f7a['signal'],_0xbe211]):_0xbe211;let _0x165624;try{_0x165624=await fetch(_0x116b9d+_0x33b42d(0x1cd)+encodeURIComponent(_0x11382a)+_0x33b42d(0x195),{'method':_0x33b42d(0x1d4),'redirect':_0x33b42d(0x1c5),'headers':{'Content-Type':'application/json','Cookie':_0xb90f7a['cookie'],'X-Invoke-Source':_0x33b42d(0x1b4)},'body':JSON['stringify']({'query':_0x549750,..._0xb90f7a[_0x33b42d(0x1b1)]!==undefined?{'topK':_0xb90f7a[_0x33b42d(0x1b1)]}:{}}),'signal':_0x32a556});}catch(_0x2d2005){if(_0xb90f7a['signal']?.[_0x33b42d(0x19a)])throw new DOMException(_0x33b42d(0x196),_0x33b42d(0x1b3));if(_0x2d2005 instanceof Error&&_0x2d2005[_0x33b42d(0x1d0)]===_0x33b42d(0x1c9))throw CliErrors['networkError'](_0x33b42d(0x1aa));throw CliErrors[_0x33b42d(0x1e8)](_0x33b42d(0x1dc));}if(_0x165624['status']===0x191)throw CliErrors['authRequired']();if(_0x165624[_0x33b42d(0x1c2)]===0x1ad)throw CliErrors[_0x33b42d(0x1cb)](_0x33b42d(0x1e3));if(!_0x165624['ok'])throw CliErrors[_0x33b42d(0x1cb)](_0x33b42d(0x1ce)+_0x165624[_0x33b42d(0x1c2)]+').');if(!hasNoStore(_0x165624[_0x33b42d(0x1bb)]))throw CliErrors[_0x33b42d(0x1cb)]('KB\x20Service\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(!(_0x165624[_0x33b42d(0x1bb)][_0x33b42d(0x193)]('content-type')??'')[_0x33b42d(0x1b6)]()[_0x33b42d(0x1b8)](_0x33b42d(0x1a5)))throw CliErrors[_0x33b42d(0x1cb)](_0x33b42d(0x1cf));let _0x4aaa22;try{_0x4aaa22=await _0x165624[_0x33b42d(0x1a6)]();}catch(_0x5e958c){if(_0xb90f7a[_0x33b42d(0x1e4)]?.[_0x33b42d(0x19a)])throw new DOMException('Knowledge\x20search\x20cancelled.',_0x33b42d(0x1b3));if(_0xbe211[_0x33b42d(0x19a)]||_0x5e958c instanceof Error&&_0x5e958c[_0x33b42d(0x1d0)]===_0x33b42d(0x1c9))throw CliErrors[_0x33b42d(0x1e8)](_0x33b42d(0x1aa));throw CliErrors[_0x33b42d(0x1cb)](_0x33b42d(0x1b5));}try{const _0x538d40=requireExactRecord(_0x4aaa22,[_0x33b42d(0x1d2),_0x33b42d(0x197),_0x33b42d(0x1b9)],_0x33b42d(0x1e6));if(!Array['isArray'](_0x538d40[_0x33b42d(0x1d2)]))throw invalidContract(_0x33b42d(0x1d2));return parseDevelopmentSearchResponse({'schemaVersion':0x2,'profile':_0x33b42d(0x1c8),'total':_0x538d40[_0x33b42d(0x1d2)][_0x33b42d(0x1be)],'hits':_0x538d40[_0x33b42d(0x1d2)],'strategyFingerprint':_0x538d40[_0x33b42d(0x197)],'timingsMs':_0x538d40[_0x33b42d(0x1b9)]},_0xb90f7a[_0x33b42d(0x1b1)]??0xa);}catch(_0x5bceed){if(_0x5bceed instanceof CliError)throw CliErrors['apiError']('KB\x20Service\x20knowledge\x20search\x20returned\x20an\x20invalid\x20response\x20contract.');throw _0x5bceed;}}function validateTopK(_0x4ac2e1){const _0x413b3f=a289_0x1ac01b;if(_0x4ac2e1!==undefined&&(!Number[_0x413b3f(0x194)](_0x4ac2e1)||_0x4ac2e1<0x1||_0x4ac2e1>0x32))throw CliErrors[_0x413b3f(0x1bc)]('Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.');}function hasNoStore(_0x28d9d5){const _0x4e7219=a289_0x1ac01b;return(_0x28d9d5[_0x4e7219(0x193)](_0x4e7219(0x1a9))??'')['split'](',')['some'](_0x36514d=>_0x36514d[_0x4e7219(0x1ac)]()['toLowerCase']()===_0x4e7219(0x1d3));}function parseDevelopmentSearchResponse(_0x5b30aa,_0x1bbe41){const _0x2a269e=a289_0x1ac01b,_0x2352b5=requireExactRecord(_0x5b30aa,RESPONSE_KEYS,_0x2a269e(0x1e6));if(_0x2352b5['schemaVersion']!==0x2||_0x2352b5[_0x2a269e(0x1d5)]!==_0x2a269e(0x1c8))throw invalidContract(_0x2a269e(0x1d5));if(!Array[_0x2a269e(0x1b7)](_0x2352b5[_0x2a269e(0x1d2)])||_0x2352b5[_0x2a269e(0x1d2)][_0x2a269e(0x1be)]>(_0x1bbe41??0x32))throw invalidContract(_0x2a269e(0x1d2));if(typeof _0x2352b5[_0x2a269e(0x197)]!=='string'||!/^sha256:[0-9a-f]{64}$/[_0x2a269e(0x1ae)](_0x2352b5[_0x2a269e(0x197)]))throw invalidContract(_0x2a269e(0x197));const _0x200415=requireRecord(_0x2352b5[_0x2a269e(0x1b9)],'timingsMs'),_0x424abe={};for(const [_0x16c4f3,_0x1603a1]of Object[_0x2a269e(0x1d7)](_0x200415)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x2a269e(0x1ae)](_0x16c4f3)||typeof _0x1603a1!=='number'||!Number[_0x2a269e(0x1ba)](_0x1603a1)||_0x1603a1<0x0)throw invalidContract(_0x2a269e(0x1b9));_0x424abe[_0x16c4f3]=_0x1603a1;}const _0xa88997=_0x2352b5['hits'][_0x2a269e(0x1a2)]((_0x541d4d,_0x194d57)=>parseHit(_0x541d4d,_0x194d57));if(!Number['isSafeInteger'](_0x2352b5[_0x2a269e(0x1ad)])||_0x2352b5[_0x2a269e(0x1ad)]!==_0xa88997[_0x2a269e(0x1be)])throw invalidContract(_0x2a269e(0x1ad));return{'schemaVersion':_0x2352b5[_0x2a269e(0x1b0)],'profile':_0x2352b5[_0x2a269e(0x1d5)],'total':_0x2352b5[_0x2a269e(0x1ad)],'strategyFingerprint':_0x2352b5[_0x2a269e(0x197)],'timingsMs':_0x424abe,'hits':_0xa88997};}function parseHit(_0x59b983,_0x3a3e5f){const _0x3c9dfa=a289_0x1ac01b,_0x4146c3=requireExactRecord(_0x59b983,HIT_KEYS,'hits['+_0x3a3e5f+']'),_0x26cc57=_0x3ec9cd=>{const _0x30781c=_0x4146c3[_0x3ec9cd];if(typeof _0x30781c!=='string'||!_0x30781c)throw invalidContract(_0x3ec9cd);return _0x30781c;};if(!Number[_0x3c9dfa(0x194)](_0x4146c3[_0x3c9dfa(0x1bf)])||_0x4146c3[_0x3c9dfa(0x1bf)]<0x1)throw invalidContract(_0x3c9dfa(0x1bf));if(_0x4146c3[_0x3c9dfa(0x198)]!==_0x3c9dfa(0x1e5)&&_0x4146c3['scope']!=='company')throw invalidContract('scope');if(typeof _0x4146c3[_0x3c9dfa(0x1a0)]!==_0x3c9dfa(0x1d6)||typeof _0x4146c3[_0x3c9dfa(0x1a8)]!=='string')throw invalidContract('text');if(!Array[_0x3c9dfa(0x1b7)](_0x4146c3[_0x3c9dfa(0x1ea)])||_0x4146c3[_0x3c9dfa(0x1ea)]['some'](_0x18b554=>typeof _0x18b554!=='string'))throw invalidContract(_0x3c9dfa(0x1ea));if(!Number[_0x3c9dfa(0x194)](_0x4146c3['rank'])||_0x4146c3[_0x3c9dfa(0x199)]!==_0x3a3e5f+0x1)throw invalidContract(_0x3c9dfa(0x199));if(!isFiniteNumber(_0x4146c3[_0x3c9dfa(0x1e7)])||!isFiniteNumber(_0x4146c3[_0x3c9dfa(0x1c1)]))throw invalidContract('score');return{'documentId':_0x26cc57(_0x3c9dfa(0x1c6)),'revision':_0x4146c3[_0x3c9dfa(0x1bf)],'chunkId':_0x26cc57(_0x3c9dfa(0x1e0)),'scope':_0x4146c3[_0x3c9dfa(0x198)],'title':_0x4146c3['title'],'text':_0x4146c3[_0x3c9dfa(0x1a8)],'tags':[..._0x4146c3[_0x3c9dfa(0x1ea)]],'rank':_0x4146c3[_0x3c9dfa(0x199)],'rawScore':_0x4146c3[_0x3c9dfa(0x1e7)],'finalScore':_0x4146c3[_0x3c9dfa(0x1c1)],'scoreKind':_0x26cc57(_0x3c9dfa(0x1a1))};}function requireExactRecord(_0x23e6c6,_0x5bd4a0,_0x4d78a3){const _0x3145ae=a289_0x1ac01b,_0x40c2c2=requireRecord(_0x23e6c6,_0x4d78a3),_0x3dc715=Object['keys'](_0x40c2c2)[_0x3145ae(0x1db)](),_0x48a5a8=[..._0x5bd4a0][_0x3145ae(0x1db)]();if(_0x3dc715[_0x3145ae(0x1be)]!==_0x48a5a8[_0x3145ae(0x1be)]||_0x3dc715[_0x3145ae(0x1e1)]((_0x1262b7,_0x2fae0b)=>_0x1262b7!==_0x48a5a8[_0x2fae0b]))throw invalidContract(_0x4d78a3);return _0x40c2c2;}function a289_0x209a(){const _0x5c438e=['chunkId','some','15797ScszvI','KB\x20Service\x20knowledge\x20search\x20was\x20rate\x20limited\x20(HTTP\x20429).','signal','public','response','rawScore','networkError','authRequired','tags','get','isSafeInteger','/knowledge/search','Knowledge\x20search\x20cancelled.','strategyFingerprint','scope','rank','aborted','query','any','2991dNFwUf','4759878TQKndF','password','title','scoreKind','map','\x20contract.','1415331jMQHkH','application/json','json','username','text','cache-control','KB\x20Service\x20knowledge\x20search\x20request\x20timed\x20out.','70NsoIFo','trim','total','test','hash','schemaVersion','topK','4813825cioprg','AbortError','cli:rabetbase','KB\x20Service\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','toLowerCase','isArray','includes','timingsMs','isFinite','headers','validation','pathname','length','revision','object','finalScore','status','cookie','protocol','error','documentId','4612DPJcMG','development','TimeoutError','serviceUrl','apiError','number','/v2/development/apps/','KB\x20Service\x20knowledge\x20search\x20failed\x20(HTTP\x20','KB\x20Service\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','name','3594213Bdqzry','hits','no-store','POST','profile','string','entries','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','appCode','https:','sort','KB\x20Service\x20knowledge\x20search\x20request\x20failed.','origin','128yGkZfG','9095600avBadq'];a289_0x209a=function(){return _0x5c438e;};return a289_0x209a();}function requireRecord(_0x3060ce,_0x8cbdb){const _0x1569e8=a289_0x1ac01b;if(!_0x3060ce||typeof _0x3060ce!==_0x1569e8(0x1c0)||Array[_0x1569e8(0x1b7)](_0x3060ce))throw invalidContract(_0x8cbdb);return _0x3060ce;}function isFiniteNumber(_0x470026){const _0x4f0afe=a289_0x1ac01b;return typeof _0x470026===_0x4f0afe(0x1cc)&&Number[_0x4f0afe(0x1ba)](_0x470026);}function invalidContract(_0x53b165){const _0x23f0a9=a289_0x1ac01b;return CliErrors['apiError'](_0x23f0a9(0x1d8)+_0x53b165+_0x23f0a9(0x1a3));}
@@ -1 +1 @@
1
- const a290_0x7d4b28=a290_0x43dd;(function(_0x5259ca,_0x2de1a9){const _0x189e31=a290_0x43dd,_0x1d99ab=_0x5259ca();while(!![]){try{const _0x1a37a3=-parseInt(_0x189e31(0x1c3))/0x1+parseInt(_0x189e31(0x1d5))/0x2+-parseInt(_0x189e31(0x1c6))/0x3+parseInt(_0x189e31(0x1ce))/0x4+-parseInt(_0x189e31(0x1d8))/0x5+-parseInt(_0x189e31(0x1dc))/0x6*(parseInt(_0x189e31(0x1cb))/0x7)+parseInt(_0x189e31(0x1dd))/0x8*(parseInt(_0x189e31(0x1d3))/0x9);if(_0x1a37a3===_0x2de1a9)break;else _0x1d99ab['push'](_0x1d99ab['shift']());}catch(_0x2801b6){_0x1d99ab['push'](_0x1d99ab['shift']());}}}(a290_0x5272,0x1bf4b));function a290_0x43dd(_0x4be5ae,_0x142b7a){_0x4be5ae=_0x4be5ae-0x1c2;const _0x527254=a290_0x5272();let _0x43dd06=_0x527254[_0x4be5ae];return _0x43dd06;}import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{CliErrors}from'../../errors.js';function a290_0x5272(){const _0x5aacb3=['join','34408JjSAej','sort','page-dir','531273pFJuuL','isFile','cwd','name','Page\x20directory\x20not\x20found:\x20','14xZNaCs','validation','isDirectory','38064axTpDo','F_OK','localeCompare','.json','Unsupported\x20file\x20in\x20page\x20directory:\x20','13518jXinkX','split','448120hrSZnp','flagMissing','appPagesDir','949960RuLiRD','utf8','.rabetbase','toUpperCase','572124cPLZPB','2520FjMTOD','Page\x20directory\x20is\x20not\x20a\x20directory:\x20'];a290_0x5272=function(){return _0x5aacb3;};return a290_0x5272();}export function loadPageProjectConfig(_0x46aa39,_0x5b92c2=process[a290_0x7d4b28(0x1c8)]()){const _0x45fe0=a290_0x7d4b28,_0xc64ba5=resolve(_0x5b92c2),_0xbfe17c=join(_0xc64ba5,'.rabetbase','page');return{'projectRoot':_0xc64ba5,'pagesBaseDir':_0xbfe17c,'appPagesDir':join(_0xbfe17c,_0x46aa39),'lockFilePath':join(_0xc64ba5,_0x45fe0(0x1da),'page.lock.json')};}export function buildPageFileName(_0x5a7a8b,_0x315f37){const _0x282b78=a290_0x7d4b28;return _0x5a7a8b+'-'+_0x315f37[_0x282b78(0x1db)]()+_0x282b78(0x1d1);}export function resolvePageFilePath(_0x750dfd,_0x271018,_0x1f2806){const _0x58420d=a290_0x7d4b28;return join(_0x750dfd[_0x58420d(0x1d7)],buildPageFileName(_0x271018,_0x1f2806));}export async function ensureParentDirectory(_0x5730fb){await mkdir(dirname(_0x5730fb),{'recursive':!![]});}export async function fileExists(_0x4e4f70){const _0x3815ea=a290_0x7d4b28;try{return await access(_0x4e4f70,constants[_0x3815ea(0x1cf)]),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x24d58a){const _0x2a2619=a290_0x7d4b28,_0x56b026=_0x24d58a['trim']();if(!_0x56b026)throw CliErrors[_0x2a2619(0x1d6)](_0x2a2619(0x1c5));const _0xc182f8=resolve(_0x56b026);let _0x5315e1;try{_0x5315e1=await lstat(_0xc182f8);}catch{throw CliErrors[_0x2a2619(0x1cc)](_0x2a2619(0x1ca)+_0x56b026);}if(!_0x5315e1[_0x2a2619(0x1cd)]())throw CliErrors[_0x2a2619(0x1cc)](_0x2a2619(0x1de)+_0x56b026);const _0x54ebe4={};return await readDirectory(_0xc182f8,_0xc182f8,_0x54ebe4),_0x54ebe4;}async function readDirectory(_0x54f7cf,_0x340896,_0x2e15ba){const _0x4149b4=a290_0x7d4b28,_0x139de9=await readdir(_0x340896,{'withFileTypes':!![]});for(const _0x3cdbad of _0x139de9[_0x4149b4(0x1c4)]((_0x23ba2c,_0x5901a6)=>_0x23ba2c[_0x4149b4(0x1c9)][_0x4149b4(0x1d0)](_0x5901a6['name']))){const _0x3e6c9e=join(_0x340896,_0x3cdbad[_0x4149b4(0x1c9)]);if(_0x3cdbad['isDirectory']()){await readDirectory(_0x54f7cf,_0x3e6c9e,_0x2e15ba);continue;}if(!_0x3cdbad[_0x4149b4(0x1c7)]())throw CliErrors[_0x4149b4(0x1cc)](_0x4149b4(0x1d2)+_0x3e6c9e);_0x2e15ba[relative(_0x54f7cf,_0x3e6c9e)[_0x4149b4(0x1d4)](sep)[_0x4149b4(0x1c2)]('/')]=await readFile(_0x3e6c9e,_0x4149b4(0x1d9));}}
1
+ const a290_0x563652=a290_0x14f8;(function(_0xaf2b59,_0x3c137f){const _0x191f1e=a290_0x14f8,_0x9e1e00=_0xaf2b59();while(!![]){try{const _0x2c91e6=parseInt(_0x191f1e(0x182))/0x1*(parseInt(_0x191f1e(0x16e))/0x2)+parseInt(_0x191f1e(0x171))/0x3+parseInt(_0x191f1e(0x18c))/0x4*(-parseInt(_0x191f1e(0x184))/0x5)+-parseInt(_0x191f1e(0x180))/0x6*(-parseInt(_0x191f1e(0x186))/0x7)+-parseInt(_0x191f1e(0x17b))/0x8*(parseInt(_0x191f1e(0x185))/0x9)+-parseInt(_0x191f1e(0x170))/0xa+parseInt(_0x191f1e(0x177))/0xb;if(_0x2c91e6===_0x3c137f)break;else _0x9e1e00['push'](_0x9e1e00['shift']());}catch(_0x58e62d){_0x9e1e00['push'](_0x9e1e00['shift']());}}}(a290_0x5abd,0xb3f39));import{constants}from'node:fs';import{access,lstat,mkdir,readFile,readdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a290_0x5abd(){const _0x53de41=['.rabetbase','Unsupported\x20file\x20in\x20page\x20directory:\x20','8gntlrH','localeCompare','sort','page-dir','join','7632VTPVfG','.json','257198TBcvBy','validation','1444865whXdLT','8909271pxxbkZ','5880BJIRdn','isDirectory','page','name','flagMissing','isFile','12RaLhfp','4JpAThi','trim','3585230qEPRYl','1820523bHBLAt','appPagesDir','toUpperCase','utf8','split','cwd','8389975ILZmjl','Page\x20directory\x20is\x20not\x20a\x20directory:\x20'];a290_0x5abd=function(){return _0x53de41;};return a290_0x5abd();}function a290_0x14f8(_0x2be56f,_0x27856f){_0x2be56f=_0x2be56f-0x16e;const _0x5abdaf=a290_0x5abd();let _0x14f8b3=_0x5abdaf[_0x2be56f];return _0x14f8b3;}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0xa9e103,_0x53f054=process[a290_0x563652(0x176)]()){const _0x24def9=a290_0x563652,_0x4f9c6c=resolve(_0x53f054),_0x2cdddb=join(_0x4f9c6c,_0x24def9(0x179),_0x24def9(0x188));return{'projectRoot':_0x4f9c6c,'pagesBaseDir':_0x2cdddb,'appPagesDir':join(_0x2cdddb,_0xa9e103),'lockFilePath':join(_0x4f9c6c,_0x24def9(0x179),'page.lock.json')};}export function buildPageFileName(_0x507238,_0x201422){const _0x547a32=a290_0x563652;return _0x507238+'-'+_0x201422[_0x547a32(0x173)]()+_0x547a32(0x181);}export function resolvePageFilePath(_0x1510fd,_0x2e9640,_0x278f64){const _0x3f3a28=a290_0x563652;return join(_0x1510fd[_0x3f3a28(0x172)],buildPageFileName(_0x2e9640,_0x278f64));}export async function ensureParentDirectory(_0x4b2f7f){await mkdir(dirname(_0x4b2f7f),{'recursive':!![]});}export async function fileExists(_0x4c6657){try{return await access(_0x4c6657,constants['F_OK']),!![];}catch{return![];}}export async function readCustomPageDirectory(_0x21fe19){const _0x2dce52=a290_0x563652,_0x940f45=_0x21fe19[_0x2dce52(0x16f)]();if(!_0x940f45)throw CliErrors[_0x2dce52(0x18a)](_0x2dce52(0x17e));const _0x3e9dfd=resolve(_0x940f45);let _0x544b38;try{_0x544b38=await lstat(_0x3e9dfd);}catch{throw CliErrors[_0x2dce52(0x183)]('Page\x20directory\x20not\x20found:\x20'+_0x940f45);}if(!_0x544b38[_0x2dce52(0x187)]())throw CliErrors['validation'](_0x2dce52(0x178)+_0x940f45);const _0x303ab1={};return await readDirectory(_0x3e9dfd,_0x3e9dfd,_0x303ab1),_0x303ab1;}async function readDirectory(_0x3845bd,_0x62c2f4,_0x5d599b){const _0x1be581=a290_0x563652,_0x191159=await readdir(_0x62c2f4,{'withFileTypes':!![]});for(const _0x177c6a of _0x191159[_0x1be581(0x17d)]((_0xa96635,_0x14c146)=>_0xa96635[_0x1be581(0x189)][_0x1be581(0x17c)](_0x14c146[_0x1be581(0x189)]))){const _0x3ea2fe=join(_0x62c2f4,_0x177c6a[_0x1be581(0x189)]);if(_0x177c6a[_0x1be581(0x187)]()){await readDirectory(_0x3845bd,_0x3ea2fe,_0x5d599b);continue;}if(!_0x177c6a[_0x1be581(0x18b)]())throw CliErrors['validation'](_0x1be581(0x17a)+_0x3ea2fe);_0x5d599b[relative(_0x3845bd,_0x3ea2fe)[_0x1be581(0x175)](sep)[_0x1be581(0x17f)]('/')]=await readFile(_0x3ea2fe,_0x1be581(0x174));}}
@@ -1 +1 @@
1
- (function(_0x435985,_0x358994){const _0x15bcf4=a291_0x4b49,_0x13bffb=_0x435985();while(!![]){try{const _0x210f64=-parseInt(_0x15bcf4(0xec))/0x1+parseInt(_0x15bcf4(0xea))/0x2+parseInt(_0x15bcf4(0xf4))/0x3+parseInt(_0x15bcf4(0xf6))/0x4*(parseInt(_0x15bcf4(0xe9))/0x5)+parseInt(_0x15bcf4(0xf8))/0x6*(parseInt(_0x15bcf4(0xe8))/0x7)+parseInt(_0x15bcf4(0xee))/0x8+-parseInt(_0x15bcf4(0xf2))/0x9;if(_0x210f64===_0x358994)break;else _0x13bffb['push'](_0x13bffb['shift']());}catch(_0x5e9599){_0x13bffb['push'](_0x13bffb['shift']());}}}(a291_0x5a7b,0xe50fc));import a291_0xd57589 from'node:crypto';function a291_0x5a7b(){const _0xe0da3c=['12ZhKQmz','709219wcObME','102815NfzetK','3595198UbDHSX','stringify','284147xGQBQp','parse','14385992flgaGM','hex','digest','update','32344695LPVsxj','createHash','2127933pHuseJ','md5','60XOZYMT','utf8'];a291_0x5a7b=function(){return _0xe0da3c;};return a291_0x5a7b();}function a291_0x4b49(_0x40e03e,_0x2401ac){_0x40e03e=_0x40e03e-0xe8;const _0x5a7b5e=a291_0x5a7b();let _0x4b49b6=_0x5a7b5e[_0x40e03e];return _0x4b49b6;}import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x3f369e){const _0x499d46=a291_0x4b49;return JSON[_0x499d46(0xeb)](JSON[_0x499d46(0xed)](_0x3f369e),null,0x2)+'\x0a';}export function computePageContentHash(_0xaef73e){const _0x2f64e5=a291_0x4b49;return a291_0xd57589[_0x2f64e5(0xf3)](_0x2f64e5(0xf5))[_0x2f64e5(0xf1)](_0xaef73e)[_0x2f64e5(0xf0)](_0x2f64e5(0xef));}export function computeSerializedSchemaHash(_0x284d9e){return computePageContentHash(serializePageSchemaForFile(_0x284d9e));}export async function computePageFileHash(_0x5fb8c2){const _0x19cd80=a291_0x4b49,_0x5ae8bb=await readFile(_0x5fb8c2,_0x19cd80(0xf7));return computePageContentHash(_0x5ae8bb);}
1
+ function a291_0x5b2a(_0x4f5928,_0x595e49){_0x4f5928=_0x4f5928-0x1df;const _0x5ed213=a291_0x5ed2();let _0x5b2a91=_0x5ed213[_0x4f5928];return _0x5b2a91;}(function(_0x36600f,_0x3bbecb){const _0x4f8dff=a291_0x5b2a,_0x31687d=_0x36600f();while(!![]){try{const _0x1c1b8a=parseInt(_0x4f8dff(0x1df))/0x1+parseInt(_0x4f8dff(0x1ef))/0x2*(-parseInt(_0x4f8dff(0x1ec))/0x3)+-parseInt(_0x4f8dff(0x1ed))/0x4+parseInt(_0x4f8dff(0x1e5))/0x5+parseInt(_0x4f8dff(0x1e2))/0x6+parseInt(_0x4f8dff(0x1ee))/0x7*(-parseInt(_0x4f8dff(0x1e7))/0x8)+parseInt(_0x4f8dff(0x1eb))/0x9;if(_0x1c1b8a===_0x3bbecb)break;else _0x31687d['push'](_0x31687d['shift']());}catch(_0x1c2c07){_0x31687d['push'](_0x31687d['shift']());}}}(a291_0x5ed2,0xc3fab));import a291_0x17bfac from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x46dc2b){const _0x11bb5e=a291_0x5b2a;return JSON[_0x11bb5e(0x1ea)](JSON[_0x11bb5e(0x1e1)](_0x46dc2b),null,0x2)+'\x0a';}export function computePageContentHash(_0x5b7935){const _0x212d83=a291_0x5b2a;return a291_0x17bfac[_0x212d83(0x1e0)](_0x212d83(0x1e8))[_0x212d83(0x1e6)](_0x5b7935)[_0x212d83(0x1e3)](_0x212d83(0x1e9));}export function computeSerializedSchemaHash(_0x2da701){return computePageContentHash(serializePageSchemaForFile(_0x2da701));}export async function computePageFileHash(_0x423680){const _0x3c407f=a291_0x5b2a,_0x3762a9=await readFile(_0x423680,_0x3c407f(0x1e4));return computePageContentHash(_0x3762a9);}function a291_0x5ed2(){const _0x2afea1=['digest','utf8','2730430nlAhJP','update','20048dmnvdS','md5','hex','stringify','7155558VdDsAX','2518806OmRGjC','2329312WSrHOu','4039CyHMga','2NAtmXO','1326939NwVGOT','createHash','parse','6015216WmFUqK'];a291_0x5ed2=function(){return _0x2afea1;};return a291_0x5ed2();}
@@ -1 +1 @@
1
- (function(_0x1ce54c,_0x592d1a){const _0x3a6e66=a292_0x333f,_0x1d534c=_0x1ce54c();while(!![]){try{const _0x489f62=parseInt(_0x3a6e66(0x189))/0x1*(parseInt(_0x3a6e66(0x18e))/0x2)+parseInt(_0x3a6e66(0x188))/0x3+parseInt(_0x3a6e66(0x185))/0x4*(-parseInt(_0x3a6e66(0x184))/0x5)+parseInt(_0x3a6e66(0x191))/0x6+parseInt(_0x3a6e66(0x180))/0x7*(parseInt(_0x3a6e66(0x183))/0x8)+-parseInt(_0x3a6e66(0x182))/0x9+-parseInt(_0x3a6e66(0x186))/0xa;if(_0x489f62===_0x592d1a)break;else _0x1d534c['push'](_0x1d534c['shift']());}catch(_0x5655b0){_0x1d534c['push'](_0x1d534c['shift']());}}}(a292_0x500b,0xde76e));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}function a292_0x333f(_0xb5bbbb,_0x4450bc){_0xb5bbbb=_0xb5bbbb-0x17f;const _0x500b70=a292_0x500b();let _0x333fd9=_0x500b70[_0xb5bbbb];return _0x333fd9;}export function ensurePageLockScope(_0x4ff876,_0x53e781){const _0x30be5a=a292_0x333f,_0x53e647={'apps':_0x4ff876[_0x30be5a(0x181)]&&typeof _0x4ff876[_0x30be5a(0x181)]==='object'?_0x4ff876[_0x30be5a(0x181)]:{}};let _0x49ca83=_0x53e647[_0x30be5a(0x181)][_0x53e781];if(!_0x49ca83)return _0x49ca83={'lastSync':'','pages':{}},_0x53e647['apps'][_0x53e781]=_0x49ca83,{'lockData':_0x53e647,'appLock':_0x49ca83};return!_0x49ca83[_0x30be5a(0x18b)]&&(_0x49ca83[_0x30be5a(0x18b)]=''),(!_0x49ca83[_0x30be5a(0x18c)]||typeof _0x49ca83['pages']!=='object')&&(_0x49ca83['pages']={}),{'lockData':_0x53e647,'appLock':_0x49ca83};}function a292_0x500b(){const _0x31b3b0=['833PAihsq','apps','1940400cHvIgP','7816SslouI','4645txfCst','4144hBfKJU','17488480unMOvy','parse','2821875ABcFzw','2zZmDOY','object','lastSync','pages','code','1277976hNSaAA','ENOENT','utf8','9019452gyTEUz','stringify'];a292_0x500b=function(){return _0x31b3b0;};return a292_0x500b();}export async function readPageLockFile(_0xf097e4){const _0x35bef7=a292_0x333f;try{const _0x27c766=await readFile(_0xf097e4,_0x35bef7(0x190)),_0x168412=JSON[_0x35bef7(0x187)](_0x27c766);return{'apps':_0x168412[_0x35bef7(0x181)]&&typeof _0x168412[_0x35bef7(0x181)]===_0x35bef7(0x18a)?_0x168412[_0x35bef7(0x181)]:{}};}catch(_0x54a27b){if(_0x54a27b[_0x35bef7(0x18d)]===_0x35bef7(0x18f))return null;throw new Error('Failed\x20to\x20read\x20page\x20lock\x20file:\x20'+String(_0x54a27b));}}export async function writePageLockFile(_0xbf0b51,_0xee4548){const _0x205c91=a292_0x333f;await mkdir(dirname(_0xbf0b51),{'recursive':!![]}),await writeFile(_0xbf0b51,JSON[_0x205c91(0x17f)](_0xee4548,null,0x2),_0x205c91(0x190));}
1
+ (function(_0x3eaae6,_0x5f50d5){const _0x23ef0d=a292_0x36a2,_0x581b64=_0x3eaae6();while(!![]){try{const _0x51b230=parseInt(_0x23ef0d(0x1cf))/0x1+parseInt(_0x23ef0d(0x1d3))/0x2+-parseInt(_0x23ef0d(0x1d4))/0x3+parseInt(_0x23ef0d(0x1d2))/0x4*(-parseInt(_0x23ef0d(0x1d5))/0x5)+parseInt(_0x23ef0d(0x1c5))/0x6*(parseInt(_0x23ef0d(0x1ce))/0x7)+parseInt(_0x23ef0d(0x1c7))/0x8+-parseInt(_0x23ef0d(0x1d0))/0x9;if(_0x51b230===_0x5f50d5)break;else _0x581b64['push'](_0x581b64['shift']());}catch(_0x451c5d){_0x581b64['push'](_0x581b64['shift']());}}}(a292_0x11b3,0xb6358));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}function a292_0x11b3(){const _0x2c2680=['object','2695ZrxxFt','828106pQdOhM','4653711jbJdGL','code','47836jrYsXB','795878mTVMjU','2268612jxUeaQ','165mGFVzJ','4602HPxlbV','apps','7143344kDEUZc','stringify','pages','lastSync','utf8','Failed\x20to\x20read\x20page\x20lock\x20file:\x20'];a292_0x11b3=function(){return _0x2c2680;};return a292_0x11b3();}function a292_0x36a2(_0x2d5ca8,_0x5577bd){_0x2d5ca8=_0x2d5ca8-0x1c5;const _0x11b365=a292_0x11b3();let _0x36a282=_0x11b365[_0x2d5ca8];return _0x36a282;}export function ensurePageLockScope(_0x523277,_0x18f2e0){const _0x11125b=a292_0x36a2,_0x36d26d={'apps':_0x523277[_0x11125b(0x1c6)]&&typeof _0x523277['apps']===_0x11125b(0x1cd)?_0x523277[_0x11125b(0x1c6)]:{}};let _0x599de5=_0x36d26d[_0x11125b(0x1c6)][_0x18f2e0];if(!_0x599de5)return _0x599de5={'lastSync':'','pages':{}},_0x36d26d[_0x11125b(0x1c6)][_0x18f2e0]=_0x599de5,{'lockData':_0x36d26d,'appLock':_0x599de5};return!_0x599de5[_0x11125b(0x1ca)]&&(_0x599de5[_0x11125b(0x1ca)]=''),(!_0x599de5[_0x11125b(0x1c9)]||typeof _0x599de5[_0x11125b(0x1c9)]!==_0x11125b(0x1cd))&&(_0x599de5[_0x11125b(0x1c9)]={}),{'lockData':_0x36d26d,'appLock':_0x599de5};}export async function readPageLockFile(_0x17734a){const _0x23d238=a292_0x36a2;try{const _0x2ee35a=await readFile(_0x17734a,_0x23d238(0x1cb)),_0x3e7d76=JSON['parse'](_0x2ee35a);return{'apps':_0x3e7d76['apps']&&typeof _0x3e7d76[_0x23d238(0x1c6)]==='object'?_0x3e7d76[_0x23d238(0x1c6)]:{}};}catch(_0x5c387a){if(_0x5c387a[_0x23d238(0x1d1)]==='ENOENT')return null;throw new Error(_0x23d238(0x1cc)+String(_0x5c387a));}}export async function writePageLockFile(_0x382621,_0x474ed3){const _0x455d81=a292_0x36a2;await mkdir(dirname(_0x382621),{'recursive':!![]}),await writeFile(_0x382621,JSON[_0x455d81(0x1c8)](_0x474ed3,null,0x2),_0x455d81(0x1cb));}
@@ -1 +1 @@
1
- (function(_0x339aec,_0x2c0e07){const _0x2c93c9=a293_0x5d81,_0x236dcd=_0x339aec();while(!![]){try{const _0xd3f91e=-parseInt(_0x2c93c9(0x127))/0x1*(parseInt(_0x2c93c9(0x140))/0x2)+parseInt(_0x2c93c9(0x123))/0x3*(parseInt(_0x2c93c9(0x126))/0x4)+-parseInt(_0x2c93c9(0x10f))/0x5+-parseInt(_0x2c93c9(0x120))/0x6+-parseInt(_0x2c93c9(0x11a))/0x7*(-parseInt(_0x2c93c9(0x13c))/0x8)+-parseInt(_0x2c93c9(0x111))/0x9*(parseInt(_0x2c93c9(0x12e))/0xa)+parseInt(_0x2c93c9(0x117))/0xb*(parseInt(_0x2c93c9(0x128))/0xc);if(_0xd3f91e===_0x2c0e07)break;else _0x236dcd['push'](_0x236dcd['shift']());}catch(_0x59dc4d){_0x236dcd['push'](_0x236dcd['shift']());}}}(a293_0x177e,0x66d6b));import{CliErrors}from'../../errors.js';function a293_0x177e(){const _0x2a1394=['apiError','LrSmartJsx\x20node\x20\x22','37174HkFNey','validation','3547310PyubVV','forEach','3949461FbAGGu','_context','value','isArray','id:','remote','26521mWKvXe','parse','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','51919AkCdlF','Invalid\x20JSON\x20in\x20','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','this','path:','render','1583946FQcTiO','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','11007UGKIqA','map','object','396rSLkjp','6zlMyKa','7836ceRXPz','push','Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.','string','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.','local','10shnZWM','entries','source','get','type','\x20page\x20schema.','\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','length','JSExpression','\x22\x20has\x20missing\x20or\x20invalid\x20props.','label','componentName','key','LrSmartJsx','8YhvgIP','props'];a293_0x177e=function(){return _0x2a1394;};return a293_0x177e();}export async function prepareLrSmartJsxForPush(_0x28149b,_0x7270fd,_0x22ee4b){const _0x10468d=a293_0x5d81,_0x235316=parseSchema(_0x28149b,_0x10468d(0x12d)),_0x53ebdf=parseSchema(_0x7270fd,_0x10468d(0x116)),_0x578b6a=collectLrSmartJsx(_0x235316,!![]);if(_0x578b6a[_0x10468d(0x135)]===0x0)return{'content':_0x28149b,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x54c540=new Map(collectLrSmartJsx(_0x53ebdf)[_0x10468d(0x124)](_0x2fb1a5=>[_0x2fb1a5[_0x10468d(0x13a)],_0x2fb1a5]));let _0x5382f7=0x0,_0x5ed1ab=0x0;for(const _0x1120fe of _0x578b6a){const _0x2dccb5=readNonEmptyString(_0x1120fe[_0x10468d(0x11f)]['source']),_0x4b9050=readNonEmptyString(_0x1120fe['render'][_0x10468d(0x113)]),_0xe8ac0f=_0x54c540[_0x10468d(0x131)](_0x1120fe[_0x10468d(0x13a)]),_0x23c156=readNonEmptyString(_0xe8ac0f?.['render'][_0x10468d(0x130)]),_0x3e1de7=readNonEmptyString(_0xe8ac0f?.[_0x10468d(0x11f)][_0x10468d(0x113)]);let _0x545e85=![];_0x1120fe['render'][_0x10468d(0x132)]!=='JSFunction'&&(_0x1120fe[_0x10468d(0x11f)]['type']='JSFunction',_0x545e85=!![]);!isPageContextExpression(_0x1120fe[_0x10468d(0x13d)][_0x10468d(0x112)])&&(_0x1120fe[_0x10468d(0x13d)][_0x10468d(0x112)]={'type':_0x10468d(0x136),'value':_0x10468d(0x11d)},_0x545e85=!![]);if(!_0x2dccb5){if(!_0x4b9050)throw CliErrors['validation'](_0x10468d(0x13f)+_0x1120fe[_0x10468d(0x138)]+_0x10468d(0x134),_0x10468d(0x12c));if(_0x545e85)_0x5ed1ab+=0x1;continue;}const _0x302b16=!_0xe8ac0f||_0x2dccb5!==_0x23c156,_0x13e754=!_0x4b9050;if(!_0x302b16&&_0x4b9050&&_0x3e1de7&&_0x4b9050!==_0x3e1de7)throw CliErrors[_0x10468d(0x10e)](_0x10468d(0x13f)+_0x1120fe['label']+_0x10468d(0x121),_0x10468d(0x12a));if(_0x302b16||_0x13e754||!_0x3e1de7){const _0x15b2ad=readNonEmptyString(await _0x22ee4b(_0x2dccb5));if(!_0x15b2ad)throw CliErrors[_0x10468d(0x13e)](_0x10468d(0x11c)+_0x1120fe[_0x10468d(0x138)]+'\x22.');_0x1120fe['render']['value']=_0x15b2ad,_0x5382f7+=0x1,_0x545e85=!![];}if(_0x545e85)_0x5ed1ab+=0x1;}if(_0x5ed1ab===0x0)return{'content':_0x28149b,'compiledNodes':_0x5382f7,'normalizedNodes':_0x5ed1ab};return{'content':JSON['stringify'](_0x235316),'compiledNodes':_0x5382f7,'normalizedNodes':_0x5ed1ab};}function a293_0x5d81(_0x5d44d2,_0xb9bdb5){_0x5d44d2=_0x5d44d2-0x10e;const _0x177ef4=a293_0x177e();let _0x5d812a=_0x177ef4[_0x5d44d2];return _0x5d812a;}function parseSchema(_0x4fd393,_0x3baacf){const _0x4deaa1=a293_0x5d81;try{return JSON[_0x4deaa1(0x118)](_0x4fd393);}catch{throw CliErrors[_0x4deaa1(0x10e)](_0x4deaa1(0x11b)+_0x3baacf+_0x4deaa1(0x133));}}function collectLrSmartJsx(_0x4e04af,_0x190d63=![]){const _0x54dbdf=[],_0x3ea843=(_0x344c68,_0x5a3862)=>{const _0x3b0135=a293_0x5d81;if(Array[_0x3b0135(0x114)](_0x344c68)){_0x344c68[_0x3b0135(0x110)]((_0x2d31fc,_0x9fa531)=>_0x3ea843(_0x2d31fc,_0x5a3862+'['+_0x9fa531+']'));return;}if(!isObject(_0x344c68))return;if(_0x344c68['componentName']===_0x3b0135(0x13b)){const _0x49ef5e=readNonEmptyString(_0x344c68['id']),_0x4b1056=_0x49ef5e||_0x5a3862,_0x36da09=isObject(_0x344c68[_0x3b0135(0x13d)])?_0x344c68[_0x3b0135(0x13d)]:undefined;if(!_0x36da09){if(_0x190d63)throw CliErrors[_0x3b0135(0x10e)](_0x3b0135(0x13f)+_0x4b1056+_0x3b0135(0x137),'Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.');return;}const _0x6d8873=isObject(_0x36da09[_0x3b0135(0x11f)])?_0x36da09[_0x3b0135(0x11f)]:undefined;if(!_0x6d8873){if(_0x190d63)throw CliErrors[_0x3b0135(0x10e)]('LrSmartJsx\x20node\x20\x22'+_0x4b1056+_0x3b0135(0x122),_0x3b0135(0x119));return;}_0x54dbdf[_0x3b0135(0x129)]({'key':_0x49ef5e?_0x3b0135(0x115)+_0x49ef5e:_0x3b0135(0x11e)+_0x5a3862,'label':_0x4b1056,'props':_0x36da09,'render':_0x6d8873});}for(const [_0x4de6fc,_0xf1aca7]of Object[_0x3b0135(0x12f)](_0x344c68)){if(_0x4de6fc===_0x3b0135(0x13d)&&_0x344c68[_0x3b0135(0x139)]==='LrSmartJsx')continue;_0x3ea843(_0xf1aca7,_0x5a3862+'.'+_0x4de6fc);}};return _0x3ea843(_0x4e04af,'$'),_0x54dbdf;}function isObject(_0x3b524e){const _0x32faac=a293_0x5d81;return Boolean(_0x3b524e)&&typeof _0x3b524e===_0x32faac(0x125)&&!Array[_0x32faac(0x114)](_0x3b524e);}function readNonEmptyString(_0x544960){const _0x14ed2c=a293_0x5d81;return typeof _0x544960===_0x14ed2c(0x12b)&&_0x544960['trim']()?_0x544960:undefined;}function isPageContextExpression(_0x5690e4){const _0x5ba5af=a293_0x5d81;return isObject(_0x5690e4)&&_0x5690e4[_0x5ba5af(0x132)]===_0x5ba5af(0x136)&&_0x5690e4[_0x5ba5af(0x113)]===_0x5ba5af(0x11d);}
1
+ (function(_0x420231,_0x717082){const _0xefdab6=a293_0x166a,_0xb8ddc=_0x420231();while(!![]){try{const _0x8b90eb=-parseInt(_0xefdab6(0x1b0))/0x1*(-parseInt(_0xefdab6(0x18b))/0x2)+-parseInt(_0xefdab6(0x1aa))/0x3*(-parseInt(_0xefdab6(0x188))/0x4)+-parseInt(_0xefdab6(0x1a4))/0x5+-parseInt(_0xefdab6(0x18a))/0x6+-parseInt(_0xefdab6(0x19a))/0x7*(-parseInt(_0xefdab6(0x1a7))/0x8)+parseInt(_0xefdab6(0x1a1))/0x9+-parseInt(_0xefdab6(0x1a9))/0xa*(parseInt(_0xefdab6(0x189))/0xb);if(_0x8b90eb===_0x717082)break;else _0xb8ddc['push'](_0xb8ddc['shift']());}catch(_0x513212){_0xb8ddc['push'](_0xb8ddc['shift']());}}}(a293_0x15bc,0x201a0));import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x40e995,_0x5402de,_0x2eaec1){const _0x249728=a293_0x166a,_0x487d0e=parseSchema(_0x40e995,_0x249728(0x190)),_0x1e7125=parseSchema(_0x5402de,'remote'),_0x54695d=collectLrSmartJsx(_0x487d0e,!![]);if(_0x54695d[_0x249728(0x1b2)]===0x0)return{'content':_0x40e995,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x46e1e5=new Map(collectLrSmartJsx(_0x1e7125)[_0x249728(0x19c)](_0x54e614=>[_0x54e614[_0x249728(0x1a2)],_0x54e614]));let _0x1eaa6c=0x0,_0x35b48f=0x0;for(const _0x44e90b of _0x54695d){const _0xb3232a=readNonEmptyString(_0x44e90b[_0x249728(0x195)][_0x249728(0x1ae)]),_0x3cfb51=readNonEmptyString(_0x44e90b[_0x249728(0x195)][_0x249728(0x19e)]),_0x4a8bc8=_0x46e1e5[_0x249728(0x197)](_0x44e90b[_0x249728(0x1a2)]),_0x4d3d49=readNonEmptyString(_0x4a8bc8?.['render'][_0x249728(0x1ae)]),_0x376dd2=readNonEmptyString(_0x4a8bc8?.[_0x249728(0x195)][_0x249728(0x19e)]);let _0xd3ccd1=![];_0x44e90b[_0x249728(0x195)][_0x249728(0x1b1)]!=='JSFunction'&&(_0x44e90b[_0x249728(0x195)][_0x249728(0x1b1)]=_0x249728(0x194),_0xd3ccd1=!![]);!isPageContextExpression(_0x44e90b[_0x249728(0x193)][_0x249728(0x199)])&&(_0x44e90b[_0x249728(0x193)][_0x249728(0x199)]={'type':_0x249728(0x196),'value':_0x249728(0x18c)},_0xd3ccd1=!![]);if(!_0xb3232a){if(!_0x3cfb51)throw CliErrors['validation'](_0x249728(0x198)+_0x44e90b[_0x249728(0x1ad)]+'\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.');if(_0xd3ccd1)_0x35b48f+=0x1;continue;}const _0x19ab73=!_0x4a8bc8||_0xb3232a!==_0x4d3d49,_0x2081f8=!_0x3cfb51;if(!_0x19ab73&&_0x3cfb51&&_0x376dd2&&_0x3cfb51!==_0x376dd2)throw CliErrors['validation'](_0x249728(0x198)+_0x44e90b[_0x249728(0x1ad)]+_0x249728(0x1a8),'Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.');if(_0x19ab73||_0x2081f8||!_0x376dd2){const _0x2a2b84=readNonEmptyString(await _0x2eaec1(_0xb3232a));if(!_0x2a2b84)throw CliErrors['apiError'](_0x249728(0x18d)+_0x44e90b['label']+'\x22.');_0x44e90b['render'][_0x249728(0x19e)]=_0x2a2b84,_0x1eaa6c+=0x1,_0xd3ccd1=!![];}if(_0xd3ccd1)_0x35b48f+=0x1;}if(_0x35b48f===0x0)return{'content':_0x40e995,'compiledNodes':_0x1eaa6c,'normalizedNodes':_0x35b48f};return{'content':JSON[_0x249728(0x191)](_0x487d0e),'compiledNodes':_0x1eaa6c,'normalizedNodes':_0x35b48f};}function a293_0x15bc(){const _0x4f529d=['props','JSFunction','render','JSExpression','get','LrSmartJsx\x20node\x20\x22','_context','7ivhpkr','push','map','forEach','value','componentName','\x22\x20has\x20missing\x20or\x20invalid\x20props.','120366eCsjlM','key','path:','206125lrYVQy','parse','string','1742360ENXLGB','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','17210baKMAV','21oTtoOE','trim','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','label','source','Invalid\x20JSON\x20in\x20','1fFzObx','type','length','LrSmartJsx','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','125132jVKGxt','451CcHeSt','1339722WWCOSd','32822BCokRA','this','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','entries','id:','local','stringify','validation'];a293_0x15bc=function(){return _0x4f529d;};return a293_0x15bc();}function parseSchema(_0x2a031f,_0x246354){const _0x52fe70=a293_0x166a;try{return JSON[_0x52fe70(0x1a5)](_0x2a031f);}catch{throw CliErrors[_0x52fe70(0x192)](_0x52fe70(0x1af)+_0x246354+'\x20page\x20schema.');}}function collectLrSmartJsx(_0x672570,_0x523e6f=![]){const _0x3e9dae=[],_0x386450=(_0x41b38e,_0x25eafc)=>{const _0x5299e4=a293_0x166a;if(Array['isArray'](_0x41b38e)){_0x41b38e[_0x5299e4(0x19d)]((_0x3ade03,_0x1ef96f)=>_0x386450(_0x3ade03,_0x25eafc+'['+_0x1ef96f+']'));return;}if(!isObject(_0x41b38e))return;if(_0x41b38e[_0x5299e4(0x19f)]===_0x5299e4(0x185)){const _0x3780f4=readNonEmptyString(_0x41b38e['id']),_0x1d7038=_0x3780f4||_0x25eafc,_0x498859=isObject(_0x41b38e[_0x5299e4(0x193)])?_0x41b38e[_0x5299e4(0x193)]:undefined;if(!_0x498859){if(_0x523e6f)throw CliErrors[_0x5299e4(0x192)]('LrSmartJsx\x20node\x20\x22'+_0x1d7038+_0x5299e4(0x1a0),_0x5299e4(0x187));return;}const _0x4fed9e=isObject(_0x498859[_0x5299e4(0x195)])?_0x498859[_0x5299e4(0x195)]:undefined;if(!_0x4fed9e){if(_0x523e6f)throw CliErrors[_0x5299e4(0x192)]('LrSmartJsx\x20node\x20\x22'+_0x1d7038+_0x5299e4(0x186),_0x5299e4(0x1ac));return;}_0x3e9dae[_0x5299e4(0x19b)]({'key':_0x3780f4?_0x5299e4(0x18f)+_0x3780f4:_0x5299e4(0x1a3)+_0x25eafc,'label':_0x1d7038,'props':_0x498859,'render':_0x4fed9e});}for(const [_0x176614,_0x4dc22d]of Object[_0x5299e4(0x18e)](_0x41b38e)){if(_0x176614==='props'&&_0x41b38e[_0x5299e4(0x19f)]==='LrSmartJsx')continue;_0x386450(_0x4dc22d,_0x25eafc+'.'+_0x176614);}};return _0x386450(_0x672570,'$'),_0x3e9dae;}function a293_0x166a(_0x30d74b,_0x57d2a0){_0x30d74b=_0x30d74b-0x185;const _0x15bcba=a293_0x15bc();let _0x166a3d=_0x15bcba[_0x30d74b];return _0x166a3d;}function isObject(_0x33a2e9){return Boolean(_0x33a2e9)&&typeof _0x33a2e9==='object'&&!Array['isArray'](_0x33a2e9);}function readNonEmptyString(_0x16c282){const _0x45d0a9=a293_0x166a;return typeof _0x16c282===_0x45d0a9(0x1a6)&&_0x16c282[_0x45d0a9(0x1ab)]()?_0x16c282:undefined;}function isPageContextExpression(_0x2e54c9){const _0x2e5600=a293_0x166a;return isObject(_0x2e54c9)&&_0x2e54c9[_0x2e5600(0x1b1)]===_0x2e5600(0x196)&&_0x2e54c9['value']===_0x2e5600(0x18c);}
@@ -1 +1 @@
1
- (function(_0x330a23,_0x2fadc8){const _0x17fd2f=a295_0x125e,_0x25640e=_0x330a23();while(!![]){try{const _0x2220fe=-parseInt(_0x17fd2f(0x151))/0x1+-parseInt(_0x17fd2f(0x148))/0x2+parseInt(_0x17fd2f(0x179))/0x3+parseInt(_0x17fd2f(0x14c))/0x4+-parseInt(_0x17fd2f(0x189))/0x5*(-parseInt(_0x17fd2f(0x18f))/0x6)+-parseInt(_0x17fd2f(0x184))/0x7+-parseInt(_0x17fd2f(0x15b))/0x8*(-parseInt(_0x17fd2f(0x161))/0x9);if(_0x2220fe===_0x2fadc8)break;else _0x25640e['push'](_0x25640e['shift']());}catch(_0x509d6b){_0x25640e['push'](_0x25640e['shift']());}}}(a295_0x361d,0xf352b));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x3d588c,_0x54a173){const _0x1d051b=a295_0x125e,_0x1cb4b7=[],_0x22581a=normalizeSqlForStaticAnalysis(_0x3d588c),_0x1f1299=(_0x22581a[_0x1d051b(0x14f)]?[]:extractJoinFacts(_0x22581a[_0x1d051b(0x18d)]))['map'](_0x148887=>{const _0x18559c=_0x1d051b;if(_0x148887[_0x18559c(0x16a)]||_0x148887[_0x18559c(0x170)]['length']===0x0)return _0x1cb4b7[_0x18559c(0x16e)]({'code':'JOIN_PREDICATE_UNSUPPORTED','table':_0x148887[_0x18559c(0x168)],'alias':_0x148887[_0x18559c(0x144)],'columns':_0x148887[_0x18559c(0x170)],'reason':_0x148887['unsupportedReason']??_0x18559c(0x169)}),{'table':_0x148887[_0x18559c(0x168)],'alias':_0x148887[_0x18559c(0x144)],'columns':_0x148887[_0x18559c(0x170)],'status':_0x18559c(0x181)};const _0x23c196=resolveTableMetadata(_0x54a173,_0x148887[_0x18559c(0x168)]),_0x50ada5=(_0x23c196?.[_0x18559c(0x18a)]??[])['map'](_0x5b8df2=>({'index':_0x5b8df2,'matchedPrefix':findEqualityPrefix(_0x5b8df2[_0x18559c(0x170)],_0x148887[_0x18559c(0x170)])}))[_0x18559c(0x14d)](_0x3fcdad=>_0x3fcdad['matchedPrefix'][_0x18559c(0x15e)]>0x0),_0x19d50d=_0x50ada5[_0x18559c(0x14b)]((_0x4d362e,_0x3af154)=>!_0x4d362e||_0x3af154[_0x18559c(0x167)][_0x18559c(0x15e)]>_0x4d362e['matchedPrefix']['length']?_0x3af154:_0x4d362e,_0x50ada5[0x0]);if(_0x19d50d)return{'table':_0x148887['table'],'alias':_0x148887['alias'],'columns':_0x148887[_0x18559c(0x170)],'status':_0x18559c(0x15c),'matchedIndex':{..._0x19d50d[_0x18559c(0x145)],'matchedPrefix':_0x19d50d[_0x18559c(0x167)]}};const _0x40b59e=_0x23c196?.[_0x18559c(0x18a)][_0x18559c(0x14d)](_0x2e00b2=>_0x2e00b2[_0x18559c(0x170)][_0x18559c(0x16b)](_0x180857=>_0x148887[_0x18559c(0x170)]['some'](_0x4599ac=>columnNamesMatch(_0x180857,_0x4599ac))))??[];if(_0x40b59e[_0x18559c(0x15e)]>0x0)return _0x1cb4b7[_0x18559c(0x16e)]({'code':_0x18559c(0x160),'table':_0x148887['table'],'alias':_0x148887[_0x18559c(0x144)],'columns':_0x148887[_0x18559c(0x170)],'reason':_0x18559c(0x147)}),{'table':_0x148887['table'],'alias':_0x148887[_0x18559c(0x144)],'columns':_0x148887['columns'],'status':_0x18559c(0x153),'candidateIndexes':_0x40b59e};if(_0x23c196&&_0x23c196['metadataAvailable']!==![]&&_0x23c196['indexes']['length']>0x0&&_0x148887[_0x18559c(0x170)][_0x18559c(0x15e)]>0x0)return _0x1cb4b7['push']({'code':'JOIN_INDEX_MISSING','table':_0x148887['table'],'alias':_0x148887['alias'],'columns':_0x148887['columns'],'reason':_0x18559c(0x172)}),{'table':_0x148887[_0x18559c(0x168)],'alias':_0x148887[_0x18559c(0x144)],'columns':_0x148887[_0x18559c(0x170)],'status':_0x18559c(0x153)};return _0x1cb4b7[_0x18559c(0x16e)]({'code':_0x18559c(0x182),'table':_0x148887[_0x18559c(0x168)],'alias':_0x148887[_0x18559c(0x144)],'columns':_0x148887[_0x18559c(0x170)],'reason':_0x23c196?_0x18559c(0x165):_0x18559c(0x17e)}),{'table':_0x148887[_0x18559c(0x168)],'alias':_0x148887[_0x18559c(0x144)],'columns':_0x148887['columns'],'status':_0x18559c(0x181)};});return{'checked':_0x1f1299[_0x1d051b(0x15e)]>0x0,'joins':_0x1f1299,'warnings':_0x1cb4b7};}function extractJoinFacts(_0x36d4a9){const _0x5bff08=a295_0x125e,_0x4c934e=maskNestedQueries(stripSqlNoise(_0x36d4a9)),_0x17dd1d=maskQuotedIdentifiers(_0x4c934e),_0x4e981d=[],_0x23b53c=new Set(),_0x4bde41=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x368d9a of _0x4c934e['matchAll'](_0x4bde41)){const _0x4fdd3c=_0x368d9a[_0x5bff08(0x145)]??0x0,_0x957592=_0x368d9a[0x0][_0x5bff08(0x14e)](/\bJOIN\b/i),_0x87e0de=_0x4fdd3c+Math[_0x5bff08(0x16f)](0x0,_0x957592);if(!/^JOIN\b/i['test'](_0x17dd1d[_0x5bff08(0x185)](_0x87e0de)))continue;_0x23b53c[_0x5bff08(0x150)](_0x87e0de);const _0x220083=normalizeIdentifier(_0x368d9a[0x1]||_0x5bff08(0x175)),_0x5845a6=normalizeIdentifier(_0x368d9a[0x2]??''),_0x46f501=normalizeIdentifier(_0x368d9a[0x3]||_0x5845a6[_0x5bff08(0x15a)]('.')['at'](-0x1)||_0x5845a6),_0x8aa53b=[],_0x3204d8=_0x5845a6===_0x5bff08(0x158);let _0x13e9a9=_0x220083===_0x5bff08(0x183)||_0x220083===_0x5bff08(0x186)||_0x3204d8,_0x28c60e=_0x13e9a9?_0x3204d8?_0x5bff08(0x15d):_0x220083[_0x5bff08(0x149)]()+'\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.':undefined;const _0x221e36=stripOuterParentheses(_0x368d9a[0x4]??''),_0x18f411=_0x221e36[_0x5bff08(0x166)](MYBATIS_DYNAMIC_START_MARKER)||_0x221e36['includes'](MYBATIS_DYNAMIC_END_MARKER),_0x4df16d=_0x221e36['includes'](MYBATIS_INCLUDE_MARKER);_0x18f411&&(_0x13e9a9=!![],_0x28c60e??=_0x5bff08(0x159));_0x4df16d&&(_0x13e9a9=!![],_0x28c60e??=_0x5bff08(0x17c));const _0x3805c7=_0x221e36['replaceAll'](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x5bff08(0x180)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x5bff08(0x180)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x3805c7,'OR')&&(_0x13e9a9=!![],_0x28c60e??=_0x5bff08(0x14a));for(const _0xf1230a of splitTopLevelAnd(_0x3805c7)){const _0x297cbd=stripOuterParentheses(_0xf1230a);if(hasTopLevelKeyword(_0x297cbd,'OR')){_0x13e9a9=!![],_0x28c60e??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x2c119c=splitEquality(_0x297cbd);if(!_0x2c119c){containsColumnReference(_0xf1230a,_0x46f501)&&(_0x13e9a9=!![]);continue;}const _0x100acc=parseDirectColumnReference(_0x2c119c[0x0],_0x46f501),_0x58814e=parseDirectColumnReference(_0x2c119c[0x1],_0x46f501),_0xa4dffb=containsColumnReference(_0x2c119c[0x0],_0x46f501),_0x4c0e8e=containsColumnReference(_0x2c119c[0x1],_0x46f501),_0x300f6e=_0x100acc&&!_0x4c0e8e?_0x100acc:_0x58814e&&!_0xa4dffb?_0x58814e:null;if(_0x300f6e&&!_0x8aa53b['includes'](_0x300f6e))_0x8aa53b[_0x5bff08(0x16e)](_0x300f6e);else!_0x300f6e&&containsColumnReference(_0xf1230a,_0x46f501)&&(_0x13e9a9=!![]);}_0x4e981d['push']({'table':_0x5845a6,'alias':_0x46f501,'columns':_0x8aa53b,'unsupportedPredicate':_0x13e9a9,'unsupportedReason':_0x28c60e,'containsUnresolvedInclude':_0x4df16d,'position':_0x87e0de});}for(const _0x2549a7 of _0x17dd1d['matchAll'](/\bJOIN\b/gi)){const _0x3dbff0=_0x2549a7['index']??0x0;if(_0x23b53c[_0x5bff08(0x18e)](_0x3dbff0))continue;const _0x4133ba=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x5bff08(0x162)](_0x4c934e[_0x5bff08(0x185)](_0x3dbff0+_0x2549a7[0x0][_0x5bff08(0x15e)])),_0xf9116e=normalizeIdentifier(_0x4133ba?.[0x1]||_0x5bff08(0x146)),_0x33cbb8=normalizeIdentifier(_0x4133ba?.[0x2]||''),_0x316c64=isSqlClauseKeyword(_0x33cbb8)?_0xf9116e['split']('.')['at'](-0x1)||_0xf9116e:_0x33cbb8||_0xf9116e['split']('.')['at'](-0x1)||_0xf9116e;_0x4e981d[_0x5bff08(0x16e)]({'table':_0xf9116e,'alias':_0x316c64,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x5bff08(0x178),'position':_0x3dbff0});}const _0x1ec7bb=_0x17dd1d['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x1ec7bb>=0x0&&!_0x4e981d[_0x5bff08(0x16b)](_0x360359=>_0x360359['containsUnresolvedInclude'])&&_0x4e981d[_0x5bff08(0x16e)]({'table':_0x5bff08(0x146),'alias':_0x5bff08(0x146),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x5bff08(0x156),'containsUnresolvedInclude':!![],'position':_0x1ec7bb}),_0x4e981d[_0x5bff08(0x173)]((_0xf6fb11,_0xfd3938)=>_0xf6fb11[_0x5bff08(0x163)]-_0xfd3938[_0x5bff08(0x163)]);}function stripSqlNoise(_0x5ce58b){const _0x538716=a295_0x125e,_0x5efff2=Array[_0x538716(0x17b)](_0x5ce58b),_0x19b94a=(_0x22899b,_0x4e3a56)=>{for(let _0x21fdeb=_0x22899b;_0x21fdeb<_0x4e3a56;_0x21fdeb+=0x1){_0x5efff2[_0x21fdeb]!=='\x0a'&&_0x5efff2[_0x21fdeb]!=='\x0d'&&(_0x5efff2[_0x21fdeb]='\x20');}};for(let _0x28093d=0x0;_0x28093d<_0x5efff2[_0x538716(0x15e)];_0x28093d+=0x1){const _0x3a879d=_0x5efff2[_0x28093d],_0x5cfb05=_0x5efff2[_0x28093d+0x1];if(_0x3a879d==='\x27'||_0x3a879d==='\x22'||_0x3a879d==='`'){const _0x5f326f=_0x3a879d,_0x2947e1=_0x28093d;_0x28093d+=0x1;while(_0x28093d<_0x5efff2[_0x538716(0x15e)]){if(_0x5efff2[_0x28093d]==='\x5c'&&_0x28093d+0x1<_0x5efff2[_0x538716(0x15e)]){_0x28093d+=0x2;continue;}if(_0x5efff2[_0x28093d]!==_0x5f326f){_0x28093d+=0x1;continue;}if(_0x5efff2[_0x28093d+0x1]===_0x5f326f){_0x28093d+=0x2;continue;}break;}if(_0x5f326f==='\x27')_0x19b94a(_0x2947e1,Math[_0x538716(0x176)](_0x28093d+0x1,_0x5efff2['length']));continue;}if(_0x3a879d==='-'&&_0x5cfb05==='-'){const _0x2b9066=_0x28093d;while(_0x28093d<_0x5efff2[_0x538716(0x15e)]&&_0x5efff2[_0x28093d]!=='\x0a')_0x28093d+=0x1;_0x19b94a(_0x2b9066,_0x28093d);continue;}if(_0x3a879d==='/'&&_0x5cfb05==='*'){const _0x2b1cf9=_0x28093d;_0x28093d+=0x2;while(_0x28093d<_0x5efff2[_0x538716(0x15e)]&&!(_0x5efff2[_0x28093d]==='*'&&_0x5efff2[_0x28093d+0x1]==='/')){_0x28093d+=0x1;}_0x28093d=Math[_0x538716(0x176)](_0x28093d+0x1,_0x5efff2[_0x538716(0x15e)]-0x1),_0x19b94a(_0x2b1cf9,_0x28093d+0x1);continue;}if(_0x3a879d==='#'&&_0x5cfb05!=='{'){const _0x26b07a=_0x28093d;while(_0x28093d<_0x5efff2['length']&&_0x5efff2[_0x28093d]!=='\x0a')_0x28093d+=0x1;_0x19b94a(_0x26b07a,_0x28093d);continue;}if((_0x3a879d==='#'||_0x3a879d==='$')&&_0x5cfb05==='{'){const _0x39e229=_0x28093d;_0x28093d+=0x2;while(_0x28093d<_0x5efff2[_0x538716(0x15e)]&&_0x5efff2[_0x28093d]!=='}')_0x28093d+=0x1;_0x19b94a(_0x39e229,Math[_0x538716(0x176)](_0x28093d+0x1,_0x5efff2['length']));}}return _0x5efff2[_0x538716(0x16c)]('');}function maskQuotedIdentifiers(_0x451b27){const _0x111e6d=a295_0x125e,_0x18cb59=Array['from'](_0x451b27);for(let _0x1c59e3=0x0;_0x1c59e3<_0x18cb59[_0x111e6d(0x15e)];_0x1c59e3+=0x1){const _0x54bafa=_0x18cb59[_0x1c59e3];if(_0x54bafa!=='\x22'&&_0x54bafa!=='`')continue;_0x1c59e3+=0x1;while(_0x1c59e3<_0x18cb59[_0x111e6d(0x15e)]){if(_0x18cb59[_0x1c59e3]===_0x54bafa){if(_0x18cb59[_0x1c59e3+0x1]===_0x54bafa){_0x18cb59[_0x1c59e3]='\x20',_0x18cb59[_0x1c59e3+0x1]='\x20',_0x1c59e3+=0x2;continue;}break;}_0x18cb59[_0x1c59e3]='\x20',_0x1c59e3+=0x1;}}return _0x18cb59['join']('');}function maskNestedQueries(_0x14adb7){const _0x458f07=a295_0x125e,_0x2dc873=Array[_0x458f07(0x17b)](_0x14adb7);for(let _0x2f733e=0x0;_0x2f733e<_0x2dc873['length'];_0x2f733e+=0x1){if(_0x2dc873[_0x2f733e]!=='(')continue;const _0x39f59a=_0x14adb7['slice'](_0x2f733e+0x1);if(!/^\s*(?:SELECT|WITH)\b/i['test'](_0x39f59a))continue;let _0x572438=0x1,_0x1c507c=_0x2f733e+0x1;for(;_0x1c507c<_0x2dc873['length']&&_0x572438>0x0;_0x1c507c+=0x1){if(_0x2dc873[_0x1c507c]==='(')_0x572438+=0x1;if(_0x2dc873[_0x1c507c]===')')_0x572438-=0x1;}if(_0x572438!==0x0)continue;for(let _0x3efcda=_0x2f733e;_0x3efcda<_0x1c507c;_0x3efcda+=0x1){_0x2dc873[_0x3efcda]='\x20';}const _0x3d56fa=_0x458f07(0x158);for(let _0x512ed3=0x0;_0x512ed3<_0x3d56fa[_0x458f07(0x15e)]&&_0x2f733e+_0x512ed3<_0x1c507c;_0x512ed3+=0x1){_0x2dc873[_0x2f733e+_0x512ed3]=_0x3d56fa[_0x512ed3];}_0x2f733e=_0x1c507c-0x1;}return _0x2dc873[_0x458f07(0x16c)]('');}function splitTopLevelAnd(_0x1b6205){const _0x386fe0=a295_0x125e,_0x26bfcc=[];let _0x3918cb=0x0,_0x2533a2=0x0;for(let _0x3d3589=0x0;_0x3d3589<_0x1b6205[_0x386fe0(0x15e)];_0x3d3589+=0x1){const _0x4ef96c=_0x1b6205[_0x3d3589];if(_0x4ef96c==='(')_0x3918cb+=0x1;if(_0x4ef96c===')')_0x3918cb=Math[_0x386fe0(0x16f)](0x0,_0x3918cb-0x1);_0x3918cb===0x0&&_0x1b6205[_0x386fe0(0x185)](_0x3d3589)[_0x386fe0(0x154)](/^AND\b/i)&&(_0x3d3589===0x0||/\s/[_0x386fe0(0x152)](_0x1b6205[_0x3d3589-0x1]??''))&&(_0x26bfcc['push'](_0x1b6205[_0x386fe0(0x185)](_0x2533a2,_0x3d3589)[_0x386fe0(0x17a)]()),_0x3d3589+=0x2,_0x2533a2=_0x3d3589+0x1);}const _0x558c97=_0x1b6205[_0x386fe0(0x185)](_0x2533a2)['trim']();if(_0x558c97)_0x26bfcc['push'](_0x558c97);return _0x26bfcc;}function hasTopLevelKeyword(_0x51472f,_0x4b6033){const _0x5496f0=a295_0x125e;let _0xf017f1=0x0;for(let _0x2f292a=0x0;_0x2f292a<_0x51472f[_0x5496f0(0x15e)];_0x2f292a+=0x1){const _0x2fe77e=_0x51472f[_0x2f292a];if(_0x2fe77e==='(')_0xf017f1+=0x1;if(_0x2fe77e===')')_0xf017f1=Math[_0x5496f0(0x16f)](0x0,_0xf017f1-0x1);if(_0xf017f1!==0x0)continue;const _0x122add=_0x51472f['slice'](_0x2f292a,_0x2f292a+_0x4b6033[_0x5496f0(0x15e)]),_0x63de86=_0x51472f[_0x2f292a-0x1]??'\x20',_0x4c1001=_0x51472f[_0x2f292a+_0x4b6033[_0x5496f0(0x15e)]]??'\x20';if(_0x122add[_0x5496f0(0x149)]()===_0x4b6033['toUpperCase']()&&!/[\w$]/[_0x5496f0(0x152)](_0x63de86)&&!/[\w$]/[_0x5496f0(0x152)](_0x4c1001))return!![];}return![];}function splitEquality(_0x222e1a){const _0x11fb29=a295_0x125e,_0x2acfca=stripOuterParentheses(_0x222e1a);let _0x523874=0x0,_0x44979d;for(let _0x1098a8=0x0;_0x1098a8<_0x2acfca[_0x11fb29(0x15e)];_0x1098a8+=0x1){const _0x5283cc=_0x2acfca[_0x1098a8];if(_0x5283cc==='(')_0x523874+=0x1;if(_0x5283cc===')')_0x523874=Math[_0x11fb29(0x16f)](0x0,_0x523874-0x1);const _0x335eb7=_0x2acfca[_0x1098a8-0x1]??'',_0x92908d=_0x2acfca[_0x1098a8+0x1]??'';if(_0x5283cc==='='&&_0x523874===0x0&&!/[!<>=:]/[_0x11fb29(0x152)](_0x335eb7)&&_0x92908d!=='='){if(_0x44979d!==undefined)return null;_0x44979d=_0x1098a8;}}return _0x44979d===undefined?null:[_0x2acfca['slice'](0x0,_0x44979d)[_0x11fb29(0x17a)](),_0x2acfca['slice'](_0x44979d+0x1)[_0x11fb29(0x17a)]()];}function a295_0x125e(_0x731164,_0x2a855d){_0x731164=_0x731164-0x144;const _0x361dfd=a295_0x361d();let _0x125e73=_0x361dfd[_0x731164];return _0x125e73;}function parseDirectColumnReference(_0x22e01d,_0x6d6e1d){const _0x3d4b29=a295_0x125e,_0x51c224=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x3d4b29(0x162)](stripOuterParentheses(_0x22e01d));if(!_0x51c224)return null;if(normalizeIdentifier(_0x51c224[0x1]??'')!==normalizeIdentifier(_0x6d6e1d))return null;return normalizeIdentifier(_0x51c224[0x2]??'');}function containsColumnReference(_0x2d36cf,_0x416b18){const _0x3ab994=a295_0x125e,_0x565735=_0x2d36cf[_0x3ab994(0x18b)](/[`"]/g,''),_0x1aa3fe=_0x416b18[_0x3ab994(0x18b)](/[.*+?^${}()|[\]\\]/g,_0x3ab994(0x188));return new RegExp(_0x3ab994(0x171)+_0x1aa3fe+_0x3ab994(0x174),'i')[_0x3ab994(0x152)](_0x565735);}function a295_0x361d(){const _0x148f55=['join','startsWith','push','max','columns','(?:^|[^\x5cw$])','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','sort','\x5cs*\x5c.\x5cs*[\x5cw$]+','INNER','min','cross','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','3133881xnqMxo','trim','from','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','natural','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','left','replaceAll','unavailable','INDEX_METADATA_UNAVAILABLE','right','3094518vkuGjp','slice','full','endsWith','\x5c$&','15dTuymZ','indexes','replace','toLowerCase','sql','has','3970236qrfmkC','alias','index','unknown','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','2721922AddTjI','toUpperCase','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','reduce','5403900XPNJCh','filter','search','error','add','1606048SGxQcE','test','warning','match','map','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','where','__sq__','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','split','528byBOON','covered','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','length','using','JOIN_INDEX_NOT_USABLE','3411GaDtoO','exec','position','inner','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','includes','matchedPrefix','table','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','unsupportedPredicate','some'];a295_0x361d=function(){return _0x148f55;};return a295_0x361d();}function findEqualityPrefix(_0x2932c4,_0x10645e){const _0x2130d8=a295_0x125e,_0x3de1cd=new Set(_0x10645e[_0x2130d8(0x155)](normalizeIdentifier)),_0x10e05b=[];for(const _0x2ce0b6 of _0x2932c4){if(!_0x3de1cd[_0x2130d8(0x18e)](normalizeIdentifier(_0x2ce0b6)))break;_0x10e05b['push'](_0x2ce0b6);}return _0x10e05b;}function resolveTableMetadata(_0x1eea80,_0x57d954){const _0x509494=a295_0x125e,_0xa58314=normalizeIdentifier(_0x57d954),_0x438473=_0x1eea80['filter'](_0x12c657=>normalizeIdentifier(_0x12c657['tableName'])===_0xa58314);if(_0x438473[_0x509494(0x15e)]===0x1)return _0x438473[0x0];const _0x24971c=_0xa58314['includes']('.'),_0x4efb72=_0xa58314[_0x509494(0x15a)]('.')['at'](-0x1),_0x2be6fd=_0x1eea80[_0x509494(0x14d)](_0x17d1b7=>{const _0x2da354=_0x509494,_0x51a133=normalizeIdentifier(_0x17d1b7['tableName']);if(_0x24971c&&_0x51a133[_0x2da354(0x166)]('.'))return![];return _0x51a133['split']('.')['at'](-0x1)===_0x4efb72;});return _0x2be6fd['length']===0x1?_0x2be6fd[0x0]:undefined;}function columnNamesMatch(_0x29971c,_0x59ee0e){return normalizeIdentifier(_0x29971c)===normalizeIdentifier(_0x59ee0e);}function normalizeIdentifier(_0x1244dd){const _0x11bdf6=a295_0x125e;return _0x1244dd[_0x11bdf6(0x18b)](/[`"]/g,'')[_0x11bdf6(0x17a)]()[_0x11bdf6(0x18c)]();}function isSqlClauseKeyword(_0x1a5172){const _0x4b8eb8=a295_0x125e;return new Set(['on',_0x4b8eb8(0x15f),_0x4b8eb8(0x157),'join',_0x4b8eb8(0x164),_0x4b8eb8(0x17f),_0x4b8eb8(0x183),_0x4b8eb8(0x186),_0x4b8eb8(0x177),_0x4b8eb8(0x17d)])[_0x4b8eb8(0x18e)](_0x1a5172);}function stripOuterParentheses(_0x389a58){const _0x1643e9=a295_0x125e;let _0x3823b3=_0x389a58[_0x1643e9(0x17a)]();while(_0x3823b3[_0x1643e9(0x16d)]('(')&&_0x3823b3[_0x1643e9(0x187)](')')){let _0x3a6607=0x0,_0x8a15a6=!![];for(let _0x261c91=0x0;_0x261c91<_0x3823b3[_0x1643e9(0x15e)];_0x261c91+=0x1){if(_0x3823b3[_0x261c91]==='(')_0x3a6607+=0x1;if(_0x3823b3[_0x261c91]===')')_0x3a6607-=0x1;if(_0x3a6607===0x0&&_0x261c91<_0x3823b3[_0x1643e9(0x15e)]-0x1){_0x8a15a6=![];break;}}if(!_0x8a15a6||_0x3a6607!==0x0)break;_0x3823b3=_0x3823b3['slice'](0x1,-0x1)[_0x1643e9(0x17a)]();}return _0x3823b3;}
1
+ (function(_0x95a7d,_0x4fbba7){const _0x580459=a295_0x3052,_0x48bfdd=_0x95a7d();while(!![]){try{const _0x5e4a6e=parseInt(_0x580459(0x1c5))/0x1*(parseInt(_0x580459(0x1ea))/0x2)+-parseInt(_0x580459(0x210))/0x3*(parseInt(_0x580459(0x1fb))/0x4)+-parseInt(_0x580459(0x1e9))/0x5+-parseInt(_0x580459(0x20e))/0x6+parseInt(_0x580459(0x1c7))/0x7+-parseInt(_0x580459(0x1de))/0x8+-parseInt(_0x580459(0x1df))/0x9*(-parseInt(_0x580459(0x1f6))/0xa);if(_0x5e4a6e===_0x4fbba7)break;else _0x48bfdd['push'](_0x48bfdd['shift']());}catch(_0x3e6291){_0x48bfdd['push'](_0x48bfdd['shift']());}}}(a295_0x47b7,0xc66f2));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x564c4f,_0x95d81a){const _0xdf4b82=a295_0x3052,_0x54c3f5=[],_0x14eb72=normalizeSqlForStaticAnalysis(_0x564c4f),_0x30927f=(_0x14eb72['error']?[]:extractJoinFacts(_0x14eb72[_0xdf4b82(0x202)]))[_0xdf4b82(0x1d4)](_0x8b5e23=>{const _0x275018=_0xdf4b82;if(_0x8b5e23[_0x275018(0x1e4)]||_0x8b5e23[_0x275018(0x1cb)][_0x275018(0x1f8)]===0x0)return _0x54c3f5[_0x275018(0x1e3)]({'code':_0x275018(0x204),'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23['alias'],'columns':_0x8b5e23[_0x275018(0x1cb)],'reason':_0x8b5e23['unsupportedReason']??_0x275018(0x1d3)}),{'table':_0x8b5e23['table'],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'status':_0x275018(0x208)};const _0x3479b4=resolveTableMetadata(_0x95d81a,_0x8b5e23['table']),_0xe1f5e=(_0x3479b4?.['indexes']??[])['map'](_0x4aa281=>({'index':_0x4aa281,'matchedPrefix':findEqualityPrefix(_0x4aa281[_0x275018(0x1cb)],_0x8b5e23[_0x275018(0x1cb)])}))[_0x275018(0x1e7)](_0x1985fe=>_0x1985fe['matchedPrefix'][_0x275018(0x1f8)]>0x0),_0x22e363=_0xe1f5e['reduce']((_0x42ffa5,_0x1315b4)=>!_0x42ffa5||_0x1315b4[_0x275018(0x1ec)][_0x275018(0x1f8)]>_0x42ffa5[_0x275018(0x1ec)]['length']?_0x1315b4:_0x42ffa5,_0xe1f5e[0x0]);if(_0x22e363)return{'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23['columns'],'status':_0x275018(0x1ff),'matchedIndex':{..._0x22e363[_0x275018(0x1ef)],'matchedPrefix':_0x22e363[_0x275018(0x1ec)]}};const _0x371d7b=_0x3479b4?.[_0x275018(0x1d1)][_0x275018(0x1e7)](_0x2a3f28=>_0x2a3f28[_0x275018(0x1cb)]['some'](_0x50826a=>_0x8b5e23['columns']['some'](_0x97b264=>columnNamesMatch(_0x50826a,_0x97b264))))??[];if(_0x371d7b[_0x275018(0x1f8)]>0x0)return _0x54c3f5[_0x275018(0x1e3)]({'code':_0x275018(0x20a),'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23['columns'],'reason':_0x275018(0x1e8)}),{'table':_0x8b5e23['table'],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23['columns'],'status':'warning','candidateIndexes':_0x371d7b};if(_0x3479b4&&_0x3479b4[_0x275018(0x1f3)]!==![]&&_0x3479b4[_0x275018(0x1d1)][_0x275018(0x1f8)]>0x0&&_0x8b5e23[_0x275018(0x1cb)][_0x275018(0x1f8)]>0x0)return _0x54c3f5['push']({'code':_0x275018(0x1d7),'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'reason':_0x275018(0x20c)}),{'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'status':_0x275018(0x1c6)};return _0x54c3f5[_0x275018(0x1e3)]({'code':_0x275018(0x1db),'table':_0x8b5e23[_0x275018(0x1f1)],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'reason':_0x3479b4?_0x275018(0x212):_0x275018(0x206)}),{'table':_0x8b5e23['table'],'alias':_0x8b5e23[_0x275018(0x20f)],'columns':_0x8b5e23[_0x275018(0x1cb)],'status':_0x275018(0x208)};});return{'checked':_0x30927f['length']>0x0,'joins':_0x30927f,'warnings':_0x54c3f5};}function extractJoinFacts(_0x5186b4){const _0x208ddc=a295_0x3052,_0x1c767f=maskNestedQueries(stripSqlNoise(_0x5186b4)),_0x379db2=maskQuotedIdentifiers(_0x1c767f),_0x5a8aa3=[],_0xe08130=new Set(),_0x5c1684=/\b(?:(INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?\s+ON\s+([\s\S]*?)(?=\s+(?:(?:(?:INNER|LEFT|RIGHT|FULL)(?:\s+OUTER)?\s+)?JOIN\b|(?:WHERE|GROUP\s+BY|ORDER\s+BY|HAVING|LIMIT|UNION)\b)|;|$)/gi;for(const _0x3c2de8 of _0x1c767f[_0x208ddc(0x20d)](_0x5c1684)){const _0x5fba63=_0x3c2de8[_0x208ddc(0x1ef)]??0x0,_0x52d13f=_0x3c2de8[0x0][_0x208ddc(0x1f7)](/\bJOIN\b/i),_0x35b548=_0x5fba63+Math['max'](0x0,_0x52d13f);if(!/^JOIN\b/i[_0x208ddc(0x203)](_0x379db2['slice'](_0x35b548)))continue;_0xe08130['add'](_0x35b548);const _0x46bcce=normalizeIdentifier(_0x3c2de8[0x1]||_0x208ddc(0x1fc)),_0xf1851b=normalizeIdentifier(_0x3c2de8[0x2]??''),_0x25bc38=normalizeIdentifier(_0x3c2de8[0x3]||_0xf1851b[_0x208ddc(0x1fd)]('.')['at'](-0x1)||_0xf1851b),_0x420077=[],_0x341d03=_0xf1851b===_0x208ddc(0x1cf);let _0x44e384=_0x46bcce===_0x208ddc(0x1e0)||_0x46bcce===_0x208ddc(0x1dd)||_0x341d03,_0x48c089=_0x44e384?_0x341d03?_0x208ddc(0x1fe):_0x46bcce[_0x208ddc(0x1f2)]()+_0x208ddc(0x1d0):undefined;const _0x301aec=stripOuterParentheses(_0x3c2de8[0x4]??''),_0x2ba56b=_0x301aec['includes'](MYBATIS_DYNAMIC_START_MARKER)||_0x301aec[_0x208ddc(0x1eb)](MYBATIS_DYNAMIC_END_MARKER),_0x571a06=_0x301aec['includes'](MYBATIS_INCLUDE_MARKER);_0x2ba56b&&(_0x44e384=!![],_0x48c089??=_0x208ddc(0x1d2));_0x571a06&&(_0x44e384=!![],_0x48c089??=_0x208ddc(0x1cd));const _0x49303f=_0x301aec[_0x208ddc(0x1f4)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x208ddc(0x1f4)](MYBATIS_DYNAMIC_END_MARKER,'\x20')['replaceAll'](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x49303f,'OR')&&(_0x44e384=!![],_0x48c089??=_0x208ddc(0x1e2));for(const _0xd2dfb of splitTopLevelAnd(_0x49303f)){const _0x34bd5c=stripOuterParentheses(_0xd2dfb);if(hasTopLevelKeyword(_0x34bd5c,'OR')){_0x44e384=!![],_0x48c089??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x5ba7a1=splitEquality(_0x34bd5c);if(!_0x5ba7a1){containsColumnReference(_0xd2dfb,_0x25bc38)&&(_0x44e384=!![]);continue;}const _0x13b5b5=parseDirectColumnReference(_0x5ba7a1[0x0],_0x25bc38),_0x35475d=parseDirectColumnReference(_0x5ba7a1[0x1],_0x25bc38),_0x25eb51=containsColumnReference(_0x5ba7a1[0x0],_0x25bc38),_0x2c33cd=containsColumnReference(_0x5ba7a1[0x1],_0x25bc38),_0x1f0cc3=_0x13b5b5&&!_0x2c33cd?_0x13b5b5:_0x35475d&&!_0x25eb51?_0x35475d:null;if(_0x1f0cc3&&!_0x420077['includes'](_0x1f0cc3))_0x420077['push'](_0x1f0cc3);else!_0x1f0cc3&&containsColumnReference(_0xd2dfb,_0x25bc38)&&(_0x44e384=!![]);}_0x5a8aa3['push']({'table':_0xf1851b,'alias':_0x25bc38,'columns':_0x420077,'unsupportedPredicate':_0x44e384,'unsupportedReason':_0x48c089,'containsUnresolvedInclude':_0x571a06,'position':_0x35b548});}for(const _0xbd21dd of _0x379db2['matchAll'](/\bJOIN\b/gi)){const _0x3361ba=_0xbd21dd[_0x208ddc(0x1ef)]??0x0;if(_0xe08130[_0x208ddc(0x1fa)](_0x3361ba))continue;const _0xe2f598=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x208ddc(0x1e6)](_0x1c767f['slice'](_0x3361ba+_0xbd21dd[0x0][_0x208ddc(0x1f8)])),_0x1f35c8=normalizeIdentifier(_0xe2f598?.[0x1]||'unknown'),_0x2ad0c9=normalizeIdentifier(_0xe2f598?.[0x2]||''),_0x2dacbd=isSqlClauseKeyword(_0x2ad0c9)?_0x1f35c8[_0x208ddc(0x1fd)]('.')['at'](-0x1)||_0x1f35c8:_0x2ad0c9||_0x1f35c8[_0x208ddc(0x1fd)]('.')['at'](-0x1)||_0x1f35c8;_0x5a8aa3['push']({'table':_0x1f35c8,'alias':_0x2dacbd,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x208ddc(0x1c9),'position':_0x3361ba});}const _0x10e978=_0x379db2['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x10e978>=0x0&&!_0x5a8aa3[_0x208ddc(0x200)](_0x4710b7=>_0x4710b7[_0x208ddc(0x1d5)])&&_0x5a8aa3[_0x208ddc(0x1e3)]({'table':_0x208ddc(0x20b),'alias':_0x208ddc(0x20b),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x208ddc(0x1c8),'containsUnresolvedInclude':!![],'position':_0x10e978}),_0x5a8aa3['sort']((_0x35cd2e,_0x36d32d)=>_0x35cd2e[_0x208ddc(0x205)]-_0x36d32d[_0x208ddc(0x205)]);}function stripSqlNoise(_0x4838d6){const _0x499909=a295_0x3052,_0x3031ee=Array['from'](_0x4838d6),_0x505bf8=(_0x4b19a7,_0x14d86f)=>{for(let _0x2b29db=_0x4b19a7;_0x2b29db<_0x14d86f;_0x2b29db+=0x1){_0x3031ee[_0x2b29db]!=='\x0a'&&_0x3031ee[_0x2b29db]!=='\x0d'&&(_0x3031ee[_0x2b29db]='\x20');}};for(let _0xe65b1b=0x0;_0xe65b1b<_0x3031ee[_0x499909(0x1f8)];_0xe65b1b+=0x1){const _0xdffd53=_0x3031ee[_0xe65b1b],_0x533107=_0x3031ee[_0xe65b1b+0x1];if(_0xdffd53==='\x27'||_0xdffd53==='\x22'||_0xdffd53==='`'){const _0x26dfd6=_0xdffd53,_0x5974a0=_0xe65b1b;_0xe65b1b+=0x1;while(_0xe65b1b<_0x3031ee['length']){if(_0x3031ee[_0xe65b1b]==='\x5c'&&_0xe65b1b+0x1<_0x3031ee[_0x499909(0x1f8)]){_0xe65b1b+=0x2;continue;}if(_0x3031ee[_0xe65b1b]!==_0x26dfd6){_0xe65b1b+=0x1;continue;}if(_0x3031ee[_0xe65b1b+0x1]===_0x26dfd6){_0xe65b1b+=0x2;continue;}break;}if(_0x26dfd6==='\x27')_0x505bf8(_0x5974a0,Math[_0x499909(0x1d6)](_0xe65b1b+0x1,_0x3031ee['length']));continue;}if(_0xdffd53==='-'&&_0x533107==='-'){const _0xdf462e=_0xe65b1b;while(_0xe65b1b<_0x3031ee[_0x499909(0x1f8)]&&_0x3031ee[_0xe65b1b]!=='\x0a')_0xe65b1b+=0x1;_0x505bf8(_0xdf462e,_0xe65b1b);continue;}if(_0xdffd53==='/'&&_0x533107==='*'){const _0x5b7c24=_0xe65b1b;_0xe65b1b+=0x2;while(_0xe65b1b<_0x3031ee['length']&&!(_0x3031ee[_0xe65b1b]==='*'&&_0x3031ee[_0xe65b1b+0x1]==='/')){_0xe65b1b+=0x1;}_0xe65b1b=Math['min'](_0xe65b1b+0x1,_0x3031ee[_0x499909(0x1f8)]-0x1),_0x505bf8(_0x5b7c24,_0xe65b1b+0x1);continue;}if(_0xdffd53==='#'&&_0x533107!=='{'){const _0x481349=_0xe65b1b;while(_0xe65b1b<_0x3031ee[_0x499909(0x1f8)]&&_0x3031ee[_0xe65b1b]!=='\x0a')_0xe65b1b+=0x1;_0x505bf8(_0x481349,_0xe65b1b);continue;}if((_0xdffd53==='#'||_0xdffd53==='$')&&_0x533107==='{'){const _0x181572=_0xe65b1b;_0xe65b1b+=0x2;while(_0xe65b1b<_0x3031ee['length']&&_0x3031ee[_0xe65b1b]!=='}')_0xe65b1b+=0x1;_0x505bf8(_0x181572,Math['min'](_0xe65b1b+0x1,_0x3031ee[_0x499909(0x1f8)]));}}return _0x3031ee[_0x499909(0x1e1)]('');}function maskQuotedIdentifiers(_0x2ce868){const _0x404652=a295_0x3052,_0x27be75=Array['from'](_0x2ce868);for(let _0x29b794=0x0;_0x29b794<_0x27be75[_0x404652(0x1f8)];_0x29b794+=0x1){const _0x2a5692=_0x27be75[_0x29b794];if(_0x2a5692!=='\x22'&&_0x2a5692!=='`')continue;_0x29b794+=0x1;while(_0x29b794<_0x27be75[_0x404652(0x1f8)]){if(_0x27be75[_0x29b794]===_0x2a5692){if(_0x27be75[_0x29b794+0x1]===_0x2a5692){_0x27be75[_0x29b794]='\x20',_0x27be75[_0x29b794+0x1]='\x20',_0x29b794+=0x2;continue;}break;}_0x27be75[_0x29b794]='\x20',_0x29b794+=0x1;}}return _0x27be75['join']('');}function maskNestedQueries(_0x4730da){const _0x3c0c1f=a295_0x3052,_0x2c39bf=Array[_0x3c0c1f(0x1f0)](_0x4730da);for(let _0x3faa5a=0x0;_0x3faa5a<_0x2c39bf[_0x3c0c1f(0x1f8)];_0x3faa5a+=0x1){if(_0x2c39bf[_0x3faa5a]!=='(')continue;const _0x365642=_0x4730da[_0x3c0c1f(0x1e5)](_0x3faa5a+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x3c0c1f(0x203)](_0x365642))continue;let _0x5904b5=0x1,_0x30ae67=_0x3faa5a+0x1;for(;_0x30ae67<_0x2c39bf[_0x3c0c1f(0x1f8)]&&_0x5904b5>0x0;_0x30ae67+=0x1){if(_0x2c39bf[_0x30ae67]==='(')_0x5904b5+=0x1;if(_0x2c39bf[_0x30ae67]===')')_0x5904b5-=0x1;}if(_0x5904b5!==0x0)continue;for(let _0x32d125=_0x3faa5a;_0x32d125<_0x30ae67;_0x32d125+=0x1){_0x2c39bf[_0x32d125]='\x20';}const _0x12fb8e=_0x3c0c1f(0x1cf);for(let _0x410559=0x0;_0x410559<_0x12fb8e['length']&&_0x3faa5a+_0x410559<_0x30ae67;_0x410559+=0x1){_0x2c39bf[_0x3faa5a+_0x410559]=_0x12fb8e[_0x410559];}_0x3faa5a=_0x30ae67-0x1;}return _0x2c39bf[_0x3c0c1f(0x1e1)]('');}function splitTopLevelAnd(_0xa98603){const _0x323969=a295_0x3052,_0x2e7a72=[];let _0x1be3da=0x0,_0x5dde73=0x0;for(let _0x52bf23=0x0;_0x52bf23<_0xa98603[_0x323969(0x1f8)];_0x52bf23+=0x1){const _0x333ef0=_0xa98603[_0x52bf23];if(_0x333ef0==='(')_0x1be3da+=0x1;if(_0x333ef0===')')_0x1be3da=Math[_0x323969(0x1d9)](0x0,_0x1be3da-0x1);_0x1be3da===0x0&&_0xa98603[_0x323969(0x1e5)](_0x52bf23)[_0x323969(0x1cc)](/^AND\b/i)&&(_0x52bf23===0x0||/\s/[_0x323969(0x203)](_0xa98603[_0x52bf23-0x1]??''))&&(_0x2e7a72['push'](_0xa98603[_0x323969(0x1e5)](_0x5dde73,_0x52bf23)[_0x323969(0x201)]()),_0x52bf23+=0x2,_0x5dde73=_0x52bf23+0x1);}const _0x32fa53=_0xa98603['slice'](_0x5dde73)[_0x323969(0x201)]();if(_0x32fa53)_0x2e7a72[_0x323969(0x1e3)](_0x32fa53);return _0x2e7a72;}function hasTopLevelKeyword(_0x211b31,_0x428578){const _0x597c34=a295_0x3052;let _0x4b163c=0x0;for(let _0x3d8e23=0x0;_0x3d8e23<_0x211b31['length'];_0x3d8e23+=0x1){const _0x2e0667=_0x211b31[_0x3d8e23];if(_0x2e0667==='(')_0x4b163c+=0x1;if(_0x2e0667===')')_0x4b163c=Math[_0x597c34(0x1d9)](0x0,_0x4b163c-0x1);if(_0x4b163c!==0x0)continue;const _0x1d1074=_0x211b31[_0x597c34(0x1e5)](_0x3d8e23,_0x3d8e23+_0x428578[_0x597c34(0x1f8)]),_0x4dc4f0=_0x211b31[_0x3d8e23-0x1]??'\x20',_0x4b7e59=_0x211b31[_0x3d8e23+_0x428578[_0x597c34(0x1f8)]]??'\x20';if(_0x1d1074['toUpperCase']()===_0x428578['toUpperCase']()&&!/[\w$]/['test'](_0x4dc4f0)&&!/[\w$]/[_0x597c34(0x203)](_0x4b7e59))return!![];}return![];}function splitEquality(_0x23f0ae){const _0x2265b1=a295_0x3052,_0x483fe9=stripOuterParentheses(_0x23f0ae);let _0x2e91e1=0x0,_0x266f84;for(let _0x21250e=0x0;_0x21250e<_0x483fe9[_0x2265b1(0x1f8)];_0x21250e+=0x1){const _0x561b1f=_0x483fe9[_0x21250e];if(_0x561b1f==='(')_0x2e91e1+=0x1;if(_0x561b1f===')')_0x2e91e1=Math[_0x2265b1(0x1d9)](0x0,_0x2e91e1-0x1);const _0xff779a=_0x483fe9[_0x21250e-0x1]??'',_0x471fe0=_0x483fe9[_0x21250e+0x1]??'';if(_0x561b1f==='='&&_0x2e91e1===0x0&&!/[!<>=:]/[_0x2265b1(0x203)](_0xff779a)&&_0x471fe0!=='='){if(_0x266f84!==undefined)return null;_0x266f84=_0x21250e;}}return _0x266f84===undefined?null:[_0x483fe9[_0x2265b1(0x1e5)](0x0,_0x266f84)['trim'](),_0x483fe9[_0x2265b1(0x1e5)](_0x266f84+0x1)[_0x2265b1(0x201)]()];}function a295_0x47b7(){const _0x1d593e=['\x5c$&','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','2FkrqWq','warning','2615081GdCHik','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','toLowerCase','columns','match','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','cross','__sq__','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','indexes','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','map','containsUnresolvedInclude','min','JOIN_INDEX_MISSING','inner','max','\x5cs*\x5c.\x5cs*[\x5cw$]+','INDEX_METADATA_UNAVAILABLE','where','full','1701592orLacp','7551ZkaCKF','right','join','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','push','unsupportedPredicate','slice','exec','filter','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.','7344070zeRthz','765192XJeDZp','includes','matchedPrefix','replace','(?:^|[^\x5cw$])','index','from','table','toUpperCase','metadataAvailable','replaceAll','natural','19810ymsLCD','search','length','tableName','has','7892wdzRPx','INNER','split','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','covered','some','trim','sql','test','JOIN_PREDICATE_UNSUPPORTED','position','No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.','left','unavailable','startsWith','JOIN_INDEX_NOT_USABLE','unknown','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','matchAll','1791858ymTyCj','alias','12QqJCJi'];a295_0x47b7=function(){return _0x1d593e;};return a295_0x47b7();}function parseDirectColumnReference(_0x4290b1,_0xf38026){const _0x420fae=a295_0x3052,_0x2b888b=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x420fae(0x1e6)](stripOuterParentheses(_0x4290b1));if(!_0x2b888b)return null;if(normalizeIdentifier(_0x2b888b[0x1]??'')!==normalizeIdentifier(_0xf38026))return null;return normalizeIdentifier(_0x2b888b[0x2]??'');}function containsColumnReference(_0x240f76,_0x2a8c27){const _0x1ed16b=a295_0x3052,_0x2100ed=_0x240f76[_0x1ed16b(0x1ed)](/[`"]/g,''),_0x3798fb=_0x2a8c27[_0x1ed16b(0x1ed)](/[.*+?^${}()|[\]\\]/g,_0x1ed16b(0x211));return new RegExp(_0x1ed16b(0x1ee)+_0x3798fb+_0x1ed16b(0x1da),'i')[_0x1ed16b(0x203)](_0x2100ed);}function findEqualityPrefix(_0x16b676,_0x4e164d){const _0x3e67c5=a295_0x3052,_0x436b50=new Set(_0x4e164d['map'](normalizeIdentifier)),_0x2f1c54=[];for(const _0x1b4fbb of _0x16b676){if(!_0x436b50[_0x3e67c5(0x1fa)](normalizeIdentifier(_0x1b4fbb)))break;_0x2f1c54[_0x3e67c5(0x1e3)](_0x1b4fbb);}return _0x2f1c54;}function resolveTableMetadata(_0x2515f9,_0x414226){const _0x5735a7=a295_0x3052,_0x236047=normalizeIdentifier(_0x414226),_0x189b5d=_0x2515f9[_0x5735a7(0x1e7)](_0x5a6420=>normalizeIdentifier(_0x5a6420[_0x5735a7(0x1f9)])===_0x236047);if(_0x189b5d[_0x5735a7(0x1f8)]===0x1)return _0x189b5d[0x0];const _0x1580f7=_0x236047[_0x5735a7(0x1eb)]('.'),_0x463aaa=_0x236047['split']('.')['at'](-0x1),_0x5c9437=_0x2515f9[_0x5735a7(0x1e7)](_0x278220=>{const _0x4adcaf=_0x5735a7,_0xd83921=normalizeIdentifier(_0x278220['tableName']);if(_0x1580f7&&_0xd83921[_0x4adcaf(0x1eb)]('.'))return![];return _0xd83921['split']('.')['at'](-0x1)===_0x463aaa;});return _0x5c9437[_0x5735a7(0x1f8)]===0x1?_0x5c9437[0x0]:undefined;}function columnNamesMatch(_0x5a0178,_0x2d824d){return normalizeIdentifier(_0x5a0178)===normalizeIdentifier(_0x2d824d);}function normalizeIdentifier(_0x33e017){const _0x32fee9=a295_0x3052;return _0x33e017[_0x32fee9(0x1ed)](/[`"]/g,'')['trim']()[_0x32fee9(0x1ca)]();}function isSqlClauseKeyword(_0x34dfd8){const _0x5e8a03=a295_0x3052;return new Set(['on','using',_0x5e8a03(0x1dc),_0x5e8a03(0x1e1),_0x5e8a03(0x1d8),_0x5e8a03(0x207),_0x5e8a03(0x1e0),_0x5e8a03(0x1dd),_0x5e8a03(0x1ce),_0x5e8a03(0x1f5)])[_0x5e8a03(0x1fa)](_0x34dfd8);}function a295_0x3052(_0x38846b,_0x42123e){_0x38846b=_0x38846b-0x1c5;const _0x47b7a8=a295_0x47b7();let _0x305265=_0x47b7a8[_0x38846b];return _0x305265;}function stripOuterParentheses(_0x563c9d){const _0x53e1a0=a295_0x3052;let _0x444076=_0x563c9d[_0x53e1a0(0x201)]();while(_0x444076[_0x53e1a0(0x209)]('(')&&_0x444076['endsWith'](')')){let _0x20bfb8=0x0,_0x798cbb=!![];for(let _0x18ffed=0x0;_0x18ffed<_0x444076[_0x53e1a0(0x1f8)];_0x18ffed+=0x1){if(_0x444076[_0x18ffed]==='(')_0x20bfb8+=0x1;if(_0x444076[_0x18ffed]===')')_0x20bfb8-=0x1;if(_0x20bfb8===0x0&&_0x18ffed<_0x444076[_0x53e1a0(0x1f8)]-0x1){_0x798cbb=![];break;}}if(!_0x798cbb||_0x20bfb8!==0x0)break;_0x444076=_0x444076[_0x53e1a0(0x1e5)](0x1,-0x1)[_0x53e1a0(0x201)]();}return _0x444076;}
@@ -1 +1 @@
1
- const a296_0x5b8afe=a296_0x180d;(function(_0x44be68,_0x5890b2){const _0x5c1e1f=a296_0x180d,_0x1fed71=_0x44be68();while(!![]){try{const _0x13acc8=-parseInt(_0x5c1e1f(0x1f3))/0x1+-parseInt(_0x5c1e1f(0x1f7))/0x2*(-parseInt(_0x5c1e1f(0x1f2))/0x3)+parseInt(_0x5c1e1f(0x1f4))/0x4*(-parseInt(_0x5c1e1f(0x1f0))/0x5)+-parseInt(_0x5c1e1f(0x1ee))/0x6*(-parseInt(_0x5c1e1f(0x1f1))/0x7)+parseInt(_0x5c1e1f(0x1f5))/0x8+parseInt(_0x5c1e1f(0x1ec))/0x9+-parseInt(_0x5c1e1f(0x1f9))/0xa;if(_0x13acc8===_0x5890b2)break;else _0x1fed71['push'](_0x1fed71['shift']());}catch(_0xdaed69){_0x1fed71['push'](_0x1fed71['shift']());}}}(a296_0xd7de,0x66b62));function a296_0xd7de(){const _0x4a21f5=['sql-trash','4321836kBiVZi','.rabetbase','4925082sCRblj','/sql','4870qezYdZ','7SuBygs','1245ZWOWmU','626720AASadR','1492wysXPm','5554520tcUQRc','sql.lock.json','3310kergLR','sql','12714630OiDxFc'];a296_0xd7de=function(){return _0x4a21f5;};return a296_0xd7de();}function a296_0x180d(_0x209c57,_0x5516c7){_0x209c57=_0x209c57-0x1ec;const _0xd7de71=a296_0xd7de();let _0x180d5c=_0xd7de71[_0x209c57];return _0x180d5c;}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a296_0x5b8afe(0x1ed),LOCK_FILE_NAME=a296_0x5b8afe(0x1f6),TRASH_DIR_NAME=a296_0x5b8afe(0x1fa);export function loadSqlProjectConfig(_0x4f1676,_0x1b354e){const _0x42a409=a296_0x5b8afe,_0x12150e=resolve(_0x1b354e??findProjectRootDirectory()),_0x4902e1=DOT_DIR+_0x42a409(0x1ef),_0x2c8829=_0x4902e1+'/'+_0x4f1676;return{'projectRoot':_0x12150e,'appCode':_0x4f1676,'sqlWorkspaceRoot':_0x4902e1,'sqlRoot':_0x2c8829,'sqlRootDir':resolve(_0x12150e,DOT_DIR,_0x42a409(0x1f8),_0x4f1676),'lockFilePath':resolve(_0x12150e,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x12150e,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a296_0x18f6bd=a296_0x27e9;(function(_0xeb853f,_0xa2936){const _0x50f102=a296_0x27e9,_0x3e2e5f=_0xeb853f();while(!![]){try{const _0x495e87=parseInt(_0x50f102(0x7f))/0x1+parseInt(_0x50f102(0x83))/0x2*(-parseInt(_0x50f102(0x7b))/0x3)+parseInt(_0x50f102(0x84))/0x4+parseInt(_0x50f102(0x86))/0x5*(-parseInt(_0x50f102(0x81))/0x6)+parseInt(_0x50f102(0x7c))/0x7+-parseInt(_0x50f102(0x7e))/0x8*(-parseInt(_0x50f102(0x80))/0x9)+parseInt(_0x50f102(0x82))/0xa;if(_0x495e87===_0xa2936)break;else _0x3e2e5f['push'](_0x3e2e5f['shift']());}catch(_0x39540a){_0x3e2e5f['push'](_0x3e2e5f['shift']());}}}(a296_0x3840,0x4c995));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a296_0x18f6bd(0x7d),LOCK_FILE_NAME=a296_0x18f6bd(0x88),TRASH_DIR_NAME=a296_0x18f6bd(0x89);function a296_0x27e9(_0x534173,_0x3f0379){_0x534173=_0x534173-0x7b;const _0x384068=a296_0x3840();let _0x27e9c4=_0x384068[_0x534173];return _0x27e9c4;}function a296_0x3840(){const _0x543a8a=['2173185HOqLWK','.rabetbase','264IRFSJx','31091idhJSc','152496PvgYsG','3472746LuSDxv','1611730OdHtIC','2FQolzZ','298436TmMfIt','/sql','5zjfXVb','sql','sql.lock.json','sql-trash','731820NeVNNL'];a296_0x3840=function(){return _0x543a8a;};return a296_0x3840();}export function loadSqlProjectConfig(_0x3dbf53,_0x482eed){const _0x1f9a4a=a296_0x18f6bd,_0x39685b=resolve(_0x482eed??findProjectRootDirectory()),_0x438acd=DOT_DIR+_0x1f9a4a(0x85),_0x4e5570=_0x438acd+'/'+_0x3dbf53;return{'projectRoot':_0x39685b,'appCode':_0x3dbf53,'sqlWorkspaceRoot':_0x438acd,'sqlRoot':_0x4e5570,'sqlRootDir':resolve(_0x39685b,DOT_DIR,_0x1f9a4a(0x87),_0x3dbf53),'lockFilePath':resolve(_0x39685b,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x39685b,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- (function(_0x2300f1,_0x197be6){const _0x4b9911=a297_0x57a5,_0x3741cc=_0x2300f1();while(!![]){try{const _0x400667=-parseInt(_0x4b9911(0x161))/0x1*(-parseInt(_0x4b9911(0x145))/0x2)+parseInt(_0x4b9911(0x15d))/0x3*(parseInt(_0x4b9911(0x158))/0x4)+parseInt(_0x4b9911(0x154))/0x5*(parseInt(_0x4b9911(0x157))/0x6)+parseInt(_0x4b9911(0x14d))/0x7*(-parseInt(_0x4b9911(0x152))/0x8)+-parseInt(_0x4b9911(0x144))/0x9+-parseInt(_0x4b9911(0x143))/0xa*(-parseInt(_0x4b9911(0x142))/0xb)+-parseInt(_0x4b9911(0x14f))/0xc*(-parseInt(_0x4b9911(0x162))/0xd);if(_0x400667===_0x197be6)break;else _0x3741cc['push'](_0x3741cc['shift']());}catch(_0x45e38f){_0x3741cc['push'](_0x3741cc['shift']());}}}(a297_0x13c1,0xadcaa));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x3d7a8f){const _0x67040c=a297_0x57a5;if(_0x3d7a8f===_0x67040c(0x151))return _0x67040c(0x14e);if(_0x3d7a8f===_0x67040c(0x150))return _0x67040c(0x15b);return undefined;}async function scanSqlFilesRecursively(_0x121df6,_0x13971a){const _0x4db590=a297_0x57a5,_0x1e5858=[];try{const _0x38077f=await readdir(_0x121df6,{'withFileTypes':!![]});for(const _0x59fc38 of _0x38077f){const _0x16709c=join(_0x121df6,_0x59fc38[_0x4db590(0x15c)]);if(_0x59fc38[_0x4db590(0x15f)]()){_0x1e5858['push'](...await scanSqlFilesRecursively(_0x16709c,_0x13971a));continue;}if(!_0x59fc38['isFile']())continue;const _0x44631b=extname(_0x59fc38[_0x4db590(0x15c)])[_0x4db590(0x141)](),_0x14b989=extensionToMode(_0x44631b);if(!_0x14b989)continue;const _0x2db719=relative(_0x13971a,_0x16709c)[_0x4db590(0x15e)](/\\/g,'/'),_0x462448=_0x2db719[_0x4db590(0x14a)]('/')[_0x4db590(0x149)](Boolean),_0x3d4cc9=parseSqlPath(_0x462448,_0x59fc38[_0x4db590(0x15c)],_0x44631b);if(!_0x3d4cc9)continue;_0x1e5858[_0x4db590(0x153)]({'sqlCode':_0x3d4cc9['sqlCode'],'sqlName':_0x3d4cc9[_0x4db590(0x146)],'dbDirectory':_0x462448[0x0],'filePath':_0x16709c,'relativePath':_0x2db719,'lockKey':_0x3d4cc9[_0x4db590(0x163)],'mode':_0x14b989});}}catch(_0x44e41d){if(_0x44e41d[_0x4db590(0x14c)]!=='ENOENT')throw _0x44e41d;}return _0x1e5858;}export async function scanLocalSqlQueries(_0x57c55b){const _0x3e0552=a297_0x57a5;return scanSqlFilesRecursively(_0x57c55b['sqlRootDir'],_0x57c55b[_0x3e0552(0x155)]);}function a297_0x57a5(_0x2bd1df,_0x4ec701){_0x2bd1df=_0x2bd1df-0x141;const _0x13c1b9=a297_0x13c1();let _0x57a5b2=_0x13c1b9[_0x2bd1df];return _0x57a5b2;}export function resolveLocalSqlFilePath(_0x2b3aae,_0x4cf45d,_0x1c49d3){const _0x79b2aa=a297_0x57a5,_0x2777a4=_0x1c49d3?.[_0x79b2aa(0x148)]||(_0x1c49d3?.[_0x79b2aa(0x146)]||_0x1c49d3?.[_0x79b2aa(0x156)]?buildSqlRelativePath(_0x4cf45d,_0x1c49d3?.[_0x79b2aa(0x146)],_0x1c49d3?.[_0x79b2aa(0x156)],_0x1c49d3?.[_0x79b2aa(0x159)]||_0x79b2aa(0x14e),_0x1c49d3?.[_0x79b2aa(0x15a)]):buildDefaultSqlFileName(_0x4cf45d,_0x1c49d3?.[_0x79b2aa(0x159)]||_0x79b2aa(0x14e)));return join(_0x2b3aae[_0x79b2aa(0x155)],_0x2777a4);}function a297_0x13c1(){const _0x50c7ad=['isDirectory','length','2IqDuSQ','13wnECFO','sqlCode','slice','toLowerCase','2167jKACwo','24740nDfdHV','12630384vLKatp','86704HEMvTC','sqlName','test','path','filter','split','indexOf','code','7gEfmPT','sql','10623132IOIyoI','.xml','.sql','5021320mzOAvn','push','3755WRCQTR','sqlRootDir','dbName','4206qFKEsi','44wMxwgL','mode','dbId','mybatisXml','name','206481KCZDrg','replace'];a297_0x13c1=function(){return _0x50c7ad;};return a297_0x13c1();}export async function directoryExists(_0x140674){const _0x2a529e=a297_0x57a5;try{const _0x86f262=await stat(_0x140674);return _0x86f262[_0x2a529e(0x15f)]();}catch{return![];}}function parseSqlPath(_0x520356,_0x2e47f0,_0x3849ae){const _0x4e44f0=a297_0x57a5,_0x33b86c=_0x2e47f0[_0x4e44f0(0x164)](0x0,-_0x3849ae[_0x4e44f0(0x160)]);if(_0x520356[_0x4e44f0(0x160)]<0x2)return null;const _0x19dd66=_0x33b86c[_0x4e44f0(0x14b)]('_');if(_0x19dd66<=0x0||_0x19dd66>=_0x33b86c[_0x4e44f0(0x160)]-0x1)return null;const _0x3f5f85=_0x33b86c[_0x4e44f0(0x164)](0x0,_0x19dd66);if(!isLikelySqlCode(_0x3f5f85))return null;return{'sqlCode':_0x3f5f85,'sqlName':_0x33b86c[_0x4e44f0(0x164)](_0x19dd66+0x1)};}function isLikelySqlCode(_0x250097){const _0x591346=a297_0x57a5;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x591346(0x147)](_0x250097);}
1
+ (function(_0x518b31,_0x3e969c){const _0x244aac=a297_0x3c49,_0x529b8c=_0x518b31();while(!![]){try{const _0x212972=-parseInt(_0x244aac(0x83))/0x1+-parseInt(_0x244aac(0x7e))/0x2*(parseInt(_0x244aac(0x88))/0x3)+parseInt(_0x244aac(0x70))/0x4*(parseInt(_0x244aac(0x7b))/0x5)+parseInt(_0x244aac(0x77))/0x6+parseInt(_0x244aac(0x8c))/0x7+parseInt(_0x244aac(0x76))/0x8+-parseInt(_0x244aac(0x86))/0x9;if(_0x212972===_0x3e969c)break;else _0x529b8c['push'](_0x529b8c['shift']());}catch(_0xba90d6){_0x529b8c['push'](_0x529b8c['shift']());}}}(a297_0x5bbf,0x241f0));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function a297_0x5bbf(){const _0x52c488=['dbName','push','isFile','sql','1784448QNpWFi','1258614kWqSrR','path','ENOENT','dbId','29665PEmUWV','name','replace','4hAywWi','slice','toLowerCase','sqlCode','mybatisXml','129474ytCbgl','test','mode','1313586ZgutSl','.sql','322815cPtCtK','.xml','split','sqlRootDir','1149638KrJQtY','sqlName','indexOf','length','28XMnEvz','isDirectory'];a297_0x5bbf=function(){return _0x52c488;};return a297_0x5bbf();}function extensionToMode(_0x40ff86){const _0x3565f0=a297_0x3c49;if(_0x40ff86===_0x3565f0(0x87))return _0x3565f0(0x75);if(_0x40ff86===_0x3565f0(0x89))return _0x3565f0(0x82);return undefined;}async function scanSqlFilesRecursively(_0x369718,_0x1470fc){const _0x2f24df=a297_0x3c49,_0x20abce=[];try{const _0x2c0f62=await readdir(_0x369718,{'withFileTypes':!![]});for(const _0x2b7c71 of _0x2c0f62){const _0x328393=join(_0x369718,_0x2b7c71[_0x2f24df(0x7c)]);if(_0x2b7c71[_0x2f24df(0x71)]()){_0x20abce[_0x2f24df(0x73)](...await scanSqlFilesRecursively(_0x328393,_0x1470fc));continue;}if(!_0x2b7c71[_0x2f24df(0x74)]())continue;const _0x27a7ef=extname(_0x2b7c71[_0x2f24df(0x7c)])[_0x2f24df(0x80)](),_0xa49546=extensionToMode(_0x27a7ef);if(!_0xa49546)continue;const _0x144929=relative(_0x1470fc,_0x328393)[_0x2f24df(0x7d)](/\\/g,'/'),_0x1e8cc5=_0x144929[_0x2f24df(0x8a)]('/')['filter'](Boolean),_0x132bc5=parseSqlPath(_0x1e8cc5,_0x2b7c71[_0x2f24df(0x7c)],_0x27a7ef);if(!_0x132bc5)continue;_0x20abce[_0x2f24df(0x73)]({'sqlCode':_0x132bc5[_0x2f24df(0x81)],'sqlName':_0x132bc5[_0x2f24df(0x8d)],'dbDirectory':_0x1e8cc5[0x0],'filePath':_0x328393,'relativePath':_0x144929,'lockKey':_0x132bc5[_0x2f24df(0x81)],'mode':_0xa49546});}}catch(_0x36a6b0){if(_0x36a6b0['code']!==_0x2f24df(0x79))throw _0x36a6b0;}return _0x20abce;}export async function scanLocalSqlQueries(_0x47cd00){const _0x43cf53=a297_0x3c49;return scanSqlFilesRecursively(_0x47cd00[_0x43cf53(0x8b)],_0x47cd00['sqlRootDir']);}function a297_0x3c49(_0x352f65,_0x3d94d5){_0x352f65=_0x352f65-0x6f;const _0x5bbf9d=a297_0x5bbf();let _0x3c4996=_0x5bbf9d[_0x352f65];return _0x3c4996;}export function resolveLocalSqlFilePath(_0x533613,_0x345396,_0x577916){const _0x27c092=a297_0x3c49,_0x5a5a2c=_0x577916?.[_0x27c092(0x78)]||(_0x577916?.[_0x27c092(0x8d)]||_0x577916?.['dbName']?buildSqlRelativePath(_0x345396,_0x577916?.['sqlName'],_0x577916?.[_0x27c092(0x72)],_0x577916?.['mode']||'sql',_0x577916?.[_0x27c092(0x7a)]):buildDefaultSqlFileName(_0x345396,_0x577916?.[_0x27c092(0x85)]||_0x27c092(0x75)));return join(_0x533613[_0x27c092(0x8b)],_0x5a5a2c);}export async function directoryExists(_0x416747){const _0x2b3ade=a297_0x3c49;try{const _0x58162d=await stat(_0x416747);return _0x58162d[_0x2b3ade(0x71)]();}catch{return![];}}function parseSqlPath(_0x311ccc,_0x421b98,_0x3a7fde){const _0x37d383=a297_0x3c49,_0x5ee2c5=_0x421b98[_0x37d383(0x7f)](0x0,-_0x3a7fde[_0x37d383(0x6f)]);if(_0x311ccc[_0x37d383(0x6f)]<0x2)return null;const _0x3621d6=_0x5ee2c5[_0x37d383(0x8e)]('_');if(_0x3621d6<=0x0||_0x3621d6>=_0x5ee2c5[_0x37d383(0x6f)]-0x1)return null;const _0x3f7d7f=_0x5ee2c5['slice'](0x0,_0x3621d6);if(!isLikelySqlCode(_0x3f7d7f))return null;return{'sqlCode':_0x3f7d7f,'sqlName':_0x5ee2c5[_0x37d383(0x7f)](_0x3621d6+0x1)};}function isLikelySqlCode(_0x550f2e){const _0x3d9013=a297_0x3c49;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x3d9013(0x84)](_0x550f2e);}
@@ -1 +1 @@
1
- (function(_0x2dde4d,_0x24e878){const _0x5bf8a7=a298_0x52e0,_0x39ee15=_0x2dde4d();while(!![]){try{const _0x309af4=parseInt(_0x5bf8a7(0x16f))/0x1+-parseInt(_0x5bf8a7(0x16c))/0x2*(parseInt(_0x5bf8a7(0x165))/0x3)+parseInt(_0x5bf8a7(0x166))/0x4+-parseInt(_0x5bf8a7(0x163))/0x5*(-parseInt(_0x5bf8a7(0x161))/0x6)+-parseInt(_0x5bf8a7(0x16b))/0x7*(-parseInt(_0x5bf8a7(0x16d))/0x8)+-parseInt(_0x5bf8a7(0x16a))/0x9*(parseInt(_0x5bf8a7(0x169))/0xa)+parseInt(_0x5bf8a7(0x16e))/0xb*(-parseInt(_0x5bf8a7(0x168))/0xc);if(_0x309af4===_0x24e878)break;else _0x39ee15['push'](_0x39ee15['shift']());}catch(_0xc03215){_0x39ee15['push'](_0x39ee15['shift']());}}}(a298_0x3f1d,0x52d83));import{readFile}from'node:fs/promises';function a298_0x3f1d(){const _0xd31d33=['16990IzSdqf','1926hmcXvx','830683LYIjeU','13850EoedHu','8YKWBkP','213884bPRlLE','473620KlpzdR','96TDbFuS','digest','62745HmdREO','update','12COxXlH','1927904SOVCNc','md5','336SdxJGh'];a298_0x3f1d=function(){return _0xd31d33;};return a298_0x3f1d();}function a298_0x52e0(_0x5a23f6,_0x51a42e){_0x5a23f6=_0x5a23f6-0x161;const _0x3f1d90=a298_0x3f1d();let _0x52e099=_0x3f1d90[_0x5a23f6];return _0x52e099;}import a298_0x167da9 from'node:crypto';export function computeSqlContentHash(_0x42c6e3){const _0x36507c=a298_0x52e0;return a298_0x167da9['createHash'](_0x36507c(0x167))[_0x36507c(0x164)](_0x42c6e3)[_0x36507c(0x162)]('hex');}export async function computeSqlFileHash(_0x28f3f6){const _0x27e5d7=await readFile(_0x28f3f6,'utf8');return computeSqlContentHash(_0x27e5d7);}
1
+ (function(_0x16fbe7,_0x224961){const _0x383ee3=a298_0x13dc,_0x4c97ca=_0x16fbe7();while(!![]){try{const _0xe3bace=-parseInt(_0x383ee3(0x1da))/0x1*(-parseInt(_0x383ee3(0x1db))/0x2)+parseInt(_0x383ee3(0x1d3))/0x3+parseInt(_0x383ee3(0x1d8))/0x4*(-parseInt(_0x383ee3(0x1cc))/0x5)+-parseInt(_0x383ee3(0x1cf))/0x6+parseInt(_0x383ee3(0x1cd))/0x7*(parseInt(_0x383ee3(0x1d4))/0x8)+-parseInt(_0x383ee3(0x1dc))/0x9*(parseInt(_0x383ee3(0x1d7))/0xa)+parseInt(_0x383ee3(0x1d6))/0xb*(-parseInt(_0x383ee3(0x1d2))/0xc);if(_0xe3bace===_0x224961)break;else _0x4c97ca['push'](_0x4c97ca['shift']());}catch(_0x48a1e9){_0x4c97ca['push'](_0x4c97ca['shift']());}}}(a298_0x1c26,0x48300));import{readFile}from'node:fs/promises';function a298_0x13dc(_0x5983e1,_0x2f0c5e){_0x5983e1=_0x5983e1-0x1cb;const _0x1c269f=a298_0x1c26();let _0x13dcf5=_0x1c269f[_0x5983e1];return _0x13dcf5;}import a298_0x29373e from'node:crypto';export function computeSqlContentHash(_0x37cb0a){const _0x1b20b6=a298_0x13dc;return a298_0x29373e[_0x1b20b6(0x1d1)](_0x1b20b6(0x1d0))[_0x1b20b6(0x1d5)](_0x37cb0a)[_0x1b20b6(0x1d9)](_0x1b20b6(0x1ce));}function a298_0x1c26(){const _0x1ec159=['3624fubFaL','1724763GxkAoE','40CBRiuE','update','7392OxUjea','3998430nMwHpK','4idivNj','digest','3PVkCto','367378bGlYpd','9WbRveS','utf8','1279545XfzffH','800219asdLJI','hex','3259182uNkYlc','md5','createHash'];a298_0x1c26=function(){return _0x1ec159;};return a298_0x1c26();}export async function computeSqlFileHash(_0x5eed7f){const _0x4a30d5=a298_0x13dc,_0x2f3b68=await readFile(_0x5eed7f,_0x4a30d5(0x1cb));return computeSqlContentHash(_0x2f3b68);}
@@ -1 +1 @@
1
- (function(_0x435d99,_0xe3f650){const _0x55335e=a299_0x17f9,_0x24b39f=_0x435d99();while(!![]){try{const _0x1d29a5=-parseInt(_0x55335e(0xcd))/0x1*(parseInt(_0x55335e(0xd1))/0x2)+-parseInt(_0x55335e(0xd3))/0x3+-parseInt(_0x55335e(0xd8))/0x4*(parseInt(_0x55335e(0xd0))/0x5)+-parseInt(_0x55335e(0xce))/0x6+parseInt(_0x55335e(0xc8))/0x7+parseInt(_0x55335e(0xd6))/0x8*(parseInt(_0x55335e(0xd4))/0x9)+parseInt(_0x55335e(0xd7))/0xa;if(_0x1d29a5===_0xe3f650)break;else _0x24b39f['push'](_0x24b39f['shift']());}catch(_0x50e016){_0x24b39f['push'](_0x24b39f['shift']());}}}(a299_0x3390,0x8ad32));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}function a299_0x3390(){const _0x51ecfe=['5111556zoHFyu',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','2261855htzpJL','4DsQCtK','lastSync','769491DdLzXU','7129935xbktaM','sqlRoot','8gTpjsu','19243050UbVZGr','8jIrWke','parse','6089685imPLnF','utf8','\x22\x20vs\x20lock\x20\x22','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','apps','502342UUdRxN'];a299_0x3390=function(){return _0x51ecfe;};return a299_0x3390();}export function ensureSqlLockScope(_0x59c16b,_0xf71f25,_0x3519b1,_0x52d705){const _0x35d605=a299_0x17f9,_0x30f1e8=_0x59c16b??createEmptySqlLock();let _0xf14c11=_0x30f1e8[_0x35d605(0xcc)][_0xf71f25];if(!_0xf14c11)return _0xf14c11={'sqlRoot':_0x3519b1,'lastSync':'','sqls':{}},_0x30f1e8[_0x35d605(0xcc)][_0xf71f25]=_0xf14c11,{'lockData':_0x30f1e8,'appLock':_0xf14c11};if(!_0xf14c11[_0x35d605(0xd5)])_0xf14c11[_0x35d605(0xd5)]=_0x3519b1;else{if(_0xf14c11['sqlRoot']!==_0x3519b1)throw new Error(_0x52d705+_0x35d605(0xcf)+_0x3519b1+_0x35d605(0xca)+_0xf14c11[_0x35d605(0xd5)]+'\x22.\x20'+_0x35d605(0xcb));}return!_0xf14c11['sqls']&&(_0xf14c11['sqls']={}),!_0xf14c11[_0x35d605(0xd2)]&&(_0xf14c11[_0x35d605(0xd2)]=''),{'lockData':_0x30f1e8,'appLock':_0xf14c11};}export async function readSqlLockFile(_0x34813a){const _0x291303=a299_0x17f9;try{const _0x2b9d74=await readFile(_0x34813a,_0x291303(0xc9));return JSON[_0x291303(0xc7)](_0x2b9d74);}catch(_0x3735bd){if(_0x3735bd['code']==='ENOENT')return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x3735bd));}}function a299_0x17f9(_0x277574,_0x44c6bd){_0x277574=_0x277574-0xc7;const _0x339098=a299_0x3390();let _0x17f9ae=_0x339098[_0x277574];return _0x17f9ae;}export async function writeSqlLockFile(_0x57abe2,_0x5d7a99){const _0x3c3bda=a299_0x17f9;await mkdir(dirname(_0x57abe2),{'recursive':!![]}),await writeFile(_0x57abe2,JSON['stringify'](_0x5d7a99,null,0x2),_0x3c3bda(0xc9));}
1
+ (function(_0xadf834,_0x56ec7d){const _0x1c9e18=a299_0x176c,_0x206398=_0xadf834();while(!![]){try{const _0x411180=parseInt(_0x1c9e18(0x87))/0x1*(-parseInt(_0x1c9e18(0x86))/0x2)+-parseInt(_0x1c9e18(0x8e))/0x3*(-parseInt(_0x1c9e18(0x88))/0x4)+-parseInt(_0x1c9e18(0x93))/0x5*(-parseInt(_0x1c9e18(0x92))/0x6)+-parseInt(_0x1c9e18(0x96))/0x7+-parseInt(_0x1c9e18(0x91))/0x8+parseInt(_0x1c9e18(0x98))/0x9*(-parseInt(_0x1c9e18(0x89))/0xa)+parseInt(_0x1c9e18(0x95))/0xb;if(_0x411180===_0x56ec7d)break;else _0x206398['push'](_0x206398['shift']());}catch(_0x3dbfc6){_0x206398['push'](_0x206398['shift']());}}}(a299_0x41d5,0x9cc8f));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x5dd3d1,_0x3dc5a0,_0x23371d,_0x4fd002){const _0x455245=a299_0x176c,_0x5d791e=_0x5dd3d1??createEmptySqlLock();let _0x4689ab=_0x5d791e[_0x455245(0x85)][_0x3dc5a0];if(!_0x4689ab)return _0x4689ab={'sqlRoot':_0x23371d,'lastSync':'','sqls':{}},_0x5d791e['apps'][_0x3dc5a0]=_0x4689ab,{'lockData':_0x5d791e,'appLock':_0x4689ab};if(!_0x4689ab[_0x455245(0x8f)])_0x4689ab[_0x455245(0x8f)]=_0x23371d;else{if(_0x4689ab[_0x455245(0x8f)]!==_0x23371d)throw new Error(_0x4fd002+_0x455245(0x82)+_0x23371d+'\x22\x20vs\x20lock\x20\x22'+_0x4689ab[_0x455245(0x8f)]+_0x455245(0x83)+_0x455245(0x81));}return!_0x4689ab[_0x455245(0x8d)]&&(_0x4689ab[_0x455245(0x8d)]={}),!_0x4689ab[_0x455245(0x8c)]&&(_0x4689ab[_0x455245(0x8c)]=''),{'lockData':_0x5d791e,'appLock':_0x4689ab};}function a299_0x176c(_0x15e5d1,_0x3f16b7){_0x15e5d1=_0x15e5d1-0x81;const _0x41d5f9=a299_0x41d5();let _0x176c36=_0x41d5f9[_0x15e5d1];return _0x176c36;}export async function readSqlLockFile(_0x5c475e){const _0x80e8c5=a299_0x176c;try{const _0x51352c=await readFile(_0x5c475e,_0x80e8c5(0x90));return JSON[_0x80e8c5(0x8b)](_0x51352c);}catch(_0x546be1){if(_0x546be1[_0x80e8c5(0x8a)]===_0x80e8c5(0x94))return null;throw new Error(_0x80e8c5(0x97)+String(_0x546be1));}}export async function writeSqlLockFile(_0x204de4,_0x353b15){const _0x2c541d=a299_0x176c;await mkdir(dirname(_0x204de4),{'recursive':!![]}),await writeFile(_0x204de4,JSON[_0x2c541d(0x84)](_0x353b15,null,0x2),_0x2c541d(0x90));}function a299_0x41d5(){const _0x7aa455=['26242656PEUlvj','4840829XcVUPM','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','342XOVYZw','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','\x22.\x20','stringify','apps','218ItETaJ','803cRzPWB','11136UIdyUK','281140XDPiTc','code','parse','lastSync','sqls','1341hmrrqN','sqlRoot','utf8','10052728jiGPMt','5196edAqmw','670rKUcIi','ENOENT'];a299_0x41d5=function(){return _0x7aa455;};return a299_0x41d5();}
@@ -1 +1 @@
1
- function a301_0x4d66(_0x27b02d,_0x561088){_0x27b02d=_0x27b02d-0xb4;const _0x4f6d3c=a301_0x4f6d();let _0x4d6657=_0x4f6d3c[_0x27b02d];return _0x4d6657;}(function(_0x5b9e32,_0x415f99){const _0x3dd855=a301_0x4d66,_0x33d391=_0x5b9e32();while(!![]){try{const _0x285f53=parseInt(_0x3dd855(0xc0))/0x1*(-parseInt(_0x3dd855(0xb7))/0x2)+-parseInt(_0x3dd855(0xc1))/0x3+-parseInt(_0x3dd855(0xc5))/0x4*(parseInt(_0x3dd855(0xbf))/0x5)+-parseInt(_0x3dd855(0xb8))/0x6*(-parseInt(_0x3dd855(0xc3))/0x7)+parseInt(_0x3dd855(0xbd))/0x8+-parseInt(_0x3dd855(0xb5))/0x9+parseInt(_0x3dd855(0xbb))/0xa;if(_0x285f53===_0x415f99)break;else _0x33d391['push'](_0x33d391['shift']());}catch(_0xb1bfdb){_0x33d391['push'](_0x33d391['shift']());}}}(a301_0x4f6d,0x5cd77));import{detectSqlSourceMode}from'../../core/sql-validator.js';export function detectSqlMode(_0x5b6342){return detectSqlSourceMode(_0x5b6342);}export function getSqlFileExtension(_0x111d08){const _0x1f359e=a301_0x4d66;return _0x111d08===_0x1f359e(0xc2)?_0x1f359e(0xc4):_0x1f359e(0xbe);}export function buildDefaultSqlFileName(_0x4d9f42,_0xb42b79){return''+_0x4d9f42+getSqlFileExtension(_0xb42b79);}export function sanitizeSqlPathSegment(_0x4a9efe,_0x5499f2){const _0x1ca127=a301_0x4d66,_0x54f526=String(_0x4a9efe??'')[_0x1ca127(0xb4)](),_0x5be9e0=_0x54f526[_0x1ca127(0xbc)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x1ca127(0xbc)](/\s+/g,'-')[_0x1ca127(0xbc)](/-+/g,'-')[_0x1ca127(0xbc)](/^\.+/,'')['replace'](/\.+$/,'')[_0x1ca127(0xbc)](/^-+/,'')[_0x1ca127(0xbc)](/-+$/,'');return _0x5be9e0||_0x5499f2;}function a301_0x4f6d(){const _0x38cf0c=['665394sJqwyV','mybatisXml','7KnVExV','.xml','492KeYkCV','trim','6058710oOknhx','unknown-db','12qsgkZS','1650174kWxcQE','unknown-sql','db-','17719340pjpDIm','replace','3222552KaovVi','.sql','17545mGxMbV','123818uLTVeo'];a301_0x4f6d=function(){return _0x38cf0c;};return a301_0x4f6d();}export function buildDbDirectoryName(_0x33c886,_0x3c425c){const _0x3f7968=a301_0x4d66;return sanitizeSqlPathSegment(_0x33c886,_0x3c425c!=null?_0x3f7968(0xba)+_0x3c425c:_0x3f7968(0xb6));}export function buildSqlRelativePath(_0x22fd86,_0x4b3b5a,_0x1608e8,_0x448b1a,_0x48a8ce){const _0x569c94=a301_0x4d66,_0x2c1299=buildDbDirectoryName(_0x1608e8,_0x48a8ce),_0x1dfa41=sanitizeSqlPathSegment(_0x22fd86,_0x569c94(0xb9)),_0x5857a8=sanitizeSqlPathSegment(_0x4b3b5a,_0x1dfa41);return _0x2c1299+'/'+_0x1dfa41+'_'+_0x5857a8+getSqlFileExtension(_0x448b1a);}
1
+ function a301_0x44f3(_0x35d30a,_0x5d6785){_0x35d30a=_0x35d30a-0x1b4;const _0x2a331c=a301_0x2a33();let _0x44f366=_0x2a331c[_0x35d30a];return _0x44f366;}(function(_0x555ba1,_0x5bde48){const _0x5554a8=a301_0x44f3,_0x44a3d7=_0x555ba1();while(!![]){try{const _0x50e60c=-parseInt(_0x5554a8(0x1b6))/0x1*(-parseInt(_0x5554a8(0x1b9))/0x2)+parseInt(_0x5554a8(0x1be))/0x3+parseInt(_0x5554a8(0x1bc))/0x4*(-parseInt(_0x5554a8(0x1c0))/0x5)+parseInt(_0x5554a8(0x1ba))/0x6+-parseInt(_0x5554a8(0x1c1))/0x7*(parseInt(_0x5554a8(0x1bf))/0x8)+parseInt(_0x5554a8(0x1bb))/0x9*(parseInt(_0x5554a8(0x1b4))/0xa)+-parseInt(_0x5554a8(0x1c4))/0xb*(-parseInt(_0x5554a8(0x1c6))/0xc);if(_0x50e60c===_0x5bde48)break;else _0x44a3d7['push'](_0x44a3d7['shift']());}catch(_0x1658ad){_0x44a3d7['push'](_0x44a3d7['shift']());}}}(a301_0x2a33,0xf1fbb));import{detectSqlSourceMode}from'../../core/sql-validator.js';export function detectSqlMode(_0x902f9e){return detectSqlSourceMode(_0x902f9e);}export function getSqlFileExtension(_0x1edb57){const _0x334b44=a301_0x44f3;return _0x1edb57===_0x334b44(0x1c3)?_0x334b44(0x1b5):'.sql';}export function buildDefaultSqlFileName(_0x339af9,_0x321ccb){return''+_0x339af9+getSqlFileExtension(_0x321ccb);}export function sanitizeSqlPathSegment(_0x3a19da,_0x5567f4){const _0x40fb7b=a301_0x44f3,_0x996dbd=String(_0x3a19da??'')[_0x40fb7b(0x1b7)](),_0x696fb8=_0x996dbd[_0x40fb7b(0x1bd)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x40fb7b(0x1bd)](/\s+/g,'-')[_0x40fb7b(0x1bd)](/-+/g,'-')[_0x40fb7b(0x1bd)](/^\.+/,'')[_0x40fb7b(0x1bd)](/\.+$/,'')[_0x40fb7b(0x1bd)](/^-+/,'')['replace'](/-+$/,'');return _0x696fb8||_0x5567f4;}function a301_0x2a33(){const _0x14ca8f=['53254CRZAbA','7579992PjRndB','4944708lbHzoZ','7655152PMeKPK','replace','3745149eMrBXA','953952fByHub','5XRMaFP','112jJxPIH','unknown-db','mybatisXml','1375ZIzIDL','db-','31068QzenCh','20kcOQCM','.xml','33pCCUKK','trim','unknown-sql'];a301_0x2a33=function(){return _0x14ca8f;};return a301_0x2a33();}export function buildDbDirectoryName(_0x7b4c5,_0x198a90){const _0xe75ce4=a301_0x44f3;return sanitizeSqlPathSegment(_0x7b4c5,_0x198a90!=null?_0xe75ce4(0x1c5)+_0x198a90:_0xe75ce4(0x1c2));}export function buildSqlRelativePath(_0x225718,_0x5623c5,_0x5c808a,_0x69966,_0x26fa08){const _0x5b290d=a301_0x44f3,_0x5f33df=buildDbDirectoryName(_0x5c808a,_0x26fa08),_0x4e231e=sanitizeSqlPathSegment(_0x225718,_0x5b290d(0x1b8)),_0x58f8fc=sanitizeSqlPathSegment(_0x5623c5,_0x4e231e);return _0x5f33df+'/'+_0x4e231e+'_'+_0x58f8fc+getSqlFileExtension(_0x69966);}