@treasuredata/tdx 2026.9.2 → 2026.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/dist/bin.js +1 -1
  2. package/dist/build-info.json +3 -3
  3. package/dist/cli-categories.js +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +1 -1
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands/activations.js +1 -1
  8. package/dist/commands/agent-command.js +1 -1
  9. package/dist/commands/agent-test-command.js +1 -1
  10. package/dist/commands/ai-usage-command-base.js +1 -1
  11. package/dist/commands/api-command.js +1 -1
  12. package/dist/commands/auth-command.js +1 -1
  13. package/dist/commands/cas-command.js +1 -1
  14. package/dist/commands/cas-segment-command.js +1 -1
  15. package/dist/commands/chat-command.js +1 -1
  16. package/dist/commands/claude-command.d.ts +11 -0
  17. package/dist/commands/claude-command.d.ts.map +1 -1
  18. package/dist/commands/claude-command.js +1 -1
  19. package/dist/commands/claude-command.js.map +1 -1
  20. package/dist/commands/claude-statusline-command.js +1 -1
  21. package/dist/commands/claude-usage-command.js +1 -1
  22. package/dist/commands/codex-command.js +1 -1
  23. package/dist/commands/command.js +1 -1
  24. package/dist/commands/connection-command.js +1 -1
  25. package/dist/commands/databases.js +1 -1
  26. package/dist/commands/delivery-command.js +1 -1
  27. package/dist/commands/describe.js +1 -1
  28. package/dist/commands/engage-always-on-campaign-pull-command.js +1 -1
  29. package/dist/commands/engage-always-on-campaign-push-command.js +1 -1
  30. package/dist/commands/engage-always-on-campaign-validate-command.js +1 -1
  31. package/dist/commands/engage-campaign-pull-command.js +1 -1
  32. package/dist/commands/engage-campaign-push-command.js +1 -1
  33. package/dist/commands/engage-campaign-readiness-command.js +1 -1
  34. package/dist/commands/engage-campaign-validate-command.js +1 -1
  35. package/dist/commands/engage-command.js +1 -1
  36. package/dist/commands/engage-in-browser-message-command.js +1 -1
  37. package/dist/commands/engage-landing-page-command.js +1 -1
  38. package/dist/commands/engage-template-pull-command.js +1 -1
  39. package/dist/commands/engage-template-push-command.js +1 -1
  40. package/dist/commands/engage-template-validate-command.js +1 -1
  41. package/dist/commands/engage-workspace-assignment-command.js +1 -1
  42. package/dist/commands/job-command.js +1 -1
  43. package/dist/commands/journey-command.js +1 -1
  44. package/dist/commands/journey-validate-command.js +1 -1
  45. package/dist/commands/llm-command.js +1 -1
  46. package/dist/commands/mcp-command.js +1 -1
  47. package/dist/commands/opencode-command.js +1 -1
  48. package/dist/commands/opencode-usage-command.js +1 -1
  49. package/dist/commands/p13n-command.js +1 -1
  50. package/dist/commands/parent-segment-command.js +1 -1
  51. package/dist/commands/policy-command.js +1 -1
  52. package/dist/commands/profile-command.js +1 -1
  53. package/dist/commands/profiles-command.js +1 -1
  54. package/dist/commands/query-command.js +1 -1
  55. package/dist/commands/schedule-command.js +1 -1
  56. package/dist/commands/segment-command.js +1 -1
  57. package/dist/commands/segment-create-command.js +1 -1
  58. package/dist/commands/segment-fields-command.js +1 -1
  59. package/dist/commands/segment-move-command.js +1 -1
  60. package/dist/commands/segment-pull-command.js +1 -1
  61. package/dist/commands/segment-push-command.js +1 -1
  62. package/dist/commands/segment-update-command.js +1 -1
  63. package/dist/commands/segment-use-command.js +1 -1
  64. package/dist/commands/segment-validate-command.js +1 -1
  65. package/dist/commands/segments.js +1 -1
  66. package/dist/commands/show.js +1 -1
  67. package/dist/commands/status-command.js +1 -1
  68. package/dist/commands/table-deleted.js +1 -1
  69. package/dist/commands/tables.js +1 -1
  70. package/dist/commands/unset-command.js +1 -1
  71. package/dist/commands/upgrade-command.js +1 -1
  72. package/dist/commands/use-command.js +1 -1
  73. package/dist/commands/user-command.js +1 -1
  74. package/dist/commands/work-command.js +1 -1
  75. package/dist/commands/workflow-command.js +1 -1
  76. package/dist/core/auth.js +1 -1
  77. package/dist/core/command-output.js +1 -1
  78. package/dist/core/config.js +1 -1
  79. package/dist/core/connection-cache.js +1 -1
  80. package/dist/core/constants.js +1 -1
  81. package/dist/core/credential-cache.js +1 -1
  82. package/dist/core/global-context.js +1 -1
  83. package/dist/core/keychain.js +1 -1
  84. package/dist/core/oauth-keychain.js +1 -1
  85. package/dist/core/oauth.js +1 -1
  86. package/dist/core/profile.js +1 -1
  87. package/dist/core/project-config.js +1 -1
  88. package/dist/core/session.js +1 -1
  89. package/dist/core/site-mismatch.js +1 -1
  90. package/dist/core/user-cache.js +1 -1
  91. package/dist/core/version.js +1 -1
  92. package/dist/index.js +1 -1
  93. package/dist/mcp/server.js +1 -1
  94. package/dist/mcp/tools/index.js +1 -1
  95. package/dist/mcp/tools/tdx-run.js +1 -1
  96. package/dist/mcp/tools/tdx-search.js +1 -1
  97. package/dist/mcp/tools/work-create-item.js +1 -1
  98. package/dist/mcp/utils.js +1 -1
  99. package/dist/proxy/claude-usage-tracker.d.ts +1 -0
  100. package/dist/proxy/claude-usage-tracker.d.ts.map +1 -1
  101. package/dist/proxy/claude-usage-tracker.js +1 -1
  102. package/dist/proxy/claude-usage-tracker.js.map +1 -1
  103. package/dist/proxy/passthrough-server.d.ts.map +1 -1
  104. package/dist/proxy/passthrough-server.js +1 -1
  105. package/dist/proxy/passthrough-server.js.map +1 -1
  106. package/dist/proxy/sse-usage-parser.d.ts +2 -0
  107. package/dist/proxy/sse-usage-parser.d.ts.map +1 -1
  108. package/dist/proxy/sse-usage-parser.js +1 -1
  109. package/dist/proxy/sse-usage-parser.js.map +1 -1
  110. package/dist/sdk/agent/agent-config.js +1 -1
  111. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  112. package/dist/sdk/agent/agent-yaml.js +1 -1
  113. package/dist/sdk/agent/test/evaluator.js +1 -1
  114. package/dist/sdk/agent/test/executor.js +1 -1
  115. package/dist/sdk/agent/test/index.js +1 -1
  116. package/dist/sdk/agent/test/output.js +1 -1
  117. package/dist/sdk/agent/test/parser.js +1 -1
  118. package/dist/sdk/agent/tool-target-registry.js +1 -1
  119. package/dist/sdk/api.js +1 -1
  120. package/dist/sdk/auth-token.js +1 -1
  121. package/dist/sdk/cas/cas-api-client.js +1 -1
  122. package/dist/sdk/cas/cas-audience-schema.js +1 -1
  123. package/dist/sdk/cas/cas-audience-validator.js +1 -1
  124. package/dist/sdk/cas/cas-audience-yaml.js +1 -1
  125. package/dist/sdk/cas/cas-segment-schema.js +1 -1
  126. package/dist/sdk/cas/cas-segment-validator.js +1 -1
  127. package/dist/sdk/cas/cas-segment-yaml.js +1 -1
  128. package/dist/sdk/cas/index.js +1 -1
  129. package/dist/sdk/cas/pull-workflow.js +1 -1
  130. package/dist/sdk/cas/push-workflow.js +1 -1
  131. package/dist/sdk/cas/validate-files.js +1 -1
  132. package/dist/sdk/client/cdp-api-client.js +1 -1
  133. package/dist/sdk/client/delivery-api-client.js +1 -1
  134. package/dist/sdk/client/endpoints.js +1 -1
  135. package/dist/sdk/client/engage-api-client.js +1 -1
  136. package/dist/sdk/client/http-client.js +1 -1
  137. package/dist/sdk/client/llm-api-client.js +1 -1
  138. package/dist/sdk/client/oauth-refresh.js +1 -1
  139. package/dist/sdk/client/p13n-studio-api-client.js +1 -1
  140. package/dist/sdk/client/rate-limiter.js +1 -1
  141. package/dist/sdk/client/td-api-client.js +1 -1
  142. package/dist/sdk/client/trino-api-client.js +1 -1
  143. package/dist/sdk/client/workflow-client.js +1 -1
  144. package/dist/sdk/connection-validator.js +1 -1
  145. package/dist/sdk/connection.js +1 -1
  146. package/dist/sdk/delivery.js +1 -1
  147. package/dist/sdk/engage/always-on-campaign-pull.js +1 -1
  148. package/dist/sdk/engage/always-on-campaign-push.js +1 -1
  149. package/dist/sdk/engage/always-on-campaign-validator.js +1 -1
  150. package/dist/sdk/engage/always-on-campaign-yaml.js +1 -1
  151. package/dist/sdk/engage/campaign-pull.js +1 -1
  152. package/dist/sdk/engage/campaign-push.js +1 -1
  153. package/dist/sdk/engage/campaign-readiness-workflow.js +1 -1
  154. package/dist/sdk/engage/campaign-readiness.js +1 -1
  155. package/dist/sdk/engage/campaign-validator.js +1 -1
  156. package/dist/sdk/engage/campaign-yaml.js +1 -1
  157. package/dist/sdk/engage/in-browser-message-pull.js +1 -1
  158. package/dist/sdk/engage/in-browser-message-push.js +1 -1
  159. package/dist/sdk/engage/in-browser-message-validator.js +1 -1
  160. package/dist/sdk/engage/in-browser-message-yaml.js +1 -1
  161. package/dist/sdk/engage/landing-page-init.js +1 -1
  162. package/dist/sdk/engage/landing-page-public-asset.js +1 -1
  163. package/dist/sdk/engage/landing-page-pull.js +1 -1
  164. package/dist/sdk/engage/landing-page-push.js +1 -1
  165. package/dist/sdk/engage/landing-page-static-site.js +1 -1
  166. package/dist/sdk/engage/landing-page-validator.js +1 -1
  167. package/dist/sdk/engage/landing-page-workspace.js +1 -1
  168. package/dist/sdk/engage/landing-page-yaml.js +1 -1
  169. package/dist/sdk/engage/list-campaign-schema.js +1 -1
  170. package/dist/sdk/engage/list-campaign-yaml.js +1 -1
  171. package/dist/sdk/engage/template-pull.js +1 -1
  172. package/dist/sdk/engage/template-push.js +1 -1
  173. package/dist/sdk/engage/template-validator.js +1 -1
  174. package/dist/sdk/engage/template-yaml.js +1 -1
  175. package/dist/sdk/engage/types/always-on-campaign-schema.js +1 -1
  176. package/dist/sdk/engage/types/campaign-def.js +1 -1
  177. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  178. package/dist/sdk/engage/types/in-browser-message-schema.js +1 -1
  179. package/dist/sdk/engage/types/landing-page-schema.js +1 -1
  180. package/dist/sdk/engage/types/template-schema.js +1 -1
  181. package/dist/sdk/engage/workspace-assignments.js +1 -1
  182. package/dist/sdk/engage.js +1 -1
  183. package/dist/sdk/errors.js +1 -1
  184. package/dist/sdk/index.js +1 -1
  185. package/dist/sdk/io/index.js +1 -1
  186. package/dist/sdk/io/node-filesystem.js +1 -1
  187. package/dist/sdk/job.js +1 -1
  188. package/dist/sdk/journey.js +1 -1
  189. package/dist/sdk/llm/chat-cache.js +1 -1
  190. package/dist/sdk/llm/index.js +1 -1
  191. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  192. package/dist/sdk/llm/model-factors.d.ts +5 -3
  193. package/dist/sdk/llm/model-factors.d.ts.map +1 -1
  194. package/dist/sdk/llm/model-factors.js +1 -1
  195. package/dist/sdk/llm/model-factors.js.map +1 -1
  196. package/dist/sdk/llm/user-settings.js +1 -1
  197. package/dist/sdk/p13n-studio-errors.js +1 -1
  198. package/dist/sdk/p13n-studio.js +1 -1
  199. package/dist/sdk/personalization.js +1 -1
  200. package/dist/sdk/policy.js +1 -1
  201. package/dist/sdk/query/deleted-table-validation.js +1 -1
  202. package/dist/sdk/query/index.js +1 -1
  203. package/dist/sdk/query/sql-parser.js +1 -1
  204. package/dist/sdk/realtime.js +1 -1
  205. package/dist/sdk/schedule.js +1 -1
  206. package/dist/sdk/segment/audience-context.js +1 -1
  207. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  208. package/dist/sdk/segment/fields-display.js +1 -1
  209. package/dist/sdk/segment/file-discovery.js +1 -1
  210. package/dist/sdk/segment/journey-utils.js +1 -1
  211. package/dist/sdk/segment/journey-validator.js +1 -1
  212. package/dist/sdk/segment/journey-yaml.js +1 -1
  213. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  214. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  215. package/dist/sdk/segment/pull-workflow.js +1 -1
  216. package/dist/sdk/segment/push-recovery.js +1 -1
  217. package/dist/sdk/segment/push-workflow.js +1 -1
  218. package/dist/sdk/segment/resolution-context.js +1 -1
  219. package/dist/sdk/segment/segment-path-parser.js +1 -1
  220. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  221. package/dist/sdk/segment/segment-validator.js +1 -1
  222. package/dist/sdk/segment/target-resolution.js +1 -1
  223. package/dist/sdk/segment/tdx-config.js +1 -1
  224. package/dist/sdk/segment/types/activation-schema.js +1 -1
  225. package/dist/sdk/segment/types/journey-def.js +1 -1
  226. package/dist/sdk/segment/types/journey-schema.js +1 -1
  227. package/dist/sdk/segment/types/segment-def.js +1 -1
  228. package/dist/sdk/segment/types/segment-schema.js +1 -1
  229. package/dist/sdk/segment/validate-files.js +1 -1
  230. package/dist/sdk/segment/yaml-validator.js +1 -1
  231. package/dist/sdk/segment.js +1 -1
  232. package/dist/sdk/types/index.js +1 -1
  233. package/dist/sdk/types/progress.js +1 -1
  234. package/dist/sdk/types/workspace.js +1 -1
  235. package/dist/sdk/user.js +1 -1
  236. package/dist/sdk/util/format-detector.js +1 -1
  237. package/dist/sdk/util/formatters.js +1 -1
  238. package/dist/sdk/util/index.js +1 -1
  239. package/dist/sdk/util/paginate.js +1 -1
  240. package/dist/sdk/util/tree-formatter.js +1 -1
  241. package/dist/sdk/util/tree-search.js +1 -1
  242. package/dist/sdk/workflow/archive-validation.js +1 -1
  243. package/dist/sdk/workflow/clone-workflow.js +1 -1
  244. package/dist/sdk/workflow/index.js +1 -1
  245. package/dist/sdk/workflow/pull-workflow.js +1 -1
  246. package/dist/sdk/workflow/push-workflow.js +1 -1
  247. package/dist/sdk/workflow/task-graph.js +1 -1
  248. package/dist/sdk/workflow/tdx-config.js +1 -1
  249. package/dist/sdk/workflow/workflow-utils.js +1 -1
  250. package/dist/sdk/workspace/access-tracker.js +1 -1
  251. package/dist/sdk/workspace/frontmatter.js +1 -1
  252. package/dist/sdk/workspace/git.js +1 -1
  253. package/dist/sdk/workspace/index.js +1 -1
  254. package/dist/sdk/workspace/templates.js +1 -1
  255. package/dist/sdk/workspace/weekly.js +1 -1
  256. package/dist/sdk/workspace/wikilinks.js +1 -1
  257. package/dist/test-utils/command-runner.js +1 -1
  258. package/dist/test-utils/factories.js +1 -1
  259. package/dist/test-utils/fixtures.js +1 -1
  260. package/dist/test-utils/http-mock.js +1 -1
  261. package/dist/test-utils/index.js +1 -1
  262. package/dist/utils/async.js +1 -1
  263. package/dist/utils/claude-code-state.js +1 -1
  264. package/dist/utils/colors.js +1 -1
  265. package/dist/utils/diff.js +1 -1
  266. package/dist/utils/file-permissions.js +1 -1
  267. package/dist/utils/file-reader.js +1 -1
  268. package/dist/utils/github-releases.js +1 -1
  269. package/dist/utils/global-cache.js +1 -1
  270. package/dist/utils/json-loader.js +1 -1
  271. package/dist/utils/local-cache.js +1 -1
  272. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  273. package/dist/utils/logger/formatters/index.js +1 -1
  274. package/dist/utils/logger/handlers/console-handler.js +1 -1
  275. package/dist/utils/logger/handlers/file-handler.js +1 -1
  276. package/dist/utils/logger/handlers/index.js +1 -1
  277. package/dist/utils/logger/handlers/null-handler.js +1 -1
  278. package/dist/utils/logger/index.js +1 -1
  279. package/dist/utils/logger/logger.js +1 -1
  280. package/dist/utils/logger/types.js +1 -1
  281. package/dist/utils/option-validation.js +1 -1
  282. package/dist/utils/process.js +1 -1
  283. package/dist/utils/prompt.js +1 -1
  284. package/dist/utils/proxy-fetch.js +1 -1
  285. package/dist/utils/spinner.js +1 -1
  286. package/dist/utils/sse-parser.js +1 -1
  287. package/dist/utils/string-utils.js +1 -1
  288. package/dist/utils/table-ref-parser.js +1 -1
  289. package/dist/utils/tdx-logger.js +1 -1
  290. package/dist/utils/version-check.js +1 -1
  291. package/package.json +1 -1
@@ -1 +1 @@
1
- const a190_0x379e50=a190_0x4aa3;(function(_0x1302cc,_0x526ced){const _0x18f7ab=a190_0x4aa3,_0x2db062=_0x1302cc();while(!![]){try{const _0x482023=-parseInt(_0x18f7ab(0x99))/0x1+-parseInt(_0x18f7ab(0x7d))/0x2*(-parseInt(_0x18f7ab(0x87))/0x3)+-parseInt(_0x18f7ab(0x80))/0x4+parseInt(_0x18f7ab(0xa0))/0x5+-parseInt(_0x18f7ab(0x9d))/0x6+parseInt(_0x18f7ab(0x9c))/0x7*(parseInt(_0x18f7ab(0x96))/0x8)+parseInt(_0x18f7ab(0x8c))/0x9*(-parseInt(_0x18f7ab(0x8e))/0xa);if(_0x482023===_0x526ced)break;else _0x2db062['push'](_0x2db062['shift']());}catch(_0x498812){_0x2db062['push'](_0x2db062['shift']());}}}(a190_0x42da,0x9f7db));import{HTTPClient}from'./client/http-client.js';import{CDPApiClient}from'./client/cdp-api-client.js';import{getEndpoint}from'./client/endpoints.js';import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';function a190_0x4aa3(_0x5b3b5d,_0x5538d5){_0x5b3b5d=_0x5b3b5d-0x74;const _0x42da11=a190_0x42da();let _0x4aa3c0=_0x42da11[_0x5b3b5d];return _0x4aa3c0;}function a190_0x42da(){const _0x33b0d5=['disabled','cdp','attributes','9oPCNQk','request','7542170fpLnvc','enabled','getCurrentConfigVersion','name','getStatus','getCurrentRealtimeConfigVersion','PUT','resumeRealtimeJourney','25288uiVPaZ','getConfig','population','29054PzfAvK','httpClient','list','2359hBfgAW','4434918MvIDPd','/audiences/','getParentSegment','4353990ozTJlB','site','scheduleType','/realtime_setting','cdpClient','object','application/vnd.treasuredata.v1+json','listParentSegments','length','listJourneys','8lJVzXy','proxy','isEnabled','2414256fDZRto','updatedAt','accessToken','timeout','GET','all','pauseRealtimeJourney','632406PcYgGy','updateConfig'];a190_0x42da=function(){return _0x33b0d5;};return a190_0x42da();}export class RealtimeSDK{[a190_0x379e50(0x9a)];[a190_0x379e50(0x77)];constructor(_0x53feee){const _0x4a491f=a190_0x379e50,_0x32f0e0=getEndpoint(_0x53feee['site'],_0x4a491f(0x8a)),_0x461e26=toHeaderRecord(getAuthHeaders(_0x53feee[_0x4a491f(0x74)],_0x53feee['apiKey'],_0x53feee[_0x4a491f(0x82)]));this[_0x4a491f(0x9a)]=new HTTPClient(_0x32f0e0,{..._0x461e26,'Accept':_0x4a491f(0x79),'Content-Type':'application/json'},{'proxy':_0x53feee[_0x4a491f(0x7e)],'defaultTimeout':_0x53feee[_0x4a491f(0x83)]}),this[_0x4a491f(0x77)]=new CDPApiClient(_0x53feee);}async[a190_0x379e50(0x7f)](_0x48ff69){const _0x13f0c9=a190_0x379e50;try{const _0x93a74e=await this[_0x13f0c9(0x9a)]['request'](_0x13f0c9(0x84),_0x13f0c9(0x9e)+_0x48ff69+'/realtime_setting');return _0x93a74e!==null;}catch{return![];}}async[a190_0x379e50(0x92)](_0x37b4b5){const _0x1982ea=a190_0x379e50,_0x22b819=await this[_0x1982ea(0x77)][_0x1982ea(0x9f)](_0x37b4b5);let _0x18618e=![],_0x1b0446=![];try{const _0x379377=await this[_0x1982ea(0x9a)][_0x1982ea(0x8d)]('GET',_0x1982ea(0x9e)+_0x37b4b5+_0x1982ea(0x76));_0x18618e=!![],_0x1b0446=!!(_0x379377&&typeof _0x379377===_0x1982ea(0x78)&&Object['keys'](_0x379377)[_0x1982ea(0x7b)]>0x0);}catch{_0x18618e=![],_0x1b0446=![];}return{'parent_segment_id':_0x37b4b5,'parent_segment_name':_0x22b819[_0x1982ea(0x8b)][_0x1982ea(0x91)],'realtime_enabled':_0x18618e,'realtime_config_exists':_0x1b0446,'status':_0x18618e?_0x1982ea(0x8f):_0x1982ea(0x89)};}async[a190_0x379e50(0x97)](_0x57ce95){const _0xeba7e4=a190_0x379e50,_0x58bb1e=await this[_0xeba7e4(0x9a)][_0xeba7e4(0x8d)](_0xeba7e4(0x84),_0xeba7e4(0x9e)+_0x57ce95+_0xeba7e4(0x76));return _0x58bb1e||{};}async[a190_0x379e50(0x88)](_0x8fe2e7,_0x4e3bdd){const _0x22bba8=a190_0x379e50,_0x296112=await this['httpClient']['request'](_0x22bba8(0x94),_0x22bba8(0x9e)+_0x8fe2e7+_0x22bba8(0x76),{'body':_0x4e3bdd});return _0x296112||{};}async[a190_0x379e50(0x9b)](){const _0x2f1118=a190_0x379e50,_0x49dd57=await this[_0x2f1118(0x77)][_0x2f1118(0x7a)](),_0x2787c0=await Promise[_0x2f1118(0x85)](_0x49dd57['map'](async _0xf38360=>{const _0x4fbdab=_0x2f1118,_0x101de0=await this[_0x4fbdab(0x7f)](_0xf38360['id']);return{'id':_0xf38360['id'],'name':_0xf38360[_0x4fbdab(0x8b)][_0x4fbdab(0x91)],'population':_0xf38360[_0x4fbdab(0x8b)][_0x4fbdab(0x98)],'realtime_enabled':_0x101de0,'schedule_type':_0xf38360[_0x4fbdab(0x8b)][_0x4fbdab(0x75)],'updated_at':_0xf38360[_0x4fbdab(0x8b)][_0x4fbdab(0x81)]};}));return _0x2787c0;}async[a190_0x379e50(0x7c)](_0x3e4167){const _0x51dfb8=a190_0x379e50;return await this[_0x51dfb8(0x77)]['listRealtimeJourneys'](_0x3e4167);}async['pauseJourney'](_0x40a6b5){const _0x3a93ff=a190_0x379e50;return await this[_0x3a93ff(0x77)][_0x3a93ff(0x86)](_0x40a6b5);}async['resumeJourney'](_0x4f9e2c){const _0x4646bb=a190_0x379e50;return await this[_0x4646bb(0x77)][_0x4646bb(0x95)](_0x4f9e2c);}async[a190_0x379e50(0x90)](_0x3c02a3){const _0x5585d2=a190_0x379e50;return await this[_0x5585d2(0x77)][_0x5585d2(0x93)](_0x3c02a3);}}
1
+ const a190_0x2f953e=a190_0x1c93;(function(_0x30c0ba,_0x455479){const _0x1bda25=a190_0x1c93,_0x2425c4=_0x30c0ba();while(!![]){try{const _0x4e0c45=parseInt(_0x1bda25(0x1fa))/0x1+-parseInt(_0x1bda25(0x202))/0x2*(-parseInt(_0x1bda25(0x1eb))/0x3)+parseInt(_0x1bda25(0x1e5))/0x4+-parseInt(_0x1bda25(0x1e0))/0x5*(parseInt(_0x1bda25(0x1e6))/0x6)+parseInt(_0x1bda25(0x1ec))/0x7+parseInt(_0x1bda25(0x1ed))/0x8*(parseInt(_0x1bda25(0x1f7))/0x9)+parseInt(_0x1bda25(0x1db))/0xa*(-parseInt(_0x1bda25(0x1e3))/0xb);if(_0x4e0c45===_0x455479)break;else _0x2425c4['push'](_0x2425c4['shift']());}catch(_0x3ab2a3){_0x2425c4['push'](_0x2425c4['shift']());}}}(a190_0x54a0,0xcb19d));function a190_0x1c93(_0x3671bc,_0x145ae2){_0x3671bc=_0x3671bc-0x1d8;const _0x54a0fa=a190_0x54a0();let _0x1c93bd=_0x54a0fa[_0x3671bc];return _0x1c93bd;}import{HTTPClient}from'./client/http-client.js';import{CDPApiClient}from'./client/cdp-api-client.js';import{getEndpoint}from'./client/endpoints.js';function a190_0x54a0(){const _0x3b65b1=['11Svbvht','request','6158480tAhxcv','6tSPMrI','map','GET','cdpClient','scheduleType','423921sqlINA','7032116VWIwyS','22376IgGcmo','listJourneys','length','/realtime_setting','object','attributes','list','accessToken','all','timeout','5085kxvGly','population','resumeRealtimeJourney','1014284FmJCkq','/audiences/','pauseRealtimeJourney','pauseJourney','getConfig','site','getParentSegment','application/json','6YPFBTc','getCurrentConfigVersion','application/vnd.treasuredata.v1+json','isEnabled','proxy','46140950oRfUQi','httpClient','getCurrentRealtimeConfigVersion','disabled','enabled','583610oPJuwu','keys','listParentSegments'];a190_0x54a0=function(){return _0x3b65b1;};return a190_0x54a0();}import{getAuthHeaders,toHeaderRecord}from'../core/auth.js';export class RealtimeSDK{['httpClient'];[a190_0x2f953e(0x1e9)];constructor(_0x43a978){const _0x33a320=a190_0x2f953e,_0x4e8a1a=getEndpoint(_0x43a978[_0x33a320(0x1ff)],'cdp'),_0x5e4520=toHeaderRecord(getAuthHeaders(_0x43a978[_0x33a320(0x1ff)],_0x43a978['apiKey'],_0x43a978[_0x33a320(0x1f4)]));this[_0x33a320(0x1dc)]=new HTTPClient(_0x4e8a1a,{..._0x5e4520,'Accept':_0x33a320(0x1d8),'Content-Type':_0x33a320(0x201)},{'proxy':_0x43a978[_0x33a320(0x1da)],'defaultTimeout':_0x43a978[_0x33a320(0x1f6)]}),this['cdpClient']=new CDPApiClient(_0x43a978);}async[a190_0x2f953e(0x1d9)](_0x54d9d8){const _0x7f3c1e=a190_0x2f953e;try{const _0x20718a=await this[_0x7f3c1e(0x1dc)]['request'](_0x7f3c1e(0x1e8),_0x7f3c1e(0x1fb)+_0x54d9d8+'/realtime_setting');return _0x20718a!==null;}catch{return![];}}async['getStatus'](_0x3d204f){const _0x39a54d=a190_0x2f953e,_0x1a322d=await this['cdpClient'][_0x39a54d(0x200)](_0x3d204f);let _0x58de1e=![],_0x3f7e6b=![];try{const _0x140b71=await this[_0x39a54d(0x1dc)][_0x39a54d(0x1e4)](_0x39a54d(0x1e8),'/audiences/'+_0x3d204f+_0x39a54d(0x1f0));_0x58de1e=!![],_0x3f7e6b=!!(_0x140b71&&typeof _0x140b71===_0x39a54d(0x1f1)&&Object[_0x39a54d(0x1e1)](_0x140b71)[_0x39a54d(0x1ef)]>0x0);}catch{_0x58de1e=![],_0x3f7e6b=![];}return{'parent_segment_id':_0x3d204f,'parent_segment_name':_0x1a322d['attributes']['name'],'realtime_enabled':_0x58de1e,'realtime_config_exists':_0x3f7e6b,'status':_0x58de1e?_0x39a54d(0x1df):_0x39a54d(0x1de)};}async[a190_0x2f953e(0x1fe)](_0x4ed617){const _0x4ad87f=a190_0x2f953e,_0x181d88=await this[_0x4ad87f(0x1dc)][_0x4ad87f(0x1e4)](_0x4ad87f(0x1e8),'/audiences/'+_0x4ed617+_0x4ad87f(0x1f0));return _0x181d88||{};}async['updateConfig'](_0x23d2ef,_0x39630c){const _0x2f62f2=a190_0x2f953e,_0x4c47bf=await this[_0x2f62f2(0x1dc)][_0x2f62f2(0x1e4)]('PUT',_0x2f62f2(0x1fb)+_0x23d2ef+'/realtime_setting',{'body':_0x39630c});return _0x4c47bf||{};}async[a190_0x2f953e(0x1f3)](){const _0x32e696=a190_0x2f953e,_0xbbf3b9=await this['cdpClient'][_0x32e696(0x1e2)](),_0x373f3e=await Promise[_0x32e696(0x1f5)](_0xbbf3b9[_0x32e696(0x1e7)](async _0xa2c320=>{const _0x483023=_0x32e696,_0x543548=await this[_0x483023(0x1d9)](_0xa2c320['id']);return{'id':_0xa2c320['id'],'name':_0xa2c320[_0x483023(0x1f2)]['name'],'population':_0xa2c320['attributes'][_0x483023(0x1f8)],'realtime_enabled':_0x543548,'schedule_type':_0xa2c320['attributes'][_0x483023(0x1ea)],'updated_at':_0xa2c320[_0x483023(0x1f2)]['updatedAt']};}));return _0x373f3e;}async[a190_0x2f953e(0x1ee)](_0x2fe2b6){const _0x5a88d1=a190_0x2f953e;return await this[_0x5a88d1(0x1e9)]['listRealtimeJourneys'](_0x2fe2b6);}async[a190_0x2f953e(0x1fd)](_0x44c08f){const _0xdd1641=a190_0x2f953e;return await this[_0xdd1641(0x1e9)][_0xdd1641(0x1fc)](_0x44c08f);}async['resumeJourney'](_0x1e491c){const _0xd204c5=a190_0x2f953e;return await this[_0xd204c5(0x1e9)][_0xd204c5(0x1f9)](_0x1e491c);}async[a190_0x2f953e(0x203)](_0x5c8e42){const _0x20d007=a190_0x2f953e;return await this[_0x20d007(0x1e9)][_0x20d007(0x1dd)](_0x5c8e42);}}
@@ -1 +1 @@
1
- const a191_0x1d182b=a191_0x1644;function a191_0x1644(_0x457bee,_0x26e70e){_0x457bee=_0x457bee-0x69;const _0x5c3c4f=a191_0x5c3c();let _0x164481=_0x5c3c4f[_0x457bee];return _0x164481;}(function(_0x39b542,_0x1f4d50){const _0x15e364=a191_0x1644,_0x3f008f=_0x39b542();while(!![]){try{const _0x10f776=parseInt(_0x15e364(0x9b))/0x1+-parseInt(_0x15e364(0x9a))/0x2*(parseInt(_0x15e364(0x87))/0x3)+-parseInt(_0x15e364(0x77))/0x4+-parseInt(_0x15e364(0x74))/0x5*(-parseInt(_0x15e364(0x81))/0x6)+-parseInt(_0x15e364(0x6d))/0x7*(parseInt(_0x15e364(0x79))/0x8)+parseInt(_0x15e364(0xa3))/0x9+parseInt(_0x15e364(0x7b))/0xa*(parseInt(_0x15e364(0x73))/0xb);if(_0x10f776===_0x1f4d50)break;else _0x3f008f['push'](_0x3f008f['shift']());}catch(_0x43f151){_0x3f008f['push'](_0x3f008f['shift']());}}}(a191_0x5c3c,0xb7428));function a191_0x5c3c(){const _0x490fd8=['test','find','database','history','push','28wiKaUY','update','deleteSchedule','num\x20must\x20be\x20between\x201\x20and\x2010','desc','map','53372MmWelE','70NBOpZC','limit','slice','4408800SJuLjE','type','267088qRtHLG','pattern','2740kbogHC','filter','getTime','create','Query\x20is\x20required','time','148602aHNjnt','updated_at','runSchedule','run','createSchedule','INVALID_ARGUMENT','719157uvYUoZ','list','listQueries','cron','query','NOT_FOUND','length','pagination','client','name','delete','floor','created_at','num','scheduled','Database\x20is\x20required','string','end_at','has_next_page','6nwMyzi','371997WrremY','getScheduleHistory','listSchedules','Schedule\x20name\x20is\x20required','updateSchedule','\x5c$&','queries','start_at','5916150PDGvix','\x20UTC','Type\x20is\x20required','replace'];a191_0x5c3c=function(){return _0x490fd8;};return a191_0x5c3c();}import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0x4f7750){const _0x21e85a=a191_0x1644;if(!_0x4f7750)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x21e85a(0xa7)](_0x4f7750))return _0x4f7750;return _0x4f7750[_0x21e85a(0xa6)](_0x21e85a(0xa4),'Z')[_0x21e85a(0xa6)]('\x20','T');}export class ScheduleSDK{[a191_0x1d182b(0x8f)];constructor(_0x8f5a5){const _0x51684b=a191_0x1d182b;this[_0x51684b(0x8f)]=new TDApiClient(_0x8f5a5);}async[a191_0x1d182b(0x88)](_0x56a8f1){const _0x3f40ed=a191_0x1d182b,_0x375a44=await this[_0x3f40ed(0x8f)]['listSchedules'](),_0x30de32=_0x375a44[_0x3f40ed(0x72)](_0x2c55f3=>({..._0x2c55f3,'created_at':normalizeTimestamp(_0x2c55f3['created_at'])??_0x2c55f3[_0x3f40ed(0x93)]}));if(_0x56a8f1?.[_0x3f40ed(0x75)]&&_0x56a8f1[_0x3f40ed(0x75)]>0x0)return _0x30de32[_0x3f40ed(0x76)](0x0,_0x56a8f1[_0x3f40ed(0x75)]);return _0x30de32;}async['listQueries'](_0x5785f9){const _0xec8ac1=a191_0x1d182b,_0xddfb95=0x64,_0xa93ae2=_0x5785f9?.['limit'],_0x282aa5=[];let _0x20caa8=!![],_0x349b24,_0x5d3389,_0x2cdba2;if(_0x5785f9?.[_0xec8ac1(0x7a)]){const _0x569dfa=_0x5785f9[_0xec8ac1(0x7a)][_0xec8ac1(0xa6)](/[.+^${}()|[\]\\]/g,_0xec8ac1(0xa0)),_0x3d08f6=_0x569dfa[_0xec8ac1(0xa6)](/\*/g,'.*')[_0xec8ac1(0xa6)](/\?/g,'.');_0x2cdba2=new RegExp('^'+_0x3d08f6+'$','i');}while(_0x20caa8&&(!_0xa93ae2||_0x282aa5['length']<_0xa93ae2)){const _0x4c8e71=await this[_0xec8ac1(0x8f)][_0xec8ac1(0x89)]({'anchor_column':_0xec8ac1(0x82),'sort_direction':_0xec8ac1(0x71),'page_size':_0xddfb95,'anchor_id':_0x349b24,'anchor_value':_0x5d3389});let _0x3c0664=_0x4c8e71['queries'];_0x5785f9?.[_0xec8ac1(0x95)]&&(_0x3c0664=_0x3c0664[_0xec8ac1(0x7c)](_0x558051=>_0x558051[_0xec8ac1(0x8a)]!==null));_0x2cdba2&&(_0x3c0664=_0x3c0664[_0xec8ac1(0x7c)](_0x53a9e4=>_0x53a9e4['name']&&_0x2cdba2[_0xec8ac1(0xa7)](_0x53a9e4[_0xec8ac1(0x90)])));_0x282aa5[_0xec8ac1(0x6c)](..._0x3c0664),_0x20caa8=_0x4c8e71[_0xec8ac1(0x8e)][_0xec8ac1(0x99)];if(_0x20caa8&&_0x4c8e71['queries'][_0xec8ac1(0x8d)]>0x0){const _0x50e793=_0x4c8e71[_0xec8ac1(0xa1)][_0x4c8e71[_0xec8ac1(0xa1)][_0xec8ac1(0x8d)]-0x1];_0x349b24=_0x50e793['id'],_0x5d3389=_0x50e793[_0xec8ac1(0x82)];}}const _0x478505=_0xa93ae2?_0x282aa5[_0xec8ac1(0x76)](0x0,_0xa93ae2):_0x282aa5;return{'queries':_0x478505,'pagination':{'has_next_page':_0x20caa8||(_0xa93ae2?_0x282aa5['length']>_0xa93ae2:![])}};}async['show'](_0x15a5a9){const _0x3eff8d=a191_0x1d182b,_0x4aeafd=await this['client'][_0x3eff8d(0x9d)](),_0x4566c5=_0x4aeafd[_0x3eff8d(0x69)](_0x5ebac9=>_0x5ebac9[_0x3eff8d(0x90)]===_0x15a5a9);if(!_0x4566c5)throw new SDKError(ErrorCode[_0x3eff8d(0x8c)],'Schedule\x20not\x20found:\x20'+_0x15a5a9);return{..._0x4566c5,'created_at':normalizeTimestamp(_0x4566c5[_0x3eff8d(0x93)])??_0x4566c5['created_at']};}async[a191_0x1d182b(0x7e)](_0x2cc417,_0x27bb4a){const _0x2dd5dc=a191_0x1d182b;if(!_0x2cc417)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2dd5dc(0x9e));if(!_0x27bb4a[_0x2dd5dc(0x6a)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2dd5dc(0x96));if(!_0x27bb4a[_0x2dd5dc(0x8b)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x2dd5dc(0x7f));if(!_0x27bb4a[_0x2dd5dc(0x78)])throw new SDKError(ErrorCode[_0x2dd5dc(0x86)],_0x2dd5dc(0xa5));return await this[_0x2dd5dc(0x8f)][_0x2dd5dc(0x85)](_0x2cc417,_0x27bb4a);}async[a191_0x1d182b(0x6e)](_0x5d6153,_0x527bbb){const _0x2081b0=a191_0x1d182b;if(!_0x5d6153)throw new SDKError(ErrorCode[_0x2081b0(0x86)],_0x2081b0(0x9e));return await this[_0x2081b0(0x8f)][_0x2081b0(0x9f)](_0x5d6153,_0x527bbb);}async[a191_0x1d182b(0x91)](_0x3165cb){const _0x10379d=a191_0x1d182b;if(!_0x3165cb)throw new SDKError(ErrorCode[_0x10379d(0x86)],_0x10379d(0x9e));return await this[_0x10379d(0x8f)][_0x10379d(0x6f)](_0x3165cb);}async[a191_0x1d182b(0x84)](_0x114299,_0x3c6de0){const _0x32f46d=a191_0x1d182b;if(!_0x114299)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x32f46d(0x9e));let _0x292511;if(_0x3c6de0?.[_0x32f46d(0x80)]){const _0x31e29e=typeof _0x3c6de0['time']===_0x32f46d(0x97)?new Date(_0x3c6de0['time']):_0x3c6de0[_0x32f46d(0x80)];if(isNaN(_0x31e29e[_0x32f46d(0x7d)]()))throw new SDKError(ErrorCode[_0x32f46d(0x86)],'Invalid\x20time\x20format:\x20'+_0x3c6de0[_0x32f46d(0x80)]);_0x292511=Math[_0x32f46d(0x92)](_0x31e29e[_0x32f46d(0x7d)]()/0x3e8);}else _0x292511=Math[_0x32f46d(0x92)](Date['now']()/0x3e8);if(_0x3c6de0?.['num']!==undefined){if(_0x3c6de0['num']<0x1||_0x3c6de0[_0x32f46d(0x94)]>0xa)throw new SDKError(ErrorCode[_0x32f46d(0x86)],_0x32f46d(0x70));}return await this[_0x32f46d(0x8f)][_0x32f46d(0x83)](_0x114299,_0x292511,_0x3c6de0?.[_0x32f46d(0x94)]);}async[a191_0x1d182b(0x6b)](_0x230bf3,_0x87d8e7){const _0x3cafbd=a191_0x1d182b;if(!_0x230bf3)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x3cafbd(0x9e));const _0x5064fb=await this[_0x3cafbd(0x8f)][_0x3cafbd(0x9c)](_0x230bf3,_0x87d8e7);return{..._0x5064fb,'history':_0x5064fb['history'][_0x3cafbd(0x72)](_0x1a03fc=>({..._0x1a03fc,'created_at':normalizeTimestamp(_0x1a03fc[_0x3cafbd(0x93)]),'start_at':normalizeTimestamp(_0x1a03fc[_0x3cafbd(0xa2)]),'end_at':normalizeTimestamp(_0x1a03fc[_0x3cafbd(0x98)])}))};}}
1
+ const a191_0x254f87=a191_0x27a1;(function(_0x4d6e6b,_0x4a6061){const _0x42a8ad=a191_0x27a1,_0x3b933c=_0x4d6e6b();while(!![]){try{const _0x3c7810=-parseInt(_0x42a8ad(0x1b1))/0x1*(-parseInt(_0x42a8ad(0x1ca))/0x2)+parseInt(_0x42a8ad(0x1dc))/0x3+parseInt(_0x42a8ad(0x1c4))/0x4*(parseInt(_0x42a8ad(0x1bf))/0x5)+parseInt(_0x42a8ad(0x1c7))/0x6+-parseInt(_0x42a8ad(0x1d6))/0x7*(parseInt(_0x42a8ad(0x1d0))/0x8)+parseInt(_0x42a8ad(0x1c1))/0x9*(parseInt(_0x42a8ad(0x1b0))/0xa)+-parseInt(_0x42a8ad(0x1b7))/0xb;if(_0x3c7810===_0x4a6061)break;else _0x3b933c['push'](_0x3b933c['shift']());}catch(_0x2a77de){_0x3b933c['push'](_0x3b933c['shift']());}}}(a191_0x35bb,0xc0ee5));function a191_0x27a1(_0x3c923e,_0xa2d279){_0x3c923e=_0x3c923e-0x1ae;const _0x35bb0a=a191_0x35bb();let _0x27a126=_0x35bb0a[_0x3c923e];return _0x27a126;}function a191_0x35bb(){const _0xc82414=['212skDIlc','slice','string','3110586evrBtZ','length','limit','459874avDSRe','run','created_at','queries','test','type','8oLNWkW','Schedule\x20name\x20is\x20required','updated_at','name','deleteSchedule','map','6066571qoMYVt','Type\x20is\x20required','Database\x20is\x20required','now','floor','getTime','3881631zfKlrg','listSchedules','NOT_FOUND','client','createSchedule','query','Invalid\x20time\x20format:\x20','pagination','time','13550trBMlw','1KobNcL','updateSchedule','\x5c$&','history','filter','update','28782270NGIeWI','INVALID_ARGUMENT','Schedule\x20not\x20found:\x20','listQueries','desc','cron','database','show','111680nymNhP','has_next_page','6957DxPVTE','num','replace'];a191_0x35bb=function(){return _0xc82414;};return a191_0x35bb();}import{TDApiClient}from'./client/td-api-client.js';import{SDKError,ErrorCode}from'./errors.js';function normalizeTimestamp(_0xd8d752){const _0x3a7827=a191_0x27a1;if(!_0xd8d752)return undefined;if(/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/[_0x3a7827(0x1ce)](_0xd8d752))return _0xd8d752;return _0xd8d752[_0x3a7827(0x1c3)]('\x20UTC','Z')[_0x3a7827(0x1c3)]('\x20','T');}export class ScheduleSDK{['client'];constructor(_0x5c2604){const _0x2c8a28=a191_0x27a1;this[_0x2c8a28(0x1df)]=new TDApiClient(_0x5c2604);}async['list'](_0x413362){const _0x1d5e12=a191_0x27a1,_0x3dcd41=await this[_0x1d5e12(0x1df)][_0x1d5e12(0x1dd)](),_0x32880a=_0x3dcd41[_0x1d5e12(0x1d5)](_0x38e273=>({..._0x38e273,'created_at':normalizeTimestamp(_0x38e273[_0x1d5e12(0x1cc)])??_0x38e273['created_at']}));if(_0x413362?.['limit']&&_0x413362[_0x1d5e12(0x1c9)]>0x0)return _0x32880a[_0x1d5e12(0x1c5)](0x0,_0x413362[_0x1d5e12(0x1c9)]);return _0x32880a;}async[a191_0x254f87(0x1ba)](_0x4b401b){const _0x237bb6=a191_0x254f87,_0x39e8cd=0x64,_0x5163fc=_0x4b401b?.[_0x237bb6(0x1c9)],_0x2c5161=[];let _0x1918f7=!![],_0x410110,_0x368da2,_0x539e9c;if(_0x4b401b?.['pattern']){const _0x493fef=_0x4b401b['pattern'][_0x237bb6(0x1c3)](/[.+^${}()|[\]\\]/g,_0x237bb6(0x1b3)),_0x2d5ac0=_0x493fef['replace'](/\*/g,'.*')[_0x237bb6(0x1c3)](/\?/g,'.');_0x539e9c=new RegExp('^'+_0x2d5ac0+'$','i');}while(_0x1918f7&&(!_0x5163fc||_0x2c5161[_0x237bb6(0x1c8)]<_0x5163fc)){const _0x3d8cae=await this[_0x237bb6(0x1df)][_0x237bb6(0x1ba)]({'anchor_column':_0x237bb6(0x1d2),'sort_direction':_0x237bb6(0x1bb),'page_size':_0x39e8cd,'anchor_id':_0x410110,'anchor_value':_0x368da2});let _0x3457c1=_0x3d8cae[_0x237bb6(0x1cd)];_0x4b401b?.['scheduled']&&(_0x3457c1=_0x3457c1[_0x237bb6(0x1b5)](_0x2ef2d4=>_0x2ef2d4[_0x237bb6(0x1bc)]!==null));_0x539e9c&&(_0x3457c1=_0x3457c1['filter'](_0x299334=>_0x299334[_0x237bb6(0x1d3)]&&_0x539e9c[_0x237bb6(0x1ce)](_0x299334[_0x237bb6(0x1d3)])));_0x2c5161['push'](..._0x3457c1),_0x1918f7=_0x3d8cae[_0x237bb6(0x1ae)][_0x237bb6(0x1c0)];if(_0x1918f7&&_0x3d8cae[_0x237bb6(0x1cd)]['length']>0x0){const _0x299209=_0x3d8cae['queries'][_0x3d8cae[_0x237bb6(0x1cd)][_0x237bb6(0x1c8)]-0x1];_0x410110=_0x299209['id'],_0x368da2=_0x299209[_0x237bb6(0x1d2)];}}const _0x159420=_0x5163fc?_0x2c5161['slice'](0x0,_0x5163fc):_0x2c5161;return{'queries':_0x159420,'pagination':{'has_next_page':_0x1918f7||(_0x5163fc?_0x2c5161[_0x237bb6(0x1c8)]>_0x5163fc:![])}};}async[a191_0x254f87(0x1be)](_0x343220){const _0x5a26b7=a191_0x254f87,_0x2f236b=await this[_0x5a26b7(0x1df)][_0x5a26b7(0x1dd)](),_0x389c90=_0x2f236b['find'](_0x349ddb=>_0x349ddb[_0x5a26b7(0x1d3)]===_0x343220);if(!_0x389c90)throw new SDKError(ErrorCode[_0x5a26b7(0x1de)],_0x5a26b7(0x1b9)+_0x343220);return{..._0x389c90,'created_at':normalizeTimestamp(_0x389c90[_0x5a26b7(0x1cc)])??_0x389c90[_0x5a26b7(0x1cc)]};}async['create'](_0x57d570,_0x51e1bd){const _0x111394=a191_0x254f87;if(!_0x57d570)throw new SDKError(ErrorCode[_0x111394(0x1b8)],_0x111394(0x1d1));if(!_0x51e1bd[_0x111394(0x1bd)])throw new SDKError(ErrorCode[_0x111394(0x1b8)],_0x111394(0x1d8));if(!_0x51e1bd[_0x111394(0x1e1)])throw new SDKError(ErrorCode[_0x111394(0x1b8)],'Query\x20is\x20required');if(!_0x51e1bd[_0x111394(0x1cf)])throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x111394(0x1d7));return await this['client'][_0x111394(0x1e0)](_0x57d570,_0x51e1bd);}async[a191_0x254f87(0x1b6)](_0x36c12b,_0x174faa){const _0x55d3c5=a191_0x254f87;if(!_0x36c12b)throw new SDKError(ErrorCode[_0x55d3c5(0x1b8)],_0x55d3c5(0x1d1));return await this['client'][_0x55d3c5(0x1b2)](_0x36c12b,_0x174faa);}async['delete'](_0x3323a){const _0x35a84a=a191_0x254f87;if(!_0x3323a)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x35a84a(0x1d1));return await this[_0x35a84a(0x1df)][_0x35a84a(0x1d4)](_0x3323a);}async[a191_0x254f87(0x1cb)](_0x118aaa,_0x53ae08){const _0x4b8321=a191_0x254f87;if(!_0x118aaa)throw new SDKError(ErrorCode[_0x4b8321(0x1b8)],_0x4b8321(0x1d1));let _0x4bb7de;if(_0x53ae08?.[_0x4b8321(0x1af)]){const _0x27d368=typeof _0x53ae08[_0x4b8321(0x1af)]===_0x4b8321(0x1c6)?new Date(_0x53ae08[_0x4b8321(0x1af)]):_0x53ae08[_0x4b8321(0x1af)];if(isNaN(_0x27d368[_0x4b8321(0x1db)]()))throw new SDKError(ErrorCode[_0x4b8321(0x1b8)],_0x4b8321(0x1e2)+_0x53ae08[_0x4b8321(0x1af)]);_0x4bb7de=Math[_0x4b8321(0x1da)](_0x27d368['getTime']()/0x3e8);}else _0x4bb7de=Math[_0x4b8321(0x1da)](Date[_0x4b8321(0x1d9)]()/0x3e8);if(_0x53ae08?.[_0x4b8321(0x1c2)]!==undefined){if(_0x53ae08['num']<0x1||_0x53ae08[_0x4b8321(0x1c2)]>0xa)throw new SDKError(ErrorCode[_0x4b8321(0x1b8)],'num\x20must\x20be\x20between\x201\x20and\x2010');}return await this['client']['runSchedule'](_0x118aaa,_0x4bb7de,_0x53ae08?.['num']);}async['history'](_0x193fe1,_0x1f8cb9){const _0x16979b=a191_0x254f87;if(!_0x193fe1)throw new SDKError(ErrorCode[_0x16979b(0x1b8)],_0x16979b(0x1d1));const _0x37633f=await this[_0x16979b(0x1df)]['getScheduleHistory'](_0x193fe1,_0x1f8cb9);return{..._0x37633f,'history':_0x37633f[_0x16979b(0x1b4)][_0x16979b(0x1d5)](_0x35438e=>({..._0x35438e,'created_at':normalizeTimestamp(_0x35438e[_0x16979b(0x1cc)]),'start_at':normalizeTimestamp(_0x35438e['start_at']),'end_at':normalizeTimestamp(_0x35438e['end_at'])}))};}}
@@ -1 +1 @@
1
- (function(_0x74b527,_0x24da4a){const _0x1de41f=a192_0x3abf,_0x57486b=_0x74b527();while(!![]){try{const _0xfb5649=-parseInt(_0x1de41f(0x186))/0x1*(-parseInt(_0x1de41f(0x184))/0x2)+-parseInt(_0x1de41f(0x17b))/0x3+parseInt(_0x1de41f(0x16f))/0x4+parseInt(_0x1de41f(0x185))/0x5+-parseInt(_0x1de41f(0x178))/0x6*(parseInt(_0x1de41f(0x182))/0x7)+parseInt(_0x1de41f(0x179))/0x8*(parseInt(_0x1de41f(0x176))/0x9)+parseInt(_0x1de41f(0x181))/0xa*(-parseInt(_0x1de41f(0x180))/0xb);if(_0xfb5649===_0x24da4a)break;else _0x57486b['push'](_0x57486b['shift']());}catch(_0x5e98d5){_0x57486b['push'](_0x57486b['shift']());}}}(a192_0x4c76,0xa6055));import{SDKError,ErrorCode}from'../errors.js';import{extractRootFolderId}from'./push-workflow.js';function a192_0x4c76(){const _0x130a84=['map','61458RUoTdb','16zbMmvP','rootFolderId','313143ozelxd','segment','listParents','getParentSegmentEntity','getParent','26767213eYwUmA','10xPkEgc','889ydeCKD','Pass\x20the\x20numeric\x20id\x20instead.','172hXGwBd','5019300WuqhqX','13522baYMMj','name','INVALID_ARGUMENT','SEGMENT_NOT_FOUND','\x20audience\x20\x27','length','kind','composable','4169776YOenXO','complete','test','Parent\x20segment\x20not\x20found:\x20','\x27\x20(id\x20','attributes','filter','5892525dWlQZF'];a192_0x4c76=function(){return _0x130a84;};return a192_0x4c76();}function toResolved({entity:_0x286dc0,kind:_0x3183a3}){const _0x337578=a192_0x3abf;return{'id':_0x286dc0['id'],'name':_0x286dc0[_0x337578(0x174)][_0x337578(0x187)],'kind':_0x3183a3,'rootFolderId':extractRootFolderId(_0x286dc0)};}async function loadEntities(_0x15d4d5){const _0x288dc5=a192_0x3abf,_0x87061a=await _0x15d4d5[_0x288dc5(0x17c)][_0x288dc5(0x17d)]();return{'entities':_0x87061a[_0x288dc5(0x177)](_0x58b4ff=>({'entity':_0x58b4ff,'kind':_0x288dc5(0x170)}))};}function a192_0x3abf(_0x12a718,_0x4941e4){_0x12a718=_0x12a718-0x16f;const _0x4c7625=a192_0x4c76();let _0x3abfa6=_0x4c7625[_0x12a718];return _0x3abfa6;}export async function listAllAudienceEntities(_0x41d3ba){return await loadEntities(_0x41d3ba);}export async function resolveAudienceRootFolderId(_0x4b5492,_0x52a3ec){const _0x5d6d3f=a192_0x3abf;if(_0x4b5492[_0x5d6d3f(0x17a)])return _0x4b5492[_0x5d6d3f(0x17a)];const _0x349aa0=_0x4b5492[_0x5d6d3f(0x18c)]===_0x5d6d3f(0x18d)?await _0x52a3ec['cas'][_0x5d6d3f(0x17e)](_0x4b5492['id']):await _0x52a3ec['segment'][_0x5d6d3f(0x17f)](_0x4b5492['id']);return extractRootFolderId(_0x349aa0);}function describeCandidates(_0x583d64){const _0x590c57=a192_0x3abf;return _0x583d64['map'](_0xce1622=>_0xce1622[_0x590c57(0x18c)]+_0x590c57(0x18a)+_0xce1622[_0x590c57(0x187)]+_0x590c57(0x173)+_0xce1622['id']+')')['join'](',\x20');}export async function resolveAudienceContext(_0x18a9d4,_0x59629d){const _0xc4868=a192_0x3abf;if(!_0x18a9d4)throw new SDKError(ErrorCode[_0xc4868(0x188)],'Audience\x20name\x20or\x20id\x20is\x20required');const {entities:_0x5d9ba9}=await loadEntities(_0x59629d),_0x37b928=_0x5d9ba9[_0xc4868(0x177)](toResolved);let _0x2213ea=[];/^\d+$/[_0xc4868(0x171)](_0x18a9d4)&&(_0x2213ea=_0x37b928[_0xc4868(0x175)](_0xf26ac8=>_0xf26ac8['id']===_0x18a9d4));_0x2213ea[_0xc4868(0x18b)]===0x0&&(_0x2213ea=_0x37b928['filter'](_0x45363e=>_0x45363e[_0xc4868(0x187)]===_0x18a9d4));if(_0x2213ea[_0xc4868(0x18b)]===0x0)throw new SDKError(ErrorCode[_0xc4868(0x189)],_0xc4868(0x172)+_0x18a9d4);if(_0x2213ea[_0xc4868(0x18b)]>0x1)throw new SDKError(ErrorCode[_0xc4868(0x188)],'\x27'+_0x18a9d4+'\x27\x20is\x20ambiguous\x20—\x20it\x20matches:\x20'+describeCandidates(_0x2213ea)+'.\x20'+_0xc4868(0x183));const _0x33474c=_0x2213ea[0x0];return{..._0x33474c,'rootFolderId':await resolveAudienceRootFolderId(_0x33474c,_0x59629d)};}
1
+ (function(_0x969808,_0x35e7b2){const _0x8672ed=a192_0x4b6e,_0x52bbb4=_0x969808();while(!![]){try{const _0x585469=parseInt(_0x8672ed(0x10b))/0x1*(-parseInt(_0x8672ed(0x101))/0x2)+parseInt(_0x8672ed(0xf9))/0x3+parseInt(_0x8672ed(0xf4))/0x4*(-parseInt(_0x8672ed(0xf1))/0x5)+parseInt(_0x8672ed(0xfc))/0x6+-parseInt(_0x8672ed(0x109))/0x7+-parseInt(_0x8672ed(0x103))/0x8+parseInt(_0x8672ed(0xf5))/0x9;if(_0x585469===_0x35e7b2)break;else _0x52bbb4['push'](_0x52bbb4['shift']());}catch(_0x11e214){_0x52bbb4['push'](_0x52bbb4['shift']());}}}(a192_0x9818,0xd72ce));import{SDKError,ErrorCode}from'../errors.js';function a192_0x9818(){const _0x5f1b1a=['65470EOgaFf','join','10883792eatwxW','Pass\x20the\x20numeric\x20id\x20instead.','test','INVALID_ARGUMENT','listParents','SEGMENT_NOT_FOUND','4194638FbceUR','name','29PAACyV','getParent','71135BsyGwP','filter','cas','76PfqHUm','22240188ihhAXF','segment','\x27\x20(id\x20','length','2757876ZvDOro','rootFolderId','\x27\x20is\x20ambiguous\x20—\x20it\x20matches:\x20','4021620tbksnK','map','Parent\x20segment\x20not\x20found:\x20','kind','attributes'];a192_0x9818=function(){return _0x5f1b1a;};return a192_0x9818();}import{extractRootFolderId}from'./push-workflow.js';function toResolved({entity:_0x3a8df7,kind:_0x47d3a1}){const _0x29ae77=a192_0x4b6e;return{'id':_0x3a8df7['id'],'name':_0x3a8df7[_0x29ae77(0x100)][_0x29ae77(0x10a)],'kind':_0x47d3a1,'rootFolderId':extractRootFolderId(_0x3a8df7)};}async function loadEntities(_0x7e19ed){const _0x1a6583=a192_0x4b6e,_0xadbba7=await _0x7e19ed['segment'][_0x1a6583(0x107)]();return{'entities':_0xadbba7[_0x1a6583(0xfd)](_0x2c6393=>({'entity':_0x2c6393,'kind':'complete'}))};}export async function listAllAudienceEntities(_0x18b3e9){return await loadEntities(_0x18b3e9);}export async function resolveAudienceRootFolderId(_0x2fa1e4,_0xf5d2ed){const _0x179f71=a192_0x4b6e;if(_0x2fa1e4[_0x179f71(0xfa)])return _0x2fa1e4[_0x179f71(0xfa)];const _0x1258b8=_0x2fa1e4['kind']==='composable'?await _0xf5d2ed[_0x179f71(0xf3)]['getParentSegmentEntity'](_0x2fa1e4['id']):await _0xf5d2ed[_0x179f71(0xf6)][_0x179f71(0x10c)](_0x2fa1e4['id']);return extractRootFolderId(_0x1258b8);}function describeCandidates(_0x147759){const _0x1d4810=a192_0x4b6e;return _0x147759['map'](_0x5277d9=>_0x5277d9[_0x1d4810(0xff)]+'\x20audience\x20\x27'+_0x5277d9['name']+_0x1d4810(0xf7)+_0x5277d9['id']+')')[_0x1d4810(0x102)](',\x20');}function a192_0x4b6e(_0x4059a7,_0x2ef64c){_0x4059a7=_0x4059a7-0xf1;const _0x981876=a192_0x9818();let _0x4b6e3f=_0x981876[_0x4059a7];return _0x4b6e3f;}export async function resolveAudienceContext(_0x5a97a4,_0xa394f6){const _0xb72f08=a192_0x4b6e;if(!_0x5a97a4)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],'Audience\x20name\x20or\x20id\x20is\x20required');const {entities:_0x26c2fe}=await loadEntities(_0xa394f6),_0x15f534=_0x26c2fe['map'](toResolved);let _0x326127=[];/^\d+$/[_0xb72f08(0x105)](_0x5a97a4)&&(_0x326127=_0x15f534[_0xb72f08(0xf2)](_0x1df9fc=>_0x1df9fc['id']===_0x5a97a4));_0x326127[_0xb72f08(0xf8)]===0x0&&(_0x326127=_0x15f534[_0xb72f08(0xf2)](_0x1ece7c=>_0x1ece7c['name']===_0x5a97a4));if(_0x326127[_0xb72f08(0xf8)]===0x0)throw new SDKError(ErrorCode[_0xb72f08(0x108)],_0xb72f08(0xfe)+_0x5a97a4);if(_0x326127[_0xb72f08(0xf8)]>0x1)throw new SDKError(ErrorCode[_0xb72f08(0x106)],'\x27'+_0x5a97a4+_0xb72f08(0xfb)+describeCandidates(_0x326127)+'.\x20'+_0xb72f08(0x104));const _0x4cf55b=_0x326127[0x0];return{..._0x4cf55b,'rootFolderId':await resolveAudienceRootFolderId(_0x4cf55b,_0xa394f6)};}
@@ -1 +1 @@
1
- const a193_0x1454d0=a193_0x2c65;(function(_0x31db93,_0x2704ad){const _0x2cf5d9=a193_0x2c65,_0x4de090=_0x31db93();while(!![]){try{const _0x241f2c=parseInt(_0x2cf5d9(0x201))/0x1+parseInt(_0x2cf5d9(0x1d1))/0x2*(-parseInt(_0x2cf5d9(0x25c))/0x3)+-parseInt(_0x2cf5d9(0x1e2))/0x4+parseInt(_0x2cf5d9(0x263))/0x5+parseInt(_0x2cf5d9(0x24d))/0x6*(-parseInt(_0x2cf5d9(0x1e6))/0x7)+parseInt(_0x2cf5d9(0x22c))/0x8*(-parseInt(_0x2cf5d9(0x256))/0x9)+parseInt(_0x2cf5d9(0x1b1))/0xa;if(_0x241f2c===_0x2704ad)break;else _0x4de090['push'](_0x4de090['shift']());}catch(_0x151bbf){_0x4de090['push'](_0x4de090['shift']());}}}(a193_0x3f4c,0x5a544));import*as a193_0x2e02c5 from'yaml';import{safeParseYaml}from'./yaml-validator.js';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp,getLegacySettingsField}from'../connection-validator.js';import{SegmentDefSchema}from'./types/segment-schema.js';const SCHEDULE_TYPE_TO_REPEAT_UNIT={'daily':a193_0x1454d0(0x1fa),'hourly':a193_0x1454d0(0x241),'weekly':'week','monthly':'month','minutes_interval':a193_0x1454d0(0x1f8)},REPEAT_UNIT_TO_SCHEDULE_TYPE={'day':a193_0x1454d0(0x1f3),'hour':a193_0x1454d0(0x208),'week':'weekly','month':a193_0x1454d0(0x25b),'minute':a193_0x1454d0(0x1c1)};function filterRuleAsRuleDef(_0x53e748){return _0x53e748;}function ruleDefAsFilterRule(_0x596f5f){return _0x596f5f;}export function segmentResponseToDefSync(_0x2b35bc,_0xed5ae6){const _0x36a78c=a193_0x1454d0,_0x3e8955=_0x2b35bc[_0x36a78c(0x1f4)]&&_0x36a78c(0x1de)in _0x2b35bc[_0x36a78c(0x1f4)]&&_0x2b35bc[_0x36a78c(0x1f4)][_0x36a78c(0x1de)];return{'type':'segment','name':_0x2b35bc[_0x36a78c(0x204)],..._0x2b35bc[_0x36a78c(0x202)]&&{'description':_0x2b35bc[_0x36a78c(0x202)]},..._0xed5ae6&&{'folder':_0xed5ae6},..._0x3e8955&&{'rule':apiRuleToYaml(_0x2b35bc[_0x36a78c(0x1f4)])},..._0x2b35bc[_0x36a78c(0x228)]!==undefined&&{'kind':_0x2b35bc['kind']===0x0?_0x36a78c(0x266):_0x2b35bc[_0x36a78c(0x228)]===0x1?'realtime':_0x36a78c(0x1dd)},..._0x2b35bc['isVisible']!==undefined&&{'visible':_0x2b35bc[_0x36a78c(0x20f)]}};}export async function segmentResponseToDef(_0x57344a,_0x538cfe,_0x34f202){const _0x3b109b=a193_0x1454d0,_0x57bd7f=segmentResponseToDefSync(_0x57344a,_0x34f202);if(!_0x538cfe||!_0x538cfe[_0x3b109b(0x22f)])return _0x57bd7f;return _0x57bd7f[_0x3b109b(0x1f4)]&&(_0x57bd7f['rule']=await resolveRuleSegmentRefs(_0x57bd7f[_0x3b109b(0x1f4)],_0x538cfe[_0x3b109b(0x22f)])),_0x57bd7f;}export function apiRuleToYaml(_0x60b603){const _0x15cebd=a193_0x1454d0;if(_0x60b603['type']===_0x15cebd(0x24e))return{'type':_0x15cebd(0x24e),'conditions':(_0x60b603['conditions']||[])[_0x15cebd(0x1d0)](apiConditionToYaml),..._0x60b603[_0x15cebd(0x202)]!==undefined&&{'description':_0x60b603['description']},..._0x60b603[_0x15cebd(0x1d2)]!==undefined&&{'expr':_0x60b603[_0x15cebd(0x1d2)]}};const _0x44d4cd=(_0x60b603[_0x15cebd(0x244)]||[])[_0x15cebd(0x1fd)](_0xed7453=>{const _0x49cccf=_0x15cebd,_0x38f826=apiConditionToYaml(_0xed7453);if(isCompositeType(_0x38f826)&&_0x38f826[_0x49cccf(0x202)]!==undefined){const _0x5a5be2=_0x38f826;if(_0x5a5be2[_0x49cccf(0x244)][_0x49cccf(0x20d)]===0x1)return _0x5a5be2[_0x49cccf(0x244)];return[{'type':_0x5a5be2[_0x49cccf(0x1de)],'conditions':_0x5a5be2[_0x49cccf(0x244)]}];}return[_0x38f826];});if(_0x44d4cd['length']===0x1&&!_0x60b603['description']&&isCompositeType(_0x44d4cd[0x0])){const _0x398c7d=_0x44d4cd[0x0];if(_0x398c7d[_0x15cebd(0x1de)]===_0x60b603['type']&&_0x398c7d[_0x15cebd(0x244)]&&_0x398c7d[_0x15cebd(0x202)]===undefined)return{'type':_0x60b603[_0x15cebd(0x1de)],'conditions':_0x398c7d[_0x15cebd(0x244)]};}return{'type':_0x60b603[_0x15cebd(0x1de)],'conditions':_0x44d4cd};}export async function resolveRuleSegmentRefs(_0x299161,_0x13102c){const _0x52e03c=a193_0x1454d0;return transformRuleSegmentRefs(_0x299161,_0x13102c,_0x3bfd4a=>/^\d+$/[_0x52e03c(0x264)](_0x3bfd4a));}async function transformConditionSegmentRefs(_0x4bf4c1,_0xcbe83a,_0x5c07aa,_0x1e264d){const _0x5cec69=a193_0x1454d0;if(_0x5cec69(0x247)in _0x4bf4c1&&(_0x4bf4c1[_0x5cec69(0x1de)]===_0x5cec69(0x1db)||_0x4bf4c1['type']===_0x5cec69(0x22b))){const _0x2f641c=_0x4bf4c1;if(_0x5c07aa(_0x2f641c[_0x5cec69(0x247)]))return{..._0x2f641c,'segment':await _0xcbe83a(_0x2f641c[_0x5cec69(0x247)])};return _0x4bf4c1;}if('conditions'in _0x4bf4c1&&_0x4bf4c1[_0x5cec69(0x244)]){const _0x55048a=_0x4bf4c1,_0x41fc2f=await Promise['all'](_0x55048a['conditions'][_0x5cec69(0x1d0)](_0x28eb5d=>transformConditionSegmentRefs(_0x28eb5d,_0xcbe83a,_0x5c07aa,_0x1e264d)));return{..._0x55048a,'conditions':_0x41fc2f};}if(_0x5cec69(0x1f0)in _0x4bf4c1&&_0x4bf4c1[_0x5cec69(0x1f0)]){const _0x5a0c6c=_0x4bf4c1,_0x10c593=await _0x1e264d(filterRuleAsRuleDef(_0x5a0c6c[_0x5cec69(0x1f0)]),_0xcbe83a);return{..._0x5a0c6c,'filter':ruleDefAsFilterRule(_0x10c593)};}return _0x4bf4c1;}async function transformRuleSegmentRefs(_0x126665,_0x49cc57,_0x2d20b5){const _0x573aa5=a193_0x1454d0,_0x310993=(_0x35d296,_0x33fb86)=>transformRuleSegmentRefs(_0x35d296,_0x33fb86,_0x2d20b5),_0x21b849=await Promise['all'](_0x126665[_0x573aa5(0x244)][_0x573aa5(0x1d0)](_0x13d4f=>transformConditionSegmentRefs(_0x13d4f,_0x49cc57,_0x2d20b5,_0x310993)));return{..._0x126665,'conditions':_0x21b849};}function a193_0x3f4c(){const _0x4714a4=['cron','hourly','localRuleToName','string','Between','folder','length','connectorConfig','isVisible','toLowerCase','usedNames','from','rule:','Column','connectionId','behaviors','stringify','activationTemplateId','warn','behaviorTableName','attribute','CONNECTION_NOT_FOUND','rightValues','operator','reverse','warnings','Unknown\x20email\x20recipient:\x20','lock_enabled','attribute_name','Reference','getSchema','Segment\x20description','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','kind','notifyOn','arrayMatching','exclude','752PyYKxm','limit','code','resolveSegmentName','repeat_unit','get','allColumns','TimeWithinNext','__UNRESOLVED__','endOn','all_columns','TimeRange','source','connectionNameToIdMap','repeatFrequency','CONNECTOR_INVALID_CONFIG','unit','timestamp','emailToIdMap','Behavior','timezone','hour','match','runAfterJourneyRefresh','conditions','joinStrategy','has','segment','TimeWithinPast','Last','Please\x20specify\x20a\x20valid\x20attribute\x20name.','number','And','18mtMXjq','Composite','none','joinRow','min','notify_on','end_on','\x22:\x20','CONNECTOR_SCHEMA_NOT_FOUND','7578DLqGQK','run_after_journey_refresh','__SEGMENT_REF__','attributes','formatting','monthly','18807MsyhuJ','email_recipients','maxValue','ruleHashToName','\x22\x20is\x20a\x20legacy-style\x20connector,\x20but\x20the\x20activation\x20context\x20','column','max','2110165pktQZc','test','isArray','batch','nestedWorkflowProjectName','notification','not','10122310dkSpnF','visibility','orderBy','join_row','repeat_sub_frequency','forEach','entries','columns','].attribute\x20cannot\x20be\x20empty.\x0a','timeWindow','leftValue','connector_config\x20for\x20activation\x20\x22','emailRecipients','startAt','scheduleType','every','minutes_interval','INVALID_ARGUMENT','repeat_frequency','INTERNAL','realtime','connector_config','aggregation','rightValue','connectionNameToTypeMap','schedule','CountDistinct','duration','lockEnabled','add','Count','map','202JaCEDO','expr','Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections','Cannot\x20build\x20connector_config\x20for\x20activation\x20\x22','minValue','behavior','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','keys','set','Value','include','object','funnel_stage','type','conditions[','syndicationBehaviors','values','1532664IbTflp','activations:','activations','activation_template_id','658763wVPxOs','start_at','behavior_table','getMetadata','nested_workflow_name','any','findIndex','repeatUnit','nested_workflow_project_name','sort','filter','repeatSubFrequency','connection','daily','rule','order_by','visible','join_strategy','minute','nestedWorkflowName','day','First','errors','flatMap','\x22:\x0a','push','groupingColumns','313534XenaRM','description','value','name','parse','orderColumn'];a193_0x3f4c=function(){return _0x4714a4;};return a193_0x3f4c();}export async function resolveRuleSegmentIds(_0x4be79a,_0x9265ea){const _0x51a311=a193_0x1454d0;return transformRuleSegmentRefs(_0x4be79a,_0x9265ea,_0x22e704=>!/^\d+$/[_0x51a311(0x264)](_0x22e704));}function isCompositeType(_0x4739b7){const _0x44b453=a193_0x1454d0;return _0x4739b7[_0x44b453(0x1de)]==='And'||_0x4739b7[_0x44b453(0x1de)]==='Or'||_0x4739b7['type']===_0x44b453(0x24e);}function isBehaviorApiCondition(_0x20515c){const _0x5587ab=a193_0x1454d0;if(!_0x20515c[_0x5587ab(0x1bb)]?.[_0x5587ab(0x238)]?.[_0x5587ab(0x204)])return![];return!![];}function apiConditionToYaml(_0xeac229){const _0x31be7c=a193_0x1454d0;if(_0xeac229[_0x31be7c(0x1de)]==='And'||_0xeac229[_0x31be7c(0x1de)]==='Or'){if(_0xeac229[_0x31be7c(0x244)]){const _0x3318ba=_0xeac229[_0x31be7c(0x244)]['map'](apiConditionToYaml),_0x31df79=_0xeac229[_0x31be7c(0x202)]!==undefined;if(_0x3318ba[_0x31be7c(0x20d)]===0x1&&!_0x31df79)return _0x3318ba[0x0];return{'type':_0xeac229[_0x31be7c(0x1de)],'conditions':_0x3318ba,..._0xeac229[_0x31be7c(0x202)]!==undefined&&{'description':_0xeac229['description']}};}}if(_0xeac229[_0x31be7c(0x1de)]===_0x31be7c(0x24e)&&_0xeac229[_0x31be7c(0x244)])return{'type':_0x31be7c(0x24e),'conditions':_0xeac229['conditions'][_0x31be7c(0x1d0)](apiConditionToYaml),..._0xeac229[_0x31be7c(0x202)]!==undefined&&{'description':_0xeac229['description']},..._0xeac229[_0x31be7c(0x1d2)]!==undefined&&{'expr':_0xeac229[_0x31be7c(0x1d2)]}};if(_0xeac229[_0x31be7c(0x1de)]==='Value'&&_0xeac229[_0x31be7c(0x1bb)]&&_0xeac229[_0x31be7c(0x21e)]){const _0x493444=_0xeac229['leftValue'][_0x31be7c(0x1c7)]?buildAggregationDefFromApi(_0xeac229[_0x31be7c(0x1bb)][_0x31be7c(0x1c7)]):undefined;if(isBehaviorApiCondition(_0xeac229)){const _0x188e7a=_0xeac229['leftValue'][_0x31be7c(0x238)][_0x31be7c(0x204)],{timeWindow:_0x165f15,remainingFilter:_0x5c5a30}=extractTimeWindow(_0xeac229[_0x31be7c(0x1bb)]['filter']);return{'type':_0x31be7c(0x23f),'attribute':'','operator':apiOperatorToYaml(_0xeac229['operator']),..._0xeac229[_0x31be7c(0x22a)]&&_0xeac229['arrayMatching']!==_0x31be7c(0x1eb)?{'arrayMatching':_0xeac229['arrayMatching']}:{},..._0xeac229[_0x31be7c(0x22b)]?{'exclude':_0xeac229[_0x31be7c(0x22b)]}:{},..._0x493444?{'aggregation':_0x493444}:{},'source':_0x188e7a,..._0x165f15?{'timeWindow':_0x165f15}:{},..._0x5c5a30?{'filter':apiRuleToYaml(_0x5c5a30)}:{},..._0xeac229[_0x31be7c(0x22d)]!==undefined&&_0xeac229['limit']!==null?{'limit':_0xeac229[_0x31be7c(0x22d)]}:{}};}return{'type':_0x31be7c(0x1da),'attribute':_0xeac229[_0x31be7c(0x1bb)][_0x31be7c(0x204)]||'','operator':apiOperatorToYaml(_0xeac229[_0x31be7c(0x21e)]),..._0xeac229[_0x31be7c(0x22a)]&&_0xeac229[_0x31be7c(0x22a)]!==_0x31be7c(0x1eb)?{'arrayMatching':_0xeac229[_0x31be7c(0x22a)]}:{},..._0xeac229[_0x31be7c(0x22b)]?{'exclude':_0xeac229['exclude']}:{},..._0x493444?{'aggregation':_0x493444}:{},..._0xeac229[_0x31be7c(0x1bb)][_0x31be7c(0x1f0)]?{'filter':apiRuleToYaml(_0xeac229['leftValue']['filter'])}:{},..._0xeac229[_0x31be7c(0x22d)]!==undefined&&_0xeac229[_0x31be7c(0x22d)]!==null?{'limit':_0xeac229[_0x31be7c(0x22d)]}:{}};}if(_0xeac229[_0x31be7c(0x1de)]===_0x31be7c(0x214)&&_0xeac229[_0x31be7c(0x261)]&&_0xeac229[_0x31be7c(0x21e)])return{'type':_0x31be7c(0x214),'column':_0xeac229[_0x31be7c(0x261)],'operator':apiOperatorToYaml(_0xeac229['operator'])};if(_0xeac229[_0x31be7c(0x1de)]===_0x31be7c(0x224)&&_0xeac229['id'])return{'type':_0xeac229[_0x31be7c(0x22b)]?_0x31be7c(0x22b):_0x31be7c(0x1db),'segment':_0xeac229['id']};return{'type':_0x31be7c(0x24c),'conditions':[]};}function isTemporalOperator(_0x2a68a9){const _0x432a7a=a193_0x1454d0;return _0x2a68a9===_0x432a7a(0x248)||_0x2a68a9===_0x432a7a(0x233);}function isBetweenOperator(_0x501faa){const _0x49b7c8=a193_0x1454d0;return _0x501faa===_0x49b7c8(0x20b);}function getEffectiveValue(_0xf5a02c){const _0x43ed78=a193_0x1454d0,_0x2d877d=_0xf5a02c[_0x43ed78(0x1e1)];return _0xf5a02c[_0x43ed78(0x203)]??_0x2d877d;}function parseNumericValue(_0x1bc8e2){const _0x4319c6=a193_0x1454d0;if(typeof _0x1bc8e2===_0x4319c6(0x1dc)&&_0x1bc8e2!==null)return _0x1bc8e2;if(_0x1bc8e2==='')return _0x1bc8e2;const _0x592ec7=Number(_0x1bc8e2);return Number['isFinite'](_0x592ec7)?_0x592ec7:_0x1bc8e2;}function apiOperatorToYaml(_0x4df43c){const _0x183749=a193_0x1454d0;if(isBetweenOperator(_0x4df43c[_0x183749(0x1de)]))return{'type':mapApiOperatorType(_0x4df43c[_0x183749(0x1de)]),..._0x4df43c[_0x183749(0x1b0)]!==undefined&&{'not':_0x4df43c[_0x183749(0x1b0)]},..._0x4df43c[_0x183749(0x1d5)]!==undefined&&{'min':parseNumericValue(_0x4df43c[_0x183749(0x1d5)])},..._0x4df43c[_0x183749(0x25e)]!==undefined&&{'max':parseNumericValue(_0x4df43c['maxValue'])}};if(_0x4df43c[_0x183749(0x1de)]===_0x183749(0x237))return{'type':_0x183749(0x237),..._0x4df43c['not']!==undefined&&{'not':_0x4df43c['not']},..._0x4df43c[_0x183749(0x1cc)]!==undefined&&{'duration':_0x4df43c['duration']},..._0x4df43c['from']!==undefined&&{'from':_0x4df43c[_0x183749(0x212)]},..._0x4df43c[_0x183749(0x21f)]!==undefined&&{'reverse':_0x4df43c[_0x183749(0x21f)]}};let _0x81cb86;if(_0x4df43c[_0x183749(0x21d)]&&_0x4df43c['rightValues'][_0x183749(0x20d)]>0x0)_0x81cb86=_0x4df43c['rightValues'];else{if(_0x4df43c['rightValue']!==undefined)_0x81cb86=_0x4df43c[_0x183749(0x1c8)];else isTemporalOperator(_0x4df43c['type'])&&_0x4df43c[_0x183749(0x203)]!==undefined&&(_0x81cb86=_0x4df43c[_0x183749(0x203)]);}return{'type':mapApiOperatorType(_0x4df43c[_0x183749(0x1de)]),..._0x4df43c[_0x183749(0x1b0)]!==undefined&&{'not':_0x4df43c[_0x183749(0x1b0)]},..._0x81cb86!==undefined&&{'value':_0x81cb86},..._0x4df43c[_0x183749(0x23c)]!==undefined&&{'unit':_0x4df43c[_0x183749(0x23c)]}};}function mapApiOperatorType(_0x277179){return _0x277179;}export function segmentDefToCreateRequest(_0x22843e,_0x3e5bc4){const _0x5820da=a193_0x1454d0,_0x436108={'name':_0x22843e['name']};return _0x22843e[_0x5820da(0x202)]&&(_0x436108[_0x5820da(0x202)]=_0x22843e[_0x5820da(0x202)]),_0x22843e['rule']&&(_0x436108['rule']=yamlRuleToApi(_0x22843e[_0x5820da(0x1f4)])),_0x22843e[_0x5820da(0x228)]&&(_0x436108['kind']=_0x22843e[_0x5820da(0x228)]==='batch'?0x0:_0x22843e['kind']===_0x5820da(0x1c5)?0x1:0x2),_0x22843e[_0x5820da(0x1f6)]!==undefined&&(_0x436108[_0x5820da(0x20f)]=_0x22843e[_0x5820da(0x1f6)]),_0x3e5bc4&&(_0x436108['segmentFolderId']=_0x3e5bc4),_0x436108;}export function segmentDefToUpdateRequest(_0x3f4ccb){const _0x40884a=a193_0x1454d0,_0x266fac={'name':_0x3f4ccb[_0x40884a(0x204)]};return _0x3f4ccb[_0x40884a(0x202)]!==undefined&&(_0x266fac['description']=_0x3f4ccb[_0x40884a(0x202)]),_0x3f4ccb[_0x40884a(0x1f4)]&&(_0x266fac['rule']=yamlRuleToApi(_0x3f4ccb[_0x40884a(0x1f4)])),_0x3f4ccb[_0x40884a(0x228)]&&(_0x266fac['kind']=_0x3f4ccb[_0x40884a(0x228)]==='batch'?0x0:_0x3f4ccb[_0x40884a(0x228)]===_0x40884a(0x1c5)?0x1:0x2),_0x266fac;}export function yamlRuleToApi(_0x452e75){const _0x4c2f1a=a193_0x1454d0;if(_0x452e75[_0x4c2f1a(0x1de)]===_0x4c2f1a(0x24e))return{'type':_0x4c2f1a(0x24e),'conditions':_0x452e75['conditions']['map'](yamlConditionToApi),..._0x452e75['description']!==undefined&&{'description':_0x452e75['description']},..._0x452e75['expr']!==undefined&&{'expr':_0x452e75[_0x4c2f1a(0x1d2)]}};const _0x377ee5=_0x452e75[_0x4c2f1a(0x244)][_0x4c2f1a(0x1d0)](yamlConditionToApi),_0xb570a2=_0x377ee5[_0x4c2f1a(0x1c0)](_0x1f45d3=>isCompositeType(_0x1f45d3)&&_0x1f45d3[_0x4c2f1a(0x202)]!==undefined);if(!_0xb570a2&&_0x377ee5['length']>0x0){const _0x19c61f=[];for(const _0x38cf95 of _0x377ee5){isCompositeType(_0x38cf95)&&_0x38cf95[_0x4c2f1a(0x202)]===undefined&&_0x38cf95[_0x4c2f1a(0x244)]&&_0x38cf95['conditions'][_0x4c2f1a(0x1c0)](_0x5322a6=>!isCompositeType(_0x5322a6))?_0x19c61f[_0x4c2f1a(0x1ff)]({'type':_0x38cf95[_0x4c2f1a(0x1de)],'description':'','conditions':_0x38cf95['conditions']}):_0x19c61f[_0x4c2f1a(0x1ff)]({'type':_0x4c2f1a(0x24c),'description':_0x452e75[_0x4c2f1a(0x202)]||'','conditions':[_0x38cf95]});}return{'type':_0x452e75[_0x4c2f1a(0x1de)],'conditions':_0x19c61f};}return{'type':_0x452e75[_0x4c2f1a(0x1de)],'conditions':_0x377ee5,..._0x452e75[_0x4c2f1a(0x202)]&&{'description':_0x452e75[_0x4c2f1a(0x202)]}};}function yamlFilterRuleToApi(_0x3743c0){const _0x5a3cf4=a193_0x1454d0,_0x5842c9=_0x3743c0[_0x5a3cf4(0x244)][_0x5a3cf4(0x1d0)](yamlConditionToApi);return{'type':_0x3743c0[_0x5a3cf4(0x1de)],'conditions':_0x5842c9};}function yamlConditionToApi(_0x4063d7){const _0x4ae609=a193_0x1454d0;if(_0x4ae609(0x247)in _0x4063d7&&(_0x4063d7[_0x4ae609(0x1de)]==='include'||_0x4063d7[_0x4ae609(0x1de)]===_0x4ae609(0x22b))){const _0x15428=_0x4063d7;return{'type':_0x4ae609(0x224),'id':_0x15428[_0x4ae609(0x247)],'exclude':_0x15428[_0x4ae609(0x1de)]===_0x4ae609(0x22b)};}if(_0x4063d7[_0x4ae609(0x1de)]===_0x4ae609(0x24c)||_0x4063d7[_0x4ae609(0x1de)]==='Or'||_0x4063d7['type']===_0x4ae609(0x24e)){const _0x2ae045=_0x4063d7;return{'type':_0x2ae045[_0x4ae609(0x1de)],'conditions':_0x2ae045['conditions'][_0x4ae609(0x1d0)](yamlConditionToApi),..._0x2ae045['description']&&{'description':_0x2ae045[_0x4ae609(0x202)]},..._0x2ae045['expr']!==undefined&&{'expr':_0x2ae045[_0x4ae609(0x1d2)]}};}if(_0x4ae609(0x261)in _0x4063d7&&_0x4063d7['type']===_0x4ae609(0x214)){const _0x3fe54c=_0x4063d7;return{'type':_0x4ae609(0x214),'column':_0x3fe54c[_0x4ae609(0x261)],'operator':yamlOperatorToApi(_0x3fe54c[_0x4ae609(0x21e)])};}const _0x3c728d=_0x4063d7,_0x53ac1c={'type':_0x4ae609(0x1da),'leftValue':buildLeftValue(_0x3c728d),'operator':yamlOperatorToApi(_0x3c728d[_0x4ae609(0x21e)]),'exclude':_0x3c728d[_0x4ae609(0x22b)]??![],'arrayMatching':_0x3c728d[_0x4ae609(0x22a)]??_0x4ae609(0x1eb)};return _0x3c728d['limit']!==undefined&&(_0x53ac1c['limit']=_0x3c728d[_0x4ae609(0x22d)]),_0x53ac1c;}function buildAggregationDefFromApi(_0x4e5b74){const _0x52e802=a193_0x1454d0,_0x337769=_0x4e5b74[_0x52e802(0x1de)];if(_0x337769===_0x52e802(0x1cb))return{'type':_0x337769,'columns':_0x4e5b74['columns']??[]};if(_0x337769===_0x52e802(0x1fb)||_0x337769===_0x52e802(0x249))return{'type':_0x337769,'column':_0x4e5b74[_0x52e802(0x261)]??'','orderColumn':_0x4e5b74[_0x52e802(0x206)]??'',..._0x4e5b74['groupingColumns']&&{'groupingColumns':_0x4e5b74[_0x52e802(0x200)]}};if(_0x337769==='Count')return{'type':_0x337769,..._0x4e5b74['groupingColumns']&&{'groupingColumns':_0x4e5b74[_0x52e802(0x200)]}};return{'type':_0x337769,'column':_0x4e5b74['column']??'',..._0x4e5b74[_0x52e802(0x200)]&&{'groupingColumns':_0x4e5b74[_0x52e802(0x200)]}};}function buildLeftValue(_0x29284f){const _0x137c4d=a193_0x1454d0,_0x4adfad={};_0x29284f[_0x137c4d(0x21b)]&&_0x29284f[_0x137c4d(0x1de)]!==_0x137c4d(0x23f)&&(_0x4adfad[_0x137c4d(0x204)]=_0x29284f[_0x137c4d(0x21b)]);if(_0x29284f[_0x137c4d(0x1c7)]){const _0x3f00f5=_0x29284f[_0x137c4d(0x1c7)];if(_0x3f00f5[_0x137c4d(0x1de)]===_0x137c4d(0x1cb))_0x4adfad[_0x137c4d(0x1c7)]={'type':'CountDistinct','columns':_0x3f00f5[_0x137c4d(0x1b8)]};else{if(_0x3f00f5[_0x137c4d(0x1de)]==='First'||_0x3f00f5[_0x137c4d(0x1de)]===_0x137c4d(0x249))_0x4adfad[_0x137c4d(0x1c7)]={'type':_0x3f00f5[_0x137c4d(0x1de)],'column':_0x3f00f5[_0x137c4d(0x261)],'orderColumn':_0x3f00f5['orderColumn'],..._0x3f00f5[_0x137c4d(0x200)]&&{'groupingColumns':_0x3f00f5['groupingColumns']}};else _0x3f00f5['type']===_0x137c4d(0x1cf)?_0x4adfad['aggregation']={'type':_0x137c4d(0x1cf),..._0x3f00f5[_0x137c4d(0x200)]&&{'groupingColumns':_0x3f00f5[_0x137c4d(0x200)]}}:_0x4adfad[_0x137c4d(0x1c7)]={'type':_0x3f00f5[_0x137c4d(0x1de)],'column':_0x3f00f5[_0x137c4d(0x261)],..._0x3f00f5[_0x137c4d(0x200)]&&{'groupingColumns':_0x3f00f5[_0x137c4d(0x200)]}};}}_0x29284f['source']&&(_0x4adfad[_0x137c4d(0x238)]={'name':_0x29284f[_0x137c4d(0x238)]});const _0x3a80bf=_0x29284f[_0x137c4d(0x1de)]===_0x137c4d(0x23f)?_0x29284f[_0x137c4d(0x1ba)]:undefined,_0x475386=_0x3a80bf?[buildTimeWindowCondition(_0x3a80bf)]:[],_0x25932d=[..._0x29284f[_0x137c4d(0x1f0)]?.[_0x137c4d(0x244)]??[],..._0x475386];return _0x25932d[_0x137c4d(0x20d)]>0x0&&(_0x4adfad['filter']=yamlFilterRuleToApi(filterRuleAsRuleDef({'type':_0x137c4d(0x24c),'conditions':_0x25932d}))),_0x4adfad;}function buildTimeWindowCondition(_0x38fc28){const _0x8dca90=a193_0x1454d0;return{'type':_0x8dca90(0x214),'column':_0x8dca90(0x23d),'operator':{'type':'TimeWithinPast','value':_0x38fc28['duration'],'unit':_0x38fc28[_0x8dca90(0x23c)]}};}function extractTimeWindow(_0x1bca11){const _0x37b515=a193_0x1454d0;if(!_0x1bca11?.[_0x37b515(0x244)]?.[_0x37b515(0x20d)])return{'remainingFilter':_0x1bca11};const _0xbd145=_0x1bca11['conditions'][_0x37b515(0x1ec)](_0x121965=>_0x121965[_0x37b515(0x1de)]===_0x37b515(0x214)&&_0x121965[_0x37b515(0x261)]===_0x37b515(0x23d)&&_0x121965[_0x37b515(0x21e)]?.[_0x37b515(0x1de)]===_0x37b515(0x248)&&!_0x121965[_0x37b515(0x21e)][_0x37b515(0x1b0)]&&typeof _0x121965['operator'][_0x37b515(0x203)]===_0x37b515(0x24b)&&typeof _0x121965[_0x37b515(0x21e)][_0x37b515(0x23c)]===_0x37b515(0x20a));if(_0xbd145===-0x1)return{'remainingFilter':_0x1bca11};const _0x5f4f23=_0x1bca11['conditions'][_0xbd145],_0x33c277=_0x1bca11[_0x37b515(0x244)]['filter']((_0x151bfb,_0x1e5b17)=>_0x1e5b17!==_0xbd145);return{'timeWindow':{'duration':_0x5f4f23[_0x37b515(0x21e)]['value'],'unit':_0x5f4f23['operator'][_0x37b515(0x23c)]},'remainingFilter':_0x33c277[_0x37b515(0x20d)]>0x0?{..._0x1bca11,'conditions':_0x33c277}:undefined};}function yamlOperatorToApi(_0x1b3661){const _0x2fad84=a193_0x1454d0,_0x91f735={'type':mapYamlOperatorType(_0x1b3661['type']),'not':_0x1b3661[_0x2fad84(0x1b0)]??![]};if(isBetweenOperator(_0x1b3661[_0x2fad84(0x1de)]))return _0x1b3661[_0x2fad84(0x251)]!==undefined&&(_0x91f735[_0x2fad84(0x1d5)]=typeof _0x1b3661[_0x2fad84(0x251)]===_0x2fad84(0x1dc)?_0x1b3661['min']:String(_0x1b3661['min'])),_0x1b3661[_0x2fad84(0x262)]!==undefined&&(_0x91f735['maxValue']=typeof _0x1b3661[_0x2fad84(0x262)]===_0x2fad84(0x1dc)?_0x1b3661[_0x2fad84(0x262)]:String(_0x1b3661[_0x2fad84(0x262)])),_0x91f735;if(_0x1b3661[_0x2fad84(0x1de)]===_0x2fad84(0x237))return _0x1b3661[_0x2fad84(0x1cc)]&&(_0x91f735[_0x2fad84(0x1cc)]=_0x1b3661[_0x2fad84(0x1cc)]),_0x1b3661['from']&&(_0x91f735[_0x2fad84(0x212)]=_0x1b3661[_0x2fad84(0x212)]),_0x1b3661[_0x2fad84(0x21f)]!==undefined&&(_0x91f735['reverse']=_0x1b3661['reverse']),_0x91f735;const _0x48d096=getEffectiveValue(_0x1b3661);if(_0x48d096!==undefined){if(Array[_0x2fad84(0x265)](_0x48d096))_0x91f735[_0x2fad84(0x21d)]=_0x48d096;else isTemporalOperator(_0x1b3661[_0x2fad84(0x1de)])?_0x91f735[_0x2fad84(0x203)]=_0x48d096:_0x91f735['rightValue']=_0x48d096;}return _0x1b3661[_0x2fad84(0x23c)]&&(_0x91f735[_0x2fad84(0x23c)]=_0x1b3661[_0x2fad84(0x23c)]),_0x91f735;}function mapYamlOperatorType(_0x8f27ad){return _0x8f27ad;}export function toYamlString(_0x650547){const _0x34c7ff=a193_0x1454d0,_0x376af0=JSON[_0x34c7ff(0x205)](JSON[_0x34c7ff(0x217)](_0x650547)),_0x33b9bd=a193_0x2e02c5[_0x34c7ff(0x217)](_0x376af0,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x211ebe=['rule:'];let _0x3553aa=_0x33b9bd;for(const _0x2d3aac of _0x211ebe){_0x3553aa=_0x3553aa['replace'](new RegExp('^('+_0x2d3aac+')','m'),(_0x2709b2,_0xfa4d04,_0x3b2ffe)=>{if(_0x3b2ffe===0x0||_0x3553aa[_0x3b2ffe-0x1]==='\x0a'&&_0x3553aa[_0x3b2ffe-0x2]==='\x0a')return _0xfa4d04;return'\x0a'+_0xfa4d04;});}return _0x3553aa;}export function parseYamlString(_0x476478){return parseSegmentYamlFile(_0x476478);}export function isSegmentYaml(_0x156c2a){const _0x2c4a8b=a193_0x1454d0;if(typeof _0x156c2a!==_0x2c4a8b(0x1dc)||_0x156c2a===null)return![];const _0x1aa2dc=_0x156c2a;return _0x1aa2dc[_0x2c4a8b(0x1de)]===_0x2c4a8b(0x247)||_0x1aa2dc[_0x2c4a8b(0x1de)]===undefined;}export function generateTemplate(_0x47383b='New\x20Segment'){const _0x32ca7f=a193_0x1454d0,_0x4abc5c={'type':'segment','name':_0x47383b,'description':_0x32ca7f(0x226),'rule':{'type':_0x32ca7f(0x24c),'conditions':[{'type':_0x32ca7f(0x1da),'attribute':_0x32ca7f(0x223),'operator':{'type':'Equal','value':_0x32ca7f(0x203)}}]}};return toYamlString(_0x4abc5c);}export function segmentToYamlString(_0x34237b){const _0x5706e4=a193_0x1454d0,_0x443cf3=JSON[_0x5706e4(0x205)](JSON[_0x5706e4(0x217)](_0x34237b)),_0x3d01b1=a193_0x2e02c5[_0x5706e4(0x217)](_0x443cf3,{'indent':0x2,'lineWidth':0x0,'nullStr':'null'}),_0x5d3c23=[_0x5706e4(0x213),_0x5706e4(0x1e3)];let _0x20dfdc=_0x3d01b1;for(const _0x329418 of _0x5d3c23){_0x20dfdc=_0x20dfdc['replace'](new RegExp('^('+_0x329418+')','m'),(_0x66e6ae,_0x302205,_0x7341a)=>{if(_0x7341a===0x0||_0x20dfdc[_0x7341a-0x1]==='\x0a'&&_0x20dfdc[_0x7341a-0x2]==='\x0a')return _0x302205;return'\x0a'+_0x302205;});}return _0x20dfdc;}export function parseSegmentYamlFile(_0x6398c0){return safeParseYaml(_0x6398c0,SegmentDefSchema);}export function normalizeChildSegmentYaml(_0x1bcadf){const _0x4626fb=a193_0x1454d0;return{'type':_0x4626fb(0x247),'name':_0x1bcadf[_0x4626fb(0x204)],..._0x1bcadf[_0x4626fb(0x202)]!==undefined&&{'description':_0x1bcadf['description']},..._0x1bcadf['folder']!==undefined&&{'folder':_0x1bcadf[_0x4626fb(0x20c)]},..._0x1bcadf['rule']&&{'rule':normalizeRule(_0x1bcadf['rule'])},..._0x1bcadf[_0x4626fb(0x228)]!==undefined&&{'kind':_0x1bcadf[_0x4626fb(0x228)]},..._0x1bcadf['visible']!==undefined&&{'visible':_0x1bcadf['visible']},..._0x1bcadf['activations']&&{'activations':_0x1bcadf[_0x4626fb(0x1e4)][_0x4626fb(0x1d0)](normalizeActivation)}};}export function normalizeRule(_0x26b0b9){const _0x44514f=a193_0x1454d0;return{'type':_0x26b0b9[_0x44514f(0x1de)],'conditions':_0x26b0b9[_0x44514f(0x244)][_0x44514f(0x1d0)](normalizeCondition),..._0x26b0b9[_0x44514f(0x202)]!==undefined&&{'description':_0x26b0b9[_0x44514f(0x202)]},..._0x26b0b9[_0x44514f(0x1d2)]!==undefined&&{'expr':_0x26b0b9['expr']}};}function normalizeCondition(_0x31a4a1){const _0x4d4556=a193_0x1454d0;if(_0x4d4556(0x247)in _0x31a4a1&&(_0x31a4a1[_0x4d4556(0x1de)]===_0x4d4556(0x1db)||_0x31a4a1[_0x4d4556(0x1de)]==='exclude')){const _0x5b6572=_0x31a4a1;return{'type':_0x5b6572[_0x4d4556(0x1de)],'segment':_0x5b6572[_0x4d4556(0x247)]};}if(_0x31a4a1[_0x4d4556(0x1de)]===_0x4d4556(0x24c)||_0x31a4a1['type']==='Or'||_0x31a4a1[_0x4d4556(0x1de)]==='Composite'){const _0x58249b=_0x31a4a1;return{'type':_0x58249b[_0x4d4556(0x1de)],'conditions':_0x58249b['conditions'][_0x4d4556(0x1d0)](normalizeCondition),..._0x58249b['description']!==undefined&&{'description':_0x58249b[_0x4d4556(0x202)]},..._0x58249b[_0x4d4556(0x1d2)]!==undefined&&{'expr':_0x58249b[_0x4d4556(0x1d2)]}};}if('column'in _0x31a4a1&&_0x31a4a1['type']===_0x4d4556(0x214)){const _0x5d94ac=_0x31a4a1;return{'type':_0x4d4556(0x214),'column':_0x5d94ac[_0x4d4556(0x261)],'operator':normalizeOperator(_0x5d94ac[_0x4d4556(0x21e)])};}if(_0x31a4a1['type']===_0x4d4556(0x23f)){const _0x297080=_0x31a4a1;return{'type':_0x4d4556(0x23f),'attribute':_0x297080[_0x4d4556(0x21b)],'operator':normalizeOperator(_0x297080[_0x4d4556(0x21e)]),..._0x297080[_0x4d4556(0x22a)]!==undefined&&{'arrayMatching':_0x297080[_0x4d4556(0x22a)]},..._0x297080[_0x4d4556(0x22b)]!==undefined&&{'exclude':_0x297080['exclude']},..._0x297080['aggregation']!==undefined&&{'aggregation':_0x297080[_0x4d4556(0x1c7)]},..._0x297080['source']!==undefined&&{'source':_0x297080[_0x4d4556(0x238)]},..._0x297080[_0x4d4556(0x1f0)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x297080[_0x4d4556(0x1f0)])))},..._0x297080[_0x4d4556(0x1ba)]!==undefined&&{'timeWindow':_0x297080['timeWindow']},..._0x297080[_0x4d4556(0x22d)]!==undefined&&{'limit':_0x297080['limit']}};}const _0x331961=_0x31a4a1;return{'type':'Value','attribute':_0x331961[_0x4d4556(0x21b)],'operator':normalizeOperator(_0x331961[_0x4d4556(0x21e)]),..._0x331961[_0x4d4556(0x22a)]!==undefined&&{'arrayMatching':_0x331961[_0x4d4556(0x22a)]},..._0x331961[_0x4d4556(0x22b)]!==undefined&&{'exclude':_0x331961[_0x4d4556(0x22b)]},..._0x331961[_0x4d4556(0x1c7)]!==undefined&&{'aggregation':_0x331961[_0x4d4556(0x1c7)]},..._0x331961[_0x4d4556(0x238)]!==undefined&&{'source':_0x331961['source']},..._0x331961['filter']!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x331961[_0x4d4556(0x1f0)])))},..._0x331961[_0x4d4556(0x22d)]!==undefined&&{'limit':_0x331961[_0x4d4556(0x22d)]}};}function normalizeOperator(_0x5a0fed){const _0x1b2945=a193_0x1454d0;if(isBetweenOperator(_0x5a0fed[_0x1b2945(0x1de)]))return{'type':_0x5a0fed[_0x1b2945(0x1de)],..._0x5a0fed[_0x1b2945(0x1b0)]!==undefined&&{'not':_0x5a0fed[_0x1b2945(0x1b0)]},..._0x5a0fed['min']!==undefined&&{'min':_0x5a0fed[_0x1b2945(0x251)]},..._0x5a0fed['max']!==undefined&&{'max':_0x5a0fed[_0x1b2945(0x262)]}};const _0x1e9929=getEffectiveValue(_0x5a0fed);return{'type':_0x5a0fed['type'],..._0x5a0fed[_0x1b2945(0x1b0)]!==undefined&&{'not':_0x5a0fed[_0x1b2945(0x1b0)]},..._0x1e9929!==undefined&&{'value':_0x1e9929},..._0x5a0fed[_0x1b2945(0x23c)]!==undefined&&{'unit':_0x5a0fed[_0x1b2945(0x23c)]},..._0x5a0fed[_0x1b2945(0x1cc)]!==undefined&&{'duration':_0x5a0fed[_0x1b2945(0x1cc)]},..._0x5a0fed['from']!==undefined&&{'from':_0x5a0fed[_0x1b2945(0x212)]},..._0x5a0fed['reverse']!==undefined&&{'reverse':_0x5a0fed[_0x1b2945(0x21f)]}};}function normalizeActivation(_0x2a9ff6){const _0x286ea0=a193_0x1454d0;return{'name':_0x2a9ff6[_0x286ea0(0x204)],'connection':_0x2a9ff6[_0x286ea0(0x1f2)],..._0x2a9ff6[_0x286ea0(0x202)]!==undefined&&{'description':_0x2a9ff6[_0x286ea0(0x202)]},..._0x2a9ff6['all_columns']!==undefined&&{'all_columns':_0x2a9ff6[_0x286ea0(0x236)]},..._0x2a9ff6[_0x286ea0(0x1b8)]!==undefined&&{'columns':_0x2a9ff6[_0x286ea0(0x1b8)]},..._0x2a9ff6[_0x286ea0(0x1d6)]!==undefined&&{'behavior':_0x2a9ff6[_0x286ea0(0x1d6)]},..._0x2a9ff6['behaviors']!==undefined&&{'behaviors':_0x2a9ff6['behaviors']},..._0x2a9ff6[_0x286ea0(0x1ca)]!==undefined&&{'schedule':_0x2a9ff6[_0x286ea0(0x1ca)]},..._0x2a9ff6['notification']!==undefined&&{'notification':_0x2a9ff6['notification']},..._0x2a9ff6['connector_config']!==undefined&&{'connector_config':_0x2a9ff6[_0x286ea0(0x1c6)]},..._0x2a9ff6[_0x286ea0(0x1e5)]!==undefined&&{'activation_template_id':_0x2a9ff6[_0x286ea0(0x1e5)]},..._0x2a9ff6[_0x286ea0(0x1ee)]!==undefined&&{'nested_workflow_project_name':_0x2a9ff6[_0x286ea0(0x1ee)]},..._0x2a9ff6[_0x286ea0(0x1ea)]!==undefined&&{'nested_workflow_name':_0x2a9ff6[_0x286ea0(0x1ea)]},..._0x2a9ff6[_0x286ea0(0x222)]!==undefined&&{'lock_enabled':_0x2a9ff6[_0x286ea0(0x222)]}};}function getColumnName(_0x2aaadc){const _0x401331=a193_0x1454d0;return _0x2aaadc[_0x401331(0x261)]||_0x2aaadc[_0x401331(0x204)];}function behaviorApiToDef(_0x14b882){const _0xbc4506=a193_0x1454d0,_0x3a218f={};return _0x14b882['columns']&&_0x14b882[_0xbc4506(0x1b8)][_0xbc4506(0x20d)]>0x0&&(_0x3a218f[_0xbc4506(0x1b8)]=_0x14b882['columns'][_0xbc4506(0x1f0)](_0x14b0e1=>_0x14b0e1&&getColumnName(_0x14b0e1))['map'](_0x10388a=>({'name':getColumnName(_0x10388a),..._0x10388a[_0xbc4506(0x1de)]&&{'type':_0x10388a['type']},..._0x10388a[_0xbc4506(0x1b2)]&&{'visibility':_0x10388a[_0xbc4506(0x1b2)]}}))),_0x14b882['behaviorTableName']&&(_0x3a218f['behavior_table']=_0x14b882[_0xbc4506(0x21a)]),_0x14b882[_0xbc4506(0x250)]!==undefined&&(_0x3a218f[_0xbc4506(0x1b4)]=_0x14b882['joinRow']),_0x14b882[_0xbc4506(0x245)]&&(_0x3a218f[_0xbc4506(0x1f7)]=_0x14b882[_0xbc4506(0x245)]),_0x14b882[_0xbc4506(0x25a)]&&(_0x3a218f[_0xbc4506(0x25a)]=_0x14b882['formatting']),_0x14b882['orderBy']&&_0x14b882['orderBy'][_0xbc4506(0x20d)]>0x0&&(_0x3a218f[_0xbc4506(0x1f5)]=_0x14b882[_0xbc4506(0x1b3)]),_0x3a218f;}function behaviorsApiToDef(_0x31833b){const _0x463ef9=a193_0x1454d0;return _0x31833b[_0x463ef9(0x1d0)](behaviorApiToDef)['filter'](_0xa1bdc5=>Object[_0x463ef9(0x1d8)](_0xa1bdc5)[_0x463ef9(0x20d)]>0x0);}export function activationResponseToDef(_0x59bd6f,_0x2905b9,_0x1f47d3){const _0x271804=a193_0x1454d0,_0x17964f=_0x59bd6f[_0x271804(0x215)]||'',_0x21e082=_0x1f47d3?.[_0x271804(0x231)](_0x17964f)??_0x17964f,_0x2f96bf={'name':_0x59bd6f[_0x271804(0x204)],'connection':_0x21e082};_0x59bd6f['description']&&(_0x2f96bf[_0x271804(0x202)]=_0x59bd6f[_0x271804(0x202)]);let _0x218afa=[];_0x59bd6f[_0x271804(0x1b8)]&&_0x59bd6f[_0x271804(0x1b8)][_0x271804(0x20d)]>0x0&&(_0x218afa=_0x59bd6f[_0x271804(0x1b8)][_0x271804(0x1f0)](_0x413788=>_0x413788&&getColumnName(_0x413788))['map'](_0x36cfa2=>{const _0x598725=_0x271804,_0x1fd310=getColumnName(_0x36cfa2);if(_0x36cfa2[_0x598725(0x1de)]||_0x36cfa2[_0x598725(0x1b2)])return{'name':_0x1fd310,..._0x36cfa2[_0x598725(0x1de)]&&{'type':_0x36cfa2[_0x598725(0x1de)]},..._0x36cfa2[_0x598725(0x1b2)]&&{'visibility':_0x36cfa2[_0x598725(0x1b2)]}};return _0x1fd310;}));_0x218afa[_0x271804(0x20d)]>0x0&&(_0x2f96bf[_0x271804(0x1b8)]=_0x218afa);_0x59bd6f[_0x271804(0x232)]!==undefined&&(_0x59bd6f[_0x271804(0x232)]===![]&&_0x218afa[_0x271804(0x20d)]===0x0?_0x2f96bf[_0x271804(0x236)]=!![]:_0x2f96bf[_0x271804(0x236)]=_0x59bd6f[_0x271804(0x232)]);const _0x66a4f4={};let _0x16dc4b=![];_0x59bd6f[_0x271804(0x1bf)]&&(_0x66a4f4[_0x271804(0x1de)]=_0x59bd6f[_0x271804(0x1bf)],_0x16dc4b=!![]);_0x59bd6f['repeatUnit']&&(_0x66a4f4[_0x271804(0x230)]=_0x59bd6f[_0x271804(0x1ed)],_0x16dc4b=!![]);_0x59bd6f[_0x271804(0x23a)]!==undefined&&_0x59bd6f['repeatFrequency']!==null&&(_0x66a4f4[_0x271804(0x1c3)]=_0x59bd6f['repeatFrequency'],_0x16dc4b=!![]);_0x59bd6f[_0x271804(0x1f1)]&&_0x59bd6f[_0x271804(0x1f1)][_0x271804(0x20d)]>0x0&&(_0x66a4f4[_0x271804(0x1b5)]=_0x59bd6f[_0x271804(0x1f1)],_0x16dc4b=!![]);_0x59bd6f['startAt']!==undefined&&(_0x66a4f4[_0x271804(0x1e7)]=_0x59bd6f['startAt'],_0x16dc4b=!![]);_0x59bd6f['endOn']!==undefined&&(_0x66a4f4[_0x271804(0x253)]=_0x59bd6f[_0x271804(0x235)],_0x16dc4b=!![]);_0x59bd6f[_0x271804(0x240)]&&(_0x66a4f4[_0x271804(0x240)]=_0x59bd6f[_0x271804(0x240)],_0x16dc4b=!![]);_0x16dc4b&&(_0x2f96bf[_0x271804(0x1ca)]=_0x66a4f4);(_0x59bd6f[_0x271804(0x229)]&&_0x59bd6f[_0x271804(0x229)]['length']>0x0||_0x59bd6f[_0x271804(0x1bd)]&&_0x59bd6f[_0x271804(0x1bd)]['length']>0x0)&&(_0x2f96bf[_0x271804(0x1af)]={},_0x59bd6f[_0x271804(0x229)]&&_0x59bd6f[_0x271804(0x229)][_0x271804(0x20d)]>0x0&&(_0x2f96bf['notification'][_0x271804(0x252)]=_0x59bd6f[_0x271804(0x229)]),_0x59bd6f['emailRecipients']&&_0x59bd6f['emailRecipients'][_0x271804(0x20d)]>0x0&&(_0x2f96bf[_0x271804(0x1af)]['email_recipients']=_0x59bd6f[_0x271804(0x1bd)][_0x271804(0x1d0)](_0xc848d2=>{const _0x7efdc5=_0x271804,_0x4313e8=_0x2905b9?.[_0x7efdc5(0x231)](_0xc848d2);return _0x4313e8??String(_0xc848d2);})));_0x59bd6f[_0x271804(0x20e)]&&Object[_0x271804(0x1d8)](_0x59bd6f[_0x271804(0x20e)])[_0x271804(0x20d)]>0x0&&(_0x2f96bf[_0x271804(0x1c6)]=normalizeConnectorConfigForYaml(_0x59bd6f[_0x271804(0x20e)]));_0x59bd6f[_0x271804(0x218)]&&(_0x2f96bf[_0x271804(0x1e5)]=_0x59bd6f[_0x271804(0x218)]);if(_0x59bd6f[_0x271804(0x1e0)]&&_0x59bd6f['syndicationBehaviors'][_0x271804(0x20d)]>0x0){const _0xefb123=behaviorsApiToDef(_0x59bd6f['syndicationBehaviors']);_0xefb123[_0x271804(0x20d)]>0x0&&(_0x2f96bf[_0x271804(0x216)]=_0xefb123);}return _0x59bd6f[_0x271804(0x1ae)]&&(_0x2f96bf[_0x271804(0x1ee)]=_0x59bd6f[_0x271804(0x1ae)]),_0x59bd6f[_0x271804(0x1f9)]&&(_0x2f96bf[_0x271804(0x1ea)]=_0x59bd6f[_0x271804(0x1f9)]),_0x59bd6f['lockEnabled']!==undefined&&(_0x2f96bf[_0x271804(0x222)]=_0x59bd6f['lockEnabled']),_0x2f96bf;}export function journeyActivationStepToYaml(_0x5e28fd,_0x44d2c7,_0x3e6a37){const _0x53f2b4=a193_0x1454d0,_0xfdf097=_0x5e28fd[_0x53f2b4(0x259)]['activationParams'],_0x5a69ce=_0xfdf097[_0x53f2b4(0x215)]||'',_0x118724=_0x3e6a37?.[_0x53f2b4(0x231)](_0x5a69ce)??_0x5a69ce,_0x5b6d5a={'name':_0xfdf097[_0x53f2b4(0x204)]||'','connection':_0x118724};_0x5e28fd[_0x53f2b4(0x259)][_0x53f2b4(0x243)]&&(_0x5b6d5a[_0x53f2b4(0x257)]=!![]);_0xfdf097[_0x53f2b4(0x202)]&&(_0x5b6d5a['description']=_0xfdf097[_0x53f2b4(0x202)]);let _0x363f13=[];_0xfdf097[_0x53f2b4(0x1b8)]&&_0xfdf097[_0x53f2b4(0x1b8)][_0x53f2b4(0x20d)]>0x0&&(_0x363f13=_0xfdf097['columns'][_0x53f2b4(0x1f0)](_0x286690=>_0x286690&&getColumnName(_0x286690))['map'](_0x38c9af=>{const _0x318b7e=_0x53f2b4,_0x10b00c=getColumnName(_0x38c9af);if(_0x38c9af[_0x318b7e(0x1de)]||_0x38c9af['visibility'])return{'name':_0x10b00c,..._0x38c9af[_0x318b7e(0x1de)]&&{'type':_0x38c9af[_0x318b7e(0x1de)]},..._0x38c9af['visibility']&&{'visibility':_0x38c9af[_0x318b7e(0x1b2)]}};return _0x10b00c;}));_0x363f13[_0x53f2b4(0x20d)]>0x0&&(_0x5b6d5a[_0x53f2b4(0x1b8)]=_0x363f13);_0xfdf097[_0x53f2b4(0x232)]!==undefined&&(_0xfdf097[_0x53f2b4(0x232)]===![]&&_0x363f13['length']===0x0?_0x5b6d5a[_0x53f2b4(0x236)]=!![]:_0x5b6d5a[_0x53f2b4(0x236)]=_0xfdf097[_0x53f2b4(0x232)]);const _0x15d176={};let _0xba13a9=![];_0xfdf097[_0x53f2b4(0x1bf)]&&(_0x15d176[_0x53f2b4(0x1de)]=_0xfdf097[_0x53f2b4(0x1bf)],_0xba13a9=!![]);_0xfdf097[_0x53f2b4(0x1ed)]&&(_0x15d176[_0x53f2b4(0x230)]=_0xfdf097[_0x53f2b4(0x1ed)],_0xba13a9=!![]);_0xfdf097[_0x53f2b4(0x23a)]!==undefined&&_0xfdf097[_0x53f2b4(0x23a)]!==null&&(_0x15d176[_0x53f2b4(0x1c3)]=_0xfdf097['repeatFrequency'],_0xba13a9=!![]);_0xfdf097[_0x53f2b4(0x1be)]!==undefined&&(_0x15d176[_0x53f2b4(0x1e7)]=_0xfdf097['startAt'],_0xba13a9=!![]);_0xfdf097[_0x53f2b4(0x235)]!==undefined&&(_0x15d176[_0x53f2b4(0x253)]=_0xfdf097[_0x53f2b4(0x235)],_0xba13a9=!![]);_0xfdf097['timezone']&&(_0x15d176['timezone']=_0xfdf097[_0x53f2b4(0x240)],_0xba13a9=!![]);_0xba13a9&&(_0x5b6d5a['schedule']=_0x15d176);(_0xfdf097[_0x53f2b4(0x229)]&&_0xfdf097[_0x53f2b4(0x229)][_0x53f2b4(0x20d)]>0x0||_0xfdf097[_0x53f2b4(0x1bd)]&&_0xfdf097[_0x53f2b4(0x1bd)][_0x53f2b4(0x20d)]>0x0)&&(_0x5b6d5a[_0x53f2b4(0x1af)]={},_0xfdf097[_0x53f2b4(0x229)]&&_0xfdf097['notifyOn'][_0x53f2b4(0x20d)]>0x0&&(_0x5b6d5a[_0x53f2b4(0x1af)][_0x53f2b4(0x252)]=_0xfdf097[_0x53f2b4(0x229)]),_0xfdf097['emailRecipients']&&_0xfdf097[_0x53f2b4(0x1bd)][_0x53f2b4(0x20d)]>0x0&&(_0x5b6d5a[_0x53f2b4(0x1af)][_0x53f2b4(0x25d)]=_0xfdf097[_0x53f2b4(0x1bd)][_0x53f2b4(0x1d0)](_0x556698=>{const _0x39caad=_0x53f2b4,_0x5d9955=_0x44d2c7?.[_0x39caad(0x231)](_0x556698);return _0x5d9955??String(_0x556698);})));_0xfdf097[_0x53f2b4(0x20e)]&&Object[_0x53f2b4(0x1d8)](_0xfdf097[_0x53f2b4(0x20e)])[_0x53f2b4(0x20d)]>0x0&&(_0x5b6d5a[_0x53f2b4(0x1c6)]=normalizeConnectorConfigForYaml(_0xfdf097[_0x53f2b4(0x20e)]));_0xfdf097[_0x53f2b4(0x218)]&&(_0x5b6d5a[_0x53f2b4(0x1e5)]=_0xfdf097[_0x53f2b4(0x218)]);if(_0xfdf097[_0x53f2b4(0x1e0)]&&_0xfdf097[_0x53f2b4(0x1e0)][_0x53f2b4(0x20d)]>0x0){const _0x37b80c=behaviorsApiToDef(_0xfdf097[_0x53f2b4(0x1e0)]);_0x37b80c[_0x53f2b4(0x20d)]>0x0&&(_0x5b6d5a['behaviors']=_0x37b80c);}return _0x5b6d5a;}export function segmentWithActivationsToYaml(_0x2f5f0a,_0x453d74,_0x58facc,_0xca496a,_0x1c1012){const _0x47a536=a193_0x1454d0,_0x486d0c=segmentResponseToDefSync(_0x2f5f0a,_0x58facc);return _0x453d74[_0x47a536(0x20d)]>0x0&&(_0x486d0c[_0x47a536(0x1e4)]=_0x453d74[_0x47a536(0x1d0)](_0x189d31=>activationResponseToDef(_0x189d31,_0xca496a,_0x1c1012))),_0x486d0c;}function normalizeColumn(_0x4d5629){const _0xe6d6b5=a193_0x1454d0;if(typeof _0x4d5629===_0xe6d6b5(0x20a))return{'column':_0x4d5629,'source':{'column':_0x4d5629}};return{'column':_0x4d5629[_0xe6d6b5(0x204)],'source':{'column':_0x4d5629[_0xe6d6b5(0x204)]},..._0x4d5629[_0xe6d6b5(0x1de)]&&{'type':_0x4d5629[_0xe6d6b5(0x1de)]},..._0x4d5629[_0xe6d6b5(0x1b2)]&&{'visibility':_0x4d5629[_0xe6d6b5(0x1b2)]}};}function behaviorDefToApi(_0x3d47bc){const _0x3a1b9d=a193_0x1454d0,_0x8a7ab7={};if(_0x3d47bc[_0x3a1b9d(0x1b8)]&&_0x3d47bc['columns'][_0x3a1b9d(0x20d)]>0x0){const _0x51452c=_0x3d47bc[_0x3a1b9d(0x1b8)][_0x3a1b9d(0x1f0)](_0x33e5fb=>typeof _0x33e5fb==='string'?_0x33e5fb:_0x33e5fb[_0x3a1b9d(0x204)])[_0x3a1b9d(0x1d0)](normalizeColumn);_0x51452c[_0x3a1b9d(0x20d)]>0x0&&(_0x8a7ab7['columns']=_0x51452c);}_0x3d47bc[_0x3a1b9d(0x1e8)]&&(_0x8a7ab7['behaviorTableName']=_0x3d47bc[_0x3a1b9d(0x1e8)]);_0x3d47bc['join_strategy']&&(_0x8a7ab7['joinStrategy']=_0x3d47bc[_0x3a1b9d(0x1f7)]);if(_0x3d47bc['join_row']!==undefined)_0x8a7ab7['joinRow']=_0x3d47bc[_0x3a1b9d(0x1b4)];else{if(_0x3d47bc[_0x3a1b9d(0x1f7)]===_0x3a1b9d(0x249)||_0x3d47bc[_0x3a1b9d(0x1f7)]===_0x3a1b9d(0x1fb))_0x8a7ab7[_0x3a1b9d(0x250)]=0x1;else _0x3d47bc[_0x3a1b9d(0x1f7)]==='All'&&(_0x8a7ab7[_0x3a1b9d(0x250)]=null);}return _0x3d47bc['formatting']&&(_0x8a7ab7[_0x3a1b9d(0x25a)]=_0x3d47bc['formatting']),_0x3d47bc[_0x3a1b9d(0x1f5)]&&(_0x8a7ab7[_0x3a1b9d(0x1b3)]=_0x3d47bc[_0x3a1b9d(0x1f5)]),_0x8a7ab7;}export async function activationDefToCreateRequest(_0x4478b9,_0x3563f6){const _0x5b8630=a193_0x1454d0,_0x230295=_0x3563f6?.[_0x5b8630(0x23e)],_0x5c8502=_0x3563f6?.[_0x5b8630(0x239)],_0x4319f8=_0x4478b9[_0x5b8630(0x1f2)];let _0x918f15;const _0x5c6050=parseInt(_0x4319f8,0xa);if(!isNaN(_0x5c6050)&&String(_0x5c6050)===_0x4319f8)_0x918f15=_0x5c6050;else{const _0x202bc0=_0x5c8502?.[_0x5b8630(0x231)](_0x4319f8);if(_0x202bc0===undefined)throw new SDKError(ErrorCode[_0x5b8630(0x21c)],'Unknown\x20connection:\x20'+_0x4319f8,undefined,{'helpText':_0x5b8630(0x1d3)});_0x918f15=_0x202bc0;}const _0x1666f8={'name':_0x4478b9[_0x5b8630(0x204)],'connectionId':_0x918f15};_0x4478b9[_0x5b8630(0x202)]&&(_0x1666f8[_0x5b8630(0x202)]=_0x4478b9[_0x5b8630(0x202)]);let _0x293bb4=[];_0x4478b9['columns']&&_0x4478b9[_0x5b8630(0x1b8)]['length']>0x0&&(_0x293bb4=_0x4478b9[_0x5b8630(0x1b8)]['filter'](_0x5a07bf=>_0x5a07bf!=null)[_0x5b8630(0x1d0)](normalizeColumn));_0x293bb4[_0x5b8630(0x20d)]>0x0&&(_0x1666f8[_0x5b8630(0x1b8)]=_0x293bb4);_0x4478b9['all_columns']!==undefined&&(_0x4478b9['all_columns']===![]&&_0x293bb4[_0x5b8630(0x20d)]===0x0?_0x1666f8['allColumns']=!![]:_0x1666f8[_0x5b8630(0x232)]=_0x4478b9[_0x5b8630(0x236)]);if(_0x4478b9[_0x5b8630(0x1ca)]){const _0x4a9b5b=_0x4478b9['schedule'],_0x3427aa=_0x4a9b5b[_0x5b8630(0x1de)]??REPEAT_UNIT_TO_SCHEDULE_TYPE[_0x4a9b5b[_0x5b8630(0x230)]];_0x3427aa&&(_0x1666f8[_0x5b8630(0x1bf)]=_0x3427aa);const _0x3054a8=_0x4a9b5b[_0x5b8630(0x230)]??SCHEDULE_TYPE_TO_REPEAT_UNIT[_0x4a9b5b['type']];_0x3054a8&&(_0x1666f8[_0x5b8630(0x1ed)]=_0x3054a8);_0x4a9b5b[_0x5b8630(0x1c3)]!==undefined&&(_0x1666f8[_0x5b8630(0x23a)]=_0x4a9b5b[_0x5b8630(0x1c3)]);_0x4a9b5b['repeat_sub_frequency']&&(_0x1666f8[_0x5b8630(0x1f1)]=_0x4a9b5b[_0x5b8630(0x1b5)]);_0x4a9b5b[_0x5b8630(0x1e7)]!==undefined&&(_0x1666f8['startAt']=_0x4a9b5b['start_at']);_0x4a9b5b[_0x5b8630(0x253)]!==undefined&&(_0x1666f8[_0x5b8630(0x235)]=_0x4a9b5b[_0x5b8630(0x253)]);_0x4a9b5b[_0x5b8630(0x240)]&&(_0x1666f8[_0x5b8630(0x240)]=_0x4a9b5b[_0x5b8630(0x240)]);if(_0x3427aa&&_0x3427aa!==_0x5b8630(0x24f)&&_0x3427aa!==_0x5b8630(0x207)&&_0x4a9b5b[_0x5b8630(0x1e7)]){const _0x3ec7ec=_0x4a9b5b[_0x5b8630(0x1e7)][_0x5b8630(0x242)](/T(\d{2}:\d{2})/);_0x3ec7ec&&(_0x1666f8['scheduleOption']=_0x3ec7ec[0x1]);}}_0x4478b9[_0x5b8630(0x1af)]&&(_0x4478b9[_0x5b8630(0x1af)][_0x5b8630(0x252)]&&(_0x1666f8[_0x5b8630(0x229)]=_0x4478b9[_0x5b8630(0x1af)][_0x5b8630(0x252)]),_0x4478b9[_0x5b8630(0x1af)][_0x5b8630(0x25d)]&&(_0x1666f8[_0x5b8630(0x1bd)]=_0x4478b9[_0x5b8630(0x1af)][_0x5b8630(0x25d)][_0x5b8630(0x1d0)](_0x4404e9=>{const _0x38c81b=_0x5b8630,_0x1f4ee7=Number(_0x4404e9);if(!isNaN(_0x1f4ee7)&&String(_0x1f4ee7)===_0x4404e9)return _0x1f4ee7;const _0x648a36=_0x230295?.['get'](_0x4404e9[_0x38c81b(0x210)]());if(_0x648a36===undefined)throw new SDKError(ErrorCode[_0x38c81b(0x1c2)],_0x38c81b(0x221)+_0x4404e9+_0x38c81b(0x1d7));return _0x648a36;})));if(_0x4478b9[_0x5b8630(0x1c6)]){const _0x13d0cd=_0x3563f6?.[_0x5b8630(0x1c9)]?.[_0x5b8630(0x231)](_0x4319f8);_0x1666f8['connectorConfig']=_0x4478b9[_0x5b8630(0x1c6)];if(_0x13d0cd&&_0x3563f6?.['getSchema']){let _0x3d75e4;try{_0x3d75e4=await _0x3563f6[_0x5b8630(0x225)](_0x13d0cd);const _0x254c17=validateConnectorConfig(_0x4478b9[_0x5b8630(0x1c6)],_0x3d75e4);if(!_0x254c17['valid'])throw new SDKError(ErrorCode[_0x5b8630(0x23b)],'Invalid\x20connector_config\x20for\x20activation\x20\x22'+_0x4478b9['name']+_0x5b8630(0x1fe)+formatValidationErrors(_0x254c17[_0x5b8630(0x1fc)]),undefined,{'helpText':'Connector:\x20'+_0x13d0cd+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0x3d75e4)});if(_0x254c17['warnings'][_0x5b8630(0x20d)]>0x0){const _0x4703e0=formatValidationWarnings(_0x254c17[_0x5b8630(0x220)]);console[_0x5b8630(0x219)](_0x5b8630(0x1bc)+_0x4478b9[_0x5b8630(0x204)]+_0x5b8630(0x1fe)+_0x4703e0);}}catch(_0x59aac8){if(!(_0x59aac8 instanceof SDKError)||_0x59aac8[_0x5b8630(0x22e)]!==ErrorCode[_0x5b8630(0x255)])throw _0x59aac8;}if(_0x3d75e4&&getLegacySettingsField(_0x3d75e4)){if(!_0x3563f6?.['getMetadata'])throw new SDKError(ErrorCode[_0x5b8630(0x1c4)],_0x5b8630(0x1d4)+_0x4478b9['name']+_0x5b8630(0x254)+('\x22'+_0x13d0cd+_0x5b8630(0x260))+'provides\x20no\x20getMetadata.\x20This\x20is\x20a\x20wiring\x20bug\x20in\x20tdx,\x20not\x20a\x20problem\x20with\x20your\x20YAML.');const _0x7240cb=await _0x3563f6[_0x5b8630(0x1e9)](_0x13d0cd);_0x1666f8['connectorConfig']=transformConfigToLegacy(_0x4478b9['connector_config'],_0x7240cb);}}}else _0x1666f8[_0x5b8630(0x20e)]={};_0x4478b9[_0x5b8630(0x1e5)]!==undefined&&(_0x1666f8[_0x5b8630(0x218)]=_0x4478b9['activation_template_id']);if(_0x4478b9[_0x5b8630(0x216)])_0x1666f8[_0x5b8630(0x1e0)]=_0x4478b9[_0x5b8630(0x216)]['map'](behaviorDefToApi);else _0x4478b9[_0x5b8630(0x1d6)]&&(_0x1666f8['syndicationBehavior']=behaviorDefToApi(_0x4478b9[_0x5b8630(0x1d6)]));return _0x4478b9['nested_workflow_project_name']&&(_0x1666f8[_0x5b8630(0x1ae)]=_0x4478b9['nested_workflow_project_name']),_0x4478b9['nested_workflow_name']&&(_0x1666f8[_0x5b8630(0x1f9)]=_0x4478b9['nested_workflow_name']),_0x4478b9['lock_enabled']!==undefined&&(_0x1666f8[_0x5b8630(0x1cd)]=_0x4478b9[_0x5b8630(0x222)]),_0x1666f8;}export async function activationDefToUpdateRequest(_0x1be19b,_0x36725f){return activationDefToCreateRequest(_0x1be19b,_0x36725f);}export function deepSortObject(_0x17bd40){const _0x39ee54=a193_0x1454d0;if(_0x17bd40===null||typeof _0x17bd40!==_0x39ee54(0x1dc))return _0x17bd40;if(Array[_0x39ee54(0x265)](_0x17bd40))return _0x17bd40[_0x39ee54(0x1d0)](deepSortObject)[_0x39ee54(0x1ef)]((_0x255937,_0x58352d)=>JSON['stringify'](_0x255937)['localeCompare'](JSON['stringify'](_0x58352d)));const _0x588d9a=_0x17bd40;if(_0x588d9a[_0x39ee54(0x1de)]===_0x39ee54(0x24e)&&Array[_0x39ee54(0x265)](_0x588d9a[_0x39ee54(0x244)])){const _0x505d46={};for(const _0x45c356 of Object[_0x39ee54(0x1d8)](_0x588d9a)['sort']()){_0x505d46[_0x45c356]=_0x45c356===_0x39ee54(0x244)?_0x588d9a[_0x39ee54(0x244)][_0x39ee54(0x1d0)](deepSortObject):deepSortObject(_0x588d9a[_0x45c356]);}return _0x505d46;}const _0x640a66={};for(const _0x20c436 of Object[_0x39ee54(0x1d8)](_0x17bd40)['sort']()){_0x640a66[_0x20c436]=deepSortObject(_0x17bd40[_0x20c436]);}return _0x640a66;}export function serializeRule(_0x1dacef){return JSON['stringify'](deepSortObject(_0x1dacef));}export function normalizeRuleForMatching(_0x1a8093){return normalizeConditionsForMatching(_0x1a8093);}function normalizeConditionsForMatching(_0x4a9053){const _0x2e1f6d=a193_0x1454d0;if(_0x4a9053===null||typeof _0x4a9053!==_0x2e1f6d(0x1dc))return _0x4a9053;if(Array['isArray'](_0x4a9053))return _0x4a9053[_0x2e1f6d(0x1d0)](normalizeConditionsForMatching);const _0x2ef355=_0x4a9053;if((_0x2ef355[_0x2e1f6d(0x1de)]===_0x2e1f6d(0x1db)||_0x2ef355[_0x2e1f6d(0x1de)]==='exclude')&&typeof _0x2ef355[_0x2e1f6d(0x247)]===_0x2e1f6d(0x20a))return{..._0x2ef355,'segment':_0x2e1f6d(0x258)};const _0x44ab5a={};for(const _0x55e39f of Object[_0x2e1f6d(0x1d8)](_0x2ef355)){_0x44ab5a[_0x55e39f]=normalizeConditionsForMatching(_0x2ef355[_0x55e39f]);}return _0x44ab5a;}export function serializeRuleForMatching(_0x1d86e9){const _0x5edc0e=a193_0x1454d0;return JSON[_0x5edc0e(0x217)](deepSortObject(normalizeRuleForMatching(_0x1d86e9)));}export function expandSegmentReferences(_0x544e8a,_0x163387,_0x557dd9=new Set()){return expandConditions(_0x544e8a,_0x163387,_0x557dd9);}function expandConditions(_0x2db3ef,_0x55227c,_0x169bbb){const _0xab59f4=a193_0x1454d0;if(_0x2db3ef===null||typeof _0x2db3ef!==_0xab59f4(0x1dc))return _0x2db3ef;if(Array['isArray'](_0x2db3ef))return _0x2db3ef[_0xab59f4(0x1d0)](_0x5c4b1e=>expandConditions(_0x5c4b1e,_0x55227c,_0x169bbb));const _0x154d8f=_0x2db3ef;if((_0x154d8f['type']===_0xab59f4(0x1db)||_0x154d8f['type']===_0xab59f4(0x22b))&&typeof _0x154d8f[_0xab59f4(0x247)]===_0xab59f4(0x20a)){const _0x37d41f=_0x154d8f[_0xab59f4(0x247)],_0x4b8f38=_0x55227c[_0xab59f4(0x231)](_0x37d41f);if(_0x4b8f38&&!_0x169bbb[_0xab59f4(0x246)](_0x37d41f)){const _0x20ec87=new Set(_0x169bbb);_0x20ec87[_0xab59f4(0x1ce)](_0x37d41f);const _0x10f24b=expandConditions(_0x4b8f38,_0x55227c,_0x20ec87);return{'type':_0x154d8f[_0xab59f4(0x1de)],'expanded_rule':_0x10f24b};}return{'type':_0x154d8f[_0xab59f4(0x1de)],'expanded_rule':_0xab59f4(0x234)};}const _0x10f139={};for(const _0x2159b4 of Object['keys'](_0x154d8f)){_0x10f139[_0x2159b4]=expandConditions(_0x154d8f[_0x2159b4],_0x55227c,_0x169bbb);}return _0x10f139;}export function serializeExpandedRule(_0x4338e3,_0xef365){const _0x2b2da3=a193_0x1454d0,_0x54d49a=expandSegmentReferences(_0x4338e3,_0xef365);return JSON[_0x2b2da3(0x217)](deepSortObject(_0x54d49a));}export function createSegmentNameContext(_0x2d5dfa){const _0x416b54=a193_0x1454d0,_0x594461=new Set(),_0x3e6810=new Map(),_0x4d57cf=new Map();if(_0x2d5dfa)for(const [_0x4d5ab3,_0x29e26b]of Object[_0x416b54(0x1b7)](_0x2d5dfa)){if(_0x29e26b[_0x416b54(0x1f4)]){const _0x1db03c=serializeRule(_0x29e26b[_0x416b54(0x1f4)]);_0x4d57cf[_0x416b54(0x1d9)](_0x1db03c,_0x4d5ab3),_0x594461['add'](_0x4d5ab3);}}return{'usedNames':_0x594461,'ruleHashToName':_0x3e6810,'localRuleToName':_0x2d5dfa?_0x4d57cf:undefined};}export function resolveSegmentName(_0x117a0f,_0x38ca9d,_0x3520e1,_0x2ee5cc){const _0x4b4309=a193_0x1454d0,_0x32a8a7=serializeRule(_0x38ca9d);if(_0x3520e1[_0x4b4309(0x209)]){const _0x35795b=_0x3520e1[_0x4b4309(0x209)][_0x4b4309(0x231)](_0x32a8a7);if(_0x35795b)return{'name':_0x35795b,'isDuplicate':![],'isLocalMatch':!![]};}const _0x25a7bc=_0x3520e1[_0x4b4309(0x25f)][_0x4b4309(0x231)](_0x32a8a7);if(_0x25a7bc)return{'name':_0x25a7bc,'isDuplicate':!![],'isLocalMatch':![]};const _0x38b4f1=_0x2ee5cc(_0x117a0f);let _0x45a65a=_0x38b4f1||_0x117a0f,_0x3e6f2a=_0x45a65a,_0x237cfb=0x2;while(_0x3520e1[_0x4b4309(0x211)]['has'](_0x3e6f2a)){_0x3e6f2a=_0x45a65a+'_'+_0x237cfb,_0x237cfb++;}return _0x3520e1[_0x4b4309(0x211)]['add'](_0x3e6f2a),_0x3520e1[_0x4b4309(0x25f)][_0x4b4309(0x1d9)](_0x32a8a7,_0x3e6f2a),{'name':_0x3e6f2a,'isDuplicate':![],'isLocalMatch':![]};}function a193_0x2c65(_0x53f0ed,_0x44c9fc){_0x53f0ed=_0x53f0ed-0x1ae;const _0x3f4c9e=a193_0x3f4c();let _0x2c65df=_0x3f4c9e[_0x53f0ed];return _0x2c65df;}export function collectSegmentRefsFromRule(_0x375685){const _0x3f09a7=[],_0x17a8bd=_0x2b6e29=>{const _0x24092b=a193_0x2c65;if(!_0x2b6e29||typeof _0x2b6e29!==_0x24092b(0x1dc))return;if(Array[_0x24092b(0x265)](_0x2b6e29)){_0x2b6e29[_0x24092b(0x1b6)](_0x17a8bd);return;}const _0x161d19=_0x2b6e29;(_0x161d19[_0x24092b(0x1de)]===_0x24092b(0x1db)||_0x161d19[_0x24092b(0x1de)]==='exclude')&&typeof _0x161d19['segment']===_0x24092b(0x20a)&&_0x3f09a7[_0x24092b(0x1ff)](_0x161d19[_0x24092b(0x247)]);for(const _0x37fb60 of Object[_0x24092b(0x1e1)](_0x161d19)){_0x17a8bd(_0x37fb60);}};return _0x17a8bd(_0x375685),_0x3f09a7;}export function validateSegmentRule(_0x5be5a3,_0x5846be){const _0x414659=a193_0x1454d0;if(!_0x5846be||!_0x5846be[_0x414659(0x244)])return;for(let _0x5df954=0x0;_0x5df954<_0x5846be['conditions']['length'];_0x5df954++){const _0x5e8c41=_0x5846be['conditions'][_0x5df954];if(_0x414659(0x1de)in _0x5e8c41&&_0x5e8c41[_0x414659(0x1de)]===_0x414659(0x1da)){const _0x3a9fb9=_0x5e8c41,_0x3b31d8=_0x3a9fb9[_0x414659(0x238)]||_0x3a9fb9[_0x414659(0x1c7)];if((!_0x3a9fb9[_0x414659(0x21b)]||_0x3a9fb9[_0x414659(0x21b)]==='')&&!_0x3b31d8)throw new SDKError(ErrorCode['JOURNEY_SYNTAX_ERROR'],_0x414659(0x227)+_0x5be5a3+'\x27:\x20'+(_0x414659(0x1df)+_0x5df954+_0x414659(0x1b9))+_0x414659(0x24a));}}}
1
+ const a193_0x389ba7=a193_0xb32c;(function(_0x536f8f,_0x39a1de){const _0x59928f=a193_0xb32c,_0x43d733=_0x536f8f();while(!![]){try{const _0x3b9b50=parseInt(_0x59928f(0x256))/0x1*(-parseInt(_0x59928f(0x245))/0x2)+-parseInt(_0x59928f(0x279))/0x3*(-parseInt(_0x59928f(0x238))/0x4)+-parseInt(_0x59928f(0x22d))/0x5*(parseInt(_0x59928f(0x213))/0x6)+parseInt(_0x59928f(0x255))/0x7*(-parseInt(_0x59928f(0x254))/0x8)+parseInt(_0x59928f(0x210))/0x9+-parseInt(_0x59928f(0x1ff))/0xa*(parseInt(_0x59928f(0x204))/0xb)+parseInt(_0x59928f(0x261))/0xc;if(_0x3b9b50===_0x39a1de)break;else _0x43d733['push'](_0x43d733['shift']());}catch(_0x586387){_0x43d733['push'](_0x43d733['shift']());}}}(a193_0x30f8,0x4eaec));import*as a193_0x4e4a39 from'yaml';import{safeParseYaml}from'./yaml-validator.js';import{SDKError,ErrorCode}from'../errors.js';import{validateConnectorConfig,transformConfigToLegacy,normalizeConnectorConfigForYaml,formatValidationErrors,formatValidationWarnings,formatSchemaAsHelp,getLegacySettingsField}from'../connection-validator.js';import{SegmentDefSchema}from'./types/segment-schema.js';const SCHEDULE_TYPE_TO_REPEAT_UNIT={'daily':'day','hourly':a193_0x389ba7(0x22e),'weekly':a193_0x389ba7(0x1e4),'monthly':a193_0x389ba7(0x277),'minutes_interval':a193_0x389ba7(0x1f6)},REPEAT_UNIT_TO_SCHEDULE_TYPE={'day':a193_0x389ba7(0x1f3),'hour':a193_0x389ba7(0x1e9),'week':a193_0x389ba7(0x225),'month':a193_0x389ba7(0x272),'minute':a193_0x389ba7(0x1c6)};function filterRuleAsRuleDef(_0x3d8271){return _0x3d8271;}function ruleDefAsFilterRule(_0x323b72){return _0x323b72;}export function segmentResponseToDefSync(_0x3dbad7,_0x1ace55){const _0x521714=a193_0x389ba7,_0x5526fd=_0x3dbad7[_0x521714(0x226)]&&_0x521714(0x26e)in _0x3dbad7['rule']&&_0x3dbad7[_0x521714(0x226)][_0x521714(0x26e)];return{'type':_0x521714(0x269),'name':_0x3dbad7[_0x521714(0x1bb)],..._0x3dbad7[_0x521714(0x278)]&&{'description':_0x3dbad7[_0x521714(0x278)]},..._0x1ace55&&{'folder':_0x1ace55},..._0x5526fd&&{'rule':apiRuleToYaml(_0x3dbad7[_0x521714(0x226)])},..._0x3dbad7[_0x521714(0x1ed)]!==undefined&&{'kind':_0x3dbad7[_0x521714(0x1ed)]===0x0?_0x521714(0x275):_0x3dbad7[_0x521714(0x1ed)]===0x1?_0x521714(0x1c3):_0x521714(0x24e)},..._0x3dbad7[_0x521714(0x1c2)]!==undefined&&{'visible':_0x3dbad7[_0x521714(0x1c2)]}};}export async function segmentResponseToDef(_0x4a90d5,_0x150d9b,_0x72a28){const _0x2bb972=a193_0x389ba7,_0x42fec2=segmentResponseToDefSync(_0x4a90d5,_0x72a28);if(!_0x150d9b||!_0x150d9b['resolveSegmentName'])return _0x42fec2;return _0x42fec2[_0x2bb972(0x226)]&&(_0x42fec2['rule']=await resolveRuleSegmentRefs(_0x42fec2[_0x2bb972(0x226)],_0x150d9b['resolveSegmentName'])),_0x42fec2;}export function apiRuleToYaml(_0x23351c){const _0x300f15=a193_0x389ba7;if(_0x23351c[_0x300f15(0x26e)]===_0x300f15(0x1ca))return{'type':_0x300f15(0x1ca),'conditions':(_0x23351c[_0x300f15(0x1be)]||[])[_0x300f15(0x23d)](apiConditionToYaml),..._0x23351c[_0x300f15(0x278)]!==undefined&&{'description':_0x23351c['description']},..._0x23351c[_0x300f15(0x20d)]!==undefined&&{'expr':_0x23351c[_0x300f15(0x20d)]}};const _0x3a0714=(_0x23351c['conditions']||[])[_0x300f15(0x1cc)](_0x26907e=>{const _0x42095e=_0x300f15,_0x35c686=apiConditionToYaml(_0x26907e);if(isCompositeType(_0x35c686)&&_0x35c686[_0x42095e(0x278)]!==undefined){const _0x48fc94=_0x35c686;if(_0x48fc94['conditions'][_0x42095e(0x24c)]===0x1)return _0x48fc94[_0x42095e(0x1be)];return[{'type':_0x48fc94[_0x42095e(0x26e)],'conditions':_0x48fc94[_0x42095e(0x1be)]}];}return[_0x35c686];});if(_0x3a0714[_0x300f15(0x24c)]===0x1&&!_0x23351c[_0x300f15(0x278)]&&isCompositeType(_0x3a0714[0x0])){const _0x248e62=_0x3a0714[0x0];if(_0x248e62[_0x300f15(0x26e)]===_0x23351c[_0x300f15(0x26e)]&&_0x248e62[_0x300f15(0x1be)]&&_0x248e62['description']===undefined)return{'type':_0x23351c['type'],'conditions':_0x248e62['conditions']};}return{'type':_0x23351c[_0x300f15(0x26e)],'conditions':_0x3a0714};}function a193_0xb32c(_0x5cb6a1,_0x3d9e1f){_0x5cb6a1=_0x5cb6a1-0x1b9;const _0x30f807=a193_0x30f8();let _0xb32c5a=_0x30f807[_0x5cb6a1];return _0xb32c5a;}export async function resolveRuleSegmentRefs(_0x25eebc,_0x4ae6f3){const _0x100e41=a193_0x389ba7;return transformRuleSegmentRefs(_0x25eebc,_0x4ae6f3,_0x49bf11=>/^\d+$/[_0x100e41(0x262)](_0x49bf11));}async function transformConditionSegmentRefs(_0x19afb0,_0x3eb67e,_0x19291c,_0x382cf9){const _0xc905c7=a193_0x389ba7;if('segment'in _0x19afb0&&(_0x19afb0[_0xc905c7(0x26e)]===_0xc905c7(0x21d)||_0x19afb0[_0xc905c7(0x26e)]===_0xc905c7(0x221))){const _0x239fc3=_0x19afb0;if(_0x19291c(_0x239fc3['segment']))return{..._0x239fc3,'segment':await _0x3eb67e(_0x239fc3['segment'])};return _0x19afb0;}if(_0xc905c7(0x1be)in _0x19afb0&&_0x19afb0[_0xc905c7(0x1be)]){const _0x2bb362=_0x19afb0,_0x198824=await Promise[_0xc905c7(0x217)](_0x2bb362[_0xc905c7(0x1be)][_0xc905c7(0x23d)](_0x55da8d=>transformConditionSegmentRefs(_0x55da8d,_0x3eb67e,_0x19291c,_0x382cf9)));return{..._0x2bb362,'conditions':_0x198824};}if(_0xc905c7(0x1c8)in _0x19afb0&&_0x19afb0[_0xc905c7(0x1c8)]){const _0x39d750=_0x19afb0,_0x4dfb23=await _0x382cf9(filterRuleAsRuleDef(_0x39d750[_0xc905c7(0x1c8)]),_0x3eb67e);return{..._0x39d750,'filter':ruleDefAsFilterRule(_0x4dfb23)};}return _0x19afb0;}async function transformRuleSegmentRefs(_0x1bde8a,_0x1a7445,_0xc26817){const _0x10fe3c=a193_0x389ba7,_0xdce370=(_0x4fe5b3,_0x50fad1)=>transformRuleSegmentRefs(_0x4fe5b3,_0x50fad1,_0xc26817),_0x947f1e=await Promise[_0x10fe3c(0x217)](_0x1bde8a[_0x10fe3c(0x1be)][_0x10fe3c(0x23d)](_0x2a22aa=>transformConditionSegmentRefs(_0x2a22aa,_0x1a7445,_0xc26817,_0xdce370)));return{..._0x1bde8a,'conditions':_0x947f1e};}export async function resolveRuleSegmentIds(_0x2ccd75,_0x4bb154){const _0x570180=a193_0x389ba7;return transformRuleSegmentRefs(_0x2ccd75,_0x4bb154,_0x524cba=>!/^\d+$/[_0x570180(0x262)](_0x524cba));}function isCompositeType(_0x71491d){const _0x59976c=a193_0x389ba7;return _0x71491d[_0x59976c(0x26e)]===_0x59976c(0x1c9)||_0x71491d[_0x59976c(0x26e)]==='Or'||_0x71491d['type']===_0x59976c(0x1ca);}function isBehaviorApiCondition(_0x18627e){const _0x7d585b=a193_0x389ba7;if(!_0x18627e[_0x7d585b(0x1e0)]?.[_0x7d585b(0x1fb)]?.[_0x7d585b(0x1bb)])return![];return!![];}function apiConditionToYaml(_0x564b58){const _0x895f93=a193_0x389ba7;if(_0x564b58['type']===_0x895f93(0x1c9)||_0x564b58['type']==='Or'){if(_0x564b58['conditions']){const _0xc8ecca=_0x564b58[_0x895f93(0x1be)]['map'](apiConditionToYaml),_0x548c27=_0x564b58[_0x895f93(0x278)]!==undefined;if(_0xc8ecca[_0x895f93(0x24c)]===0x1&&!_0x548c27)return _0xc8ecca[0x0];return{'type':_0x564b58[_0x895f93(0x26e)],'conditions':_0xc8ecca,..._0x564b58[_0x895f93(0x278)]!==undefined&&{'description':_0x564b58[_0x895f93(0x278)]}};}}if(_0x564b58['type']===_0x895f93(0x1ca)&&_0x564b58[_0x895f93(0x1be)])return{'type':_0x895f93(0x1ca),'conditions':_0x564b58['conditions'][_0x895f93(0x23d)](apiConditionToYaml),..._0x564b58[_0x895f93(0x278)]!==undefined&&{'description':_0x564b58[_0x895f93(0x278)]},..._0x564b58[_0x895f93(0x20d)]!==undefined&&{'expr':_0x564b58[_0x895f93(0x20d)]}};if(_0x564b58[_0x895f93(0x26e)]===_0x895f93(0x208)&&_0x564b58['leftValue']&&_0x564b58['operator']){const _0x39e5a2=_0x564b58[_0x895f93(0x1e0)][_0x895f93(0x1fa)]?buildAggregationDefFromApi(_0x564b58[_0x895f93(0x1e0)][_0x895f93(0x1fa)]):undefined;if(isBehaviorApiCondition(_0x564b58)){const _0xb1bf30=_0x564b58[_0x895f93(0x1e0)][_0x895f93(0x1fb)][_0x895f93(0x1bb)],{timeWindow:_0x1f6961,remainingFilter:_0x33dfd6}=extractTimeWindow(_0x564b58['leftValue'][_0x895f93(0x1c8)]);return{'type':_0x895f93(0x274),'attribute':'','operator':apiOperatorToYaml(_0x564b58[_0x895f93(0x250)]),..._0x564b58[_0x895f93(0x276)]&&_0x564b58[_0x895f93(0x276)]!==_0x895f93(0x1de)?{'arrayMatching':_0x564b58[_0x895f93(0x276)]}:{},..._0x564b58[_0x895f93(0x221)]?{'exclude':_0x564b58[_0x895f93(0x221)]}:{},..._0x39e5a2?{'aggregation':_0x39e5a2}:{},'source':_0xb1bf30,..._0x1f6961?{'timeWindow':_0x1f6961}:{},..._0x33dfd6?{'filter':apiRuleToYaml(_0x33dfd6)}:{},..._0x564b58[_0x895f93(0x27a)]!==undefined&&_0x564b58[_0x895f93(0x27a)]!==null?{'limit':_0x564b58[_0x895f93(0x27a)]}:{}};}return{'type':_0x895f93(0x208),'attribute':_0x564b58[_0x895f93(0x1e0)]['name']||'','operator':apiOperatorToYaml(_0x564b58['operator']),..._0x564b58[_0x895f93(0x276)]&&_0x564b58['arrayMatching']!=='any'?{'arrayMatching':_0x564b58[_0x895f93(0x276)]}:{},..._0x564b58[_0x895f93(0x221)]?{'exclude':_0x564b58['exclude']}:{},..._0x39e5a2?{'aggregation':_0x39e5a2}:{},..._0x564b58[_0x895f93(0x1e0)]['filter']?{'filter':apiRuleToYaml(_0x564b58['leftValue']['filter'])}:{},..._0x564b58['limit']!==undefined&&_0x564b58[_0x895f93(0x27a)]!==null?{'limit':_0x564b58[_0x895f93(0x27a)]}:{}};}if(_0x564b58[_0x895f93(0x26e)]===_0x895f93(0x224)&&_0x564b58[_0x895f93(0x21c)]&&_0x564b58[_0x895f93(0x250)])return{'type':_0x895f93(0x224),'column':_0x564b58[_0x895f93(0x21c)],'operator':apiOperatorToYaml(_0x564b58['operator'])};if(_0x564b58[_0x895f93(0x26e)]===_0x895f93(0x1db)&&_0x564b58['id'])return{'type':_0x564b58['exclude']?_0x895f93(0x221):_0x895f93(0x21d),'segment':_0x564b58['id']};return{'type':_0x895f93(0x1c9),'conditions':[]};}function a193_0x30f8(){const _0xee2d4f=['nested_workflow_project_name','replace','get','minValue','132099CPeyCO','CountDistinct','Invalid\x20connector_config\x20for\x20activation\x20\x22','getSchema','Value','All','emailRecipients','match','reverse','expr','repeatUnit','toLowerCase','3860046bxzKhd','stringify','email_recipients','738312NdLtGE','findIndex','values','repeat_frequency','all','getMetadata','Cannot\x20build\x20connector_config\x20for\x20activation\x20\x22','end_on','syndicationBehavior','column','include','value','rule:','behaviors','exclude','scheduleOption','scheduleType','Column','weekly','rule','lock_enabled','connectionId','set','visibility','localeCompare','duration','25cAiQiO','hour','repeatFrequency','has','parse','attributes','activations:','forEach','lockEnabled','notify_on','unit','4oVsOUF','repeat_sub_frequency','nested_workflow_name','\x22:\x20','all_columns','map','push','min','Count','timeWindow','Equal','segmentFolderId','not','28390RpnVZv','order_by','join_row','activationTemplateId','columns','runAfterJourneyRefresh','__UNRESOLVED__','length','connectorConfig','funnel_stage','attribute','operator','First','Last','CONNECTOR_INVALID_CONFIG','3384tHKbgx','8421baLpfg','3OJjPZC','schedule','Unknown\x20connection:\x20','attribute_name','connector_config','\x27:\x20','conditions[','rightValues','connection','Between','object','13610472PZWeCV','test','TimeWithinPast','INVALID_ARGUMENT','\x22:\x0a','.\x20Use\x20\x27tdx\x20user\x20list\x27\x20to\x20see\x20valid\x20emails.','nestedWorkflowName','behaviorTableName','segment','orderBy','behavior','ruleHashToName','every','type','repeatSubFrequency','isFinite','Invalid\x20condition\x20in\x20embedded\x20segment\x20\x27','monthly','activation_template_id','Behavior','batch','arrayMatching','month','description','678369oFGwWV','limit','provides\x20no\x20getMetadata.\x20This\x20is\x20a\x20wiring\x20bug\x20in\x20tdx,\x20not\x20a\x20problem\x20with\x20your\x20YAML.','timezone','name','start_at','Unknown\x20email\x20recipient:\x20','conditions','max','joinRow','endOn','isVisible','realtime','isArray','Connector:\x20','minutes_interval','warn','filter','And','Composite','run_after_journey_refresh','flatMap','visible','INTERNAL','TimeRange','timestamp','cron','from','joinStrategy','keys','groupingColumns','Segment\x20description','nestedWorkflowProjectName','notification','rightValue','connectionNameToIdMap','Reference','add','JOURNEY_SYNTAX_ERROR','any','string','leftValue','null','startAt','maxValue','week','allColumns','syndicationBehaviors','behavior_table','usedNames','hourly','join_strategy','none','entries','kind','valid','CONNECTION_NOT_FOUND','__SEGMENT_REF__','New\x20Segment','warnings','daily','formatting','notifyOn','minute','orderColumn','connectionNameToTypeMap','sort','aggregation','source','repeat_unit','activations','localRuleToName','250lXqstW'];a193_0x30f8=function(){return _0xee2d4f;};return a193_0x30f8();}function isTemporalOperator(_0xe7d6c8){const _0x1ac5a9=a193_0x389ba7;return _0xe7d6c8===_0x1ac5a9(0x263)||_0xe7d6c8==='TimeWithinNext';}function isBetweenOperator(_0x5a4bef){const _0x36d76b=a193_0x389ba7;return _0x5a4bef===_0x36d76b(0x25f);}function getEffectiveValue(_0x22282a){const _0x8a3c9b=a193_0x389ba7,_0x136179=_0x22282a[_0x8a3c9b(0x215)];return _0x22282a[_0x8a3c9b(0x21e)]??_0x136179;}function parseNumericValue(_0x33364a){const _0x3a6075=a193_0x389ba7;if(typeof _0x33364a===_0x3a6075(0x260)&&_0x33364a!==null)return _0x33364a;if(_0x33364a==='')return _0x33364a;const _0x442791=Number(_0x33364a);return Number[_0x3a6075(0x270)](_0x442791)?_0x442791:_0x33364a;}function apiOperatorToYaml(_0x30a0ee){const _0x9ffc06=a193_0x389ba7;if(isBetweenOperator(_0x30a0ee[_0x9ffc06(0x26e)]))return{'type':mapApiOperatorType(_0x30a0ee[_0x9ffc06(0x26e)]),..._0x30a0ee[_0x9ffc06(0x244)]!==undefined&&{'not':_0x30a0ee[_0x9ffc06(0x244)]},..._0x30a0ee[_0x9ffc06(0x203)]!==undefined&&{'min':parseNumericValue(_0x30a0ee[_0x9ffc06(0x203)])},..._0x30a0ee[_0x9ffc06(0x1e3)]!==undefined&&{'max':parseNumericValue(_0x30a0ee[_0x9ffc06(0x1e3)])}};if(_0x30a0ee['type']==='TimeRange')return{'type':_0x9ffc06(0x1cf),..._0x30a0ee[_0x9ffc06(0x244)]!==undefined&&{'not':_0x30a0ee['not']},..._0x30a0ee['duration']!==undefined&&{'duration':_0x30a0ee[_0x9ffc06(0x22c)]},..._0x30a0ee[_0x9ffc06(0x1d2)]!==undefined&&{'from':_0x30a0ee[_0x9ffc06(0x1d2)]},..._0x30a0ee['reverse']!==undefined&&{'reverse':_0x30a0ee[_0x9ffc06(0x20c)]}};let _0x44349b;if(_0x30a0ee[_0x9ffc06(0x25d)]&&_0x30a0ee['rightValues'][_0x9ffc06(0x24c)]>0x0)_0x44349b=_0x30a0ee[_0x9ffc06(0x25d)];else{if(_0x30a0ee[_0x9ffc06(0x1d9)]!==undefined)_0x44349b=_0x30a0ee[_0x9ffc06(0x1d9)];else isTemporalOperator(_0x30a0ee['type'])&&_0x30a0ee[_0x9ffc06(0x21e)]!==undefined&&(_0x44349b=_0x30a0ee[_0x9ffc06(0x21e)]);}return{'type':mapApiOperatorType(_0x30a0ee['type']),..._0x30a0ee['not']!==undefined&&{'not':_0x30a0ee[_0x9ffc06(0x244)]},..._0x44349b!==undefined&&{'value':_0x44349b},..._0x30a0ee[_0x9ffc06(0x237)]!==undefined&&{'unit':_0x30a0ee['unit']}};}function mapApiOperatorType(_0xaaeb12){return _0xaaeb12;}export function segmentDefToCreateRequest(_0x27d83b,_0x56ea65){const _0x5d5164=a193_0x389ba7,_0xbf644f={'name':_0x27d83b[_0x5d5164(0x1bb)]};return _0x27d83b[_0x5d5164(0x278)]&&(_0xbf644f[_0x5d5164(0x278)]=_0x27d83b[_0x5d5164(0x278)]),_0x27d83b[_0x5d5164(0x226)]&&(_0xbf644f[_0x5d5164(0x226)]=yamlRuleToApi(_0x27d83b['rule'])),_0x27d83b['kind']&&(_0xbf644f[_0x5d5164(0x1ed)]=_0x27d83b[_0x5d5164(0x1ed)]===_0x5d5164(0x275)?0x0:_0x27d83b[_0x5d5164(0x1ed)]===_0x5d5164(0x1c3)?0x1:0x2),_0x27d83b[_0x5d5164(0x1cd)]!==undefined&&(_0xbf644f[_0x5d5164(0x1c2)]=_0x27d83b[_0x5d5164(0x1cd)]),_0x56ea65&&(_0xbf644f[_0x5d5164(0x243)]=_0x56ea65),_0xbf644f;}export function segmentDefToUpdateRequest(_0x3ba9f9){const _0x2b05e9=a193_0x389ba7,_0x555fb6={'name':_0x3ba9f9[_0x2b05e9(0x1bb)]};return _0x3ba9f9[_0x2b05e9(0x278)]!==undefined&&(_0x555fb6['description']=_0x3ba9f9[_0x2b05e9(0x278)]),_0x3ba9f9['rule']&&(_0x555fb6[_0x2b05e9(0x226)]=yamlRuleToApi(_0x3ba9f9[_0x2b05e9(0x226)])),_0x3ba9f9[_0x2b05e9(0x1ed)]&&(_0x555fb6[_0x2b05e9(0x1ed)]=_0x3ba9f9[_0x2b05e9(0x1ed)]===_0x2b05e9(0x275)?0x0:_0x3ba9f9['kind']===_0x2b05e9(0x1c3)?0x1:0x2),_0x555fb6;}export function yamlRuleToApi(_0x42e853){const _0x8c7b3c=a193_0x389ba7;if(_0x42e853['type']===_0x8c7b3c(0x1ca))return{'type':_0x8c7b3c(0x1ca),'conditions':_0x42e853['conditions'][_0x8c7b3c(0x23d)](yamlConditionToApi),..._0x42e853[_0x8c7b3c(0x278)]!==undefined&&{'description':_0x42e853[_0x8c7b3c(0x278)]},..._0x42e853[_0x8c7b3c(0x20d)]!==undefined&&{'expr':_0x42e853[_0x8c7b3c(0x20d)]}};const _0xde9e91=_0x42e853[_0x8c7b3c(0x1be)][_0x8c7b3c(0x23d)](yamlConditionToApi),_0x472d9d=_0xde9e91[_0x8c7b3c(0x26d)](_0x112f50=>isCompositeType(_0x112f50)&&_0x112f50['description']!==undefined);if(!_0x472d9d&&_0xde9e91[_0x8c7b3c(0x24c)]>0x0){const _0x44bf14=[];for(const _0x381142 of _0xde9e91){isCompositeType(_0x381142)&&_0x381142[_0x8c7b3c(0x278)]===undefined&&_0x381142[_0x8c7b3c(0x1be)]&&_0x381142[_0x8c7b3c(0x1be)]['every'](_0x5107f3=>!isCompositeType(_0x5107f3))?_0x44bf14[_0x8c7b3c(0x23e)]({'type':_0x381142[_0x8c7b3c(0x26e)],'description':'','conditions':_0x381142[_0x8c7b3c(0x1be)]}):_0x44bf14['push']({'type':'And','description':_0x42e853[_0x8c7b3c(0x278)]||'','conditions':[_0x381142]});}return{'type':_0x42e853['type'],'conditions':_0x44bf14};}return{'type':_0x42e853[_0x8c7b3c(0x26e)],'conditions':_0xde9e91,..._0x42e853['description']&&{'description':_0x42e853[_0x8c7b3c(0x278)]}};}function yamlFilterRuleToApi(_0x59c111){const _0x38271f=a193_0x389ba7,_0x4e2771=_0x59c111['conditions']['map'](yamlConditionToApi);return{'type':_0x59c111[_0x38271f(0x26e)],'conditions':_0x4e2771};}function yamlConditionToApi(_0x8c1df9){const _0x3cddf4=a193_0x389ba7;if(_0x3cddf4(0x269)in _0x8c1df9&&(_0x8c1df9[_0x3cddf4(0x26e)]===_0x3cddf4(0x21d)||_0x8c1df9[_0x3cddf4(0x26e)]===_0x3cddf4(0x221))){const _0xef7073=_0x8c1df9;return{'type':_0x3cddf4(0x1db),'id':_0xef7073[_0x3cddf4(0x269)],'exclude':_0xef7073[_0x3cddf4(0x26e)]===_0x3cddf4(0x221)};}if(_0x8c1df9[_0x3cddf4(0x26e)]==='And'||_0x8c1df9[_0x3cddf4(0x26e)]==='Or'||_0x8c1df9[_0x3cddf4(0x26e)]===_0x3cddf4(0x1ca)){const _0x333f7f=_0x8c1df9;return{'type':_0x333f7f[_0x3cddf4(0x26e)],'conditions':_0x333f7f[_0x3cddf4(0x1be)][_0x3cddf4(0x23d)](yamlConditionToApi),..._0x333f7f[_0x3cddf4(0x278)]&&{'description':_0x333f7f[_0x3cddf4(0x278)]},..._0x333f7f['expr']!==undefined&&{'expr':_0x333f7f[_0x3cddf4(0x20d)]}};}if(_0x3cddf4(0x21c)in _0x8c1df9&&_0x8c1df9[_0x3cddf4(0x26e)]===_0x3cddf4(0x224)){const _0x24a4ad=_0x8c1df9;return{'type':_0x3cddf4(0x224),'column':_0x24a4ad[_0x3cddf4(0x21c)],'operator':yamlOperatorToApi(_0x24a4ad[_0x3cddf4(0x250)])};}const _0x4e82f9=_0x8c1df9,_0x41d63a={'type':_0x3cddf4(0x208),'leftValue':buildLeftValue(_0x4e82f9),'operator':yamlOperatorToApi(_0x4e82f9[_0x3cddf4(0x250)]),'exclude':_0x4e82f9['exclude']??![],'arrayMatching':_0x4e82f9['arrayMatching']??'any'};return _0x4e82f9[_0x3cddf4(0x27a)]!==undefined&&(_0x41d63a[_0x3cddf4(0x27a)]=_0x4e82f9[_0x3cddf4(0x27a)]),_0x41d63a;}function buildAggregationDefFromApi(_0x27beb5){const _0x286039=a193_0x389ba7,_0x334420=_0x27beb5[_0x286039(0x26e)];if(_0x334420===_0x286039(0x205))return{'type':_0x334420,'columns':_0x27beb5['columns']??[]};if(_0x334420==='First'||_0x334420==='Last')return{'type':_0x334420,'column':_0x27beb5[_0x286039(0x21c)]??'','orderColumn':_0x27beb5[_0x286039(0x1f7)]??'',..._0x27beb5[_0x286039(0x1d5)]&&{'groupingColumns':_0x27beb5['groupingColumns']}};if(_0x334420==='Count')return{'type':_0x334420,..._0x27beb5['groupingColumns']&&{'groupingColumns':_0x27beb5['groupingColumns']}};return{'type':_0x334420,'column':_0x27beb5[_0x286039(0x21c)]??'',..._0x27beb5['groupingColumns']&&{'groupingColumns':_0x27beb5[_0x286039(0x1d5)]}};}function buildLeftValue(_0xc97d9){const _0x1153e3=a193_0x389ba7,_0x2fc184={};_0xc97d9['attribute']&&_0xc97d9[_0x1153e3(0x26e)]!=='Behavior'&&(_0x2fc184[_0x1153e3(0x1bb)]=_0xc97d9[_0x1153e3(0x24f)]);if(_0xc97d9[_0x1153e3(0x1fa)]){const _0x46c8e6=_0xc97d9['aggregation'];if(_0x46c8e6[_0x1153e3(0x26e)]===_0x1153e3(0x205))_0x2fc184['aggregation']={'type':'CountDistinct','columns':_0x46c8e6[_0x1153e3(0x249)]};else{if(_0x46c8e6[_0x1153e3(0x26e)]===_0x1153e3(0x251)||_0x46c8e6['type']===_0x1153e3(0x252))_0x2fc184['aggregation']={'type':_0x46c8e6[_0x1153e3(0x26e)],'column':_0x46c8e6[_0x1153e3(0x21c)],'orderColumn':_0x46c8e6['orderColumn'],..._0x46c8e6[_0x1153e3(0x1d5)]&&{'groupingColumns':_0x46c8e6[_0x1153e3(0x1d5)]}};else _0x46c8e6['type']===_0x1153e3(0x240)?_0x2fc184[_0x1153e3(0x1fa)]={'type':_0x1153e3(0x240),..._0x46c8e6['groupingColumns']&&{'groupingColumns':_0x46c8e6[_0x1153e3(0x1d5)]}}:_0x2fc184[_0x1153e3(0x1fa)]={'type':_0x46c8e6[_0x1153e3(0x26e)],'column':_0x46c8e6[_0x1153e3(0x21c)],..._0x46c8e6['groupingColumns']&&{'groupingColumns':_0x46c8e6[_0x1153e3(0x1d5)]}};}}_0xc97d9[_0x1153e3(0x1fb)]&&(_0x2fc184[_0x1153e3(0x1fb)]={'name':_0xc97d9[_0x1153e3(0x1fb)]});const _0x5bdcd0=_0xc97d9[_0x1153e3(0x26e)]==='Behavior'?_0xc97d9[_0x1153e3(0x241)]:undefined,_0x25a111=_0x5bdcd0?[buildTimeWindowCondition(_0x5bdcd0)]:[],_0x503232=[..._0xc97d9[_0x1153e3(0x1c8)]?.[_0x1153e3(0x1be)]??[],..._0x25a111];return _0x503232[_0x1153e3(0x24c)]>0x0&&(_0x2fc184['filter']=yamlFilterRuleToApi(filterRuleAsRuleDef({'type':'And','conditions':_0x503232}))),_0x2fc184;}function buildTimeWindowCondition(_0x24f2d2){const _0xfc1f3e=a193_0x389ba7;return{'type':_0xfc1f3e(0x224),'column':_0xfc1f3e(0x1d0),'operator':{'type':_0xfc1f3e(0x263),'value':_0x24f2d2['duration'],'unit':_0x24f2d2['unit']}};}function extractTimeWindow(_0xa2cf03){const _0x37e08b=a193_0x389ba7;if(!_0xa2cf03?.[_0x37e08b(0x1be)]?.[_0x37e08b(0x24c)])return{'remainingFilter':_0xa2cf03};const _0x5bf851=_0xa2cf03[_0x37e08b(0x1be)][_0x37e08b(0x214)](_0x290768=>_0x290768[_0x37e08b(0x26e)]===_0x37e08b(0x224)&&_0x290768['column']==='timestamp'&&_0x290768[_0x37e08b(0x250)]?.['type']===_0x37e08b(0x263)&&!_0x290768[_0x37e08b(0x250)][_0x37e08b(0x244)]&&typeof _0x290768[_0x37e08b(0x250)][_0x37e08b(0x21e)]==='number'&&typeof _0x290768[_0x37e08b(0x250)][_0x37e08b(0x237)]==='string');if(_0x5bf851===-0x1)return{'remainingFilter':_0xa2cf03};const _0x134ecc=_0xa2cf03[_0x37e08b(0x1be)][_0x5bf851],_0x30428b=_0xa2cf03[_0x37e08b(0x1be)][_0x37e08b(0x1c8)]((_0xfb38ef,_0x5401e7)=>_0x5401e7!==_0x5bf851);return{'timeWindow':{'duration':_0x134ecc[_0x37e08b(0x250)][_0x37e08b(0x21e)],'unit':_0x134ecc[_0x37e08b(0x250)][_0x37e08b(0x237)]},'remainingFilter':_0x30428b[_0x37e08b(0x24c)]>0x0?{..._0xa2cf03,'conditions':_0x30428b}:undefined};}function yamlOperatorToApi(_0x321e47){const _0x1738f0=a193_0x389ba7,_0x3d6337={'type':mapYamlOperatorType(_0x321e47[_0x1738f0(0x26e)]),'not':_0x321e47[_0x1738f0(0x244)]??![]};if(isBetweenOperator(_0x321e47[_0x1738f0(0x26e)]))return _0x321e47['min']!==undefined&&(_0x3d6337[_0x1738f0(0x203)]=typeof _0x321e47[_0x1738f0(0x23f)]===_0x1738f0(0x260)?_0x321e47['min']:String(_0x321e47[_0x1738f0(0x23f)])),_0x321e47['max']!==undefined&&(_0x3d6337['maxValue']=typeof _0x321e47[_0x1738f0(0x1bf)]==='object'?_0x321e47[_0x1738f0(0x1bf)]:String(_0x321e47[_0x1738f0(0x1bf)])),_0x3d6337;if(_0x321e47['type']===_0x1738f0(0x1cf))return _0x321e47[_0x1738f0(0x22c)]&&(_0x3d6337[_0x1738f0(0x22c)]=_0x321e47['duration']),_0x321e47['from']&&(_0x3d6337[_0x1738f0(0x1d2)]=_0x321e47[_0x1738f0(0x1d2)]),_0x321e47[_0x1738f0(0x20c)]!==undefined&&(_0x3d6337['reverse']=_0x321e47['reverse']),_0x3d6337;const _0x48d19e=getEffectiveValue(_0x321e47);if(_0x48d19e!==undefined){if(Array[_0x1738f0(0x1c4)](_0x48d19e))_0x3d6337[_0x1738f0(0x25d)]=_0x48d19e;else isTemporalOperator(_0x321e47[_0x1738f0(0x26e)])?_0x3d6337[_0x1738f0(0x21e)]=_0x48d19e:_0x3d6337['rightValue']=_0x48d19e;}return _0x321e47[_0x1738f0(0x237)]&&(_0x3d6337['unit']=_0x321e47['unit']),_0x3d6337;}function mapYamlOperatorType(_0x85d292){return _0x85d292;}export function toYamlString(_0x435842){const _0x41c416=a193_0x389ba7,_0x1fc9d8=JSON[_0x41c416(0x231)](JSON[_0x41c416(0x211)](_0x435842)),_0x485292=a193_0x4e4a39['stringify'](_0x1fc9d8,{'indent':0x2,'lineWidth':0x0,'nullStr':_0x41c416(0x1e1)}),_0x236910=['rule:'];let _0x1dd1d9=_0x485292;for(const _0x3cfb2c of _0x236910){_0x1dd1d9=_0x1dd1d9[_0x41c416(0x201)](new RegExp('^('+_0x3cfb2c+')','m'),(_0x4c4741,_0x28492e,_0x7a5f7d)=>{if(_0x7a5f7d===0x0||_0x1dd1d9[_0x7a5f7d-0x1]==='\x0a'&&_0x1dd1d9[_0x7a5f7d-0x2]==='\x0a')return _0x28492e;return'\x0a'+_0x28492e;});}return _0x1dd1d9;}export function parseYamlString(_0x4bfe23){return parseSegmentYamlFile(_0x4bfe23);}export function isSegmentYaml(_0x185c7b){const _0x31fba9=a193_0x389ba7;if(typeof _0x185c7b!==_0x31fba9(0x260)||_0x185c7b===null)return![];const _0x44789d=_0x185c7b;return _0x44789d[_0x31fba9(0x26e)]===_0x31fba9(0x269)||_0x44789d[_0x31fba9(0x26e)]===undefined;}export function generateTemplate(_0x318c13=a193_0x389ba7(0x1f1)){const _0x4cb6e3=a193_0x389ba7,_0x3876bb={'type':'segment','name':_0x318c13,'description':_0x4cb6e3(0x1d6),'rule':{'type':_0x4cb6e3(0x1c9),'conditions':[{'type':_0x4cb6e3(0x208),'attribute':_0x4cb6e3(0x259),'operator':{'type':_0x4cb6e3(0x242),'value':'value'}}]}};return toYamlString(_0x3876bb);}export function segmentToYamlString(_0xe3c177){const _0xcd75ac=a193_0x389ba7,_0x2eac45=JSON[_0xcd75ac(0x231)](JSON[_0xcd75ac(0x211)](_0xe3c177)),_0x3851a2=a193_0x4e4a39[_0xcd75ac(0x211)](_0x2eac45,{'indent':0x2,'lineWidth':0x0,'nullStr':_0xcd75ac(0x1e1)}),_0x3a60d3=[_0xcd75ac(0x21f),_0xcd75ac(0x233)];let _0x212c71=_0x3851a2;for(const _0x20091a of _0x3a60d3){_0x212c71=_0x212c71[_0xcd75ac(0x201)](new RegExp('^('+_0x20091a+')','m'),(_0x201844,_0x15c0de,_0x1ce613)=>{if(_0x1ce613===0x0||_0x212c71[_0x1ce613-0x1]==='\x0a'&&_0x212c71[_0x1ce613-0x2]==='\x0a')return _0x15c0de;return'\x0a'+_0x15c0de;});}return _0x212c71;}export function parseSegmentYamlFile(_0x41079f){return safeParseYaml(_0x41079f,SegmentDefSchema);}export function normalizeChildSegmentYaml(_0x4991e4){const _0x285021=a193_0x389ba7;return{'type':_0x285021(0x269),'name':_0x4991e4[_0x285021(0x1bb)],..._0x4991e4[_0x285021(0x278)]!==undefined&&{'description':_0x4991e4[_0x285021(0x278)]},..._0x4991e4['folder']!==undefined&&{'folder':_0x4991e4['folder']},..._0x4991e4[_0x285021(0x226)]&&{'rule':normalizeRule(_0x4991e4[_0x285021(0x226)])},..._0x4991e4['kind']!==undefined&&{'kind':_0x4991e4[_0x285021(0x1ed)]},..._0x4991e4[_0x285021(0x1cd)]!==undefined&&{'visible':_0x4991e4['visible']},..._0x4991e4[_0x285021(0x1fd)]&&{'activations':_0x4991e4[_0x285021(0x1fd)][_0x285021(0x23d)](normalizeActivation)}};}export function normalizeRule(_0x44d9e3){const _0x1b99d9=a193_0x389ba7;return{'type':_0x44d9e3['type'],'conditions':_0x44d9e3[_0x1b99d9(0x1be)][_0x1b99d9(0x23d)](normalizeCondition),..._0x44d9e3[_0x1b99d9(0x278)]!==undefined&&{'description':_0x44d9e3[_0x1b99d9(0x278)]},..._0x44d9e3['expr']!==undefined&&{'expr':_0x44d9e3['expr']}};}function normalizeCondition(_0x1f19d4){const _0x205d2f=a193_0x389ba7;if('segment'in _0x1f19d4&&(_0x1f19d4[_0x205d2f(0x26e)]===_0x205d2f(0x21d)||_0x1f19d4[_0x205d2f(0x26e)]==='exclude')){const _0x4db9e7=_0x1f19d4;return{'type':_0x4db9e7[_0x205d2f(0x26e)],'segment':_0x4db9e7[_0x205d2f(0x269)]};}if(_0x1f19d4[_0x205d2f(0x26e)]===_0x205d2f(0x1c9)||_0x1f19d4[_0x205d2f(0x26e)]==='Or'||_0x1f19d4[_0x205d2f(0x26e)]===_0x205d2f(0x1ca)){const _0x3e67b7=_0x1f19d4;return{'type':_0x3e67b7[_0x205d2f(0x26e)],'conditions':_0x3e67b7[_0x205d2f(0x1be)]['map'](normalizeCondition),..._0x3e67b7[_0x205d2f(0x278)]!==undefined&&{'description':_0x3e67b7[_0x205d2f(0x278)]},..._0x3e67b7['expr']!==undefined&&{'expr':_0x3e67b7[_0x205d2f(0x20d)]}};}if(_0x205d2f(0x21c)in _0x1f19d4&&_0x1f19d4[_0x205d2f(0x26e)]===_0x205d2f(0x224)){const _0x37cbc8=_0x1f19d4;return{'type':_0x205d2f(0x224),'column':_0x37cbc8[_0x205d2f(0x21c)],'operator':normalizeOperator(_0x37cbc8[_0x205d2f(0x250)])};}if(_0x1f19d4[_0x205d2f(0x26e)]==='Behavior'){const _0x5b7ae5=_0x1f19d4;return{'type':'Behavior','attribute':_0x5b7ae5['attribute'],'operator':normalizeOperator(_0x5b7ae5[_0x205d2f(0x250)]),..._0x5b7ae5[_0x205d2f(0x276)]!==undefined&&{'arrayMatching':_0x5b7ae5['arrayMatching']},..._0x5b7ae5[_0x205d2f(0x221)]!==undefined&&{'exclude':_0x5b7ae5['exclude']},..._0x5b7ae5[_0x205d2f(0x1fa)]!==undefined&&{'aggregation':_0x5b7ae5[_0x205d2f(0x1fa)]},..._0x5b7ae5['source']!==undefined&&{'source':_0x5b7ae5[_0x205d2f(0x1fb)]},..._0x5b7ae5[_0x205d2f(0x1c8)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x5b7ae5[_0x205d2f(0x1c8)])))},..._0x5b7ae5['timeWindow']!==undefined&&{'timeWindow':_0x5b7ae5[_0x205d2f(0x241)]},..._0x5b7ae5['limit']!==undefined&&{'limit':_0x5b7ae5['limit']}};}const _0x4ad11f=_0x1f19d4;return{'type':_0x205d2f(0x208),'attribute':_0x4ad11f[_0x205d2f(0x24f)],'operator':normalizeOperator(_0x4ad11f['operator']),..._0x4ad11f[_0x205d2f(0x276)]!==undefined&&{'arrayMatching':_0x4ad11f[_0x205d2f(0x276)]},..._0x4ad11f[_0x205d2f(0x221)]!==undefined&&{'exclude':_0x4ad11f[_0x205d2f(0x221)]},..._0x4ad11f[_0x205d2f(0x1fa)]!==undefined&&{'aggregation':_0x4ad11f[_0x205d2f(0x1fa)]},..._0x4ad11f[_0x205d2f(0x1fb)]!==undefined&&{'source':_0x4ad11f[_0x205d2f(0x1fb)]},..._0x4ad11f[_0x205d2f(0x1c8)]!==undefined&&{'filter':ruleDefAsFilterRule(normalizeRule(filterRuleAsRuleDef(_0x4ad11f[_0x205d2f(0x1c8)])))},..._0x4ad11f[_0x205d2f(0x27a)]!==undefined&&{'limit':_0x4ad11f[_0x205d2f(0x27a)]}};}function normalizeOperator(_0xb754ef){const _0x2efd7e=a193_0x389ba7;if(isBetweenOperator(_0xb754ef[_0x2efd7e(0x26e)]))return{'type':_0xb754ef[_0x2efd7e(0x26e)],..._0xb754ef[_0x2efd7e(0x244)]!==undefined&&{'not':_0xb754ef[_0x2efd7e(0x244)]},..._0xb754ef[_0x2efd7e(0x23f)]!==undefined&&{'min':_0xb754ef[_0x2efd7e(0x23f)]},..._0xb754ef[_0x2efd7e(0x1bf)]!==undefined&&{'max':_0xb754ef[_0x2efd7e(0x1bf)]}};const _0x5d9473=getEffectiveValue(_0xb754ef);return{'type':_0xb754ef[_0x2efd7e(0x26e)],..._0xb754ef[_0x2efd7e(0x244)]!==undefined&&{'not':_0xb754ef[_0x2efd7e(0x244)]},..._0x5d9473!==undefined&&{'value':_0x5d9473},..._0xb754ef[_0x2efd7e(0x237)]!==undefined&&{'unit':_0xb754ef[_0x2efd7e(0x237)]},..._0xb754ef['duration']!==undefined&&{'duration':_0xb754ef[_0x2efd7e(0x22c)]},..._0xb754ef[_0x2efd7e(0x1d2)]!==undefined&&{'from':_0xb754ef[_0x2efd7e(0x1d2)]},..._0xb754ef['reverse']!==undefined&&{'reverse':_0xb754ef[_0x2efd7e(0x20c)]}};}function normalizeActivation(_0x10fd90){const _0x166808=a193_0x389ba7;return{'name':_0x10fd90['name'],'connection':_0x10fd90['connection'],..._0x10fd90[_0x166808(0x278)]!==undefined&&{'description':_0x10fd90[_0x166808(0x278)]},..._0x10fd90[_0x166808(0x23c)]!==undefined&&{'all_columns':_0x10fd90[_0x166808(0x23c)]},..._0x10fd90[_0x166808(0x249)]!==undefined&&{'columns':_0x10fd90[_0x166808(0x249)]},..._0x10fd90[_0x166808(0x26b)]!==undefined&&{'behavior':_0x10fd90['behavior']},..._0x10fd90[_0x166808(0x220)]!==undefined&&{'behaviors':_0x10fd90[_0x166808(0x220)]},..._0x10fd90[_0x166808(0x257)]!==undefined&&{'schedule':_0x10fd90[_0x166808(0x257)]},..._0x10fd90[_0x166808(0x1d8)]!==undefined&&{'notification':_0x10fd90[_0x166808(0x1d8)]},..._0x10fd90[_0x166808(0x25a)]!==undefined&&{'connector_config':_0x10fd90[_0x166808(0x25a)]},..._0x10fd90[_0x166808(0x273)]!==undefined&&{'activation_template_id':_0x10fd90['activation_template_id']},..._0x10fd90[_0x166808(0x200)]!==undefined&&{'nested_workflow_project_name':_0x10fd90[_0x166808(0x200)]},..._0x10fd90[_0x166808(0x23a)]!==undefined&&{'nested_workflow_name':_0x10fd90['nested_workflow_name']},..._0x10fd90[_0x166808(0x227)]!==undefined&&{'lock_enabled':_0x10fd90['lock_enabled']}};}function getColumnName(_0x170518){const _0x36d21f=a193_0x389ba7;return _0x170518[_0x36d21f(0x21c)]||_0x170518[_0x36d21f(0x1bb)];}function behaviorApiToDef(_0x5e5b79){const _0x2ec669=a193_0x389ba7,_0x170ac5={};return _0x5e5b79[_0x2ec669(0x249)]&&_0x5e5b79[_0x2ec669(0x249)][_0x2ec669(0x24c)]>0x0&&(_0x170ac5[_0x2ec669(0x249)]=_0x5e5b79[_0x2ec669(0x249)][_0x2ec669(0x1c8)](_0x3b6c8b=>_0x3b6c8b&&getColumnName(_0x3b6c8b))[_0x2ec669(0x23d)](_0x3a42e1=>({'name':getColumnName(_0x3a42e1),..._0x3a42e1[_0x2ec669(0x26e)]&&{'type':_0x3a42e1[_0x2ec669(0x26e)]},..._0x3a42e1[_0x2ec669(0x22a)]&&{'visibility':_0x3a42e1[_0x2ec669(0x22a)]}}))),_0x5e5b79[_0x2ec669(0x268)]&&(_0x170ac5[_0x2ec669(0x1e7)]=_0x5e5b79[_0x2ec669(0x268)]),_0x5e5b79[_0x2ec669(0x1c0)]!==undefined&&(_0x170ac5['join_row']=_0x5e5b79[_0x2ec669(0x1c0)]),_0x5e5b79[_0x2ec669(0x1d3)]&&(_0x170ac5[_0x2ec669(0x1ea)]=_0x5e5b79[_0x2ec669(0x1d3)]),_0x5e5b79[_0x2ec669(0x1f4)]&&(_0x170ac5[_0x2ec669(0x1f4)]=_0x5e5b79['formatting']),_0x5e5b79['orderBy']&&_0x5e5b79[_0x2ec669(0x26a)][_0x2ec669(0x24c)]>0x0&&(_0x170ac5[_0x2ec669(0x246)]=_0x5e5b79[_0x2ec669(0x26a)]),_0x170ac5;}function behaviorsApiToDef(_0x57f89e){const _0x1ff329=a193_0x389ba7;return _0x57f89e[_0x1ff329(0x23d)](behaviorApiToDef)[_0x1ff329(0x1c8)](_0x20fb1c=>Object[_0x1ff329(0x1d4)](_0x20fb1c)['length']>0x0);}export function activationResponseToDef(_0x57bf39,_0x472558,_0x9c1078){const _0x37bde6=a193_0x389ba7,_0x1febce=_0x57bf39[_0x37bde6(0x228)]||'',_0x29c467=_0x9c1078?.[_0x37bde6(0x202)](_0x1febce)??_0x1febce,_0x457d69={'name':_0x57bf39[_0x37bde6(0x1bb)],'connection':_0x29c467};_0x57bf39['description']&&(_0x457d69[_0x37bde6(0x278)]=_0x57bf39[_0x37bde6(0x278)]);let _0x185ebf=[];_0x57bf39[_0x37bde6(0x249)]&&_0x57bf39['columns'][_0x37bde6(0x24c)]>0x0&&(_0x185ebf=_0x57bf39['columns'][_0x37bde6(0x1c8)](_0xd1e496=>_0xd1e496&&getColumnName(_0xd1e496))['map'](_0x38349e=>{const _0x16a09f=_0x37bde6,_0x552759=getColumnName(_0x38349e);if(_0x38349e[_0x16a09f(0x26e)]||_0x38349e[_0x16a09f(0x22a)])return{'name':_0x552759,..._0x38349e[_0x16a09f(0x26e)]&&{'type':_0x38349e['type']},..._0x38349e[_0x16a09f(0x22a)]&&{'visibility':_0x38349e['visibility']}};return _0x552759;}));_0x185ebf[_0x37bde6(0x24c)]>0x0&&(_0x457d69[_0x37bde6(0x249)]=_0x185ebf);_0x57bf39[_0x37bde6(0x1e5)]!==undefined&&(_0x57bf39[_0x37bde6(0x1e5)]===![]&&_0x185ebf[_0x37bde6(0x24c)]===0x0?_0x457d69['all_columns']=!![]:_0x457d69[_0x37bde6(0x23c)]=_0x57bf39[_0x37bde6(0x1e5)]);const _0x1faf24={};let _0x44a2b0=![];_0x57bf39[_0x37bde6(0x223)]&&(_0x1faf24['type']=_0x57bf39[_0x37bde6(0x223)],_0x44a2b0=!![]);_0x57bf39[_0x37bde6(0x20e)]&&(_0x1faf24[_0x37bde6(0x1fc)]=_0x57bf39[_0x37bde6(0x20e)],_0x44a2b0=!![]);_0x57bf39[_0x37bde6(0x22f)]!==undefined&&_0x57bf39[_0x37bde6(0x22f)]!==null&&(_0x1faf24['repeat_frequency']=_0x57bf39['repeatFrequency'],_0x44a2b0=!![]);_0x57bf39['repeatSubFrequency']&&_0x57bf39[_0x37bde6(0x26f)]['length']>0x0&&(_0x1faf24['repeat_sub_frequency']=_0x57bf39[_0x37bde6(0x26f)],_0x44a2b0=!![]);_0x57bf39[_0x37bde6(0x1e2)]!==undefined&&(_0x1faf24[_0x37bde6(0x1bc)]=_0x57bf39[_0x37bde6(0x1e2)],_0x44a2b0=!![]);_0x57bf39['endOn']!==undefined&&(_0x1faf24[_0x37bde6(0x21a)]=_0x57bf39[_0x37bde6(0x1c1)],_0x44a2b0=!![]);_0x57bf39['timezone']&&(_0x1faf24[_0x37bde6(0x1ba)]=_0x57bf39['timezone'],_0x44a2b0=!![]);_0x44a2b0&&(_0x457d69['schedule']=_0x1faf24);(_0x57bf39[_0x37bde6(0x1f5)]&&_0x57bf39[_0x37bde6(0x1f5)][_0x37bde6(0x24c)]>0x0||_0x57bf39[_0x37bde6(0x20a)]&&_0x57bf39[_0x37bde6(0x20a)]['length']>0x0)&&(_0x457d69[_0x37bde6(0x1d8)]={},_0x57bf39['notifyOn']&&_0x57bf39['notifyOn'][_0x37bde6(0x24c)]>0x0&&(_0x457d69[_0x37bde6(0x1d8)][_0x37bde6(0x236)]=_0x57bf39[_0x37bde6(0x1f5)]),_0x57bf39['emailRecipients']&&_0x57bf39[_0x37bde6(0x20a)][_0x37bde6(0x24c)]>0x0&&(_0x457d69[_0x37bde6(0x1d8)][_0x37bde6(0x212)]=_0x57bf39[_0x37bde6(0x20a)][_0x37bde6(0x23d)](_0x461788=>{const _0xaf9172=_0x37bde6,_0x1f9006=_0x472558?.[_0xaf9172(0x202)](_0x461788);return _0x1f9006??String(_0x461788);})));_0x57bf39[_0x37bde6(0x24d)]&&Object[_0x37bde6(0x1d4)](_0x57bf39['connectorConfig'])[_0x37bde6(0x24c)]>0x0&&(_0x457d69[_0x37bde6(0x25a)]=normalizeConnectorConfigForYaml(_0x57bf39[_0x37bde6(0x24d)]));_0x57bf39['activationTemplateId']&&(_0x457d69[_0x37bde6(0x273)]=_0x57bf39[_0x37bde6(0x248)]);if(_0x57bf39[_0x37bde6(0x1e6)]&&_0x57bf39['syndicationBehaviors'][_0x37bde6(0x24c)]>0x0){const _0x46bda2=behaviorsApiToDef(_0x57bf39[_0x37bde6(0x1e6)]);_0x46bda2[_0x37bde6(0x24c)]>0x0&&(_0x457d69[_0x37bde6(0x220)]=_0x46bda2);}return _0x57bf39[_0x37bde6(0x1d7)]&&(_0x457d69[_0x37bde6(0x200)]=_0x57bf39['nestedWorkflowProjectName']),_0x57bf39[_0x37bde6(0x267)]&&(_0x457d69['nested_workflow_name']=_0x57bf39[_0x37bde6(0x267)]),_0x57bf39[_0x37bde6(0x235)]!==undefined&&(_0x457d69['lock_enabled']=_0x57bf39[_0x37bde6(0x235)]),_0x457d69;}export function journeyActivationStepToYaml(_0x176c0e,_0x332ea5,_0x29d471){const _0xa6540=a193_0x389ba7,_0xef41d2=_0x176c0e[_0xa6540(0x232)]['activationParams'],_0x5d16e9=_0xef41d2[_0xa6540(0x228)]||'',_0x30f353=_0x29d471?.[_0xa6540(0x202)](_0x5d16e9)??_0x5d16e9,_0x59c231={'name':_0xef41d2[_0xa6540(0x1bb)]||'','connection':_0x30f353};_0x176c0e[_0xa6540(0x232)][_0xa6540(0x24a)]&&(_0x59c231[_0xa6540(0x1cb)]=!![]);_0xef41d2['description']&&(_0x59c231[_0xa6540(0x278)]=_0xef41d2[_0xa6540(0x278)]);let _0x4433bf=[];_0xef41d2[_0xa6540(0x249)]&&_0xef41d2['columns']['length']>0x0&&(_0x4433bf=_0xef41d2['columns'][_0xa6540(0x1c8)](_0x1e4b21=>_0x1e4b21&&getColumnName(_0x1e4b21))['map'](_0x24ea06=>{const _0x1afd8e=_0xa6540,_0x54d031=getColumnName(_0x24ea06);if(_0x24ea06['type']||_0x24ea06['visibility'])return{'name':_0x54d031,..._0x24ea06['type']&&{'type':_0x24ea06['type']},..._0x24ea06[_0x1afd8e(0x22a)]&&{'visibility':_0x24ea06[_0x1afd8e(0x22a)]}};return _0x54d031;}));_0x4433bf[_0xa6540(0x24c)]>0x0&&(_0x59c231[_0xa6540(0x249)]=_0x4433bf);_0xef41d2[_0xa6540(0x1e5)]!==undefined&&(_0xef41d2['allColumns']===![]&&_0x4433bf[_0xa6540(0x24c)]===0x0?_0x59c231[_0xa6540(0x23c)]=!![]:_0x59c231[_0xa6540(0x23c)]=_0xef41d2[_0xa6540(0x1e5)]);const _0x30c137={};let _0x49ef0f=![];_0xef41d2[_0xa6540(0x223)]&&(_0x30c137[_0xa6540(0x26e)]=_0xef41d2['scheduleType'],_0x49ef0f=!![]);_0xef41d2[_0xa6540(0x20e)]&&(_0x30c137[_0xa6540(0x1fc)]=_0xef41d2[_0xa6540(0x20e)],_0x49ef0f=!![]);_0xef41d2['repeatFrequency']!==undefined&&_0xef41d2[_0xa6540(0x22f)]!==null&&(_0x30c137[_0xa6540(0x216)]=_0xef41d2[_0xa6540(0x22f)],_0x49ef0f=!![]);_0xef41d2['startAt']!==undefined&&(_0x30c137[_0xa6540(0x1bc)]=_0xef41d2['startAt'],_0x49ef0f=!![]);_0xef41d2[_0xa6540(0x1c1)]!==undefined&&(_0x30c137['end_on']=_0xef41d2[_0xa6540(0x1c1)],_0x49ef0f=!![]);_0xef41d2[_0xa6540(0x1ba)]&&(_0x30c137['timezone']=_0xef41d2[_0xa6540(0x1ba)],_0x49ef0f=!![]);_0x49ef0f&&(_0x59c231[_0xa6540(0x257)]=_0x30c137);(_0xef41d2[_0xa6540(0x1f5)]&&_0xef41d2[_0xa6540(0x1f5)]['length']>0x0||_0xef41d2[_0xa6540(0x20a)]&&_0xef41d2[_0xa6540(0x20a)]['length']>0x0)&&(_0x59c231[_0xa6540(0x1d8)]={},_0xef41d2[_0xa6540(0x1f5)]&&_0xef41d2['notifyOn'][_0xa6540(0x24c)]>0x0&&(_0x59c231[_0xa6540(0x1d8)][_0xa6540(0x236)]=_0xef41d2[_0xa6540(0x1f5)]),_0xef41d2[_0xa6540(0x20a)]&&_0xef41d2['emailRecipients'][_0xa6540(0x24c)]>0x0&&(_0x59c231[_0xa6540(0x1d8)][_0xa6540(0x212)]=_0xef41d2[_0xa6540(0x20a)][_0xa6540(0x23d)](_0x2777a1=>{const _0x353b2e=_0xa6540,_0x4d8861=_0x332ea5?.[_0x353b2e(0x202)](_0x2777a1);return _0x4d8861??String(_0x2777a1);})));_0xef41d2[_0xa6540(0x24d)]&&Object[_0xa6540(0x1d4)](_0xef41d2['connectorConfig'])[_0xa6540(0x24c)]>0x0&&(_0x59c231[_0xa6540(0x25a)]=normalizeConnectorConfigForYaml(_0xef41d2[_0xa6540(0x24d)]));_0xef41d2[_0xa6540(0x248)]&&(_0x59c231[_0xa6540(0x273)]=_0xef41d2[_0xa6540(0x248)]);if(_0xef41d2[_0xa6540(0x1e6)]&&_0xef41d2[_0xa6540(0x1e6)][_0xa6540(0x24c)]>0x0){const _0x5c8095=behaviorsApiToDef(_0xef41d2[_0xa6540(0x1e6)]);_0x5c8095['length']>0x0&&(_0x59c231[_0xa6540(0x220)]=_0x5c8095);}return _0x59c231;}export function segmentWithActivationsToYaml(_0x9cc006,_0x5caf32,_0x50f6b9,_0x22c2d4,_0x4fcad6){const _0x4b2a93=a193_0x389ba7,_0x1539c0=segmentResponseToDefSync(_0x9cc006,_0x50f6b9);return _0x5caf32[_0x4b2a93(0x24c)]>0x0&&(_0x1539c0[_0x4b2a93(0x1fd)]=_0x5caf32['map'](_0x184ffd=>activationResponseToDef(_0x184ffd,_0x22c2d4,_0x4fcad6))),_0x1539c0;}function normalizeColumn(_0x12fef1){const _0x2229e2=a193_0x389ba7;if(typeof _0x12fef1===_0x2229e2(0x1df))return{'column':_0x12fef1,'source':{'column':_0x12fef1}};return{'column':_0x12fef1['name'],'source':{'column':_0x12fef1[_0x2229e2(0x1bb)]},..._0x12fef1[_0x2229e2(0x26e)]&&{'type':_0x12fef1[_0x2229e2(0x26e)]},..._0x12fef1[_0x2229e2(0x22a)]&&{'visibility':_0x12fef1[_0x2229e2(0x22a)]}};}function behaviorDefToApi(_0x4d39d2){const _0x578434=a193_0x389ba7,_0x250c57={};if(_0x4d39d2[_0x578434(0x249)]&&_0x4d39d2[_0x578434(0x249)][_0x578434(0x24c)]>0x0){const _0x46d13d=_0x4d39d2[_0x578434(0x249)]['filter'](_0x4833d6=>typeof _0x4833d6===_0x578434(0x1df)?_0x4833d6:_0x4833d6[_0x578434(0x1bb)])[_0x578434(0x23d)](normalizeColumn);_0x46d13d[_0x578434(0x24c)]>0x0&&(_0x250c57[_0x578434(0x249)]=_0x46d13d);}_0x4d39d2[_0x578434(0x1e7)]&&(_0x250c57[_0x578434(0x268)]=_0x4d39d2['behavior_table']);_0x4d39d2[_0x578434(0x1ea)]&&(_0x250c57['joinStrategy']=_0x4d39d2[_0x578434(0x1ea)]);if(_0x4d39d2[_0x578434(0x247)]!==undefined)_0x250c57['joinRow']=_0x4d39d2[_0x578434(0x247)];else{if(_0x4d39d2[_0x578434(0x1ea)]===_0x578434(0x252)||_0x4d39d2[_0x578434(0x1ea)]===_0x578434(0x251))_0x250c57[_0x578434(0x1c0)]=0x1;else _0x4d39d2[_0x578434(0x1ea)]===_0x578434(0x209)&&(_0x250c57[_0x578434(0x1c0)]=null);}return _0x4d39d2['formatting']&&(_0x250c57[_0x578434(0x1f4)]=_0x4d39d2[_0x578434(0x1f4)]),_0x4d39d2[_0x578434(0x246)]&&(_0x250c57[_0x578434(0x26a)]=_0x4d39d2['order_by']),_0x250c57;}export async function activationDefToCreateRequest(_0x5ba9d6,_0x36f06f){const _0x353f80=a193_0x389ba7,_0x232c91=_0x36f06f?.['emailToIdMap'],_0x1f3dec=_0x36f06f?.[_0x353f80(0x1da)],_0x3a9650=_0x5ba9d6[_0x353f80(0x25e)];let _0x50e7f5;const _0x261cba=parseInt(_0x3a9650,0xa);if(!isNaN(_0x261cba)&&String(_0x261cba)===_0x3a9650)_0x50e7f5=_0x261cba;else{const _0x200784=_0x1f3dec?.[_0x353f80(0x202)](_0x3a9650);if(_0x200784===undefined)throw new SDKError(ErrorCode[_0x353f80(0x1ef)],_0x353f80(0x258)+_0x3a9650,undefined,{'helpText':'Use\x20\x27tdx\x20connections\x27\x20to\x20list\x20available\x20connections'});_0x50e7f5=_0x200784;}const _0x15866b={'name':_0x5ba9d6[_0x353f80(0x1bb)],'connectionId':_0x50e7f5};_0x5ba9d6[_0x353f80(0x278)]&&(_0x15866b['description']=_0x5ba9d6[_0x353f80(0x278)]);let _0x87b400=[];_0x5ba9d6[_0x353f80(0x249)]&&_0x5ba9d6['columns']['length']>0x0&&(_0x87b400=_0x5ba9d6[_0x353f80(0x249)][_0x353f80(0x1c8)](_0x581ef8=>_0x581ef8!=null)[_0x353f80(0x23d)](normalizeColumn));_0x87b400[_0x353f80(0x24c)]>0x0&&(_0x15866b['columns']=_0x87b400);_0x5ba9d6[_0x353f80(0x23c)]!==undefined&&(_0x5ba9d6[_0x353f80(0x23c)]===![]&&_0x87b400[_0x353f80(0x24c)]===0x0?_0x15866b[_0x353f80(0x1e5)]=!![]:_0x15866b[_0x353f80(0x1e5)]=_0x5ba9d6[_0x353f80(0x23c)]);if(_0x5ba9d6['schedule']){const _0x43c335=_0x5ba9d6[_0x353f80(0x257)],_0x50ee8c=_0x43c335[_0x353f80(0x26e)]??REPEAT_UNIT_TO_SCHEDULE_TYPE[_0x43c335[_0x353f80(0x1fc)]];_0x50ee8c&&(_0x15866b[_0x353f80(0x223)]=_0x50ee8c);const _0x5d72f6=_0x43c335[_0x353f80(0x1fc)]??SCHEDULE_TYPE_TO_REPEAT_UNIT[_0x43c335[_0x353f80(0x26e)]];_0x5d72f6&&(_0x15866b[_0x353f80(0x20e)]=_0x5d72f6);_0x43c335[_0x353f80(0x216)]!==undefined&&(_0x15866b[_0x353f80(0x22f)]=_0x43c335['repeat_frequency']);_0x43c335[_0x353f80(0x239)]&&(_0x15866b[_0x353f80(0x26f)]=_0x43c335['repeat_sub_frequency']);_0x43c335[_0x353f80(0x1bc)]!==undefined&&(_0x15866b['startAt']=_0x43c335[_0x353f80(0x1bc)]);_0x43c335[_0x353f80(0x21a)]!==undefined&&(_0x15866b[_0x353f80(0x1c1)]=_0x43c335['end_on']);_0x43c335[_0x353f80(0x1ba)]&&(_0x15866b[_0x353f80(0x1ba)]=_0x43c335[_0x353f80(0x1ba)]);if(_0x50ee8c&&_0x50ee8c!==_0x353f80(0x1eb)&&_0x50ee8c!==_0x353f80(0x1d1)&&_0x43c335[_0x353f80(0x1bc)]){const _0x41f8c9=_0x43c335[_0x353f80(0x1bc)][_0x353f80(0x20b)](/T(\d{2}:\d{2})/);_0x41f8c9&&(_0x15866b[_0x353f80(0x222)]=_0x41f8c9[0x1]);}}_0x5ba9d6['notification']&&(_0x5ba9d6[_0x353f80(0x1d8)]['notify_on']&&(_0x15866b[_0x353f80(0x1f5)]=_0x5ba9d6[_0x353f80(0x1d8)][_0x353f80(0x236)]),_0x5ba9d6[_0x353f80(0x1d8)][_0x353f80(0x212)]&&(_0x15866b[_0x353f80(0x20a)]=_0x5ba9d6[_0x353f80(0x1d8)][_0x353f80(0x212)][_0x353f80(0x23d)](_0x784dd2=>{const _0x2fa1c5=_0x353f80,_0x4236b9=Number(_0x784dd2);if(!isNaN(_0x4236b9)&&String(_0x4236b9)===_0x784dd2)return _0x4236b9;const _0x3b6404=_0x232c91?.[_0x2fa1c5(0x202)](_0x784dd2[_0x2fa1c5(0x20f)]());if(_0x3b6404===undefined)throw new SDKError(ErrorCode[_0x2fa1c5(0x264)],_0x2fa1c5(0x1bd)+_0x784dd2+_0x2fa1c5(0x266));return _0x3b6404;})));if(_0x5ba9d6[_0x353f80(0x25a)]){const _0x21c31c=_0x36f06f?.[_0x353f80(0x1f8)]?.['get'](_0x3a9650);_0x15866b[_0x353f80(0x24d)]=_0x5ba9d6[_0x353f80(0x25a)];if(_0x21c31c&&_0x36f06f?.[_0x353f80(0x207)]){let _0x43835d;try{_0x43835d=await _0x36f06f['getSchema'](_0x21c31c);const _0xa82101=validateConnectorConfig(_0x5ba9d6[_0x353f80(0x25a)],_0x43835d);if(!_0xa82101[_0x353f80(0x1ee)])throw new SDKError(ErrorCode[_0x353f80(0x253)],_0x353f80(0x206)+_0x5ba9d6['name']+'\x22:\x0a'+formatValidationErrors(_0xa82101['errors']),undefined,{'helpText':_0x353f80(0x1c5)+_0x21c31c+'\x0a\x0aAvailable\x20fields:\x0a'+formatSchemaAsHelp(_0x43835d)});if(_0xa82101[_0x353f80(0x1f2)]['length']>0x0){const _0x499532=formatValidationWarnings(_0xa82101[_0x353f80(0x1f2)]);console[_0x353f80(0x1c7)]('connector_config\x20for\x20activation\x20\x22'+_0x5ba9d6[_0x353f80(0x1bb)]+_0x353f80(0x265)+_0x499532);}}catch(_0x40461f){if(!(_0x40461f instanceof SDKError)||_0x40461f['code']!==ErrorCode['CONNECTOR_SCHEMA_NOT_FOUND'])throw _0x40461f;}if(_0x43835d&&getLegacySettingsField(_0x43835d)){if(!_0x36f06f?.[_0x353f80(0x218)])throw new SDKError(ErrorCode[_0x353f80(0x1ce)],_0x353f80(0x219)+_0x5ba9d6[_0x353f80(0x1bb)]+_0x353f80(0x23b)+('\x22'+_0x21c31c+'\x22\x20is\x20a\x20legacy-style\x20connector,\x20but\x20the\x20activation\x20context\x20')+_0x353f80(0x1b9));const _0x4dbd9a=await _0x36f06f[_0x353f80(0x218)](_0x21c31c);_0x15866b['connectorConfig']=transformConfigToLegacy(_0x5ba9d6[_0x353f80(0x25a)],_0x4dbd9a);}}}else _0x15866b['connectorConfig']={};_0x5ba9d6[_0x353f80(0x273)]!==undefined&&(_0x15866b['activationTemplateId']=_0x5ba9d6[_0x353f80(0x273)]);if(_0x5ba9d6['behaviors'])_0x15866b[_0x353f80(0x1e6)]=_0x5ba9d6[_0x353f80(0x220)][_0x353f80(0x23d)](behaviorDefToApi);else _0x5ba9d6[_0x353f80(0x26b)]&&(_0x15866b[_0x353f80(0x21b)]=behaviorDefToApi(_0x5ba9d6[_0x353f80(0x26b)]));return _0x5ba9d6[_0x353f80(0x200)]&&(_0x15866b[_0x353f80(0x1d7)]=_0x5ba9d6[_0x353f80(0x200)]),_0x5ba9d6[_0x353f80(0x23a)]&&(_0x15866b[_0x353f80(0x267)]=_0x5ba9d6[_0x353f80(0x23a)]),_0x5ba9d6[_0x353f80(0x227)]!==undefined&&(_0x15866b[_0x353f80(0x235)]=_0x5ba9d6[_0x353f80(0x227)]),_0x15866b;}export async function activationDefToUpdateRequest(_0x33ab2b,_0x374db3){return activationDefToCreateRequest(_0x33ab2b,_0x374db3);}export function deepSortObject(_0xff322f){const _0x368b13=a193_0x389ba7;if(_0xff322f===null||typeof _0xff322f!==_0x368b13(0x260))return _0xff322f;if(Array[_0x368b13(0x1c4)](_0xff322f))return _0xff322f[_0x368b13(0x23d)](deepSortObject)['sort']((_0x11e749,_0x3b332f)=>JSON[_0x368b13(0x211)](_0x11e749)[_0x368b13(0x22b)](JSON[_0x368b13(0x211)](_0x3b332f)));const _0x5c7633=_0xff322f;if(_0x5c7633[_0x368b13(0x26e)]===_0x368b13(0x1ca)&&Array[_0x368b13(0x1c4)](_0x5c7633[_0x368b13(0x1be)])){const _0x5e8a44={};for(const _0x405c1b of Object[_0x368b13(0x1d4)](_0x5c7633)[_0x368b13(0x1f9)]()){_0x5e8a44[_0x405c1b]=_0x405c1b===_0x368b13(0x1be)?_0x5c7633['conditions'][_0x368b13(0x23d)](deepSortObject):deepSortObject(_0x5c7633[_0x405c1b]);}return _0x5e8a44;}const _0x2f1c7a={};for(const _0xeda6c7 of Object[_0x368b13(0x1d4)](_0xff322f)[_0x368b13(0x1f9)]()){_0x2f1c7a[_0xeda6c7]=deepSortObject(_0xff322f[_0xeda6c7]);}return _0x2f1c7a;}export function serializeRule(_0x3ddeea){return JSON['stringify'](deepSortObject(_0x3ddeea));}export function normalizeRuleForMatching(_0x401d77){return normalizeConditionsForMatching(_0x401d77);}function normalizeConditionsForMatching(_0x3b67a6){const _0x434762=a193_0x389ba7;if(_0x3b67a6===null||typeof _0x3b67a6!=='object')return _0x3b67a6;if(Array[_0x434762(0x1c4)](_0x3b67a6))return _0x3b67a6['map'](normalizeConditionsForMatching);const _0x106356=_0x3b67a6;if((_0x106356[_0x434762(0x26e)]===_0x434762(0x21d)||_0x106356[_0x434762(0x26e)]==='exclude')&&typeof _0x106356['segment']===_0x434762(0x1df))return{..._0x106356,'segment':_0x434762(0x1f0)};const _0x2d80e0={};for(const _0x126117 of Object[_0x434762(0x1d4)](_0x106356)){_0x2d80e0[_0x126117]=normalizeConditionsForMatching(_0x106356[_0x126117]);}return _0x2d80e0;}export function serializeRuleForMatching(_0x240f25){const _0x155822=a193_0x389ba7;return JSON[_0x155822(0x211)](deepSortObject(normalizeRuleForMatching(_0x240f25)));}export function expandSegmentReferences(_0x407879,_0x3dcae3,_0x48d59b=new Set()){return expandConditions(_0x407879,_0x3dcae3,_0x48d59b);}function expandConditions(_0x2e713f,_0x7e2653,_0x37e36c){const _0x1f2884=a193_0x389ba7;if(_0x2e713f===null||typeof _0x2e713f!==_0x1f2884(0x260))return _0x2e713f;if(Array[_0x1f2884(0x1c4)](_0x2e713f))return _0x2e713f[_0x1f2884(0x23d)](_0x375401=>expandConditions(_0x375401,_0x7e2653,_0x37e36c));const _0x27c173=_0x2e713f;if((_0x27c173['type']==='include'||_0x27c173['type']===_0x1f2884(0x221))&&typeof _0x27c173['segment']==='string'){const _0x52d63d=_0x27c173[_0x1f2884(0x269)],_0x5063ad=_0x7e2653[_0x1f2884(0x202)](_0x52d63d);if(_0x5063ad&&!_0x37e36c[_0x1f2884(0x230)](_0x52d63d)){const _0x5693fa=new Set(_0x37e36c);_0x5693fa['add'](_0x52d63d);const _0x2ba712=expandConditions(_0x5063ad,_0x7e2653,_0x5693fa);return{'type':_0x27c173['type'],'expanded_rule':_0x2ba712};}return{'type':_0x27c173[_0x1f2884(0x26e)],'expanded_rule':_0x1f2884(0x24b)};}const _0x50e65e={};for(const _0x3a8246 of Object[_0x1f2884(0x1d4)](_0x27c173)){_0x50e65e[_0x3a8246]=expandConditions(_0x27c173[_0x3a8246],_0x7e2653,_0x37e36c);}return _0x50e65e;}export function serializeExpandedRule(_0x10aaac,_0x2ccfb7){const _0x51b5be=a193_0x389ba7,_0x998ef1=expandSegmentReferences(_0x10aaac,_0x2ccfb7);return JSON[_0x51b5be(0x211)](deepSortObject(_0x998ef1));}export function createSegmentNameContext(_0x3a69fb){const _0x5cb9f9=a193_0x389ba7,_0x49bdff=new Set(),_0x339efc=new Map(),_0x4670b1=new Map();if(_0x3a69fb)for(const [_0x1f325e,_0x30c81f]of Object[_0x5cb9f9(0x1ec)](_0x3a69fb)){if(_0x30c81f[_0x5cb9f9(0x226)]){const _0xd55e1=serializeRule(_0x30c81f[_0x5cb9f9(0x226)]);_0x4670b1['set'](_0xd55e1,_0x1f325e),_0x49bdff[_0x5cb9f9(0x1dc)](_0x1f325e);}}return{'usedNames':_0x49bdff,'ruleHashToName':_0x339efc,'localRuleToName':_0x3a69fb?_0x4670b1:undefined};}export function resolveSegmentName(_0x5ca453,_0x557051,_0x58d185,_0x104c04){const _0x245bce=a193_0x389ba7,_0x372d1b=serializeRule(_0x557051);if(_0x58d185[_0x245bce(0x1fe)]){const _0x37c9eb=_0x58d185[_0x245bce(0x1fe)][_0x245bce(0x202)](_0x372d1b);if(_0x37c9eb)return{'name':_0x37c9eb,'isDuplicate':![],'isLocalMatch':!![]};}const _0x28325b=_0x58d185[_0x245bce(0x26c)][_0x245bce(0x202)](_0x372d1b);if(_0x28325b)return{'name':_0x28325b,'isDuplicate':!![],'isLocalMatch':![]};const _0x11bb31=_0x104c04(_0x5ca453);let _0x54b94f=_0x11bb31||_0x5ca453,_0x1fb424=_0x54b94f,_0x4c0331=0x2;while(_0x58d185[_0x245bce(0x1e8)][_0x245bce(0x230)](_0x1fb424)){_0x1fb424=_0x54b94f+'_'+_0x4c0331,_0x4c0331++;}return _0x58d185['usedNames'][_0x245bce(0x1dc)](_0x1fb424),_0x58d185['ruleHashToName'][_0x245bce(0x229)](_0x372d1b,_0x1fb424),{'name':_0x1fb424,'isDuplicate':![],'isLocalMatch':![]};}export function collectSegmentRefsFromRule(_0x557368){const _0x45bd43=[],_0x51431a=_0x2ffeb6=>{const _0x2ac6d3=a193_0xb32c;if(!_0x2ffeb6||typeof _0x2ffeb6!=='object')return;if(Array[_0x2ac6d3(0x1c4)](_0x2ffeb6)){_0x2ffeb6[_0x2ac6d3(0x234)](_0x51431a);return;}const _0x2a7bb7=_0x2ffeb6;(_0x2a7bb7['type']===_0x2ac6d3(0x21d)||_0x2a7bb7[_0x2ac6d3(0x26e)]===_0x2ac6d3(0x221))&&typeof _0x2a7bb7[_0x2ac6d3(0x269)]===_0x2ac6d3(0x1df)&&_0x45bd43[_0x2ac6d3(0x23e)](_0x2a7bb7[_0x2ac6d3(0x269)]);for(const _0xfde5a4 of Object[_0x2ac6d3(0x215)](_0x2a7bb7)){_0x51431a(_0xfde5a4);}};return _0x51431a(_0x557368),_0x45bd43;}export function validateSegmentRule(_0x11da09,_0x279ce7){const _0x2e3277=a193_0x389ba7;if(!_0x279ce7||!_0x279ce7[_0x2e3277(0x1be)])return;for(let _0x4d84b5=0x0;_0x4d84b5<_0x279ce7[_0x2e3277(0x1be)][_0x2e3277(0x24c)];_0x4d84b5++){const _0x2f2e38=_0x279ce7[_0x2e3277(0x1be)][_0x4d84b5];if('type'in _0x2f2e38&&_0x2f2e38['type']===_0x2e3277(0x208)){const _0x1da3d3=_0x2f2e38,_0x30b82b=_0x1da3d3[_0x2e3277(0x1fb)]||_0x1da3d3['aggregation'];if((!_0x1da3d3[_0x2e3277(0x24f)]||_0x1da3d3[_0x2e3277(0x24f)]==='')&&!_0x30b82b)throw new SDKError(ErrorCode[_0x2e3277(0x1dd)],_0x2e3277(0x271)+_0x11da09+_0x2e3277(0x25b)+(_0x2e3277(0x25c)+_0x4d84b5+'].attribute\x20cannot\x20be\x20empty.\x0a')+'Please\x20specify\x20a\x20valid\x20attribute\x20name.');}}}
@@ -1 +1 @@
1
- (function(_0x3e8c2e,_0x37d8b4){const _0x474f69=a194_0x23d8,_0x23dba3=_0x3e8c2e();while(!![]){try{const _0x120e59=parseInt(_0x474f69(0x90))/0x1*(-parseInt(_0x474f69(0x6c))/0x2)+parseInt(_0x474f69(0x7e))/0x3*(parseInt(_0x474f69(0x9e))/0x4)+-parseInt(_0x474f69(0x6b))/0x5+-parseInt(_0x474f69(0x6e))/0x6*(-parseInt(_0x474f69(0x94))/0x7)+parseInt(_0x474f69(0x67))/0x8+parseInt(_0x474f69(0x80))/0x9*(-parseInt(_0x474f69(0x65))/0xa)+parseInt(_0x474f69(0x69))/0xb;if(_0x120e59===_0x37d8b4)break;else _0x23dba3['push'](_0x23dba3['shift']());}catch(_0x3fa847){_0x23dba3['push'](_0x23dba3['shift']());}}}(a194_0xe494,0xbbe72));import a194_0x4ec558 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';function a194_0xe494(){const _0x4ce244=['setJobId','extra','dim','parentTableName','null','Schema\x20query:\x0a','129ntjRHh','push','5636151xfpVGt','replace','behavior','behaviorName','matrixTableName','name','Unknown','length','trim','YES','error','displayName','type','Fetching\x20schema...','matrixColumnName','SELECT\x20*\x20FROM\x20(\x0a','13URILlh','column_name','verbose','key','7tDRKjG','attribute','some','source','\x20\x20\x20\x20','cyan','fields','parentColumn','sort','entries','102916HZfKeZ','filter','10xYmvGG','query','8316248tgreSC','columns','1013650uAftDZ','tableName','6806880oVPjGV','17828MfcdSf','set','3810714AAIKAi','default','Attributes','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.','execute','varchar','localeCompare','Behaviors','data','bold'];a194_0xe494=function(){return _0x4ce244;};return a194_0xe494();}export function buildSchemaResult(_0x187c47){const _0x4b3d0c=a194_0x23d8,_0x54c991=_0x187c47[_0x4b3d0c(0x68)]['map'](_0x3cdfca=>({'column_name':_0x3cdfca[_0x4b3d0c(0x85)],'column_type':_0x3cdfca['type'],'null':_0x4b3d0c(0x89),'key':null,'default':null,'extra':null}));return{..._0x187c47,'columns':[{'name':_0x4b3d0c(0x91),'type':_0x4b3d0c(0x73)},{'name':'column_type','type':'varchar'},{'name':_0x4b3d0c(0x7c),'type':'varchar'},{'name':_0x4b3d0c(0x93),'type':_0x4b3d0c(0x73)},{'name':_0x4b3d0c(0x6f),'type':_0x4b3d0c(0x73)},{'name':_0x4b3d0c(0x79),'type':_0x4b3d0c(0x73)}],'data':_0x54c991};}export async function executeSchemaQuery(_0x3b75bc,_0x5ddc1a,_0x1a949c){const _0x52ef6f=a194_0x23d8,_0x44fbf2=_0x3b75bc[_0x52ef6f(0x88)]()[_0x52ef6f(0x81)](/;+$/,''),_0x558b0a=_0x52ef6f(0x8f)+_0x44fbf2+'\x0a)\x20AS\x20segment_query\x20LIMIT\x200';_0x1a949c[_0x52ef6f(0x92)]&&console[_0x52ef6f(0x8a)](_0x52ef6f(0x7d)+_0x558b0a);const _0x1050ac=await withProgressSpinner(_0x52ef6f(0x8d),async _0xa4ce9b=>{const _0x4655ec=_0x52ef6f,_0x232519=await _0x5ddc1a[_0x4655ec(0x66)][_0x4655ec(0x72)](_0x558b0a,{'catalog':'td','schema':'information_schema','onJobId':_0x8ca52d=>{const _0x5353cf=_0x4655ec;_0xa4ce9b[_0x5353cf(0x78)](_0x8ca52d);}});return _0x232519;},{'verbose':_0x1a949c[_0x52ef6f(0x92)]});return buildSchemaResult(_0x1050ac[_0x52ef6f(0x76)]);}function columnName(_0x3fbbe2){const _0x18be4d=a194_0x23d8;return _0x3fbbe2['matrixColumnName']||_0x3fbbe2[_0x18be4d(0x9b)]||_0x3fbbe2[_0x18be4d(0x85)];}function formatFieldLine(_0x2ea079,_0x144849,_0x2e656a){const _0x126ecf=a194_0x23d8,_0x17e247=_0x2ea079!==_0x144849?'\x20'+a194_0x4ec558[_0x126ecf(0x7a)]('('+_0x144849+')'):'';return _0x126ecf(0x98)+_0x2ea079+_0x17e247+':\x20'+a194_0x4ec558[_0x126ecf(0x99)](_0x2e656a);}function sortByColumnName(_0x5da44e){const _0x3d11c8=a194_0x23d8;return[..._0x5da44e][_0x3d11c8(0x9c)]((_0x1b3c79,_0x2fbb99)=>columnName(_0x1b3c79)[_0x3d11c8(0x74)](columnName(_0x2fbb99)));}function a194_0x23d8(_0x558d52,_0x277df3){_0x558d52=_0x558d52-0x65;const _0xe494af=a194_0xe494();let _0x23d856=_0xe494af[_0x558d52];return _0x23d856;}export function displayFieldsHumanReadable(_0x23e55a,_0x37033d){const _0x5e9a0f=a194_0x23d8,_0x1ffd26=_0x23e55a[_0x5e9a0f(0x9f)](_0x4e001e=>_0x4e001e[_0x5e9a0f(0x97)]===_0x5e9a0f(0x95)),_0x2baa12=_0x23e55a[_0x5e9a0f(0x9f)](_0x324eaa=>_0x324eaa['source']===_0x5e9a0f(0x82)),_0x592ee7=new Map();for(const _0x2e3dcd of _0x1ffd26){const _0x3a215e=_0x2e3dcd['groupingName']||_0x2e3dcd[_0x5e9a0f(0x7b)]||_0x5e9a0f(0x86),_0x46cbf0=_0x592ee7['get'](_0x3a215e);_0x46cbf0?_0x46cbf0['fields']['push'](_0x2e3dcd):_0x592ee7[_0x5e9a0f(0x6d)](_0x3a215e,{'displayName':_0x3a215e,'tableName':_0x2e3dcd[_0x5e9a0f(0x7b)],'fields':[_0x2e3dcd]});}const _0x1db9ca=new Map();for(const _0x1be816 of _0x2baa12){const _0x37b41d=_0x1be816[_0x5e9a0f(0x83)]||_0x5e9a0f(0x86),_0x3ab807=_0x1db9ca['get'](_0x37b41d)||[];_0x3ab807[_0x5e9a0f(0x7f)](_0x1be816),_0x1db9ca[_0x5e9a0f(0x6d)](_0x37b41d,_0x3ab807);}console[_0x5e9a0f(0x8a)]('\x0a'+a194_0x4ec558[_0x5e9a0f(0x77)](_0x37033d));if(_0x592ee7['size']>0x0){console[_0x5e9a0f(0x8a)]('\x0a'+a194_0x4ec558[_0x5e9a0f(0x7a)](_0x5e9a0f(0x70)));const _0x3e5f28=[..._0x592ee7['entries']()][_0x5e9a0f(0x9c)]((_0x24fdf7,_0x50860b)=>_0x24fdf7[0x0][_0x5e9a0f(0x74)](_0x50860b[0x0]));for(const [,_0x4ad493]of _0x3e5f28){const _0x1e3524=_0x4ad493['tableName']&&_0x4ad493[_0x5e9a0f(0x6a)]!==_0x4ad493[_0x5e9a0f(0x8b)]?'\x20'+a194_0x4ec558[_0x5e9a0f(0x7a)]('('+_0x4ad493[_0x5e9a0f(0x6a)]+')'):'';console[_0x5e9a0f(0x8a)]('\x20\x20'+a194_0x4ec558[_0x5e9a0f(0x77)](_0x4ad493['displayName'])+_0x1e3524);for(const _0x36e76f of sortByColumnName(_0x4ad493[_0x5e9a0f(0x9a)])){console[_0x5e9a0f(0x8a)](formatFieldLine(columnName(_0x36e76f),_0x36e76f[_0x5e9a0f(0x85)],_0x36e76f[_0x5e9a0f(0x8c)]));}}}if(_0x1db9ca['size']>0x0){console[_0x5e9a0f(0x8a)]('\x0a'+a194_0x4ec558[_0x5e9a0f(0x7a)](_0x5e9a0f(0x75)));const _0x2ccc3a=[..._0x1db9ca[_0x5e9a0f(0x9d)]()][_0x5e9a0f(0x9c)]((_0x1969bb,_0x3e7353)=>_0x1969bb[0x0][_0x5e9a0f(0x74)](_0x3e7353[0x0]));for(const [_0x456c8e,_0x1a5724]of _0x2ccc3a){const _0x3f45f3=_0x1a5724[0x0],_0x345769=_0x3f45f3?.[_0x5e9a0f(0x84)];if(_0x345769){const _0x4c9700=_0x345769!==_0x456c8e?'\x20'+a194_0x4ec558[_0x5e9a0f(0x7a)]('('+_0x456c8e+')'):'';console['error']('\x20\x20'+a194_0x4ec558[_0x5e9a0f(0x77)](_0x345769)+_0x4c9700);}else{const _0x19db19=_0x3f45f3?.[_0x5e9a0f(0x7b)]||'';console[_0x5e9a0f(0x8a)]('\x20\x20'+a194_0x4ec558['bold'](_0x456c8e)+(_0x19db19?'\x20'+a194_0x4ec558[_0x5e9a0f(0x7a)]('('+_0x19db19+')'):''));}for(const _0x377730 of sortByColumnName(_0x1a5724)){const _0x281473=_0x377730['name']['startsWith'](_0x456c8e+'.')?_0x377730['name']['slice'](_0x456c8e[_0x5e9a0f(0x87)]+0x1):_0x377730[_0x5e9a0f(0x85)];console[_0x5e9a0f(0x8a)](formatFieldLine(columnName(_0x377730),_0x281473,_0x377730['type']));}}}const _0x2778e2=_0x23e55a[_0x5e9a0f(0x96)](_0x348bd1=>_0x348bd1[_0x5e9a0f(0x8e)]||_0x348bd1[_0x5e9a0f(0x84)]);_0x2778e2&&(console[_0x5e9a0f(0x8a)]('\x0a'+a194_0x4ec558[_0x5e9a0f(0x7a)]('Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).')),console[_0x5e9a0f(0x8a)](a194_0x4ec558[_0x5e9a0f(0x7a)](_0x5e9a0f(0x71)))),console[_0x5e9a0f(0x8a)]('');}
1
+ (function(_0x51ff55,_0x13f6bf){const _0xc967f9=a194_0x14a3,_0x1a534a=_0x51ff55();while(!![]){try{const _0x22cb66=-parseInt(_0xc967f9(0x19e))/0x1+parseInt(_0xc967f9(0x1ae))/0x2+parseInt(_0xc967f9(0x1a5))/0x3*(-parseInt(_0xc967f9(0x1b1))/0x4)+parseInt(_0xc967f9(0x1b2))/0x5*(parseInt(_0xc967f9(0x1be))/0x6)+-parseInt(_0xc967f9(0x1ca))/0x7+parseInt(_0xc967f9(0x1c1))/0x8*(-parseInt(_0xc967f9(0x1b9))/0x9)+-parseInt(_0xc967f9(0x1cd))/0xa*(-parseInt(_0xc967f9(0x1c7))/0xb);if(_0x22cb66===_0x13f6bf)break;else _0x1a534a['push'](_0x1a534a['shift']());}catch(_0x5cf993){_0x1a534a['push'](_0x1a534a['shift']());}}}(a194_0x385c,0xb4f9c));function a194_0x14a3(_0x921e07,_0x9149ff){_0x921e07=_0x921e07-0x19b;const _0x385c25=a194_0x385c();let _0x14a397=_0x385c25[_0x921e07];return _0x14a397;}import a194_0x1a0d83 from'chalk';import{withProgressSpinner}from'../../utils/spinner.js';export function buildSchemaResult(_0x52c5f9){const _0x15b03a=a194_0x14a3,_0x583eda=_0x52c5f9[_0x15b03a(0x1ba)][_0x15b03a(0x1bd)](_0x322c1f=>({'column_name':_0x322c1f[_0x15b03a(0x19f)],'column_type':_0x322c1f[_0x15b03a(0x1b7)],'null':'YES','key':null,'default':null,'extra':null}));return{..._0x52c5f9,'columns':[{'name':_0x15b03a(0x1d2),'type':'varchar'},{'name':'column_type','type':_0x15b03a(0x1b4)},{'name':_0x15b03a(0x1ad),'type':_0x15b03a(0x1b4)},{'name':_0x15b03a(0x1c5),'type':_0x15b03a(0x1b4)},{'name':_0x15b03a(0x1cc),'type':_0x15b03a(0x1b4)},{'name':'extra','type':'varchar'}],'data':_0x583eda};}export async function executeSchemaQuery(_0x5c78eb,_0x8662d6,_0xb29d04){const _0x1f807a=a194_0x14a3,_0x2a9b27=_0x5c78eb[_0x1f807a(0x1d5)]()[_0x1f807a(0x1d3)](/;+$/,''),_0x1aa614=_0x1f807a(0x1d4)+_0x2a9b27+'\x0a)\x20AS\x20segment_query\x20LIMIT\x200';_0xb29d04[_0x1f807a(0x1c4)]&&console[_0x1f807a(0x1b5)]('Schema\x20query:\x0a'+_0x1aa614);const _0x2bae95=await withProgressSpinner(_0x1f807a(0x1bc),async _0x14470e=>{const _0x3c4f96=_0x1f807a,_0x3779db=await _0x8662d6[_0x3c4f96(0x19c)][_0x3c4f96(0x19d)](_0x1aa614,{'catalog':'td','schema':_0x3c4f96(0x1ab),'onJobId':_0x470fb4=>{const _0x2a18bb=_0x3c4f96;_0x14470e[_0x2a18bb(0x1a9)](_0x470fb4);}});return _0x3779db;},{'verbose':_0xb29d04['verbose']});return buildSchemaResult(_0x2bae95[_0x1f807a(0x1b8)]);}function columnName(_0xc2e7c2){const _0x3a8afc=a194_0x14a3;return _0xc2e7c2['matrixColumnName']||_0xc2e7c2[_0x3a8afc(0x1a8)]||_0xc2e7c2['name'];}function a194_0x385c(){const _0x2bffae=['behavior','behaviorName','9IaJjbu','bold','sort','parentColumn','setJobId','Behaviors','information_schema','set','null','1813050tTuUlf','push','fields','188652FQBBtu','50GczXiy','source','varchar','error','get','type','data','6127515lNzLSA','columns','some','Fetching\x20schema...','map','517632PDkTlV','cyan','matrixTableName','8YMwznq','size','Unknown','verbose','key','matrixColumnName','209CBtCWY','displayName','groupingName','4718987rtFWit','\x20\x20\x20\x20','default','459220WOgxOP','localeCompare','tableName','slice','dim','column_name','replace','SELECT\x20*\x20FROM\x20(\x0a','trim','Tip:\x20Names\x20shown\x20are\x20column\x20names\x20for\x20segment\x20YAML\x20(attribute/source).','query','execute','404022RsFasD','name','entries','parentTableName','\x20\x20\x20\x20\x20Display\x20names\x20in\x20()\x20are\x20for\x20console\x20reference\x20only.'];a194_0x385c=function(){return _0x2bffae;};return a194_0x385c();}function formatFieldLine(_0x2168b6,_0x3ee4ce,_0x598ab7){const _0x208cb6=a194_0x14a3,_0x59fa9e=_0x2168b6!==_0x3ee4ce?'\x20'+a194_0x1a0d83[_0x208cb6(0x1d1)]('('+_0x3ee4ce+')'):'';return _0x208cb6(0x1cb)+_0x2168b6+_0x59fa9e+':\x20'+a194_0x1a0d83[_0x208cb6(0x1bf)](_0x598ab7);}function sortByColumnName(_0x3a2105){const _0x189670=a194_0x14a3;return[..._0x3a2105][_0x189670(0x1a7)]((_0x4eb54a,_0x461a86)=>columnName(_0x4eb54a)[_0x189670(0x1ce)](columnName(_0x461a86)));}export function displayFieldsHumanReadable(_0x3644c0,_0x4b23c2){const _0x2b0642=a194_0x14a3,_0x3559a9=_0x3644c0['filter'](_0x288b03=>_0x288b03[_0x2b0642(0x1b3)]==='attribute'),_0x5f49fa=_0x3644c0['filter'](_0xcd5ba3=>_0xcd5ba3[_0x2b0642(0x1b3)]===_0x2b0642(0x1a3)),_0x17ad20=new Map();for(const _0x60b529 of _0x3559a9){const _0x221a94=_0x60b529[_0x2b0642(0x1c9)]||_0x60b529[_0x2b0642(0x1a1)]||_0x2b0642(0x1c3),_0x403401=_0x17ad20[_0x2b0642(0x1b6)](_0x221a94);_0x403401?_0x403401[_0x2b0642(0x1b0)][_0x2b0642(0x1af)](_0x60b529):_0x17ad20[_0x2b0642(0x1ac)](_0x221a94,{'displayName':_0x221a94,'tableName':_0x60b529['parentTableName'],'fields':[_0x60b529]});}const _0x501874=new Map();for(const _0xf96926 of _0x5f49fa){const _0x5943be=_0xf96926[_0x2b0642(0x1a4)]||_0x2b0642(0x1c3),_0x41a514=_0x501874[_0x2b0642(0x1b6)](_0x5943be)||[];_0x41a514[_0x2b0642(0x1af)](_0xf96926),_0x501874[_0x2b0642(0x1ac)](_0x5943be,_0x41a514);}console['error']('\x0a'+a194_0x1a0d83[_0x2b0642(0x1a6)](_0x4b23c2));if(_0x17ad20['size']>0x0){console[_0x2b0642(0x1b5)]('\x0a'+a194_0x1a0d83[_0x2b0642(0x1d1)]('Attributes'));const _0x290fae=[..._0x17ad20[_0x2b0642(0x1a0)]()]['sort']((_0x55fe16,_0x450f89)=>_0x55fe16[0x0][_0x2b0642(0x1ce)](_0x450f89[0x0]));for(const [,_0x42fbab]of _0x290fae){const _0x48968f=_0x42fbab[_0x2b0642(0x1cf)]&&_0x42fbab[_0x2b0642(0x1cf)]!==_0x42fbab[_0x2b0642(0x1c8)]?'\x20'+a194_0x1a0d83[_0x2b0642(0x1d1)]('('+_0x42fbab['tableName']+')'):'';console['error']('\x20\x20'+a194_0x1a0d83[_0x2b0642(0x1a6)](_0x42fbab['displayName'])+_0x48968f);for(const _0x45af22 of sortByColumnName(_0x42fbab['fields'])){console[_0x2b0642(0x1b5)](formatFieldLine(columnName(_0x45af22),_0x45af22['name'],_0x45af22['type']));}}}if(_0x501874[_0x2b0642(0x1c2)]>0x0){console[_0x2b0642(0x1b5)]('\x0a'+a194_0x1a0d83['dim'](_0x2b0642(0x1aa)));const _0x39e6cf=[..._0x501874[_0x2b0642(0x1a0)]()][_0x2b0642(0x1a7)]((_0x1c1289,_0x19b153)=>_0x1c1289[0x0][_0x2b0642(0x1ce)](_0x19b153[0x0]));for(const [_0x2dea74,_0x1b2673]of _0x39e6cf){const _0x3f7521=_0x1b2673[0x0],_0x2a85c7=_0x3f7521?.[_0x2b0642(0x1c0)];if(_0x2a85c7){const _0x306854=_0x2a85c7!==_0x2dea74?'\x20'+a194_0x1a0d83[_0x2b0642(0x1d1)]('('+_0x2dea74+')'):'';console[_0x2b0642(0x1b5)]('\x20\x20'+a194_0x1a0d83[_0x2b0642(0x1a6)](_0x2a85c7)+_0x306854);}else{const _0x1cebd3=_0x3f7521?.['parentTableName']||'';console[_0x2b0642(0x1b5)]('\x20\x20'+a194_0x1a0d83[_0x2b0642(0x1a6)](_0x2dea74)+(_0x1cebd3?'\x20'+a194_0x1a0d83[_0x2b0642(0x1d1)]('('+_0x1cebd3+')'):''));}for(const _0x42355a of sortByColumnName(_0x1b2673)){const _0x462db1=_0x42355a[_0x2b0642(0x19f)]['startsWith'](_0x2dea74+'.')?_0x42355a['name'][_0x2b0642(0x1d0)](_0x2dea74['length']+0x1):_0x42355a[_0x2b0642(0x19f)];console[_0x2b0642(0x1b5)](formatFieldLine(columnName(_0x42355a),_0x462db1,_0x42355a['type']));}}}const _0x5f2a7f=_0x3644c0[_0x2b0642(0x1bb)](_0x39ea73=>_0x39ea73[_0x2b0642(0x1c6)]||_0x39ea73['matrixTableName']);_0x5f2a7f&&(console['error']('\x0a'+a194_0x1a0d83['dim'](_0x2b0642(0x19b))),console[_0x2b0642(0x1b5)](a194_0x1a0d83['dim'](_0x2b0642(0x1a2)))),console[_0x2b0642(0x1b5)]('');}
@@ -1 +1 @@
1
- function a195_0x5106(){const _0x4143d9=['1560635FXcGpL','replace','push','.yaml','605322jYrcBV','isDirectory','map','3190744alQzto','17708540UxfptG','isFile','extname','join','.yml','15942EwQkBQ','550863QwpFMX','6wEAWqk','11IHqkxr','24LvmOTL','endsWith','819ORjwGY','649357xjteTe','name'];a195_0x5106=function(){return _0x4143d9;};return a195_0x5106();}(function(_0x4d48a8,_0x155175){const _0x3c8e6d=a195_0x3740,_0x1790f9=_0x4d48a8();while(!![]){try{const _0x19539a=-parseInt(_0x3c8e6d(0x15f))/0x1+parseInt(_0x3c8e6d(0x170))/0x2*(-parseInt(_0x3c8e6d(0x16f))/0x3)+-parseInt(_0x3c8e6d(0x168))/0x4+parseInt(_0x3c8e6d(0x161))/0x5+-parseInt(_0x3c8e6d(0x16e))/0x6*(-parseInt(_0x3c8e6d(0x174))/0x7)+parseInt(_0x3c8e6d(0x172))/0x8*(parseInt(_0x3c8e6d(0x165))/0x9)+parseInt(_0x3c8e6d(0x169))/0xa*(parseInt(_0x3c8e6d(0x171))/0xb);if(_0x19539a===_0x155175)break;else _0x1790f9['push'](_0x1790f9['shift']());}catch(_0x409f77){_0x1790f9['push'](_0x1790f9['shift']());}}}(a195_0x5106,0x91ed6));function a195_0x3740(_0x593160,_0x221dd7){_0x593160=_0x593160-0x15f;const _0x51067a=a195_0x5106();let _0x3740e8=_0x51067a[_0x593160];return _0x3740e8;}import{readdirSync,statSync}from'fs';import a195_0x97eaf2 from'path';export function findYamlFiles(_0x1fc58d){const _0x8d5487=[];function _0x5ed93c(_0x1679bd){const _0x33bf02=a195_0x3740,_0x418d2e=readdirSync(_0x1679bd,{'withFileTypes':!![]});for(const _0xa7d5eb of _0x418d2e){const _0x10dec2=a195_0x97eaf2[_0x33bf02(0x16c)](_0x1679bd,_0xa7d5eb[_0x33bf02(0x160)]);if(_0xa7d5eb[_0x33bf02(0x166)]())_0x5ed93c(_0x10dec2);else(_0xa7d5eb[_0x33bf02(0x160)][_0x33bf02(0x173)](_0x33bf02(0x16d))||_0xa7d5eb[_0x33bf02(0x160)][_0x33bf02(0x173)](_0x33bf02(0x164)))&&_0x8d5487[_0x33bf02(0x163)](_0x10dec2);}}return _0x5ed93c(_0x1fc58d),_0x8d5487;}export function discoverYamlFiles(_0x47a43a){const _0x227d96=a195_0x3740,_0x386144=findYamlFiles(_0x47a43a);return _0x386144[_0x227d96(0x167)](_0x1d7f77=>{const _0x45e12b=_0x227d96,_0x587f60=a195_0x97eaf2['relative'](_0x47a43a,_0x1d7f77),_0x323836=a195_0x97eaf2['dirname'](_0x587f60);return{'absolutePath':_0x1d7f77,'relativePath':_0x587f60,'folderPath':_0x323836==='.'?'':_0x323836[_0x45e12b(0x162)](/\\/g,'/')};});}export function isYamlFile(_0x1c2435){const _0x487994=a195_0x3740;try{const _0x46ee3f=statSync(_0x1c2435);if(!_0x46ee3f[_0x487994(0x16a)]())return![];const _0x1ad88e=a195_0x97eaf2[_0x487994(0x16b)](_0x1c2435)['toLowerCase']();return _0x1ad88e===_0x487994(0x16d)||_0x1ad88e==='.yaml';}catch{return![];}}
1
+ (function(_0x570185,_0xd67b65){const _0x5f51bf=a195_0xf129,_0x2378a1=_0x570185();while(!![]){try{const _0x36b9b3=parseInt(_0x5f51bf(0x8d))/0x1+-parseInt(_0x5f51bf(0x8a))/0x2*(-parseInt(_0x5f51bf(0x93))/0x3)+parseInt(_0x5f51bf(0x8f))/0x4*(parseInt(_0x5f51bf(0x82))/0x5)+parseInt(_0x5f51bf(0x92))/0x6+-parseInt(_0x5f51bf(0x89))/0x7+parseInt(_0x5f51bf(0x85))/0x8+-parseInt(_0x5f51bf(0x88))/0x9*(parseInt(_0x5f51bf(0x90))/0xa);if(_0x36b9b3===_0xd67b65)break;else _0x2378a1['push'](_0x2378a1['shift']());}catch(_0xfb26ae){_0x2378a1['push'](_0x2378a1['shift']());}}}(a195_0x2103,0x8373a));import{readdirSync,statSync}from'fs';import a195_0x2291ab from'path';export function findYamlFiles(_0x305655){const _0x4fb89c=[];function _0x4b4c35(_0x5e1bf0){const _0x579e8b=a195_0xf129,_0x1fa2d3=readdirSync(_0x5e1bf0,{'withFileTypes':!![]});for(const _0x4575b3 of _0x1fa2d3){const _0x318756=a195_0x2291ab[_0x579e8b(0x8c)](_0x5e1bf0,_0x4575b3['name']);if(_0x4575b3[_0x579e8b(0x87)]())_0x4b4c35(_0x318756);else(_0x4575b3[_0x579e8b(0x94)][_0x579e8b(0x81)](_0x579e8b(0x84))||_0x4575b3['name'][_0x579e8b(0x81)](_0x579e8b(0x83)))&&_0x4fb89c[_0x579e8b(0x8e)](_0x318756);}}return _0x4b4c35(_0x305655),_0x4fb89c;}function a195_0xf129(_0x440a18,_0x1fc0ad){_0x440a18=_0x440a18-0x81;const _0x2103a7=a195_0x2103();let _0xf12933=_0x2103a7[_0x440a18];return _0xf12933;}function a195_0x2103(){const _0x1fb6cd=['7420720PuCjcQ','replace','isDirectory','4428fpHRpz','4118114daQRrC','10NgwSdh','isFile','join','459853QBZEqA','push','4YFuSbk','8810RMmjFs','relative','564156DpEIby','35664HACMBJ','name','endsWith','96355Vrgqaa','.yaml','.yml'];a195_0x2103=function(){return _0x1fb6cd;};return a195_0x2103();}export function discoverYamlFiles(_0x431c43){const _0x31ed50=findYamlFiles(_0x431c43);return _0x31ed50['map'](_0x395286=>{const _0x3c3812=a195_0xf129,_0x3f2585=a195_0x2291ab[_0x3c3812(0x91)](_0x431c43,_0x395286),_0x52b6b5=a195_0x2291ab['dirname'](_0x3f2585);return{'absolutePath':_0x395286,'relativePath':_0x3f2585,'folderPath':_0x52b6b5==='.'?'':_0x52b6b5[_0x3c3812(0x86)](/\\/g,'/')};});}export function isYamlFile(_0x25624c){const _0x1dfdf5=a195_0xf129;try{const _0x491d94=statSync(_0x25624c);if(!_0x491d94[_0x1dfdf5(0x8b)]())return![];const _0x30d5c6=a195_0x2291ab['extname'](_0x25624c)['toLowerCase']();return _0x30d5c6===_0x1dfdf5(0x84)||_0x30d5c6==='.yaml';}catch{return![];}}