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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/validate.js +1 -1
  50. package/lib/commands/config/get.js +1 -1
  51. package/lib/commands/config/index.js +1 -1
  52. package/lib/commands/config/list.js +1 -1
  53. package/lib/commands/config/set.js +1 -1
  54. package/lib/commands/config/shared.js +1 -1
  55. package/lib/commands/data/filter.js +1 -1
  56. package/lib/commands/data/getOne.js +1 -1
  57. package/lib/commands/data/index.js +1 -1
  58. package/lib/commands/data/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/capability.js +1 -1
  61. package/lib/commands/dataset/delete.js +1 -1
  62. package/lib/commands/dataset/detail.js +1 -1
  63. package/lib/commands/dataset/extend-update.js +1 -1
  64. package/lib/commands/dataset/field-update.js +1 -1
  65. package/lib/commands/dataset/generate.js +1 -1
  66. package/lib/commands/dataset/index.js +1 -1
  67. package/lib/commands/dataset/list.js +1 -1
  68. package/lib/commands/dataset/operations.js +1 -1
  69. package/lib/commands/dataset/relation-audit.js +1 -1
  70. package/lib/commands/dataset/relation-create.js +1 -1
  71. package/lib/commands/dataset/relation-delete.js +1 -1
  72. package/lib/commands/dataset/relation-shared.js +1 -1
  73. package/lib/commands/dataset/relation-update.js +1 -1
  74. package/lib/commands/dataset/relations.js +1 -1
  75. package/lib/commands/dataset/rename.js +1 -1
  76. package/lib/commands/dataset/restore.js +1 -1
  77. package/lib/commands/db/analyze-cancel.js +1 -1
  78. package/lib/commands/db/analyze-start.js +1 -1
  79. package/lib/commands/db/analyze-status.js +1 -1
  80. package/lib/commands/db/create.js +1 -1
  81. package/lib/commands/db/delete.js +1 -1
  82. package/lib/commands/db/detail.js +1 -1
  83. package/lib/commands/db/diff.js +1 -1
  84. package/lib/commands/db/index.js +1 -1
  85. package/lib/commands/db/list.js +1 -1
  86. package/lib/commands/db/shared.js +1 -1
  87. package/lib/commands/db/tables.js +1 -1
  88. package/lib/commands/db/test.js +1 -1
  89. package/lib/commands/db/update.js +1 -1
  90. package/lib/commands/doctor.js +1 -1
  91. package/lib/commands/init/index.js +1 -1
  92. package/lib/commands/issue/index.js +1 -1
  93. package/lib/commands/issue/nudge.js +1 -1
  94. package/lib/commands/issue/report.js +1 -1
  95. package/lib/commands/issue/shared.js +1 -1
  96. package/lib/commands/logs/index.js +1 -1
  97. package/lib/commands/menu/index.js +1 -1
  98. package/lib/commands/menu/list.js +1 -1
  99. package/lib/commands/menu/shared/compare-table.js +1 -1
  100. package/lib/commands/menu/shared/index.js +1 -1
  101. package/lib/commands/menu/shared/inquirer.js +1 -1
  102. package/lib/commands/menu/shared/local-pages.js +1 -1
  103. package/lib/commands/menu/shared/logic.js +1 -1
  104. package/lib/commands/menu/shared/service.js +1 -1
  105. package/lib/commands/menu/shared/sync-core.js +1 -1
  106. package/lib/commands/menu/shared/update-core.js +1 -1
  107. package/lib/commands/menu/shared/valid-url.js +1 -1
  108. package/lib/commands/menu/sync.js +1 -1
  109. package/lib/commands/menu/update.js +1 -1
  110. package/lib/commands/page/generate-start.js +1 -1
  111. package/lib/commands/page/generate-status.js +1 -1
  112. package/lib/commands/page/index.js +1 -1
  113. package/lib/commands/page/pull.js +1 -1
  114. package/lib/commands/page/push.js +1 -1
  115. package/lib/commands/page/relation-audit.js +1 -1
  116. package/lib/commands/page/shared.js +1 -1
  117. package/lib/commands/page/standard-page-status.js +1 -1
  118. package/lib/commands/page/sync.js +1 -1
  119. package/lib/commands/permit/index.js +1 -1
  120. package/lib/commands/permit/page-get.js +1 -1
  121. package/lib/commands/permit/page-set.js +1 -1
  122. package/lib/commands/permit/role-apis-set.js +1 -1
  123. package/lib/commands/permit/role-menus-set.js +1 -1
  124. package/lib/commands/permit/role-menus.js +1 -1
  125. package/lib/commands/permit/shared.js +1 -1
  126. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  127. package/lib/commands/project/create/format-elapsed.js +1 -1
  128. package/lib/commands/project/create/main.js +1 -1
  129. package/lib/commands/project/create/non-interactive.js +1 -1
  130. package/lib/commands/project/create/project-template-path.js +1 -1
  131. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  132. package/lib/commands/project/create/use-format-code.js +1 -1
  133. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  134. package/lib/commands/project/index.js +1 -1
  135. package/lib/commands/project/init.js +1 -1
  136. package/lib/commands/project/upgrade.js +1 -1
  137. package/lib/commands/registry.js +1 -1
  138. package/lib/commands/role/create.js +1 -1
  139. package/lib/commands/role/delete.js +1 -1
  140. package/lib/commands/role/detail.js +1 -1
  141. package/lib/commands/role/index.js +1 -1
  142. package/lib/commands/role/list.js +1 -1
  143. package/lib/commands/role/shared.js +1 -1
  144. package/lib/commands/role/update.js +1 -1
  145. package/lib/commands/role/user-add.js +1 -1
  146. package/lib/commands/role/user-remove.js +1 -1
  147. package/lib/commands/role/user-resolve.js +1 -1
  148. package/lib/commands/run/index.js +1 -1
  149. package/lib/commands/schema.js +1 -1
  150. package/lib/commands/sql/create.js +1 -1
  151. package/lib/commands/sql/delete.js +1 -1
  152. package/lib/commands/sql/detail.js +1 -1
  153. package/lib/commands/sql/exec.js +1 -1
  154. package/lib/commands/sql/index.js +1 -1
  155. package/lib/commands/sql/list.js +1 -1
  156. package/lib/commands/sql/pull.js +1 -1
  157. package/lib/commands/sql/push.js +1 -1
  158. package/lib/commands/sql/save.js +1 -1
  159. package/lib/commands/sql/shared.js +1 -1
  160. package/lib/commands/sql/status.js +1 -1
  161. package/lib/commands/sql/validate.js +1 -1
  162. package/lib/commands/workspace/add.js +1 -1
  163. package/lib/commands/workspace/index.js +1 -1
  164. package/lib/commands/workspace/remove.js +1 -1
  165. package/lib/config/schema.js +1 -1
  166. package/lib/constant/cdn.js +1 -1
  167. package/lib/constant/cli.js +1 -1
  168. package/lib/constant/defaults.js +1 -1
  169. package/lib/constant/domain.js +1 -1
  170. package/lib/constant/env.js +1 -1
  171. package/lib/constant/output.js +1 -1
  172. package/lib/constant/paths.js +1 -1
  173. package/lib/constant/risk.js +1 -1
  174. package/lib/context/app-resolver.js +1 -1
  175. package/lib/context/auth-resolver.js +1 -1
  176. package/lib/context/config-loader.js +1 -1
  177. package/lib/context.js +1 -1
  178. package/lib/core/alias-resolver.js +1 -1
  179. package/lib/core/api-client.js +1 -1
  180. package/lib/core/bff/config.js +1 -1
  181. package/lib/core/bff/file-system.js +1 -1
  182. package/lib/core/bff/hash.js +1 -1
  183. package/lib/core/bff/lock.js +1 -1
  184. package/lib/core/bff/utils.js +1 -1
  185. package/lib/core/db-resolver.js +1 -1
  186. package/lib/core/page/file-system.js +1 -1
  187. package/lib/core/page/hash.js +1 -1
  188. package/lib/core/page/lock.js +1 -1
  189. package/lib/core/sql-sync/config.js +1 -1
  190. package/lib/core/sql-sync/file-system.js +1 -1
  191. package/lib/core/sql-sync/hash.js +1 -1
  192. package/lib/core/sql-sync/lock.js +1 -1
  193. package/lib/core/sql-sync/utils.js +1 -1
  194. package/lib/core/sql-validator.js +1 -1
  195. package/lib/errors.js +1 -1
  196. package/lib/framework/build-all-flags.js +1 -1
  197. package/lib/framework/flags.js +1 -1
  198. package/lib/framework/help.js +1 -1
  199. package/lib/framework/index.js +1 -1
  200. package/lib/framework/output.js +1 -1
  201. package/lib/framework/response.js +1 -1
  202. package/lib/framework/runner-alias.js +1 -1
  203. package/lib/framework/runner.js +1 -1
  204. package/lib/framework/schema-export.js +1 -1
  205. package/lib/framework/types.js +1 -1
  206. package/lib/generated/build-info.js +1 -1
  207. package/lib/help.js +1 -1
  208. package/lib/skills/main.js +1 -1
  209. package/lib/skills/npx-skills-add.js +1 -1
  210. package/lib/telemetry/cli-command-trace.js +1 -1
  211. package/lib/telemetry/cli-help-trace.js +1 -1
  212. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  213. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  214. package/lib/telemetry/send-cli-trace-log.js +1 -1
  215. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  216. package/lib/utils/ai_config.js +1 -1
  217. package/lib/utils/apply-jq-filter.js +1 -1
  218. package/lib/utils/cdn-config.js +1 -1
  219. package/lib/utils/check-sdk-version.js +1 -1
  220. package/lib/utils/cli-version-check.js +1 -1
  221. package/lib/utils/cli-version-policy.js +1 -1
  222. package/lib/utils/config.js +1 -1
  223. package/lib/utils/copy-directory.js +1 -1
  224. package/lib/utils/entity-with-id.js +1 -1
  225. package/lib/utils/file-utils.js +1 -1
  226. package/lib/utils/guides-cdn.js +1 -1
  227. package/lib/utils/http-client.js +1 -1
  228. package/lib/utils/is-non-interactive.js +1 -1
  229. package/lib/utils/logger.js +1 -1
  230. package/lib/utils/params.js +1 -1
  231. package/lib/utils/platform.js +1 -1
  232. package/lib/utils/rules-cdn.js +1 -1
  233. package/lib/utils/sleep.js +1 -1
  234. package/lib/utils/template-replacer.js +1 -1
  235. package/lib/utils/update-notice.js +1 -1
  236. package/lib/utils/version.js +1 -1
  237. package/lib/utils/with-active-cookie.js +1 -1
  238. package/lib/utils/write-cli-side-channel.js +1 -1
  239. package/package.json +1 -1
@@ -1 +1 @@
1
- const a169_0x177587=a169_0x2626;(function(_0x2e171a,_0x90e66){const _0x41c96e=a169_0x2626,_0x1440bb=_0x2e171a();while(!![]){try{const _0x3e8269=parseInt(_0x41c96e(0x15e))/0x1*(parseInt(_0x41c96e(0x166))/0x2)+parseInt(_0x41c96e(0x170))/0x3+-parseInt(_0x41c96e(0x16d))/0x4+-parseInt(_0x41c96e(0x160))/0x5+-parseInt(_0x41c96e(0x164))/0x6+parseInt(_0x41c96e(0x168))/0x7*(parseInt(_0x41c96e(0x167))/0x8)+parseInt(_0x41c96e(0x16f))/0x9;if(_0x3e8269===_0x90e66)break;else _0x1440bb['push'](_0x1440bb['shift']());}catch(_0x50ee5c){_0x1440bb['push'](_0x1440bb['shift']());}}}(a169_0x4833,0x720ae));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x19b609){const _0x21550e=a169_0x2626;customApiDomain=_0x19b609?.[_0x21550e(0x16b)],customUserDomain=_0x19b609?.[_0x21550e(0x15f)],customRuntimeDomain=_0x19b609?.[_0x21550e(0x16e)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a169_0x177587(0x16a):a169_0x177587(0x15c));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a169_0x177587(0x165):a169_0x177587(0x162));function a169_0x2626(_0x88b7c3,_0x408487){_0x88b7c3=_0x88b7c3-0x15c;const _0x483359=a169_0x4833();let _0x26267d=_0x483359[_0x88b7c3];return _0x26267d;}function a169_0x4833(){const _0x4b86ba=['https://user.lovrabet.com','apiDomain','https://app.lovrabet.com','1527232KCEkqk','runtimeDomain','15019902MOTPLy','30504ilbdYf','https://user-daily.lovrabet.com','/web-app/app/','206OdLVEx','userDomain','3065260sUYrya','https://daily.lovrabet.com','https://daily-api.lovrabet.com','https://runtime.lovrabet.com','5216448cJxGvs','https://api.lovrabet.com','1868dKevKC','1152bOKYyR','22358gyROAZ','trim'];a169_0x4833=function(){return _0x4b86ba;};return a169_0x4833();}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a169_0x177587(0x163):'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a169_0x177587(0x16c):a169_0x177587(0x161);export const getAppBaseUrl=_0xd3253b=>{const _0x20e38a=a169_0x177587,_0x2348bf=encodeURIComponent(_0xd3253b[_0x20e38a(0x169)]());return isProduction(getEnv())?getAppDomain()+'/app/'+_0x2348bf:getAppDomain()+_0x20e38a(0x15d)+_0x2348bf;};
1
+ const a169_0x4c3488=a169_0x5bb5;(function(_0x1c784c,_0x2a2be0){const _0x56da86=a169_0x5bb5,_0x4e5eed=_0x1c784c();while(!![]){try{const _0x216f50=parseInt(_0x56da86(0x70))/0x1*(-parseInt(_0x56da86(0x71))/0x2)+-parseInt(_0x56da86(0x85))/0x3+-parseInt(_0x56da86(0x77))/0x4*(-parseInt(_0x56da86(0x82))/0x5)+-parseInt(_0x56da86(0x7f))/0x6*(-parseInt(_0x56da86(0x79))/0x7)+-parseInt(_0x56da86(0x76))/0x8*(parseInt(_0x56da86(0x75))/0x9)+-parseInt(_0x56da86(0x7e))/0xa+-parseInt(_0x56da86(0x81))/0xb*(-parseInt(_0x56da86(0x7a))/0xc);if(_0x216f50===_0x2a2be0)break;else _0x4e5eed['push'](_0x4e5eed['shift']());}catch(_0x46c262){_0x4e5eed['push'](_0x4e5eed['shift']());}}}(a169_0x32e0,0x34d3a));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x258e0a){const _0x458d26=a169_0x5bb5;customApiDomain=_0x258e0a?.['apiDomain'],customUserDomain=_0x258e0a?.[_0x458d26(0x72)],customRuntimeDomain=_0x258e0a?.[_0x458d26(0x78)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a169_0x4c3488(0x7b):a169_0x4c3488(0x74));function a169_0x5bb5(_0x1db99d,_0x333650){_0x1db99d=_0x1db99d-0x6f;const _0x32e05c=a169_0x32e0();let _0x5bb544=_0x32e05c[_0x1db99d];return _0x5bb544;}function a169_0x32e0(){const _0x31247b=['342FewgcS','29368nUkdYW','105004RzHlRe','runtimeDomain','182jaMDMI','54336RfMCGt','https://user.lovrabet.com','/web-app/app/','https://daily-runtime.lovrabet.com','4040600LcnTvx','21354JXEfop','trim','1463KEfwfm','70eNzjRf','https://daily-api.lovrabet.com','https://app.lovrabet.com','138201sHYGgX','https://daily.lovrabet.com','39FOJBUj','13142gwQEBy','userDomain','/app/','https://user-daily.lovrabet.com'];a169_0x32e0=function(){return _0x31247b;};return a169_0x32e0();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a169_0x4c3488(0x83));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a169_0x4c3488(0x7d));export const getAppDomain=()=>isProduction(getEnv())?a169_0x4c3488(0x84):a169_0x4c3488(0x6f);export const getAppBaseUrl=_0x46a04f=>{const _0x5084e9=a169_0x4c3488,_0x1e1866=encodeURIComponent(_0x46a04f[_0x5084e9(0x80)]());return isProduction(getEnv())?getAppDomain()+_0x5084e9(0x73)+_0x1e1866:getAppDomain()+_0x5084e9(0x7c)+_0x1e1866;};
@@ -1 +1 @@
1
- const a170_0x2be509=a170_0x5d4c;function a170_0x5d4c(_0x25bde4,_0x9466ae){_0x25bde4=_0x25bde4-0x84;const _0x346bb2=a170_0x346b();let _0x5d4cb2=_0x346bb2[_0x25bde4];return _0x5d4cb2;}(function(_0xff6ad8,_0x3f48be){const _0x934f71=a170_0x5d4c,_0x53256d=_0xff6ad8();while(!![]){try{const _0x33c499=-parseInt(_0x934f71(0x8b))/0x1+parseInt(_0x934f71(0x84))/0x2*(-parseInt(_0x934f71(0x85))/0x3)+-parseInt(_0x934f71(0x93))/0x4*(-parseInt(_0x934f71(0x8d))/0x5)+parseInt(_0x934f71(0x89))/0x6*(-parseInt(_0x934f71(0x8e))/0x7)+-parseInt(_0x934f71(0x88))/0x8*(-parseInt(_0x934f71(0x92))/0x9)+parseInt(_0x934f71(0x91))/0xa+parseInt(_0x934f71(0x86))/0xb;if(_0x33c499===_0x3f48be)break;else _0x53256d['push'](_0x53256d['shift']());}catch(_0x2364e9){_0x53256d['push'](_0x53256d['shift']());}}}(a170_0x346b,0x627a8));export const RABETBASE_ENV_VALUES=[a170_0x2be509(0x87),a170_0x2be509(0x90)];export function normalizeEnv(_0x49eb01){const _0x4f9f77=a170_0x2be509;return _0x49eb01===_0x4f9f77(0x8f)?_0x4f9f77(0x87):_0x49eb01;}export function isProduction(_0x5beed1){const _0x56d09a=a170_0x2be509;return normalizeEnv(_0x5beed1)===_0x56d09a(0x87);}export function isDaily(_0xa5b677){return normalizeEnv(_0xa5b677)==='daily';}export function isDev(_0x543fa6){const _0x1499a1=a170_0x2be509,_0x149dd4=normalizeEnv(_0x543fa6);return _0x149dd4===_0x1499a1(0x8c)||_0x149dd4===_0x1499a1(0x8a);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a170_0x2be509(0x87));export function getEnv(){return env;}export function initEnv(_0x387134){env=normalizeEnv(_0x387134);}function a170_0x346b(){const _0x4f4198=['6YPnhqH','dev','356585gSnsxH','development','61175uSraVm','3446492wYDgru','online','daily','1846410JyiBOv','1341JNUadd','36JrnCbu','249122FtBfPO','9GDeVCS','12053976XVGvWE','production','12640vIldSL'];a170_0x346b=function(){return _0x4f4198;};return a170_0x346b();}
1
+ const a170_0x285c16=a170_0x5532;(function(_0x4e1983,_0x36bab4){const _0x244af8=a170_0x5532,_0x50c88a=_0x4e1983();while(!![]){try{const _0x202cd4=parseInt(_0x244af8(0x86))/0x1+-parseInt(_0x244af8(0x81))/0x2*(-parseInt(_0x244af8(0x83))/0x3)+parseInt(_0x244af8(0x82))/0x4*(-parseInt(_0x244af8(0x80))/0x5)+-parseInt(_0x244af8(0x7f))/0x6+parseInt(_0x244af8(0x7e))/0x7+-parseInt(_0x244af8(0x7c))/0x8+-parseInt(_0x244af8(0x7a))/0x9;if(_0x202cd4===_0x36bab4)break;else _0x50c88a['push'](_0x50c88a['shift']());}catch(_0x1b86e5){_0x50c88a['push'](_0x50c88a['shift']());}}}(a170_0x4f0e,0x66475));export const RABETBASE_ENV_VALUES=[a170_0x285c16(0x85),a170_0x285c16(0x7b)];export function normalizeEnv(_0x4d22ac){const _0x1ac71d=a170_0x285c16;return _0x4d22ac==='online'?_0x1ac71d(0x85):_0x4d22ac;}export function isProduction(_0x79a07b){const _0xd90a75=a170_0x285c16;return normalizeEnv(_0x79a07b)===_0xd90a75(0x85);}function a170_0x5532(_0xa546ba,_0x2aaa92){_0xa546ba=_0xa546ba-0x7a;const _0x4f0e6a=a170_0x4f0e();let _0x5532c8=_0x4f0e6a[_0xa546ba];return _0x5532c8;}function a170_0x4f0e(){const _0x37403b=['542478nrZdvC','72764ZFwtem','6gnttAo','dev','production','821493lcIawA','10081584TFNLwt','daily','3318888jeukqX','development','4628925vGbtLv','318510AGehnK','5FNsFEY'];a170_0x4f0e=function(){return _0x37403b;};return a170_0x4f0e();}export function isDaily(_0x4e2855){const _0x2fd01b=a170_0x285c16;return normalizeEnv(_0x4e2855)===_0x2fd01b(0x7b);}export function isDev(_0x50f8bd){const _0x586390=a170_0x285c16,_0x59cb98=normalizeEnv(_0x50f8bd);return _0x59cb98===_0x586390(0x7d)||_0x59cb98===_0x586390(0x84);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a170_0x285c16(0x85));export function getEnv(){return env;}export function initEnv(_0x223b4d){env=normalizeEnv(_0x223b4d);}
@@ -1 +1 @@
1
- function a171_0x149b(){const _0x5ce56a=['77Lblyrd','1278804YEmWxw','7452888jXFgTX','9ONsoSS','982183gtrBRg','54fyZJGv','483960uexvJq','pretty','3721792BFsAvE','compress','2DnRzqc','556927eZGcGK','4491710vKFTlp','json'];a171_0x149b=function(){return _0x5ce56a;};return a171_0x149b();}const a171_0x5d8cc1=a171_0x45c2;function a171_0x45c2(_0x21567f,_0x4c6918){_0x21567f=_0x21567f-0x15d;const _0x149b89=a171_0x149b();let _0x45c227=_0x149b89[_0x21567f];return _0x45c227;}(function(_0x3a1988,_0x12b39e){const _0x55c666=a171_0x45c2,_0x3a03f0=_0x3a1988();while(!![]){try{const _0x51cc46=-parseInt(_0x55c666(0x161))/0x1*(parseInt(_0x55c666(0x167))/0x2)+-parseInt(_0x55c666(0x15e))/0x3+-parseInt(_0x55c666(0x165))/0x4+-parseInt(_0x55c666(0x163))/0x5+-parseInt(_0x55c666(0x162))/0x6*(-parseInt(_0x55c666(0x168))/0x7)+-parseInt(_0x55c666(0x15f))/0x8*(parseInt(_0x55c666(0x160))/0x9)+-parseInt(_0x55c666(0x169))/0xa*(-parseInt(_0x55c666(0x15d))/0xb);if(_0x51cc46===_0x12b39e)break;else _0x3a03f0['push'](_0x3a03f0['shift']());}catch(_0x383b56){_0x3a03f0['push'](_0x3a03f0['shift']());}}}(a171_0x149b,0x78590));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a171_0x5d8cc1(0x16a),a171_0x5d8cc1(0x164),a171_0x5d8cc1(0x166)];
1
+ function a171_0x187d(_0x555c83,_0x5172ec){_0x555c83=_0x555c83-0xaf;const _0xa51174=a171_0xa511();let _0x187db9=_0xa51174[_0x555c83];return _0x187db9;}const a171_0x154b49=a171_0x187d;(function(_0x2eaf92,_0x1572ba){const _0x5dc4ed=a171_0x187d,_0x445231=_0x2eaf92();while(!![]){try{const _0xb1a91a=parseInt(_0x5dc4ed(0xb7))/0x1+-parseInt(_0x5dc4ed(0xb1))/0x2*(parseInt(_0x5dc4ed(0xb3))/0x3)+-parseInt(_0x5dc4ed(0xba))/0x4*(-parseInt(_0x5dc4ed(0xb6))/0x5)+-parseInt(_0x5dc4ed(0xb9))/0x6+-parseInt(_0x5dc4ed(0xaf))/0x7*(parseInt(_0x5dc4ed(0xb4))/0x8)+parseInt(_0x5dc4ed(0xbb))/0x9*(parseInt(_0x5dc4ed(0xb2))/0xa)+parseInt(_0x5dc4ed(0xbc))/0xb;if(_0xb1a91a===_0x1572ba)break;else _0x445231['push'](_0x445231['shift']());}catch(_0x36f1f7){_0x445231['push'](_0x445231['shift']());}}}(a171_0xa511,0x6c8c4));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a171_0x154b49(0xb0),a171_0x154b49(0xb8),a171_0x154b49(0xb5)];function a171_0xa511(){const _0xf0775b=['437310ybJSiP','5912Lxxier','9JuULii','219560lLdNBT','7VAqXIj','json','827546anImbF','6008230MvKvXn','3CRpJIu','5748432UjtkoW','compress','2285kKSNeQ','353595ZmMVUv','pretty'];a171_0xa511=function(){return _0xf0775b;};return a171_0xa511();}
@@ -1 +1 @@
1
- const a172_0x31254b=a172_0x5aa2;(function(_0x491f96,_0xc8457f){const _0x2895bb=a172_0x5aa2,_0x307ffb=_0x491f96();while(!![]){try{const _0x5bef33=-parseInt(_0x2895bb(0xdb))/0x1*(-parseInt(_0x2895bb(0xdd))/0x2)+-parseInt(_0x2895bb(0xd7))/0x3+-parseInt(_0x2895bb(0xde))/0x4*(parseInt(_0x2895bb(0xdc))/0x5)+-parseInt(_0x2895bb(0xd9))/0x6+-parseInt(_0x2895bb(0xda))/0x7*(parseInt(_0x2895bb(0xd4))/0x8)+-parseInt(_0x2895bb(0xd8))/0x9*(parseInt(_0x2895bb(0xdf))/0xa)+parseInt(_0x2895bb(0xd6))/0xb;if(_0x5bef33===_0xc8457f)break;else _0x307ffb['push'](_0x307ffb['shift']());}catch(_0x328eff){_0x307ffb['push'](_0x307ffb['shift']());}}}(a172_0x3262,0xe9ccf));export const DEFAULT_API_DIR=a172_0x31254b(0xd5);function a172_0x5aa2(_0x25ecbc,_0x22016f){_0x25ecbc=_0x25ecbc-0xd4;const _0x326270=a172_0x3262();let _0x5aa2fb=_0x326270[_0x25ecbc];return _0x5aa2fb;}function a172_0x3262(){const _0x37312f=['49GHsCNR','374047saXQCi','115lipjva','4pFJBhs','135864YroppK','1829530FMASAQ','823536ZzOave','./src/api','32297782MkSdWX','123468TGxoRv','45DCwGgg','1613256qZhjly'];a172_0x3262=function(){return _0x37312f;};return a172_0x3262();}
1
+ function a172_0x5357(_0x2352c6,_0x53b1b5){_0x2352c6=_0x2352c6-0x16b;const _0x316778=a172_0x3167();let _0x535772=_0x316778[_0x2352c6];return _0x535772;}const a172_0x695674=a172_0x5357;(function(_0x51897b,_0x59d892){const _0x177902=a172_0x5357,_0x40417f=_0x51897b();while(!![]){try{const _0x221ced=parseInt(_0x177902(0x172))/0x1*(-parseInt(_0x177902(0x16c))/0x2)+parseInt(_0x177902(0x176))/0x3+-parseInt(_0x177902(0x16f))/0x4+-parseInt(_0x177902(0x16e))/0x5*(parseInt(_0x177902(0x174))/0x6)+-parseInt(_0x177902(0x173))/0x7+-parseInt(_0x177902(0x170))/0x8*(-parseInt(_0x177902(0x16b))/0x9)+-parseInt(_0x177902(0x175))/0xa*(-parseInt(_0x177902(0x16d))/0xb);if(_0x221ced===_0x59d892)break;else _0x40417f['push'](_0x40417f['shift']());}catch(_0x340219){_0x40417f['push'](_0x40417f['shift']());}}}(a172_0x3167,0x5ab46));function a172_0x3167(){const _0x5066bf=['685068yOKJkA','32hVwCte','./src/api','73CzlNEe','1726543yrzDfE','1020bpBpIS','78730Benpfp','74871dcGuCo','1081422zwiXSa','4536vIPmsB','869cVdaJb','5075OsxaFb'];a172_0x3167=function(){return _0x5066bf;};return a172_0x3167();}export const DEFAULT_API_DIR=a172_0x695674(0x171);
@@ -1 +1 @@
1
- const a173_0x6eb73a=a173_0x16ba;function a173_0x16ba(_0x250fb0,_0x196b60){_0x250fb0=_0x250fb0-0xab;const _0x3f70fa=a173_0x3f70();let _0x16ba30=_0x3f70fa[_0x250fb0];return _0x16ba30;}(function(_0x1f6658,_0x1e0f11){const _0x1cb049=a173_0x16ba,_0x343ccd=_0x1f6658();while(!![]){try{const _0x5977f4=-parseInt(_0x1cb049(0xac))/0x1*(parseInt(_0x1cb049(0xae))/0x2)+-parseInt(_0x1cb049(0xaf))/0x3+-parseInt(_0x1cb049(0xab))/0x4+parseInt(_0x1cb049(0xb5))/0x5+parseInt(_0x1cb049(0xb4))/0x6*(-parseInt(_0x1cb049(0xb0))/0x7)+parseInt(_0x1cb049(0xb3))/0x8+parseInt(_0x1cb049(0xb2))/0x9;if(_0x5977f4===_0x1e0f11)break;else _0x343ccd['push'](_0x343ccd['shift']());}catch(_0x326db1){_0x343ccd['push'](_0x343ccd['shift']());}}}(a173_0x3f70,0xc0431));function a173_0x3f70(){const _0x36bd6e=['2FkPcLt','3545346qMNHqr','147UoNSvt','write','13071330NLngNl','6369696ojLtjx','188322Enxxew','7523905uPLums','1019600TqHIMF','870049pQxzVb','high-risk-write'];a173_0x3f70=function(){return _0x36bd6e;};return a173_0x3f70();}export const RISK_LEVEL_VALUES=['read',a173_0x6eb73a(0xb1),a173_0x6eb73a(0xad)];
1
+ const a173_0x31fdb3=a173_0xc9a6;function a173_0xc9a6(_0x3431d7,_0x5f425c){_0x3431d7=_0x3431d7-0x1e2;const _0x35395a=a173_0x3539();let _0xc9a661=_0x35395a[_0x3431d7];return _0xc9a661;}(function(_0x54da86,_0x11e3e6){const _0x297a0a=a173_0xc9a6,_0x511b65=_0x54da86();while(!![]){try{const _0x28c095=-parseInt(_0x297a0a(0x1ea))/0x1*(parseInt(_0x297a0a(0x1ed))/0x2)+parseInt(_0x297a0a(0x1ee))/0x3+-parseInt(_0x297a0a(0x1e3))/0x4+parseInt(_0x297a0a(0x1ef))/0x5*(parseInt(_0x297a0a(0x1e9))/0x6)+-parseInt(_0x297a0a(0x1eb))/0x7+parseInt(_0x297a0a(0x1ec))/0x8*(parseInt(_0x297a0a(0x1e4))/0x9)+parseInt(_0x297a0a(0x1e8))/0xa*(parseInt(_0x297a0a(0x1e6))/0xb);if(_0x28c095===_0x11e3e6)break;else _0x511b65['push'](_0x511b65['shift']());}catch(_0x234605){_0x511b65['push'](_0x511b65['shift']());}}}(a173_0x3539,0x7065c));function a173_0x3539(){const _0x2e2e84=['read','20CQQSqp','123546OLAopO','411764yUgyLv','2946937MvZODR','10456PDqhxd','2wQcBGi','2691159jscAQn','55VpKOEY','write','2204136ZAnLnn','4113lDmDxn','high-risk-write','678238jNKAhO'];a173_0x3539=function(){return _0x2e2e84;};return a173_0x3539();}export const RISK_LEVEL_VALUES=[a173_0x31fdb3(0x1e7),a173_0x31fdb3(0x1e2),a173_0x31fdb3(0x1e5)];
@@ -1 +1 @@
1
- (function(_0x462951,_0x2923c1){const _0x1ee36b=a174_0x5c85,_0x56a9d7=_0x462951();while(!![]){try{const _0x5c1f22=parseInt(_0x1ee36b(0xc0))/0x1*(parseInt(_0x1ee36b(0xce))/0x2)+parseInt(_0x1ee36b(0xd3))/0x3+-parseInt(_0x1ee36b(0xd0))/0x4+-parseInt(_0x1ee36b(0xd1))/0x5*(parseInt(_0x1ee36b(0xe9))/0x6)+-parseInt(_0x1ee36b(0xca))/0x7+parseInt(_0x1ee36b(0xda))/0x8*(parseInt(_0x1ee36b(0xd9))/0x9)+parseInt(_0x1ee36b(0xc4))/0xa*(parseInt(_0x1ee36b(0xc9))/0xb);if(_0x5c1f22===_0x2923c1)break;else _0x56a9d7['push'](_0x56a9d7['shift']());}catch(_0x79c2e2){_0x56a9d7['push'](_0x56a9d7['shift']());}}}(a174_0x1b79,0xdd596));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x291783){const _0x113210=a174_0x5c85;return typeof _0x291783==='string'&&_0x291783['trim']()?_0x291783[_0x113210(0xc1)]():undefined;}function appProfiles(_0x10c710){const _0x3374a0=a174_0x5c85;return _0x10c710['apps']&&typeof _0x10c710[_0x3374a0(0xe7)]===_0x3374a0(0xd7)?_0x10c710[_0x3374a0(0xe7)]:{};}function a174_0x1b79(){const _0x29981f=['4928205dORbPm','locale','accessKey','APP','object','pageSize','9iFJtJB','3321728RubOpt','format','daily','COOKIE','VERBOSE','find','keys','globalConfig','app','entries','string','RISK_LEVEL','defaultApp','apps','true','143958whVvgH','appcode','527ZKHHpm','trim','cookie','maxRisk','3400120fCpmmx','MAX_RISK','ACCESS_KEY','env','riskLevel','88zURjVV','10919615xZTlxj','ENV','production','write','2022WSFFym','FORMAT','5426748BPkBOL','310ucuedh','inherit'];a174_0x1b79=function(){return _0x29981f;};return a174_0x1b79();}function resolveDefaultAppName(_0x139c1d){const _0x4925fb=stringConfigValue(_0x139c1d['defaultApp']);if(_0x4925fb)return _0x4925fb;return Object['keys'](appProfiles(_0x139c1d))[0x0];}function a174_0x5c85(_0x30c2df,_0x3c36e8){_0x30c2df=_0x30c2df-0xbf;const _0x1b799c=a174_0x1b79();let _0x5c85a0=_0x1b799c[_0x30c2df];return _0x5c85a0;}function resolveTopLevelAppCode(_0x1bcd88){const _0x274743=a174_0x5c85;return stringConfigValue(_0x1bcd88[_0x274743(0xbf)])||stringConfigValue(_0x1bcd88[_0x274743(0xe2)]);}export function resolveAppConfig({raw:_0x3c7828,flags:_0x239ebc,layers:_0x37eef9,readEnv:_0x43eec3}){const _0x4916b1=a174_0x5c85,_0x1717ce=_0x37eef9?.['projectConfig']??{},_0x1d9415=_0x37eef9?.[_0x4916b1(0xe1)]??{},_0x3cf03d=Object[_0x4916b1(0xe0)](_0x1717ce)['length']>0x0,_0x1b657d=!_0x3cf03d||_0x1717ce[_0x4916b1(0xd2)]===!![],_0x5bc5b5=_0x3cf03d?resolveDefaultAppName(_0x1717ce):undefined,_0x7f7654=_0x1b657d?resolveDefaultAppName(_0x1d9415):undefined,_0xe524e4=stringConfigValue(_0x239ebc[_0x4916b1(0xe2)]),_0x203a36=_0x43eec3(_0x4916b1(0xd6)),_0x2d4360={};if(_0x3c7828[_0x4916b1(0xe7)]&&typeof _0x3c7828[_0x4916b1(0xe7)]===_0x4916b1(0xd7))for(const [_0x2ef240,_0x5f1177]of Object[_0x4916b1(0xe3)](_0x3c7828[_0x4916b1(0xe7)])){_0x5f1177&&typeof _0x5f1177===_0x4916b1(0xd7)&&_0x5f1177['appcode']&&(_0x2d4360[_0x2ef240]=_0x5f1177);}const _0x251af2=_0x3c7828[_0x4916b1(0xe6)]||undefined,_0x4641cd=Object[_0x4916b1(0xe0)](_0x2d4360)['length']>0x0,_0x326b85=_0xe524e4||_0x5bc5b5||_0x203a36||_0x7f7654||_0x251af2||undefined,_0x155384=stringConfigValue(_0x239ebc['appcode']),_0x2e1439=_0x155384?Object[_0x4916b1(0xe3)](_0x2d4360)[_0x4916b1(0xdf)](([,_0x1db865])=>_0x1db865?.[_0x4916b1(0xbf)]===_0x155384):undefined,_0x2836fe=_0x2e1439?.[0x0],_0x33e98b=_0x2e1439?.[0x1],_0x414c5e=_0x155384?_0x2836fe:_0x326b85;let _0x33c5b1=_0x414c5e&&_0x2d4360[_0x414c5e]?_0x2d4360[_0x414c5e]:undefined;_0x155384&&_0x33e98b&&(_0x33c5b1=_0x33e98b);const _0x5f39f6=_0x155384?_0x33e98b??_0x33c5b1:_0x33c5b1,_0x3c84bd=!_0xe524e4&&!_0x5bc5b5&&_0x203a36&&_0x414c5e===_0x203a36,_0x2bc681=_0xe524e4||(_0x3c84bd?_0x203a36:undefined)||(_0x155384?_0x2836fe:undefined),_0x5cb3d9=_0x5f39f6?.[_0x4916b1(0xbf)],_0x2e968a=_0x3cf03d?resolveTopLevelAppCode(_0x1717ce):undefined,_0x5b0147=_0x1b657d?resolveTopLevelAppCode(_0x1d9415):undefined,_0x7b98ff=_0xe524e4||_0x5bc5b5?_0x5cb3d9:undefined,_0x1e1ea0=!_0xe524e4&&!_0x5bc5b5?_0x5cb3d9:undefined,_0x2df812=_0x155384||_0x7b98ff||_0x2e968a||_0x1e1ea0||_0x5b0147||undefined,_0x52ade4=_0x3cf03d?stringConfigValue(_0x1717ce[_0x4916b1(0xc7)]):undefined,_0x2d0e3e=_0x1b657d?stringConfigValue(_0x1d9415[_0x4916b1(0xc7)]):undefined,_0x1ed668=_0x239ebc[_0x4916b1(0xc7)]||_0x5f39f6?.['env']||_0x52ade4||_0x43eec3(_0x4916b1(0xcb))||_0x2d0e3e||_0x3c7828[_0x4916b1(0xc7)]||DEFAULT_CONFIG_VALUES[_0x4916b1(0xc7)],_0x641583=_0x5f39f6?.[_0x4916b1(0xd4)]||_0x3c7828['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x597f17=_0x43eec3(_0x4916b1(0xdd))||_0x5f39f6?.[_0x4916b1(0xc2)]||_0x3c7828[_0x4916b1(0xc2)]||undefined,_0x2ae525=_0x43eec3(_0x4916b1(0xc6))||_0x5f39f6?.[_0x4916b1(0xd5)]||_0x3c7828['accessKey']||undefined,_0x104421=_0x239ebc['format']||_0x43eec3(_0x4916b1(0xcf))||_0x5f39f6?.[_0x4916b1(0xdb)]||_0x3c7828[_0x4916b1(0xdb)],_0x3585f6=normalizeLegacyOutputFormat(_0x104421),_0x5e991e=_0x43eec3('PAGE_SIZE')||_0x5f39f6?.['pageSize']||_0x3c7828[_0x4916b1(0xd8)],_0x4d1c8c=_0x5e991e?Number(_0x5e991e)||undefined:undefined,_0x409a39=_0x43eec3(_0x4916b1(0xe5))||_0x43eec3(_0x4916b1(0xc5))||_0x5f39f6?.['riskLevel']||_0x3c7828['riskLevel']||_0x3c7828[_0x4916b1(0xc3)],_0x994b90=_0x409a39==='read'||_0x409a39===_0x4916b1(0xcd)?_0x409a39:DEFAULT_CONFIG_VALUES[_0x4916b1(0xc8)],_0x24181a=_0x43eec3(_0x4916b1(0xde)),_0x43fa4b=_0x24181a==='1'||_0x24181a===_0x4916b1(0xe8),_0x1be851=_0x5f39f6?.['apiDir']||_0x3c7828['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],_0x210850=isDaily(normalizeEnv(String(_0x1ed668)))?_0x4916b1(0xdc):_0x4916b1(0xcc);return{'appCode':typeof _0x2df812===_0x4916b1(0xe4)&&_0x2df812['trim']()?_0x2df812['trim']():undefined,'env':_0x210850,'locale':_0x641583,'cookie':_0x597f17,'accessKey':_0x2ae525,'format':_0x3585f6,'pageSize':_0x4d1c8c,'riskLevel':_0x994b90,'verbose':_0x43fa4b,'apiDir':_0x1be851,'apps':_0x2d4360,'defaultApp':_0x251af2,'currentApp':_0x4641cd?_0x414c5e:undefined,'explicitAppName':_0x2bc681};}
1
+ (function(_0xb2fdff,_0x1b8e14){const _0x253adc=a174_0x31e7,_0x1b9f8c=_0xb2fdff();while(!![]){try{const _0xea296f=-parseInt(_0x253adc(0x17f))/0x1+-parseInt(_0x253adc(0x185))/0x2*(parseInt(_0x253adc(0x18e))/0x3)+-parseInt(_0x253adc(0x177))/0x4+-parseInt(_0x253adc(0x17b))/0x5+-parseInt(_0x253adc(0x194))/0x6+parseInt(_0x253adc(0x181))/0x7*(-parseInt(_0x253adc(0x17d))/0x8)+-parseInt(_0x253adc(0x192))/0x9*(-parseInt(_0x253adc(0x183))/0xa);if(_0xea296f===_0x1b8e14)break;else _0x1b9f8c['push'](_0x1b9f8c['shift']());}catch(_0x420c4a){_0x1b9f8c['push'](_0x1b9f8c['shift']());}}}(a174_0x21c9,0x87f81));function a174_0x31e7(_0x3d34b3,_0x649c64){_0x3d34b3=_0x3d34b3-0x176;const _0x21c9a6=a174_0x21c9();let _0x31e717=_0x21c9a6[_0x3d34b3];return _0x31e717;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x4eec08){const _0x40246d=a174_0x31e7;return typeof _0x4eec08==='string'&&_0x4eec08[_0x40246d(0x17c)]()?_0x4eec08[_0x40246d(0x17c)]():undefined;}function appProfiles(_0xdb17af){const _0x310c68=a174_0x31e7;return _0xdb17af[_0x310c68(0x193)]&&typeof _0xdb17af['apps']===_0x310c68(0x19c)?_0xdb17af[_0x310c68(0x193)]:{};}function resolveDefaultAppName(_0x2b9779){const _0x5279a4=a174_0x31e7,_0x500a6e=stringConfigValue(_0x2b9779[_0x5279a4(0x19b)]);if(_0x500a6e)return _0x500a6e;return Object[_0x5279a4(0x191)](appProfiles(_0x2b9779))[0x0];}function resolveTopLevelAppCode(_0x4b07ca){return stringConfigValue(_0x4b07ca['appcode'])||stringConfigValue(_0x4b07ca['app']);}export function resolveAppConfig({raw:_0x29f4d7,flags:_0x5bf66a,layers:_0x264f35,readEnv:_0xfddafe}){const _0x435963=a174_0x31e7,_0x466b54=_0x264f35?.[_0x435963(0x18f)]??{},_0x9a3e7d=_0x264f35?.[_0x435963(0x17e)]??{},_0x4e987c=Object[_0x435963(0x191)](_0x466b54)['length']>0x0,_0x52c86f=!_0x4e987c||_0x466b54[_0x435963(0x19f)]===!![],_0x1d12bf=_0x4e987c?resolveDefaultAppName(_0x466b54):undefined,_0xb1a969=_0x52c86f?resolveDefaultAppName(_0x9a3e7d):undefined,_0x52494a=stringConfigValue(_0x5bf66a[_0x435963(0x18a)]),_0x252b96=_0xfddafe(_0x435963(0x190)),_0x561fd1={};if(_0x29f4d7['apps']&&typeof _0x29f4d7[_0x435963(0x193)]===_0x435963(0x19c))for(const [_0x49d3b2,_0x41a7ab]of Object[_0x435963(0x199)](_0x29f4d7[_0x435963(0x193)])){_0x41a7ab&&typeof _0x41a7ab===_0x435963(0x19c)&&_0x41a7ab['appcode']&&(_0x561fd1[_0x49d3b2]=_0x41a7ab);}const _0x44c303=_0x29f4d7['defaultApp']||undefined,_0x51e068=Object[_0x435963(0x191)](_0x561fd1)[_0x435963(0x18c)]>0x0,_0x5cdab8=_0x52494a||_0x1d12bf||_0x252b96||_0xb1a969||_0x44c303||undefined,_0x1773e2=stringConfigValue(_0x5bf66a['appcode']),_0x244d7a=_0x1773e2?Object[_0x435963(0x199)](_0x561fd1)[_0x435963(0x19d)](([,_0x5a4e06])=>_0x5a4e06?.[_0x435963(0x18b)]===_0x1773e2):undefined,_0x4f0ae9=_0x244d7a?.[0x0],_0x3d1195=_0x244d7a?.[0x1],_0x47332f=_0x1773e2?_0x4f0ae9:_0x5cdab8;let _0x502e06=_0x47332f&&_0x561fd1[_0x47332f]?_0x561fd1[_0x47332f]:undefined;_0x1773e2&&_0x3d1195&&(_0x502e06=_0x3d1195);const _0x177d46=_0x1773e2?_0x3d1195??_0x502e06:_0x502e06,_0x49283f=!_0x52494a&&!_0x1d12bf&&_0x252b96&&_0x47332f===_0x252b96,_0x3bc1b5=_0x52494a||(_0x49283f?_0x252b96:undefined)||(_0x1773e2?_0x4f0ae9:undefined),_0x2348bc=_0x177d46?.[_0x435963(0x18b)],_0x21fc45=_0x4e987c?resolveTopLevelAppCode(_0x466b54):undefined,_0x3c75fc=_0x52c86f?resolveTopLevelAppCode(_0x9a3e7d):undefined,_0x35c5ef=_0x52494a||_0x1d12bf?_0x2348bc:undefined,_0x314ef7=!_0x52494a&&!_0x1d12bf?_0x2348bc:undefined,_0x292b13=_0x1773e2||_0x35c5ef||_0x21fc45||_0x314ef7||_0x3c75fc||undefined,_0x50bee2=_0x4e987c?stringConfigValue(_0x466b54[_0x435963(0x176)]):undefined,_0x34c14c=_0x52c86f?stringConfigValue(_0x9a3e7d[_0x435963(0x176)]):undefined,_0x1f9c7b=_0x5bf66a[_0x435963(0x176)]||_0x177d46?.[_0x435963(0x176)]||_0x50bee2||_0xfddafe(_0x435963(0x17a))||_0x34c14c||_0x29f4d7[_0x435963(0x176)]||DEFAULT_CONFIG_VALUES[_0x435963(0x176)],_0xdbf3ab=_0x177d46?.[_0x435963(0x178)]||_0x29f4d7[_0x435963(0x178)]||DEFAULT_CONFIG_VALUES[_0x435963(0x178)],_0x2099ed=_0xfddafe('COOKIE')||_0x177d46?.[_0x435963(0x188)]||_0x29f4d7[_0x435963(0x188)]||undefined,_0x212aaf=_0xfddafe(_0x435963(0x186))||_0x177d46?.['accessKey']||_0x29f4d7[_0x435963(0x187)]||undefined,_0x45b1fb=_0x5bf66a[_0x435963(0x189)]||_0xfddafe(_0x435963(0x198))||_0x177d46?.['format']||_0x29f4d7[_0x435963(0x189)],_0x5af90a=normalizeLegacyOutputFormat(_0x45b1fb),_0x4845b4=_0xfddafe('PAGE_SIZE')||_0x177d46?.['pageSize']||_0x29f4d7[_0x435963(0x182)],_0x3d68b3=_0x4845b4?Number(_0x4845b4)||undefined:undefined,_0xeed0ba=_0xfddafe(_0x435963(0x19e))||_0xfddafe(_0x435963(0x195))||_0x177d46?.[_0x435963(0x180)]||_0x29f4d7[_0x435963(0x180)]||_0x29f4d7['maxRisk'],_0x1b6c4f=_0xeed0ba===_0x435963(0x19a)||_0xeed0ba==='write'?_0xeed0ba:DEFAULT_CONFIG_VALUES[_0x435963(0x180)],_0x4bcd60=_0xfddafe('VERBOSE'),_0x6e0ee9=_0x4bcd60==='1'||_0x4bcd60===_0x435963(0x179),_0x5d5f44=_0x177d46?.['apiDir']||_0x29f4d7[_0x435963(0x197)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x48886c=isDaily(normalizeEnv(String(_0x1f9c7b)))?_0x435963(0x184):_0x435963(0x18d);return{'appCode':typeof _0x292b13===_0x435963(0x196)&&_0x292b13['trim']()?_0x292b13[_0x435963(0x17c)]():undefined,'env':_0x48886c,'locale':_0xdbf3ab,'cookie':_0x2099ed,'accessKey':_0x212aaf,'format':_0x5af90a,'pageSize':_0x3d68b3,'riskLevel':_0x1b6c4f,'verbose':_0x6e0ee9,'apiDir':_0x5d5f44,'apps':_0x561fd1,'defaultApp':_0x44c303,'currentApp':_0x51e068?_0x47332f:undefined,'explicitAppName':_0x3bc1b5};}function a174_0x21c9(){const _0x494c3a=['entries','read','defaultApp','object','find','RISK_LEVEL','inherit','env','3140032DSsRDL','locale','true','ENV','3827680wRlISY','trim','16RnNkxq','globalConfig','607358BKOkcm','riskLevel','2811179dkhaAV','pageSize','10ZcutvZ','daily','1594894NWTtpr','ACCESS_KEY','accessKey','cookie','format','app','appcode','length','production','3cdFFTi','projectConfig','APP','keys','42539769xRyWeZ','apps','2467014YMdWCt','MAX_RISK','string','apiDir','FORMAT'];a174_0x21c9=function(){return _0x494c3a;};return a174_0x21c9();}
@@ -1 +1 @@
1
- (function(_0x4d8927,_0x19ff73){const _0x40cbf2=a175_0x1e6b,_0xc3a873=_0x4d8927();while(!![]){try{const _0x3958e7=parseInt(_0x40cbf2(0x172))/0x1*(parseInt(_0x40cbf2(0x168))/0x2)+-parseInt(_0x40cbf2(0x167))/0x3*(-parseInt(_0x40cbf2(0x16e))/0x4)+-parseInt(_0x40cbf2(0x16d))/0x5+parseInt(_0x40cbf2(0x16f))/0x6+-parseInt(_0x40cbf2(0x16c))/0x7+-parseInt(_0x40cbf2(0x165))/0x8*(-parseInt(_0x40cbf2(0x171))/0x9)+parseInt(_0x40cbf2(0x169))/0xa*(-parseInt(_0x40cbf2(0x166))/0xb);if(_0x3958e7===_0x19ff73)break;else _0xc3a873['push'](_0xc3a873['shift']());}catch(_0x48e3ce){_0xc3a873['push'](_0xc3a873['shift']());}}}(a175_0x1ce0,0xbbf41));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x115125){const _0x155a77=a175_0x1e6b,{getCookie:_0xf17587}=await import(_0x155a77(0x16b)),_0x293c7a=_0x115125[_0x155a77(0x16a)]||_0xf17587(),_0x3b5442=_0x293c7a?await getIsSessionValid():![];return{'cookie':_0x293c7a,'isLoggedIn':_0x3b5442,async 'getOrLogin'(){const _0x48c28c=_0x155a77;if(_0x293c7a&&_0x3b5442)return _0x293c7a;throw CliErrors[_0x48c28c(0x170)]();}};}function a175_0x1e6b(_0x5d14c5,_0x31d213){_0x5d14c5=_0x5d14c5-0x165;const _0x1ce0e9=a175_0x1ce0();let _0x1e6b4c=_0x1ce0e9[_0x5d14c5];return _0x1e6b4c;}function a175_0x1ce0(){const _0x1135fa=['99HRqzst','18EdOqEn','1364830ELZXiQ','cookie','../auth/get-cookie.js','7845488BqEdap','1428600SQZxlL','21096vPIMmk','7504860RKWawM','authRequired','2221119mNsZuU','143537uPRCPq','40GqFBol','143LcbnRQ'];a175_0x1ce0=function(){return _0x1135fa;};return a175_0x1ce0();}
1
+ (function(_0x21617b,_0x2c6dce){const _0x19f02d=a175_0x4f7a,_0x27ed65=_0x21617b();while(!![]){try{const _0x20b337=-parseInt(_0x19f02d(0xd0))/0x1+-parseInt(_0x19f02d(0xc9))/0x2*(-parseInt(_0x19f02d(0xd3))/0x3)+-parseInt(_0x19f02d(0xcd))/0x4+-parseInt(_0x19f02d(0xd2))/0x5+parseInt(_0x19f02d(0xcf))/0x6+parseInt(_0x19f02d(0xcc))/0x7*(parseInt(_0x19f02d(0xcb))/0x8)+-parseInt(_0x19f02d(0xce))/0x9*(-parseInt(_0x19f02d(0xd1))/0xa);if(_0x20b337===_0x2c6dce)break;else _0x27ed65['push'](_0x27ed65['shift']());}catch(_0x1a6f6c){_0x27ed65['push'](_0x27ed65['shift']());}}}(a175_0x38bc,0x6d617));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a175_0x4f7a(_0x58fe2a,_0x1baa91){_0x58fe2a=_0x58fe2a-0xc8;const _0x38bc15=a175_0x38bc();let _0x4f7a03=_0x38bc15[_0x58fe2a];return _0x4f7a03;}function a175_0x38bc(){const _0x16018e=['91UGEEqn','3258696iqVvoo','36hxDgfZ','4848924sJynwv','119336iJxfAa','501940CFwTHT','2253185HHiJtN','1785288kSnNyl','authRequired','2cDmBEL','../auth/get-cookie.js','140704GXWIHq'];a175_0x38bc=function(){return _0x16018e;};return a175_0x38bc();}export async function buildAuth(_0x3ee04b){const _0x589739=a175_0x4f7a,{getCookie:_0x2679bd}=await import(_0x589739(0xca)),_0x228282=_0x3ee04b['cookie']||_0x2679bd(),_0x2957b6=_0x228282?await getIsSessionValid():![];return{'cookie':_0x228282,'isLoggedIn':_0x2957b6,async 'getOrLogin'(){const _0x3a0678=_0x589739;if(_0x228282&&_0x2957b6)return _0x228282;throw CliErrors[_0x3a0678(0xc8)]();}};}
@@ -1 +1 @@
1
- const a176_0x4a5579=a176_0xa147;(function(_0x4a1199,_0x3733c1){const _0x4022b0=a176_0xa147,_0x154b1b=_0x4a1199();while(!![]){try{const _0x30b3ed=-parseInt(_0x4022b0(0xa7))/0x1+-parseInt(_0x4022b0(0x8d))/0x2+-parseInt(_0x4022b0(0x9b))/0x3+parseInt(_0x4022b0(0x96))/0x4+parseInt(_0x4022b0(0x95))/0x5+parseInt(_0x4022b0(0xa8))/0x6*(parseInt(_0x4022b0(0xb8))/0x7)+-parseInt(_0x4022b0(0x92))/0x8*(parseInt(_0x4022b0(0xbc))/0x9);if(_0x30b3ed===_0x3733c1)break;else _0x154b1b['push'](_0x154b1b['shift']());}catch(_0x5debd4){_0x154b1b['push'](_0x154b1b['shift']());}}}(a176_0x1a5f,0x62eb3));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a176_0x4a5579(0xb3);export const CONFIG_NAMES=[a176_0x4a5579(0xb3),a176_0x4a5579(0x8e),a176_0x4a5579(0xba)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a176_0x4a5579(0xa6)](_0x302555=>_0x302555!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();function a176_0xa147(_0x8ee1cd,_0xe2ee8b){_0x8ee1cd=_0x8ee1cd-0x8d;const _0x1a5f73=a176_0x1a5f();let _0xa1479e=_0x1a5f73[_0x8ee1cd];return _0xa1479e;}export function resolveConfigPath(_0x2fe4cf){for(const _0x2c1552 of CONFIG_NAMES){const _0xba4dc4=resolve(_0x2fe4cf,_0x2c1552);if(existsSync(_0xba4dc4))return _0xba4dc4;}return undefined;}export function findProjectRootDirectory(_0x251951=process['cwd']()){let _0x2d4996=resolve(_0x251951);const {root:_0x15bda2}=parse(_0x2d4996),_0x56fa83=homedir();while(!![]){if(resolveConfigPath(_0x2d4996)){if(_0x2d4996===_0x56fa83)break;return _0x2d4996;}if(_0x2d4996===_0x15bda2||_0x2d4996===_0x56fa83)break;const _0x2010a4=dirname(_0x2d4996);if(_0x2010a4===_0x2d4996)break;_0x2d4996=_0x2010a4;}return resolve(_0x251951);}export function getProjectConfigPath(){const _0x45d2ba=a176_0x4a5579;return resolveConfigPath(process[_0x45d2ba(0x8f)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x2a5af6){const _0x3137c7=a176_0x4a5579;if(!existsSync(_0x2a5af6))return{'status':_0x3137c7(0xa3)};try{const _0x1401f3=readFileSync(_0x2a5af6,{'encoding':_0x3137c7(0x94)});if(!_0x1401f3?.[_0x3137c7(0x93)]())return{'status':'empty'};const _0x42aac1=JSON['parse'](_0x1401f3);return{'status':'ok','data':_0x42aac1};}catch(_0x3ecafb){return{'status':_0x3137c7(0x9d),'message':_0x3ecafb instanceof Error?_0x3ecafb[_0x3137c7(0xa0)]:String(_0x3ecafb)};}}function parseCliConfigJsonFile(_0x3acbcf,_0x20c79a,_0x21a410){const _0x43cc97=a176_0x4a5579,_0x5d238d=inspectCliConfigJsonFile(_0x3acbcf);if(_0x5d238d[_0x43cc97(0xad)]===_0x43cc97(0xa3)||_0x5d238d[_0x43cc97(0xad)]===_0x43cc97(0xbb))return{};if(_0x5d238d[_0x43cc97(0xad)]==='ok')return _0x5d238d[_0x43cc97(0xbe)];return _0x20c79a==='warn'&&_0x21a410&&console[_0x43cc97(0x9d)](CLI_BIN_NAME+':\x20'+_0x21a410+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x3acbcf+_0x43cc97(0xaf)+_0x5d238d[_0x43cc97(0xa0)]),{};}function normalizeLegacyConfigShape(_0x17061e){const _0x4ae633=a176_0x4a5579;if(!_0x17061e||typeof _0x17061e!==_0x4ae633(0x98))return{'config':{},'migrated':![]};const _0x5de381={..._0x17061e},_0x469f02=_0x5de381[_0x4ae633(0xa5)]&&typeof _0x5de381[_0x4ae633(0xa5)]===_0x4ae633(0x98)?{..._0x5de381[_0x4ae633(0xa5)]}:{},_0x135928=Object[_0x4ae633(0x9e)](_0x469f02)[_0x4ae633(0x90)],_0x1646ed=_0x5de381[_0x4ae633(0xbd)]||_0x5de381[_0x4ae633(0xb9)];let _0x367db2=![];if(_0x1646ed&&_0x135928===0x0){const _0x39a4ac=typeof _0x5de381[_0x4ae633(0xb1)]===_0x4ae633(0xb2)&&_0x5de381[_0x4ae633(0xb1)][_0x4ae633(0x93)]()?_0x5de381['defaultApp']:String(_0x1646ed)[_0x4ae633(0x93)]();_0x469f02[_0x39a4ac]={'appcode':String(_0x1646ed)[_0x4ae633(0x93)](),..._0x5de381[_0x4ae633(0x91)]!=null?{'env':_0x5de381[_0x4ae633(0x91)]}:{},..._0x5de381['apiDir']!=null?{'apiDir':_0x5de381[_0x4ae633(0xac)]}:{},..._0x5de381[_0x4ae633(0xab)]!=null?{'cookie':_0x5de381[_0x4ae633(0xab)]}:{},..._0x5de381[_0x4ae633(0xb7)]!=null?{'accessKey':_0x5de381['accessKey']}:{},..._0x5de381['format']!=null?{'format':_0x5de381[_0x4ae633(0xb4)]}:{},..._0x5de381['pageSize']!=null?{'pageSize':_0x5de381[_0x4ae633(0xb5)]}:{},..._0x5de381['riskLevel']!=null?{'riskLevel':_0x5de381[_0x4ae633(0xa4)]}:{},..._0x5de381[_0x4ae633(0x9c)]!=null?{'locale':_0x5de381[_0x4ae633(0x9c)]}:{}},_0x5de381[_0x4ae633(0xa5)]=_0x469f02;if(!_0x5de381[_0x4ae633(0xb1)])_0x5de381[_0x4ae633(0xb1)]=_0x39a4ac;_0x367db2=!![];}return(_0x4ae633(0xbd)in _0x5de381||'app'in _0x5de381)&&(delete _0x5de381[_0x4ae633(0xbd)],delete _0x5de381[_0x4ae633(0xb9)],_0x367db2=!![]),{'config':_0x5de381,'migrated':_0x367db2};}function a176_0x1a5f(){const _0x202da2=['utf8','3471820HJspsq','1288860cszKWQ','Project','object','set','inherit','446103ZNSbuk','locale','error','keys','migrated','message','.tmp','config','missing','riskLevel','apps','filter','277055iKJSzq','1802418yFsQpz','project','get','cookie','apiDir','status','silent','\x0a\x20\x20','warn','defaultApp','string','.rabetbase.json','format','pageSize','stringify','accessKey','14YgYRpO','app','.lovrabetrc','empty','9wGDrpl','appcode','data','Global','993030byZZyf','.lovrabet.json','cwd','length','env','2319544PVHbfk','trim'];a176_0x1a5f=function(){return _0x202da2;};return a176_0x1a5f();}function writeNormalizedConfigIfNeeded(_0x4d5d76,_0x5e2594){const _0x3c01c5=a176_0x4a5579,_0x1b815c=JSON[_0x3c01c5(0xb6)](_0x5e2594,null,0x2)+'\x0a';if(normalizedWriteCache[_0x3c01c5(0xaa)](_0x4d5d76)===_0x1b815c)return;writeConfigFile(_0x4d5d76,_0x5e2594),normalizedWriteCache[_0x3c01c5(0x99)](_0x4d5d76,_0x1b815c);}function parseAndNormalizeConfig(_0x43e851,_0x131de4,_0x3e2371){const _0x325fb1=a176_0x4a5579,_0x911059=parseCliConfigJsonFile(_0x43e851,_0x131de4,_0x3e2371),_0x2d31b2=normalizeLegacyConfigShape(_0x911059);if(_0x2d31b2[_0x325fb1(0x9f)])try{writeNormalizedConfigIfNeeded(_0x43e851,_0x2d31b2[_0x325fb1(0xa2)]);}catch{}return _0x2d31b2[_0x325fb1(0xa2)];}export function loadRawConfigLayers(_0x22abd5){const _0x46fbef=a176_0x4a5579;let _0x33feb4={},_0x5ed582={};const _0x48135d=resolveConfigPath(homedir());_0x48135d&&(_0x33feb4=parseAndNormalizeConfig(_0x48135d,_0x46fbef(0xb0),_0x46fbef(0xbf)));const _0x1203cb=_0x22abd5??findProjectRootDirectory(),_0x47473a=resolveConfigPath(_0x1203cb);return _0x47473a&&(_0x5ed582=parseAndNormalizeConfig(_0x47473a,'warn',_0x46fbef(0x97))),{'globalPath':_0x48135d,'projectPath':_0x47473a,'globalConfig':_0x33feb4,'projectConfig':_0x5ed582};}const INHERIT_WHITELIST=[a176_0x4a5579(0xab),a176_0x4a5579(0xb7),a176_0x4a5579(0x9c),'format',a176_0x4a5579(0xa4),a176_0x4a5579(0xb5)];export function mergeRawConfigLayers(_0x54517a){const _0x382b90=a176_0x4a5579,{globalConfig:_0x57e3e3,projectConfig:_0x3981fc}=_0x54517a,_0x3b56a3=Object[_0x382b90(0x9e)](_0x3981fc)['length']>0x0;if(!_0x3b56a3)return mergeGlobalOnly(_0x57e3e3);if(_0x3981fc[_0x382b90(0x9a)]===!![])return mergeFullInherit(_0x57e3e3,_0x3981fc);if(_0x3981fc[_0x382b90(0x9a)]===![])return mergeIsolated(_0x3981fc);return mergeProjectFirst(_0x57e3e3,_0x3981fc);}function mergeGlobalOnly(_0x3f8aa8){const _0x4eb69a=a176_0x4a5579,_0x4949f9={..._0x3f8aa8},_0x52028e=_0x3f8aa8[_0x4eb69a(0xa5)]&&typeof _0x3f8aa8['apps']===_0x4eb69a(0x98)?_0x3f8aa8[_0x4eb69a(0xa5)]:{};if(Object[_0x4eb69a(0x9e)](_0x52028e)[_0x4eb69a(0x90)]>0x0)_0x4949f9[_0x4eb69a(0xa5)]=_0x52028e;if(_0x3f8aa8[_0x4eb69a(0xb1)])_0x4949f9[_0x4eb69a(0xb1)]=_0x3f8aa8[_0x4eb69a(0xb1)];else{const _0x2a0d8d=Object[_0x4eb69a(0x9e)](_0x52028e);if(_0x2a0d8d[_0x4eb69a(0x90)]>0x0)_0x4949f9['defaultApp']=_0x2a0d8d[0x0];}return _0x4949f9;}function mergeIsolated(_0xb3f117){const _0x135b75=a176_0x4a5579,_0x224e8e={..._0xb3f117};delete _0x224e8e[_0x135b75(0x9a)];const _0x21b8a4=_0xb3f117[_0x135b75(0xa5)]&&typeof _0xb3f117[_0x135b75(0xa5)]===_0x135b75(0x98)?_0xb3f117[_0x135b75(0xa5)]:{};Object[_0x135b75(0x9e)](_0x21b8a4)[_0x135b75(0x90)]>0x0?_0x224e8e[_0x135b75(0xa5)]=_0x21b8a4:delete _0x224e8e[_0x135b75(0xa5)];if(_0x135b75(0xb1)in _0xb3f117)_0x224e8e[_0x135b75(0xb1)]=_0xb3f117['defaultApp'];else Object[_0x135b75(0x9e)](_0x21b8a4)['length']>0x0?_0x224e8e[_0x135b75(0xb1)]=Object[_0x135b75(0x9e)](_0x21b8a4)[0x0]:delete _0x224e8e[_0x135b75(0xb1)];return _0x224e8e;}function mergeProjectFirst(_0x9eaab4,_0x4c6ba5){const _0x22e2d3=a176_0x4a5579,_0x322fea={..._0x4c6ba5};delete _0x322fea[_0x22e2d3(0x9a)];for(const _0x3cc5cd of INHERIT_WHITELIST){!(_0x3cc5cd in _0x322fea)&&_0x3cc5cd in _0x9eaab4&&(_0x322fea[_0x3cc5cd]=_0x9eaab4[_0x3cc5cd]);}const _0x31a05b=_0x4c6ba5[_0x22e2d3(0xa5)]&&typeof _0x4c6ba5['apps']===_0x22e2d3(0x98)?_0x4c6ba5[_0x22e2d3(0xa5)]:{};Object['keys'](_0x31a05b)[_0x22e2d3(0x90)]>0x0?_0x322fea[_0x22e2d3(0xa5)]=_0x31a05b:delete _0x322fea['apps'];if(_0x22e2d3(0xb1)in _0x4c6ba5)_0x322fea[_0x22e2d3(0xb1)]=_0x4c6ba5[_0x22e2d3(0xb1)];else Object[_0x22e2d3(0x9e)](_0x31a05b)['length']>0x0?_0x322fea['defaultApp']=Object[_0x22e2d3(0x9e)](_0x31a05b)[0x0]:delete _0x322fea[_0x22e2d3(0xb1)];return _0x322fea;}function mergeFullInherit(_0x4e1720,_0x7a0160){const _0x40d117=a176_0x4a5579,_0x536a5d=_0x4e1720[_0x40d117(0xa5)]&&typeof _0x4e1720[_0x40d117(0xa5)]==='object'?_0x4e1720[_0x40d117(0xa5)]:{},_0xe5f0fc=_0x7a0160[_0x40d117(0xa5)]&&typeof _0x7a0160[_0x40d117(0xa5)]===_0x40d117(0x98)?_0x7a0160[_0x40d117(0xa5)]:{},_0x40db83={..._0x536a5d,..._0xe5f0fc},_0x10a16e={..._0x4e1720,..._0x7a0160};delete _0x10a16e['inherit'];if(Object[_0x40d117(0x9e)](_0x40db83)[_0x40d117(0x90)]>0x0)_0x10a16e[_0x40d117(0xa5)]=_0x40db83;if('defaultApp'in _0x7a0160)_0x10a16e['defaultApp']=_0x7a0160['defaultApp'];else{if(Object[_0x40d117(0x9e)](_0xe5f0fc)[_0x40d117(0x90)]>0x0)_0x10a16e[_0x40d117(0xb1)]=Object[_0x40d117(0x9e)](_0xe5f0fc)[0x0];else{if(_0x4e1720[_0x40d117(0xb1)])_0x10a16e['defaultApp']=_0x4e1720['defaultApp'];else{const _0x209eb3=Object[_0x40d117(0x9e)](_0x536a5d);if(_0x209eb3['length']>0x0)_0x10a16e['defaultApp']=_0x209eb3[0x0];}}}return _0x10a16e;}export function readRawConfigWithLayers(_0x1ec4f3){const _0x3f3adc=loadRawConfigLayers(_0x1ec4f3);return{'config':mergeRawConfigLayers(_0x3f3adc),'layers':_0x3f3adc};}export function readRawConfig(_0xc203e){return mergeRawConfigLayers(loadRawConfigLayers(_0xc203e));}export function readConfigFile(_0x4e199a){const _0x431b33=a176_0x4a5579;return parseAndNormalizeConfig(_0x4e199a,_0x431b33(0xae));}export function writeConfigFile(_0x27fd9e,_0x41d10c){const _0x1f0d02=a176_0x4a5579,_0x5efb5a=dirname(_0x27fd9e);!existsSync(_0x5efb5a)&&mkdirSync(_0x5efb5a,{'recursive':!![]});const _0x284e40=_0x27fd9e+_0x1f0d02(0xa1);try{writeFileSync(_0x284e40,JSON[_0x1f0d02(0xb6)](_0x41d10c,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x284e40,_0x27fd9e);}catch(_0x3de44b){try{unlinkSync(_0x284e40);}catch{}throw _0x3de44b;}}export function resolveWriteConfigPath(_0x1f0b76){const _0xe18f38=a176_0x4a5579,_0x3fcf=_0x1f0b76===_0xe18f38(0xa9)?process[_0xe18f38(0x8f)]():homedir(),_0x108dbf=resolveConfigPath(_0x3fcf);return _0x108dbf??resolve(_0x3fcf,NEW_CONFIG_NAME);}
1
+ const a176_0x4313ff=a176_0x2be6;(function(_0x2ab01f,_0x164b2f){const _0x29a576=a176_0x2be6,_0x296353=_0x2ab01f();while(!![]){try{const _0x2835b3=-parseInt(_0x29a576(0xa8))/0x1+parseInt(_0x29a576(0xa5))/0x2+-parseInt(_0x29a576(0xbe))/0x3+parseInt(_0x29a576(0x9f))/0x4*(-parseInt(_0x29a576(0x9e))/0x5)+parseInt(_0x29a576(0xa0))/0x6*(parseInt(_0x29a576(0xa4))/0x7)+parseInt(_0x29a576(0xa3))/0x8+parseInt(_0x29a576(0xa7))/0x9;if(_0x2835b3===_0x164b2f)break;else _0x296353['push'](_0x296353['shift']());}catch(_0x1682cc){_0x296353['push'](_0x296353['shift']());}}}(a176_0x4455,0xc3c1c));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=['.rabetbase.json',a176_0x4313ff(0x92),a176_0x4313ff(0xbb)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a176_0x4313ff(0xac)](_0x59eaa6=>_0x59eaa6!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x240fc8){for(const _0x4ae749 of CONFIG_NAMES){const _0x109e4c=resolve(_0x240fc8,_0x4ae749);if(existsSync(_0x109e4c))return _0x109e4c;}return undefined;}export function findProjectRootDirectory(_0xcb2f50=process[a176_0x4313ff(0x9c)]()){let _0xfce44a=resolve(_0xcb2f50);const {root:_0x375dec}=parse(_0xfce44a),_0x51db7e=homedir();while(!![]){if(resolveConfigPath(_0xfce44a)){if(_0xfce44a===_0x51db7e)break;return _0xfce44a;}if(_0xfce44a===_0x375dec||_0xfce44a===_0x51db7e)break;const _0x28c24b=dirname(_0xfce44a);if(_0x28c24b===_0xfce44a)break;_0xfce44a=_0x28c24b;}return resolve(_0xcb2f50);}export function getProjectConfigPath(){const _0x1b9342=a176_0x4313ff;return resolveConfigPath(process[_0x1b9342(0x9c)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x1b3b63){const _0x4db85b=a176_0x4313ff;if(!existsSync(_0x1b3b63))return{'status':_0x4db85b(0xb0)};try{const _0x5cc30d=readFileSync(_0x1b3b63,{'encoding':_0x4db85b(0x96)});if(!_0x5cc30d?.['trim']())return{'status':_0x4db85b(0xba)};const _0x3f8842=JSON['parse'](_0x5cc30d);return{'status':'ok','data':_0x3f8842};}catch(_0x1ddc1a){return{'status':_0x4db85b(0xb4),'message':_0x1ddc1a instanceof Error?_0x1ddc1a['message']:String(_0x1ddc1a)};}}function parseCliConfigJsonFile(_0x2c678a,_0x550ac5,_0x36fe04){const _0x17a993=a176_0x4313ff,_0x16cab5=inspectCliConfigJsonFile(_0x2c678a);if(_0x16cab5[_0x17a993(0xc0)]===_0x17a993(0xb0)||_0x16cab5[_0x17a993(0xc0)]===_0x17a993(0xba))return{};if(_0x16cab5[_0x17a993(0xc0)]==='ok')return _0x16cab5[_0x17a993(0x97)];return _0x550ac5==='warn'&&_0x36fe04&&console[_0x17a993(0xb4)](CLI_BIN_NAME+':\x20'+_0x36fe04+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x2c678a+_0x17a993(0x9a)+_0x16cab5['message']),{};}function normalizeLegacyConfigShape(_0x1af8f2){const _0x5565c2=a176_0x4313ff;if(!_0x1af8f2||typeof _0x1af8f2!==_0x5565c2(0xb7))return{'config':{},'migrated':![]};const _0x4d6a6f={..._0x1af8f2},_0x14503c=_0x4d6a6f[_0x5565c2(0x99)]&&typeof _0x4d6a6f['apps']===_0x5565c2(0xb7)?{..._0x4d6a6f[_0x5565c2(0x99)]}:{},_0x24a0f1=Object[_0x5565c2(0x93)](_0x14503c)[_0x5565c2(0x95)],_0x4ebeae=_0x4d6a6f[_0x5565c2(0xb3)]||_0x4d6a6f[_0x5565c2(0x94)];let _0x2b56de=![];if(_0x4ebeae&&_0x24a0f1===0x0){const _0x9fbc57=typeof _0x4d6a6f[_0x5565c2(0xbc)]===_0x5565c2(0xa2)&&_0x4d6a6f[_0x5565c2(0xbc)][_0x5565c2(0xb9)]()?_0x4d6a6f[_0x5565c2(0xbc)]:String(_0x4ebeae)['trim']();_0x14503c[_0x9fbc57]={'appcode':String(_0x4ebeae)[_0x5565c2(0xb9)](),..._0x4d6a6f[_0x5565c2(0xb5)]!=null?{'env':_0x4d6a6f[_0x5565c2(0xb5)]}:{},..._0x4d6a6f[_0x5565c2(0xad)]!=null?{'apiDir':_0x4d6a6f['apiDir']}:{},..._0x4d6a6f[_0x5565c2(0x9d)]!=null?{'cookie':_0x4d6a6f[_0x5565c2(0x9d)]}:{},..._0x4d6a6f['accessKey']!=null?{'accessKey':_0x4d6a6f[_0x5565c2(0xae)]}:{},..._0x4d6a6f[_0x5565c2(0xa1)]!=null?{'format':_0x4d6a6f['format']}:{},..._0x4d6a6f[_0x5565c2(0xab)]!=null?{'pageSize':_0x4d6a6f[_0x5565c2(0xab)]}:{},..._0x4d6a6f[_0x5565c2(0xa9)]!=null?{'riskLevel':_0x4d6a6f[_0x5565c2(0xa9)]}:{},..._0x4d6a6f[_0x5565c2(0xb1)]!=null?{'locale':_0x4d6a6f[_0x5565c2(0xb1)]}:{}},_0x4d6a6f[_0x5565c2(0x99)]=_0x14503c;if(!_0x4d6a6f[_0x5565c2(0xbc)])_0x4d6a6f[_0x5565c2(0xbc)]=_0x9fbc57;_0x2b56de=!![];}return(_0x5565c2(0xb3)in _0x4d6a6f||_0x5565c2(0x94)in _0x4d6a6f)&&(delete _0x4d6a6f[_0x5565c2(0xb3)],delete _0x4d6a6f[_0x5565c2(0x94)],_0x2b56de=!![]),{'config':_0x4d6a6f,'migrated':_0x2b56de};}function writeNormalizedConfigIfNeeded(_0x179f12,_0x40ab5d){const _0xf75efc=a176_0x4313ff,_0x1ca12f=JSON['stringify'](_0x40ab5d,null,0x2)+'\x0a';if(normalizedWriteCache[_0xf75efc(0x9b)](_0x179f12)===_0x1ca12f)return;writeConfigFile(_0x179f12,_0x40ab5d),normalizedWriteCache[_0xf75efc(0xb6)](_0x179f12,_0x1ca12f);}function parseAndNormalizeConfig(_0x507b22,_0x1197b9,_0x15bfb6){const _0x18a4f9=a176_0x4313ff,_0x18dda8=parseCliConfigJsonFile(_0x507b22,_0x1197b9,_0x15bfb6),_0x187a29=normalizeLegacyConfigShape(_0x18dda8);if(_0x187a29['migrated'])try{writeNormalizedConfigIfNeeded(_0x507b22,_0x187a29[_0x18a4f9(0xb8)]);}catch{}return _0x187a29[_0x18a4f9(0xb8)];}export function loadRawConfigLayers(_0x24ff9e){const _0x12f018=a176_0x4313ff;let _0x33898={},_0x2846cd={};const _0x729814=resolveConfigPath(homedir());_0x729814&&(_0x33898=parseAndNormalizeConfig(_0x729814,'warn','Global'));const _0x411d44=_0x24ff9e??findProjectRootDirectory(),_0x27967c=resolveConfigPath(_0x411d44);return _0x27967c&&(_0x2846cd=parseAndNormalizeConfig(_0x27967c,_0x12f018(0xbd),_0x12f018(0xaa))),{'globalPath':_0x729814,'projectPath':_0x27967c,'globalConfig':_0x33898,'projectConfig':_0x2846cd};}const INHERIT_WHITELIST=[a176_0x4313ff(0x9d),a176_0x4313ff(0xae),'locale',a176_0x4313ff(0xa1),a176_0x4313ff(0xa9),'pageSize'];export function mergeRawConfigLayers(_0x14fa5e){const _0x2e4b55=a176_0x4313ff,{globalConfig:_0x436832,projectConfig:_0x34784c}=_0x14fa5e,_0xf8e0df=Object[_0x2e4b55(0x93)](_0x34784c)['length']>0x0;if(!_0xf8e0df)return mergeGlobalOnly(_0x436832);if(_0x34784c[_0x2e4b55(0xaf)]===!![])return mergeFullInherit(_0x436832,_0x34784c);if(_0x34784c[_0x2e4b55(0xaf)]===![])return mergeIsolated(_0x34784c);return mergeProjectFirst(_0x436832,_0x34784c);}function mergeGlobalOnly(_0x4c8864){const _0x1347a1=a176_0x4313ff,_0x237ad7={..._0x4c8864},_0x522681=_0x4c8864[_0x1347a1(0x99)]&&typeof _0x4c8864[_0x1347a1(0x99)]===_0x1347a1(0xb7)?_0x4c8864['apps']:{};if(Object[_0x1347a1(0x93)](_0x522681)[_0x1347a1(0x95)]>0x0)_0x237ad7[_0x1347a1(0x99)]=_0x522681;if(_0x4c8864[_0x1347a1(0xbc)])_0x237ad7[_0x1347a1(0xbc)]=_0x4c8864[_0x1347a1(0xbc)];else{const _0x405676=Object[_0x1347a1(0x93)](_0x522681);if(_0x405676['length']>0x0)_0x237ad7[_0x1347a1(0xbc)]=_0x405676[0x0];}return _0x237ad7;}function mergeIsolated(_0x1338b4){const _0x296da4=a176_0x4313ff,_0x1048de={..._0x1338b4};delete _0x1048de['inherit'];const _0x104513=_0x1338b4[_0x296da4(0x99)]&&typeof _0x1338b4[_0x296da4(0x99)]===_0x296da4(0xb7)?_0x1338b4[_0x296da4(0x99)]:{};Object[_0x296da4(0x93)](_0x104513)[_0x296da4(0x95)]>0x0?_0x1048de[_0x296da4(0x99)]=_0x104513:delete _0x1048de[_0x296da4(0x99)];if(_0x296da4(0xbc)in _0x1338b4)_0x1048de[_0x296da4(0xbc)]=_0x1338b4[_0x296da4(0xbc)];else Object['keys'](_0x104513)[_0x296da4(0x95)]>0x0?_0x1048de[_0x296da4(0xbc)]=Object['keys'](_0x104513)[0x0]:delete _0x1048de[_0x296da4(0xbc)];return _0x1048de;}function mergeProjectFirst(_0x5b0419,_0xea348f){const _0x588312=a176_0x4313ff,_0x5dfda5={..._0xea348f};delete _0x5dfda5[_0x588312(0xaf)];for(const _0x53f122 of INHERIT_WHITELIST){!(_0x53f122 in _0x5dfda5)&&_0x53f122 in _0x5b0419&&(_0x5dfda5[_0x53f122]=_0x5b0419[_0x53f122]);}const _0x2c0756=_0xea348f[_0x588312(0x99)]&&typeof _0xea348f[_0x588312(0x99)]===_0x588312(0xb7)?_0xea348f[_0x588312(0x99)]:{};Object[_0x588312(0x93)](_0x2c0756)[_0x588312(0x95)]>0x0?_0x5dfda5['apps']=_0x2c0756:delete _0x5dfda5[_0x588312(0x99)];if('defaultApp'in _0xea348f)_0x5dfda5['defaultApp']=_0xea348f[_0x588312(0xbc)];else Object[_0x588312(0x93)](_0x2c0756)[_0x588312(0x95)]>0x0?_0x5dfda5['defaultApp']=Object[_0x588312(0x93)](_0x2c0756)[0x0]:delete _0x5dfda5['defaultApp'];return _0x5dfda5;}function a176_0x4455(){const _0x40ff0a=['appcode','error','env','set','object','config','trim','empty','.lovrabetrc','defaultApp','warn','745404NAUXwB','project','status','.lovrabet.json','keys','app','length','utf8','data','silent','apps','\x0a\x20\x20','get','cwd','cookie','4835RCSBYT','940bSFDRH','663864MPCpYC','format','string','815992loQlQc','7rSSKnn','2386568fgxDHO','.tmp','10918431piuyVL','1341553lqwTRT','riskLevel','Project','pageSize','filter','apiDir','accessKey','inherit','missing','locale','stringify'];a176_0x4455=function(){return _0x40ff0a;};return a176_0x4455();}function mergeFullInherit(_0xad4cdc,_0x4915fb){const _0x15ab06=a176_0x4313ff,_0x2ff7c8=_0xad4cdc['apps']&&typeof _0xad4cdc[_0x15ab06(0x99)]==='object'?_0xad4cdc[_0x15ab06(0x99)]:{},_0x6f2932=_0x4915fb[_0x15ab06(0x99)]&&typeof _0x4915fb['apps']===_0x15ab06(0xb7)?_0x4915fb['apps']:{},_0x436f09={..._0x2ff7c8,..._0x6f2932},_0x252187={..._0xad4cdc,..._0x4915fb};delete _0x252187['inherit'];if(Object['keys'](_0x436f09)['length']>0x0)_0x252187[_0x15ab06(0x99)]=_0x436f09;if(_0x15ab06(0xbc)in _0x4915fb)_0x252187['defaultApp']=_0x4915fb[_0x15ab06(0xbc)];else{if(Object[_0x15ab06(0x93)](_0x6f2932)[_0x15ab06(0x95)]>0x0)_0x252187['defaultApp']=Object['keys'](_0x6f2932)[0x0];else{if(_0xad4cdc[_0x15ab06(0xbc)])_0x252187[_0x15ab06(0xbc)]=_0xad4cdc[_0x15ab06(0xbc)];else{const _0x326dbc=Object[_0x15ab06(0x93)](_0x2ff7c8);if(_0x326dbc['length']>0x0)_0x252187['defaultApp']=_0x326dbc[0x0];}}}return _0x252187;}export function readRawConfigWithLayers(_0x33d568){const _0x211bc2=loadRawConfigLayers(_0x33d568);return{'config':mergeRawConfigLayers(_0x211bc2),'layers':_0x211bc2};}export function readRawConfig(_0x42de09){return mergeRawConfigLayers(loadRawConfigLayers(_0x42de09));}export function readConfigFile(_0x4ba466){const _0x432f54=a176_0x4313ff;return parseAndNormalizeConfig(_0x4ba466,_0x432f54(0x98));}export function writeConfigFile(_0x56747f,_0x3b9cd9){const _0x41065b=a176_0x4313ff,_0x505f23=dirname(_0x56747f);!existsSync(_0x505f23)&&mkdirSync(_0x505f23,{'recursive':!![]});const _0x51f063=_0x56747f+_0x41065b(0xa6);try{writeFileSync(_0x51f063,JSON[_0x41065b(0xb2)](_0x3b9cd9,null,0x2)+'\x0a',{'encoding':_0x41065b(0x96),'mode':0x180}),renameSync(_0x51f063,_0x56747f);}catch(_0xb8d04c){try{unlinkSync(_0x51f063);}catch{}throw _0xb8d04c;}}function a176_0x2be6(_0x3834bc,_0x399e69){_0x3834bc=_0x3834bc-0x92;const _0x4455af=a176_0x4455();let _0x2be6fd=_0x4455af[_0x3834bc];return _0x2be6fd;}export function resolveWriteConfigPath(_0x5987de){const _0x10ff31=a176_0x4313ff,_0x40a58a=_0x5987de===_0x10ff31(0xbf)?process[_0x10ff31(0x9c)]():homedir(),_0x18f3c0=resolveConfigPath(_0x40a58a);return _0x18f3c0??resolve(_0x40a58a,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a177_0x9871a=a177_0x1b6b;function a177_0x1b6b(_0x539976,_0x44f031){_0x539976=_0x539976-0x12b;const _0x4b62ff=a177_0x4b62();let _0x1b6bf7=_0x4b62ff[_0x539976];return _0x1b6bf7;}(function(_0x40d704,_0x26f214){const _0x4e2699=a177_0x1b6b,_0x26b541=_0x40d704();while(!![]){try{const _0x3c8dbc=-parseInt(_0x4e2699(0x136))/0x1+parseInt(_0x4e2699(0x135))/0x2*(parseInt(_0x4e2699(0x140))/0x3)+-parseInt(_0x4e2699(0x148))/0x4*(parseInt(_0x4e2699(0x13e))/0x5)+parseInt(_0x4e2699(0x13c))/0x6+-parseInt(_0x4e2699(0x13f))/0x7+parseInt(_0x4e2699(0x12c))/0x8+parseInt(_0x4e2699(0x130))/0x9*(parseInt(_0x4e2699(0x154))/0xa);if(_0x3c8dbc===_0x26f214)break;else _0x26b541['push'](_0x26b541['shift']());}catch(_0x35631e){_0x26b541['push'](_0x26b541['shift']());}}}(a177_0x4b62,0xe041d));function a177_0x4b62(){const _0x79f0db=['9psrcWu','project','string','defaultApp','app','826556bIzSpa','1617962DCPCLm','https://g.lovrabet.com/dist/lovrabet-skill','filter','apiDir','apiDomain','template_base_url','9039048ZFMjaC','object','6190RGwLAx','7730912kbjTVh','6WBwYlQ','find','userDomain','argv','projectConfig','-api.ts','./constant/env.js','./constant/domain.js','776YZoneP','env','apps','setLogPath','join','globalConfig','appcode','values','merged','keys','cwd','trim','1845590JyAOIs','api.ts','10907872FGExUr','entries','replace','./utils/is-non-interactive.js'];a177_0x4b62=function(){return _0x79f0db;};return a177_0x4b62();}import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x36a536){return process.env[`RABETBASE_${_0x36a536}`]||process.env[`LOVRABET_${_0x36a536}`]||undefined;}export async function createContext(_0x3e1540){const _0x26c04a=a177_0x1b6b,{config:_0x4cd8f5,layers:_0x635933}=readRawConfigWithLayers(),_0x2339d8=buildConfig(_0x4cd8f5,_0x3e1540,_0x635933),{initEnv:_0x35d44f}=await import(_0x26c04a(0x146));if(_0x2339d8[_0x26c04a(0x149)])_0x35d44f(_0x2339d8['env']);else _0x3e1540['env']&&typeof _0x3e1540[_0x26c04a(0x149)]===_0x26c04a(0x132)&&_0x35d44f(_0x3e1540[_0x26c04a(0x149)]);const {initDomains:_0x3655b3,getUserDomain:_0x1e01f9,getApiDomain:_0x223219}=await import(_0x26c04a(0x147));_0x3655b3({'apiDomain':_0x4cd8f5[_0x26c04a(0x13a)]||undefined,'userDomain':_0x4cd8f5[_0x26c04a(0x142)]||undefined,'runtimeDomain':_0x4cd8f5['runtimeDomain']||undefined});const _0x4bd849={'apiDomain':_0x223219(),'userDomain':_0x1e01f9()},_0x7aabe1=await buildAuth(_0x2339d8);logger[_0x26c04a(0x14b)](process[_0x26c04a(0x152)]());const _0x4aa06b=(CLI_BIN_NAME+'\x20'+process[_0x26c04a(0x143)]['slice'](0x2)[_0x26c04a(0x14c)]('\x20'))[_0x26c04a(0x153)]();logger['setRawCommand'](_0x4aa06b);const {isNonInteractive:_0x37a592}=await import(_0x26c04a(0x12f)),_0x5f3557=_0x37a592(_0x3e1540);return{'config':_0x2339d8,'auth':_0x7aabe1,'logger':logger,'env':_0x4bd849,'nonInteractive':_0x5f3557};}export function buildConfigFromFlags(_0x1b4647){const {config:_0x147f87,layers:_0x287136}=readRawConfigWithLayers();return buildConfig(_0x147f87,_0x1b4647,_0x287136);}export function getConfigAppCode(_0x477581){const _0x34265a=a177_0x1b6b,_0x10dd5d=readRawConfig(_0x477581);if(_0x10dd5d[_0x34265a(0x14a)]&&typeof _0x10dd5d[_0x34265a(0x14a)]===_0x34265a(0x13d)){const _0xf748c5=_0x10dd5d[_0x34265a(0x133)];if(_0xf748c5&&_0x10dd5d[_0x34265a(0x14a)][_0xf748c5]?.[_0x34265a(0x14e)])return String(_0x10dd5d[_0x34265a(0x14a)][_0xf748c5][_0x34265a(0x14e)])[_0x34265a(0x153)]();const _0x30a31a=Object[_0x34265a(0x14f)](_0x10dd5d[_0x34265a(0x14a)])[0x0];if(_0x30a31a?.['appcode'])return String(_0x30a31a[_0x34265a(0x14e)])[_0x34265a(0x153)]();}const _0x60e715=_0x10dd5d['appcode']||_0x10dd5d[_0x34265a(0x134)];if(typeof _0x60e715!==_0x34265a(0x132)||_0x60e715[_0x34265a(0x153)]()==='')return undefined;return _0x60e715['trim']();}export function getMultiAppConfigs(_0x5a8992=a177_0x9871a(0x131),_0x5c36ae){const _0x570559=a177_0x9871a,_0xafbace=loadRawConfigLayers(_0x5c36ae);let _0x35ee8f,_0x60eba;if(_0x5a8992===_0x570559(0x150)){const _0x598755=_0xafbace[_0x570559(0x14d)]['apps']&&typeof _0xafbace[_0x570559(0x14d)]['apps']===_0x570559(0x13d)?_0xafbace[_0x570559(0x14d)][_0x570559(0x14a)]:{},_0x487d10=_0xafbace[_0x570559(0x144)][_0x570559(0x14a)]&&typeof _0xafbace[_0x570559(0x144)][_0x570559(0x14a)]===_0x570559(0x13d)?_0xafbace[_0x570559(0x144)]['apps']:{};_0x35ee8f={..._0x598755,..._0x487d10};const _0x247cc4=readRawConfig(_0x5c36ae);_0x60eba=_0x247cc4[_0x570559(0x133)];}else _0x35ee8f=_0xafbace[_0x570559(0x144)][_0x570559(0x14a)],_0x60eba=_0xafbace[_0x570559(0x144)]['defaultApp'];if(!_0x35ee8f||typeof _0x35ee8f!==_0x570559(0x13d)||Object[_0x570559(0x151)](_0x35ee8f)['length']===0x0)return null;return Object[_0x570559(0x12d)](_0x35ee8f)['map'](([_0x58cd95,_0x18e1c1])=>({'name':_0x58cd95,'appcode':_0x18e1c1?.[_0x570559(0x14e)]||'','isDefault':_0x58cd95===_0x60eba,'env':_0x18e1c1?.[_0x570559(0x149)],'apiDir':_0x18e1c1?.[_0x570559(0x139)],'cookie':_0x18e1c1?.['cookie']||undefined}))[_0x570559(0x138)](_0x4456a0=>_0x4456a0['appcode']);}export function getTemplateBaseUrl(_0x188c06){const _0x2988ae=a177_0x9871a,_0x304e9c=readRawConfig(_0x188c06);if(_0x304e9c['template_base_url']&&typeof _0x304e9c[_0x2988ae(0x13b)]==='string')return _0x304e9c[_0x2988ae(0x13b)][_0x2988ae(0x12e)](/\/$/,'');return _0x2988ae(0x137);}function buildConfig(_0x3b76b7,_0x2d1eec,_0x59c886){return{...resolveAppConfig({'raw':_0x3b76b7,'flags':_0x2d1eec,'layers':_0x59c886,'readEnv':env}),'raw':_0x3b76b7};}export function resolveApiFilePath(_0x18b10f,_0x1597d4){const _0x2498b9=a177_0x9871a,_0x5cfb22=resolve(process[_0x2498b9(0x152)](),_0x18b10f),_0x255962=resolve(_0x5cfb22,_0x2498b9(0x12b));if(!_0x1597d4)return _0x255962;const _0x229b8d=readRawConfig(),_0xacaab4=_0x229b8d[_0x2498b9(0x14a)]&&typeof _0x229b8d['apps']===_0x2498b9(0x13d)?_0x229b8d[_0x2498b9(0x14a)]:{},_0x928b02=Object[_0x2498b9(0x12d)](_0xacaab4)[_0x2498b9(0x141)](([,_0x23fd2c])=>_0x23fd2c?.['appcode']===_0x1597d4);if(!_0x928b02)return _0x255962;const [_0x358cb1,_0x24776d]=_0x928b02,_0x3074e6=typeof _0x229b8d[_0x2498b9(0x133)]===_0x2498b9(0x132)?_0x229b8d[_0x2498b9(0x133)]:undefined;if(_0x24776d?.['apiDir'])return _0x255962;if(_0x3074e6&&_0x358cb1!==_0x3074e6)return resolve(_0x5cfb22,_0x358cb1+_0x2498b9(0x145));return _0x255962;}
1
+ const a177_0x4b802a=a177_0x45a1;(function(_0x3fb3b8,_0x97d98a){const _0x3acd27=a177_0x45a1,_0x41c121=_0x3fb3b8();while(!![]){try{const _0x1cb14f=-parseInt(_0x3acd27(0xc3))/0x1*(parseInt(_0x3acd27(0xc6))/0x2)+parseInt(_0x3acd27(0xd5))/0x3+parseInt(_0x3acd27(0xdb))/0x4+-parseInt(_0x3acd27(0xd4))/0x5*(parseInt(_0x3acd27(0xbd))/0x6)+parseInt(_0x3acd27(0xc7))/0x7*(-parseInt(_0x3acd27(0xcf))/0x8)+parseInt(_0x3acd27(0xc4))/0x9+-parseInt(_0x3acd27(0xdf))/0xa*(-parseInt(_0x3acd27(0xbb))/0xb);if(_0x1cb14f===_0x97d98a)break;else _0x41c121['push'](_0x41c121['shift']());}catch(_0x43cf71){_0x41c121['push'](_0x41c121['shift']());}}}(a177_0x28e0,0x9bf3b));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x3299b8){return process.env[`RABETBASE_${_0x3299b8}`]||process.env[`LOVRABET_${_0x3299b8}`]||undefined;}function a177_0x45a1(_0xa9a60f,_0xa43b8b){_0xa9a60f=_0xa9a60f-0xb6;const _0x28e02b=a177_0x28e0();let _0x45a1d8=_0x28e02b[_0xa9a60f];return _0x45a1d8;}export async function createContext(_0x3ab6e2){const _0x5b4266=a177_0x45a1,{config:_0x810d07,layers:_0x802b1a}=readRawConfigWithLayers(),_0x1821a4=buildConfig(_0x810d07,_0x3ab6e2,_0x802b1a),{initEnv:_0x43616a}=await import(_0x5b4266(0xdc));if(_0x1821a4[_0x5b4266(0xbc)])_0x43616a(_0x1821a4[_0x5b4266(0xbc)]);else _0x3ab6e2['env']&&typeof _0x3ab6e2[_0x5b4266(0xbc)]===_0x5b4266(0xba)&&_0x43616a(_0x3ab6e2['env']);const {initDomains:_0x583867,getUserDomain:_0x3c8f08,getApiDomain:_0x13183d}=await import(_0x5b4266(0xe0));_0x583867({'apiDomain':_0x810d07[_0x5b4266(0xcc)]||undefined,'userDomain':_0x810d07[_0x5b4266(0xd1)]||undefined,'runtimeDomain':_0x810d07[_0x5b4266(0xb6)]||undefined});const _0x2f498e={'apiDomain':_0x13183d(),'userDomain':_0x3c8f08()},_0x1cef20=await buildAuth(_0x1821a4);logger[_0x5b4266(0xdd)](process[_0x5b4266(0xc1)]());const _0x186189=(CLI_BIN_NAME+'\x20'+process[_0x5b4266(0xc9)][_0x5b4266(0xd9)](0x2)[_0x5b4266(0xd6)]('\x20'))[_0x5b4266(0xda)]();logger['setRawCommand'](_0x186189);const {isNonInteractive:_0x1a530d}=await import(_0x5b4266(0xb7)),_0x5123f0=_0x1a530d(_0x3ab6e2);return{'config':_0x1821a4,'auth':_0x1cef20,'logger':logger,'env':_0x2f498e,'nonInteractive':_0x5123f0};}function a177_0x28e0(){const _0x5ea699=['trim','1258932dDGmcW','./constant/env.js','setLogPath','defaultApp','20ObecmT','./constant/domain.js','runtimeDomain','./utils/is-non-interactive.js','find','filter','string','3095554FDfLuY','env','101052sFOJAd','replace','keys','template_base_url','cwd','appcode','1104401FmvgrG','11245923FEPpyv','object','2tPxImy','217FhfIzz','app','argv','map','values','apiDomain','project','-api.ts','56616aSAQpO','apps','userDomain','globalConfig','apiDir','290PSWOps','2436885OLmpGn','join','api.ts','projectConfig','slice'];a177_0x28e0=function(){return _0x5ea699;};return a177_0x28e0();}export function buildConfigFromFlags(_0x404d2a){const {config:_0x34fbc8,layers:_0x47146b}=readRawConfigWithLayers();return buildConfig(_0x34fbc8,_0x404d2a,_0x47146b);}export function getConfigAppCode(_0x1ca379){const _0x3b1b61=a177_0x45a1,_0x8a656=readRawConfig(_0x1ca379);if(_0x8a656['apps']&&typeof _0x8a656[_0x3b1b61(0xd0)]===_0x3b1b61(0xc5)){const _0x1ef595=_0x8a656['defaultApp'];if(_0x1ef595&&_0x8a656[_0x3b1b61(0xd0)][_0x1ef595]?.['appcode'])return String(_0x8a656[_0x3b1b61(0xd0)][_0x1ef595][_0x3b1b61(0xc2)])[_0x3b1b61(0xda)]();const _0x1dd3e=Object[_0x3b1b61(0xcb)](_0x8a656[_0x3b1b61(0xd0)])[0x0];if(_0x1dd3e?.[_0x3b1b61(0xc2)])return String(_0x1dd3e['appcode'])[_0x3b1b61(0xda)]();}const _0x240003=_0x8a656['appcode']||_0x8a656[_0x3b1b61(0xc8)];if(typeof _0x240003!==_0x3b1b61(0xba)||_0x240003['trim']()==='')return undefined;return _0x240003[_0x3b1b61(0xda)]();}export function getMultiAppConfigs(_0x34541b=a177_0x4b802a(0xcd),_0x26617c){const _0x35861c=a177_0x4b802a,_0x839137=loadRawConfigLayers(_0x26617c);let _0x5cd52b,_0x49ec03;if(_0x34541b==='merged'){const _0x50ea18=_0x839137[_0x35861c(0xd2)][_0x35861c(0xd0)]&&typeof _0x839137[_0x35861c(0xd2)][_0x35861c(0xd0)]===_0x35861c(0xc5)?_0x839137[_0x35861c(0xd2)][_0x35861c(0xd0)]:{},_0x5c994b=_0x839137['projectConfig'][_0x35861c(0xd0)]&&typeof _0x839137[_0x35861c(0xd8)]['apps']===_0x35861c(0xc5)?_0x839137['projectConfig'][_0x35861c(0xd0)]:{};_0x5cd52b={..._0x50ea18,..._0x5c994b};const _0x546469=readRawConfig(_0x26617c);_0x49ec03=_0x546469[_0x35861c(0xde)];}else _0x5cd52b=_0x839137[_0x35861c(0xd8)][_0x35861c(0xd0)],_0x49ec03=_0x839137[_0x35861c(0xd8)][_0x35861c(0xde)];if(!_0x5cd52b||typeof _0x5cd52b!==_0x35861c(0xc5)||Object[_0x35861c(0xbf)](_0x5cd52b)['length']===0x0)return null;return Object['entries'](_0x5cd52b)[_0x35861c(0xca)](([_0x1b28ed,_0x390bb0])=>({'name':_0x1b28ed,'appcode':_0x390bb0?.[_0x35861c(0xc2)]||'','isDefault':_0x1b28ed===_0x49ec03,'env':_0x390bb0?.[_0x35861c(0xbc)],'apiDir':_0x390bb0?.[_0x35861c(0xd3)],'cookie':_0x390bb0?.['cookie']||undefined}))[_0x35861c(0xb9)](_0x58208e=>_0x58208e[_0x35861c(0xc2)]);}export function getTemplateBaseUrl(_0x353820){const _0x1bf0fa=a177_0x4b802a,_0x40c281=readRawConfig(_0x353820);if(_0x40c281[_0x1bf0fa(0xc0)]&&typeof _0x40c281['template_base_url']===_0x1bf0fa(0xba))return _0x40c281[_0x1bf0fa(0xc0)][_0x1bf0fa(0xbe)](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}function buildConfig(_0x18d2d0,_0x3c9759,_0x44c8e8){return{...resolveAppConfig({'raw':_0x18d2d0,'flags':_0x3c9759,'layers':_0x44c8e8,'readEnv':env}),'raw':_0x18d2d0};}export function resolveApiFilePath(_0x1e3d0c,_0x34e6ec){const _0x58fc19=a177_0x4b802a,_0x57b498=resolve(process[_0x58fc19(0xc1)](),_0x1e3d0c),_0xded6ba=resolve(_0x57b498,_0x58fc19(0xd7));if(!_0x34e6ec)return _0xded6ba;const _0x351aa0=readRawConfig(),_0xb6ab8a=_0x351aa0[_0x58fc19(0xd0)]&&typeof _0x351aa0[_0x58fc19(0xd0)]===_0x58fc19(0xc5)?_0x351aa0[_0x58fc19(0xd0)]:{},_0x50409c=Object['entries'](_0xb6ab8a)[_0x58fc19(0xb8)](([,_0x52e3a5])=>_0x52e3a5?.[_0x58fc19(0xc2)]===_0x34e6ec);if(!_0x50409c)return _0xded6ba;const [_0x5d7738,_0x530df1]=_0x50409c,_0x2f3e32=typeof _0x351aa0[_0x58fc19(0xde)]==='string'?_0x351aa0[_0x58fc19(0xde)]:undefined;if(_0x530df1?.[_0x58fc19(0xd3)])return _0xded6ba;if(_0x2f3e32&&_0x5d7738!==_0x2f3e32)return resolve(_0x57b498,_0x5d7738+_0x58fc19(0xce));return _0xded6ba;}
@@ -1 +1 @@
1
- (function(_0x514d1d,_0x5a18d3){const _0x15df70=a178_0x2f3b,_0x1a99cb=_0x514d1d();while(!![]){try{const _0xfde4b=parseInt(_0x15df70(0xe4))/0x1*(-parseInt(_0x15df70(0xde))/0x2)+parseInt(_0x15df70(0xef))/0x3+-parseInt(_0x15df70(0xea))/0x4*(parseInt(_0x15df70(0xdc))/0x5)+-parseInt(_0x15df70(0xe1))/0x6+-parseInt(_0x15df70(0xeb))/0x7+parseInt(_0x15df70(0xee))/0x8+parseInt(_0x15df70(0xec))/0x9*(parseInt(_0x15df70(0xe9))/0xa);if(_0xfde4b===_0x5a18d3)break;else _0x1a99cb['push'](_0x1a99cb['shift']());}catch(_0x4cb751){_0x1a99cb['push'](_0x1a99cb['shift']());}}}(a178_0x12f3,0x89104));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x481cf2){const _0x491e49=a178_0x2f3b,_0x263be8=[],_0x9c0d44=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x1c9394;while((_0x1c9394=_0x9c0d44[_0x491e49(0xe7)](_0x481cf2))!==null){_0x263be8[_0x491e49(0xe5)]({'datasetCode':_0x1c9394[0x1],'tableName':_0x1c9394[0x2],'name':_0x1c9394[0x3],'alias':_0x1c9394[0x4]});}return _0x263be8;}export function loadAliasMap(_0x5112ff,_0x1b44b1,_0x24f040){const _0x5c2d08=a178_0x2f3b,_0x5cffc5=_0x24f040??resolve(process['cwd'](),_0x5112ff,_0x5c2d08(0xe6));if(cache[_0x5c2d08(0xe0)](_0x5cffc5))return cache[_0x5c2d08(0xed)](_0x5cffc5);if(!existsSync(_0x5cffc5))return cache['set'](_0x5cffc5,[]),[];try{const _0x48fd8c=readFileSync(_0x5cffc5,_0x5c2d08(0xe8)),_0x504a21=parseApiFile(_0x48fd8c);return cache[_0x5c2d08(0xe2)](_0x5cffc5,_0x504a21),_0x504a21;}catch{return cache[_0x5c2d08(0xe2)](_0x5cffc5,[]),[];}}export function resolveAlias(_0x347283,_0x3436f4,_0x56a4b8,_0x5d171d){const _0x54a6b3=a178_0x2f3b;if(!_0x3436f4)return undefined;const _0x3c51d5=loadAliasMap(_0x347283,_0x56a4b8,_0x5d171d),_0x4eed94=_0x3c51d5[_0x54a6b3(0xdf)](_0x3831f2=>_0x3831f2[_0x54a6b3(0xdd)]===_0x3436f4);return _0x4eed94?.[_0x54a6b3(0xe3)];}export function listAliases(_0x5d698d,_0x31688d,_0x5b0939){return loadAliasMap(_0x5d698d,_0x31688d,_0x5b0939);}function a178_0x2f3b(_0x15d839,_0x41a591){_0x15d839=_0x15d839-0xdc;const _0x12f3e0=a178_0x12f3();let _0x2f3bf1=_0x12f3e0[_0x15d839];return _0x2f3bf1;}function a178_0x12f3(){const _0x409b53=['68IKLiqx','5778626xHigVm','4149gFBKuc','get','4123016pbbgvC','2928825fxKHPy','267055xcTaOL','alias','9466ywheHB','find','has','2789262speyUZ','set','datasetCode','113RLqYRv','push','api.ts','exec','utf-8','39110AKxSCS'];a178_0x12f3=function(){return _0x409b53;};return a178_0x12f3();}
1
+ (function(_0x2f22a8,_0x22a10d){const _0x4aff53=a178_0xa288,_0x70ec1=_0x2f22a8();while(!![]){try{const _0x4926dc=-parseInt(_0x4aff53(0x1ff))/0x1*(parseInt(_0x4aff53(0x1fd))/0x2)+parseInt(_0x4aff53(0x1f0))/0x3*(-parseInt(_0x4aff53(0x1f9))/0x4)+-parseInt(_0x4aff53(0x1ef))/0x5*(-parseInt(_0x4aff53(0x1f6))/0x6)+-parseInt(_0x4aff53(0x1fc))/0x7+-parseInt(_0x4aff53(0x1f3))/0x8+parseInt(_0x4aff53(0x1f7))/0x9*(parseInt(_0x4aff53(0x1fa))/0xa)+parseInt(_0x4aff53(0x1ee))/0xb;if(_0x4926dc===_0x22a10d)break;else _0x70ec1['push'](_0x70ec1['shift']());}catch(_0x561c17){_0x70ec1['push'](_0x70ec1['shift']());}}}(a178_0x512e,0xac380));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x17f5b1){const _0x53033b=a178_0xa288,_0x37a8f8=[],_0x256a0a=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x4942f0;while((_0x4942f0=_0x256a0a[_0x53033b(0x1f4)](_0x17f5b1))!==null){_0x37a8f8['push']({'datasetCode':_0x4942f0[0x1],'tableName':_0x4942f0[0x2],'name':_0x4942f0[0x3],'alias':_0x4942f0[0x4]});}return _0x37a8f8;}export function loadAliasMap(_0x3959bd,_0x7e86ab,_0x323b65){const _0x518a2c=a178_0xa288,_0x4a4c00=_0x323b65??resolve(process[_0x518a2c(0x1f5)](),_0x3959bd,_0x518a2c(0x1ed));if(cache[_0x518a2c(0x1f1)](_0x4a4c00))return cache['get'](_0x4a4c00);if(!existsSync(_0x4a4c00))return cache['set'](_0x4a4c00,[]),[];try{const _0x46eae1=readFileSync(_0x4a4c00,_0x518a2c(0x1fe)),_0x3c00cf=parseApiFile(_0x46eae1);return cache['set'](_0x4a4c00,_0x3c00cf),_0x3c00cf;}catch{return cache[_0x518a2c(0x1f8)](_0x4a4c00,[]),[];}}export function resolveAlias(_0x15db9e,_0x4015cf,_0xa31edf,_0x4286e0){const _0x18a862=a178_0xa288;if(!_0x4015cf)return undefined;const _0x3690a4=loadAliasMap(_0x15db9e,_0xa31edf,_0x4286e0),_0x2cb107=_0x3690a4[_0x18a862(0x1fb)](_0x20b8f6=>_0x20b8f6[_0x18a862(0x1ec)]===_0x4015cf);return _0x2cb107?.[_0x18a862(0x1f2)];}function a178_0x512e(){const _0x5cf89b=['alias','api.ts','26302859ENFgOm','4628385yFRcqV','249UENFtB','has','datasetCode','8229816VxwBuB','exec','cwd','6kmObXe','39636dOPAol','set','1576ZApIhe','1430STVZMu','find','7175112Moieng','56330mHacqc','utf-8','41kMhojb'];a178_0x512e=function(){return _0x5cf89b;};return a178_0x512e();}function a178_0xa288(_0x220ba5,_0x2f3201){_0x220ba5=_0x220ba5-0x1ec;const _0x512ea2=a178_0x512e();let _0xa2880f=_0x512ea2[_0x220ba5];return _0xa2880f;}export function listAliases(_0x30b478,_0x212a4a,_0x32406e){return loadAliasMap(_0x30b478,_0x212a4a,_0x32406e);}
@@ -1 +1 @@
1
- (function(_0x52257c,_0x37d7e0){const _0x564a90=a179_0x18d3,_0x39f103=_0x52257c();while(!![]){try{const _0x2f8311=-parseInt(_0x564a90(0x277))/0x1*(-parseInt(_0x564a90(0x24a))/0x2)+-parseInt(_0x564a90(0x22f))/0x3*(-parseInt(_0x564a90(0x1e4))/0x4)+-parseInt(_0x564a90(0x253))/0x5+parseInt(_0x564a90(0x1cf))/0x6+-parseInt(_0x564a90(0x27d))/0x7*(-parseInt(_0x564a90(0x233))/0x8)+-parseInt(_0x564a90(0x255))/0x9+-parseInt(_0x564a90(0x23c))/0xa;if(_0x2f8311===_0x37d7e0)break;else _0x39f103['push'](_0x39f103['shift']());}catch(_0x190a5a){_0x39f103['push'](_0x39f103['shift']());}}}(a179_0x4995,0x6ad85));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x4d04a7){_activeCookie=_0x4d04a7||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x4ab3f9,_0x3bf875){const _0x2c6c85=a179_0x18d3,_0x865bbd=_0x3bf875 instanceof Error?_0x3bf875[_0x2c6c85(0x266)]:String(_0x3bf875);return CliErrors[_0x2c6c85(0x267)]('Request\x20failed:\x20'+_0x4ab3f9+(_0x865bbd?'\x20('+_0x865bbd+')':''),_0x2c6c85(0x1f9));}async function apiRequest(_0x4317c7,_0x5b9ce8={}){const _0x195957=a179_0x18d3,{method:method=_0x195957(0x292),body:_0x23d907,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x5b9ce8,_0x35cbbf=useRuntime?getRuntimeDomain():getApiDomain(),_0x165efa=_activeCookie||getCookie(),_0x2827e2=''+_0x35cbbf+_0x4317c7,_0x7a2396=new AbortController(),_0x343bdc=setTimeout(()=>_0x7a2396['abort'](),timeout);try{const _0xb723db=await fetch(_0x2827e2,{'method':method,'headers':{'Content-Type':_0x195957(0x1d7),'Cookie':_0x165efa,'X-Invoke-Source':'cli:rabetbase',...headers},'body':_0x23d907?JSON['stringify'](_0x23d907):undefined,'signal':_0x7a2396[_0x195957(0x224)]});let _0x24165f;try{_0x24165f=await _0xb723db[_0x195957(0x25e)]();}catch(_0x646f21){if(_0x646f21 instanceof Error&&_0x646f21[_0x195957(0x257)]==='AbortError')throw CliErrors[_0x195957(0x267)]('Request\x20timeout:\x20'+_0x2827e2);if(_0xb723db['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x195957(0x267)](_0x195957(0x21c)+_0xb723db['status']+')',_0xb723db['status']>=0x190?'Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.':undefined);}if(!_0xb723db['ok']||_0x24165f[_0x195957(0x21d)]===![])throw CliErrors['apiError'](_0x24165f[_0x195957(0x1e8)]||_0x24165f[_0x195957(0x266)]||_0x195957(0x230)+_0xb723db[_0x195957(0x273)],_0x24165f[_0x195957(0x21a)]?_0x195957(0x213)+_0x24165f[_0x195957(0x21a)]:undefined);return _0x24165f;}catch(_0x37fe95){if(_0x37fe95 instanceof CliError)throw _0x37fe95;if(_0x37fe95 instanceof Error&&_0x37fe95['name']===_0x195957(0x235))throw CliErrors[_0x195957(0x267)](_0x195957(0x20e)+_0x2827e2);throw createFetchFailureError(_0x2827e2,_0x37fe95);}finally{clearTimeout(_0x343bdc);}}function isAuthFailure(_0x46a041){const _0x24c4d7=a179_0x18d3,_0x39f5f1=_0x46a041[_0x24c4d7(0x1e8)]||_0x46a041[_0x24c4d7(0x266)]||_0x46a041[_0x24c4d7(0x232)]?.[_0x24c4d7(0x266)]||_0x46a041[_0x24c4d7(0x28a)]||_0x46a041[_0x24c4d7(0x24e)]||'';return _0x46a041[_0x24c4d7(0x21a)]===_0x24c4d7(0x1f8)||_0x46a041[_0x24c4d7(0x1cd)]===0x191||_0x46a041[_0x24c4d7(0x1cd)]==='401'||_0x39f5f1[_0x24c4d7(0x258)](_0x24c4d7(0x1ec))||_0x39f5f1[_0x24c4d7(0x258)]('Unauthorized')||_0x39f5f1[_0x24c4d7(0x258)]('登录')||_0x39f5f1['includes']('认证');}export async function platformFetch(_0x4ab4a1,_0x3c8cfa){const _0xd4cfb3=a179_0x18d3;let _0x2cba7b;try{_0x2cba7b=await fetch(_0x4ab4a1,{'method':_0x3c8cfa[_0xd4cfb3(0x1ff)]??'GET','headers':{'Content-Type':'application/json','Cookie':_0x3c8cfa[_0xd4cfb3(0x1e1)],'X-Invoke-Source':_0xd4cfb3(0x29c)},..._0x3c8cfa[_0xd4cfb3(0x22b)]&&{'body':JSON[_0xd4cfb3(0x1ed)](_0x3c8cfa[_0xd4cfb3(0x22b)])}});}catch(_0x5af40d){throw createFetchFailureError(_0x4ab4a1,_0x5af40d);}if(!_0x2cba7b['ok']){if(_0x2cba7b['status']===0x191)throw CliErrors['authRequired']();throw CliErrors[_0xd4cfb3(0x267)](_0x3c8cfa[_0xd4cfb3(0x1c8)]+_0xd4cfb3(0x247)+_0x2cba7b['status']);}const _0x1c5457=await _0x2cba7b[_0xd4cfb3(0x25e)]();if(_0x1c5457[_0xd4cfb3(0x21d)]===![]){if(isAuthFailure(_0x1c5457))throw CliErrors['authRequired']();throw CliErrors[_0xd4cfb3(0x267)](_0x1c5457[_0xd4cfb3(0x1e8)]||_0x1c5457[_0xd4cfb3(0x266)]||_0x3c8cfa[_0xd4cfb3(0x1c8)]+'\x20failed');}return _0x1c5457[_0xd4cfb3(0x232)];}export async function platformRequest(_0x52ca8a,_0x59ec05){const _0x3265c7=a179_0x18d3;if(/^https?:\/\//i[_0x3265c7(0x1e2)](_0x52ca8a))throw CliErrors[_0x3265c7(0x221)](_0x3265c7(0x23a)+_0x52ca8a,_0x3265c7(0x1dc));const _0x460aef=_0x52ca8a[_0x3265c7(0x252)]('/')?_0x52ca8a:'/'+_0x52ca8a;return platformFetch(''+getApiDomain()+_0x460aef,_0x59ec05);}function cleanNewlines(_0x26abd4){const _0x490963=a179_0x18d3;return _0x26abd4[_0x490963(0x28b)](/[\r\n]+/g,'\x20')[_0x490963(0x279)]();}function cleanDatasetName(_0x4ca09c){const _0x2e4ec8=a179_0x18d3;if(!_0x4ca09c[_0x2e4ec8(0x257)])return _0x4ca09c;return{..._0x4ca09c,'name':cleanNewlines(_0x4ca09c[_0x2e4ec8(0x257)])};}export async function fetchModelList(_0x4544d1,_0x3fa488){const _0x5135bd=a179_0x18d3,_0x2132a9=getEnv(),_0x38d6f3=new URLSearchParams({'appcode':_0x4544d1,'otype':_0x5135bd(0x25b)}),_0x36a886=_0x5135bd(0x20a)+_0x38d6f3[_0x5135bd(0x1eb)]();logger[_0x5135bd(0x1e3)]('fetch-model-list',_0x5135bd(0x243)+_0x2132a9+')',{'apiPath':_0x36a886});const _0x329719=await platformRequest(_0x36a886,{'cookie':_0x3fa488,'label':_0x5135bd(0x24d)}),_0x1df4f4=(_0x329719[_0x5135bd(0x211)]??[])[_0x5135bd(0x291)](cleanDatasetName);return{'configArray':_0x1df4f4,'count':_0x1df4f4[_0x5135bd(0x1de)]};}export async function fetchDatasetDoc(_0x39d7fb){const _0x1c2385=a179_0x18d3,{appCode:_0x5664ed,cookie:_0xea3136,datasetCode:_0x597d98,datasetId:_0xd6827c,extraParams:_0x243edb}=_0x39d7fb,_0x1a649c=await platformRequest(_0x1c2385(0x1fa),{'method':'POST','body':{'appCode':_0x5664ed,'datasetCode':_0x597d98,'datasetId':_0xd6827c,..._0x243edb||{}},'cookie':_0xea3136,'label':_0x1c2385(0x1f3)+_0x597d98+')'});if(!_0x1a649c||typeof _0x1a649c[_0x1c2385(0x256)]!=='string')throw new Error(_0x1c2385(0x1c0)+_0x597d98+_0x1c2385(0x201));return _0x1a649c['markdown'];}export async function getMenuTree(_0x1cbad1,_0x2cd34d){const _0x5bf5d5=a179_0x18d3,_0x46bc81=new URLSearchParams({'appCode':_0x1cbad1});return platformRequest(_0x5bf5d5(0x1fe)+_0x46bc81[_0x5bf5d5(0x1eb)](),{'cookie':_0x2cd34d,'label':'Fetch\x20menu\x20list'});}export async function createMenuRecord(_0x174e72,_0x4419c4,_0xaab0f1){return platformRequest('/smartapi/menu/create',{'method':'POST','body':_0x174e72,'cookie':_0x4419c4,'label':_0xaab0f1});}export async function updateMenuRecord(_0x19214c,_0x1459e4,_0x40dcc4){const _0x4730a9=a179_0x18d3;return platformRequest(_0x4730a9(0x1d2),{'method':'POST','body':_0x19214c,'cookie':_0x1459e4,'label':_0x40dcc4});}export async function listBffScripts(_0x581f0f,_0x7e4e31,_0x50edd5){const _0x559c35=a179_0x18d3;let _0x50baba=_0x559c35(0x1f2)+_0x581f0f;if(_0x7e4e31)_0x50baba+=_0x559c35(0x27a)+_0x7e4e31;const _0x57ecb5=await apiRequest(_0x50baba);let _0x437813=extractList(_0x57ecb5['data']);if(_0x50edd5?.[_0x559c35(0x1dd)]){const _0x34be14=_0x50edd5[_0x559c35(0x1dd)][_0x559c35(0x24c)]();_0x437813=_0x437813[_0x559c35(0x1d8)](_0x4b608a=>_0x4b608a['functionName']?.['toLowerCase']()[_0x559c35(0x258)](_0x34be14)||_0x4b608a[_0x559c35(0x207)]?.[_0x559c35(0x24c)]()['includes'](_0x34be14));}return _0x437813;}export async function getBffScriptInfo(_0xc6191e){const _0x3df3e8=a179_0x18d3,_0xfc673b=await apiRequest(_0x3df3e8(0x287)+_0xc6191e);if(!_0xfc673b['data'])throw CliErrors['validation'](_0x3df3e8(0x21b)+_0xc6191e);return _0xfc673b['data'];}export async function saveBffScript(_0x392b91){const _0x35e999=a179_0x18d3,_0x15a2a1=await apiRequest(_0x35e999(0x210),{'method':_0x35e999(0x25c),'body':_0x392b91}),{id:_0x5e953a,entity:_0x502474}=normalizeEntityWithIdResponse(_0x15a2a1[_0x35e999(0x232)]);if(_0x5e953a!==undefined){const _0x2e2d31=typeof _0x502474[_0x35e999(0x296)]==='string'||typeof _0x502474['scriptType']==='string'?_0x502474:undefined;return{'id':_0x5e953a,'script':_0x2e2d31};}throw CliErrors[_0x35e999(0x267)](_0x35e999(0x290));}export async function deleteBffScript(_0x2da960){const _0x498ffb=a179_0x18d3;await apiRequest(_0x498ffb(0x1c6),{'method':_0x498ffb(0x25c),'body':{'id':_0x2da960}});}export async function getBffScriptStatistics(_0x31bd35){const _0x5417b6=a179_0x18d3,_0x511813=await apiRequest(_0x5417b6(0x1d5)+_0x31bd35);return extractList(_0x511813[_0x5417b6(0x232)]);}export async function clearBffScriptCache(){const _0xbe3a29=a179_0x18d3,_0x295938=await apiRequest('/api/management/script/cache/clear',{'method':_0xbe3a29(0x25c),'useRuntime':!![]});return typeof _0x295938[_0xbe3a29(0x232)]===_0xbe3a29(0x25d)?_0x295938[_0xbe3a29(0x232)]:'';}export async function listBffDatasetOperations(_0x4febdd,_0x37d1eb){const _0x573020=a179_0x18d3,_0x14c458=await apiRequest(_0x573020(0x1e5),{'method':_0x573020(0x25c),'body':{'appCode':_0x4febdd,'datasetId':_0x37d1eb}});return _0x14c458['data'];}export async function listSqlQueries(_0x54a5c1,_0x4d507c){const _0x231569=a179_0x18d3,_0xe02a1f=await apiRequest(_0x231569(0x226),{'method':_0x231569(0x25c),'body':{'appCode':_0x54a5c1,'currentPage':_0x4d507c?.[_0x231569(0x1e6)]??0x1,'pageSize':_0x4d507c?.[_0x231569(0x271)]??0x32,'sqlCode':_0x4d507c?.['sqlCode'],'sqlName':_0x4d507c?.[_0x231569(0x27c)]}});return _0xe02a1f['data'];}export async function getSqlQueryInfo(_0x5dfa36,_0x444bf8){const _0x39ad62=a179_0x18d3,_0x4b49de=await listSqlQueries(_0x5dfa36,{'sqlCode':_0x444bf8}),_0x310c16=_0x4b49de[_0x39ad62(0x1be)]?.[0x0];if(!_0x310c16)throw CliErrors['validation'](_0x39ad62(0x276)+_0x444bf8);return _0x310c16;}export async function getSqlQueryDetail(_0x1127e4){const _0xaee7f8=a179_0x18d3,_0x5b8aa2=await apiRequest(_0xaee7f8(0x1c3)+(_0xaee7f8(0x1ee)+encodeURIComponent(_0x1127e4)));if(!_0x5b8aa2[_0xaee7f8(0x232)])throw CliErrors[_0xaee7f8(0x221)]('SQL\x20query\x20not\x20found:\x20'+_0x1127e4);return _0x5b8aa2['data'];}export async function getSqlQueryDetailById(_0x27115f){const _0x3cf194=a179_0x18d3,_0x3a3c07=await apiRequest(_0x3cf194(0x24b)+_0x27115f);if(!_0x3a3c07[_0x3cf194(0x232)])throw CliErrors[_0x3cf194(0x221)](_0x3cf194(0x1ca)+_0x27115f);return _0x3a3c07[_0x3cf194(0x232)];}export async function createSqlQuery(_0x192fe4){const _0x41b25c=a179_0x18d3,_0x45d710=await apiRequest('/smartapi/custom/saveUserCustomSql',{'method':'POST','body':_0x192fe4}),{id:_0x43c717,entity:_0x31a8df}=normalizeEntityWithIdResponse(_0x45d710[_0x41b25c(0x232)]);if(!(_0x41b25c(0x209)in _0x31a8df)&&_0x43c717)return getSqlQueryDetailById(_0x43c717);return normalizeSqlQueryEntity(_0x31a8df);}export async function updateSqlQuery(_0x3a8589){const _0x271258=a179_0x18d3,_0x7ab76c=await apiRequest(_0x271258(0x1ef),{'method':_0x271258(0x25c),'body':_0x3a8589}),{id:_0x1febe4,entity:_0x23e93e}=normalizeEntityWithIdResponse(_0x7ab76c[_0x271258(0x232)]);if(!(_0x271258(0x209)in _0x23e93e)){if(_0x3a8589[_0x271258(0x209)])return getSqlQueryDetail(_0x3a8589[_0x271258(0x209)]);if(_0x1febe4)return getSqlQueryDetailById(_0x1febe4);}return normalizeSqlQueryEntity(_0x23e93e);}export async function deleteSqlQuery(_0x3afaa9){const _0x358496=a179_0x18d3;await apiRequest(_0x358496(0x1ce),{'method':'POST','body':_0x3afaa9});}function a179_0x18d3(_0x4ee1c6,_0x4db1ba){_0x4ee1c6=_0x4ee1c6-0x1be;const _0x499528=a179_0x4995();let _0x18d398=_0x499528[_0x4ee1c6];return _0x18d398;}export async function saveSqlQuery(_0x30fd7){const _0x559d1b=a179_0x18d3,_0x5f3181=await apiRequest('/api/node-toolbox/sql/save',{'method':'POST','body':_0x30fd7});return _0x5f3181[_0x559d1b(0x232)];}function a179_0x4995(){const _0x103ea9=['/smartapi/app-config/delete','getOne','array','POST','string','json','/smartapi/db-analysis/jobs/cancel','/smartapi/dataset/text-generate/start','min','modelCode','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','.getOne(id);','/smartapi/dblink/getAllTableList','message','apiError','remark','/smartapi/question/er-config/update-single','type','/smartapi/dblink/testConnect','/smartapi/permit/page/get-one','add','dbId','dataset_','CUSTOM','pageSize','\x20\x20});','status','/smartapi/dataset/delete-dataset','dbtableConfig','SQL\x20query\x20not\x20found:\x20','804059zQZgHP','find','trim','&type=','deleted','sqlName','607439DqatfN','isArray','/smartapi/permit/resource/get-menu-list','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','\x22\x20not\x20found\x20in\x20dataset\x20','mobile','/smartapi/dblink/create','/smartapi/app-config/list','join','operationId','/api/management/library/scripts/info?id=','/generate-standard-pages/start','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','errorMessage','replace','\x20\x20where:\x20{},','remove','table','set','BFF\x20save\x20returned\x20no\x20valid\x20id','map','GET','/api/','const\x20data\x20=\x20await\x20client.sql.execute({','Dataset\x20not\x20found:\x20','functionName','update','permits','needSelf','//\x20SQL:\x20','\x20apps.\x20','cli:rabetbase','needPublic','clientOperationId','tableList','tableData','object','Invalid\x20response\x20format\x20(','path','/standard-page-status?appCode=','/smartapi/custom/getUserCustomSql','/generate-standard-pages/status?','value','/api/management/library/scripts/delete','create','label','totalCount','SQL\x20query\x20not\x20found:\x20id=','push','/smartapi/permit/user-role/update-user-list','code','/smartapi/custom/deleteUserCustomSql','3721068RjYVqn','avatar','target','/smartapi/menu/update','operationName','/smartapi/app-config/update','/api/management/library/scripts/statistics?appCode=','/smartapi/permit/resource/get-api-list','application/json','filter','operations','.create({\x20/*\x20fields\x20*/\x20});','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','scriptName','length','/smartapi/question/er-config','/filter','cookie','test','info','8uEzHoa','/smartapi/dataset/get-dataset-operation','currentPage','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','errorMsg','\x20\x20pageSize:\x2020,','/smartapi/db-analysis/status/','toString','401','stringify','?sqlCode=','/smartapi/custom/updateUserCustomSql','email','key','/api/management/library/scripts/list?appCode=','Fetch\x20doc\x20(','\x20of\x20','appCode','delete','tags','UNAUTHORIZED','Check\x20network\x20connectivity\x20and\x20try\x20again.','/api/node-toolbox/api-doc-generator','requirementDescription','sdk','/smartapi/dataset/get-driven-data?','/smartapi/menu/find?','method','/smartapi/db-analysis/start','):\x20missing\x20data.markdown\x20field','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','includeImports','displayName','/smartapi/question/er-config/erCreate','planId','description','\x20\x20\x20\x20sqlCode:\x20\x27','sqlCode','/api/node-toolbox/dataset/model-list?','/smartapi/lovrabet/detail?pageId=','roleName','//\x20','Request\x20timeout:\x20','list','/api/management/library/scripts/save','configArray','username','API\x20error\x20code:\x20','/smartapi/permit/user-role/get-user-list','/smartapi/dataset/text-generate/status?','Warning:\x20showing\x20first\x20','(/*\x20params\x20*/);','\x20\x20currentPage:\x201,','pageIndex','errorCode','BFF\x20script\x20not\x20found:\x20id=','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','success','.remove(id);','/smartapi/lovrabet/update-page','/smartapi/dblink/delete','validation','/smartapi/permit/role/get-one','/smartapi/dblink/update','signal','/smartapi/permit/page/save','/smartapi/custom/queryUserCustomSqlList','roleType','const\x20result\x20=\x20await\x20client.models.','/userTenant/getByTenantCode','/smartapi/permit/role/delete','body','/smartapi/dblink/getOne','api_error','modelId','586581yTMjwF','API\x20error:\x20','responseFields','data','80REfNtT','/smartapi/dataset/update-driven-data','AbortError','max','/smartapi/question/er-config/business-group/edit','isFinite','/smartapi/lovrabet/dataset/','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','has','20212720zTcpFA','physicalTableCount','datasetTableCount','userId','entries','/sync-to-pages','summary','正在从服务器拉取模型列表...\x20(环境:\x20','datasetName','userTenantRelationList','warn','\x20failed,\x20HTTP\x20','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','tableName','2NsHuBb','/smartapi/custom/getUserCustomSql?id=','toLowerCase','Fetch\x20datasets','error','.filter({','\x20\x20return\x20rows;','/smartapi/dataset/restore-dataset','startsWith','555615lNtiMS','/smartapi/dblink/getList','1017261JDwkBB','markdown','name','includes'];a179_0x4995=function(){return _0x103ea9;};return a179_0x4995();}function normalizeSqlQueryEntity(_0x5e83a0){const _0x1b89cd=a179_0x18d3;return{..._0x5e83a0,'id':Number(_0x5e83a0['id']),'dbId':_0x5e83a0[_0x1b89cd(0x26e)]==null?undefined:Number(_0x5e83a0[_0x1b89cd(0x26e)]),'version':_0x5e83a0['version']==null?undefined:Number(_0x5e83a0['version'])};}export async function executeSql(_0x92da8a,_0x182181,_0x561216){const _0x3ed507=a179_0x18d3,_0x42c6fe=await apiRequest('/api/custom/executeSql',{'method':_0x3ed507(0x25c),'body':{'appCode':_0x92da8a,'sqlCode':_0x182181,..._0x561216&&{'params':_0x561216}},'useRuntime':!![]});return _0x42c6fe['data'];}export async function executeDatasetDataOperation(_0x128580,_0x21db39,_0x520f0d,_0x32cab8={}){const _0x44e32f=a179_0x18d3;try{const _0x5d6fa9=await apiRequest(_0x44e32f(0x293)+_0x128580+'/'+_0x21db39+'/'+_0x520f0d,{'method':_0x44e32f(0x25c),'body':_0x32cab8,'useRuntime':!![]});return _0x5d6fa9[_0x44e32f(0x232)];}catch(_0x5e4f54){if(_0x520f0d===_0x44e32f(0x25a)&&_0x5e4f54 instanceof CliError&&_0x5e4f54['code']===_0x44e32f(0x22d)&&_0x32cab8['id']!==undefined&&_0x32cab8['id']!==null&&_0x32cab8['id']!==''){const _0x339b16=await apiRequest(_0x44e32f(0x293)+_0x128580+'/'+_0x21db39+_0x44e32f(0x1e0),{'method':'POST','body':{'where':{'id':{'$eq':_0x32cab8['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x1f6cf6=Array[_0x44e32f(0x27e)](_0x339b16[_0x44e32f(0x232)]?.[_0x44e32f(0x1be)])?_0x339b16['data']['tableData']:[];return _0x1f6cf6[0x0]??null;}throw _0x5e4f54;}}export async function listDatasets(_0x50376c,_0x2c6cfc){const _0x43a2c2=a179_0x18d3,_0x20f73d={'appCode':_0x50376c,'deleted':_0x2c6cfc?.[_0x43a2c2(0x27b)]??![]};if(_0x2c6cfc?.[_0x43a2c2(0x1cd)])_0x20f73d[_0x43a2c2(0x1cd)]=_0x2c6cfc[_0x43a2c2(0x1cd)];if(_0x2c6cfc?.[_0x43a2c2(0x257)])_0x20f73d[_0x43a2c2(0x257)]=_0x2c6cfc[_0x43a2c2(0x257)];const _0x32de38=await apiRequest('/smartapi/dataset/get-dataset-list',{'method':_0x43a2c2(0x25c),'body':_0x20f73d});return extractList(_0x32de38[_0x43a2c2(0x232)]);}export async function deleteDataset(_0x2741ed,_0x1b4d52){const _0x319217=a179_0x18d3;await apiRequest(_0x319217(0x274),{'method':_0x319217(0x25c),'body':{'appCode':_0x2741ed,'datasetId':_0x1b4d52}});}export async function restoreDataset(_0x10f7e2,_0x142911){const _0x1e7e0e=a179_0x18d3;await apiRequest(_0x1e7e0e(0x251),{'method':'POST','body':{'appCode':_0x10f7e2,'datasetId':_0x142911}});}export async function previewTextGeneratedDataset(_0x35437c,_0x27d7fa){const _0x18d695=a179_0x18d3,_0xe6415e=await apiRequest('/smartapi/dataset/text-generate/preview',{'method':_0x18d695(0x25c),'body':{'appCode':_0x35437c,'datasetName':_0x27d7fa[_0x18d695(0x244)],'requirementDescription':_0x27d7fa[_0x18d695(0x1fb)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0xe6415e[_0x18d695(0x232)];}export async function startTextGeneratedDataset(_0x4d65c4,_0x5b72d9,_0x2d6af4){const _0x24465f=a179_0x18d3,_0x241920=await apiRequest(_0x24465f(0x260),{'method':'POST','body':{'appCode':_0x4d65c4,..._0x2d6af4?.[_0x24465f(0x29e)]?{'clientOperationId':_0x2d6af4[_0x24465f(0x29e)]}:{},'design':_0x5b72d9},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x241920[_0x24465f(0x232)];}export async function getTextGeneratedDatasetStatus(_0x544ebb,_0x548fc7){const _0xd90884=a179_0x18d3,_0x30d9b3=new URLSearchParams({'appCode':_0x544ebb});_0x548fc7[_0xd90884(0x286)]&&_0x30d9b3[_0xd90884(0x28f)](_0xd90884(0x286),_0x548fc7[_0xd90884(0x286)]);_0x548fc7[_0xd90884(0x29e)]&&_0x30d9b3[_0xd90884(0x28f)](_0xd90884(0x29e),_0x548fc7['clientOperationId']);const _0x10b1f8=await apiRequest(_0xd90884(0x215)+_0x30d9b3[_0xd90884(0x1eb)]());return _0x10b1f8[_0xd90884(0x232)];}export async function searchDatasets(_0x40f267,_0x1ac4ff){const _0x2ae29d=a179_0x18d3,_0x5e0668=await listDatasets(_0x40f267,{'name':_0x1ac4ff}),_0x2bc36f=_0x1ac4ff[_0x2ae29d(0x24c)](),_0x1566d0=new Set(_0x5e0668[_0x2ae29d(0x291)](_0x90bf18=>_0x90bf18['id'])),_0xda9244=_0x5e0668['filter'](_0x4c741c=>_0x4c741c[_0x2ae29d(0x275)]?.[_0x2ae29d(0x249)]?.[_0x2ae29d(0x24c)]()[_0x2ae29d(0x258)](_0x2bc36f)||_0x4c741c[_0x2ae29d(0x207)]?.[_0x2ae29d(0x24c)]()[_0x2ae29d(0x258)](_0x2bc36f)),_0x46c21e=await listDatasets(_0x40f267,{'code':_0x1ac4ff});for(const _0x3a68d4 of _0x46c21e){!_0x1566d0[_0x2ae29d(0x23b)](_0x3a68d4['id'])&&(_0x5e0668[_0x2ae29d(0x1cb)](_0x3a68d4),_0x1566d0[_0x2ae29d(0x26d)](_0x3a68d4['id']));}return _0x5e0668;}export function normalizeDatasetOperations(_0x10e9a3){const _0x2f911e=a179_0x18d3;if(Array[_0x2f911e(0x27e)](_0x10e9a3))return _0x10e9a3['filter'](_0x506e03=>_0x506e03!=null&&typeof _0x506e03===_0x2f911e(0x1bf));if(_0x10e9a3&&typeof _0x10e9a3===_0x2f911e(0x1bf))return Object[_0x2f911e(0x240)](_0x10e9a3)['filter'](([,_0x2c94c4])=>_0x2c94c4!=null&&typeof _0x2c94c4===_0x2f911e(0x1bf))[_0x2f911e(0x291)](([_0x3d6ad2,_0x1d6cc8])=>({..._0x1d6cc8,'name':_0x1d6cc8[_0x2f911e(0x257)]??_0x1d6cc8['operationName']??_0x3d6ad2}));return[];}export async function getDatasetDetail(_0x3fdb9d){const _0x15a74a=a179_0x18d3,_0x147244=/^\d+$/['test'](_0x3fdb9d)?'id':_0x15a74a(0x1cd),_0x16eea1=await apiRequest(_0x15a74a(0x1fd)+_0x147244+'='+_0x3fdb9d);return _0x16eea1[_0x15a74a(0x232)];}export async function updateDrivenData(_0x2b9cdf){const _0x1630ef=a179_0x18d3,_0x11a655=await apiRequest(_0x1630ef(0x234),{'method':_0x1630ef(0x25c),'body':_0x2b9cdf});return _0x11a655[_0x1630ef(0x232)];}export async function getDatasetOperations(_0x409467){const _0x3759c8=a179_0x18d3,_0xebc4c1=await getDatasetDetail(_0x409467),_0x33f75b=normalizeDatasetOperations(_0xebc4c1[_0x3759c8(0x1d9)])['map'](_0x35b851=>({'name':_0x35b851[_0x3759c8(0x257)]||_0x35b851['operationName'],'displayName':_0x35b851[_0x3759c8(0x204)]||_0x35b851['name'],'type':_0x35b851[_0x3759c8(0x26a)],'method':_0x35b851['method'],'path':_0x35b851[_0x3759c8(0x1c1)],'enabled':_0x35b851['enabled']??!![],'requestFields':_0x35b851['requestFields'],'responseFields':_0x35b851[_0x3759c8(0x231)]}));return{'dataset':{'id':_0xebc4c1['id']??_0xebc4c1[_0x3759c8(0x22e)],'name':_0xebc4c1[_0x3759c8(0x257)],'code':_0xebc4c1[_0x3759c8(0x1cd)]||_0xebc4c1[_0x3759c8(0x262)],'tableName':_0xebc4c1[_0x3759c8(0x249)]||_0xebc4c1[_0x3759c8(0x275)]?.[_0x3759c8(0x249)]},'operations':_0x33f75b};}export async function getOperationDetail(_0x25a403,_0x395b2f,_0x20605f){const _0x2f5790=a179_0x18d3;let _0x446ccc=_0x395b2f;if(!/^\d+$/[_0x2f5790(0x1e2)](_0x395b2f)){const _0x57dd8d=await listDatasets(_0x25a403,{'code':_0x395b2f}),_0xd9d957=_0x57dd8d[_0x2f5790(0x278)](_0x3ce8b9=>_0x3ce8b9[_0x2f5790(0x1cd)]===_0x395b2f||String(_0x3ce8b9['id'])===_0x395b2f);if(!_0xd9d957)throw CliErrors['validation'](_0x2f5790(0x295)+_0x395b2f);_0x446ccc=String(_0xd9d957['id']);}const _0x90e35b=await getDatasetDetail(_0x446ccc),_0x322357=normalizeDatasetOperations(_0x90e35b['operations'])[_0x2f5790(0x278)](_0x25e491=>(_0x25e491['name']||_0x25e491[_0x2f5790(0x1d3)])===_0x20605f);if(!_0x322357)throw CliErrors[_0x2f5790(0x221)]('Operation\x20\x22'+_0x20605f+_0x2f5790(0x281)+_0x395b2f);return{'dataset':{'id':_0x90e35b['id']??_0x90e35b[_0x2f5790(0x22e)],'name':_0x90e35b[_0x2f5790(0x257)],'code':_0x90e35b[_0x2f5790(0x1cd)]||_0x90e35b['modelCode'],'tableName':_0x90e35b[_0x2f5790(0x249)]||_0x90e35b[_0x2f5790(0x275)]?.[_0x2f5790(0x249)]},'operation':_0x322357};}export async function startGenerateStandardPages(_0x4bd030,_0x3da092,_0x486c69){const _0x4bf95e=a179_0x18d3,_0x25ad17=await apiRequest(_0x4bf95e(0x239)+_0x3da092+_0x4bf95e(0x288),{'method':_0x4bf95e(0x25c),'body':{'appCode':_0x4bd030,..._0x486c69?.['clientOperationId']?{'clientOperationId':_0x486c69[_0x4bf95e(0x29e)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x25ad17[_0x4bf95e(0x232)];}export async function getGenerateStandardPagesStatus(_0x12745f,_0x3b9a56,_0x14d395){const _0x586308=a179_0x18d3,_0x358d31=new URLSearchParams({'appCode':_0x12745f});_0x14d395[_0x586308(0x286)]&&_0x358d31['set']('operationId',_0x14d395[_0x586308(0x286)]);_0x14d395[_0x586308(0x29e)]&&_0x358d31[_0x586308(0x28f)](_0x586308(0x29e),_0x14d395['clientOperationId']);const _0x5e5719=await apiRequest(_0x586308(0x239)+_0x3b9a56+_0x586308(0x1c4)+_0x358d31[_0x586308(0x1eb)]());return _0x5e5719[_0x586308(0x232)];}export async function getStandardPageStatus(_0x4a7784,_0x2a0475){const _0xaffcc9=a179_0x18d3,_0x159a4c=await apiRequest(_0xaffcc9(0x239)+_0x2a0475+_0xaffcc9(0x1c2)+encodeURIComponent(_0x4a7784));return _0x159a4c[_0xaffcc9(0x232)];}export async function tryGetStandardPageStatus(_0x514f1f,_0x500b96){const _0x24472b=a179_0x18d3;try{return await getStandardPageStatus(_0x514f1f,_0x500b96);}catch(_0x5549fe){if(_0x5549fe instanceof CliError&&_0x5549fe[_0x24472b(0x1cd)]==='api_error'&&/404|not found|non-json response/i[_0x24472b(0x1e2)](_0x5549fe[_0x24472b(0x266)]))return null;throw _0x5549fe;}}export async function syncStandardPages(_0x45f197,_0x3d0390){const _0x3a6c9c=a179_0x18d3,_0x3a6334=await apiRequest(_0x3a6c9c(0x239)+_0x3d0390+_0x3a6c9c(0x241),{'method':_0x3a6c9c(0x25c),'body':{'appCode':_0x45f197}});return _0x3a6334['data'];}export async function getPageDetail(_0x4001f2){const _0x54c13f=a179_0x18d3,_0x49ce7f=await apiRequest(_0x54c13f(0x20b)+_0x4001f2);if(!_0x49ce7f[_0x54c13f(0x232)])throw CliErrors[_0x54c13f(0x221)]('Page\x20not\x20found:\x20'+_0x4001f2);return _0x49ce7f[_0x54c13f(0x232)];}export async function updatePage(_0xa9bd43,_0x7a8a1a,_0x312ef7,_0x5d25d7){const _0x2b6812=a179_0x18d3,_0x538bc8=await apiRequest(_0x2b6812(0x21f),{'method':_0x2b6812(0x25c),'body':{'appCode':_0xa9bd43,'pageId':_0x7a8a1a,'code':_0x312ef7,'datasetIds':_0x5d25d7}});return _0x538bc8[_0x2b6812(0x232)];}export function generateSdkCode(_0x580529,_0x2fdef4,_0x25e4cc){const _0x1a1c48=a179_0x18d3,_0x12f801=_0x25e4cc?.[_0x1a1c48(0x203)]??!![],_0x375063=_0x1a1c48(0x26f)+_0x580529[_0x1a1c48(0x1cd)]?.[_0x1a1c48(0x28b)](/-/g,'_'),_0x4e9e70=_0x2fdef4[_0x1a1c48(0x257)]||_0x2fdef4[_0x1a1c48(0x1d3)]||'filter',_0x4d33ac=[];_0x12f801&&_0x4d33ac[_0x1a1c48(0x1cb)](_0x1a1c48(0x263),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','');_0x4d33ac[_0x1a1c48(0x1cb)](_0x1a1c48(0x20d)+_0x580529[_0x1a1c48(0x257)]+'\x20('+(_0x580529[_0x1a1c48(0x249)]||_0x1a1c48(0x28e))+')');if(_0x4e9e70===_0x1a1c48(0x1d8))_0x4d33ac[_0x1a1c48(0x1cb)]('const\x20result\x20=\x20await\x20client.models.'+_0x375063+_0x1a1c48(0x24f),_0x1a1c48(0x28c),_0x1a1c48(0x1e9),_0x1a1c48(0x218),'});');else{if(_0x4e9e70===_0x1a1c48(0x25a))_0x4d33ac[_0x1a1c48(0x1cb)](_0x1a1c48(0x228)+_0x375063+_0x1a1c48(0x264));else{if(_0x4e9e70===_0x1a1c48(0x1c7))_0x4d33ac[_0x1a1c48(0x1cb)](_0x1a1c48(0x228)+_0x375063+_0x1a1c48(0x1da));else{if(_0x4e9e70===_0x1a1c48(0x297))_0x4d33ac['push']('const\x20result\x20=\x20await\x20client.models.'+_0x375063+_0x1a1c48(0x248));else _0x4e9e70===_0x1a1c48(0x1f6)||_0x4e9e70===_0x1a1c48(0x28d)?_0x4d33ac[_0x1a1c48(0x1cb)](_0x1a1c48(0x228)+_0x375063+_0x1a1c48(0x21e)):_0x4d33ac[_0x1a1c48(0x1cb)](_0x1a1c48(0x228)+_0x375063+'.'+_0x4e9e70+_0x1a1c48(0x217));}}}return _0x4d33ac[_0x1a1c48(0x285)]('\x0a');}export function generateSqlCodeTemplate(_0x179a03,_0x54f69f){const _0x271d91=a179_0x18d3,_0xce313=_0x54f69f?.[_0x271d91(0x1d1)]??_0x271d91(0x1fc),_0x5f3cc2=_0x54f69f?.[_0x271d91(0x203)]??!![],_0x1302ea=[];return _0x1302ea[_0x271d91(0x1cb)](_0x271d91(0x29a)+_0x179a03[_0x271d91(0x27c)]+'\x20('+_0x179a03[_0x271d91(0x209)]+')'),_0xce313==='sdk'?(_0x5f3cc2&&_0x1302ea[_0x271d91(0x1cb)](_0x271d91(0x263),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});',''),_0x1302ea['push'](_0x271d91(0x294),'\x20\x20sqlCode:\x20\x27'+_0x179a03['sqlCode']+'\x27,',_0x271d91(0x289),'});',_0x271d91(0x1db),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x1302ea[_0x271d91(0x1cb)](_0x271d91(0x280),_0x271d91(0x1e7),'\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({',_0x271d91(0x208)+_0x179a03['sqlCode']+'\x27,',_0x271d91(0x202),_0x271d91(0x272),_0x271d91(0x250),'}'),_0x1302ea[_0x271d91(0x285)]('\x0a');}export async function getErConfig(_0x164f0e,_0x5dfb66){const _0x4f8632=a179_0x18d3,_0x187cbc=await apiRequest(_0x4f8632(0x1df),{'method':_0x4f8632(0x25c),'body':{'appCode':_0x164f0e,'dblinkId':_0x5dfb66},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x187cbc['data'];}export async function createErRelation(_0x55193a){const _0xc7670e=a179_0x18d3,_0x20ff51=await apiRequest(_0xc7670e(0x205),{'method':'POST','body':_0x55193a,'allowNonJsonSuccess':!![]});return _0x20ff51[_0xc7670e(0x232)];}export async function updateErRelation(_0x748f5a){const _0x101cad=a179_0x18d3,_0x3379a9=await apiRequest(_0x101cad(0x269),{'method':'POST','body':_0x748f5a,'allowNonJsonSuccess':!![]});return _0x3379a9[_0x101cad(0x232)];}export async function deleteErRelation(_0x28f38f){const _0x284df6=a179_0x18d3,_0x1528e9=await apiRequest('/smartapi/question/er-config/erDelete',{'method':_0x284df6(0x25c),'body':_0x28f38f,'allowNonJsonSuccess':!![]});return _0x1528e9[_0x284df6(0x232)];}export async function updateErBusinessGroup(_0x33645c){const _0x474cc3=a179_0x18d3,_0x36987e=await apiRequest(_0x474cc3(0x237),{'method':_0x474cc3(0x25c),'body':_0x33645c,'allowNonJsonSuccess':!![]});return _0x36987e[_0x474cc3(0x232)];}function buildQuery(_0x49a57b){const _0xd84cbc=a179_0x18d3,_0x4af8d6=new URLSearchParams();for(const [_0x20aafa,_0x200fcd]of Object[_0xd84cbc(0x240)](_0x49a57b)){if(_0x200fcd===undefined||_0x200fcd==='')continue;_0x4af8d6[_0xd84cbc(0x28f)](_0x20aafa,String(_0x200fcd));}const _0x2546e2=_0x4af8d6[_0xd84cbc(0x1eb)]();return _0x2546e2?'?'+_0x2546e2:'';}export async function listAppConfigs(_0x45c7bc,_0x3c6b2a){const _0x312bfb=a179_0x18d3,_0xc56ef9=await apiRequest(_0x312bfb(0x284),{'method':_0x312bfb(0x25c),'body':{'appCode':_0x45c7bc,..._0x3c6b2a?.[_0x312bfb(0x1f1)]?{'key':_0x3c6b2a[_0x312bfb(0x1f1)]}:{},..._0x3c6b2a?.[_0x312bfb(0x1f7)]?{'tags':_0x3c6b2a[_0x312bfb(0x1f7)]}:{}}});return extractAppConfigList(_0xc56ef9[_0x312bfb(0x232)]);}export async function getAppConfigByKey(_0x5081a3,_0x204f25){const _0x3c9eaf=a179_0x18d3,_0x29a56e=await apiRequest('/smartapi/app-config/getByKey'+buildQuery({'appCode':_0x5081a3,'key':_0x204f25}));return _0x29a56e[_0x3c9eaf(0x232)]??null;}export async function createAppConfig(_0x411c7c){const _0x540f75=a179_0x18d3,_0x38dc55=await apiRequest('/smartapi/app-config/create',{'method':_0x540f75(0x25c),'body':{'appCode':_0x411c7c[_0x540f75(0x1f5)],'key':_0x411c7c[_0x540f75(0x1f1)],'value':_0x411c7c['value'],..._0x411c7c[_0x540f75(0x1f7)]?{'tags':_0x411c7c['tags']}:{}}});return _0x38dc55[_0x540f75(0x232)];}export async function updateAppConfig(_0x365198){const _0x14d685=a179_0x18d3;await apiRequest(_0x14d685(0x1d4),{'method':_0x14d685(0x25c),'body':{'id':_0x365198['id'],'appCode':_0x365198[_0x14d685(0x1f5)],'key':_0x365198[_0x14d685(0x1f1)],'value':_0x365198[_0x14d685(0x1c5)],..._0x365198[_0x14d685(0x1f7)]?{'tags':_0x365198['tags']}:{}}});}export async function deleteAppConfig(_0x4f1bdf){const _0x4040ec=a179_0x18d3;await apiRequest(_0x4040ec(0x259),{'method':_0x4040ec(0x25c),'body':_0x4f1bdf});}function extractAppConfigList(_0x3f0648){const _0x19674c=a179_0x18d3;if(Array[_0x19674c(0x27e)](_0x3f0648))return _0x3f0648;if(_0x3f0648&&typeof _0x3f0648===_0x19674c(0x1bf)&&Array['isArray'](_0x3f0648[_0x19674c(0x20f)]))return _0x3f0648[_0x19674c(0x20f)];return extractList(_0x3f0648);}export async function listDbLinks(_0x2e5a55,_0x2a3067){const _0x23c5ff=a179_0x18d3,_0x5f5612=await apiRequest(_0x23c5ff(0x254),{'method':'POST','body':{'appCode':_0x2e5a55,'currentPage':_0x2a3067?.[_0x23c5ff(0x1e6)]??0x1,'pageSize':_0x2a3067?.[_0x23c5ff(0x271)]??0x64}});return{'items':extractList(_0x5f5612[_0x23c5ff(0x232)]),'paging':extractPaging(_0x5f5612[_0x23c5ff(0x232)])};}export async function getDbLinkInfo(_0x2d15dc){const _0x3a6cdd=a179_0x18d3,_0xebded5=await apiRequest(_0x3a6cdd(0x22c)+buildQuery({'id':_0x2d15dc}));return _0xebded5['data'];}export async function createDbLink(_0x1edb0f){const _0x14e570=a179_0x18d3,_0x195b74=await apiRequest(_0x14e570(0x283),{'method':'POST','body':_0x1edb0f});return _0x195b74['data'];}export async function updateDbLink(_0x4ab7b4){const _0x4e5333=a179_0x18d3,_0x231f06=await apiRequest(_0x4e5333(0x223),{'method':_0x4e5333(0x25c),'body':_0x4ab7b4});return _0x231f06['data'];}export async function deleteDbLink(_0x1d26f7){const _0x327030=a179_0x18d3;await apiRequest(_0x327030(0x220),{'method':'POST','body':{'id':_0x1d26f7}});}export async function testDbLinkConnect(_0x5db131){const _0x223ed8=a179_0x18d3,_0x40a983=await apiRequest(_0x223ed8(0x26b)+buildQuery({'id':_0x5db131}));return _0x40a983[_0x223ed8(0x232)];}export async function startDbAnalysis(_0x1c6cc8,_0x230e51){const _0x4899df=a179_0x18d3,_0x20fae1=await apiRequest(_0x4899df(0x200),{'method':_0x4899df(0x25c),'body':{'dbLinkId':_0x1c6cc8,..._0x230e51&&_0x230e51[_0x4899df(0x1de)]>0x0?{'tableNames':_0x230e51}:{}}}),_0x5cfaeb=_0x20fae1[_0x4899df(0x232)];if(typeof _0x5cfaeb===_0x4899df(0x25d))return _0x5cfaeb;if(_0x5cfaeb&&typeof _0x5cfaeb===_0x4899df(0x1bf)&&typeof _0x5cfaeb[_0x4899df(0x206)]===_0x4899df(0x25d))return _0x5cfaeb['planId'];return _0x5cfaeb!=null?String(_0x5cfaeb):'';}export async function cancelDbAnalysis(_0x21d630){const _0x14a4a5=a179_0x18d3;await apiRequest(_0x14a4a5(0x25f)+buildQuery({'planId':_0x21d630}),{'method':_0x14a4a5(0x25c)});}export async function getDbAnalysisStatus(_0x4ab747){const _0x3dae26=a179_0x18d3,_0x378fbb=await apiRequest(_0x3dae26(0x1ea)+encodeURIComponent(_0x4ab747));return _0x378fbb[_0x3dae26(0x232)];}export async function getDbAllTableList(_0x3085ac,_0x4de1a2){const _0x3bbab2=a179_0x18d3,_0x36d64e=await apiRequest(_0x3bbab2(0x265)+buildQuery({'appCode':_0x3085ac,'dbLinkId':_0x4de1a2})),_0x1a8550=_0x36d64e[_0x3bbab2(0x232)];if(Array[_0x3bbab2(0x27e)](_0x1a8550))return _0x1a8550;return extractList(_0x1a8550);}export async function getDbTableDiff(_0x47e5c0,_0x507fb9,_0x5d1254){const _0xe53cd=a179_0x18d3,_0x264284=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x47e5c0,'dbLinkId':_0x507fb9,'pageIndex':_0x5d1254?.[_0xe53cd(0x219)]??0x1,'pageSize':_0x5d1254?.[_0xe53cd(0x271)]??0x14,'tableName':_0x5d1254?.[_0xe53cd(0x249)]})),_0x41fdf4=_0x264284[_0xe53cd(0x232)];return{'totalCount':_0x41fdf4?.[_0xe53cd(0x1c9)]??0x0,'physicalTableCount':_0x41fdf4?.[_0xe53cd(0x23d)]??0x0,'datasetTableCount':_0x41fdf4?.[_0xe53cd(0x23e)]??0x0,..._0x41fdf4?.[_0xe53cd(0x242)]?{'summary':_0x41fdf4[_0xe53cd(0x242)]}:{},'tableList':Array['isArray'](_0x41fdf4?.[_0xe53cd(0x29f)])?_0x41fdf4[_0xe53cd(0x29f)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x6c7644=a179_0x18d3,_0x5d7edc=await apiRequest('/smartapi/app/getList',{'method':'POST','body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x38d7eb=extractList(_0x5d7edc['data']),_0x1d32c1=extractPaging(_0x5d7edc[_0x6c7644(0x232)]);return _0x1d32c1&&_0x1d32c1[_0x6c7644(0x1c9)]>REMOTE_APP_PAGE_SIZE&&console[_0x6c7644(0x246)](_0x6c7644(0x216)+REMOTE_APP_PAGE_SIZE+_0x6c7644(0x1f4)+_0x1d32c1[_0x6c7644(0x1c9)]+_0x6c7644(0x29b)+'Use\x20the\x20platform\x20console\x20to\x20see\x20all.'),_0x38d7eb;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x2aa6ec,_0x13f08b){const _0x473988=a179_0x18d3,_0x2fc6be=Math[_0x473988(0x261)](Math[_0x473988(0x236)](_0x13f08b?.[_0x473988(0x271)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x3ff618=await apiRequest('/smartapi/permit/role/get-list',{'method':_0x473988(0x25c),'body':{'appCode':_0x2aa6ec,'currentPage':_0x13f08b?.[_0x473988(0x1e6)]??0x1,'pageSize':_0x2fc6be}});return{'items':extractList(_0x3ff618['data']),'paging':extractPaging(_0x3ff618[_0x473988(0x232)])};}export async function getAppRole(_0x498263){const _0x5b9be0=a179_0x18d3,_0x2d706=await apiRequest(_0x5b9be0(0x222)+buildQuery({'id':_0x498263}));return _0x2d706[_0x5b9be0(0x232)];}export async function createAppRole(_0x2383f2){const _0x594fb7=a179_0x18d3,_0x345655=await apiRequest('/smartapi/permit/role/create',{'method':_0x594fb7(0x25c),'body':{'appCode':_0x2383f2['appCode'],'roleName':_0x2383f2['roleName'],'roleType':_0x594fb7(0x270),..._0x2383f2[_0x594fb7(0x268)]?{'remark':_0x2383f2[_0x594fb7(0x268)]}:{}}});return _0x345655['data'];}export async function updateAppRole(_0x259e1c){const _0x5b12a4=a179_0x18d3,_0x16e393=await apiRequest('/smartapi/permit/role/update',{'method':_0x5b12a4(0x25c),'body':{'id':_0x259e1c['id'],'appCode':_0x259e1c[_0x5b12a4(0x1f5)],..._0x259e1c[_0x5b12a4(0x227)]?{'roleType':_0x259e1c[_0x5b12a4(0x227)]}:{},..._0x259e1c[_0x5b12a4(0x20c)]!==undefined?{'roleName':_0x259e1c['roleName']}:{},..._0x259e1c[_0x5b12a4(0x268)]!==undefined?{'remark':_0x259e1c[_0x5b12a4(0x268)]}:{},..._0x259e1c['permits']?{'permits':_0x259e1c[_0x5b12a4(0x298)]}:{}}});return _0x16e393[_0x5b12a4(0x232)];}export async function deleteAppRole(_0x1edec2){const _0x3364e6=a179_0x18d3;await apiRequest(_0x3364e6(0x22a),{'method':_0x3364e6(0x25c),'body':{'id':_0x1edec2}});}export async function listPermitRoles(_0x1af30b,_0x19f806){const _0x1f21cb=a179_0x18d3,_0x1e21ca=await apiRequest('/smartapi/permit/role/get-permit-list',{'method':_0x1f21cb(0x25c),'body':{'appCode':_0x1af30b,..._0x19f806?.[_0x1f21cb(0x299)]!==undefined?{'needSelf':_0x19f806[_0x1f21cb(0x299)]}:{},..._0x19f806?.[_0x1f21cb(0x29d)]!==undefined?{'needPublic':_0x19f806[_0x1f21cb(0x29d)]}:{}}});return extractList(_0x1e21ca['data']);}export async function getRoleMenuResources(_0x17f165,_0x330873){const _0x5f9ca=a179_0x18d3,_0x5ebef2=await apiRequest(_0x5f9ca(0x27f),{'method':_0x5f9ca(0x25c),'body':{'appCode':_0x17f165,'roleId':_0x330873}});return extractList(_0x5ebef2[_0x5f9ca(0x232)]);}export async function getRoleApiResources(_0x382189,_0xba0596){const _0x5e6c8f=a179_0x18d3,_0x3e88ca=await apiRequest(_0x5e6c8f(0x1d6),{'method':'POST','body':{'appCode':_0x382189,'roleId':_0xba0596}});return extractList(_0x3e88ca[_0x5e6c8f(0x232)]);}export async function listRoleUsers(_0x51ab1f){const _0x455723=a179_0x18d3,_0x331ac7=await apiRequest(_0x455723(0x214),{'method':_0x455723(0x25c),'body':{'appCode':_0x51ab1f}});return extractList(_0x331ac7[_0x455723(0x232)]);}export async function updateRoleUsers(_0x225301,_0x2a9ce6){const _0x386e36=a179_0x18d3;await apiRequest(_0x386e36(0x1cc),{'method':_0x386e36(0x25c),'body':{'appCode':_0x225301,'roleList':_0x2a9ce6}});}export async function getPagePermit(_0x381ff4){const _0x2748d3=a179_0x18d3,_0x2a4305=await apiRequest(_0x2748d3(0x26c)+buildQuery({'menuId':_0x381ff4}));return _0x2a4305[_0x2748d3(0x232)];}export async function savePagePermit(_0x58076c){const _0x2506cf=a179_0x18d3,_0x2e5fae=await apiRequest(_0x2506cf(0x225),{'method':_0x2506cf(0x25c),'body':_0x58076c});return _0x2e5fae[_0x2506cf(0x232)];}export async function getTenantMembers(_0x4767e4){const _0x4676db=a179_0x18d3,_0x568a30=await apiRequest(_0x4676db(0x229)+buildQuery({'code':_0x4767e4})),_0xf3b253=_0x568a30[_0x4676db(0x232)]??{},_0x38ebb3=Array[_0x4676db(0x27e)](_0xf3b253?.[_0x4676db(0x245)])?_0xf3b253[_0x4676db(0x245)]:[];return _0x38ebb3['filter'](_0x4a3b15=>_0x4a3b15?.['status']==='ENABLE'||_0x4a3b15?.[_0x4676db(0x273)]===undefined)['map'](_0x10bc9a=>({'userId':Number(_0x10bc9a[_0x4676db(0x23f)]??_0x10bc9a['id']),'username':_0x10bc9a[_0x4676db(0x212)],'nickname':_0x10bc9a['nickname'],'status':_0x10bc9a[_0x4676db(0x273)],'email':_0x10bc9a[_0x4676db(0x1f0)],'mobile':_0x10bc9a[_0x4676db(0x282)],'avatar':_0x10bc9a[_0x4676db(0x1d0)]}))['filter'](_0x3eada9=>Number[_0x4676db(0x238)](_0x3eada9[_0x4676db(0x23f)])&&_0x3eada9[_0x4676db(0x23f)]>0x0);}
1
+ (function(_0x374d54,_0x5426a8){const _0x29b47b=a179_0x3a01,_0x1bbf3c=_0x374d54();while(!![]){try{const _0x153527=parseInt(_0x29b47b(0x18c))/0x1+parseInt(_0x29b47b(0x157))/0x2+parseInt(_0x29b47b(0x16b))/0x3*(-parseInt(_0x29b47b(0x1f1))/0x4)+-parseInt(_0x29b47b(0x195))/0x5*(-parseInt(_0x29b47b(0x190))/0x6)+-parseInt(_0x29b47b(0x1d8))/0x7+parseInt(_0x29b47b(0x162))/0x8+parseInt(_0x29b47b(0x192))/0x9*(parseInt(_0x29b47b(0x1be))/0xa);if(_0x153527===_0x5426a8)break;else _0x1bbf3c['push'](_0x1bbf3c['shift']());}catch(_0x240cb2){_0x1bbf3c['push'](_0x1bbf3c['shift']());}}}(a179_0x386f,0x55628));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x3845f7){_activeCookie=_0x3845f7||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x376fa8,_0xc3f452){const _0x35f08e=a179_0x3a01,_0x1452f7=_0xc3f452 instanceof Error?_0xc3f452['message']:String(_0xc3f452);return CliErrors[_0x35f08e(0x16c)](_0x35f08e(0x1e8)+_0x376fa8+(_0x1452f7?'\x20('+_0x1452f7+')':''),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}async function apiRequest(_0x1a1ea2,_0x4309de={}){const _0x2095f9=a179_0x3a01,{method:method='GET',body:_0x45ed54,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x4309de,_0x12526c=useRuntime?getRuntimeDomain():getApiDomain(),_0x1abb6f=_activeCookie||getCookie(),_0x2c3b31=''+_0x12526c+_0x1a1ea2,_0x294064=new AbortController(),_0x505734=setTimeout(()=>_0x294064[_0x2095f9(0x1f3)](),timeout);try{const _0x3c546c=await fetch(_0x2c3b31,{'method':method,'headers':{'Content-Type':_0x2095f9(0x1dc),'Cookie':_0x1abb6f,'X-Invoke-Source':_0x2095f9(0x1c9),...headers},'body':_0x45ed54?JSON[_0x2095f9(0x148)](_0x45ed54):undefined,'signal':_0x294064[_0x2095f9(0x183)]});let _0x57ba46;try{_0x57ba46=await _0x3c546c[_0x2095f9(0x150)]();}catch(_0x5dafbd){if(_0x5dafbd instanceof Error&&_0x5dafbd[_0x2095f9(0x20d)]===_0x2095f9(0x1cd))throw CliErrors[_0x2095f9(0x16c)]('Request\x20timeout:\x20'+_0x2c3b31);if(_0x3c546c['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors['apiError']('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x3c546c['status']+')',_0x3c546c[_0x2095f9(0x15e)]>=0x190?_0x2095f9(0x1da):undefined);}if(!_0x3c546c['ok']||_0x57ba46[_0x2095f9(0x189)]===![])throw CliErrors[_0x2095f9(0x16c)](_0x57ba46[_0x2095f9(0x17d)]||_0x57ba46[_0x2095f9(0x1b7)]||_0x2095f9(0x1d4)+_0x3c546c[_0x2095f9(0x15e)],_0x57ba46[_0x2095f9(0x199)]?_0x2095f9(0x15f)+_0x57ba46['errorCode']:undefined);return _0x57ba46;}catch(_0x1017bb){if(_0x1017bb instanceof CliError)throw _0x1017bb;if(_0x1017bb instanceof Error&&_0x1017bb[_0x2095f9(0x20d)]==='AbortError')throw CliErrors[_0x2095f9(0x16c)](_0x2095f9(0x1f5)+_0x2c3b31);throw createFetchFailureError(_0x2c3b31,_0x1017bb);}finally{clearTimeout(_0x505734);}}function isAuthFailure(_0x15c5c1){const _0x4c7155=a179_0x3a01,_0x4bccc7=_0x15c5c1[_0x4c7155(0x17d)]||_0x15c5c1['message']||_0x15c5c1[_0x4c7155(0x167)]?.[_0x4c7155(0x1b7)]||_0x15c5c1[_0x4c7155(0x1f9)]||_0x15c5c1['error']||'';return _0x15c5c1[_0x4c7155(0x199)]===_0x4c7155(0x1d0)||_0x15c5c1['code']===0x191||_0x15c5c1[_0x4c7155(0x18b)]===_0x4c7155(0x149)||_0x4bccc7[_0x4c7155(0x210)](_0x4c7155(0x149))||_0x4bccc7[_0x4c7155(0x210)](_0x4c7155(0x21a))||_0x4bccc7[_0x4c7155(0x210)]('登录')||_0x4bccc7['includes']('认证');}export async function platformFetch(_0xf028dc,_0x54cacf){const _0x507c76=a179_0x3a01;let _0x1d3580;try{_0x1d3580=await fetch(_0xf028dc,{'method':_0x54cacf[_0x507c76(0x154)]??_0x507c76(0x145),'headers':{'Content-Type':'application/json','Cookie':_0x54cacf[_0x507c76(0x1e2)],'X-Invoke-Source':_0x507c76(0x1c9)},..._0x54cacf[_0x507c76(0x217)]&&{'body':JSON[_0x507c76(0x148)](_0x54cacf[_0x507c76(0x217)])}});}catch(_0x509c33){throw createFetchFailureError(_0xf028dc,_0x509c33);}if(!_0x1d3580['ok']){if(_0x1d3580[_0x507c76(0x15e)]===0x191)throw CliErrors[_0x507c76(0x179)]();throw CliErrors[_0x507c76(0x16c)](_0x54cacf['label']+_0x507c76(0x165)+_0x1d3580[_0x507c76(0x15e)]);}const _0x36d7b8=await _0x1d3580[_0x507c76(0x150)]();if(_0x36d7b8[_0x507c76(0x189)]===![]){if(isAuthFailure(_0x36d7b8))throw CliErrors[_0x507c76(0x179)]();throw CliErrors['apiError'](_0x36d7b8['errorMsg']||_0x36d7b8[_0x507c76(0x1b7)]||_0x54cacf[_0x507c76(0x182)]+_0x507c76(0x153));}return _0x36d7b8[_0x507c76(0x167)];}export async function platformRequest(_0x496f0f,_0xb912af){const _0x46ed29=a179_0x3a01;if(/^https?:\/\//i[_0x46ed29(0x19f)](_0x496f0f))throw CliErrors[_0x46ed29(0x1db)](_0x46ed29(0x1ff)+_0x496f0f,_0x46ed29(0x1a4));const _0x7b221=_0x496f0f['startsWith']('/')?_0x496f0f:'/'+_0x496f0f;return platformFetch(''+getApiDomain()+_0x7b221,_0xb912af);}function cleanNewlines(_0x4f059b){const _0x2be05f=a179_0x3a01;return _0x4f059b[_0x2be05f(0x197)](/[\r\n]+/g,'\x20')[_0x2be05f(0x176)]();}function cleanDatasetName(_0x47ba2c){const _0x311f58=a179_0x3a01;if(!_0x47ba2c[_0x311f58(0x20d)])return _0x47ba2c;return{..._0x47ba2c,'name':cleanNewlines(_0x47ba2c['name'])};}export async function fetchModelList(_0x158f34,_0x17de09){const _0x166d16=a179_0x3a01,_0x5706cb=getEnv(),_0x1b16da=new URLSearchParams({'appcode':_0x158f34,'otype':_0x166d16(0x15c)}),_0x16f5ef=_0x166d16(0x1f8)+_0x1b16da[_0x166d16(0x1af)]();logger['info'](_0x166d16(0x151),_0x166d16(0x1b2)+_0x5706cb+')',{'apiPath':_0x16f5ef});const _0x409d06=await platformRequest(_0x16f5ef,{'cookie':_0x17de09,'label':'Fetch\x20datasets'}),_0x3b0bff=(_0x409d06['configArray']??[])[_0x166d16(0x15d)](cleanDatasetName);return{'configArray':_0x3b0bff,'count':_0x3b0bff[_0x166d16(0x1ae)]};}export async function fetchDatasetDoc(_0x16af76){const _0x42fa0e=a179_0x3a01,{appCode:_0x141274,cookie:_0x23bbcb,datasetCode:_0x493716,datasetId:_0x36996e,extraParams:_0x520383}=_0x16af76,_0x4abdad=await platformRequest(_0x42fa0e(0x172),{'method':_0x42fa0e(0x1e3),'body':{'appCode':_0x141274,'datasetCode':_0x493716,'datasetId':_0x36996e,..._0x520383||{}},'cookie':_0x23bbcb,'label':_0x42fa0e(0x196)+_0x493716+')'});if(!_0x4abdad||typeof _0x4abdad[_0x42fa0e(0x1a0)]!==_0x42fa0e(0x1e6))throw new Error(_0x42fa0e(0x170)+_0x493716+_0x42fa0e(0x15a));return _0x4abdad[_0x42fa0e(0x1a0)];}export async function getMenuTree(_0x53cd99,_0x1f8fc7){const _0x1ab5fe=a179_0x3a01,_0x4875c5=new URLSearchParams({'appCode':_0x53cd99});return platformRequest(_0x1ab5fe(0x19c)+_0x4875c5[_0x1ab5fe(0x1af)](),{'cookie':_0x1f8fc7,'label':_0x1ab5fe(0x19d)});}function a179_0x3a01(_0x1cfc12,_0x272cad){_0x1cfc12=_0x1cfc12-0x13e;const _0x386f23=a179_0x386f();let _0x3a0100=_0x386f23[_0x1cfc12];return _0x3a0100;}export async function createMenuRecord(_0x51f01e,_0x43055a,_0x4e098d){return platformRequest('/smartapi/menu/create',{'method':'POST','body':_0x51f01e,'cookie':_0x43055a,'label':_0x4e098d});}export async function updateMenuRecord(_0x442267,_0x275c56,_0xea1169){const _0x341506=a179_0x3a01;return platformRequest(_0x341506(0x1a5),{'method':_0x341506(0x1e3),'body':_0x442267,'cookie':_0x275c56,'label':_0xea1169});}export async function listBffScripts(_0x609f7e,_0x5b23c4,_0x492d6b){const _0x13fff7=a179_0x3a01;let _0x157841='/api/management/library/scripts/list?appCode='+_0x609f7e;if(_0x5b23c4)_0x157841+='&type='+_0x5b23c4;const _0x11f0f2=await apiRequest(_0x157841);let _0x4af1cd=extractList(_0x11f0f2[_0x13fff7(0x167)]);if(_0x492d6b?.[_0x13fff7(0x164)]){const _0x3fc003=_0x492d6b[_0x13fff7(0x164)][_0x13fff7(0x1fa)]();_0x4af1cd=_0x4af1cd[_0x13fff7(0x1cf)](_0x123f15=>_0x123f15[_0x13fff7(0x1ad)]?.[_0x13fff7(0x1fa)]()['includes'](_0x3fc003)||_0x123f15['description']?.['toLowerCase']()[_0x13fff7(0x210)](_0x3fc003));}return _0x4af1cd;}export async function getBffScriptInfo(_0x1811fe){const _0x1dabaa=a179_0x3a01,_0x1f36ff=await apiRequest(_0x1dabaa(0x213)+_0x1811fe);if(!_0x1f36ff[_0x1dabaa(0x167)])throw CliErrors['validation'](_0x1dabaa(0x208)+_0x1811fe);return _0x1f36ff[_0x1dabaa(0x167)];}export async function saveBffScript(_0x15b783){const _0x4855d2=a179_0x3a01,_0x54b620=await apiRequest(_0x4855d2(0x173),{'method':_0x4855d2(0x1e3),'body':_0x15b783}),{id:_0x42bb70,entity:_0x386a9c}=normalizeEntityWithIdResponse(_0x54b620[_0x4855d2(0x167)]);if(_0x42bb70!==undefined){const _0x5afc1a=typeof _0x386a9c[_0x4855d2(0x1ad)]===_0x4855d2(0x1e6)||typeof _0x386a9c['scriptType']===_0x4855d2(0x1e6)?_0x386a9c:undefined;return{'id':_0x42bb70,'script':_0x5afc1a};}throw CliErrors[_0x4855d2(0x16c)](_0x4855d2(0x1bf));}export async function deleteBffScript(_0x1a5521){const _0x2b0ac4=a179_0x3a01;await apiRequest(_0x2b0ac4(0x1f7),{'method':_0x2b0ac4(0x1e3),'body':{'id':_0x1a5521}});}export async function getBffScriptStatistics(_0x372c51){const _0x4ac09b=a179_0x3a01,_0x542436=await apiRequest('/api/management/library/scripts/statistics?appCode='+_0x372c51);return extractList(_0x542436[_0x4ac09b(0x167)]);}export async function clearBffScriptCache(){const _0x33f35a=a179_0x3a01,_0x50f7fa=await apiRequest(_0x33f35a(0x1ee),{'method':'POST','useRuntime':!![]});return typeof _0x50f7fa[_0x33f35a(0x167)]==='string'?_0x50f7fa[_0x33f35a(0x167)]:'';}export async function listBffDatasetOperations(_0x2c5f29,_0x317be4){const _0x4f3f8e=a179_0x3a01,_0x5933ca=await apiRequest(_0x4f3f8e(0x1c5),{'method':'POST','body':{'appCode':_0x2c5f29,'datasetId':_0x317be4}});return _0x5933ca[_0x4f3f8e(0x167)];}export async function listSqlQueries(_0x450acc,_0x14a020){const _0x192af9=a179_0x3a01,_0x3182f3=await apiRequest(_0x192af9(0x1b1),{'method':_0x192af9(0x1e3),'body':{'appCode':_0x450acc,'currentPage':_0x14a020?.[_0x192af9(0x188)]??0x1,'pageSize':_0x14a020?.[_0x192af9(0x20b)]??0x32,'sqlCode':_0x14a020?.['sqlCode'],'sqlName':_0x14a020?.[_0x192af9(0x17b)]}});return _0x3182f3[_0x192af9(0x167)];}export async function getSqlQueryInfo(_0x1a3b35,_0x24d862){const _0x1dd4b7=a179_0x3a01,_0x401799=await listSqlQueries(_0x1a3b35,{'sqlCode':_0x24d862}),_0x1345f1=_0x401799['tableData']?.[0x0];if(!_0x1345f1)throw CliErrors[_0x1dd4b7(0x1db)]('SQL\x20query\x20not\x20found:\x20'+_0x24d862);return _0x1345f1;}function a179_0x386f(){const _0x1be7b3=['/smartapi/dblink/update','list','includes','version','/smartapi/dataset/text-generate/status?','/api/management/library/scripts/info?id=','/userTenant/getByTenantCode','tableList','path','body','datasetTableCount','.create({\x20/*\x20fields\x20*/\x20});','Unauthorized','summary','/filter','deleted','/smartapi/permit/resource/get-api-list','CUSTOM','/smartapi/custom/updateUserCustomSql','planId','GET','\x20\x20return\x20rows;','operationId','stringify','401','appCode','ENABLE','/smartapi/permit/user-role/get-user-list','/smartapi/custom/getUserCustomSql?id=','join','totalCount','json','fetch-model-list','pageIndex','\x20failed','method','Warning:\x20showing\x20first\x20','requirementDescription','92092kHguUi','/api/node-toolbox/sql/save','/smartapi/permit/role/delete','):\x20missing\x20data.markdown\x20field','set','array','map','status','API\x20error\x20code:\x20','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','\x20\x20pageSize:\x2020,','2200832oxEUnD','userId','scriptName','\x20failed,\x20HTTP\x20','push','data','\x20\x20currentPage:\x201,','has','max','793218yfueSe','apiError','/smartapi/permit/resource/get-menu-list','requestFields','responseFields','Invalid\x20response\x20format\x20(','/smartapi/permit/page/get-one','/api/node-toolbox/api-doc-generator','/api/management/library/scripts/save','Page\x20not\x20found:\x20','datasetName','trim','min','dbId','authRequired','/smartapi/dataset/update-driven-data','sqlName','isArray','errorMsg','/smartapi/app-config/getByKey','sqlCode','.remove(id);','/smartapi/lovrabet/update-page','label','signal','\x20\x20});','warn','\x20\x20where:\x20{},','/smartapi/question/er-config/erCreate','currentPage','success','getOne','code','336260KxJuCQ','/smartapi/permit/role/get-permit-list','remark','add','414hmOrzy','needPublic','9QKaote','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','dbtableConfig','36855IOkEnK','Fetch\x20doc\x20(','replace','tableData','errorCode','/smartapi/dataset/text-generate/start','/smartapi/dataset/text-generate/preview','/smartapi/menu/find?','Fetch\x20menu\x20list','type','test','markdown','includeImports','/smartapi/permit/role/get-one','/smartapi/lovrabet/dataset/','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','/smartapi/menu/update','/smartapi/dataset/restore-dataset','roleName','/smartapi/app-config/delete','/smartapi/lovrabet/detail?pageId=','clientOperationId','/generate-standard-pages/start','value','functionName','length','toString','.getOne(id);','/smartapi/custom/queryUserCustomSqlList','正在从服务器拉取模型列表...\x20(环境:\x20','/smartapi/permit/role/get-list','\x20\x20sqlCode:\x20\x27','SQL\x20query\x20not\x20found:\x20','\x20of\x20','message','/smartapi/dblink/create','\x20apps.\x20','avatar','/smartapi/app-config/update','entries','permits','24230gMznSb','BFF\x20save\x20returned\x20no\x20valid\x20id','roleType','/smartapi/question/er-config/update-single','needSelf','/smartapi/dblink/getOne','?sqlCode=','/smartapi/dataset/get-dataset-operation','username','const\x20data\x20=\x20await\x20client.sql.execute({','/smartapi/permit/user-role/update-user-list','cli:rabetbase','tableName','description','/smartapi/dblink/getList','AbortError','key','filter','UNAUTHORIZED','object','dataset_','\x20\x20\x20\x20sqlCode:\x20\x27','API\x20error:\x20','isFinite','const\x20result\x20=\x20await\x20client.models.','/api/','3880030AvhFUa','userTenantRelationList','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','validation','application/json','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','create','/smartapi/db-analysis/jobs/cancel','email','});','cookie','POST','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','string','displayName','Request\x20failed:\x20','delete','/smartapi/dataset/delete-dataset','/smartapi/permit/role/update','\x22\x20not\x20found\x20in\x20dataset\x20','modelId','/api/management/script/cache/clear','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','target','4gUzuAQ','/sync-to-pages','abort','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','Request\x20timeout:\x20','table','/api/management/library/scripts/delete','/api/node-toolbox/dataset/model-list?','errorMessage','toLowerCase','/smartapi/db-analysis/status/','//\x20SQL:\x20','modelCode','tags','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/permit/role/create','nickname','operationName','/generate-standard-pages/status?','.filter({','find','Operation\x20\x22','BFF\x20script\x20not\x20found:\x20id=','/smartapi/custom/getUserCustomSql','/smartapi/db-analysis/start','pageSize','(/*\x20params\x20*/);','name'];a179_0x386f=function(){return _0x1be7b3;};return a179_0x386f();}export async function getSqlQueryDetail(_0x3ad16b){const _0x5b45cb=a179_0x3a01,_0xd9f6e2=await apiRequest(_0x5b45cb(0x209)+(_0x5b45cb(0x1c4)+encodeURIComponent(_0x3ad16b)));if(!_0xd9f6e2['data'])throw CliErrors[_0x5b45cb(0x1db)](_0x5b45cb(0x1b5)+_0x3ad16b);return _0xd9f6e2[_0x5b45cb(0x167)];}export async function getSqlQueryDetailById(_0x376a37){const _0x1d13c6=a179_0x3a01,_0x6ca32f=await apiRequest(_0x1d13c6(0x14d)+_0x376a37);if(!_0x6ca32f[_0x1d13c6(0x167)])throw CliErrors[_0x1d13c6(0x1db)]('SQL\x20query\x20not\x20found:\x20id='+_0x376a37);return _0x6ca32f['data'];}export async function createSqlQuery(_0x1ed3f1){const _0x1c1be2=a179_0x3a01,_0x44494f=await apiRequest('/smartapi/custom/saveUserCustomSql',{'method':'POST','body':_0x1ed3f1}),{id:_0x3c8399,entity:_0x259185}=normalizeEntityWithIdResponse(_0x44494f[_0x1c1be2(0x167)]);if(!(_0x1c1be2(0x17f)in _0x259185)&&_0x3c8399)return getSqlQueryDetailById(_0x3c8399);return normalizeSqlQueryEntity(_0x259185);}export async function updateSqlQuery(_0x67ae6a){const _0x2a5a28=a179_0x3a01,_0x155d2a=await apiRequest(_0x2a5a28(0x143),{'method':_0x2a5a28(0x1e3),'body':_0x67ae6a}),{id:_0x2d6a81,entity:_0x226fb1}=normalizeEntityWithIdResponse(_0x155d2a[_0x2a5a28(0x167)]);if(!('sqlCode'in _0x226fb1)){if(_0x67ae6a[_0x2a5a28(0x17f)])return getSqlQueryDetail(_0x67ae6a[_0x2a5a28(0x17f)]);if(_0x2d6a81)return getSqlQueryDetailById(_0x2d6a81);}return normalizeSqlQueryEntity(_0x226fb1);}export async function deleteSqlQuery(_0x150c20){const _0x5c59b3=a179_0x3a01;await apiRequest('/smartapi/custom/deleteUserCustomSql',{'method':_0x5c59b3(0x1e3),'body':_0x150c20});}export async function saveSqlQuery(_0x5c4b53){const _0x47bc79=a179_0x3a01,_0xfaf7e6=await apiRequest(_0x47bc79(0x158),{'method':_0x47bc79(0x1e3),'body':_0x5c4b53});return _0xfaf7e6[_0x47bc79(0x167)];}function normalizeSqlQueryEntity(_0x3dbea1){const _0x3b3724=a179_0x3a01;return{..._0x3dbea1,'id':Number(_0x3dbea1['id']),'dbId':_0x3dbea1[_0x3b3724(0x178)]==null?undefined:Number(_0x3dbea1[_0x3b3724(0x178)]),'version':_0x3dbea1[_0x3b3724(0x211)]==null?undefined:Number(_0x3dbea1[_0x3b3724(0x211)])};}export async function executeSql(_0x5d2721,_0x179e43,_0x22fc64){const _0x1f28e4=a179_0x3a01,_0x168fb8=await apiRequest('/api/custom/executeSql',{'method':'POST','body':{'appCode':_0x5d2721,'sqlCode':_0x179e43,..._0x22fc64&&{'params':_0x22fc64}},'useRuntime':!![]});return _0x168fb8[_0x1f28e4(0x167)];}export async function executeDatasetDataOperation(_0x2e0578,_0x1b9921,_0x3b5585,_0x35adef={}){const _0x26ac21=a179_0x3a01;try{const _0x12df67=await apiRequest(_0x26ac21(0x1d7)+_0x2e0578+'/'+_0x1b9921+'/'+_0x3b5585,{'method':_0x26ac21(0x1e3),'body':_0x35adef,'useRuntime':!![]});return _0x12df67[_0x26ac21(0x167)];}catch(_0x150ff6){if(_0x3b5585===_0x26ac21(0x18a)&&_0x150ff6 instanceof CliError&&_0x150ff6[_0x26ac21(0x18b)]==='api_error'&&_0x35adef['id']!==undefined&&_0x35adef['id']!==null&&_0x35adef['id']!==''){const _0x2a62d5=await apiRequest('/api/'+_0x2e0578+'/'+_0x1b9921+_0x26ac21(0x13f),{'method':_0x26ac21(0x1e3),'body':{'where':{'id':{'$eq':_0x35adef['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x303bc1=Array[_0x26ac21(0x17c)](_0x2a62d5['data']?.[_0x26ac21(0x198)])?_0x2a62d5['data'][_0x26ac21(0x198)]:[];return _0x303bc1[0x0]??null;}throw _0x150ff6;}}export async function listDatasets(_0x2b1f7b,_0x35ed66){const _0x4c8231=a179_0x3a01,_0x2c2a95={'appCode':_0x2b1f7b,'deleted':_0x35ed66?.[_0x4c8231(0x140)]??![]};if(_0x35ed66?.[_0x4c8231(0x18b)])_0x2c2a95[_0x4c8231(0x18b)]=_0x35ed66[_0x4c8231(0x18b)];if(_0x35ed66?.[_0x4c8231(0x20d)])_0x2c2a95[_0x4c8231(0x20d)]=_0x35ed66[_0x4c8231(0x20d)];const _0x524410=await apiRequest('/smartapi/dataset/get-dataset-list',{'method':_0x4c8231(0x1e3),'body':_0x2c2a95});return extractList(_0x524410[_0x4c8231(0x167)]);}export async function deleteDataset(_0x51019c,_0x2ef2a8){const _0x2da770=a179_0x3a01;await apiRequest(_0x2da770(0x1ea),{'method':_0x2da770(0x1e3),'body':{'appCode':_0x51019c,'datasetId':_0x2ef2a8}});}export async function restoreDataset(_0x5f4dcc,_0x15a00d){const _0x1919c3=a179_0x3a01;await apiRequest(_0x1919c3(0x1a6),{'method':_0x1919c3(0x1e3),'body':{'appCode':_0x5f4dcc,'datasetId':_0x15a00d}});}export async function previewTextGeneratedDataset(_0x1686ed,_0x20a945){const _0x732136=a179_0x3a01,_0x5c6e64=await apiRequest(_0x732136(0x19b),{'method':_0x732136(0x1e3),'body':{'appCode':_0x1686ed,'datasetName':_0x20a945[_0x732136(0x175)],'requirementDescription':_0x20a945[_0x732136(0x156)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x5c6e64[_0x732136(0x167)];}export async function startTextGeneratedDataset(_0xc64045,_0x285cfb,_0x3264ca){const _0x2b5a9e=a179_0x3a01,_0x38e8ef=await apiRequest(_0x2b5a9e(0x19a),{'method':'POST','body':{'appCode':_0xc64045,..._0x3264ca?.['clientOperationId']?{'clientOperationId':_0x3264ca[_0x2b5a9e(0x1aa)]}:{},'design':_0x285cfb},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x38e8ef[_0x2b5a9e(0x167)];}export async function getTextGeneratedDatasetStatus(_0x2dfa76,_0x64bb75){const _0x154816=a179_0x3a01,_0x2a3259=new URLSearchParams({'appCode':_0x2dfa76});_0x64bb75[_0x154816(0x147)]&&_0x2a3259['set'](_0x154816(0x147),_0x64bb75[_0x154816(0x147)]);_0x64bb75[_0x154816(0x1aa)]&&_0x2a3259[_0x154816(0x15b)]('clientOperationId',_0x64bb75[_0x154816(0x1aa)]);const _0xbb6ebc=await apiRequest(_0x154816(0x212)+_0x2a3259[_0x154816(0x1af)]());return _0xbb6ebc[_0x154816(0x167)];}export async function searchDatasets(_0xf9fcb3,_0x2887f4){const _0x6393a3=a179_0x3a01,_0x4678bb=await listDatasets(_0xf9fcb3,{'name':_0x2887f4}),_0x4ba1fa=_0x2887f4[_0x6393a3(0x1fa)](),_0x386df1=new Set(_0x4678bb[_0x6393a3(0x15d)](_0x47e38a=>_0x47e38a['id'])),_0x52904b=_0x4678bb[_0x6393a3(0x1cf)](_0x433cf9=>_0x433cf9[_0x6393a3(0x194)]?.['tableName']?.[_0x6393a3(0x1fa)]()[_0x6393a3(0x210)](_0x4ba1fa)||_0x433cf9[_0x6393a3(0x1cb)]?.[_0x6393a3(0x1fa)]()[_0x6393a3(0x210)](_0x4ba1fa)),_0x460347=await listDatasets(_0xf9fcb3,{'code':_0x2887f4});for(const _0x4bdb6f of _0x460347){!_0x386df1[_0x6393a3(0x169)](_0x4bdb6f['id'])&&(_0x4678bb[_0x6393a3(0x166)](_0x4bdb6f),_0x386df1[_0x6393a3(0x18f)](_0x4bdb6f['id']));}return _0x4678bb;}export function normalizeDatasetOperations(_0x180278){const _0x11375c=a179_0x3a01;if(Array[_0x11375c(0x17c)](_0x180278))return _0x180278['filter'](_0x1d5ee4=>_0x1d5ee4!=null&&typeof _0x1d5ee4===_0x11375c(0x1d1));if(_0x180278&&typeof _0x180278===_0x11375c(0x1d1))return Object[_0x11375c(0x1bc)](_0x180278)[_0x11375c(0x1cf)](([,_0x47fe81])=>_0x47fe81!=null&&typeof _0x47fe81===_0x11375c(0x1d1))['map'](([_0x1af9fa,_0x3bce4e])=>({..._0x3bce4e,'name':_0x3bce4e[_0x11375c(0x20d)]??_0x3bce4e[_0x11375c(0x203)]??_0x1af9fa}));return[];}export async function getDatasetDetail(_0x49fdef){const _0x16e83a=a179_0x3a01,_0xfd71c1=/^\d+$/[_0x16e83a(0x19f)](_0x49fdef)?'id':_0x16e83a(0x18b),_0x586c81=await apiRequest('/smartapi/dataset/get-driven-data?'+_0xfd71c1+'='+_0x49fdef);return _0x586c81[_0x16e83a(0x167)];}export async function updateDrivenData(_0xfd374c){const _0xbe3765=a179_0x3a01,_0x3ac9b0=await apiRequest(_0xbe3765(0x17a),{'method':_0xbe3765(0x1e3),'body':_0xfd374c});return _0x3ac9b0[_0xbe3765(0x167)];}export async function getDatasetOperations(_0x390014){const _0x5879b1=a179_0x3a01,_0x385414=await getDatasetDetail(_0x390014),_0x278fcc=normalizeDatasetOperations(_0x385414['operations'])[_0x5879b1(0x15d)](_0x17b6af=>({'name':_0x17b6af[_0x5879b1(0x20d)]||_0x17b6af[_0x5879b1(0x203)],'displayName':_0x17b6af[_0x5879b1(0x1e7)]||_0x17b6af[_0x5879b1(0x20d)],'type':_0x17b6af[_0x5879b1(0x19e)],'method':_0x17b6af[_0x5879b1(0x154)],'path':_0x17b6af[_0x5879b1(0x216)],'enabled':_0x17b6af['enabled']??!![],'requestFields':_0x17b6af[_0x5879b1(0x16e)],'responseFields':_0x17b6af[_0x5879b1(0x16f)]}));return{'dataset':{'id':_0x385414['id']??_0x385414[_0x5879b1(0x1ed)],'name':_0x385414[_0x5879b1(0x20d)],'code':_0x385414[_0x5879b1(0x18b)]||_0x385414[_0x5879b1(0x1fd)],'tableName':_0x385414[_0x5879b1(0x1ca)]||_0x385414['dbtableConfig']?.['tableName']},'operations':_0x278fcc};}export async function getOperationDetail(_0x1826a7,_0x406517,_0x9bc202){const _0x68982c=a179_0x3a01;let _0x1ade01=_0x406517;if(!/^\d+$/[_0x68982c(0x19f)](_0x406517)){const _0x352176=await listDatasets(_0x1826a7,{'code':_0x406517}),_0x2fd205=_0x352176[_0x68982c(0x206)](_0x5416fe=>_0x5416fe[_0x68982c(0x18b)]===_0x406517||String(_0x5416fe['id'])===_0x406517);if(!_0x2fd205)throw CliErrors[_0x68982c(0x1db)]('Dataset\x20not\x20found:\x20'+_0x406517);_0x1ade01=String(_0x2fd205['id']);}const _0x2658fd=await getDatasetDetail(_0x1ade01),_0x2696b5=normalizeDatasetOperations(_0x2658fd['operations'])['find'](_0x1a6eee=>(_0x1a6eee[_0x68982c(0x20d)]||_0x1a6eee[_0x68982c(0x203)])===_0x9bc202);if(!_0x2696b5)throw CliErrors[_0x68982c(0x1db)](_0x68982c(0x207)+_0x9bc202+_0x68982c(0x1ec)+_0x406517);return{'dataset':{'id':_0x2658fd['id']??_0x2658fd[_0x68982c(0x1ed)],'name':_0x2658fd[_0x68982c(0x20d)],'code':_0x2658fd[_0x68982c(0x18b)]||_0x2658fd[_0x68982c(0x1fd)],'tableName':_0x2658fd[_0x68982c(0x1ca)]||_0x2658fd[_0x68982c(0x194)]?.[_0x68982c(0x1ca)]},'operation':_0x2696b5};}export async function startGenerateStandardPages(_0x3ef647,_0x41534d,_0x185a48){const _0x4997b1=a179_0x3a01,_0x1350f3=await apiRequest(_0x4997b1(0x1a3)+_0x41534d+_0x4997b1(0x1ab),{'method':'POST','body':{'appCode':_0x3ef647,..._0x185a48?.[_0x4997b1(0x1aa)]?{'clientOperationId':_0x185a48[_0x4997b1(0x1aa)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x1350f3[_0x4997b1(0x167)];}export async function getGenerateStandardPagesStatus(_0x40ed42,_0x216029,_0x1ffa6f){const _0x3b3674=a179_0x3a01,_0x4190e1=new URLSearchParams({'appCode':_0x40ed42});_0x1ffa6f[_0x3b3674(0x147)]&&_0x4190e1[_0x3b3674(0x15b)]('operationId',_0x1ffa6f['operationId']);_0x1ffa6f[_0x3b3674(0x1aa)]&&_0x4190e1[_0x3b3674(0x15b)](_0x3b3674(0x1aa),_0x1ffa6f[_0x3b3674(0x1aa)]);const _0x2ef55f=await apiRequest('/smartapi/lovrabet/dataset/'+_0x216029+_0x3b3674(0x204)+_0x4190e1[_0x3b3674(0x1af)]());return _0x2ef55f[_0x3b3674(0x167)];}export async function getStandardPageStatus(_0x78da18,_0x136b4d){const _0x95a3e5=await apiRequest('/smartapi/lovrabet/dataset/'+_0x136b4d+'/standard-page-status?appCode='+encodeURIComponent(_0x78da18));return _0x95a3e5['data'];}export async function tryGetStandardPageStatus(_0x47859d,_0x218f31){const _0x4e7f28=a179_0x3a01;try{return await getStandardPageStatus(_0x47859d,_0x218f31);}catch(_0x4ba6c2){if(_0x4ba6c2 instanceof CliError&&_0x4ba6c2[_0x4e7f28(0x18b)]==='api_error'&&/404|not found|non-json response/i[_0x4e7f28(0x19f)](_0x4ba6c2[_0x4e7f28(0x1b7)]))return null;throw _0x4ba6c2;}}export async function syncStandardPages(_0x34778e,_0x128a7d){const _0x386e5b=a179_0x3a01,_0x2e0df6=await apiRequest(_0x386e5b(0x1a3)+_0x128a7d+_0x386e5b(0x1f2),{'method':'POST','body':{'appCode':_0x34778e}});return _0x2e0df6[_0x386e5b(0x167)];}export async function getPageDetail(_0x39e29b){const _0x160592=a179_0x3a01,_0x23c501=await apiRequest(_0x160592(0x1a9)+_0x39e29b);if(!_0x23c501['data'])throw CliErrors['validation'](_0x160592(0x174)+_0x39e29b);return _0x23c501[_0x160592(0x167)];}export async function updatePage(_0x4749d1,_0x2e28a1,_0x1f3a49,_0x96a0f1){const _0x4651fd=a179_0x3a01,_0x2be029=await apiRequest(_0x4651fd(0x181),{'method':_0x4651fd(0x1e3),'body':{'appCode':_0x4749d1,'pageId':_0x2e28a1,'code':_0x1f3a49,'datasetIds':_0x96a0f1}});return _0x2be029[_0x4651fd(0x167)];}export function generateSdkCode(_0x4b3ffc,_0x45e218,_0x42aa0a){const _0x252bbe=a179_0x3a01,_0xab41b0=_0x42aa0a?.[_0x252bbe(0x1a1)]??!![],_0x4efb96=_0x252bbe(0x1d2)+_0x4b3ffc[_0x252bbe(0x18b)]?.[_0x252bbe(0x197)](/-/g,'_'),_0x59a241=_0x45e218[_0x252bbe(0x20d)]||_0x45e218['operationName']||_0x252bbe(0x1cf),_0x34e530=[];_0xab41b0&&_0x34e530[_0x252bbe(0x166)](_0x252bbe(0x1ef),'',_0x252bbe(0x160),'');_0x34e530['push']('//\x20'+_0x4b3ffc[_0x252bbe(0x20d)]+'\x20('+(_0x4b3ffc['tableName']||_0x252bbe(0x1f6))+')');if(_0x59a241==='filter')_0x34e530[_0x252bbe(0x166)](_0x252bbe(0x1d6)+_0x4efb96+_0x252bbe(0x205),_0x252bbe(0x186),_0x252bbe(0x161),_0x252bbe(0x168),'});');else{if(_0x59a241===_0x252bbe(0x18a))_0x34e530[_0x252bbe(0x166)](_0x252bbe(0x1d6)+_0x4efb96+_0x252bbe(0x1b0));else{if(_0x59a241===_0x252bbe(0x1de))_0x34e530[_0x252bbe(0x166)](_0x252bbe(0x1d6)+_0x4efb96+_0x252bbe(0x219));else{if(_0x59a241==='update')_0x34e530[_0x252bbe(0x166)]('const\x20result\x20=\x20await\x20client.models.'+_0x4efb96+_0x252bbe(0x1dd));else _0x59a241===_0x252bbe(0x1e9)||_0x59a241==='remove'?_0x34e530[_0x252bbe(0x166)](_0x252bbe(0x1d6)+_0x4efb96+_0x252bbe(0x180)):_0x34e530[_0x252bbe(0x166)](_0x252bbe(0x1d6)+_0x4efb96+'.'+_0x59a241+_0x252bbe(0x20c));}}}return _0x34e530[_0x252bbe(0x14e)]('\x0a');}export function generateSqlCodeTemplate(_0x5313b5,_0x3b7f28){const _0x6371e2=a179_0x3a01,_0x6ff5b2=_0x3b7f28?.[_0x6371e2(0x1f0)]??'sdk',_0xb0407=_0x3b7f28?.[_0x6371e2(0x1a1)]??!![],_0x4911df=[];return _0x4911df['push'](_0x6371e2(0x1fc)+_0x5313b5[_0x6371e2(0x17b)]+'\x20('+_0x5313b5[_0x6371e2(0x17f)]+')'),_0x6ff5b2==='sdk'?(_0xb0407&&_0x4911df[_0x6371e2(0x166)](_0x6371e2(0x1ef),'',_0x6371e2(0x160),''),_0x4911df['push'](_0x6371e2(0x1c7),_0x6371e2(0x1b4)+_0x5313b5[_0x6371e2(0x17f)]+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x6371e2(0x1e1),'if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x4911df['push'](_0x6371e2(0x1e4),_0x6371e2(0x193),_0x6371e2(0x1e5),_0x6371e2(0x1d3)+_0x5313b5[_0x6371e2(0x17f)]+'\x27,',_0x6371e2(0x200),_0x6371e2(0x184),_0x6371e2(0x146),'}'),_0x4911df[_0x6371e2(0x14e)]('\x0a');}export async function getErConfig(_0x2c772d,_0x3d039b){const _0x4678d9=a179_0x3a01,_0x4749ad=await apiRequest('/smartapi/question/er-config',{'method':_0x4678d9(0x1e3),'body':{'appCode':_0x2c772d,'dblinkId':_0x3d039b},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x4749ad[_0x4678d9(0x167)];}export async function createErRelation(_0xf45efe){const _0x51caac=a179_0x3a01,_0x47fd2c=await apiRequest(_0x51caac(0x187),{'method':'POST','body':_0xf45efe,'allowNonJsonSuccess':!![]});return _0x47fd2c[_0x51caac(0x167)];}export async function updateErRelation(_0x2ab1f4){const _0x2b0570=a179_0x3a01,_0x80a52f=await apiRequest(_0x2b0570(0x1c1),{'method':_0x2b0570(0x1e3),'body':_0x2ab1f4,'allowNonJsonSuccess':!![]});return _0x80a52f[_0x2b0570(0x167)];}export async function deleteErRelation(_0x552fd4){const _0x488c94=a179_0x3a01,_0x370789=await apiRequest('/smartapi/question/er-config/erDelete',{'method':_0x488c94(0x1e3),'body':_0x552fd4,'allowNonJsonSuccess':!![]});return _0x370789['data'];}export async function updateErBusinessGroup(_0x17b6bc){const _0x4ad4cd=a179_0x3a01,_0x18c6e7=await apiRequest('/smartapi/question/er-config/business-group/edit',{'method':_0x4ad4cd(0x1e3),'body':_0x17b6bc,'allowNonJsonSuccess':!![]});return _0x18c6e7[_0x4ad4cd(0x167)];}function buildQuery(_0xed6cde){const _0x4c3fec=a179_0x3a01,_0x422407=new URLSearchParams();for(const [_0x4ca7eb,_0x383999]of Object[_0x4c3fec(0x1bc)](_0xed6cde)){if(_0x383999===undefined||_0x383999==='')continue;_0x422407[_0x4c3fec(0x15b)](_0x4ca7eb,String(_0x383999));}const _0x25c92b=_0x422407['toString']();return _0x25c92b?'?'+_0x25c92b:'';}export async function listAppConfigs(_0x2be151,_0x331156){const _0x19aa88=a179_0x3a01,_0xa7933=await apiRequest('/smartapi/app-config/list',{'method':_0x19aa88(0x1e3),'body':{'appCode':_0x2be151,..._0x331156?.[_0x19aa88(0x1ce)]?{'key':_0x331156[_0x19aa88(0x1ce)]}:{},..._0x331156?.[_0x19aa88(0x1fe)]?{'tags':_0x331156[_0x19aa88(0x1fe)]}:{}}});return extractAppConfigList(_0xa7933['data']);}export async function getAppConfigByKey(_0x5b821a,_0x4308f3){const _0x169253=a179_0x3a01,_0x53f9d2=await apiRequest(_0x169253(0x17e)+buildQuery({'appCode':_0x5b821a,'key':_0x4308f3}));return _0x53f9d2['data']??null;}export async function createAppConfig(_0x55f60f){const _0x248f38=a179_0x3a01,_0x2c0066=await apiRequest('/smartapi/app-config/create',{'method':_0x248f38(0x1e3),'body':{'appCode':_0x55f60f['appCode'],'key':_0x55f60f[_0x248f38(0x1ce)],'value':_0x55f60f[_0x248f38(0x1ac)],..._0x55f60f[_0x248f38(0x1fe)]?{'tags':_0x55f60f[_0x248f38(0x1fe)]}:{}}});return _0x2c0066[_0x248f38(0x167)];}export async function updateAppConfig(_0x423b21){const _0x1e2b9a=a179_0x3a01;await apiRequest(_0x1e2b9a(0x1bb),{'method':_0x1e2b9a(0x1e3),'body':{'id':_0x423b21['id'],'appCode':_0x423b21[_0x1e2b9a(0x14a)],'key':_0x423b21['key'],'value':_0x423b21[_0x1e2b9a(0x1ac)],..._0x423b21[_0x1e2b9a(0x1fe)]?{'tags':_0x423b21[_0x1e2b9a(0x1fe)]}:{}}});}export async function deleteAppConfig(_0x252316){const _0x388f61=a179_0x3a01;await apiRequest(_0x388f61(0x1a8),{'method':_0x388f61(0x1e3),'body':_0x252316});}function extractAppConfigList(_0x4eeb56){const _0xd75fc2=a179_0x3a01;if(Array[_0xd75fc2(0x17c)](_0x4eeb56))return _0x4eeb56;if(_0x4eeb56&&typeof _0x4eeb56===_0xd75fc2(0x1d1)&&Array[_0xd75fc2(0x17c)](_0x4eeb56[_0xd75fc2(0x20f)]))return _0x4eeb56[_0xd75fc2(0x20f)];return extractList(_0x4eeb56);}export async function listDbLinks(_0x12d3fa,_0x11df01){const _0x2ac4f8=a179_0x3a01,_0x3355d4=await apiRequest(_0x2ac4f8(0x1cc),{'method':_0x2ac4f8(0x1e3),'body':{'appCode':_0x12d3fa,'currentPage':_0x11df01?.['currentPage']??0x1,'pageSize':_0x11df01?.[_0x2ac4f8(0x20b)]??0x64}});return{'items':extractList(_0x3355d4[_0x2ac4f8(0x167)]),'paging':extractPaging(_0x3355d4[_0x2ac4f8(0x167)])};}export async function getDbLinkInfo(_0x523232){const _0x435c9e=a179_0x3a01,_0x1e4771=await apiRequest(_0x435c9e(0x1c3)+buildQuery({'id':_0x523232}));return _0x1e4771[_0x435c9e(0x167)];}export async function createDbLink(_0x11e7bf){const _0x49f2d2=a179_0x3a01,_0x32af93=await apiRequest(_0x49f2d2(0x1b8),{'method':'POST','body':_0x11e7bf});return _0x32af93[_0x49f2d2(0x167)];}export async function updateDbLink(_0x280daa){const _0x11d749=a179_0x3a01,_0x2f9cf7=await apiRequest(_0x11d749(0x20e),{'method':_0x11d749(0x1e3),'body':_0x280daa});return _0x2f9cf7[_0x11d749(0x167)];}export async function deleteDbLink(_0x574faa){const _0x55d5e9=a179_0x3a01;await apiRequest('/smartapi/dblink/delete',{'method':_0x55d5e9(0x1e3),'body':{'id':_0x574faa}});}export async function testDbLinkConnect(_0x26dd1f){const _0x2a84cc=a179_0x3a01,_0xf7d0fc=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x26dd1f}));return _0xf7d0fc[_0x2a84cc(0x167)];}export async function startDbAnalysis(_0x317c0b,_0x2be5e9){const _0x547840=a179_0x3a01,_0x5da985=await apiRequest(_0x547840(0x20a),{'method':_0x547840(0x1e3),'body':{'dbLinkId':_0x317c0b,..._0x2be5e9&&_0x2be5e9[_0x547840(0x1ae)]>0x0?{'tableNames':_0x2be5e9}:{}}}),_0x298382=_0x5da985[_0x547840(0x167)];if(typeof _0x298382===_0x547840(0x1e6))return _0x298382;if(_0x298382&&typeof _0x298382===_0x547840(0x1d1)&&typeof _0x298382[_0x547840(0x144)]===_0x547840(0x1e6))return _0x298382[_0x547840(0x144)];return _0x298382!=null?String(_0x298382):'';}export async function cancelDbAnalysis(_0x7fb066){const _0x15c091=a179_0x3a01;await apiRequest(_0x15c091(0x1df)+buildQuery({'planId':_0x7fb066}),{'method':'POST'});}export async function getDbAnalysisStatus(_0x31fdd9){const _0x3872b0=a179_0x3a01,_0x179acd=await apiRequest(_0x3872b0(0x1fb)+encodeURIComponent(_0x31fdd9));return _0x179acd['data'];}export async function getDbAllTableList(_0x34ae1a,_0xa9afad){const _0x552903=a179_0x3a01,_0x241ff9=await apiRequest('/smartapi/dblink/getAllTableList'+buildQuery({'appCode':_0x34ae1a,'dbLinkId':_0xa9afad})),_0x32adc0=_0x241ff9[_0x552903(0x167)];if(Array[_0x552903(0x17c)](_0x32adc0))return _0x32adc0;return extractList(_0x32adc0);}export async function getDbTableDiff(_0x3d8db8,_0x5539fe,_0x4f39c5){const _0x4b6686=a179_0x3a01,_0x7394b7=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x3d8db8,'dbLinkId':_0x5539fe,'pageIndex':_0x4f39c5?.[_0x4b6686(0x152)]??0x1,'pageSize':_0x4f39c5?.[_0x4b6686(0x20b)]??0x14,'tableName':_0x4f39c5?.[_0x4b6686(0x1ca)]})),_0x78be73=_0x7394b7[_0x4b6686(0x167)];return{'totalCount':_0x78be73?.['totalCount']??0x0,'physicalTableCount':_0x78be73?.['physicalTableCount']??0x0,'datasetTableCount':_0x78be73?.[_0x4b6686(0x218)]??0x0,..._0x78be73?.[_0x4b6686(0x13e)]?{'summary':_0x78be73[_0x4b6686(0x13e)]}:{},'tableList':Array[_0x4b6686(0x17c)](_0x78be73?.[_0x4b6686(0x215)])?_0x78be73[_0x4b6686(0x215)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x45725e=a179_0x3a01,_0x14427e=await apiRequest('/smartapi/app/getList',{'method':_0x45725e(0x1e3),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x407fd4=extractList(_0x14427e[_0x45725e(0x167)]),_0x54f412=extractPaging(_0x14427e[_0x45725e(0x167)]);return _0x54f412&&_0x54f412[_0x45725e(0x14f)]>REMOTE_APP_PAGE_SIZE&&console[_0x45725e(0x185)](_0x45725e(0x155)+REMOTE_APP_PAGE_SIZE+_0x45725e(0x1b6)+_0x54f412[_0x45725e(0x14f)]+_0x45725e(0x1b9)+_0x45725e(0x1f4)),_0x407fd4;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x231fff,_0x61a3b5){const _0x287d59=a179_0x3a01,_0x4614e0=Math[_0x287d59(0x177)](Math[_0x287d59(0x16a)](_0x61a3b5?.[_0x287d59(0x20b)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x301f22=await apiRequest(_0x287d59(0x1b3),{'method':'POST','body':{'appCode':_0x231fff,'currentPage':_0x61a3b5?.[_0x287d59(0x188)]??0x1,'pageSize':_0x4614e0}});return{'items':extractList(_0x301f22[_0x287d59(0x167)]),'paging':extractPaging(_0x301f22['data'])};}export async function getAppRole(_0x3c232b){const _0x365714=a179_0x3a01,_0x4a920f=await apiRequest(_0x365714(0x1a2)+buildQuery({'id':_0x3c232b}));return _0x4a920f[_0x365714(0x167)];}export async function createAppRole(_0x4dfbe3){const _0xd6579e=a179_0x3a01,_0x15d127=await apiRequest(_0xd6579e(0x201),{'method':_0xd6579e(0x1e3),'body':{'appCode':_0x4dfbe3[_0xd6579e(0x14a)],'roleName':_0x4dfbe3['roleName'],'roleType':_0xd6579e(0x142),..._0x4dfbe3[_0xd6579e(0x18e)]?{'remark':_0x4dfbe3['remark']}:{}}});return _0x15d127[_0xd6579e(0x167)];}export async function updateAppRole(_0x363b22){const _0x32e6e0=a179_0x3a01,_0xf5685=await apiRequest(_0x32e6e0(0x1eb),{'method':_0x32e6e0(0x1e3),'body':{'id':_0x363b22['id'],'appCode':_0x363b22[_0x32e6e0(0x14a)],..._0x363b22['roleType']?{'roleType':_0x363b22[_0x32e6e0(0x1c0)]}:{},..._0x363b22[_0x32e6e0(0x1a7)]!==undefined?{'roleName':_0x363b22[_0x32e6e0(0x1a7)]}:{},..._0x363b22['remark']!==undefined?{'remark':_0x363b22[_0x32e6e0(0x18e)]}:{},..._0x363b22[_0x32e6e0(0x1bd)]?{'permits':_0x363b22['permits']}:{}}});return _0xf5685[_0x32e6e0(0x167)];}export async function deleteAppRole(_0x5a3df7){const _0x5dda91=a179_0x3a01;await apiRequest(_0x5dda91(0x159),{'method':_0x5dda91(0x1e3),'body':{'id':_0x5a3df7}});}export async function listPermitRoles(_0x255dbb,_0xd4bcd7){const _0x44205e=a179_0x3a01,_0x558120=await apiRequest(_0x44205e(0x18d),{'method':'POST','body':{'appCode':_0x255dbb,..._0xd4bcd7?.[_0x44205e(0x1c2)]!==undefined?{'needSelf':_0xd4bcd7['needSelf']}:{},..._0xd4bcd7?.[_0x44205e(0x191)]!==undefined?{'needPublic':_0xd4bcd7[_0x44205e(0x191)]}:{}}});return extractList(_0x558120[_0x44205e(0x167)]);}export async function getRoleMenuResources(_0x5a3d3e,_0x59b4ab){const _0x129c31=a179_0x3a01,_0x79d654=await apiRequest(_0x129c31(0x16d),{'method':'POST','body':{'appCode':_0x5a3d3e,'roleId':_0x59b4ab}});return extractList(_0x79d654[_0x129c31(0x167)]);}export async function getRoleApiResources(_0x2d43ba,_0x511473){const _0x158e8b=a179_0x3a01,_0x4e007d=await apiRequest(_0x158e8b(0x141),{'method':_0x158e8b(0x1e3),'body':{'appCode':_0x2d43ba,'roleId':_0x511473}});return extractList(_0x4e007d[_0x158e8b(0x167)]);}export async function listRoleUsers(_0x2c3626){const _0x42a00f=a179_0x3a01,_0x455807=await apiRequest(_0x42a00f(0x14c),{'method':_0x42a00f(0x1e3),'body':{'appCode':_0x2c3626}});return extractList(_0x455807[_0x42a00f(0x167)]);}export async function updateRoleUsers(_0x59e202,_0x560212){const _0x12a9ab=a179_0x3a01;await apiRequest(_0x12a9ab(0x1c8),{'method':_0x12a9ab(0x1e3),'body':{'appCode':_0x59e202,'roleList':_0x560212}});}export async function getPagePermit(_0x5b58b8){const _0x53eb55=a179_0x3a01,_0x2b6b66=await apiRequest(_0x53eb55(0x171)+buildQuery({'menuId':_0x5b58b8}));return _0x2b6b66['data'];}export async function savePagePermit(_0x3c03f9){const _0x1bde94=a179_0x3a01,_0x1c62ef=await apiRequest('/smartapi/permit/page/save',{'method':'POST','body':_0x3c03f9});return _0x1c62ef[_0x1bde94(0x167)];}export async function getTenantMembers(_0x2a5ffa){const _0x3c5f72=a179_0x3a01,_0x4167df=await apiRequest(_0x3c5f72(0x214)+buildQuery({'code':_0x2a5ffa})),_0x148fa4=_0x4167df[_0x3c5f72(0x167)]??{},_0x34763e=Array[_0x3c5f72(0x17c)](_0x148fa4?.[_0x3c5f72(0x1d9)])?_0x148fa4[_0x3c5f72(0x1d9)]:[];return _0x34763e[_0x3c5f72(0x1cf)](_0x2b8cb9=>_0x2b8cb9?.[_0x3c5f72(0x15e)]===_0x3c5f72(0x14b)||_0x2b8cb9?.[_0x3c5f72(0x15e)]===undefined)[_0x3c5f72(0x15d)](_0x1e4626=>({'userId':Number(_0x1e4626[_0x3c5f72(0x163)]??_0x1e4626['id']),'username':_0x1e4626[_0x3c5f72(0x1c6)],'nickname':_0x1e4626[_0x3c5f72(0x202)],'status':_0x1e4626[_0x3c5f72(0x15e)],'email':_0x1e4626[_0x3c5f72(0x1e0)],'mobile':_0x1e4626['mobile'],'avatar':_0x1e4626[_0x3c5f72(0x1ba)]}))[_0x3c5f72(0x1cf)](_0x189f7a=>Number[_0x3c5f72(0x1d5)](_0x189f7a['userId'])&&_0x189f7a[_0x3c5f72(0x163)]>0x0);}
@@ -1 +1 @@
1
- function a180_0x4791(){const _0x30603c=['6224655QHoEkG','bff.lock.json','649577gCGCgU','7679iDMIFW','992540skgwHu','.rabetbase','4IaLzUo','25527634xnMrVd','3oIAgeB','1646904KSGqpp','/bff','bff-trash','427258LrzMEO','7662nYOxdx','36ljWJBO','bff'];a180_0x4791=function(){return _0x30603c;};return a180_0x4791();}const a180_0x10e73e=a180_0x5ddc;(function(_0x5a9674,_0xa6ada6){const _0x1bf6e5=a180_0x5ddc,_0x4ebde6=_0x5a9674();while(!![]){try{const _0x18a29c=parseInt(_0x1bf6e5(0x194))/0x1+parseInt(_0x1bf6e5(0x19e))/0x2*(parseInt(_0x1bf6e5(0x19a))/0x3)+parseInt(_0x1bf6e5(0x198))/0x4*(-parseInt(_0x1bf6e5(0x1a2))/0x5)+parseInt(_0x1bf6e5(0x19f))/0x6*(-parseInt(_0x1bf6e5(0x195))/0x7)+-parseInt(_0x1bf6e5(0x19b))/0x8+-parseInt(_0x1bf6e5(0x1a0))/0x9*(-parseInt(_0x1bf6e5(0x196))/0xa)+parseInt(_0x1bf6e5(0x199))/0xb;if(_0x18a29c===_0xa6ada6)break;else _0x4ebde6['push'](_0x4ebde6['shift']());}catch(_0x48cf3e){_0x4ebde6['push'](_0x4ebde6['shift']());}}}(a180_0x4791,0xb20a5));import{resolve}from'node:path';function a180_0x5ddc(_0x112731,_0x41bc7d){_0x112731=_0x112731-0x194;const _0x479103=a180_0x4791();let _0x5ddc90=_0x479103[_0x112731];return _0x5ddc90;}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a180_0x10e73e(0x197),LOCK_FILE_NAME=a180_0x10e73e(0x1a3),TRASH_DIR_NAME=a180_0x10e73e(0x19d);export function loadBffProjectConfig(_0x4af0de,_0x2aaff1){const _0x5057a9=a180_0x10e73e,_0x8b533f=resolve(_0x2aaff1??findProjectRootDirectory()),_0x43bcbc=DOT_DIR+_0x5057a9(0x19c),_0x1f0c36=_0x43bcbc+'/'+_0x4af0de;return{'projectRoot':_0x8b533f,'appCode':_0x4af0de,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x43bcbc,'scriptsRoot':_0x1f0c36,'scriptsRootDir':resolve(_0x8b533f,DOT_DIR,_0x5057a9(0x1a1),_0x4af0de),'lockFilePath':resolve(_0x8b533f,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x8b533f,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a180_0x2908ef=a180_0x2fdf;(function(_0x4801d4,_0x564ad0){const _0x132596=a180_0x2fdf,_0x225483=_0x4801d4();while(!![]){try{const _0x5a1590=-parseInt(_0x132596(0xb0))/0x1*(-parseInt(_0x132596(0xb1))/0x2)+-parseInt(_0x132596(0xb4))/0x3*(parseInt(_0x132596(0xb7))/0x4)+parseInt(_0x132596(0xab))/0x5*(-parseInt(_0x132596(0xb2))/0x6)+parseInt(_0x132596(0xac))/0x7*(parseInt(_0x132596(0xba))/0x8)+parseInt(_0x132596(0xaf))/0x9*(-parseInt(_0x132596(0xb5))/0xa)+parseInt(_0x132596(0xb3))/0xb+-parseInt(_0x132596(0xb8))/0xc;if(_0x5a1590===_0x564ad0)break;else _0x225483['push'](_0x225483['shift']());}catch(_0x37da56){_0x225483['push'](_0x225483['shift']());}}}(a180_0x42e3,0xc66f7));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a180_0x2fdf(_0x40230b,_0x229ad7){_0x40230b=_0x40230b-0xaa;const _0x42e38c=a180_0x42e3();let _0x2fdf0a=_0x42e38c[_0x40230b];return _0x2fdf0a;}function a180_0x42e3(){const _0x1cbd25=['9465883DrwOJP','bff-trash','/bff','2151WRZNwO','53291DFMrrN','52ILgoEY','12rBCbHF','16148000ybtdhI','3qsSJth','39530dzOUnU','bff.lock.json','5844060REvSgJ','3398856IlmBlu','.rabetbase','8AvFRGs','bff','1760060adobhI'];a180_0x42e3=function(){return _0x1cbd25;};return a180_0x42e3();}const DOT_DIR=a180_0x2908ef(0xb9),LOCK_FILE_NAME=a180_0x2908ef(0xb6),TRASH_DIR_NAME=a180_0x2908ef(0xad);export function loadBffProjectConfig(_0x546e9c,_0x9f012b){const _0x5e1cbc=a180_0x2908ef,_0x30fa53=resolve(_0x9f012b??findProjectRootDirectory()),_0xb45e30=DOT_DIR+_0x5e1cbc(0xae),_0x25977f=_0xb45e30+'/'+_0x546e9c;return{'projectRoot':_0x30fa53,'appCode':_0x546e9c,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0xb45e30,'scriptsRoot':_0x25977f,'scriptsRootDir':resolve(_0x30fa53,DOT_DIR,_0x5e1cbc(0xaa),_0x546e9c),'lockFilePath':resolve(_0x30fa53,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x30fa53,DOT_DIR,TRASH_DIR_NAME)};}