@lovrabet/rabetbase-cli 2.5.3-beta.4 → 2.5.3

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 (352) 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/index.js +1 -1
  26. package/lib/commands/app/list.js +1 -1
  27. package/lib/commands/app/members-list.js +1 -1
  28. package/lib/commands/app/remote-directory.js +1 -1
  29. package/lib/commands/app/shared.js +1 -1
  30. package/lib/commands/app-config/delete.js +1 -1
  31. package/lib/commands/app-config/get.js +1 -1
  32. package/lib/commands/app-config/index.js +1 -1
  33. package/lib/commands/app-config/list.js +1 -1
  34. package/lib/commands/app-config/set.js +1 -1
  35. package/lib/commands/app-config/shared.js +1 -1
  36. package/lib/commands/auth/index.js +1 -1
  37. package/lib/commands/bff/create.js +1 -1
  38. package/lib/commands/bff/delete.js +1 -1
  39. package/lib/commands/bff/detail.js +1 -1
  40. package/lib/commands/bff/index.js +1 -1
  41. package/lib/commands/bff/list.js +1 -1
  42. package/lib/commands/bff/logs.js +1 -1
  43. package/lib/commands/bff/pull.js +1 -1
  44. package/lib/commands/bff/push.js +1 -1
  45. package/lib/commands/bff/status.js +1 -1
  46. package/lib/commands/cli-skill/index.js +1 -1
  47. package/lib/commands/cli-update.js +1 -1
  48. package/lib/commands/codegen/index.js +1 -1
  49. package/lib/commands/codegen/sdk.js +1 -1
  50. package/lib/commands/codegen/sql.js +1 -1
  51. package/lib/commands/common/app-registry.js +1 -1
  52. package/lib/commands/common/app-selector.js +1 -1
  53. package/lib/commands/common/async-task.js +1 -1
  54. package/lib/commands/common/dry-run.js +1 -1
  55. package/lib/commands/common/flags.js +1 -1
  56. package/lib/commands/common/local-file.js +1 -1
  57. package/lib/commands/common/validate.js +1 -1
  58. package/lib/commands/config/delete.js +1 -1
  59. package/lib/commands/config/get.js +1 -1
  60. package/lib/commands/config/index.js +1 -1
  61. package/lib/commands/config/init.js +1 -1
  62. package/lib/commands/config/list.js +1 -1
  63. package/lib/commands/config/set.js +1 -1
  64. package/lib/commands/config/shared.js +1 -1
  65. package/lib/commands/dataset/batch-design.js +1 -1
  66. package/lib/commands/dataset/business-group-update.js +1 -1
  67. package/lib/commands/dataset/business-groups.js +1 -1
  68. package/lib/commands/dataset/capability.js +1 -1
  69. package/lib/commands/dataset/cross-relation-create.js +1 -1
  70. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  71. package/lib/commands/dataset/cross-relation-list.js +1 -1
  72. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  73. package/lib/commands/dataset/cross-relation-update.js +1 -1
  74. package/lib/commands/dataset/delete.js +1 -1
  75. package/lib/commands/dataset/detail.js +1 -1
  76. package/lib/commands/dataset/extend-update.js +1 -1
  77. package/lib/commands/dataset/field-restore.js +1 -1
  78. package/lib/commands/dataset/field-update.js +1 -1
  79. package/lib/commands/dataset/generate.js +1 -1
  80. package/lib/commands/dataset/index.js +1 -1
  81. package/lib/commands/dataset/list.js +1 -1
  82. package/lib/commands/dataset/operations.js +1 -1
  83. package/lib/commands/dataset/relation-audit.js +1 -1
  84. package/lib/commands/dataset/relation-create.js +1 -1
  85. package/lib/commands/dataset/relation-delete.js +1 -1
  86. package/lib/commands/dataset/relation-shared.js +1 -1
  87. package/lib/commands/dataset/relation-update.js +1 -1
  88. package/lib/commands/dataset/relations.js +1 -1
  89. package/lib/commands/dataset/rename.js +1 -1
  90. package/lib/commands/dataset/restore.js +1 -1
  91. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  92. package/lib/commands/db/analysis-batching.js +1 -1
  93. package/lib/commands/db/analyze-batch-plan.js +1 -1
  94. package/lib/commands/db/analyze-cancel.js +1 -1
  95. package/lib/commands/db/analyze-start.js +1 -1
  96. package/lib/commands/db/analyze-status.js +1 -1
  97. package/lib/commands/db/create.js +1 -1
  98. package/lib/commands/db/delete.js +1 -1
  99. package/lib/commands/db/detail.js +1 -1
  100. package/lib/commands/db/diff-refresh-start.js +1 -1
  101. package/lib/commands/db/diff-refresh-status.js +1 -1
  102. package/lib/commands/db/diff.js +1 -1
  103. package/lib/commands/db/index.js +1 -1
  104. package/lib/commands/db/list.js +1 -1
  105. package/lib/commands/db/shared.js +1 -1
  106. package/lib/commands/db/table-diff-shared.js +1 -1
  107. package/lib/commands/db/tables.js +1 -1
  108. package/lib/commands/db/test.js +1 -1
  109. package/lib/commands/db/update.js +1 -1
  110. package/lib/commands/deployment/index.js +1 -1
  111. package/lib/commands/deployment/sync-all.js +1 -1
  112. package/lib/commands/deployment/sync-jobs.js +1 -1
  113. package/lib/commands/deployment/sync-status.js +1 -1
  114. package/lib/commands/doctor.js +1 -1
  115. package/lib/commands/file/index.js +1 -1
  116. package/lib/commands/flow/create.js +1 -1
  117. package/lib/commands/flow/detail.js +1 -1
  118. package/lib/commands/flow/index.js +1 -1
  119. package/lib/commands/flow/list.js +1 -1
  120. package/lib/commands/flow/publish.js +1 -1
  121. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  122. package/lib/commands/flow/runtime-role-list.js +1 -1
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  124. package/lib/commands/flow/runtime-user-search.js +1 -1
  125. package/lib/commands/flow/shared.js +1 -1
  126. package/lib/commands/flow/update.js +1 -1
  127. package/lib/commands/flow/validate.js +1 -1
  128. package/lib/commands/instant-api-policy/current.js +1 -1
  129. package/lib/commands/instant-api-policy/index.js +1 -1
  130. package/lib/commands/instant-api-policy/init.js +1 -1
  131. package/lib/commands/instant-api-policy/publish.js +1 -1
  132. package/lib/commands/instant-api-policy/pull.js +1 -1
  133. package/lib/commands/instant-api-policy/revision.js +1 -1
  134. package/lib/commands/instant-api-policy/revisions.js +1 -1
  135. package/lib/commands/instant-api-policy/rollback.js +1 -1
  136. package/lib/commands/instant-api-policy/shared.js +1 -1
  137. package/lib/commands/instant-api-policy/validate.js +1 -1
  138. package/lib/commands/issue/index.js +1 -1
  139. package/lib/commands/issue/nudge.js +1 -1
  140. package/lib/commands/issue/report.js +1 -1
  141. package/lib/commands/issue/shared.js +1 -1
  142. package/lib/commands/kb/create.js +1 -1
  143. package/lib/commands/kb/delete.js +1 -1
  144. package/lib/commands/kb/detail.js +1 -1
  145. package/lib/commands/kb/index.js +1 -1
  146. package/lib/commands/kb/list.js +1 -1
  147. package/lib/commands/kb/search.js +1 -1
  148. package/lib/commands/kb/shared.js +1 -1
  149. package/lib/commands/kb/update.js +1 -1
  150. package/lib/commands/logs/index.js +1 -1
  151. package/lib/commands/menu/asset-update.js +1 -1
  152. package/lib/commands/menu/delete.js +1 -1
  153. package/lib/commands/menu/external-link-create.js +1 -1
  154. package/lib/commands/menu/external-link-update.js +1 -1
  155. package/lib/commands/menu/group-create.js +1 -1
  156. package/lib/commands/menu/group-update.js +1 -1
  157. package/lib/commands/menu/index.js +1 -1
  158. package/lib/commands/menu/list.js +1 -1
  159. package/lib/commands/menu/move.js +1 -1
  160. package/lib/commands/menu/regroup-start.js +1 -1
  161. package/lib/commands/menu/rename.js +1 -1
  162. package/lib/commands/menu/shared/compare-table.js +1 -1
  163. package/lib/commands/menu/shared/delete-plan.js +1 -1
  164. package/lib/commands/menu/shared/facts.js +1 -1
  165. package/lib/commands/menu/shared/index.js +1 -1
  166. package/lib/commands/menu/shared/inquirer.js +1 -1
  167. package/lib/commands/menu/shared/local-pages.js +1 -1
  168. package/lib/commands/menu/shared/logic.js +1 -1
  169. package/lib/commands/menu/shared/mutations.js +1 -1
  170. package/lib/commands/menu/shared/service.js +1 -1
  171. package/lib/commands/menu/shared/sync-core.js +1 -1
  172. package/lib/commands/menu/shared/update-core.js +1 -1
  173. package/lib/commands/menu/shared/valid-url.js +1 -1
  174. package/lib/commands/menu/sync.js +1 -1
  175. package/lib/commands/menu/visibility-update.js +1 -1
  176. package/lib/commands/notification/config-create.js +1 -1
  177. package/lib/commands/notification/config-delete.js +1 -1
  178. package/lib/commands/notification/config-list.js +1 -1
  179. package/lib/commands/notification/config-update.js +1 -1
  180. package/lib/commands/notification/index.js +1 -1
  181. package/lib/commands/notification/shared.js +1 -1
  182. package/lib/commands/ocr/index.js +1 -1
  183. package/lib/commands/page/create.js +1 -1
  184. package/lib/commands/page/custom/detail.js +1 -1
  185. package/lib/commands/page/custom/list.js +1 -1
  186. package/lib/commands/page/custom/publish.js +1 -1
  187. package/lib/commands/page/custom/shared.js +1 -1
  188. package/lib/commands/page/custom/syntax.js +1 -1
  189. package/lib/commands/page/custom/update.js +1 -1
  190. package/lib/commands/page/data-list-status.js +1 -1
  191. package/lib/commands/page/generate-start.js +1 -1
  192. package/lib/commands/page/generate-status.js +1 -1
  193. package/lib/commands/page/index.js +1 -1
  194. package/lib/commands/page/pull.js +1 -1
  195. package/lib/commands/page/push.js +1 -1
  196. package/lib/commands/page/relation-audit.js +1 -1
  197. package/lib/commands/page/restore.js +1 -1
  198. package/lib/commands/page/shared.js +1 -1
  199. package/lib/commands/page/sync.js +1 -1
  200. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  201. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  202. package/lib/commands/project/create/format-elapsed.js +1 -1
  203. package/lib/commands/project/create/main.js +1 -1
  204. package/lib/commands/project/create/materialize-project-template.js +1 -1
  205. package/lib/commands/project/create/project-name.js +1 -1
  206. package/lib/commands/project/create/project-template-archive.js +1 -1
  207. package/lib/commands/project/create/project-template-path.js +1 -1
  208. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  209. package/lib/commands/project/create/use-format-code.js +1 -1
  210. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  211. package/lib/commands/project/domain-routing-sync.js +1 -1
  212. package/lib/commands/project/index.js +1 -1
  213. package/lib/commands/project/upgrade.js +1 -1
  214. package/lib/commands/registry.js +1 -1
  215. package/lib/commands/role/delete.js +1 -1
  216. package/lib/commands/role/detail.js +1 -1
  217. package/lib/commands/role/index.js +1 -1
  218. package/lib/commands/role/list.js +1 -1
  219. package/lib/commands/role/shared.js +1 -1
  220. package/lib/commands/role/update.js +1 -1
  221. package/lib/commands/role/user-add.js +1 -1
  222. package/lib/commands/role/user-remove.js +1 -1
  223. package/lib/commands/role/user-resolve.js +1 -1
  224. package/lib/commands/rule/get.js +1 -1
  225. package/lib/commands/rule/index.js +1 -1
  226. package/lib/commands/rule/list.js +1 -1
  227. package/lib/commands/rule/set.js +1 -1
  228. package/lib/commands/rule/shared.js +1 -1
  229. package/lib/commands/run/index.js +1 -1
  230. package/lib/commands/schema.js +1 -1
  231. package/lib/commands/sql/create.js +1 -1
  232. package/lib/commands/sql/delete.js +1 -1
  233. package/lib/commands/sql/detail.js +1 -1
  234. package/lib/commands/sql/exec.js +1 -1
  235. package/lib/commands/sql/index.js +1 -1
  236. package/lib/commands/sql/list.js +1 -1
  237. package/lib/commands/sql/pull.js +1 -1
  238. package/lib/commands/sql/push.js +1 -1
  239. package/lib/commands/sql/shared.js +1 -1
  240. package/lib/commands/sql/status.js +1 -1
  241. package/lib/commands/sql/validate.js +1 -1
  242. package/lib/commands/task/index.js +1 -1
  243. package/lib/commands/task/status.js +1 -1
  244. package/lib/commands/tenant/index.js +1 -1
  245. package/lib/commands/tenant/members-list.js +1 -1
  246. package/lib/commands/tenant/shared.js +1 -1
  247. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  248. package/lib/commands/user-account/index.js +1 -1
  249. package/lib/commands/workspace/add.js +1 -1
  250. package/lib/commands/workspace/index.js +1 -1
  251. package/lib/commands/workspace/remove.js +1 -1
  252. package/lib/config/domain-config.js +1 -1
  253. package/lib/config/project-domain-routing.js +1 -1
  254. package/lib/config/region-config.js +1 -1
  255. package/lib/config/schema.js +1 -1
  256. package/lib/constant/cdn.js +1 -1
  257. package/lib/constant/cli.js +1 -1
  258. package/lib/constant/defaults.js +1 -1
  259. package/lib/constant/domain.js +1 -1
  260. package/lib/constant/env.js +1 -1
  261. package/lib/constant/output.js +1 -1
  262. package/lib/constant/paths.js +1 -1
  263. package/lib/constant/region.js +1 -1
  264. package/lib/constant/risk.js +1 -1
  265. package/lib/constant/routing-profile.js +1 -1
  266. package/lib/context/app-resolver.js +1 -1
  267. package/lib/context/auth-resolver.js +1 -1
  268. package/lib/context/config-loader.js +1 -1
  269. package/lib/context.js +1 -1
  270. package/lib/core/alias-resolver.js +1 -1
  271. package/lib/core/api-client.js +1 -1
  272. package/lib/core/bff/config.js +1 -1
  273. package/lib/core/bff/file-system.js +1 -1
  274. package/lib/core/bff/hash.js +1 -1
  275. package/lib/core/bff/hook-directory.js +1 -1
  276. package/lib/core/bff/lock.js +1 -1
  277. package/lib/core/bff/utils.js +1 -1
  278. package/lib/core/cross-db-relation.js +1 -1
  279. package/lib/core/db-resolver.js +1 -1
  280. package/lib/core/flow-config.js +1 -1
  281. package/lib/core/instant-api-policy/config.js +1 -1
  282. package/lib/core/kb-search-client.js +1 -1
  283. package/lib/core/page/file-system.js +1 -1
  284. package/lib/core/page/hash.js +1 -1
  285. package/lib/core/page/lock.js +1 -1
  286. package/lib/core/page/lr-smart-jsx.js +1 -1
  287. package/lib/core/sql-index-auditor.js +1 -1
  288. package/lib/core/sql-sync/config.js +1 -1
  289. package/lib/core/sql-sync/file-system.js +1 -1
  290. package/lib/core/sql-sync/hash.js +1 -1
  291. package/lib/core/sql-sync/lock.js +1 -1
  292. package/lib/core/sql-sync/utils.js +1 -1
  293. package/lib/core/sql-validator.js +1 -1
  294. package/lib/errors.js +1 -1
  295. package/lib/framework/build-all-flags.js +1 -1
  296. package/lib/framework/error-output.js +1 -1
  297. package/lib/framework/explicit-yes.js +1 -1
  298. package/lib/framework/flags.js +1 -1
  299. package/lib/framework/help.js +1 -1
  300. package/lib/framework/index.js +1 -1
  301. package/lib/framework/output.js +1 -1
  302. package/lib/framework/response.js +1 -1
  303. package/lib/framework/runner-alias.js +1 -1
  304. package/lib/framework/runner.js +1 -1
  305. package/lib/framework/schema-export.js +1 -1
  306. package/lib/framework/supported-flags.js +1 -1
  307. package/lib/framework/types.js +1 -1
  308. package/lib/generated/build-info.d.ts +4 -4
  309. package/lib/generated/build-info.js +1 -1
  310. package/lib/generated/official-routing.js +1 -1
  311. package/lib/generated/routing-contract.js +1 -1
  312. package/lib/help.js +1 -1
  313. package/lib/postinstall.js +1 -1
  314. package/lib/runtime/confirmation.js +1 -1
  315. package/lib/runtime/event.js +1 -1
  316. package/lib/runtime/index.js +1 -1
  317. package/lib/runtime/queue.js +1 -1
  318. package/lib/runtime/resolve.js +1 -1
  319. package/lib/skills/builtin-skill.js +1 -1
  320. package/lib/skills/main.js +1 -1
  321. package/lib/skills/npx-skills-add.js +1 -1
  322. package/lib/skills/skill-presence.js +1 -1
  323. package/lib/telemetry/cli-command-trace.js +1 -1
  324. package/lib/telemetry/cli-help-trace.js +1 -1
  325. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  326. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  327. package/lib/telemetry/send-cli-trace-log.js +1 -1
  328. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  329. package/lib/utils/ai_config.js +1 -1
  330. package/lib/utils/apply-jq-filter.js +1 -1
  331. package/lib/utils/cdn-config.js +1 -1
  332. package/lib/utils/check-sdk-version.js +1 -1
  333. package/lib/utils/cli-version-check.js +1 -1
  334. package/lib/utils/cli-version-policy.js +1 -1
  335. package/lib/utils/config.js +1 -1
  336. package/lib/utils/entity-with-id.js +1 -1
  337. package/lib/utils/file-utils.js +1 -1
  338. package/lib/utils/guides-cdn.js +1 -1
  339. package/lib/utils/http-client.js +1 -1
  340. package/lib/utils/is-non-interactive.js +1 -1
  341. package/lib/utils/logger.js +1 -1
  342. package/lib/utils/params.js +1 -1
  343. package/lib/utils/platform.js +1 -1
  344. package/lib/utils/sleep.js +1 -1
  345. package/lib/utils/template-replacer.js +1 -1
  346. package/lib/utils/update-notice.js +1 -1
  347. package/lib/utils/version.js +1 -1
  348. package/lib/utils/with-active-cookie.js +1 -1
  349. package/lib/utils/write-cli-side-channel.js +1 -1
  350. package/package.json +1 -1
  351. package/skills/rabetbase/SKILL.md +1 -1
  352. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a282_0x4b2c68=a282_0x284e;(function(_0x2e6b4c,_0x4be8b8){const _0x49efe7=a282_0x284e,_0x14b536=_0x2e6b4c();while(!![]){try{const _0x2ee9ac=parseInt(_0x49efe7(0x1b2))/0x1*(parseInt(_0x49efe7(0x1ba))/0x2)+-parseInt(_0x49efe7(0x1d4))/0x3*(-parseInt(_0x49efe7(0x1ca))/0x4)+-parseInt(_0x49efe7(0x1d6))/0x5+parseInt(_0x49efe7(0x1e0))/0x6*(parseInt(_0x49efe7(0x1b9))/0x7)+parseInt(_0x49efe7(0x1e8))/0x8+parseInt(_0x49efe7(0x1e1))/0x9+parseInt(_0x49efe7(0x1a9))/0xa*(-parseInt(_0x49efe7(0x1ce))/0xb);if(_0x2ee9ac===_0x4be8b8)break;else _0x14b536['push'](_0x14b536['shift']());}catch(_0x31c1f8){_0x14b536['push'](_0x14b536['shift']());}}}(a282_0x458d,0x461c2));function a282_0x284e(_0x3f305b,_0x4414f8){_0x3f305b=_0x3f305b-0x1a7;const _0x458dcd=a282_0x458d();let _0x284e65=_0x458dcd[_0x3f305b];return _0x284e65;}import{randomUUID}from'node:crypto';import{mkdir,readFile,rename,stat,unlink,writeFile}from'node:fs/promises';function a282_0x458d(){const _0x47a0c4=['Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20','isArray','ENOENT','rules','allow','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_exists','object','created','string','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','parse','3188QTbGJq','policyRoot','appCode','Review\x20the\x20file\x20before\x20retrying.','165341VSTBfd','stringify','decode','instant_api_policy_app_code_mismatch','appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.','instant_api_policy_file_too_large','2100GqbxoI','code','1014745Fvvbwe','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20','utf8','force','instant_api_policy_file_unreadable','byteLength','policyFilePath','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','908322KHZnxH','1272186aSkoxK','.rabetbase/instant-api-policy','size','instant_api_policy_file_unwritable','defaults','EEXIST','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','4379304JLHmLt','instantApi','trim','790RRLoLf','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','Policy\x20defaults.instantApi\x20is\x20required.','instant_api_policy_file_invalid','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','catch','unchanged','length','instant_api_policy_json_invalid','3BlmueB','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','includes','version','instant_api_policy_file_missing','pid','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','14hDJlvM','85418yAvZaT','instant_api_policy_app_code_invalid','overwritten','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.'];a282_0x458d=function(){return _0x47a0c4;};return a282_0x458d();}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=a282_0x4b2c68(0x1e2);export const INSTANT_API_POLICY_FILE_NAME='policy.json';export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x240912,_0xd8dcfb,_0x3e7df5){return new CliError(_0x240912,0x1,_0xd8dcfb,_0x3e7df5);}export function loadInstantApiPolicyLocalConfig(_0x3b6c51,_0x53e461){assertSafeAppCode(_0x3b6c51);const _0x5ca9a4=resolve(_0x53e461??findProjectRootDirectory()),_0x126b7a=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x3b6c51+'/'+INSTANT_API_POLICY_FILE_NAME,_0x278ef3=resolve(_0x5ca9a4,INSTANT_API_POLICY_RELATIVE_ROOT,_0x3b6c51),_0x1486b2=resolve(_0x278ef3,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x5ca9a4,'appCode':_0x3b6c51,'policyRoot':_0x278ef3,'policyFilePath':_0x1486b2,'policyRelativePath':_0x126b7a};}export function createDefaultInstantApiPolicyConfig(_0x343bee,_0x882c39=a282_0x4b2c68(0x1c2)){return assertSafeAppCode(_0x343bee),{'version':'2','appCode':_0x343bee,'defaults':{'instantApi':_0x882c39},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x39c6e8){const _0x25c777=a282_0x4b2c68;let _0x1fca40;try{_0x1fca40=await stat(_0x39c6e8[_0x25c777(0x1de)]);}catch(_0x2429ad){throw instantApiPolicyError(_0x25c777(0x1b6),_0x25c777(0x1d8)+_0x39c6e8[_0x25c777(0x1de)],_0x25c777(0x1d7));}if(!_0x1fca40['isFile']())throw instantApiPolicyError('instant_api_policy_file_invalid',_0x25c777(0x1ad)+_0x39c6e8[_0x25c777(0x1de)]);if(_0x1fca40[_0x25c777(0x1e3)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x25c777(0x1d3),_0x25c777(0x1b3));let _0x483625;try{_0x483625=await readFile(_0x39c6e8['policyFilePath']);}catch{throw instantApiPolicyError(_0x25c777(0x1dc),_0x25c777(0x1d9)+_0x39c6e8[_0x25c777(0x1de)]);}if(_0x483625[_0x25c777(0x1dd)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x25c777(0x1d3),_0x25c777(0x1b3));let _0x242ccc;try{_0x242ccc=new TextDecoder('utf-8',{'fatal':!![],'ignoreBOM':!![]})[_0x25c777(0x1d0)](_0x483625);}catch{throw instantApiPolicyError(_0x25c777(0x1ac),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x39c6e8['policyFilePath']);}let _0x566a71;try{_0x566a71=JSON[_0x25c777(0x1c9)](_0x242ccc);}catch{throw instantApiPolicyError(_0x25c777(0x1b1),_0x25c777(0x1be)+_0x39c6e8[_0x25c777(0x1de)]);}return assertLocalPolicyContract(_0x566a71,_0x39c6e8[_0x25c777(0x1cc)]);}export async function writeInstantApiPolicyConfigFile(_0x4e3fd9,_0x4bad17,_0x13b0d3={}){const _0x2ed7ca=a282_0x4b2c68,_0x68c259=assertLocalPolicyContract(_0x4bad17,_0x4e3fd9[_0x2ed7ca(0x1cc)]),_0x1f267d=JSON[_0x2ed7ca(0x1cf)](_0x68c259,null,0x2)+'\x0a';if(Buffer[_0x2ed7ca(0x1dd)](_0x1f267d,'utf8')>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError('instant_api_policy_file_too_large',_0x2ed7ca(0x1b3));await mkdir(_0x4e3fd9[_0x2ed7ca(0x1cb)],{'recursive':!![]});let _0x549820;try{_0x549820=await readFile(_0x4e3fd9[_0x2ed7ca(0x1de)],_0x2ed7ca(0x1da));}catch(_0x40c1da){if(!isMissingFile(_0x40c1da))throw instantApiPolicyError(_0x2ed7ca(0x1dc),_0x2ed7ca(0x1c3)+_0x4e3fd9[_0x2ed7ca(0x1de)]);}if(_0x549820===_0x1f267d)return{'action':_0x2ed7ca(0x1af),'filePath':_0x4e3fd9[_0x2ed7ca(0x1de)]};if(_0x549820!==undefined&&!_0x13b0d3['force'])throw instantApiPolicyError(_0x2ed7ca(0x1c4),_0x2ed7ca(0x1aa)+_0x4e3fd9[_0x2ed7ca(0x1de)],'Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.');if(_0x549820===undefined)try{return await writeFile(_0x4e3fd9[_0x2ed7ca(0x1de)],_0x1f267d,{'encoding':_0x2ed7ca(0x1da),'flag':'wx'}),{'action':_0x2ed7ca(0x1c6),'filePath':_0x4e3fd9[_0x2ed7ca(0x1de)]};}catch(_0x34dbac){if(!isAlreadyExists(_0x34dbac))throw instantApiPolicyError(_0x2ed7ca(0x1e4),'Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20'+_0x4e3fd9['policyFilePath']);if(!_0x13b0d3[_0x2ed7ca(0x1db)])throw instantApiPolicyError(_0x2ed7ca(0x1c4),_0x2ed7ca(0x1b8)+_0x4e3fd9['policyFilePath'],_0x2ed7ca(0x1cd));}const _0x5bfb44=resolve(dirname(_0x4e3fd9[_0x2ed7ca(0x1de)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x2ed7ca(0x1b7)]+'.'+randomUUID()+'.tmp');try{await writeFile(_0x5bfb44,_0x1f267d,{'encoding':_0x2ed7ca(0x1da),'flag':'wx'}),await rename(_0x5bfb44,_0x4e3fd9[_0x2ed7ca(0x1de)]);}catch{await unlink(_0x5bfb44)[_0x2ed7ca(0x1ae)](()=>undefined);throw instantApiPolicyError('instant_api_policy_file_unwritable',_0x2ed7ca(0x1df)+_0x4e3fd9[_0x2ed7ca(0x1de)]);}return{'action':_0x2ed7ca(0x1bc),'filePath':_0x4e3fd9[_0x2ed7ca(0x1de)]};}function assertSafeAppCode(_0x3ec73a){const _0x5d211c=a282_0x4b2c68,_0x549069=_0x3ec73a[_0x5d211c(0x1a8)]();if(!_0x549069||_0x549069!==_0x3ec73a||_0x549069[_0x5d211c(0x1b0)]>0x64||_0x549069==='.'||_0x549069==='..'||_0x549069[_0x5d211c(0x1b4)]('/')||_0x549069[_0x5d211c(0x1b4)]('\x5c')||_0x549069[_0x5d211c(0x1b4)]('\x00'))throw instantApiPolicyError(_0x5d211c(0x1bb),_0x5d211c(0x1d2));}function assertLocalPolicyContract(_0x4d6c53,_0x48e5d8){const _0x156fd1=a282_0x4b2c68;if(!isObject(_0x4d6c53))throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.');if(_0x4d6c53[_0x156fd1(0x1b5)]!=='1'&&_0x4d6c53[_0x156fd1(0x1b5)]!=='2')throw instantApiPolicyError('instant_api_policy_version_invalid',_0x156fd1(0x1bd),'version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.');if(_0x4d6c53[_0x156fd1(0x1cc)]!==_0x48e5d8)throw instantApiPolicyError(_0x156fd1(0x1d1),_0x156fd1(0x1e7)+_0x48e5d8+'.');if(!isObject(_0x4d6c53[_0x156fd1(0x1e5)])||typeof _0x4d6c53['defaults'][_0x156fd1(0x1a7)]!==_0x156fd1(0x1c7))throw instantApiPolicyError('instant_api_policy_defaults_invalid',_0x156fd1(0x1ab));if(_0x4d6c53['rules']!==undefined&&_0x4d6c53[_0x156fd1(0x1c1)]!==null&&!Array[_0x156fd1(0x1bf)](_0x4d6c53[_0x156fd1(0x1c1)]))throw instantApiPolicyError('instant_api_policy_rules_invalid',_0x156fd1(0x1c8));return _0x4d6c53;}function isObject(_0x4c38c8){const _0x2f81dd=a282_0x4b2c68;return _0x4c38c8!==null&&typeof _0x4c38c8==='object'&&!Array[_0x2f81dd(0x1bf)](_0x4c38c8);}function isMissingFile(_0x80db51){const _0x4e50c5=a282_0x4b2c68;return Boolean(_0x80db51&&typeof _0x80db51===_0x4e50c5(0x1c5)&&_0x80db51[_0x4e50c5(0x1d5)]===_0x4e50c5(0x1c0));}function isAlreadyExists(_0x1831f8){const _0x1f6aa8=a282_0x4b2c68;return Boolean(_0x1831f8&&typeof _0x1831f8===_0x1f6aa8(0x1c5)&&_0x1831f8[_0x1f6aa8(0x1d5)]===_0x1f6aa8(0x1e6));}
1
+ const a282_0x3fc5f5=a282_0x107c;(function(_0x2526a6,_0x453625){const _0x461f9d=a282_0x107c,_0x5838da=_0x2526a6();while(!![]){try{const _0x4bfef7=parseInt(_0x461f9d(0x1bd))/0x1+parseInt(_0x461f9d(0x181))/0x2+-parseInt(_0x461f9d(0x183))/0x3*(parseInt(_0x461f9d(0x1c1))/0x4)+parseInt(_0x461f9d(0x1c0))/0x5*(-parseInt(_0x461f9d(0x19f))/0x6)+-parseInt(_0x461f9d(0x1b4))/0x7*(-parseInt(_0x461f9d(0x194))/0x8)+-parseInt(_0x461f9d(0x17f))/0x9*(parseInt(_0x461f9d(0x1af))/0xa)+-parseInt(_0x461f9d(0x191))/0xb*(-parseInt(_0x461f9d(0x180))/0xc);if(_0x4bfef7===_0x453625)break;else _0x5838da['push'](_0x5838da['shift']());}catch(_0x22cd32){_0x5838da['push'](_0x5838da['shift']());}}}(a282_0x355e,0x692d6));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=a282_0x3fc5f5(0x197);export const INSTANT_API_POLICY_FILE_NAME=a282_0x3fc5f5(0x1b1);export const MAX_INSTANT_API_POLICY_BYTES=0x400*0x400;export function instantApiPolicyError(_0x19cad7,_0x440606,_0x2eb5a1){return new CliError(_0x19cad7,0x1,_0x440606,_0x2eb5a1);}export function loadInstantApiPolicyLocalConfig(_0x1eb480,_0x56c3bf){assertSafeAppCode(_0x1eb480);const _0x1f5175=resolve(_0x56c3bf??findProjectRootDirectory()),_0xe8cfd1=INSTANT_API_POLICY_RELATIVE_ROOT+'/'+_0x1eb480+'/'+INSTANT_API_POLICY_FILE_NAME,_0x289ab1=resolve(_0x1f5175,INSTANT_API_POLICY_RELATIVE_ROOT,_0x1eb480),_0x568207=resolve(_0x289ab1,INSTANT_API_POLICY_FILE_NAME);return{'projectRoot':_0x1f5175,'appCode':_0x1eb480,'policyRoot':_0x289ab1,'policyFilePath':_0x568207,'policyRelativePath':_0xe8cfd1};}export function createDefaultInstantApiPolicyConfig(_0x114691,_0x559680=a282_0x3fc5f5(0x1ad)){return assertSafeAppCode(_0x114691),{'version':'2','appCode':_0x114691,'defaults':{'instantApi':_0x559680},'rules':[]};}export async function readInstantApiPolicyConfigFile(_0x39ed67){const _0xeca7f1=a282_0x3fc5f5;let _0x5ede91;try{_0x5ede91=await stat(_0x39ed67['policyFilePath']);}catch(_0x5c8bd2){throw instantApiPolicyError(_0xeca7f1(0x18b),_0xeca7f1(0x185)+_0x39ed67[_0xeca7f1(0x1a0)],_0xeca7f1(0x1be));}if(!_0x5ede91[_0xeca7f1(0x17e)]())throw instantApiPolicyError(_0xeca7f1(0x1b7),_0xeca7f1(0x19e)+_0x39ed67[_0xeca7f1(0x1a0)]);if(_0x5ede91[_0xeca7f1(0x1ae)]>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0xeca7f1(0x1a3),_0xeca7f1(0x19d));let _0x5c08de;try{_0x5c08de=await readFile(_0x39ed67[_0xeca7f1(0x1a0)]);}catch{throw instantApiPolicyError(_0xeca7f1(0x17c),_0xeca7f1(0x1b6)+_0x39ed67['policyFilePath']);}if(_0x5c08de['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 _0x2bc17c;try{_0x2bc17c=new TextDecoder(_0xeca7f1(0x1b9),{'fatal':!![],'ignoreBOM':!![]})[_0xeca7f1(0x199)](_0x5c08de);}catch{throw instantApiPolicyError(_0xeca7f1(0x1b7),'Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20UTF-8:\x20'+_0x39ed67[_0xeca7f1(0x1a0)]);}let _0x350d56;try{_0x350d56=JSON[_0xeca7f1(0x187)](_0x2bc17c);}catch{throw instantApiPolicyError('instant_api_policy_json_invalid','Instant\x20API\x20policy\x20file\x20is\x20not\x20valid\x20JSON:\x20'+_0x39ed67[_0xeca7f1(0x1a0)]);}return assertLocalPolicyContract(_0x350d56,_0x39ed67['appCode']);}export async function writeInstantApiPolicyConfigFile(_0x29f831,_0x367df3,_0x5c5ca1={}){const _0x1af419=a282_0x3fc5f5,_0x20ec59=assertLocalPolicyContract(_0x367df3,_0x29f831[_0x1af419(0x196)]),_0x37848a=JSON['stringify'](_0x20ec59,null,0x2)+'\x0a';if(Buffer[_0x1af419(0x1a9)](_0x37848a,_0x1af419(0x17d))>MAX_INSTANT_API_POLICY_BYTES)throw instantApiPolicyError(_0x1af419(0x1a3),_0x1af419(0x19d));await mkdir(_0x29f831[_0x1af419(0x18c)],{'recursive':!![]});let _0x4137d0;try{_0x4137d0=await readFile(_0x29f831[_0x1af419(0x1a0)],_0x1af419(0x17d));}catch(_0x4d9b68){if(!isMissingFile(_0x4d9b68))throw instantApiPolicyError(_0x1af419(0x17c),_0x1af419(0x18d)+_0x29f831[_0x1af419(0x1a0)]);}if(_0x4137d0===_0x37848a)return{'action':_0x1af419(0x1a8),'filePath':_0x29f831[_0x1af419(0x1a0)]};if(_0x4137d0!==undefined&&!_0x5c5ca1[_0x1af419(0x1bf)])throw instantApiPolicyError(_0x1af419(0x1a6),_0x1af419(0x1c2)+_0x29f831[_0x1af419(0x1a0)],_0x1af419(0x182));if(_0x4137d0===undefined)try{return await writeFile(_0x29f831['policyFilePath'],_0x37848a,{'encoding':_0x1af419(0x17d),'flag':'wx'}),{'action':_0x1af419(0x184),'filePath':_0x29f831[_0x1af419(0x1a0)]};}catch(_0x2f58a4){if(!isAlreadyExists(_0x2f58a4))throw instantApiPolicyError(_0x1af419(0x198),_0x1af419(0x1a5)+_0x29f831[_0x1af419(0x1a0)]);if(!_0x5c5ca1[_0x1af419(0x1bf)])throw instantApiPolicyError(_0x1af419(0x1a6),_0x1af419(0x1ac)+_0x29f831[_0x1af419(0x1a0)],_0x1af419(0x193));}const _0x16913f=resolve(dirname(_0x29f831[_0x1af419(0x1a0)]),'.'+INSTANT_API_POLICY_FILE_NAME+'.'+process[_0x1af419(0x1ba)]+'.'+randomUUID()+_0x1af419(0x188));try{await writeFile(_0x16913f,_0x37848a,{'encoding':'utf8','flag':'wx'}),await rename(_0x16913f,_0x29f831['policyFilePath']);}catch{await unlink(_0x16913f)[_0x1af419(0x18e)](()=>undefined);throw instantApiPolicyError(_0x1af419(0x198),_0x1af419(0x1b2)+_0x29f831[_0x1af419(0x1a0)]);}return{'action':_0x1af419(0x1ab),'filePath':_0x29f831['policyFilePath']};}function a282_0x355e(){const _0x3266ac=['instant_api_policy_file_invalid','instant_api_policy_json_invalid','utf-8','pid','version\x20is\x20the\x20JSON\x20schema\x20version;\x20published\x20history\x20uses\x20the\x20separate\x20revision\x20field.','Instant\x20API\x20policy\x20version\x20must\x20be\x20\x221\x22\x20or\x20\x222\x22.','725824DlsAGF','Run\x20`rabetbase\x20instant-api-policy\x20init`\x20or\x20`rabetbase\x20instant-api-policy\x20pull`\x20first.','force','4200230HAbAxO','296WrHdlp','Instant\x20API\x20policy\x20file\x20already\x20exists:\x20','instant_api_policy_file_unreadable','utf8','isFile','9jeahUV','622284fQpbcG','1598470OmrSbH','Review\x20local\x20changes,\x20then\x20rerun\x20with\x20--force\x20--yes\x20if\x20replacement\x20is\x20intended.','32811ZtgMiT','created','Instant\x20API\x20policy\x20file\x20does\x20not\x20exist:\x20','rules','parse','.tmp','Policy\x20defaults.instantApi\x20is\x20required.','instant_api_policy_app_code_invalid','instant_api_policy_file_missing','policyRoot','Cannot\x20inspect\x20Instant\x20API\x20policy\x20file:\x20','catch','length','object','66IwbREf','instant_api_policy_app_code_mismatch','Review\x20the\x20file\x20before\x20retrying.','13400vviJof','ENOENT','appCode','.rabetbase/instant-api-policy','instant_api_policy_file_unwritable','decode','instant_api_policy_rules_invalid','Policy\x20rules\x20must\x20be\x20an\x20array\x20or\x20null.','version','Instant\x20API\x20policy\x20file\x20exceeds\x20the\x201\x20MiB\x20CLI\x20limit.','Instant\x20API\x20policy\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','6Evdegj','policyFilePath','trim','code','instant_api_policy_file_too_large','Policy\x20appCode\x20must\x20match\x20the\x20selected\x20application\x20','Cannot\x20write\x20Instant\x20API\x20policy\x20file:\x20','instant_api_policy_file_exists','Instant\x20API\x20policy\x20JSON\x20root\x20must\x20be\x20an\x20object.','unchanged','byteLength','instant_api_policy_defaults_invalid','overwritten','Instant\x20API\x20policy\x20file\x20was\x20created\x20concurrently:\x20','allow','size','1797860PzBZsK','includes','policy.json','Cannot\x20replace\x20Instant\x20API\x20policy\x20file:\x20','EEXIST','1771qyneOR','isArray','Cannot\x20read\x20Instant\x20API\x20policy\x20file:\x20'];a282_0x355e=function(){return _0x3266ac;};return a282_0x355e();}function assertSafeAppCode(_0x3ff369){const _0x2a3aea=a282_0x3fc5f5,_0x4dec5e=_0x3ff369[_0x2a3aea(0x1a1)]();if(!_0x4dec5e||_0x4dec5e!==_0x3ff369||_0x4dec5e[_0x2a3aea(0x18f)]>0x64||_0x4dec5e==='.'||_0x4dec5e==='..'||_0x4dec5e[_0x2a3aea(0x1b0)]('/')||_0x4dec5e[_0x2a3aea(0x1b0)]('\x5c')||_0x4dec5e['includes']('\x00'))throw instantApiPolicyError(_0x2a3aea(0x18a),'appCode\x20cannot\x20be\x20used\x20as\x20the\x20fixed\x20Instant\x20API\x20policy\x20directory\x20name.');}function assertLocalPolicyContract(_0x37a5af,_0x2c1304){const _0x416902=a282_0x3fc5f5;if(!isObject(_0x37a5af))throw instantApiPolicyError(_0x416902(0x1b8),_0x416902(0x1a7));if(_0x37a5af[_0x416902(0x19c)]!=='1'&&_0x37a5af[_0x416902(0x19c)]!=='2')throw instantApiPolicyError('instant_api_policy_version_invalid',_0x416902(0x1bc),_0x416902(0x1bb));if(_0x37a5af[_0x416902(0x196)]!==_0x2c1304)throw instantApiPolicyError(_0x416902(0x192),_0x416902(0x1a4)+_0x2c1304+'.');if(!isObject(_0x37a5af['defaults'])||typeof _0x37a5af['defaults']['instantApi']!=='string')throw instantApiPolicyError(_0x416902(0x1aa),_0x416902(0x189));if(_0x37a5af[_0x416902(0x186)]!==undefined&&_0x37a5af['rules']!==null&&!Array[_0x416902(0x1b5)](_0x37a5af[_0x416902(0x186)]))throw instantApiPolicyError(_0x416902(0x19a),_0x416902(0x19b));return _0x37a5af;}function isObject(_0x7dc7ef){const _0xa752c8=a282_0x3fc5f5;return _0x7dc7ef!==null&&typeof _0x7dc7ef===_0xa752c8(0x190)&&!Array[_0xa752c8(0x1b5)](_0x7dc7ef);}function isMissingFile(_0x4da24a){const _0x116df3=a282_0x3fc5f5;return Boolean(_0x4da24a&&typeof _0x4da24a===_0x116df3(0x190)&&_0x4da24a[_0x116df3(0x1a2)]===_0x116df3(0x195));}function a282_0x107c(_0x1df252,_0x164666){_0x1df252=_0x1df252-0x17c;const _0x355e32=a282_0x355e();let _0x107c6e=_0x355e32[_0x1df252];return _0x107c6e;}function isAlreadyExists(_0x1fd011){const _0x530da9=a282_0x3fc5f5;return Boolean(_0x1fd011&&typeof _0x1fd011==='object'&&_0x1fd011['code']===_0x530da9(0x1b3));}
@@ -1 +1 @@
1
- const a283_0x19c988=a283_0x5d67;(function(_0x241d14,_0x1cd04e){const _0x59b97e=a283_0x5d67,_0x42ee2c=_0x241d14();while(!![]){try{const _0x517415=parseInt(_0x59b97e(0x1d1))/0x1*(parseInt(_0x59b97e(0x1ca))/0x2)+parseInt(_0x59b97e(0x1e4))/0x3*(parseInt(_0x59b97e(0x1ce))/0x4)+-parseInt(_0x59b97e(0x1d3))/0x5+-parseInt(_0x59b97e(0x1c3))/0x6+parseInt(_0x59b97e(0x1d2))/0x7*(-parseInt(_0x59b97e(0x206))/0x8)+parseInt(_0x59b97e(0x1d4))/0x9*(parseInt(_0x59b97e(0x1c0))/0xa)+-parseInt(_0x59b97e(0x1de))/0xb*(parseInt(_0x59b97e(0x1e7))/0xc);if(_0x517415===_0x1cd04e)break;else _0x42ee2c['push'](_0x42ee2c['shift']());}catch(_0xff71){_0x42ee2c['push'](_0x42ee2c['shift']());}}}(a283_0xacac,0x49c99));function a283_0x5d67(_0x591e5e,_0x312891){_0x591e5e=_0x591e5e-0x1b8;const _0xacac7a=a283_0xacac();let _0x5d678b=_0xacac7a[_0x591e5e];return _0x5d678b;}import{getKbDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a283_0x19c988(0x1ba),a283_0x19c988(0x1c1),'total','hits',a283_0x19c988(0x1ec),a283_0x19c988(0x1d7)],HIT_KEYS=[a283_0x19c988(0x1be),a283_0x19c988(0x200),a283_0x19c988(0x1c9),a283_0x19c988(0x1f9),'title','text',a283_0x19c988(0x1bb),a283_0x19c988(0x205),a283_0x19c988(0x1da),'finalScore','scoreKind'];export async function searchDevelopmentKnowledge(_0x2583f9){const _0x2dacb0=a283_0x19c988,_0x2bb1df=_0x2583f9[_0x2dacb0(0x1d6)][_0x2dacb0(0x204)](),_0x1f260a=_0x2583f9[_0x2dacb0(0x1e1)][_0x2dacb0(0x204)]();if(!_0x2bb1df)throw CliErrors[_0x2dacb0(0x1bc)](_0x2dacb0(0x1ef));if(!_0x2583f9[_0x2dacb0(0x1c6)][_0x2dacb0(0x204)]())throw CliErrors[_0x2dacb0(0x1d8)]();if(!_0x1f260a)throw CliErrors[_0x2dacb0(0x1bc)](_0x2dacb0(0x202));validateTopK(_0x2583f9[_0x2dacb0(0x1fd)]);const _0x327ee1=getKbDomain()+_0x2dacb0(0x1c5);let _0x6241fe;try{_0x6241fe=await fetch(_0x327ee1,{'method':_0x2dacb0(0x1e2),'headers':{'Content-Type':'application/json','Cookie':_0x2583f9[_0x2dacb0(0x1c6)],'X-Invoke-Source':_0x2dacb0(0x1fa)},'body':JSON[_0x2dacb0(0x201)]({'appCode':_0x2bb1df,'query':_0x1f260a,..._0x2583f9[_0x2dacb0(0x1fd)]!==undefined?{'topK':_0x2583f9['topK']}:{}}),'signal':_0x2583f9[_0x2dacb0(0x1e8)]});}catch(_0x55ad0f){if(_0x55ad0f instanceof CliError)throw _0x55ad0f;if(_0x55ad0f instanceof Error&&_0x55ad0f[_0x2dacb0(0x1c2)]===_0x2dacb0(0x1ea))throw _0x55ad0f;throw CliErrors[_0x2dacb0(0x1f7)](_0x2dacb0(0x1f1));}if(!hasNoStore(_0x6241fe[_0x2dacb0(0x1ed)]))throw CliErrors[_0x2dacb0(0x207)]('SmartCode\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.');if(_0x6241fe[_0x2dacb0(0x203)]===0x191)throw CliErrors[_0x2dacb0(0x1d8)]();if(!_0x6241fe['ok'])throw CliErrors[_0x2dacb0(0x207)](_0x2dacb0(0x1c8)+_0x6241fe[_0x2dacb0(0x203)]+').');if(!(_0x6241fe['headers'][_0x2dacb0(0x1c4)](_0x2dacb0(0x1b9))??'')['toLowerCase']()['includes'](_0x2dacb0(0x1fb)))throw CliErrors['apiError']('SmartCode\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.');let _0x511cc1;try{_0x511cc1=await _0x6241fe['json']();}catch{throw CliErrors['apiError'](_0x2dacb0(0x1e0));}return parseDevelopmentSearchResponse(readEnvelopeData(_0x511cc1),_0x2583f9[_0x2dacb0(0x1fd)]);}function readEnvelopeData(_0x4bae6a){const _0x5f37ab=a283_0x19c988,_0x5a645f=requireRecord(_0x4bae6a,'response\x20envelope');if(_0x5a645f[_0x5f37ab(0x1d9)]===![])throw CliErrors['apiError'](_0x5f37ab(0x1f5));if(!(_0x5f37ab(0x1cd)in _0x5a645f))throw invalidContract(_0x5f37ab(0x1db));return _0x5a645f[_0x5f37ab(0x1cd)];}function validateTopK(_0x1b3c9d){const _0x47630a=a283_0x19c988;if(_0x1b3c9d!==undefined&&(!Number[_0x47630a(0x1f6)](_0x1b3c9d)||_0x1b3c9d<0x1||_0x1b3c9d>0x32))throw CliErrors['validation'](_0x47630a(0x1f2));}function a283_0xacac(){const _0x53222d=['name','455208CFuidR','get','/smartapi/knowledge/company-public/search','cookie','isArray','SmartCode\x20knowledge\x20search\x20failed\x20(HTTP\x20','chunkId','14hLkzRE','development','keys','data','1402756UGLdEW','number','length','81835VJicef','7uUwcQW','438565ElFNxc','30987xdDfWF','string','appCode','timingsMs','authRequired','success','rawScore','response\x20envelope','test','toLowerCase','12166YkLERZ','score','SmartCode\x20knowledge\x20search\x20returned\x20invalid\x20JSON.','query','POST','finalScore','3dMYqAJ','total','hits','5964xaBmcB','signal','public','AbortError','isFinite','strategyFingerprint','headers','scoreKind','Knowledge\x20search\x20appCode\x20is\x20required.','object','SmartCode\x20knowledge\x20search\x20request\x20failed.','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','title','text','SmartCode\x20knowledge\x20search\x20failed.','isSafeInteger','networkError','cache-control','scope','cli:rabetbase','application/json','response','topK','entries','sort','revision','stringify','Knowledge\x20search\x20query\x20is\x20required.','status','trim','rank','283432ICDlaS','apiError','some','content-type','schemaVersion','tags','validation','\x20contract.','documentId','hits[','370mWrwBj','profile'];a283_0xacac=function(){return _0x53222d;};return a283_0xacac();}function hasNoStore(_0x3e2936){const _0x36cc64=a283_0x19c988;return(_0x3e2936['get'](_0x36cc64(0x1f8))??'')['split'](',')[_0x36cc64(0x1b8)](_0x23caf6=>_0x23caf6[_0x36cc64(0x204)]()[_0x36cc64(0x1dd)]()==='no-store');}function parseDevelopmentSearchResponse(_0x22f4ab,_0x2045d4){const _0x2dbb09=a283_0x19c988,_0x3538a8=requireExactRecord(_0x22f4ab,RESPONSE_KEYS,_0x2dbb09(0x1fc));if(_0x3538a8[_0x2dbb09(0x1ba)]!==0x2||_0x3538a8[_0x2dbb09(0x1c1)]!==_0x2dbb09(0x1cb))throw invalidContract(_0x2dbb09(0x1c1));if(!Array[_0x2dbb09(0x1c7)](_0x3538a8[_0x2dbb09(0x1e6)])||_0x3538a8[_0x2dbb09(0x1e6)][_0x2dbb09(0x1d0)]>(_0x2045d4??0x32))throw invalidContract(_0x2dbb09(0x1e6));if(typeof _0x3538a8[_0x2dbb09(0x1ec)]!==_0x2dbb09(0x1d5)||!/^sha256:[0-9a-f]{64}$/[_0x2dbb09(0x1dc)](_0x3538a8[_0x2dbb09(0x1ec)]))throw invalidContract('strategyFingerprint');const _0x5a8916=requireRecord(_0x3538a8[_0x2dbb09(0x1d7)],_0x2dbb09(0x1d7)),_0x3023a4={};for(const [_0x54ac5f,_0x52075a]of Object[_0x2dbb09(0x1fe)](_0x5a8916)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0x2dbb09(0x1dc)](_0x54ac5f)||typeof _0x52075a!==_0x2dbb09(0x1cf)||!Number[_0x2dbb09(0x1eb)](_0x52075a)||_0x52075a<0x0)throw invalidContract(_0x2dbb09(0x1d7));_0x3023a4[_0x54ac5f]=_0x52075a;}const _0x3ba5dc=_0x3538a8[_0x2dbb09(0x1e6)]['map']((_0xf93bc,_0x2eb726)=>parseHit(_0xf93bc,_0x2eb726));if(!Number[_0x2dbb09(0x1f6)](_0x3538a8[_0x2dbb09(0x1e5)])||_0x3538a8[_0x2dbb09(0x1e5)]!==_0x3ba5dc[_0x2dbb09(0x1d0)])throw invalidContract(_0x2dbb09(0x1e5));return{'schemaVersion':_0x3538a8[_0x2dbb09(0x1ba)],'profile':_0x3538a8['profile'],'total':_0x3538a8['total'],'strategyFingerprint':_0x3538a8['strategyFingerprint'],'timingsMs':_0x3023a4,'hits':_0x3ba5dc};}function parseHit(_0x5cfb87,_0x59a254){const _0x5c315f=a283_0x19c988,_0x138a3b=requireExactRecord(_0x5cfb87,HIT_KEYS,_0x5c315f(0x1bf)+_0x59a254+']'),_0x241bce=_0x50e4fd=>{const _0x340a76=_0x5c315f,_0x66bb66=_0x138a3b[_0x50e4fd];if(typeof _0x66bb66!==_0x340a76(0x1d5)||!_0x66bb66)throw invalidContract(_0x50e4fd);return _0x66bb66;};if(!Number[_0x5c315f(0x1f6)](_0x138a3b[_0x5c315f(0x200)])||_0x138a3b[_0x5c315f(0x200)]<0x1)throw invalidContract(_0x5c315f(0x200));if(_0x138a3b[_0x5c315f(0x1f9)]!==_0x5c315f(0x1e9)&&_0x138a3b['scope']!=='company')throw invalidContract(_0x5c315f(0x1f9));if(typeof _0x138a3b['title']!=='string'||typeof _0x138a3b[_0x5c315f(0x1f4)]!=='string')throw invalidContract('text');if(!Array['isArray'](_0x138a3b[_0x5c315f(0x1bb)])||_0x138a3b[_0x5c315f(0x1bb)][_0x5c315f(0x1b8)](_0x16e8e2=>typeof _0x16e8e2!=='string'))throw invalidContract('tags');if(!Number[_0x5c315f(0x1f6)](_0x138a3b[_0x5c315f(0x205)])||_0x138a3b['rank']!==_0x59a254+0x1)throw invalidContract(_0x5c315f(0x205));if(!isFiniteNumber(_0x138a3b[_0x5c315f(0x1da)])||!isFiniteNumber(_0x138a3b['finalScore']))throw invalidContract(_0x5c315f(0x1df));return{'documentId':_0x241bce(_0x5c315f(0x1be)),'revision':_0x138a3b[_0x5c315f(0x200)],'chunkId':_0x241bce(_0x5c315f(0x1c9)),'scope':_0x138a3b[_0x5c315f(0x1f9)],'title':_0x138a3b[_0x5c315f(0x1f3)],'text':_0x138a3b[_0x5c315f(0x1f4)],'tags':[..._0x138a3b[_0x5c315f(0x1bb)]],'rank':_0x138a3b['rank'],'rawScore':_0x138a3b[_0x5c315f(0x1da)],'finalScore':_0x138a3b[_0x5c315f(0x1e3)],'scoreKind':_0x241bce(_0x5c315f(0x1ee))};}function requireExactRecord(_0x50d57a,_0xebd378,_0x4ad38c){const _0x420735=a283_0x19c988,_0x288a51=requireRecord(_0x50d57a,_0x4ad38c),_0x53be66=Object[_0x420735(0x1cc)](_0x288a51)['sort'](),_0xd148bc=[..._0xebd378][_0x420735(0x1ff)]();if(_0x53be66[_0x420735(0x1d0)]!==_0xd148bc['length']||_0x53be66['some']((_0x142ad1,_0x1f2fb7)=>_0x142ad1!==_0xd148bc[_0x1f2fb7]))throw invalidContract(_0x4ad38c);return _0x288a51;}function requireRecord(_0xdfdc38,_0x5e3ac0){const _0x4fdb53=a283_0x19c988;if(!_0xdfdc38||typeof _0xdfdc38!==_0x4fdb53(0x1f0)||Array[_0x4fdb53(0x1c7)](_0xdfdc38))throw invalidContract(_0x5e3ac0);return _0xdfdc38;}function isFiniteNumber(_0x4805bc){const _0x4f52a1=a283_0x19c988;return typeof _0x4805bc===_0x4f52a1(0x1cf)&&Number['isFinite'](_0x4805bc);}function invalidContract(_0x52e572){const _0xc04db6=a283_0x19c988;return CliErrors[_0xc04db6(0x207)]('SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20'+_0x52e572+_0xc04db6(0x1bd));}
1
+ const a283_0x27bc92=a283_0x59e0;(function(_0xd6d088,_0xb32c1f){const _0x11d515=a283_0x59e0,_0x13945f=_0xd6d088();while(!![]){try{const _0x444547=parseInt(_0x11d515(0x19a))/0x1+-parseInt(_0x11d515(0x1af))/0x2*(-parseInt(_0x11d515(0x1ba))/0x3)+-parseInt(_0x11d515(0x1bf))/0x4*(-parseInt(_0x11d515(0x1a5))/0x5)+parseInt(_0x11d515(0x18f))/0x6+-parseInt(_0x11d515(0x1cf))/0x7+parseInt(_0x11d515(0x1a0))/0x8*(parseInt(_0x11d515(0x1a7))/0x9)+-parseInt(_0x11d515(0x1b0))/0xa;if(_0x444547===_0xb32c1f)break;else _0x13945f['push'](_0x13945f['shift']());}catch(_0x8cfcc){_0x13945f['push'](_0x13945f['shift']());}}}(a283_0x2e4c,0xe9eb3));function a283_0x59e0(_0xa7ea39,_0x5de048){_0xa7ea39=_0xa7ea39-0x186;const _0x2e4c8f=a283_0x2e4c();let _0x59e0b0=_0x2e4c8f[_0xa7ea39];return _0x59e0b0;}function a283_0x2e4c(){const _0x9b0d87=['hits','schemaVersion','88yvAghS','some','sort','apiError','SmartCode\x20knowledge\x20search\x20failed\x20(HTTP\x20','20tuSJaE','networkError','340344ypBWQw','isArray','revision','AbortError','isSafeInteger','object','number','score','690542UcOspc','18259600rYqjPW','timingsMs','trim','text','public','isFinite','SmartCode\x20knowledge\x20search\x20returned\x20an\x20invalid\x20','split','get','documentId','9jIxTUw','query','keys','SmartCode\x20knowledge\x20search\x20returned\x20a\x20non-JSON\x20content\x20type.','title','1312704pnteEi','application/json','Knowledge\x20search\x20topK\x20must\x20be\x20an\x20integer\x20from\x201\x20through\x2050.','company','rank','development','strategyFingerprint','string','response\x20envelope','name','content-type','chunkId','scope','authRequired','finalScore','stringify','8212673CiqyzQ','profile','validation','length','test','map','toLowerCase','no-store','total','hits[','622782EHkJmV','SmartCode\x20knowledge\x20search\x20response\x20is\x20missing\x20Cache-Control:\x20no-store.','status','json','Knowledge\x20search\x20appCode\x20is\x20required.','data','rawScore','tags','topK','headers','scoreKind','1089040kJJcqu','response','cli:rabetbase','\x20contract.'];a283_0x2e4c=function(){return _0x9b0d87;};return a283_0x2e4c();}import{getKbDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';const RESPONSE_KEYS=[a283_0x27bc92(0x19f),'profile',a283_0x27bc92(0x18d),a283_0x27bc92(0x19e),a283_0x27bc92(0x1c5),a283_0x27bc92(0x1b1)],HIT_KEYS=['documentId',a283_0x27bc92(0x1a9),a283_0x27bc92(0x1ca),a283_0x27bc92(0x1cb),a283_0x27bc92(0x1be),a283_0x27bc92(0x1b3),a283_0x27bc92(0x196),a283_0x27bc92(0x1c3),a283_0x27bc92(0x195),a283_0x27bc92(0x1cd),a283_0x27bc92(0x199)];export async function searchDevelopmentKnowledge(_0x3cde1f){const _0x5bd4c3=a283_0x27bc92,_0x455fcb=_0x3cde1f['appCode'][_0x5bd4c3(0x1b2)](),_0x580317=_0x3cde1f[_0x5bd4c3(0x1bb)][_0x5bd4c3(0x1b2)]();if(!_0x455fcb)throw CliErrors[_0x5bd4c3(0x187)](_0x5bd4c3(0x193));if(!_0x3cde1f['cookie'][_0x5bd4c3(0x1b2)]())throw CliErrors[_0x5bd4c3(0x1cc)]();if(!_0x580317)throw CliErrors[_0x5bd4c3(0x187)]('Knowledge\x20search\x20query\x20is\x20required.');validateTopK(_0x3cde1f[_0x5bd4c3(0x197)]);const _0x54a373=getKbDomain()+'/smartapi/knowledge/company-public/search';let _0x1181bd;try{_0x1181bd=await fetch(_0x54a373,{'method':'POST','headers':{'Content-Type':_0x5bd4c3(0x1c0),'Cookie':_0x3cde1f['cookie'],'X-Invoke-Source':_0x5bd4c3(0x19c)},'body':JSON[_0x5bd4c3(0x1ce)]({'appCode':_0x455fcb,'query':_0x580317,..._0x3cde1f[_0x5bd4c3(0x197)]!==undefined?{'topK':_0x3cde1f['topK']}:{}}),'signal':_0x3cde1f['signal']});}catch(_0x425c70){if(_0x425c70 instanceof CliError)throw _0x425c70;if(_0x425c70 instanceof Error&&_0x425c70[_0x5bd4c3(0x1c8)]===_0x5bd4c3(0x1aa))throw _0x425c70;throw CliErrors[_0x5bd4c3(0x1a6)]('SmartCode\x20knowledge\x20search\x20request\x20failed.');}if(!hasNoStore(_0x1181bd[_0x5bd4c3(0x198)]))throw CliErrors['apiError'](_0x5bd4c3(0x190));if(_0x1181bd[_0x5bd4c3(0x191)]===0x191)throw CliErrors[_0x5bd4c3(0x1cc)]();if(!_0x1181bd['ok'])throw CliErrors[_0x5bd4c3(0x1a3)](_0x5bd4c3(0x1a4)+_0x1181bd[_0x5bd4c3(0x191)]+').');if(!(_0x1181bd[_0x5bd4c3(0x198)][_0x5bd4c3(0x1b8)](_0x5bd4c3(0x1c9))??'')[_0x5bd4c3(0x18b)]()['includes']('application/json'))throw CliErrors[_0x5bd4c3(0x1a3)](_0x5bd4c3(0x1bd));let _0x56471c;try{_0x56471c=await _0x1181bd[_0x5bd4c3(0x192)]();}catch{throw CliErrors[_0x5bd4c3(0x1a3)]('SmartCode\x20knowledge\x20search\x20returned\x20invalid\x20JSON.');}return parseDevelopmentSearchResponse(readEnvelopeData(_0x56471c),_0x3cde1f[_0x5bd4c3(0x197)]);}function readEnvelopeData(_0xb656d4){const _0x5e6e9f=a283_0x27bc92,_0x2a2b3c=requireRecord(_0xb656d4,_0x5e6e9f(0x1c7));if(_0x2a2b3c['success']===![])throw CliErrors['apiError']('SmartCode\x20knowledge\x20search\x20failed.');if(!(_0x5e6e9f(0x194)in _0x2a2b3c))throw invalidContract(_0x5e6e9f(0x1c7));return _0x2a2b3c[_0x5e6e9f(0x194)];}function validateTopK(_0xbb10af){const _0x30e9b7=a283_0x27bc92;if(_0xbb10af!==undefined&&(!Number['isSafeInteger'](_0xbb10af)||_0xbb10af<0x1||_0xbb10af>0x32))throw CliErrors[_0x30e9b7(0x187)](_0x30e9b7(0x1c1));}function hasNoStore(_0x4c6e57){const _0x29ec48=a283_0x27bc92;return(_0x4c6e57[_0x29ec48(0x1b8)]('cache-control')??'')[_0x29ec48(0x1b7)](',')[_0x29ec48(0x1a1)](_0x38849e=>_0x38849e[_0x29ec48(0x1b2)]()[_0x29ec48(0x18b)]()===_0x29ec48(0x18c));}function parseDevelopmentSearchResponse(_0x4a124d,_0x170323){const _0xb19949=a283_0x27bc92,_0x2c5a58=requireExactRecord(_0x4a124d,RESPONSE_KEYS,_0xb19949(0x19b));if(_0x2c5a58[_0xb19949(0x19f)]!==0x2||_0x2c5a58[_0xb19949(0x186)]!==_0xb19949(0x1c4))throw invalidContract(_0xb19949(0x186));if(!Array[_0xb19949(0x1a8)](_0x2c5a58[_0xb19949(0x19e)])||_0x2c5a58[_0xb19949(0x19e)][_0xb19949(0x188)]>(_0x170323??0x32))throw invalidContract(_0xb19949(0x19e));if(typeof _0x2c5a58[_0xb19949(0x1c5)]!==_0xb19949(0x1c6)||!/^sha256:[0-9a-f]{64}$/[_0xb19949(0x189)](_0x2c5a58[_0xb19949(0x1c5)]))throw invalidContract(_0xb19949(0x1c5));const _0x4390b8=requireRecord(_0x2c5a58[_0xb19949(0x1b1)],_0xb19949(0x1b1)),_0x5db3d2={};for(const [_0x20595e,_0x6a1c0e]of Object['entries'](_0x4390b8)){if(!/^[A-Za-z][A-Za-z0-9]*$/[_0xb19949(0x189)](_0x20595e)||typeof _0x6a1c0e!=='number'||!Number['isFinite'](_0x6a1c0e)||_0x6a1c0e<0x0)throw invalidContract(_0xb19949(0x1b1));_0x5db3d2[_0x20595e]=_0x6a1c0e;}const _0x43a2cc=_0x2c5a58[_0xb19949(0x19e)][_0xb19949(0x18a)]((_0xaa9382,_0x3bfd2a)=>parseHit(_0xaa9382,_0x3bfd2a));if(!Number['isSafeInteger'](_0x2c5a58[_0xb19949(0x18d)])||_0x2c5a58['total']!==_0x43a2cc[_0xb19949(0x188)])throw invalidContract(_0xb19949(0x18d));return{'schemaVersion':_0x2c5a58['schemaVersion'],'profile':_0x2c5a58[_0xb19949(0x186)],'total':_0x2c5a58[_0xb19949(0x18d)],'strategyFingerprint':_0x2c5a58[_0xb19949(0x1c5)],'timingsMs':_0x5db3d2,'hits':_0x43a2cc};}function parseHit(_0x1a6c7c,_0xb3d33e){const _0x13f4e4=a283_0x27bc92,_0x32bac8=requireExactRecord(_0x1a6c7c,HIT_KEYS,_0x13f4e4(0x18e)+_0xb3d33e+']'),_0x103045=_0x2828fd=>{const _0x3e6dcb=_0x13f4e4,_0x5c5528=_0x32bac8[_0x2828fd];if(typeof _0x5c5528!==_0x3e6dcb(0x1c6)||!_0x5c5528)throw invalidContract(_0x2828fd);return _0x5c5528;};if(!Number[_0x13f4e4(0x1ab)](_0x32bac8['revision'])||_0x32bac8[_0x13f4e4(0x1a9)]<0x1)throw invalidContract(_0x13f4e4(0x1a9));if(_0x32bac8[_0x13f4e4(0x1cb)]!==_0x13f4e4(0x1b4)&&_0x32bac8[_0x13f4e4(0x1cb)]!==_0x13f4e4(0x1c2))throw invalidContract(_0x13f4e4(0x1cb));if(typeof _0x32bac8['title']!==_0x13f4e4(0x1c6)||typeof _0x32bac8[_0x13f4e4(0x1b3)]!==_0x13f4e4(0x1c6))throw invalidContract(_0x13f4e4(0x1b3));if(!Array[_0x13f4e4(0x1a8)](_0x32bac8[_0x13f4e4(0x196)])||_0x32bac8[_0x13f4e4(0x196)]['some'](_0x32b1f0=>typeof _0x32b1f0!==_0x13f4e4(0x1c6)))throw invalidContract(_0x13f4e4(0x196));if(!Number['isSafeInteger'](_0x32bac8[_0x13f4e4(0x1c3)])||_0x32bac8[_0x13f4e4(0x1c3)]!==_0xb3d33e+0x1)throw invalidContract(_0x13f4e4(0x1c3));if(!isFiniteNumber(_0x32bac8[_0x13f4e4(0x195)])||!isFiniteNumber(_0x32bac8[_0x13f4e4(0x1cd)]))throw invalidContract(_0x13f4e4(0x1ae));return{'documentId':_0x103045(_0x13f4e4(0x1b9)),'revision':_0x32bac8[_0x13f4e4(0x1a9)],'chunkId':_0x103045(_0x13f4e4(0x1ca)),'scope':_0x32bac8[_0x13f4e4(0x1cb)],'title':_0x32bac8[_0x13f4e4(0x1be)],'text':_0x32bac8[_0x13f4e4(0x1b3)],'tags':[..._0x32bac8[_0x13f4e4(0x196)]],'rank':_0x32bac8['rank'],'rawScore':_0x32bac8[_0x13f4e4(0x195)],'finalScore':_0x32bac8[_0x13f4e4(0x1cd)],'scoreKind':_0x103045('scoreKind')};}function requireExactRecord(_0x40da8f,_0x34c337,_0x2f907a){const _0x24c1aa=a283_0x27bc92,_0x15edd8=requireRecord(_0x40da8f,_0x2f907a),_0x483997=Object[_0x24c1aa(0x1bc)](_0x15edd8)[_0x24c1aa(0x1a2)](),_0x59149a=[..._0x34c337]['sort']();if(_0x483997[_0x24c1aa(0x188)]!==_0x59149a[_0x24c1aa(0x188)]||_0x483997[_0x24c1aa(0x1a1)]((_0x525989,_0x5893e6)=>_0x525989!==_0x59149a[_0x5893e6]))throw invalidContract(_0x2f907a);return _0x15edd8;}function requireRecord(_0x3b0c7c,_0x2cff6a){const _0x8a9329=a283_0x27bc92;if(!_0x3b0c7c||typeof _0x3b0c7c!==_0x8a9329(0x1ac)||Array[_0x8a9329(0x1a8)](_0x3b0c7c))throw invalidContract(_0x2cff6a);return _0x3b0c7c;}function isFiniteNumber(_0x21dbd0){const _0x5d9f1d=a283_0x27bc92;return typeof _0x21dbd0===_0x5d9f1d(0x1ad)&&Number[_0x5d9f1d(0x1b5)](_0x21dbd0);}function invalidContract(_0x416895){const _0x9bce01=a283_0x27bc92;return CliErrors[_0x9bce01(0x1a3)](_0x9bce01(0x1b6)+_0x416895+_0x9bce01(0x19d));}
@@ -1 +1 @@
1
- const a284_0x34e95e=a284_0x21d3;(function(_0xf9227e,_0x27664b){const _0x57b7fe=a284_0x21d3,_0x329982=_0xf9227e();while(!![]){try{const _0x18392b=-parseInt(_0x57b7fe(0x179))/0x1+-parseInt(_0x57b7fe(0x17b))/0x2*(parseInt(_0x57b7fe(0x170))/0x3)+-parseInt(_0x57b7fe(0x189))/0x4+parseInt(_0x57b7fe(0x174))/0x5*(-parseInt(_0x57b7fe(0x17c))/0x6)+-parseInt(_0x57b7fe(0x183))/0x7*(parseInt(_0x57b7fe(0x17d))/0x8)+parseInt(_0x57b7fe(0x182))/0x9+parseInt(_0x57b7fe(0x187))/0xa*(parseInt(_0x57b7fe(0x17f))/0xb);if(_0x18392b===_0x27664b)break;else _0x329982['push'](_0x329982['shift']());}catch(_0x44d4c0){_0x329982['push'](_0x329982['shift']());}}}(a284_0x5366,0xbfbe1));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 a284_0x5366(){const _0x496733=['Page\x20directory\x20is\x20not\x20a\x20directory:\x20','6171995xeqGpv','page','toUpperCase','isDirectory','name','1159008AUaMfw','cwd','1483554PaSItW','6qpQzjl','152XEMfrK','.json','749012jQpQiN','sort','flagMissing','14040423OaIgqa','291095eoxEEp','localeCompare','split','page.lock.json','670SUyrTH','appPagesDir','5646140gzQudF','trim','validation','3AChldV','Page\x20directory\x20not\x20found:\x20','.rabetbase'];a284_0x5366=function(){return _0x496733;};return a284_0x5366();}import{CliErrors}from'../../errors.js';export function loadPageProjectConfig(_0x320400,_0x2f4acf=process[a284_0x34e95e(0x17a)]()){const _0x318f40=a284_0x34e95e,_0x3adb4c=resolve(_0x2f4acf),_0x304dce=join(_0x3adb4c,_0x318f40(0x172),_0x318f40(0x175));return{'projectRoot':_0x3adb4c,'pagesBaseDir':_0x304dce,'appPagesDir':join(_0x304dce,_0x320400),'lockFilePath':join(_0x3adb4c,_0x318f40(0x172),_0x318f40(0x186))};}export function buildPageFileName(_0x5a77af,_0x2aeae8){const _0x393b15=a284_0x34e95e;return _0x5a77af+'-'+_0x2aeae8[_0x393b15(0x176)]()+_0x393b15(0x17e);}export function resolvePageFilePath(_0x376849,_0xd98a3a,_0x574a90){const _0x5e4417=a284_0x34e95e;return join(_0x376849[_0x5e4417(0x188)],buildPageFileName(_0xd98a3a,_0x574a90));}export async function ensureParentDirectory(_0x329f1f){await mkdir(dirname(_0x329f1f),{'recursive':!![]});}export async function fileExists(_0x577b02){try{return await access(_0x577b02,constants['F_OK']),!![];}catch{return![];}}function a284_0x21d3(_0x5da84e,_0x2b718d){_0x5da84e=_0x5da84e-0x170;const _0x5366ba=a284_0x5366();let _0x21d398=_0x5366ba[_0x5da84e];return _0x21d398;}export async function readCustomPageDirectory(_0x3cf845){const _0x57cd06=a284_0x34e95e,_0x64469c=_0x3cf845[_0x57cd06(0x18a)]();if(!_0x64469c)throw CliErrors[_0x57cd06(0x181)]('page-dir');const _0x441b6b=resolve(_0x64469c);let _0x214c66;try{_0x214c66=await lstat(_0x441b6b);}catch{throw CliErrors[_0x57cd06(0x18b)](_0x57cd06(0x171)+_0x64469c);}if(!_0x214c66[_0x57cd06(0x177)]())throw CliErrors[_0x57cd06(0x18b)](_0x57cd06(0x173)+_0x64469c);const _0x4ce919={};return await readDirectory(_0x441b6b,_0x441b6b,_0x4ce919),_0x4ce919;}async function readDirectory(_0x588824,_0x44792c,_0x2c7363){const _0x47687f=a284_0x34e95e,_0x1f1c3c=await readdir(_0x44792c,{'withFileTypes':!![]});for(const _0x16b3e1 of _0x1f1c3c[_0x47687f(0x180)]((_0x4ef45f,_0x1949f8)=>_0x4ef45f[_0x47687f(0x178)][_0x47687f(0x184)](_0x1949f8[_0x47687f(0x178)]))){const _0x53a943=join(_0x44792c,_0x16b3e1['name']);if(_0x16b3e1[_0x47687f(0x177)]()){await readDirectory(_0x588824,_0x53a943,_0x2c7363);continue;}if(!_0x16b3e1['isFile']())throw CliErrors[_0x47687f(0x18b)]('Unsupported\x20file\x20in\x20page\x20directory:\x20'+_0x53a943);_0x2c7363[relative(_0x588824,_0x53a943)[_0x47687f(0x185)](sep)['join']('/')]=await readFile(_0x53a943,'utf8');}}
1
+ const a284_0xd35399=a284_0x14ab;(function(_0x1fbf7e,_0x38d113){const _0x582fda=a284_0x14ab,_0x1c35aa=_0x1fbf7e();while(!![]){try{const _0x31214f=parseInt(_0x582fda(0x166))/0x1+parseInt(_0x582fda(0x16c))/0x2+-parseInt(_0x582fda(0x162))/0x3*(-parseInt(_0x582fda(0x176))/0x4)+parseInt(_0x582fda(0x165))/0x5+-parseInt(_0x582fda(0x174))/0x6*(-parseInt(_0x582fda(0x16f))/0x7)+-parseInt(_0x582fda(0x172))/0x8*(parseInt(_0x582fda(0x169))/0x9)+-parseInt(_0x582fda(0x16a))/0xa;if(_0x31214f===_0x38d113)break;else _0x1c35aa['push'](_0x1c35aa['shift']());}catch(_0x5b1d7c){_0x1c35aa['push'](_0x1c35aa['shift']());}}}(a284_0x4fc5,0x908ec));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';export function loadPageProjectConfig(_0x3dd889,_0x13f509=process[a284_0xd35399(0x171)]()){const _0x3ad728=a284_0xd35399,_0x4e5656=resolve(_0x13f509),_0x5aeb35=join(_0x4e5656,_0x3ad728(0x16b),_0x3ad728(0x178));return{'projectRoot':_0x4e5656,'pagesBaseDir':_0x5aeb35,'appPagesDir':join(_0x5aeb35,_0x3dd889),'lockFilePath':join(_0x4e5656,'.rabetbase',_0x3ad728(0x177))};}function a284_0x14ab(_0x4b983c,_0x1d8932){_0x4b983c=_0x4b983c-0x161;const _0x4fc521=a284_0x4fc5();let _0x14ab83=_0x4fc521[_0x4b983c];return _0x14ab83;}export function buildPageFileName(_0x54ccb9,_0x58eff3){const _0x1d2153=a284_0xd35399;return _0x54ccb9+'-'+_0x58eff3[_0x1d2153(0x161)]()+_0x1d2153(0x17b);}export function resolvePageFilePath(_0x4f5560,_0x56cebc,_0x4a2055){const _0x309d00=a284_0xd35399;return join(_0x4f5560[_0x309d00(0x163)],buildPageFileName(_0x56cebc,_0x4a2055));}export async function ensureParentDirectory(_0x2dd22a){await mkdir(dirname(_0x2dd22a),{'recursive':!![]});}export async function fileExists(_0x328d8b){const _0x32eac3=a284_0xd35399;try{return await access(_0x328d8b,constants[_0x32eac3(0x170)]),!![];}catch{return![];}}function a284_0x4fc5(){const _0x4a1be5=['name','.json','toUpperCase','2380692darMdL','appPagesDir','Page\x20directory\x20is\x20not\x20a\x20directory:\x20','2001980RdBBrs','284417xhnTEy','validation','page-dir','18dIKhoG','8187880JZOHuw','.rabetbase','409768Ajzlut','sort','localeCompare','7CzqNpw','F_OK','cwd','3299984gQaaWc','join','3315786kSfVKG','isFile','4jHfrnr','page.lock.json','page','isDirectory'];a284_0x4fc5=function(){return _0x4a1be5;};return a284_0x4fc5();}export async function readCustomPageDirectory(_0x3de8ef){const _0x445395=a284_0xd35399,_0x3649db=_0x3de8ef['trim']();if(!_0x3649db)throw CliErrors['flagMissing'](_0x445395(0x168));const _0x25b64b=resolve(_0x3649db);let _0x44eeec;try{_0x44eeec=await lstat(_0x25b64b);}catch{throw CliErrors[_0x445395(0x167)]('Page\x20directory\x20not\x20found:\x20'+_0x3649db);}if(!_0x44eeec[_0x445395(0x179)]())throw CliErrors[_0x445395(0x167)](_0x445395(0x164)+_0x3649db);const _0x6a1e37={};return await readDirectory(_0x25b64b,_0x25b64b,_0x6a1e37),_0x6a1e37;}async function readDirectory(_0x9e96b5,_0x5e2b16,_0x1dc31e){const _0x49e5c3=a284_0xd35399,_0x2422ba=await readdir(_0x5e2b16,{'withFileTypes':!![]});for(const _0x110df1 of _0x2422ba[_0x49e5c3(0x16d)]((_0xe768dd,_0x1983d8)=>_0xe768dd[_0x49e5c3(0x17a)][_0x49e5c3(0x16e)](_0x1983d8['name']))){const _0x28a8a2=join(_0x5e2b16,_0x110df1['name']);if(_0x110df1['isDirectory']()){await readDirectory(_0x9e96b5,_0x28a8a2,_0x1dc31e);continue;}if(!_0x110df1[_0x49e5c3(0x175)]())throw CliErrors['validation']('Unsupported\x20file\x20in\x20page\x20directory:\x20'+_0x28a8a2);_0x1dc31e[relative(_0x9e96b5,_0x28a8a2)['split'](sep)[_0x49e5c3(0x173)]('/')]=await readFile(_0x28a8a2,'utf8');}}
@@ -1 +1 @@
1
- function a285_0x78b2(_0x12816b,_0x3ea7c6){_0x12816b=_0x12816b-0x14a;const _0x3760d8=a285_0x3760();let _0x78b2b9=_0x3760d8[_0x12816b];return _0x78b2b9;}(function(_0x5da665,_0x533c1b){const _0x628e05=a285_0x78b2,_0x469f75=_0x5da665();while(!![]){try{const _0x49e339=-parseInt(_0x628e05(0x153))/0x1*(parseInt(_0x628e05(0x157))/0x2)+parseInt(_0x628e05(0x152))/0x3*(-parseInt(_0x628e05(0x14f))/0x4)+parseInt(_0x628e05(0x154))/0x5+parseInt(_0x628e05(0x150))/0x6*(-parseInt(_0x628e05(0x159))/0x7)+parseInt(_0x628e05(0x14d))/0x8+parseInt(_0x628e05(0x14b))/0x9*(-parseInt(_0x628e05(0x14c))/0xa)+-parseInt(_0x628e05(0x155))/0xb*(-parseInt(_0x628e05(0x151))/0xc);if(_0x49e339===_0x533c1b)break;else _0x469f75['push'](_0x469f75['shift']());}catch(_0xabede3){_0x469f75['push'](_0x469f75['shift']());}}}(a285_0x3760,0x60b2c));function a285_0x3760(){const _0x445fac=['206090OfKxpZ','2714424qhKUgL','createHash','12396IiEwFR','168ReNtoD','12lnUylj','411WyAliS','1nyAZId','137225GBNgRF','18535429vMaNQi','md5','1497904yTEnef','update','79331gLuUwY','stringify','72hUxKFS'];a285_0x3760=function(){return _0x445fac;};return a285_0x3760();}import a285_0x577d8f from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x526bab){const _0x502d8f=a285_0x78b2;return JSON[_0x502d8f(0x14a)](JSON['parse'](_0x526bab),null,0x2)+'\x0a';}export function computePageContentHash(_0x2c2bd1){const _0x57eb97=a285_0x78b2;return a285_0x577d8f[_0x57eb97(0x14e)](_0x57eb97(0x156))[_0x57eb97(0x158)](_0x2c2bd1)['digest']('hex');}export function computeSerializedSchemaHash(_0x4f2773){return computePageContentHash(serializePageSchemaForFile(_0x4f2773));}export async function computePageFileHash(_0x44502f){const _0x4092a6=await readFile(_0x44502f,'utf8');return computePageContentHash(_0x4092a6);}
1
+ function a285_0x1427(_0xb37b06,_0x196ca0){_0xb37b06=_0xb37b06-0x108;const _0x2e9a98=a285_0x2e9a();let _0x14274d=_0x2e9a98[_0xb37b06];return _0x14274d;}function a285_0x2e9a(){const _0x34613d=['357564KiWZzS','2697345bfjkTk','parse','2288arJDRW','createHash','2190dxVHwM','stringify','utf8','hex','190572UfNFaN','491ASOvRV','336qloHBG','838jrSHvg','29995XWGRJr','1998822OyisOu','digest','3IzwQWJ','5gaosuc'];a285_0x2e9a=function(){return _0x34613d;};return a285_0x2e9a();}(function(_0x586722,_0x493995){const _0x49b1e9=a285_0x1427,_0x423260=_0x586722();while(!![]){try{const _0x74e336=parseInt(_0x49b1e9(0x10e))/0x1*(parseInt(_0x49b1e9(0x110))/0x2)+parseInt(_0x49b1e9(0x114))/0x3*(parseInt(_0x49b1e9(0x10d))/0x4)+parseInt(_0x49b1e9(0x115))/0x5*(parseInt(_0x49b1e9(0x112))/0x6)+parseInt(_0x49b1e9(0x111))/0x7*(-parseInt(_0x49b1e9(0x10f))/0x8)+-parseInt(_0x49b1e9(0x117))/0x9+-parseInt(_0x49b1e9(0x109))/0xa*(-parseInt(_0x49b1e9(0x119))/0xb)+parseInt(_0x49b1e9(0x116))/0xc;if(_0x74e336===_0x493995)break;else _0x423260['push'](_0x423260['shift']());}catch(_0x1b4fe7){_0x423260['push'](_0x423260['shift']());}}}(a285_0x2e9a,0x2c7a7));import a285_0x59afae from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x187983){const _0x563c4b=a285_0x1427;return JSON[_0x563c4b(0x10a)](JSON[_0x563c4b(0x118)](_0x187983),null,0x2)+'\x0a';}export function computePageContentHash(_0x5c2cf3){const _0x53cb96=a285_0x1427;return a285_0x59afae[_0x53cb96(0x108)]('md5')['update'](_0x5c2cf3)[_0x53cb96(0x113)](_0x53cb96(0x10c));}export function computeSerializedSchemaHash(_0x3da109){return computePageContentHash(serializePageSchemaForFile(_0x3da109));}export async function computePageFileHash(_0x5056f3){const _0x39d8f7=a285_0x1427,_0x39c6d9=await readFile(_0x5056f3,_0x39d8f7(0x10b));return computePageContentHash(_0x39c6d9);}
@@ -1 +1 @@
1
- (function(_0xf9ae44,_0x403703){const _0x3bdfd7=a286_0x4a9d,_0x45811c=_0xf9ae44();while(!![]){try{const _0x29651e=-parseInt(_0x3bdfd7(0x125))/0x1*(-parseInt(_0x3bdfd7(0x128))/0x2)+-parseInt(_0x3bdfd7(0x11b))/0x3*(-parseInt(_0x3bdfd7(0x11d))/0x4)+-parseInt(_0x3bdfd7(0x126))/0x5*(-parseInt(_0x3bdfd7(0x12a))/0x6)+parseInt(_0x3bdfd7(0x11f))/0x7+-parseInt(_0x3bdfd7(0x122))/0x8+-parseInt(_0x3bdfd7(0x127))/0x9+-parseInt(_0x3bdfd7(0x11a))/0xa;if(_0x29651e===_0x403703)break;else _0x45811c['push'](_0x45811c['shift']());}catch(_0x56145a){_0x45811c['push'](_0x45811c['shift']());}}}(a286_0x4cc0,0xa54a9));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x30dfa9,_0x10eab5){const _0x20b1dc=a286_0x4a9d,_0x5105da={'apps':_0x30dfa9[_0x20b1dc(0x121)]&&typeof _0x30dfa9[_0x20b1dc(0x121)]===_0x20b1dc(0x11e)?_0x30dfa9[_0x20b1dc(0x121)]:{}};let _0x1124cc=_0x5105da[_0x20b1dc(0x121)][_0x10eab5];if(!_0x1124cc)return _0x1124cc={'lastSync':'','pages':{}},_0x5105da['apps'][_0x10eab5]=_0x1124cc,{'lockData':_0x5105da,'appLock':_0x1124cc};return!_0x1124cc[_0x20b1dc(0x11c)]&&(_0x1124cc[_0x20b1dc(0x11c)]=''),(!_0x1124cc[_0x20b1dc(0x123)]||typeof _0x1124cc[_0x20b1dc(0x123)]!==_0x20b1dc(0x11e))&&(_0x1124cc[_0x20b1dc(0x123)]={}),{'lockData':_0x5105da,'appLock':_0x1124cc};}export async function readPageLockFile(_0x14cdd4){const _0x7d22e7=a286_0x4a9d;try{const _0xffcb2f=await readFile(_0x14cdd4,_0x7d22e7(0x129)),_0x559de4=JSON['parse'](_0xffcb2f);return{'apps':_0x559de4['apps']&&typeof _0x559de4[_0x7d22e7(0x121)]===_0x7d22e7(0x11e)?_0x559de4[_0x7d22e7(0x121)]:{}};}catch(_0x3ed2f1){if(_0x3ed2f1[_0x7d22e7(0x119)]==='ENOENT')return null;throw new Error(_0x7d22e7(0x124)+String(_0x3ed2f1));}}export async function writePageLockFile(_0x5d82fb,_0x1bb5db){const _0x5aec8a=a286_0x4a9d;await mkdir(dirname(_0x5d82fb),{'recursive':!![]}),await writeFile(_0x5d82fb,JSON[_0x5aec8a(0x120)](_0x1bb5db,null,0x2),_0x5aec8a(0x129));}function a286_0x4a9d(_0x4b899e,_0x2ac428){_0x4b899e=_0x4b899e-0x119;const _0x4cc04d=a286_0x4cc0();let _0x4a9dba=_0x4cc04d[_0x4b899e];return _0x4a9dba;}function a286_0x4cc0(){const _0x36a8d2=['8518736UPqDox','pages','Failed\x20to\x20read\x20page\x20lock\x20file:\x20','2UPnnob','5EZgvMX','4250700OlOUOp','921096mGjVFf','utf8','2094216lBCYhP','code','5204920PTClTs','9RQwySt','lastSync','286468qZqesX','object','8747788DlneqR','stringify','apps'];a286_0x4cc0=function(){return _0x36a8d2;};return a286_0x4cc0();}
1
+ (function(_0x5ae512,_0x3b6b30){const _0x24e3bc=a286_0x4288,_0x2c5a07=_0x5ae512();while(!![]){try{const _0xc0e0a3=-parseInt(_0x24e3bc(0xd8))/0x1*(-parseInt(_0x24e3bc(0xca))/0x2)+-parseInt(_0x24e3bc(0xcc))/0x3*(-parseInt(_0x24e3bc(0xd2))/0x4)+-parseInt(_0x24e3bc(0xdb))/0x5+parseInt(_0x24e3bc(0xd0))/0x6*(-parseInt(_0x24e3bc(0xcb))/0x7)+parseInt(_0x24e3bc(0xce))/0x8*(-parseInt(_0x24e3bc(0xd7))/0x9)+parseInt(_0x24e3bc(0xd5))/0xa+parseInt(_0x24e3bc(0xd4))/0xb;if(_0xc0e0a3===_0x3b6b30)break;else _0x2c5a07['push'](_0x2c5a07['shift']());}catch(_0x4cd750){_0x2c5a07['push'](_0x2c5a07['shift']());}}}(a286_0x2382,0xa891b));function a286_0x4288(_0x5dd721,_0x1bec6f){_0x5dd721=_0x5dd721-0xca;const _0x23826c=a286_0x2382();let _0x4288ba=_0x23826c[_0x5dd721];return _0x4288ba;}import{mkdir,readFile,writeFile}from'node:fs/promises';function a286_0x2382(){const _0x2df1d6=['78744RZZkXB','parse','1063038zfkJYe','pages','3414896JWvNOl','object','13538712SkeljD','11529200WRxAJH','stringify','963PNNgXV','973HJzXvV','apps','utf8','6415865sRSxUM','code','ENOENT','1388Xdakjh','35IxmTry','3RxCtpo','Failed\x20to\x20read\x20page\x20lock\x20file:\x20'];a286_0x2382=function(){return _0x2df1d6;};return a286_0x2382();}import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0xe127bf,_0x16b88f){const _0x2c4548=a286_0x4288,_0x58693d={'apps':_0xe127bf[_0x2c4548(0xd9)]&&typeof _0xe127bf[_0x2c4548(0xd9)]==='object'?_0xe127bf[_0x2c4548(0xd9)]:{}};let _0x85a019=_0x58693d[_0x2c4548(0xd9)][_0x16b88f];if(!_0x85a019)return _0x85a019={'lastSync':'','pages':{}},_0x58693d['apps'][_0x16b88f]=_0x85a019,{'lockData':_0x58693d,'appLock':_0x85a019};return!_0x85a019['lastSync']&&(_0x85a019['lastSync']=''),(!_0x85a019[_0x2c4548(0xd1)]||typeof _0x85a019[_0x2c4548(0xd1)]!==_0x2c4548(0xd3))&&(_0x85a019['pages']={}),{'lockData':_0x58693d,'appLock':_0x85a019};}export async function readPageLockFile(_0xd59601){const _0x4b38c3=a286_0x4288;try{const _0x396745=await readFile(_0xd59601,_0x4b38c3(0xda)),_0x481e4c=JSON[_0x4b38c3(0xcf)](_0x396745);return{'apps':_0x481e4c[_0x4b38c3(0xd9)]&&typeof _0x481e4c[_0x4b38c3(0xd9)]==='object'?_0x481e4c['apps']:{}};}catch(_0x140e66){if(_0x140e66[_0x4b38c3(0xdc)]===_0x4b38c3(0xdd))return null;throw new Error(_0x4b38c3(0xcd)+String(_0x140e66));}}export async function writePageLockFile(_0x4ef385,_0x6c5f78){const _0x2c0902=a286_0x4288;await mkdir(dirname(_0x4ef385),{'recursive':!![]}),await writeFile(_0x4ef385,JSON[_0x2c0902(0xd6)](_0x6c5f78,null,0x2),_0x2c0902(0xda));}
@@ -1 +1 @@
1
- (function(_0x1b7fed,_0x519239){const _0x1f9150=a287_0x445a,_0x17f11d=_0x1b7fed();while(!![]){try{const _0x38e766=parseInt(_0x1f9150(0xf7))/0x1+parseInt(_0x1f9150(0x103))/0x2+parseInt(_0x1f9150(0x11b))/0x3*(-parseInt(_0x1f9150(0x111))/0x4)+-parseInt(_0x1f9150(0x10e))/0x5*(-parseInt(_0x1f9150(0x11a))/0x6)+-parseInt(_0x1f9150(0x122))/0x7+parseInt(_0x1f9150(0x10a))/0x8*(-parseInt(_0x1f9150(0x10f))/0x9)+-parseInt(_0x1f9150(0x125))/0xa;if(_0x38e766===_0x519239)break;else _0x17f11d['push'](_0x17f11d['shift']());}catch(_0x15575a){_0x17f11d['push'](_0x17f11d['shift']());}}}(a287_0x314b,0xf22c7));function a287_0x445a(_0x3f11b7,_0x346d0e){_0x3f11b7=_0x3f11b7-0xf7;const _0x314b2a=a287_0x314b();let _0x445a37=_0x314b2a[_0x3f11b7];return _0x445a37;}import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x5c972a,_0x50ef04,_0x25ee88){const _0x1109ff=a287_0x445a,_0x37ef47=parseSchema(_0x5c972a,_0x1109ff(0x116)),_0x5738f5=parseSchema(_0x50ef04,_0x1109ff(0x112)),_0x1dc3fd=collectLrSmartJsx(_0x37ef47,!![]);if(_0x1dc3fd[_0x1109ff(0x11e)]===0x0)return{'content':_0x5c972a,'compiledNodes':0x0,'normalizedNodes':0x0};const _0xaece86=new Map(collectLrSmartJsx(_0x5738f5)[_0x1109ff(0x10c)](_0x2e5352=>[_0x2e5352[_0x1109ff(0xfc)],_0x2e5352]));let _0x87b61f=0x0,_0xece3aa=0x0;for(const _0x124d09 of _0x1dc3fd){const _0x24476e=readNonEmptyString(_0x124d09[_0x1109ff(0x11f)][_0x1109ff(0x114)]),_0x275ea3=readNonEmptyString(_0x124d09[_0x1109ff(0x11f)][_0x1109ff(0x121)]),_0x15f624=_0xaece86['get'](_0x124d09[_0x1109ff(0xfc)]),_0xe65db3=readNonEmptyString(_0x15f624?.['render'][_0x1109ff(0x114)]),_0x1f82c9=readNonEmptyString(_0x15f624?.['render'][_0x1109ff(0x121)]);let _0x3a9600=![];_0x124d09[_0x1109ff(0x11f)][_0x1109ff(0xfb)]!==_0x1109ff(0xf8)&&(_0x124d09['render'][_0x1109ff(0xfb)]=_0x1109ff(0xf8),_0x3a9600=!![]);!isPageContextExpression(_0x124d09['props'][_0x1109ff(0x100)])&&(_0x124d09[_0x1109ff(0x101)][_0x1109ff(0x100)]={'type':_0x1109ff(0x11c),'value':_0x1109ff(0xff)},_0x3a9600=!![]);if(!_0x24476e){if(!_0x275ea3)throw CliErrors[_0x1109ff(0x120)](_0x1109ff(0x108)+_0x124d09[_0x1109ff(0x107)]+_0x1109ff(0x118),_0x1109ff(0xfa));if(_0x3a9600)_0xece3aa+=0x1;continue;}const _0x31ee7a=!_0x15f624||_0x24476e!==_0xe65db3,_0x4b1643=!_0x275ea3;if(!_0x31ee7a&&_0x275ea3&&_0x1f82c9&&_0x275ea3!==_0x1f82c9)throw CliErrors['validation'](_0x1109ff(0x108)+_0x124d09[_0x1109ff(0x107)]+_0x1109ff(0x117),'Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.');if(_0x31ee7a||_0x4b1643||!_0x1f82c9){const _0xd9b7c1=readNonEmptyString(await _0x25ee88(_0x24476e));if(!_0xd9b7c1)throw CliErrors[_0x1109ff(0x124)](_0x1109ff(0x102)+_0x124d09['label']+'\x22.');_0x124d09['render'][_0x1109ff(0x121)]=_0xd9b7c1,_0x87b61f+=0x1,_0x3a9600=!![];}if(_0x3a9600)_0xece3aa+=0x1;}if(_0xece3aa===0x0)return{'content':_0x5c972a,'compiledNodes':_0x87b61f,'normalizedNodes':_0xece3aa};return{'content':JSON[_0x1109ff(0xf9)](_0x37ef47),'compiledNodes':_0x87b61f,'normalizedNodes':_0xece3aa};}function a287_0x314b(){const _0x5c1d6e=['54mBnEmI','78kjGoeG','JSExpression','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','length','render','validation','value','2315061tAXWTu','\x20page\x20schema.','apiError','9767120MDrBHa','1680910KpJyoe','JSFunction','stringify','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.','type','key','id:','trim','this','_context','props','LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22','3214754FycWuJ','\x22\x20has\x20missing\x20or\x20invalid\x20props.','componentName','entries','label','LrSmartJsx\x20node\x20\x22','isArray','248TMZoJk','parse','map','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','871375VYaamf','263574rJyqzX','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','253772UjVZyO','remote','LrSmartJsx','source','string','local','\x22\x20has\x20a\x20manually\x20changed\x20render.value.','\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.','object'];a287_0x314b=function(){return _0x5c1d6e;};return a287_0x314b();}function parseSchema(_0x3b19cc,_0x2324ae){const _0x2eeb85=a287_0x445a;try{return JSON[_0x2eeb85(0x10b)](_0x3b19cc);}catch{throw CliErrors[_0x2eeb85(0x120)]('Invalid\x20JSON\x20in\x20'+_0x2324ae+_0x2eeb85(0x123));}}function collectLrSmartJsx(_0x1e264b,_0x2b95af=![]){const _0x3a7d31=[],_0x497cca=(_0x109179,_0x26eb50)=>{const _0x4bb196=a287_0x445a;if(Array[_0x4bb196(0x109)](_0x109179)){_0x109179['forEach']((_0x42d233,_0x4c0f22)=>_0x497cca(_0x42d233,_0x26eb50+'['+_0x4c0f22+']'));return;}if(!isObject(_0x109179))return;if(_0x109179['componentName']===_0x4bb196(0x113)){const _0x2f4de9=readNonEmptyString(_0x109179['id']),_0x2dd3ed=_0x2f4de9||_0x26eb50,_0x3c8e4f=isObject(_0x109179[_0x4bb196(0x101)])?_0x109179['props']:undefined;if(!_0x3c8e4f){if(_0x2b95af)throw CliErrors[_0x4bb196(0x120)](_0x4bb196(0x108)+_0x2dd3ed+_0x4bb196(0x104),_0x4bb196(0x10d));return;}const _0x2a6acf=isObject(_0x3c8e4f['render'])?_0x3c8e4f['render']:undefined;if(!_0x2a6acf){if(_0x2b95af)throw CliErrors[_0x4bb196(0x120)]('LrSmartJsx\x20node\x20\x22'+_0x2dd3ed+_0x4bb196(0x11d),_0x4bb196(0x110));return;}_0x3a7d31['push']({'key':_0x2f4de9?_0x4bb196(0xfd)+_0x2f4de9:'path:'+_0x26eb50,'label':_0x2dd3ed,'props':_0x3c8e4f,'render':_0x2a6acf});}for(const [_0x5303e4,_0x4abbfe]of Object[_0x4bb196(0x106)](_0x109179)){if(_0x5303e4===_0x4bb196(0x101)&&_0x109179[_0x4bb196(0x105)]==='LrSmartJsx')continue;_0x497cca(_0x4abbfe,_0x26eb50+'.'+_0x5303e4);}};return _0x497cca(_0x1e264b,'$'),_0x3a7d31;}function isObject(_0x449cc2){const _0x269f4b=a287_0x445a;return Boolean(_0x449cc2)&&typeof _0x449cc2===_0x269f4b(0x119)&&!Array[_0x269f4b(0x109)](_0x449cc2);}function readNonEmptyString(_0x36ada2){const _0x4376d4=a287_0x445a;return typeof _0x36ada2===_0x4376d4(0x115)&&_0x36ada2[_0x4376d4(0xfe)]()?_0x36ada2:undefined;}function isPageContextExpression(_0x263381){const _0x4c7983=a287_0x445a;return isObject(_0x263381)&&_0x263381[_0x4c7983(0xfb)]==='JSExpression'&&_0x263381[_0x4c7983(0x121)]===_0x4c7983(0xff);}
1
+ (function(_0x437a0d,_0xc42569){const _0xbbd06b=a287_0x556a,_0x30fff8=_0x437a0d();while(!![]){try{const _0x17df7f=parseInt(_0xbbd06b(0x166))/0x1+parseInt(_0xbbd06b(0x144))/0x2+parseInt(_0xbbd06b(0x14f))/0x3*(-parseInt(_0xbbd06b(0x15d))/0x4)+-parseInt(_0xbbd06b(0x15e))/0x5+-parseInt(_0xbbd06b(0x147))/0x6+parseInt(_0xbbd06b(0x146))/0x7*(parseInt(_0xbbd06b(0x149))/0x8)+parseInt(_0xbbd06b(0x141))/0x9;if(_0x17df7f===_0xc42569)break;else _0x30fff8['push'](_0x30fff8['shift']());}catch(_0x4f1985){_0x30fff8['push'](_0x30fff8['shift']());}}}(a287_0x5f42,0x1ff4d));function a287_0x5f42(){const _0x36885c=['\x22\x20has\x20a\x20manually\x20changed\x20render.value.','\x22\x20has\x20missing\x20or\x20invalid\x20props.','LrSmartJsx\x20node\x20\x22','remote','props','entries','this','Set\x20props.render\x20to\x20an\x20object\x20containing\x20render.source\x20or\x20render.value.','76tXpQLs','485535gmlxGV','apiError','path:','id:','render','get','source','Add\x20JSX\x20source\x20in\x20the\x20page\x20editor\x20or\x20remove\x20the\x20incomplete\x20component.','88686jjUsIn','forEach','JSFunction','length','type','4020669GklXHD','label','Set\x20props\x20to\x20an\x20object\x20containing\x20a\x20render\x20object.','42872NgEVJr','map','70nzSiga','1138092jBjIdT','componentName','90952qrwXoz','Invalid\x20JSON\x20in\x20','Edit\x20render.source\x20instead;\x20render.value\x20is\x20generated\x20during\x20page\x20push.','local','isArray','\x22\x20has\x20missing\x20or\x20invalid\x20props.render.','39927IDUstS','\x20page\x20schema.','value','_context','validation','JSExpression'];a287_0x5f42=function(){return _0x36885c;};return a287_0x5f42();}import{CliErrors}from'../../errors.js';export async function prepareLrSmartJsxForPush(_0x374e7e,_0x2f79de,_0x2bf331){const _0x1077fa=a287_0x556a,_0x4bf4ba=parseSchema(_0x374e7e,_0x1077fa(0x14c)),_0x451b66=parseSchema(_0x2f79de,_0x1077fa(0x158)),_0x5e5342=collectLrSmartJsx(_0x4bf4ba,!![]);if(_0x5e5342[_0x1077fa(0x13f)]===0x0)return{'content':_0x374e7e,'compiledNodes':0x0,'normalizedNodes':0x0};const _0x253f80=new Map(collectLrSmartJsx(_0x451b66)[_0x1077fa(0x145)](_0xedc79e=>[_0xedc79e['key'],_0xedc79e]));let _0x101edc=0x0,_0x489b47=0x0;for(const _0x26a967 of _0x5e5342){const _0x553732=readNonEmptyString(_0x26a967['render']['source']),_0x90cbc5=readNonEmptyString(_0x26a967[_0x1077fa(0x162)]['value']),_0x478a26=_0x253f80[_0x1077fa(0x163)](_0x26a967['key']),_0x3b0f2d=readNonEmptyString(_0x478a26?.['render'][_0x1077fa(0x164)]),_0xf23fe6=readNonEmptyString(_0x478a26?.[_0x1077fa(0x162)][_0x1077fa(0x151)]);let _0x53ae5d=![];_0x26a967[_0x1077fa(0x162)][_0x1077fa(0x140)]!==_0x1077fa(0x168)&&(_0x26a967['render']['type']=_0x1077fa(0x168),_0x53ae5d=!![]);!isPageContextExpression(_0x26a967[_0x1077fa(0x159)][_0x1077fa(0x152)])&&(_0x26a967['props'][_0x1077fa(0x152)]={'type':_0x1077fa(0x154),'value':_0x1077fa(0x15b)},_0x53ae5d=!![]);if(!_0x553732){if(!_0x90cbc5)throw CliErrors['validation'](_0x1077fa(0x157)+_0x26a967['label']+'\x22\x20is\x20missing\x20both\x20render.source\x20and\x20render.value.',_0x1077fa(0x165));if(_0x53ae5d)_0x489b47+=0x1;continue;}const _0x4dd694=!_0x478a26||_0x553732!==_0x3b0f2d,_0x338fdd=!_0x90cbc5;if(!_0x4dd694&&_0x90cbc5&&_0xf23fe6&&_0x90cbc5!==_0xf23fe6)throw CliErrors[_0x1077fa(0x153)](_0x1077fa(0x157)+_0x26a967['label']+_0x1077fa(0x155),_0x1077fa(0x14b));if(_0x4dd694||_0x338fdd||!_0xf23fe6){const _0x59927d=readNonEmptyString(await _0x2bf331(_0x553732));if(!_0x59927d)throw CliErrors[_0x1077fa(0x15f)]('LrSmartJsx\x20compilation\x20returned\x20no\x20code\x20for\x20node\x20\x22'+_0x26a967[_0x1077fa(0x142)]+'\x22.');_0x26a967[_0x1077fa(0x162)][_0x1077fa(0x151)]=_0x59927d,_0x101edc+=0x1,_0x53ae5d=!![];}if(_0x53ae5d)_0x489b47+=0x1;}if(_0x489b47===0x0)return{'content':_0x374e7e,'compiledNodes':_0x101edc,'normalizedNodes':_0x489b47};return{'content':JSON['stringify'](_0x4bf4ba),'compiledNodes':_0x101edc,'normalizedNodes':_0x489b47};}function a287_0x556a(_0x503862,_0x4e2c95){_0x503862=_0x503862-0x13f;const _0x5f4234=a287_0x5f42();let _0x556a09=_0x5f4234[_0x503862];return _0x556a09;}function parseSchema(_0x423a52,_0xc61c52){const _0x1f5262=a287_0x556a;try{return JSON['parse'](_0x423a52);}catch{throw CliErrors[_0x1f5262(0x153)](_0x1f5262(0x14a)+_0xc61c52+_0x1f5262(0x150));}}function collectLrSmartJsx(_0x3ed054,_0x3c9b2b=![]){const _0x1eb19a=[],_0x165529=(_0xa63cd4,_0x2d467)=>{const _0x336a09=a287_0x556a;if(Array[_0x336a09(0x14d)](_0xa63cd4)){_0xa63cd4[_0x336a09(0x167)]((_0x8a5d3f,_0x20f307)=>_0x165529(_0x8a5d3f,_0x2d467+'['+_0x20f307+']'));return;}if(!isObject(_0xa63cd4))return;if(_0xa63cd4[_0x336a09(0x148)]==='LrSmartJsx'){const _0x14c2e7=readNonEmptyString(_0xa63cd4['id']),_0x52287a=_0x14c2e7||_0x2d467,_0x5aa236=isObject(_0xa63cd4[_0x336a09(0x159)])?_0xa63cd4[_0x336a09(0x159)]:undefined;if(!_0x5aa236){if(_0x3c9b2b)throw CliErrors[_0x336a09(0x153)](_0x336a09(0x157)+_0x52287a+_0x336a09(0x156),_0x336a09(0x143));return;}const _0x21b6a0=isObject(_0x5aa236['render'])?_0x5aa236['render']:undefined;if(!_0x21b6a0){if(_0x3c9b2b)throw CliErrors[_0x336a09(0x153)](_0x336a09(0x157)+_0x52287a+_0x336a09(0x14e),_0x336a09(0x15c));return;}_0x1eb19a['push']({'key':_0x14c2e7?_0x336a09(0x161)+_0x14c2e7:_0x336a09(0x160)+_0x2d467,'label':_0x52287a,'props':_0x5aa236,'render':_0x21b6a0});}for(const [_0x4f8b94,_0xff9a0f]of Object[_0x336a09(0x15a)](_0xa63cd4)){if(_0x4f8b94===_0x336a09(0x159)&&_0xa63cd4[_0x336a09(0x148)]==='LrSmartJsx')continue;_0x165529(_0xff9a0f,_0x2d467+'.'+_0x4f8b94);}};return _0x165529(_0x3ed054,'$'),_0x1eb19a;}function isObject(_0x373c00){const _0x5ef6c6=a287_0x556a;return Boolean(_0x373c00)&&typeof _0x373c00==='object'&&!Array[_0x5ef6c6(0x14d)](_0x373c00);}function readNonEmptyString(_0x574c20){return typeof _0x574c20==='string'&&_0x574c20['trim']()?_0x574c20:undefined;}function isPageContextExpression(_0x9e4a22){const _0x2e8347=a287_0x556a;return isObject(_0x9e4a22)&&_0x9e4a22[_0x2e8347(0x140)]===_0x2e8347(0x154)&&_0x9e4a22[_0x2e8347(0x151)]===_0x2e8347(0x15b);}
@@ -1 +1 @@
1
- (function(_0x3aa4a8,_0x396a63){const _0x40abbd=a289_0x4a96,_0x13facb=_0x3aa4a8();while(!![]){try{const _0xc5a451=-parseInt(_0x40abbd(0x17b))/0x1+parseInt(_0x40abbd(0x17a))/0x2*(-parseInt(_0x40abbd(0x14e))/0x3)+parseInt(_0x40abbd(0x15a))/0x4*(parseInt(_0x40abbd(0x15c))/0x5)+-parseInt(_0x40abbd(0x179))/0x6*(parseInt(_0x40abbd(0x165))/0x7)+-parseInt(_0x40abbd(0x150))/0x8*(-parseInt(_0x40abbd(0x169))/0x9)+-parseInt(_0x40abbd(0x178))/0xa*(parseInt(_0x40abbd(0x156))/0xb)+parseInt(_0x40abbd(0x15e))/0xc;if(_0xc5a451===_0x396a63)break;else _0x13facb['push'](_0x13facb['shift']());}catch(_0x4fcef0){_0x13facb['push'](_0x13facb['shift']());}}}(a289_0x5e06,0x1a218));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';export function auditSqlJoinIndexes(_0x475740,_0xeb67c1){const _0x46ef55=a289_0x4a96,_0x27f709=[],_0x51f340=normalizeSqlForStaticAnalysis(_0x475740),_0x140f83=(_0x51f340[_0x46ef55(0x14a)]?[]:extractJoinFacts(_0x51f340[_0x46ef55(0x16f)]))[_0x46ef55(0x15f)](_0x4a4e26=>{const _0x175b2b=_0x46ef55;if(_0x4a4e26['unsupportedPredicate']||_0x4a4e26['columns'][_0x175b2b(0x158)]===0x0)return _0x27f709[_0x175b2b(0x17c)]({'code':_0x175b2b(0x15b),'table':_0x4a4e26[_0x175b2b(0x17d)],'alias':_0x4a4e26[_0x175b2b(0x177)],'columns':_0x4a4e26['columns'],'reason':_0x4a4e26[_0x175b2b(0x16c)]??'Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.'}),{'table':_0x4a4e26[_0x175b2b(0x17d)],'alias':_0x4a4e26[_0x175b2b(0x177)],'columns':_0x4a4e26[_0x175b2b(0x147)],'status':_0x175b2b(0x13c)};const _0x17431a=resolveTableMetadata(_0xeb67c1,_0x4a4e26[_0x175b2b(0x17d)]),_0xf8ebc8=(_0x17431a?.[_0x175b2b(0x164)]??[])[_0x175b2b(0x15f)](_0x4ef24e=>({'index':_0x4ef24e,'matchedPrefix':findEqualityPrefix(_0x4ef24e[_0x175b2b(0x147)],_0x4a4e26[_0x175b2b(0x147)])}))[_0x175b2b(0x182)](_0x531b0a=>_0x531b0a[_0x175b2b(0x159)]['length']>0x0),_0x3b6af5=_0xf8ebc8[_0x175b2b(0x17f)]((_0x14c4a6,_0x81b398)=>!_0x14c4a6||_0x81b398['matchedPrefix']['length']>_0x14c4a6['matchedPrefix'][_0x175b2b(0x158)]?_0x81b398:_0x14c4a6,_0xf8ebc8[0x0]);if(_0x3b6af5)return{'table':_0x4a4e26[_0x175b2b(0x17d)],'alias':_0x4a4e26['alias'],'columns':_0x4a4e26[_0x175b2b(0x147)],'status':_0x175b2b(0x167),'matchedIndex':{..._0x3b6af5[_0x175b2b(0x13a)],'matchedPrefix':_0x3b6af5[_0x175b2b(0x159)]}};const _0xb6d72a=_0x17431a?.[_0x175b2b(0x164)]['filter'](_0x5d1f1e=>_0x5d1f1e[_0x175b2b(0x147)][_0x175b2b(0x13b)](_0x7d17fa=>_0x4a4e26[_0x175b2b(0x147)][_0x175b2b(0x13b)](_0x4eaee5=>columnNamesMatch(_0x7d17fa,_0x4eaee5))))??[];if(_0xb6d72a[_0x175b2b(0x158)]>0x0)return _0x27f709[_0x175b2b(0x17c)]({'code':_0x175b2b(0x163),'table':_0x4a4e26[_0x175b2b(0x17d)],'alias':_0x4a4e26['alias'],'columns':_0x4a4e26[_0x175b2b(0x147)],'reason':_0x175b2b(0x16b)}),{'table':_0x4a4e26['table'],'alias':_0x4a4e26[_0x175b2b(0x177)],'columns':_0x4a4e26[_0x175b2b(0x147)],'status':'warning','candidateIndexes':_0xb6d72a};if(_0x17431a&&_0x17431a['metadataAvailable']!==![]&&_0x17431a[_0x175b2b(0x164)][_0x175b2b(0x158)]>0x0&&_0x4a4e26[_0x175b2b(0x147)][_0x175b2b(0x158)]>0x0)return _0x27f709[_0x175b2b(0x17c)]({'code':_0x175b2b(0x17e),'table':_0x4a4e26['table'],'alias':_0x4a4e26[_0x175b2b(0x177)],'columns':_0x4a4e26[_0x175b2b(0x147)],'reason':'No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.'}),{'table':_0x4a4e26['table'],'alias':_0x4a4e26['alias'],'columns':_0x4a4e26['columns'],'status':'warning'};return _0x27f709[_0x175b2b(0x17c)]({'code':_0x175b2b(0x140),'table':_0x4a4e26[_0x175b2b(0x17d)],'alias':_0x4a4e26[_0x175b2b(0x177)],'columns':_0x4a4e26[_0x175b2b(0x147)],'reason':_0x17431a?_0x175b2b(0x180):'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x4a4e26['table'],'alias':_0x4a4e26['alias'],'columns':_0x4a4e26[_0x175b2b(0x147)],'status':_0x175b2b(0x13c)};});return{'checked':_0x140f83[_0x46ef55(0x158)]>0x0,'joins':_0x140f83,'warnings':_0x27f709};}function extractJoinFacts(_0x34411b){const _0x1c4c40=a289_0x4a96,_0xd5df95=maskNestedQueries(stripSqlNoise(_0x34411b)),_0x463718=maskQuotedIdentifiers(_0xd5df95),_0xe4bb18=[],_0x388925=new Set(),_0x5146fd=/\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 _0x5d4a71 of _0xd5df95[_0x1c4c40(0x16d)](_0x5146fd)){const _0x14ae02=_0x5d4a71[_0x1c4c40(0x13a)]??0x0,_0x2957bc=_0x5d4a71[0x0][_0x1c4c40(0x152)](/\bJOIN\b/i),_0x50adf1=_0x14ae02+Math[_0x1c4c40(0x161)](0x0,_0x2957bc);if(!/^JOIN\b/i[_0x1c4c40(0x14b)](_0x463718[_0x1c4c40(0x149)](_0x50adf1)))continue;_0x388925['add'](_0x50adf1);const _0x5531cf=normalizeIdentifier(_0x5d4a71[0x1]||_0x1c4c40(0x154)),_0x227703=normalizeIdentifier(_0x5d4a71[0x2]??''),_0xf680b=normalizeIdentifier(_0x5d4a71[0x3]||_0x227703[_0x1c4c40(0x176)]('.')['at'](-0x1)||_0x227703),_0x3ed991=[],_0x1c24e0=_0x227703==='__sq__';let _0x5b02fd=_0x5531cf===_0x1c4c40(0x16e)||_0x5531cf===_0x1c4c40(0x181)||_0x1c24e0,_0x3ff563=_0x5b02fd?_0x1c24e0?'Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.':_0x5531cf[_0x1c4c40(0x13d)]()+_0x1c4c40(0x142):undefined;const _0x48198d=stripOuterParentheses(_0x5d4a71[0x4]??''),_0x4f8241=_0x48198d[_0x1c4c40(0x175)](MYBATIS_DYNAMIC_START_MARKER)||_0x48198d['includes'](MYBATIS_DYNAMIC_END_MARKER),_0x3e943b=_0x48198d['includes'](MYBATIS_INCLUDE_MARKER);_0x4f8241&&(_0x5b02fd=!![],_0x3ff563??=_0x1c4c40(0x146));_0x3e943b&&(_0x5b02fd=!![],_0x3ff563??=_0x1c4c40(0x153));const _0x204f38=_0x48198d[_0x1c4c40(0x141)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x1c4c40(0x141)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x1c4c40(0x141)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x204f38,'OR')&&(_0x5b02fd=!![],_0x3ff563??=_0x1c4c40(0x14c));for(const _0xcaf9d3 of splitTopLevelAnd(_0x204f38)){const _0x4391c7=stripOuterParentheses(_0xcaf9d3);if(hasTopLevelKeyword(_0x4391c7,'OR')){_0x5b02fd=!![],_0x3ff563??=_0x1c4c40(0x14c);continue;}const _0x5132a6=splitEquality(_0x4391c7);if(!_0x5132a6){containsColumnReference(_0xcaf9d3,_0xf680b)&&(_0x5b02fd=!![]);continue;}const _0x212e73=parseDirectColumnReference(_0x5132a6[0x0],_0xf680b),_0x4b6e0b=parseDirectColumnReference(_0x5132a6[0x1],_0xf680b),_0x5a8021=containsColumnReference(_0x5132a6[0x0],_0xf680b),_0xf32bac=containsColumnReference(_0x5132a6[0x1],_0xf680b),_0x4e2ed1=_0x212e73&&!_0xf32bac?_0x212e73:_0x4b6e0b&&!_0x5a8021?_0x4b6e0b:null;if(_0x4e2ed1&&!_0x3ed991['includes'](_0x4e2ed1))_0x3ed991['push'](_0x4e2ed1);else!_0x4e2ed1&&containsColumnReference(_0xcaf9d3,_0xf680b)&&(_0x5b02fd=!![]);}_0xe4bb18[_0x1c4c40(0x17c)]({'table':_0x227703,'alias':_0xf680b,'columns':_0x3ed991,'unsupportedPredicate':_0x5b02fd,'unsupportedReason':_0x3ff563,'containsUnresolvedInclude':_0x3e943b,'position':_0x50adf1});}for(const _0x3550ed of _0x463718[_0x1c4c40(0x16d)](/\bJOIN\b/gi)){const _0xc5a4c7=_0x3550ed[_0x1c4c40(0x13a)]??0x0;if(_0x388925[_0x1c4c40(0x155)](_0xc5a4c7))continue;const _0x3ceb12=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/[_0x1c4c40(0x14d)](_0xd5df95[_0x1c4c40(0x149)](_0xc5a4c7+_0x3550ed[0x0][_0x1c4c40(0x158)])),_0x421294=normalizeIdentifier(_0x3ceb12?.[0x1]||_0x1c4c40(0x14f)),_0x4aa13a=normalizeIdentifier(_0x3ceb12?.[0x2]||''),_0x305757=isSqlClauseKeyword(_0x4aa13a)?_0x421294[_0x1c4c40(0x176)]('.')['at'](-0x1)||_0x421294:_0x4aa13a||_0x421294[_0x1c4c40(0x176)]('.')['at'](-0x1)||_0x421294;_0xe4bb18[_0x1c4c40(0x17c)]({'table':_0x421294,'alias':_0x305757,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x1c4c40(0x148),'position':_0xc5a4c7});}const _0x21dd93=_0x463718[_0x1c4c40(0x162)](MYBATIS_INCLUDE_MARKER);return _0x21dd93>=0x0&&!_0xe4bb18[_0x1c4c40(0x13b)](_0x1d9695=>_0x1d9695['containsUnresolvedInclude'])&&_0xe4bb18['push']({'table':_0x1c4c40(0x14f),'alias':_0x1c4c40(0x14f),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x1c4c40(0x174),'containsUnresolvedInclude':!![],'position':_0x21dd93}),_0xe4bb18[_0x1c4c40(0x144)]((_0x322cd0,_0xf1ea79)=>_0x322cd0['position']-_0xf1ea79[_0x1c4c40(0x143)]);}function stripSqlNoise(_0xb553a2){const _0x505c68=a289_0x4a96,_0xafe797=Array[_0x505c68(0x157)](_0xb553a2),_0x2f0656=(_0x197918,_0x47d2fb)=>{for(let _0x2f83b7=_0x197918;_0x2f83b7<_0x47d2fb;_0x2f83b7+=0x1){_0xafe797[_0x2f83b7]!=='\x0a'&&_0xafe797[_0x2f83b7]!=='\x0d'&&(_0xafe797[_0x2f83b7]='\x20');}};for(let _0x2c1e66=0x0;_0x2c1e66<_0xafe797['length'];_0x2c1e66+=0x1){const _0x267f82=_0xafe797[_0x2c1e66],_0x9f219e=_0xafe797[_0x2c1e66+0x1];if(_0x267f82==='\x27'||_0x267f82==='\x22'||_0x267f82==='`'){const _0xf09dc1=_0x267f82,_0x13503d=_0x2c1e66;_0x2c1e66+=0x1;while(_0x2c1e66<_0xafe797[_0x505c68(0x158)]){if(_0xafe797[_0x2c1e66]==='\x5c'&&_0x2c1e66+0x1<_0xafe797[_0x505c68(0x158)]){_0x2c1e66+=0x2;continue;}if(_0xafe797[_0x2c1e66]!==_0xf09dc1){_0x2c1e66+=0x1;continue;}if(_0xafe797[_0x2c1e66+0x1]===_0xf09dc1){_0x2c1e66+=0x2;continue;}break;}if(_0xf09dc1==='\x27')_0x2f0656(_0x13503d,Math[_0x505c68(0x16a)](_0x2c1e66+0x1,_0xafe797[_0x505c68(0x158)]));continue;}if(_0x267f82==='-'&&_0x9f219e==='-'){const _0x3e72e5=_0x2c1e66;while(_0x2c1e66<_0xafe797[_0x505c68(0x158)]&&_0xafe797[_0x2c1e66]!=='\x0a')_0x2c1e66+=0x1;_0x2f0656(_0x3e72e5,_0x2c1e66);continue;}if(_0x267f82==='/'&&_0x9f219e==='*'){const _0x54a7eb=_0x2c1e66;_0x2c1e66+=0x2;while(_0x2c1e66<_0xafe797[_0x505c68(0x158)]&&!(_0xafe797[_0x2c1e66]==='*'&&_0xafe797[_0x2c1e66+0x1]==='/')){_0x2c1e66+=0x1;}_0x2c1e66=Math[_0x505c68(0x16a)](_0x2c1e66+0x1,_0xafe797[_0x505c68(0x158)]-0x1),_0x2f0656(_0x54a7eb,_0x2c1e66+0x1);continue;}if(_0x267f82==='#'&&_0x9f219e!=='{'){const _0x4d66d2=_0x2c1e66;while(_0x2c1e66<_0xafe797[_0x505c68(0x158)]&&_0xafe797[_0x2c1e66]!=='\x0a')_0x2c1e66+=0x1;_0x2f0656(_0x4d66d2,_0x2c1e66);continue;}if((_0x267f82==='#'||_0x267f82==='$')&&_0x9f219e==='{'){const _0x1520bb=_0x2c1e66;_0x2c1e66+=0x2;while(_0x2c1e66<_0xafe797[_0x505c68(0x158)]&&_0xafe797[_0x2c1e66]!=='}')_0x2c1e66+=0x1;_0x2f0656(_0x1520bb,Math[_0x505c68(0x16a)](_0x2c1e66+0x1,_0xafe797['length']));}}return _0xafe797[_0x505c68(0x139)]('');}function maskQuotedIdentifiers(_0x5ea5de){const _0xde52a7=a289_0x4a96,_0x393ad3=Array[_0xde52a7(0x157)](_0x5ea5de);for(let _0x27f1bf=0x0;_0x27f1bf<_0x393ad3[_0xde52a7(0x158)];_0x27f1bf+=0x1){const _0x32db7a=_0x393ad3[_0x27f1bf];if(_0x32db7a!=='\x22'&&_0x32db7a!=='`')continue;_0x27f1bf+=0x1;while(_0x27f1bf<_0x393ad3['length']){if(_0x393ad3[_0x27f1bf]===_0x32db7a){if(_0x393ad3[_0x27f1bf+0x1]===_0x32db7a){_0x393ad3[_0x27f1bf]='\x20',_0x393ad3[_0x27f1bf+0x1]='\x20',_0x27f1bf+=0x2;continue;}break;}_0x393ad3[_0x27f1bf]='\x20',_0x27f1bf+=0x1;}}return _0x393ad3[_0xde52a7(0x139)]('');}function a289_0x5e06(){const _0x1e1ca5=['unsupportedReason','matchAll','right','sql','startsWith','__sq__','\x5c$&','endsWith','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','includes','split','alias','230xIyoqX','44166BWyTdg','98XlxwXK','111113HpEZrO','push','table','JOIN_INDEX_MISSING','reduce','The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.','full','filter','toLowerCase','join','index','some','unavailable','toUpperCase','using','trim','INDEX_METADATA_UNAVAILABLE','replaceAll','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','position','sort','left','MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.','columns','Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','slice','error','test','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','exec','93NffxFJ','unknown','8cJjTeq','replace','search','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','INNER','has','49291pAsiPo','from','length','matchedPrefix','1752AWlyFQ','JOIN_PREDICATE_UNSUPPORTED','1135qorCTI','cross','2181636kgGSCr','map','natural','max','indexOf','JOIN_INDEX_NOT_USABLE','indexes','63uzWqNd','match','covered','tableName','969723ocBsCT','min','Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'];a289_0x5e06=function(){return _0x1e1ca5;};return a289_0x5e06();}function maskNestedQueries(_0x427b45){const _0x330ee0=a289_0x4a96,_0x5992fe=Array['from'](_0x427b45);for(let _0x134798=0x0;_0x134798<_0x5992fe[_0x330ee0(0x158)];_0x134798+=0x1){if(_0x5992fe[_0x134798]!=='(')continue;const _0x1af577=_0x427b45['slice'](_0x134798+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x330ee0(0x14b)](_0x1af577))continue;let _0x44250a=0x1,_0x116260=_0x134798+0x1;for(;_0x116260<_0x5992fe[_0x330ee0(0x158)]&&_0x44250a>0x0;_0x116260+=0x1){if(_0x5992fe[_0x116260]==='(')_0x44250a+=0x1;if(_0x5992fe[_0x116260]===')')_0x44250a-=0x1;}if(_0x44250a!==0x0)continue;for(let _0x2d44cc=_0x134798;_0x2d44cc<_0x116260;_0x2d44cc+=0x1){_0x5992fe[_0x2d44cc]='\x20';}const _0x2ae69f=_0x330ee0(0x171);for(let _0x564939=0x0;_0x564939<_0x2ae69f[_0x330ee0(0x158)]&&_0x134798+_0x564939<_0x116260;_0x564939+=0x1){_0x5992fe[_0x134798+_0x564939]=_0x2ae69f[_0x564939];}_0x134798=_0x116260-0x1;}return _0x5992fe[_0x330ee0(0x139)]('');}function a289_0x4a96(_0x2dd8dc,_0x32d27b){_0x2dd8dc=_0x2dd8dc-0x139;const _0x5e06c4=a289_0x5e06();let _0x4a96d6=_0x5e06c4[_0x2dd8dc];return _0x4a96d6;}function splitTopLevelAnd(_0x392a64){const _0x472eef=a289_0x4a96,_0x4e2996=[];let _0x41285d=0x0,_0x4171d4=0x0;for(let _0x47686f=0x0;_0x47686f<_0x392a64[_0x472eef(0x158)];_0x47686f+=0x1){const _0x41916a=_0x392a64[_0x47686f];if(_0x41916a==='(')_0x41285d+=0x1;if(_0x41916a===')')_0x41285d=Math[_0x472eef(0x161)](0x0,_0x41285d-0x1);_0x41285d===0x0&&_0x392a64[_0x472eef(0x149)](_0x47686f)[_0x472eef(0x166)](/^AND\b/i)&&(_0x47686f===0x0||/\s/['test'](_0x392a64[_0x47686f-0x1]??''))&&(_0x4e2996[_0x472eef(0x17c)](_0x392a64['slice'](_0x4171d4,_0x47686f)[_0x472eef(0x13f)]()),_0x47686f+=0x2,_0x4171d4=_0x47686f+0x1);}const _0x42ce14=_0x392a64[_0x472eef(0x149)](_0x4171d4)[_0x472eef(0x13f)]();if(_0x42ce14)_0x4e2996[_0x472eef(0x17c)](_0x42ce14);return _0x4e2996;}function hasTopLevelKeyword(_0x4fa334,_0x334dd5){const _0x199e66=a289_0x4a96;let _0x3d7592=0x0;for(let _0x24e08c=0x0;_0x24e08c<_0x4fa334[_0x199e66(0x158)];_0x24e08c+=0x1){const _0x2ff999=_0x4fa334[_0x24e08c];if(_0x2ff999==='(')_0x3d7592+=0x1;if(_0x2ff999===')')_0x3d7592=Math[_0x199e66(0x161)](0x0,_0x3d7592-0x1);if(_0x3d7592!==0x0)continue;const _0x5a3f39=_0x4fa334[_0x199e66(0x149)](_0x24e08c,_0x24e08c+_0x334dd5[_0x199e66(0x158)]),_0x437fc1=_0x4fa334[_0x24e08c-0x1]??'\x20',_0x5912b7=_0x4fa334[_0x24e08c+_0x334dd5[_0x199e66(0x158)]]??'\x20';if(_0x5a3f39[_0x199e66(0x13d)]()===_0x334dd5[_0x199e66(0x13d)]()&&!/[\w$]/[_0x199e66(0x14b)](_0x437fc1)&&!/[\w$]/[_0x199e66(0x14b)](_0x5912b7))return!![];}return![];}function splitEquality(_0x5e9b9d){const _0x8ecc7f=a289_0x4a96,_0x755d4e=stripOuterParentheses(_0x5e9b9d);let _0x3f4e32=0x0,_0x3f0193;for(let _0x30c53b=0x0;_0x30c53b<_0x755d4e['length'];_0x30c53b+=0x1){const _0x48e87b=_0x755d4e[_0x30c53b];if(_0x48e87b==='(')_0x3f4e32+=0x1;if(_0x48e87b===')')_0x3f4e32=Math[_0x8ecc7f(0x161)](0x0,_0x3f4e32-0x1);const _0x198151=_0x755d4e[_0x30c53b-0x1]??'',_0x215c93=_0x755d4e[_0x30c53b+0x1]??'';if(_0x48e87b==='='&&_0x3f4e32===0x0&&!/[!<>=:]/[_0x8ecc7f(0x14b)](_0x198151)&&_0x215c93!=='='){if(_0x3f0193!==undefined)return null;_0x3f0193=_0x30c53b;}}return _0x3f0193===undefined?null:[_0x755d4e[_0x8ecc7f(0x149)](0x0,_0x3f0193)['trim'](),_0x755d4e[_0x8ecc7f(0x149)](_0x3f0193+0x1)[_0x8ecc7f(0x13f)]()];}function parseDirectColumnReference(_0x215844,_0x8f9089){const _0x23365d=a289_0x4a96,_0x416f0d=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x23365d(0x14d)](stripOuterParentheses(_0x215844));if(!_0x416f0d)return null;if(normalizeIdentifier(_0x416f0d[0x1]??'')!==normalizeIdentifier(_0x8f9089))return null;return normalizeIdentifier(_0x416f0d[0x2]??'');}function containsColumnReference(_0x2e4cb0,_0x138848){const _0x2930d2=a289_0x4a96,_0x55a7d3=_0x2e4cb0[_0x2930d2(0x151)](/[`"]/g,''),_0x134ebb=_0x138848[_0x2930d2(0x151)](/[.*+?^${}()|[\]\\]/g,_0x2930d2(0x172));return new RegExp('(?:^|[^\x5cw$])'+_0x134ebb+'\x5cs*\x5c.\x5cs*[\x5cw$]+','i')[_0x2930d2(0x14b)](_0x55a7d3);}function findEqualityPrefix(_0x347162,_0x4972a){const _0x3eea19=a289_0x4a96,_0xc67516=new Set(_0x4972a[_0x3eea19(0x15f)](normalizeIdentifier)),_0x5ef9c2=[];for(const _0x524de2 of _0x347162){if(!_0xc67516['has'](normalizeIdentifier(_0x524de2)))break;_0x5ef9c2[_0x3eea19(0x17c)](_0x524de2);}return _0x5ef9c2;}function resolveTableMetadata(_0x358ce3,_0x4fb186){const _0x5f2499=a289_0x4a96,_0x628561=normalizeIdentifier(_0x4fb186),_0x5135e7=_0x358ce3[_0x5f2499(0x182)](_0xac1676=>normalizeIdentifier(_0xac1676['tableName'])===_0x628561);if(_0x5135e7[_0x5f2499(0x158)]===0x1)return _0x5135e7[0x0];const _0x127069=_0x628561[_0x5f2499(0x175)]('.'),_0x3e1ac0=_0x628561['split']('.')['at'](-0x1),_0x4244f8=_0x358ce3[_0x5f2499(0x182)](_0x163267=>{const _0x21dd0b=_0x5f2499,_0x2e164c=normalizeIdentifier(_0x163267[_0x21dd0b(0x168)]);if(_0x127069&&_0x2e164c['includes']('.'))return![];return _0x2e164c[_0x21dd0b(0x176)]('.')['at'](-0x1)===_0x3e1ac0;});return _0x4244f8[_0x5f2499(0x158)]===0x1?_0x4244f8[0x0]:undefined;}function columnNamesMatch(_0x1429fb,_0x5426ba){return normalizeIdentifier(_0x1429fb)===normalizeIdentifier(_0x5426ba);}function normalizeIdentifier(_0x3f89d8){const _0x30325f=a289_0x4a96;return _0x3f89d8['replace'](/[`"]/g,'')[_0x30325f(0x13f)]()[_0x30325f(0x183)]();}function isSqlClauseKeyword(_0x882ec0){const _0x50b0cf=a289_0x4a96;return new Set(['on',_0x50b0cf(0x13e),'where',_0x50b0cf(0x139),'inner',_0x50b0cf(0x145),'right',_0x50b0cf(0x181),_0x50b0cf(0x15d),_0x50b0cf(0x160)])[_0x50b0cf(0x155)](_0x882ec0);}function stripOuterParentheses(_0x3694f2){const _0x1e2b1f=a289_0x4a96;let _0x35b801=_0x3694f2[_0x1e2b1f(0x13f)]();while(_0x35b801[_0x1e2b1f(0x170)]('(')&&_0x35b801[_0x1e2b1f(0x173)](')')){let _0x35929e=0x0,_0x5a540d=!![];for(let _0x16bc33=0x0;_0x16bc33<_0x35b801[_0x1e2b1f(0x158)];_0x16bc33+=0x1){if(_0x35b801[_0x16bc33]==='(')_0x35929e+=0x1;if(_0x35b801[_0x16bc33]===')')_0x35929e-=0x1;if(_0x35929e===0x0&&_0x16bc33<_0x35b801[_0x1e2b1f(0x158)]-0x1){_0x5a540d=![];break;}}if(!_0x5a540d||_0x35929e!==0x0)break;_0x35b801=_0x35b801[_0x1e2b1f(0x149)](0x1,-0x1)[_0x1e2b1f(0x13f)]();}return _0x35b801;}
1
+ (function(_0x46fcb8,_0x230bc2){const _0x3aed57=a289_0x1224,_0x209265=_0x46fcb8();while(!![]){try{const _0x1dd237=parseInt(_0x3aed57(0x1c7))/0x1+-parseInt(_0x3aed57(0x1b8))/0x2+parseInt(_0x3aed57(0x1e3))/0x3*(parseInt(_0x3aed57(0x1b3))/0x4)+-parseInt(_0x3aed57(0x1ef))/0x5*(parseInt(_0x3aed57(0x1ca))/0x6)+parseInt(_0x3aed57(0x1e0))/0x7+parseInt(_0x3aed57(0x1e6))/0x8*(-parseInt(_0x3aed57(0x1eb))/0x9)+parseInt(_0x3aed57(0x1b6))/0xa;if(_0x1dd237===_0x230bc2)break;else _0x209265['push'](_0x209265['shift']());}catch(_0x261639){_0x209265['push'](_0x209265['shift']());}}}(a289_0x4019,0x6afa2));import{MYBATIS_DYNAMIC_END_MARKER,MYBATIS_DYNAMIC_START_MARKER,MYBATIS_INCLUDE_MARKER,normalizeSqlForStaticAnalysis}from'./sql-validator.js';function a289_0x1224(_0x41491d,_0x140de4){_0x41491d=_0x41491d-0x1ad;const _0x4019e6=a289_0x4019();let _0x12246e=_0x4019e6[_0x41491d];return _0x12246e;}export function auditSqlJoinIndexes(_0x3d2768,_0x216ffe){const _0x107de6=a289_0x1224,_0xab6b00=[],_0x16e2f3=normalizeSqlForStaticAnalysis(_0x3d2768),_0x442993=(_0x16e2f3['error']?[]:extractJoinFacts(_0x16e2f3['sql']))[_0x107de6(0x1c9)](_0x3b22a2=>{const _0x540afa=_0x107de6;if(_0x3b22a2['unsupportedPredicate']||_0x3b22a2[_0x540afa(0x1cf)][_0x540afa(0x1b5)]===0x0)return _0xab6b00[_0x540afa(0x1e1)]({'code':_0x540afa(0x1c6),'table':_0x3b22a2[_0x540afa(0x1da)],'alias':_0x3b22a2[_0x540afa(0x1d4)],'columns':_0x3b22a2['columns'],'reason':_0x3b22a2['unsupportedReason']??_0x540afa(0x1af)}),{'table':_0x3b22a2['table'],'alias':_0x3b22a2[_0x540afa(0x1d4)],'columns':_0x3b22a2[_0x540afa(0x1cf)],'status':'unavailable'};const _0x22df93=resolveTableMetadata(_0x216ffe,_0x3b22a2['table']),_0x30a130=(_0x22df93?.[_0x540afa(0x1bf)]??[])['map'](_0x4aa9ef=>({'index':_0x4aa9ef,'matchedPrefix':findEqualityPrefix(_0x4aa9ef[_0x540afa(0x1cf)],_0x3b22a2[_0x540afa(0x1cf)])}))[_0x540afa(0x1b2)](_0x9ce566=>_0x9ce566[_0x540afa(0x1e9)][_0x540afa(0x1b5)]>0x0),_0x38cac3=_0x30a130[_0x540afa(0x1b7)]((_0x11bfab,_0x4de3a7)=>!_0x11bfab||_0x4de3a7['matchedPrefix'][_0x540afa(0x1b5)]>_0x11bfab[_0x540afa(0x1e9)]['length']?_0x4de3a7:_0x11bfab,_0x30a130[0x0]);if(_0x38cac3)return{'table':_0x3b22a2[_0x540afa(0x1da)],'alias':_0x3b22a2[_0x540afa(0x1d4)],'columns':_0x3b22a2[_0x540afa(0x1cf)],'status':_0x540afa(0x1c1),'matchedIndex':{..._0x38cac3[_0x540afa(0x1d5)],'matchedPrefix':_0x38cac3[_0x540afa(0x1e9)]}};const _0xde8369=_0x22df93?.[_0x540afa(0x1bf)][_0x540afa(0x1b2)](_0x20fd11=>_0x20fd11[_0x540afa(0x1cf)]['some'](_0x53440b=>_0x3b22a2['columns'][_0x540afa(0x1ad)](_0x5953ea=>columnNamesMatch(_0x53440b,_0x5953ea))))??[];if(_0xde8369[_0x540afa(0x1b5)]>0x0)return _0xab6b00[_0x540afa(0x1e1)]({'code':_0x540afa(0x1b9),'table':_0x3b22a2['table'],'alias':_0x3b22a2['alias'],'columns':_0x3b22a2['columns'],'reason':'Relevant\x20columns\x20do\x20not\x20form\x20a\x20complete\x20leftmost\x20index\x20prefix.'}),{'table':_0x3b22a2[_0x540afa(0x1da)],'alias':_0x3b22a2[_0x540afa(0x1d4)],'columns':_0x3b22a2[_0x540afa(0x1cf)],'status':_0x540afa(0x1ba),'candidateIndexes':_0xde8369};if(_0x22df93&&_0x22df93[_0x540afa(0x1ee)]!==![]&&_0x22df93[_0x540afa(0x1bf)][_0x540afa(0x1b5)]>0x0&&_0x3b22a2[_0x540afa(0x1cf)][_0x540afa(0x1b5)]>0x0)return _0xab6b00[_0x540afa(0x1e1)]({'code':_0x540afa(0x1d8),'table':_0x3b22a2[_0x540afa(0x1da)],'alias':_0x3b22a2[_0x540afa(0x1d4)],'columns':_0x3b22a2[_0x540afa(0x1cf)],'reason':_0x540afa(0x1e7)}),{'table':_0x3b22a2[_0x540afa(0x1da)],'alias':_0x3b22a2[_0x540afa(0x1d4)],'columns':_0x3b22a2[_0x540afa(0x1cf)],'status':_0x540afa(0x1ba)};return _0xab6b00[_0x540afa(0x1e1)]({'code':_0x540afa(0x1dc),'table':_0x3b22a2[_0x540afa(0x1da)],'alias':_0x3b22a2[_0x540afa(0x1d4)],'columns':_0x3b22a2[_0x540afa(0x1cf)],'reason':_0x22df93?'The\x20dataset\x20returned\x20no\x20distinguishable\x20index\x20metadata.':'No\x20dataset\x20metadata\x20matched\x20the\x20JOIN\x20table.'}),{'table':_0x3b22a2[_0x540afa(0x1da)],'alias':_0x3b22a2['alias'],'columns':_0x3b22a2[_0x540afa(0x1cf)],'status':'unavailable'};});return{'checked':_0x442993['length']>0x0,'joins':_0x442993,'warnings':_0xab6b00};}function extractJoinFacts(_0x2b8cb5){const _0x10a119=a289_0x1224,_0xa2aa4e=maskNestedQueries(stripSqlNoise(_0x2b8cb5)),_0x4e32ce=maskQuotedIdentifiers(_0xa2aa4e),_0x1397b0=[],_0x481f78=new Set(),_0x3ceee3=/\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 _0x51a5ae of _0xa2aa4e[_0x10a119(0x1cb)](_0x3ceee3)){const _0x530aee=_0x51a5ae['index']??0x0,_0x203743=_0x51a5ae[0x0]['search'](/\bJOIN\b/i),_0x3fa82b=_0x530aee+Math[_0x10a119(0x1ae)](0x0,_0x203743);if(!/^JOIN\b/i[_0x10a119(0x1dd)](_0x4e32ce['slice'](_0x3fa82b)))continue;_0x481f78[_0x10a119(0x1bd)](_0x3fa82b);const _0x4aadb2=normalizeIdentifier(_0x51a5ae[0x1]||_0x10a119(0x1c2)),_0x491a21=normalizeIdentifier(_0x51a5ae[0x2]??''),_0x3daf6e=normalizeIdentifier(_0x51a5ae[0x3]||_0x491a21['split']('.')['at'](-0x1)||_0x491a21),_0x229bf4=[],_0x35a367=_0x491a21==='__sq__';let _0x2c5ce7=_0x4aadb2==='right'||_0x4aadb2===_0x10a119(0x1ed)||_0x35a367,_0x946e21=_0x2c5ce7?_0x35a367?_0x10a119(0x1ce):_0x4aadb2[_0x10a119(0x1be)]()+_0x10a119(0x1b0):undefined;const _0x5cd7c1=stripOuterParentheses(_0x51a5ae[0x4]??''),_0x55be7c=_0x5cd7c1[_0x10a119(0x1e8)](MYBATIS_DYNAMIC_START_MARKER)||_0x5cd7c1[_0x10a119(0x1e8)](MYBATIS_DYNAMIC_END_MARKER),_0x561b25=_0x5cd7c1[_0x10a119(0x1e8)](MYBATIS_INCLUDE_MARKER);_0x55be7c&&(_0x2c5ce7=!![],_0x946e21??='MyBatis\x20dynamic\x20JOIN\x20predicates\x20cannot\x20be\x20audited\x20deterministically.');_0x561b25&&(_0x2c5ce7=!![],_0x946e21??=_0x10a119(0x1bc));const _0x37ce9a=_0x5cd7c1[_0x10a119(0x1e4)](MYBATIS_DYNAMIC_START_MARKER,'\x20')[_0x10a119(0x1e4)](MYBATIS_DYNAMIC_END_MARKER,'\x20')[_0x10a119(0x1e4)](MYBATIS_INCLUDE_MARKER,'\x20');hasTopLevelKeyword(_0x37ce9a,'OR')&&(_0x2c5ce7=!![],_0x946e21??=_0x10a119(0x1e5));for(const _0x1540e8 of splitTopLevelAnd(_0x37ce9a)){const _0xc12a19=stripOuterParentheses(_0x1540e8);if(hasTopLevelKeyword(_0xc12a19,'OR')){_0x2c5ce7=!![],_0x946e21??='OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.';continue;}const _0x196f19=splitEquality(_0xc12a19);if(!_0x196f19){containsColumnReference(_0x1540e8,_0x3daf6e)&&(_0x2c5ce7=!![]);continue;}const _0x3a8456=parseDirectColumnReference(_0x196f19[0x0],_0x3daf6e),_0xc9291a=parseDirectColumnReference(_0x196f19[0x1],_0x3daf6e),_0x20d720=containsColumnReference(_0x196f19[0x0],_0x3daf6e),_0x53c081=containsColumnReference(_0x196f19[0x1],_0x3daf6e),_0xb6896a=_0x3a8456&&!_0x53c081?_0x3a8456:_0xc9291a&&!_0x20d720?_0xc9291a:null;if(_0xb6896a&&!_0x229bf4[_0x10a119(0x1e8)](_0xb6896a))_0x229bf4[_0x10a119(0x1e1)](_0xb6896a);else!_0xb6896a&&containsColumnReference(_0x1540e8,_0x3daf6e)&&(_0x2c5ce7=!![]);}_0x1397b0[_0x10a119(0x1e1)]({'table':_0x491a21,'alias':_0x3daf6e,'columns':_0x229bf4,'unsupportedPredicate':_0x2c5ce7,'unsupportedReason':_0x946e21,'containsUnresolvedInclude':_0x561b25,'position':_0x3fa82b});}for(const _0x3b7cdb of _0x4e32ce[_0x10a119(0x1cb)](/\bJOIN\b/gi)){const _0x225019=_0x3b7cdb[_0x10a119(0x1d5)]??0x0;if(_0x481f78[_0x10a119(0x1b1)](_0x225019))continue;const _0xb264d5=/^\s+([`"\w$.]+)(?:\s+(?:AS\s+)?([`"\w$]+))?/['exec'](_0xa2aa4e[_0x10a119(0x1c4)](_0x225019+_0x3b7cdb[0x0][_0x10a119(0x1b5)])),_0x4aa919=normalizeIdentifier(_0xb264d5?.[0x1]||_0x10a119(0x1d9)),_0x4bffb3=normalizeIdentifier(_0xb264d5?.[0x2]||''),_0x47e268=isSqlClauseKeyword(_0x4bffb3)?_0x4aa919['split']('.')['at'](-0x1)||_0x4aa919:_0x4bffb3||_0x4aa919[_0x10a119(0x1bb)]('.')['at'](-0x1)||_0x4aa919;_0x1397b0[_0x10a119(0x1e1)]({'table':_0x4aa919,'alias':_0x47e268,'columns':[],'unsupportedPredicate':!![],'unsupportedReason':'Only\x20explicit\x20table\x20JOIN\x20clauses\x20with\x20an\x20ON\x20predicate\x20are\x20supported.','position':_0x225019});}const _0x51579f=_0x4e32ce['indexOf'](MYBATIS_INCLUDE_MARKER);return _0x51579f>=0x0&&!_0x1397b0[_0x10a119(0x1ad)](_0x1f38cc=>_0x1f38cc['containsUnresolvedInclude'])&&_0x1397b0[_0x10a119(0x1e1)]({'table':_0x10a119(0x1d9),'alias':_0x10a119(0x1d9),'columns':[],'unsupportedPredicate':!![],'unsupportedReason':_0x10a119(0x1e2),'containsUnresolvedInclude':!![],'position':_0x51579f}),_0x1397b0[_0x10a119(0x1cd)]((_0x308a80,_0x398e20)=>_0x308a80['position']-_0x398e20['position']);}function stripSqlNoise(_0x22ec28){const _0x1cc5b9=a289_0x1224,_0xba46a8=Array[_0x1cc5b9(0x1db)](_0x22ec28),_0x5b6a83=(_0x228756,_0x15b7fc)=>{for(let _0x2838e0=_0x228756;_0x2838e0<_0x15b7fc;_0x2838e0+=0x1){_0xba46a8[_0x2838e0]!=='\x0a'&&_0xba46a8[_0x2838e0]!=='\x0d'&&(_0xba46a8[_0x2838e0]='\x20');}};for(let _0x26e1f0=0x0;_0x26e1f0<_0xba46a8['length'];_0x26e1f0+=0x1){const _0x574681=_0xba46a8[_0x26e1f0],_0x54f89c=_0xba46a8[_0x26e1f0+0x1];if(_0x574681==='\x27'||_0x574681==='\x22'||_0x574681==='`'){const _0x17ca60=_0x574681,_0x4eac0f=_0x26e1f0;_0x26e1f0+=0x1;while(_0x26e1f0<_0xba46a8[_0x1cc5b9(0x1b5)]){if(_0xba46a8[_0x26e1f0]==='\x5c'&&_0x26e1f0+0x1<_0xba46a8[_0x1cc5b9(0x1b5)]){_0x26e1f0+=0x2;continue;}if(_0xba46a8[_0x26e1f0]!==_0x17ca60){_0x26e1f0+=0x1;continue;}if(_0xba46a8[_0x26e1f0+0x1]===_0x17ca60){_0x26e1f0+=0x2;continue;}break;}if(_0x17ca60==='\x27')_0x5b6a83(_0x4eac0f,Math[_0x1cc5b9(0x1de)](_0x26e1f0+0x1,_0xba46a8[_0x1cc5b9(0x1b5)]));continue;}if(_0x574681==='-'&&_0x54f89c==='-'){const _0x1bde36=_0x26e1f0;while(_0x26e1f0<_0xba46a8['length']&&_0xba46a8[_0x26e1f0]!=='\x0a')_0x26e1f0+=0x1;_0x5b6a83(_0x1bde36,_0x26e1f0);continue;}if(_0x574681==='/'&&_0x54f89c==='*'){const _0x254f2a=_0x26e1f0;_0x26e1f0+=0x2;while(_0x26e1f0<_0xba46a8[_0x1cc5b9(0x1b5)]&&!(_0xba46a8[_0x26e1f0]==='*'&&_0xba46a8[_0x26e1f0+0x1]==='/')){_0x26e1f0+=0x1;}_0x26e1f0=Math[_0x1cc5b9(0x1de)](_0x26e1f0+0x1,_0xba46a8[_0x1cc5b9(0x1b5)]-0x1),_0x5b6a83(_0x254f2a,_0x26e1f0+0x1);continue;}if(_0x574681==='#'&&_0x54f89c!=='{'){const _0x20a04d=_0x26e1f0;while(_0x26e1f0<_0xba46a8[_0x1cc5b9(0x1b5)]&&_0xba46a8[_0x26e1f0]!=='\x0a')_0x26e1f0+=0x1;_0x5b6a83(_0x20a04d,_0x26e1f0);continue;}if((_0x574681==='#'||_0x574681==='$')&&_0x54f89c==='{'){const _0x4f3ffe=_0x26e1f0;_0x26e1f0+=0x2;while(_0x26e1f0<_0xba46a8[_0x1cc5b9(0x1b5)]&&_0xba46a8[_0x26e1f0]!=='}')_0x26e1f0+=0x1;_0x5b6a83(_0x4f3ffe,Math['min'](_0x26e1f0+0x1,_0xba46a8['length']));}}return _0xba46a8[_0x1cc5b9(0x1ec)]('');}function maskQuotedIdentifiers(_0x4c0851){const _0x4fdd1f=a289_0x1224,_0x3aea56=Array[_0x4fdd1f(0x1db)](_0x4c0851);for(let _0x2f657f=0x0;_0x2f657f<_0x3aea56['length'];_0x2f657f+=0x1){const _0x2f3947=_0x3aea56[_0x2f657f];if(_0x2f3947!=='\x22'&&_0x2f3947!=='`')continue;_0x2f657f+=0x1;while(_0x2f657f<_0x3aea56[_0x4fdd1f(0x1b5)]){if(_0x3aea56[_0x2f657f]===_0x2f3947){if(_0x3aea56[_0x2f657f+0x1]===_0x2f3947){_0x3aea56[_0x2f657f]='\x20',_0x3aea56[_0x2f657f+0x1]='\x20',_0x2f657f+=0x2;continue;}break;}_0x3aea56[_0x2f657f]='\x20',_0x2f657f+=0x1;}}return _0x3aea56[_0x4fdd1f(0x1ec)]('');}function a289_0x4019(){const _0x5e2b1d=['JOIN_PREDICATE_UNSUPPORTED','586332jaCxqG','right','map','65742FmvsYI','matchAll','natural','sort','Derived-table\x20JOIN\x20targets\x20are\x20not\x20supported.','columns','trim','where','replace','__sq__','alias','index','\x5c$&','\x5cs*\x5c.\x5cs*[\x5cw$]+','JOIN_INDEX_MISSING','unknown','table','from','INDEX_METADATA_UNAVAILABLE','test','min','(?:^|[^\x5cw$])','4037278HOznEc','push','MyBatis\x20<include>\x20fragments\x20cannot\x20be\x20expanded\x20for\x20JOIN\x20auditing.','30nwEcLg','replaceAll','OR-connected\x20JOIN\x20predicates\x20are\x20not\x20supported.','406576vZJRRy','No\x20reported\x20index\x20contains\x20the\x20JOIN\x20access\x20columns.','includes','matchedPrefix','endsWith','144gaupOo','join','full','metadataAvailable','245uvcOFh','tableName','some','max','Not\x20every\x20JOIN\x20target\x20predicate\x20could\x20be\x20audited\x20safely.','\x20JOIN\x20direction\x20is\x20not\x20supported\x20by\x20static\x20index\x20auditing.','has','filter','33828HFgbDT','exec','length','5604860WTdpQB','reduce','39838lrarFz','JOIN_INDEX_NOT_USABLE','warning','split','MyBatis\x20<include>\x20JOIN\x20fragments\x20cannot\x20be\x20expanded\x20statically.','add','toUpperCase','indexes','startsWith','covered','INNER','using','slice','inner'];a289_0x4019=function(){return _0x5e2b1d;};return a289_0x4019();}function maskNestedQueries(_0x2016e2){const _0x4c9e7c=a289_0x1224,_0x3f6af0=Array[_0x4c9e7c(0x1db)](_0x2016e2);for(let _0xfae532=0x0;_0xfae532<_0x3f6af0[_0x4c9e7c(0x1b5)];_0xfae532+=0x1){if(_0x3f6af0[_0xfae532]!=='(')continue;const _0x51e405=_0x2016e2['slice'](_0xfae532+0x1);if(!/^\s*(?:SELECT|WITH)\b/i[_0x4c9e7c(0x1dd)](_0x51e405))continue;let _0x28c30d=0x1,_0x2d8e7c=_0xfae532+0x1;for(;_0x2d8e7c<_0x3f6af0[_0x4c9e7c(0x1b5)]&&_0x28c30d>0x0;_0x2d8e7c+=0x1){if(_0x3f6af0[_0x2d8e7c]==='(')_0x28c30d+=0x1;if(_0x3f6af0[_0x2d8e7c]===')')_0x28c30d-=0x1;}if(_0x28c30d!==0x0)continue;for(let _0x40b25e=_0xfae532;_0x40b25e<_0x2d8e7c;_0x40b25e+=0x1){_0x3f6af0[_0x40b25e]='\x20';}const _0x3332a=_0x4c9e7c(0x1d3);for(let _0x91a75d=0x0;_0x91a75d<_0x3332a[_0x4c9e7c(0x1b5)]&&_0xfae532+_0x91a75d<_0x2d8e7c;_0x91a75d+=0x1){_0x3f6af0[_0xfae532+_0x91a75d]=_0x3332a[_0x91a75d];}_0xfae532=_0x2d8e7c-0x1;}return _0x3f6af0[_0x4c9e7c(0x1ec)]('');}function splitTopLevelAnd(_0x551dda){const _0x321ece=a289_0x1224,_0x329010=[];let _0x15ca71=0x0,_0x19fdcc=0x0;for(let _0x2da8ce=0x0;_0x2da8ce<_0x551dda[_0x321ece(0x1b5)];_0x2da8ce+=0x1){const _0x257df1=_0x551dda[_0x2da8ce];if(_0x257df1==='(')_0x15ca71+=0x1;if(_0x257df1===')')_0x15ca71=Math[_0x321ece(0x1ae)](0x0,_0x15ca71-0x1);_0x15ca71===0x0&&_0x551dda['slice'](_0x2da8ce)['match'](/^AND\b/i)&&(_0x2da8ce===0x0||/\s/[_0x321ece(0x1dd)](_0x551dda[_0x2da8ce-0x1]??''))&&(_0x329010[_0x321ece(0x1e1)](_0x551dda[_0x321ece(0x1c4)](_0x19fdcc,_0x2da8ce)[_0x321ece(0x1d0)]()),_0x2da8ce+=0x2,_0x19fdcc=_0x2da8ce+0x1);}const _0x2ef198=_0x551dda['slice'](_0x19fdcc)[_0x321ece(0x1d0)]();if(_0x2ef198)_0x329010[_0x321ece(0x1e1)](_0x2ef198);return _0x329010;}function hasTopLevelKeyword(_0x3e9749,_0x5b0ee8){const _0x6a51b9=a289_0x1224;let _0x241c9f=0x0;for(let _0x11cea9=0x0;_0x11cea9<_0x3e9749[_0x6a51b9(0x1b5)];_0x11cea9+=0x1){const _0x15a27b=_0x3e9749[_0x11cea9];if(_0x15a27b==='(')_0x241c9f+=0x1;if(_0x15a27b===')')_0x241c9f=Math['max'](0x0,_0x241c9f-0x1);if(_0x241c9f!==0x0)continue;const _0x1d554a=_0x3e9749[_0x6a51b9(0x1c4)](_0x11cea9,_0x11cea9+_0x5b0ee8[_0x6a51b9(0x1b5)]),_0x47ca4c=_0x3e9749[_0x11cea9-0x1]??'\x20',_0x3d797d=_0x3e9749[_0x11cea9+_0x5b0ee8[_0x6a51b9(0x1b5)]]??'\x20';if(_0x1d554a[_0x6a51b9(0x1be)]()===_0x5b0ee8[_0x6a51b9(0x1be)]()&&!/[\w$]/[_0x6a51b9(0x1dd)](_0x47ca4c)&&!/[\w$]/[_0x6a51b9(0x1dd)](_0x3d797d))return!![];}return![];}function splitEquality(_0x49436e){const _0x581ba5=a289_0x1224,_0x1b11a7=stripOuterParentheses(_0x49436e);let _0x4bcdd7=0x0,_0xab06a5;for(let _0x351863=0x0;_0x351863<_0x1b11a7['length'];_0x351863+=0x1){const _0x2922fb=_0x1b11a7[_0x351863];if(_0x2922fb==='(')_0x4bcdd7+=0x1;if(_0x2922fb===')')_0x4bcdd7=Math[_0x581ba5(0x1ae)](0x0,_0x4bcdd7-0x1);const _0x33f9de=_0x1b11a7[_0x351863-0x1]??'',_0x55b77f=_0x1b11a7[_0x351863+0x1]??'';if(_0x2922fb==='='&&_0x4bcdd7===0x0&&!/[!<>=:]/[_0x581ba5(0x1dd)](_0x33f9de)&&_0x55b77f!=='='){if(_0xab06a5!==undefined)return null;_0xab06a5=_0x351863;}}return _0xab06a5===undefined?null:[_0x1b11a7['slice'](0x0,_0xab06a5)[_0x581ba5(0x1d0)](),_0x1b11a7[_0x581ba5(0x1c4)](_0xab06a5+0x1)[_0x581ba5(0x1d0)]()];}function parseDirectColumnReference(_0x7f1fed,_0x18d5cf){const _0x34e957=a289_0x1224,_0x2337bd=/^([`"]?[\w$]+[`"]?)\s*\.\s*([`"]?[\w$]+[`"]?)$/[_0x34e957(0x1b4)](stripOuterParentheses(_0x7f1fed));if(!_0x2337bd)return null;if(normalizeIdentifier(_0x2337bd[0x1]??'')!==normalizeIdentifier(_0x18d5cf))return null;return normalizeIdentifier(_0x2337bd[0x2]??'');}function containsColumnReference(_0x3df61a,_0x3ce97e){const _0x55b60d=a289_0x1224,_0x1647c6=_0x3df61a[_0x55b60d(0x1d2)](/[`"]/g,''),_0x2f5308=_0x3ce97e[_0x55b60d(0x1d2)](/[.*+?^${}()|[\]\\]/g,_0x55b60d(0x1d6));return new RegExp(_0x55b60d(0x1df)+_0x2f5308+_0x55b60d(0x1d7),'i')['test'](_0x1647c6);}function findEqualityPrefix(_0xb32f61,_0x5116a4){const _0x3e12be=a289_0x1224,_0x34cee1=new Set(_0x5116a4[_0x3e12be(0x1c9)](normalizeIdentifier)),_0x35a1f2=[];for(const _0x34e878 of _0xb32f61){if(!_0x34cee1[_0x3e12be(0x1b1)](normalizeIdentifier(_0x34e878)))break;_0x35a1f2[_0x3e12be(0x1e1)](_0x34e878);}return _0x35a1f2;}function resolveTableMetadata(_0x5c28b2,_0x14170c){const _0x320053=a289_0x1224,_0x4f8000=normalizeIdentifier(_0x14170c),_0x37d764=_0x5c28b2['filter'](_0x236b0a=>normalizeIdentifier(_0x236b0a[_0x320053(0x1f0)])===_0x4f8000);if(_0x37d764['length']===0x1)return _0x37d764[0x0];const _0x35af31=_0x4f8000[_0x320053(0x1e8)]('.'),_0x317d13=_0x4f8000[_0x320053(0x1bb)]('.')['at'](-0x1),_0x4fa522=_0x5c28b2[_0x320053(0x1b2)](_0xda687d=>{const _0x15bf25=_0x320053,_0xc20828=normalizeIdentifier(_0xda687d[_0x15bf25(0x1f0)]);if(_0x35af31&&_0xc20828[_0x15bf25(0x1e8)]('.'))return![];return _0xc20828[_0x15bf25(0x1bb)]('.')['at'](-0x1)===_0x317d13;});return _0x4fa522[_0x320053(0x1b5)]===0x1?_0x4fa522[0x0]:undefined;}function columnNamesMatch(_0xd91390,_0x5a8a52){return normalizeIdentifier(_0xd91390)===normalizeIdentifier(_0x5a8a52);}function normalizeIdentifier(_0x5eaa9a){const _0x329742=a289_0x1224;return _0x5eaa9a[_0x329742(0x1d2)](/[`"]/g,'')['trim']()['toLowerCase']();}function isSqlClauseKeyword(_0x5e701a){const _0x15d035=a289_0x1224;return new Set(['on',_0x15d035(0x1c3),_0x15d035(0x1d1),_0x15d035(0x1ec),_0x15d035(0x1c5),'left',_0x15d035(0x1c8),'full','cross',_0x15d035(0x1cc)])[_0x15d035(0x1b1)](_0x5e701a);}function stripOuterParentheses(_0x47b4de){const _0x4ad0e8=a289_0x1224;let _0xc4c7c7=_0x47b4de[_0x4ad0e8(0x1d0)]();while(_0xc4c7c7[_0x4ad0e8(0x1c0)]('(')&&_0xc4c7c7[_0x4ad0e8(0x1ea)](')')){let _0x4f4caa=0x0,_0x22f95d=!![];for(let _0x28a57f=0x0;_0x28a57f<_0xc4c7c7[_0x4ad0e8(0x1b5)];_0x28a57f+=0x1){if(_0xc4c7c7[_0x28a57f]==='(')_0x4f4caa+=0x1;if(_0xc4c7c7[_0x28a57f]===')')_0x4f4caa-=0x1;if(_0x4f4caa===0x0&&_0x28a57f<_0xc4c7c7[_0x4ad0e8(0x1b5)]-0x1){_0x22f95d=![];break;}}if(!_0x22f95d||_0x4f4caa!==0x0)break;_0xc4c7c7=_0xc4c7c7[_0x4ad0e8(0x1c4)](0x1,-0x1)[_0x4ad0e8(0x1d0)]();}return _0xc4c7c7;}
@@ -1 +1 @@
1
- const a290_0x2c4ce1=a290_0x43c2;function a290_0x43c2(_0xf03ad4,_0x1bf828){_0xf03ad4=_0xf03ad4-0x1cd;const _0x4f980c=a290_0x4f98();let _0x43c267=_0x4f980c[_0xf03ad4];return _0x43c267;}function a290_0x4f98(){const _0x55674c=['1384112ZmyPIW','/sql','82494ePhyry','10jFeXpq','sql.lock.json','332705XnaDYc','1678901cqVTXt','.rabetbase','2rmEdHd','1090884BLXkOR','sql','390NOkwZq','8iinfEj','475377WaDmEc','55WzilMw','551238MJbVsb'];a290_0x4f98=function(){return _0x55674c;};return a290_0x4f98();}(function(_0x4478cf,_0xe95ffa){const _0x5d5052=a290_0x43c2,_0x58e69e=_0x4478cf();while(!![]){try{const _0xa8b009=parseInt(_0x5d5052(0x1d6))/0x1*(-parseInt(_0x5d5052(0x1d9))/0x2)+-parseInt(_0x5d5052(0x1ce))/0x3+parseInt(_0x5d5052(0x1d1))/0x4+parseInt(_0x5d5052(0x1d4))/0x5*(parseInt(_0x5d5052(0x1d0))/0x6)+parseInt(_0x5d5052(0x1d7))/0x7*(parseInt(_0x5d5052(0x1cd))/0x8)+-parseInt(_0x5d5052(0x1d3))/0x9*(-parseInt(_0x5d5052(0x1dc))/0xa)+parseInt(_0x5d5052(0x1cf))/0xb*(-parseInt(_0x5d5052(0x1da))/0xc);if(_0xa8b009===_0xe95ffa)break;else _0x58e69e['push'](_0x58e69e['shift']());}catch(_0x3aaf28){_0x58e69e['push'](_0x58e69e['shift']());}}}(a290_0x4f98,0x2c490));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a290_0x2c4ce1(0x1d8),LOCK_FILE_NAME=a290_0x2c4ce1(0x1d5),TRASH_DIR_NAME='sql-trash';export function loadSqlProjectConfig(_0x24d338,_0x105c79){const _0x58e239=a290_0x2c4ce1,_0x5209ba=resolve(_0x105c79??findProjectRootDirectory()),_0x1750f8=DOT_DIR+_0x58e239(0x1d2),_0x26b8d1=_0x1750f8+'/'+_0x24d338;return{'projectRoot':_0x5209ba,'appCode':_0x24d338,'sqlWorkspaceRoot':_0x1750f8,'sqlRoot':_0x26b8d1,'sqlRootDir':resolve(_0x5209ba,DOT_DIR,_0x58e239(0x1db),_0x24d338),'lockFilePath':resolve(_0x5209ba,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x5209ba,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a290_0x26903c=a290_0x26aa;(function(_0x2500ae,_0x2aa926){const _0x451fa1=a290_0x26aa,_0x15f09b=_0x2500ae();while(!![]){try{const _0x3093fb=parseInt(_0x451fa1(0x1b0))/0x1*(parseInt(_0x451fa1(0x1b8))/0x2)+parseInt(_0x451fa1(0x1ae))/0x3*(-parseInt(_0x451fa1(0x1b7))/0x4)+parseInt(_0x451fa1(0x1b1))/0x5*(parseInt(_0x451fa1(0x1af))/0x6)+-parseInt(_0x451fa1(0x1ad))/0x7*(-parseInt(_0x451fa1(0x1b9))/0x8)+-parseInt(_0x451fa1(0x1b4))/0x9*(-parseInt(_0x451fa1(0x1b5))/0xa)+parseInt(_0x451fa1(0x1b2))/0xb+-parseInt(_0x451fa1(0x1ac))/0xc;if(_0x3093fb===_0x2aa926)break;else _0x15f09b['push'](_0x15f09b['shift']());}catch(_0x4cb017){_0x15f09b['push'](_0x15f09b['shift']());}}}(a290_0x267e,0xa6713));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME=a290_0x26903c(0x1b6),TRASH_DIR_NAME='sql-trash';function a290_0x26aa(_0x421880,_0x3c28b3){_0x421880=_0x421880-0x1ac;const _0x267ec4=a290_0x267e();let _0x26aa23=_0x267ec4[_0x421880];return _0x26aa23;}function a290_0x267e(){const _0x2f05b8=['sql.lock.json','6516mlhLRf','6wSaKEz','21136XSlEnJ','21973104WLBFHa','3577PFiWrc','2109QqDcDr','155646HTKgOs','86725mKpIqS','25VJyINm','6539687YPXOHf','sql','81rmcggi','1470630utgBpb'];a290_0x267e=function(){return _0x2f05b8;};return a290_0x267e();}export function loadSqlProjectConfig(_0x34a91b,_0x1328fe){const _0x579cb7=a290_0x26903c,_0x41b32b=resolve(_0x1328fe??findProjectRootDirectory()),_0x1ce9ee=DOT_DIR+'/sql',_0x1eae08=_0x1ce9ee+'/'+_0x34a91b;return{'projectRoot':_0x41b32b,'appCode':_0x34a91b,'sqlWorkspaceRoot':_0x1ce9ee,'sqlRoot':_0x1eae08,'sqlRootDir':resolve(_0x41b32b,DOT_DIR,_0x579cb7(0x1b3),_0x34a91b),'lockFilePath':resolve(_0x41b32b,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x41b32b,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- function a291_0x2741(){const _0x3391be=['replace','339163MhCPQO','308872lEpdxf','name','sqlCode','mode','sqlName','test','.xml','142808GMCHXK','push','filter','6671380ZRlkXj','slice','4SrlSGz','split','length','3356751pXhdwA','sql','7ldurra','348PliXBV','16KqtyeL','297HaOZpX','indexOf','sqlRootDir','9810546ozTKww','mybatisXml','.sql','4023865bsOnur'];a291_0x2741=function(){return _0x3391be;};return a291_0x2741();}(function(_0x196d04,_0x5d6c44){const _0x4734c0=a291_0x48e1,_0x2731bc=_0x196d04();while(!![]){try{const _0x430bed=-parseInt(_0x4734c0(0x1fc))/0x1*(-parseInt(_0x4734c0(0x1eb))/0x2)+-parseInt(_0x4734c0(0x1e7))/0x3+-parseInt(_0x4734c0(0x1e4))/0x4*(-parseInt(_0x4734c0(0x1f2))/0x5)+-parseInt(_0x4734c0(0x1ef))/0x6*(-parseInt(_0x4734c0(0x1e9))/0x7)+-parseInt(_0x4734c0(0x1f5))/0x8*(parseInt(_0x4734c0(0x1ec))/0x9)+parseInt(_0x4734c0(0x1ff))/0xa+-parseInt(_0x4734c0(0x1f4))/0xb*(parseInt(_0x4734c0(0x1ea))/0xc);if(_0x430bed===_0x5d6c44)break;else _0x2731bc['push'](_0x2731bc['shift']());}catch(_0x33787e){_0x2731bc['push'](_0x2731bc['shift']());}}}(a291_0x2741,0xeaef7));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x394cee){const _0x3d87af=a291_0x48e1;if(_0x394cee===_0x3d87af(0x1f1))return _0x3d87af(0x1e8);if(_0x394cee===_0x3d87af(0x1fb))return _0x3d87af(0x1f0);return undefined;}async function scanSqlFilesRecursively(_0x7005fd,_0x32ff64){const _0x2a47a9=a291_0x48e1,_0x4ac68d=[];try{const _0xc8acc3=await readdir(_0x7005fd,{'withFileTypes':!![]});for(const _0x877bc4 of _0xc8acc3){const _0x4f98c1=join(_0x7005fd,_0x877bc4['name']);if(_0x877bc4['isDirectory']()){_0x4ac68d[_0x2a47a9(0x1fd)](...await scanSqlFilesRecursively(_0x4f98c1,_0x32ff64));continue;}if(!_0x877bc4['isFile']())continue;const _0x4b59ae=extname(_0x877bc4[_0x2a47a9(0x1f6)])['toLowerCase'](),_0x16d365=extensionToMode(_0x4b59ae);if(!_0x16d365)continue;const _0x103eff=relative(_0x32ff64,_0x4f98c1)[_0x2a47a9(0x1f3)](/\\/g,'/'),_0x5a14ea=_0x103eff[_0x2a47a9(0x1e5)]('/')[_0x2a47a9(0x1fe)](Boolean),_0x205d1f=parseSqlPath(_0x5a14ea,_0x877bc4[_0x2a47a9(0x1f6)],_0x4b59ae);if(!_0x205d1f)continue;_0x4ac68d['push']({'sqlCode':_0x205d1f[_0x2a47a9(0x1f7)],'sqlName':_0x205d1f['sqlName'],'dbDirectory':_0x5a14ea[0x0],'filePath':_0x4f98c1,'relativePath':_0x103eff,'lockKey':_0x205d1f[_0x2a47a9(0x1f7)],'mode':_0x16d365});}}catch(_0x3b0697){if(_0x3b0697['code']!=='ENOENT')throw _0x3b0697;}return _0x4ac68d;}export async function scanLocalSqlQueries(_0x20138d){const _0x1e08a6=a291_0x48e1;return scanSqlFilesRecursively(_0x20138d['sqlRootDir'],_0x20138d[_0x1e08a6(0x1ee)]);}function a291_0x48e1(_0x26adae,_0x190833){_0x26adae=_0x26adae-0x1e4;const _0x27413a=a291_0x2741();let _0x48e10e=_0x27413a[_0x26adae];return _0x48e10e;}export function resolveLocalSqlFilePath(_0x40635e,_0x1e16df,_0x95f609){const _0x4d3a8f=a291_0x48e1,_0x2ca46a=_0x95f609?.['path']||(_0x95f609?.[_0x4d3a8f(0x1f9)]||_0x95f609?.['dbName']?buildSqlRelativePath(_0x1e16df,_0x95f609?.[_0x4d3a8f(0x1f9)],_0x95f609?.['dbName'],_0x95f609?.[_0x4d3a8f(0x1f8)]||_0x4d3a8f(0x1e8),_0x95f609?.['dbId']):buildDefaultSqlFileName(_0x1e16df,_0x95f609?.[_0x4d3a8f(0x1f8)]||_0x4d3a8f(0x1e8)));return join(_0x40635e[_0x4d3a8f(0x1ee)],_0x2ca46a);}export async function directoryExists(_0x3dbe89){try{const _0xe14559=await stat(_0x3dbe89);return _0xe14559['isDirectory']();}catch{return![];}}function parseSqlPath(_0x552af3,_0x25109e,_0x419455){const _0x2308ea=a291_0x48e1,_0x2f7f96=_0x25109e['slice'](0x0,-_0x419455[_0x2308ea(0x1e6)]);if(_0x552af3[_0x2308ea(0x1e6)]<0x2)return null;const _0x3979d1=_0x2f7f96[_0x2308ea(0x1ed)]('_');if(_0x3979d1<=0x0||_0x3979d1>=_0x2f7f96[_0x2308ea(0x1e6)]-0x1)return null;const _0x525d4f=_0x2f7f96[_0x2308ea(0x200)](0x0,_0x3979d1);if(!isLikelySqlCode(_0x525d4f))return null;return{'sqlCode':_0x525d4f,'sqlName':_0x2f7f96['slice'](_0x3979d1+0x1)};}function isLikelySqlCode(_0x37df6c){const _0x2e2187=a291_0x48e1;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x2e2187(0x1fa)](_0x37df6c);}
1
+ function a291_0x4379(){const _0x4dbf15=['dbName','filter','sqlRootDir','length','8wuBkiy','sql','path','isFile','isDirectory','split','sqlCode','ENOENT','dbId','101819aAXcgr','code','toLowerCase','sqlName','1470kFWgyZ','310TvgoII','309884RZiAXf','.xml','name','slice','mybatisXml','push','.sql','1075708lkPzxd','2743974DffzSU','263976MOBAYM','76034TPjuas','replace'];a291_0x4379=function(){return _0x4dbf15;};return a291_0x4379();}(function(_0x5cd627,_0x624fdc){const _0x3e374a=a291_0x5d87,_0x56e535=_0x5cd627();while(!![]){try{const _0x56cc6c=-parseInt(_0x3e374a(0x18a))/0x1+parseInt(_0x3e374a(0x190))/0x2+parseInt(_0x3e374a(0x17a))/0x3+-parseInt(_0x3e374a(0x197))/0x4+-parseInt(_0x3e374a(0x18f))/0x5*(parseInt(_0x3e374a(0x18e))/0x6)+-parseInt(_0x3e374a(0x17b))/0x7*(parseInt(_0x3e374a(0x181))/0x8)+parseInt(_0x3e374a(0x198))/0x9;if(_0x56cc6c===_0x624fdc)break;else _0x56e535['push'](_0x56e535['shift']());}catch(_0x2f2e3f){_0x56e535['push'](_0x56e535['shift']());}}}(a291_0x4379,0x24dee));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x165be5){const _0x5e4b39=a291_0x5d87;if(_0x165be5===_0x5e4b39(0x196))return _0x5e4b39(0x182);if(_0x165be5===_0x5e4b39(0x191))return _0x5e4b39(0x194);return undefined;}async function scanSqlFilesRecursively(_0x124f25,_0x5053be){const _0x2174d7=a291_0x5d87,_0x509b4e=[];try{const _0x58591e=await readdir(_0x124f25,{'withFileTypes':!![]});for(const _0x430465 of _0x58591e){const _0x25b8c9=join(_0x124f25,_0x430465[_0x2174d7(0x192)]);if(_0x430465[_0x2174d7(0x185)]()){_0x509b4e[_0x2174d7(0x195)](...await scanSqlFilesRecursively(_0x25b8c9,_0x5053be));continue;}if(!_0x430465[_0x2174d7(0x184)]())continue;const _0x2b8d4e=extname(_0x430465['name'])[_0x2174d7(0x18c)](),_0x569510=extensionToMode(_0x2b8d4e);if(!_0x569510)continue;const _0x369a4a=relative(_0x5053be,_0x25b8c9)[_0x2174d7(0x17c)](/\\/g,'/'),_0x2440dd=_0x369a4a[_0x2174d7(0x186)]('/')[_0x2174d7(0x17e)](Boolean),_0x28560c=parseSqlPath(_0x2440dd,_0x430465[_0x2174d7(0x192)],_0x2b8d4e);if(!_0x28560c)continue;_0x509b4e[_0x2174d7(0x195)]({'sqlCode':_0x28560c[_0x2174d7(0x187)],'sqlName':_0x28560c[_0x2174d7(0x18d)],'dbDirectory':_0x2440dd[0x0],'filePath':_0x25b8c9,'relativePath':_0x369a4a,'lockKey':_0x28560c['sqlCode'],'mode':_0x569510});}}catch(_0x2badd8){if(_0x2badd8[_0x2174d7(0x18b)]!==_0x2174d7(0x188))throw _0x2badd8;}return _0x509b4e;}function a291_0x5d87(_0x58b745,_0x25e330){_0x58b745=_0x58b745-0x17a;const _0x437906=a291_0x4379();let _0x5d8725=_0x437906[_0x58b745];return _0x5d8725;}export async function scanLocalSqlQueries(_0x202f3f){const _0x3cdc33=a291_0x5d87;return scanSqlFilesRecursively(_0x202f3f[_0x3cdc33(0x17f)],_0x202f3f[_0x3cdc33(0x17f)]);}export function resolveLocalSqlFilePath(_0x5b0e36,_0x273230,_0x2a81d4){const _0x2bb249=a291_0x5d87,_0x50a695=_0x2a81d4?.[_0x2bb249(0x183)]||(_0x2a81d4?.['sqlName']||_0x2a81d4?.[_0x2bb249(0x17d)]?buildSqlRelativePath(_0x273230,_0x2a81d4?.[_0x2bb249(0x18d)],_0x2a81d4?.[_0x2bb249(0x17d)],_0x2a81d4?.['mode']||_0x2bb249(0x182),_0x2a81d4?.[_0x2bb249(0x189)]):buildDefaultSqlFileName(_0x273230,_0x2a81d4?.['mode']||_0x2bb249(0x182)));return join(_0x5b0e36['sqlRootDir'],_0x50a695);}export async function directoryExists(_0x46789e){const _0xb2a149=a291_0x5d87;try{const _0x5ac072=await stat(_0x46789e);return _0x5ac072[_0xb2a149(0x185)]();}catch{return![];}}function parseSqlPath(_0xfa348c,_0x1e8429,_0x4b2393){const _0x234189=a291_0x5d87,_0x5a8deb=_0x1e8429[_0x234189(0x193)](0x0,-_0x4b2393[_0x234189(0x180)]);if(_0xfa348c['length']<0x2)return null;const _0x27e1e8=_0x5a8deb['indexOf']('_');if(_0x27e1e8<=0x0||_0x27e1e8>=_0x5a8deb[_0x234189(0x180)]-0x1)return null;const _0x568cf3=_0x5a8deb[_0x234189(0x193)](0x0,_0x27e1e8);if(!isLikelySqlCode(_0x568cf3))return null;return{'sqlCode':_0x568cf3,'sqlName':_0x5a8deb[_0x234189(0x193)](_0x27e1e8+0x1)};}function isLikelySqlCode(_0x14bd0e){return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/['test'](_0x14bd0e);}
@@ -1 +1 @@
1
- (function(_0x4e9619,_0x4f499c){const _0x31d767=a292_0x3acb,_0x1ed55f=_0x4e9619();while(!![]){try{const _0x3c140e=parseInt(_0x31d767(0xcf))/0x1*(-parseInt(_0x31d767(0xcb))/0x2)+-parseInt(_0x31d767(0xd7))/0x3*(-parseInt(_0x31d767(0xca))/0x4)+-parseInt(_0x31d767(0xd3))/0x5+-parseInt(_0x31d767(0xd4))/0x6*(parseInt(_0x31d767(0xd1))/0x7)+parseInt(_0x31d767(0xd2))/0x8*(parseInt(_0x31d767(0xc9))/0x9)+parseInt(_0x31d767(0xd0))/0xa*(parseInt(_0x31d767(0xd6))/0xb)+-parseInt(_0x31d767(0xcc))/0xc*(-parseInt(_0x31d767(0xd5))/0xd);if(_0x3c140e===_0x4f499c)break;else _0x1ed55f['push'](_0x1ed55f['shift']());}catch(_0x29d87e){_0x1ed55f['push'](_0x1ed55f['shift']());}}}(a292_0x2f03,0xd99ab));import{readFile}from'node:fs/promises';import a292_0x297d5f from'node:crypto';function a292_0x3acb(_0x413ce5,_0x528250){_0x413ce5=_0x413ce5-0xc9;const _0x2f03c2=a292_0x2f03();let _0x3acba0=_0x2f03c2[_0x413ce5];return _0x3acba0;}function a292_0x2f03(){const _0x5bb5c8=['update','hex','3WuhVbr','2510PUJtlU','21CldWiH','2337872QDfXuF','5650590kyJGtY','415722otEHoc','5660733cIcfWG','6831qEIxkE','3qEZiyJ','md5','54uRuncF','713068byJLBv','195798FRjLGU','12DHrcif'];a292_0x2f03=function(){return _0x5bb5c8;};return a292_0x2f03();}export function computeSqlContentHash(_0x5529e9){const _0x5f3eb4=a292_0x3acb;return a292_0x297d5f['createHash'](_0x5f3eb4(0xd8))[_0x5f3eb4(0xcd)](_0x5529e9)['digest'](_0x5f3eb4(0xce));}export async function computeSqlFileHash(_0x560d28){const _0x12d9b1=await readFile(_0x560d28,'utf8');return computeSqlContentHash(_0x12d9b1);}
1
+ (function(_0x274d3d,_0x22ce4a){const _0x2f3f2b=a292_0x4e9a,_0xb4c52b=_0x274d3d();while(!![]){try{const _0x30e10e=-parseInt(_0x2f3f2b(0x1c5))/0x1*(-parseInt(_0x2f3f2b(0x1cd))/0x2)+parseInt(_0x2f3f2b(0x1cf))/0x3+parseInt(_0x2f3f2b(0x1c3))/0x4+-parseInt(_0x2f3f2b(0x1cc))/0x5*(-parseInt(_0x2f3f2b(0x1ca))/0x6)+-parseInt(_0x2f3f2b(0x1c9))/0x7*(-parseInt(_0x2f3f2b(0x1d0))/0x8)+-parseInt(_0x2f3f2b(0x1c8))/0x9*(parseInt(_0x2f3f2b(0x1c6))/0xa)+-parseInt(_0x2f3f2b(0x1d2))/0xb*(parseInt(_0x2f3f2b(0x1d1))/0xc);if(_0x30e10e===_0x22ce4a)break;else _0xb4c52b['push'](_0xb4c52b['shift']());}catch(_0x4fb1f6){_0xb4c52b['push'](_0xb4c52b['shift']());}}}(a292_0x3c94,0x4d7cc));function a292_0x3c94(){const _0x506a9c=['2916640pattCj','md5','9rPiZXh','1407uMtKtq','6MXgrjr','utf8','2742665hwVpUF','2pdJLAw','update','428160jZlACc','16664qicKgj','36oTOhQF','3407866TavQmv','42124RkHAou','digest','418003areonH'];a292_0x3c94=function(){return _0x506a9c;};return a292_0x3c94();}function a292_0x4e9a(_0x33842c,_0x269623){_0x33842c=_0x33842c-0x1c3;const _0x3c94e3=a292_0x3c94();let _0x4e9ac8=_0x3c94e3[_0x33842c];return _0x4e9ac8;}import{readFile}from'node:fs/promises';import a292_0x4bf968 from'node:crypto';export function computeSqlContentHash(_0x259ae9){const _0x10ef10=a292_0x4e9a;return a292_0x4bf968['createHash'](_0x10ef10(0x1c7))[_0x10ef10(0x1ce)](_0x259ae9)[_0x10ef10(0x1c4)]('hex');}export async function computeSqlFileHash(_0x56383a){const _0x1a5be1=a292_0x4e9a,_0x7fafe2=await readFile(_0x56383a,_0x1a5be1(0x1cb));return computeSqlContentHash(_0x7fafe2);}
@@ -1 +1 @@
1
- (function(_0xa252b0,_0x34de8a){const _0x38511c=a293_0x33ff,_0x8b8b86=_0xa252b0();while(!![]){try{const _0x5759a9=-parseInt(_0x38511c(0xb0))/0x1+parseInt(_0x38511c(0xa4))/0x2*(-parseInt(_0x38511c(0xa7))/0x3)+parseInt(_0x38511c(0xb9))/0x4*(parseInt(_0x38511c(0xa5))/0x5)+-parseInt(_0x38511c(0xb6))/0x6*(parseInt(_0x38511c(0xb2))/0x7)+parseInt(_0x38511c(0xb8))/0x8*(parseInt(_0x38511c(0xaa))/0x9)+-parseInt(_0x38511c(0xa8))/0xa+parseInt(_0x38511c(0xaf))/0xb;if(_0x5759a9===_0x34de8a)break;else _0x8b8b86['push'](_0x8b8b86['shift']());}catch(_0x5d41c9){_0x8b8b86['push'](_0x8b8b86['shift']());}}}(a293_0x4017,0x24ed5));import{mkdir,readFile,writeFile}from'node:fs/promises';function a293_0x33ff(_0x52a570,_0x1f4226){_0x52a570=_0x52a570-0xa3;const _0x401788=a293_0x4017();let _0x33ff04=_0x401788[_0x52a570];return _0x33ff04;}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x48d51e,_0x16c0bc,_0x4369a7,_0x10cc42){const _0x38c386=a293_0x33ff,_0x4f7c34=_0x48d51e??createEmptySqlLock();let _0x1fcc33=_0x4f7c34[_0x38c386(0xb5)][_0x16c0bc];if(!_0x1fcc33)return _0x1fcc33={'sqlRoot':_0x4369a7,'lastSync':'','sqls':{}},_0x4f7c34['apps'][_0x16c0bc]=_0x1fcc33,{'lockData':_0x4f7c34,'appLock':_0x1fcc33};if(!_0x1fcc33['sqlRoot'])_0x1fcc33['sqlRoot']=_0x4369a7;else{if(_0x1fcc33[_0x38c386(0xb7)]!==_0x4369a7)throw new Error(_0x10cc42+_0x38c386(0xad)+_0x4369a7+_0x38c386(0xae)+_0x1fcc33['sqlRoot']+'\x22.\x20'+_0x38c386(0xa9));}return!_0x1fcc33['sqls']&&(_0x1fcc33[_0x38c386(0xa6)]={}),!_0x1fcc33[_0x38c386(0xb3)]&&(_0x1fcc33[_0x38c386(0xb3)]=''),{'lockData':_0x4f7c34,'appLock':_0x1fcc33};}export async function readSqlLockFile(_0x5d43b0){const _0x1dda2e=a293_0x33ff;try{const _0x576632=await readFile(_0x5d43b0,_0x1dda2e(0xac));return JSON[_0x1dda2e(0xa3)](_0x576632);}catch(_0x3a4b01){if(_0x3a4b01[_0x1dda2e(0xab)]==='ENOENT')return null;throw new Error(_0x1dda2e(0xb4)+String(_0x3a4b01));}}function a293_0x4017(){const _0x155b5f=[':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','\x22\x20vs\x20lock\x20\x22','8046577CNUOnB','21914CiktNz','stringify','2023441BrxpkB','lastSync','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','apps','6rhaJDN','sqlRoot','5192hxtifk','727700EIsvEm','parse','286ovNCCO','5KxybjR','sqls','5361ZBpRsV','2664020aRsbQH','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','981RfNhZY','code','utf8'];a293_0x4017=function(){return _0x155b5f;};return a293_0x4017();}export async function writeSqlLockFile(_0xc480e9,_0x4eba5b){const _0x1cf5f5=a293_0x33ff;await mkdir(dirname(_0xc480e9),{'recursive':!![]}),await writeFile(_0xc480e9,JSON[_0x1cf5f5(0xb1)](_0x4eba5b,null,0x2),_0x1cf5f5(0xac));}
1
+ (function(_0x51c686,_0x5b02da){const _0x4d5ea2=a293_0x2322,_0x231ac2=_0x51c686();while(!![]){try{const _0xfdab0d=parseInt(_0x4d5ea2(0xcf))/0x1*(-parseInt(_0x4d5ea2(0xc0))/0x2)+parseInt(_0x4d5ea2(0xbd))/0x3*(-parseInt(_0x4d5ea2(0xbb))/0x4)+-parseInt(_0x4d5ea2(0xbf))/0x5*(parseInt(_0x4d5ea2(0xc3))/0x6)+parseInt(_0x4d5ea2(0xcd))/0x7*(-parseInt(_0x4d5ea2(0xc8))/0x8)+-parseInt(_0x4d5ea2(0xc4))/0x9+parseInt(_0x4d5ea2(0xb8))/0xa+parseInt(_0x4d5ea2(0xba))/0xb*(parseInt(_0x4d5ea2(0xcc))/0xc);if(_0xfdab0d===_0x5b02da)break;else _0x231ac2['push'](_0x231ac2['shift']());}catch(_0x4cc50a){_0x231ac2['push'](_0x231ac2['shift']());}}}(a293_0x361a,0x66696));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a293_0x361a(){const _0x1495a4=['95xLmRaY','218XXmOPS','lastSync','parse','90150nyJdPB','4632192zgyxaW','sqls','\x22.\x20','sqlRoot','4464632kVykiY','\x22\x20vs\x20lock\x20\x22','utf8','ENOENT','84wQIqBb','7ALkINh','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','2591yfKYHO','2222140cExpcI',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','3177262sBvnhV','245292AoqSHT','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','9sCZZlx','code'];a293_0x361a=function(){return _0x1495a4;};return a293_0x361a();}function a293_0x2322(_0x7d330f,_0x4d5dc5){_0x7d330f=_0x7d330f-0xb8;const _0x361ab7=a293_0x361a();let _0x23221f=_0x361ab7[_0x7d330f];return _0x23221f;}export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0xaec1e4,_0x47e7e4,_0x8da577,_0x13d137){const _0x5f1edd=a293_0x2322,_0x2a7853=_0xaec1e4??createEmptySqlLock();let _0x3ad59b=_0x2a7853['apps'][_0x47e7e4];if(!_0x3ad59b)return _0x3ad59b={'sqlRoot':_0x8da577,'lastSync':'','sqls':{}},_0x2a7853['apps'][_0x47e7e4]=_0x3ad59b,{'lockData':_0x2a7853,'appLock':_0x3ad59b};if(!_0x3ad59b[_0x5f1edd(0xc7)])_0x3ad59b[_0x5f1edd(0xc7)]=_0x8da577;else{if(_0x3ad59b[_0x5f1edd(0xc7)]!==_0x8da577)throw new Error(_0x13d137+_0x5f1edd(0xb9)+_0x8da577+_0x5f1edd(0xc9)+_0x3ad59b[_0x5f1edd(0xc7)]+_0x5f1edd(0xc6)+_0x5f1edd(0xbc));}return!_0x3ad59b[_0x5f1edd(0xc5)]&&(_0x3ad59b[_0x5f1edd(0xc5)]={}),!_0x3ad59b['lastSync']&&(_0x3ad59b[_0x5f1edd(0xc1)]=''),{'lockData':_0x2a7853,'appLock':_0x3ad59b};}export async function readSqlLockFile(_0x2f6a79){const _0x199ca3=a293_0x2322;try{const _0x6130ef=await readFile(_0x2f6a79,_0x199ca3(0xca));return JSON[_0x199ca3(0xc2)](_0x6130ef);}catch(_0x3a413b){if(_0x3a413b[_0x199ca3(0xbe)]===_0x199ca3(0xcb))return null;throw new Error(_0x199ca3(0xce)+String(_0x3a413b));}}export async function writeSqlLockFile(_0x14f1e9,_0x36e86e){const _0x2439c8=a293_0x2322;await mkdir(dirname(_0x14f1e9),{'recursive':!![]}),await writeFile(_0x14f1e9,JSON['stringify'](_0x36e86e,null,0x2),_0x2439c8(0xca));}
@@ -1 +1 @@
1
- function a295_0x1ef0(_0x4efb85,_0x4a2aca){_0x4efb85=_0x4efb85-0x11f;const _0x4bcfb0=a295_0x4bcf();let _0x1ef0d6=_0x4bcfb0[_0x4efb85];return _0x1ef0d6;}(function(_0x514249,_0x1f3b66){const _0x481c33=a295_0x1ef0,_0x4f215d=_0x514249();while(!![]){try{const _0x3f78e1=parseInt(_0x481c33(0x121))/0x1+-parseInt(_0x481c33(0x124))/0x2*(-parseInt(_0x481c33(0x131))/0x3)+parseInt(_0x481c33(0x12f))/0x4*(-parseInt(_0x481c33(0x128))/0x5)+-parseInt(_0x481c33(0x125))/0x6+parseInt(_0x481c33(0x12b))/0x7*(-parseInt(_0x481c33(0x122))/0x8)+-parseInt(_0x481c33(0x12a))/0x9*(parseInt(_0x481c33(0x129))/0xa)+parseInt(_0x481c33(0x12e))/0xb*(parseInt(_0x481c33(0x130))/0xc);if(_0x3f78e1===_0x1f3b66)break;else _0x4f215d['push'](_0x4f215d['shift']());}catch(_0x315896){_0x4f215d['push'](_0x4f215d['shift']());}}}(a295_0x4bcf,0xcc725));function a295_0x4bcf(){const _0x483628=['3GuwrGE','test','replace','mybatisXml','58664wqmWXn','333208oSFPho','.sql','2503874DbnJop','1318290hSlnTQ','trim','trimStart','2351735GKEywz','10ulZyrD','4437468qPBIyd','224BCyTkq','.xml','sql','473XsLJvf','4uSqech','570072qmAAAV'];a295_0x4bcf=function(){return _0x483628;};return a295_0x4bcf();}export function detectSqlMode(_0xf32be2){const _0x1d1a3f=a295_0x1ef0,_0x693d9c=_0xf32be2[_0x1d1a3f(0x127)]();if(/^<(select|insert|update|delete)\b/i[_0x1d1a3f(0x132)](_0x693d9c))return _0x1d1a3f(0x120);return _0x1d1a3f(0x12d);}export function getSqlFileExtension(_0x4c3411){const _0x575334=a295_0x1ef0;return _0x4c3411===_0x575334(0x120)?_0x575334(0x12c):_0x575334(0x123);}export function buildDefaultSqlFileName(_0x817611,_0x2870c4){return''+_0x817611+getSqlFileExtension(_0x2870c4);}export function sanitizeSqlPathSegment(_0x3a629f,_0x26a0c6){const _0x2a2f7b=a295_0x1ef0,_0x4efdf5=String(_0x3a629f??'')[_0x2a2f7b(0x126)](),_0x43218a=_0x4efdf5[_0x2a2f7b(0x11f)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2a2f7b(0x11f)](/\s+/g,'-')[_0x2a2f7b(0x11f)](/-+/g,'-')['replace'](/^\.+/,'')[_0x2a2f7b(0x11f)](/\.+$/,'')[_0x2a2f7b(0x11f)](/^-+/,'')[_0x2a2f7b(0x11f)](/-+$/,'');return _0x43218a||_0x26a0c6;}export function buildDbDirectoryName(_0x51d838,_0x460b2e){return sanitizeSqlPathSegment(_0x51d838,_0x460b2e!=null?'db-'+_0x460b2e:'unknown-db');}export function buildSqlRelativePath(_0xf66907,_0x30d777,_0x1a9c93,_0xf4665f,_0x45ab8d){const _0xbe029a=buildDbDirectoryName(_0x1a9c93,_0x45ab8d),_0x5141a5=sanitizeSqlPathSegment(_0xf66907,'unknown-sql'),_0x267518=sanitizeSqlPathSegment(_0x30d777,_0x5141a5);return _0xbe029a+'/'+_0x5141a5+'_'+_0x267518+getSqlFileExtension(_0xf4665f);}
1
+ (function(_0x5de644,_0x30d8ea){const _0x51b5e2=a295_0x8d76,_0x313224=_0x5de644();while(!![]){try{const _0x257ea4=-parseInt(_0x51b5e2(0xfe))/0x1*(-parseInt(_0x51b5e2(0xf8))/0x2)+parseInt(_0x51b5e2(0x109))/0x3+parseInt(_0x51b5e2(0x105))/0x4+-parseInt(_0x51b5e2(0x108))/0x5*(-parseInt(_0x51b5e2(0xfa))/0x6)+-parseInt(_0x51b5e2(0x103))/0x7*(parseInt(_0x51b5e2(0xfc))/0x8)+parseInt(_0x51b5e2(0xf9))/0x9*(parseInt(_0x51b5e2(0x107))/0xa)+-parseInt(_0x51b5e2(0x102))/0xb;if(_0x257ea4===_0x30d8ea)break;else _0x313224['push'](_0x313224['shift']());}catch(_0x34b002){_0x313224['push'](_0x313224['shift']());}}}(a295_0x155b,0x6e03e));export function detectSqlMode(_0x1ca8a6){const _0x7c51c5=a295_0x8d76,_0x288fc6=_0x1ca8a6['trimStart']();if(/^<(select|insert|update|delete)\b/i[_0x7c51c5(0x10a)](_0x288fc6))return _0x7c51c5(0x104);return'sql';}export function getSqlFileExtension(_0x2aa5e0){const _0x3e72a6=a295_0x8d76;return _0x2aa5e0===_0x3e72a6(0x104)?_0x3e72a6(0xfb):_0x3e72a6(0x106);}function a295_0x155b(){const _0x47f717=['2423682ybQDDU','test','replace','62290IONMXo','2569707ystuLy','2124ILsdtj','.xml','48gVJPji','unknown-db','13oHVOoV','db-','trim','unknown-sql','16676803smwQkI','54481lpJOeg','mybatisXml','102036LptCmR','.sql','10fHUlvg','6915cAWGBo'];a295_0x155b=function(){return _0x47f717;};return a295_0x155b();}function a295_0x8d76(_0x10e4ec,_0x3e9723){_0x10e4ec=_0x10e4ec-0xf7;const _0x155b5d=a295_0x155b();let _0x8d768c=_0x155b5d[_0x10e4ec];return _0x8d768c;}export function buildDefaultSqlFileName(_0x5ac678,_0x3b06fd){return''+_0x5ac678+getSqlFileExtension(_0x3b06fd);}export function sanitizeSqlPathSegment(_0x17cf6e,_0x32e313){const _0x521d21=a295_0x8d76,_0x33c1e5=String(_0x17cf6e??'')[_0x521d21(0x100)](),_0x6ca886=_0x33c1e5[_0x521d21(0xf7)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x521d21(0xf7)](/\s+/g,'-')[_0x521d21(0xf7)](/-+/g,'-')[_0x521d21(0xf7)](/^\.+/,'')['replace'](/\.+$/,'')[_0x521d21(0xf7)](/^-+/,'')[_0x521d21(0xf7)](/-+$/,'');return _0x6ca886||_0x32e313;}export function buildDbDirectoryName(_0x3961e7,_0x123842){const _0x21c87d=a295_0x8d76;return sanitizeSqlPathSegment(_0x3961e7,_0x123842!=null?_0x21c87d(0xff)+_0x123842:_0x21c87d(0xfd));}export function buildSqlRelativePath(_0x37a127,_0x1798af,_0x26713e,_0x250b03,_0x1125b9){const _0x462dd4=a295_0x8d76,_0x5cec98=buildDbDirectoryName(_0x26713e,_0x1125b9),_0x111d18=sanitizeSqlPathSegment(_0x37a127,_0x462dd4(0x101)),_0x1e120b=sanitizeSqlPathSegment(_0x1798af,_0x111d18);return _0x5cec98+'/'+_0x111d18+'_'+_0x1e120b+getSqlFileExtension(_0x250b03);}