@treasuredata/tdx 0.29.2 → 0.29.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 (187) 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.js +1 -1
  5. package/dist/commands/activations.js +1 -1
  6. package/dist/commands/agent-command.js +1 -1
  7. package/dist/commands/agent-test-command.js +1 -1
  8. package/dist/commands/api-command.js +1 -1
  9. package/dist/commands/auth-command.js +1 -1
  10. package/dist/commands/chat-command.js +1 -1
  11. package/dist/commands/claude-command.js +1 -1
  12. package/dist/commands/claude-statusline-command.js +1 -1
  13. package/dist/commands/claude-usage-command.js +1 -1
  14. package/dist/commands/command.js +1 -1
  15. package/dist/commands/connection-command.js +1 -1
  16. package/dist/commands/databases.js +1 -1
  17. package/dist/commands/delivery-command.js +1 -1
  18. package/dist/commands/describe.js +1 -1
  19. package/dist/commands/engage-campaign-pull-command.js +1 -1
  20. package/dist/commands/engage-campaign-push-command.js +1 -1
  21. package/dist/commands/engage-campaign-validate-command.js +1 -1
  22. package/dist/commands/engage-command.js +1 -1
  23. package/dist/commands/job-command.js +1 -1
  24. package/dist/commands/journey-command.js +1 -1
  25. package/dist/commands/journey-validate-command.js +1 -1
  26. package/dist/commands/llm-command.js +1 -1
  27. package/dist/commands/mcp-command.js +1 -1
  28. package/dist/commands/parent-segment-command.js +1 -1
  29. package/dist/commands/profile-command.js +1 -1
  30. package/dist/commands/profiles-command.js +1 -1
  31. package/dist/commands/query-command.js +1 -1
  32. package/dist/commands/schedule-command.js +1 -1
  33. package/dist/commands/segment-command.js +1 -1
  34. package/dist/commands/segment-create-command.js +1 -1
  35. package/dist/commands/segment-fields-command.js +1 -1
  36. package/dist/commands/segment-pull-command.js +1 -1
  37. package/dist/commands/segment-push-command.js +1 -1
  38. package/dist/commands/segment-update-command.js +1 -1
  39. package/dist/commands/segment-use-command.js +1 -1
  40. package/dist/commands/segment-validate-command.js +1 -1
  41. package/dist/commands/segments.js +1 -1
  42. package/dist/commands/show.js +1 -1
  43. package/dist/commands/status-command.js +1 -1
  44. package/dist/commands/tables.js +1 -1
  45. package/dist/commands/unset-command.js +1 -1
  46. package/dist/commands/upgrade-command.js +1 -1
  47. package/dist/commands/use-command.js +1 -1
  48. package/dist/commands/user-command.js +1 -1
  49. package/dist/commands/workflow-command.js +1 -1
  50. package/dist/core/auth.js +1 -1
  51. package/dist/core/command-output.js +1 -1
  52. package/dist/core/config.js +1 -1
  53. package/dist/core/connection-cache.js +1 -1
  54. package/dist/core/constants.js +1 -1
  55. package/dist/core/credential-cache.js +1 -1
  56. package/dist/core/global-context.js +1 -1
  57. package/dist/core/keychain.js +1 -1
  58. package/dist/core/profile.js +1 -1
  59. package/dist/core/project-config.js +1 -1
  60. package/dist/core/session.js +1 -1
  61. package/dist/core/user-cache.js +1 -1
  62. package/dist/core/version.js +1 -1
  63. package/dist/index.js +1 -1
  64. package/dist/mcp/server.js +1 -1
  65. package/dist/mcp/tools/index.js +1 -1
  66. package/dist/mcp/tools/tdx-run.js +1 -1
  67. package/dist/mcp/tools/tdx-search.js +1 -1
  68. package/dist/mcp/utils.js +1 -1
  69. package/dist/proxy/claude-usage-tracker.js +1 -1
  70. package/dist/proxy/passthrough-server.js +1 -1
  71. package/dist/proxy/sse-usage-parser.js +1 -1
  72. package/dist/sdk/agent/agent-config.js +1 -1
  73. package/dist/sdk/agent/agent-ref-parser.js +1 -1
  74. package/dist/sdk/agent/agent-yaml.js +1 -1
  75. package/dist/sdk/agent/test/evaluator.js +1 -1
  76. package/dist/sdk/agent/test/executor.js +1 -1
  77. package/dist/sdk/agent/test/index.js +1 -1
  78. package/dist/sdk/agent/test/output.js +1 -1
  79. package/dist/sdk/agent/test/parser.js +1 -1
  80. package/dist/sdk/agent/tool-target-registry.js +1 -1
  81. package/dist/sdk/api.js +1 -1
  82. package/dist/sdk/client/cdp-api-client.js +1 -1
  83. package/dist/sdk/client/delivery-api-client.js +1 -1
  84. package/dist/sdk/client/endpoints.js +1 -1
  85. package/dist/sdk/client/engage-api-client.js +1 -1
  86. package/dist/sdk/client/http-client.js +1 -1
  87. package/dist/sdk/client/llm-api-client.js +1 -1
  88. package/dist/sdk/client/rate-limiter.js +1 -1
  89. package/dist/sdk/client/td-api-client.js +1 -1
  90. package/dist/sdk/client/trino-api-client.js +1 -1
  91. package/dist/sdk/client/workflow-client.js +1 -1
  92. package/dist/sdk/connection-validator.js +1 -1
  93. package/dist/sdk/connection.js +1 -1
  94. package/dist/sdk/delivery.js +1 -1
  95. package/dist/sdk/engage/campaign-pull.js +1 -1
  96. package/dist/sdk/engage/campaign-push.js +1 -1
  97. package/dist/sdk/engage/campaign-validator.js +1 -1
  98. package/dist/sdk/engage/campaign-yaml.js +1 -1
  99. package/dist/sdk/engage/types/campaign-def.js +1 -1
  100. package/dist/sdk/engage/types/campaign-schema.js +1 -1
  101. package/dist/sdk/engage.js +1 -1
  102. package/dist/sdk/errors.js +1 -1
  103. package/dist/sdk/index.js +1 -1
  104. package/dist/sdk/io/index.js +1 -1
  105. package/dist/sdk/io/node-filesystem.js +1 -1
  106. package/dist/sdk/job.js +1 -1
  107. package/dist/sdk/journey.js +1 -1
  108. package/dist/sdk/llm/chat-cache.js +1 -1
  109. package/dist/sdk/llm/index.js +1 -1
  110. package/dist/sdk/llm/llm-backup-utils.js +1 -1
  111. package/dist/sdk/llm/model-factors.js +1 -1
  112. package/dist/sdk/personalization.js +1 -1
  113. package/dist/sdk/query/index.js +1 -1
  114. package/dist/sdk/query/sql-parser.js +1 -1
  115. package/dist/sdk/realtime.js +1 -1
  116. package/dist/sdk/schedule.js +1 -1
  117. package/dist/sdk/segment/child-segment-yaml.js +1 -1
  118. package/dist/sdk/segment/fields-display.js +1 -1
  119. package/dist/sdk/segment/file-discovery.js +1 -1
  120. package/dist/sdk/segment/journey-utils.js +1 -1
  121. package/dist/sdk/segment/journey-validator.js +1 -1
  122. package/dist/sdk/segment/journey-yaml.js +1 -1
  123. package/dist/sdk/segment/parent-segment-preview.js +1 -1
  124. package/dist/sdk/segment/parent-segment-yaml.js +1 -1
  125. package/dist/sdk/segment/pull-workflow.js +1 -1
  126. package/dist/sdk/segment/push-recovery.js +1 -1
  127. package/dist/sdk/segment/push-workflow.js +1 -1
  128. package/dist/sdk/segment/resolution-context.js +1 -1
  129. package/dist/sdk/segment/segment-path-parser.js +1 -1
  130. package/dist/sdk/segment/segment-ref-parser.js +1 -1
  131. package/dist/sdk/segment/segment-validator.js +1 -1
  132. package/dist/sdk/segment/target-resolution.js +1 -1
  133. package/dist/sdk/segment/tdx-config.js +1 -1
  134. package/dist/sdk/segment/types/activation-schema.js +1 -1
  135. package/dist/sdk/segment/types/journey-def.js +1 -1
  136. package/dist/sdk/segment/types/journey-schema.js +1 -1
  137. package/dist/sdk/segment/types/segment-def.js +1 -1
  138. package/dist/sdk/segment/types/segment-schema.js +1 -1
  139. package/dist/sdk/segment/validate-files.js +1 -1
  140. package/dist/sdk/segment/yaml-validator.js +1 -1
  141. package/dist/sdk/segment.js +1 -1
  142. package/dist/sdk/types/index.js +1 -1
  143. package/dist/sdk/types/progress.js +1 -1
  144. package/dist/sdk/user.js +1 -1
  145. package/dist/sdk/util/format-detector.js +1 -1
  146. package/dist/sdk/util/formatters.js +1 -1
  147. package/dist/sdk/util/index.js +1 -1
  148. package/dist/sdk/util/tree-formatter.js +1 -1
  149. package/dist/sdk/workflow/archive-validation.js +1 -1
  150. package/dist/sdk/workflow/clone-workflow.js +1 -1
  151. package/dist/sdk/workflow/index.js +1 -1
  152. package/dist/sdk/workflow/pull-workflow.js +1 -1
  153. package/dist/sdk/workflow/push-workflow.js +1 -1
  154. package/dist/sdk/workflow/tdx-config.js +1 -1
  155. package/dist/sdk/workflow/workflow-utils.js +1 -1
  156. package/dist/test-utils/command-runner.js +1 -1
  157. package/dist/test-utils/factories.js +1 -1
  158. package/dist/test-utils/fixtures.js +1 -1
  159. package/dist/test-utils/http-mock.js +1 -1
  160. package/dist/test-utils/index.js +1 -1
  161. package/dist/utils/async.js +1 -1
  162. package/dist/utils/colors.js +1 -1
  163. package/dist/utils/diff.js +1 -1
  164. package/dist/utils/file-permissions.js +1 -1
  165. package/dist/utils/file-reader.js +1 -1
  166. package/dist/utils/global-cache.js +1 -1
  167. package/dist/utils/json-loader.js +1 -1
  168. package/dist/utils/local-cache.js +1 -1
  169. package/dist/utils/logger/formatters/default-formatter.js +1 -1
  170. package/dist/utils/logger/formatters/index.js +1 -1
  171. package/dist/utils/logger/handlers/console-handler.js +1 -1
  172. package/dist/utils/logger/handlers/file-handler.js +1 -1
  173. package/dist/utils/logger/handlers/index.js +1 -1
  174. package/dist/utils/logger/handlers/null-handler.js +1 -1
  175. package/dist/utils/logger/index.js +1 -1
  176. package/dist/utils/logger/logger.js +1 -1
  177. package/dist/utils/logger/types.js +1 -1
  178. package/dist/utils/option-validation.js +1 -1
  179. package/dist/utils/process.js +1 -1
  180. package/dist/utils/prompt.js +1 -1
  181. package/dist/utils/spinner.js +1 -1
  182. package/dist/utils/sse-parser.js +1 -1
  183. package/dist/utils/string-utils.js +1 -1
  184. package/dist/utils/table-ref-parser.js +1 -1
  185. package/dist/utils/tdx-logger.js +1 -1
  186. package/dist/utils/version-check.js +1 -1
  187. package/package.json +1 -1
@@ -1 +1 @@
1
- const a108_0x59a83f=a108_0x32b6;(function(_0x518af7,_0x5087c6){const _0x34ac24=a108_0x32b6,_0x33bdd3=_0x518af7();while(!![]){try{const _0xc1200f=-parseInt(_0x34ac24(0x25e))/0x1*(-parseInt(_0x34ac24(0x22c))/0x2)+parseInt(_0x34ac24(0x205))/0x3+parseInt(_0x34ac24(0x204))/0x4+parseInt(_0x34ac24(0x20f))/0x5+parseInt(_0x34ac24(0x1e6))/0x6*(-parseInt(_0x34ac24(0x23e))/0x7)+-parseInt(_0x34ac24(0x224))/0x8+parseInt(_0x34ac24(0x1fa))/0x9;if(_0xc1200f===_0x5087c6)break;else _0x33bdd3['push'](_0x33bdd3['shift']());}catch(_0x156a97){_0x33bdd3['push'](_0x33bdd3['shift']());}}}(a108_0x5af4,0xd64c5));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x46738c){const _0x43fc02=a108_0x32b6;return _0x46738c[_0x43fc02(0x210)]??_0x46738c[_0x43fc02(0x23d)]?.[_0x43fc02(0x210)]??undefined;}function getVersionNumber(_0x2449d7){const _0x5427f3=a108_0x32b6;return _0x2449d7[_0x5427f3(0x22f)]??_0x2449d7[_0x5427f3(0x23d)]?.[_0x5427f3(0x22f)]??0x0;}function a108_0x5af4(){const _0x1b4e21=['parentFolder','listJourneys','attributes','5262152JlhdeM','outtime_journey','has','JOURNEY_NOT_FOUND','updatedAt','conditionSegmentId','branch','goalSize','getActivationSankeyChart','history','journeys','launched','enteredSize','\x20in\x20journey\x20','getActivation','pause','size','state','set','Journey\x20not\x20found:\x20','map','string','resumeJourney','journey_','cdp_customer_id','time','add','conditions','type','filter','journeyId','length','1LjhDHV','exitOrJumpRate','goal','journeyBundleName','no-bundle-','journeyStageId','push','applyVersionDeduplication','isArray','excluded','listVersions','completionRate','listActivationsFlat','Journey\x20activation\x20step\x20not\x20found:\x20','exitCriterias','timedOutPath','all','listSegmentFolders','checkJourneyAppendable','WaitStep','get','waitCondition','milestoneInflux','_variant_','flat','12FAsiod','client','exitInflux','intime_journey','from','paused','ABTest','listJourneysFromParentSegment','jumpInflux','exitOrJumpSize','getColumnMapping','exit_criteria','Excluded\x20profiles','simulation','getJourneyActivation','intime_goal','activationStepsById','replace','stage','createdAt','808128cLzSqY','getJourneyStatistics','cdp_audience_','step','update','listJourneysWithDetails','resume','conversion','limit','listJourneysWithDetailsFromParentSegment','4068524TgVNiB','2987808nNhXJX','resolveJourneyId','data','variant','name','activation','createJourney','rootFolderId','out','lastVersionNumber','7904915SilhoQ','journeyBundleId','listJourneyActivations','description','listActivations','create','journeyStages','milestone','idx-','folder-segment','getBundle','includeHistory','outtime_stage_','draft','reduce','journey','entryInflux','getJourneyBundle','getStatistics','createJourneyVersion','getParentSegmentFull','12114016SbLEfX','intime_stage_','createVersion','pauseJourney','branches','variants','getLatestJourneyId','getConversionSankeyChart','423294qiEayt','getJourney','includeAllVersions','versionNumber','toLowerCase','find','_exit_','fetchTrafficRaw','listEntitiesByFolder','entries','INVALID_ARGUMENT','updateJourney','segmentId','values','entryCriteria'];a108_0x5af4=function(){return _0x1b4e21;};return a108_0x5af4();}export function deduplicateJourneysByBundle(_0x2a8059){const _0x3e5e93=a108_0x32b6,_0x1007cb=new Map();let _0x18b35b=0x0;for(const _0x40baa0 of _0x2a8059){const _0x39e72b=getBundleId(_0x40baa0);if(!_0x39e72b){const _0x53c2a1=_0x3e5e93(0x262)+(_0x40baa0['id']??_0x3e5e93(0x217)+_0x18b35b++);_0x1007cb[_0x3e5e93(0x250)](_0x53c2a1,_0x40baa0);continue;}const _0x445daa=_0x1007cb[_0x3e5e93(0x1e1)](_0x39e72b);if(!_0x445daa)_0x1007cb['set'](_0x39e72b,_0x40baa0);else{const _0x43304b=getVersionNumber(_0x445daa),_0x43b15e=getVersionNumber(_0x40baa0);_0x43b15e>_0x43304b&&_0x1007cb[_0x3e5e93(0x250)](_0x39e72b,_0x40baa0);}}return Array[_0x3e5e93(0x1ea)](_0x1007cb[_0x3e5e93(0x239)]());}const VALID_JOURNEY_STATES=new Set([a108_0x59a83f(0x21c),a108_0x59a83f(0x1f3),a108_0x59a83f(0x249)]);export function parseJourneyState(_0x30f26a){const _0x505195=a108_0x59a83f;if(typeof _0x30f26a===_0x505195(0x253)&&VALID_JOURNEY_STATES[_0x505195(0x240)](_0x30f26a))return _0x30f26a;return'draft';}export function entityToJourneyListItem(_0x5ce280,_0x2260f6){const _0x4cb33a=a108_0x59a83f,_0x20f59b=_0x5ce280['attributes'];return{'id':_0x5ce280['id'],'name':_0x20f59b[_0x4cb33a(0x209)]??'','journeyBundleName':_0x20f59b[_0x4cb33a(0x261)]??_0x20f59b['name']??'','journeyBundleId':_0x20f59b[_0x4cb33a(0x210)]??'','versionNumber':_0x20f59b[_0x4cb33a(0x22f)],'description':_0x20f59b[_0x4cb33a(0x212)]??null,'state':parseJourneyState(_0x20f59b[_0x4cb33a(0x24f)]),'paused':_0x20f59b[_0x4cb33a(0x1eb)]??![],'audienceId':_0x2260f6,'folderId':_0x20f59b['segmentFolderId']??_0x5ce280['relationships']?.[_0x4cb33a(0x23b)]?.[_0x4cb33a(0x207)]?.['id']??null,'createdAt':_0x20f59b[_0x4cb33a(0x1f9)]??'','updatedAt':_0x20f59b['updatedAt']??''};}function convertToColumnId(_0x362a01){const _0x5d0f83=a108_0x59a83f;return _0x362a01[_0x5d0f83(0x1f7)](/-/g,'_');}function a108_0x32b6(_0x4a82c6,_0x7e3e1a){_0x4a82c6=_0x4a82c6-0x1dd;const _0x5af481=a108_0x5af4();let _0x32b641=_0x5af481[_0x4a82c6];return _0x32b641;}function getStepEntries(_0x480784){const _0x58b4b3=a108_0x59a83f;if(!_0x480784)return[];if(Array[_0x58b4b3(0x266)](_0x480784))return _0x480784[_0x58b4b3(0x252)](_0xab5183=>[_0xab5183['id'],_0xab5183]);return Object[_0x58b4b3(0x235)](_0x480784);}export function flattenJourneyActivation(_0x93eceb){const _0x277ab6=a108_0x59a83f,{activationParams:_0x47d85f,activationId:_0x3c2772,runAfterJourneyRefresh:_0x5f213d}=_0x93eceb[_0x277ab6(0x23d)];return{'id':_0x93eceb['id'],'activationId':_0x3c2772,'runAfterJourneyRefresh':_0x5f213d,..._0x47d85f};}function col(_0x341d16,_0x37f1ac={}){return{'column':_0x341d16,'direction':null,'stageIndex':null,'stageName':null,'category':'fixed','stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x37f1ac};}export function generateColumnMapping(_0x4e14be){const _0x5b1ffa=a108_0x59a83f,_0x485998=[];_0x485998[_0x5b1ffa(0x264)](col(_0x5b1ffa(0x256))),_0x485998[_0x5b1ffa(0x264)](col(_0x5b1ffa(0x1e9),{'direction':'in','category':_0x5b1ffa(0x21e)})),_0x485998[_0x5b1ffa(0x264)](col(_0x5b1ffa(0x23f),{'direction':_0x5b1ffa(0x20d),'category':_0x5b1ffa(0x21e)}));_0x4e14be[_0x5b1ffa(0x23d)][_0x5b1ffa(0x260)]&&_0x485998[_0x5b1ffa(0x264)](col(_0x5b1ffa(0x1f5),{'direction':'in','category':_0x5b1ffa(0x260),'detail':_0x4e14be['attributes'][_0x5b1ffa(0x260)][_0x5b1ffa(0x209)]||null}));const _0x163b0f=_0x4e14be[_0x5b1ffa(0x23d)][_0x5b1ffa(0x215)]||[];for(let _0xd5e463=0x0;_0xd5e463<_0x163b0f[_0x5b1ffa(0x25d)];_0xd5e463++){const _0x4d5810=_0x163b0f[_0xd5e463],_0x1f3196=_0x4d5810[_0x5b1ffa(0x209)],_0x2f5a63={'stageIndex':_0xd5e463,'stageName':_0x1f3196},_0x4d5c2e=_0x4d5810[_0x5b1ffa(0x23a)]?.[_0x5b1ffa(0x209)]||null;_0x485998[_0x5b1ffa(0x264)](col(_0x5b1ffa(0x225)+_0xd5e463,{..._0x2f5a63,'direction':'in','category':_0x5b1ffa(0x1f8),'detail':_0x4d5c2e})),_0x485998[_0x5b1ffa(0x264)](col(_0x5b1ffa(0x21b)+_0xd5e463,{..._0x2f5a63,'direction':_0x5b1ffa(0x20d),'category':_0x5b1ffa(0x1f8),'detail':_0x4d5c2e}));_0x4d5810[_0x5b1ffa(0x216)]&&_0x485998[_0x5b1ffa(0x264)](col(_0x5b1ffa(0x225)+_0xd5e463+'_milestone',{..._0x2f5a63,'direction':'in','category':_0x5b1ffa(0x216),'detail':_0x4d5810[_0x5b1ffa(0x216)][_0x5b1ffa(0x209)]||null}));const _0x381659=_0x4d5810[_0x5b1ffa(0x26c)]||_0x4d5810['exitCriteria']||[];for(let _0x6de4e1=0x0;_0x6de4e1<_0x381659[_0x5b1ffa(0x25d)];_0x6de4e1++){_0x485998['push'](col('intime_stage_'+_0xd5e463+_0x5b1ffa(0x232)+_0x6de4e1,{..._0x2f5a63,'direction':'in','category':_0x5b1ffa(0x1f1),'detail':_0x381659[_0x6de4e1]['name']||null}));}const _0x2a6db2=getStepEntries(_0x4d5810['steps']);for(const [_0x1a3c8d,_0x3d2ca4]of _0x2a6db2){const _0x25f239=convertToColumnId(_0x1a3c8d),_0x4e3442=_0x3d2ca4['type']||null,_0x3d761d=_0x3d2ca4[_0x5b1ffa(0x209)]||null,_0x372bd5={..._0x2f5a63,'stepType':_0x4e3442,'stepName':_0x3d761d,'stepId':_0x1a3c8d};_0x485998[_0x5b1ffa(0x264)](col('intime_stage_'+_0xd5e463+'_'+_0x25f239,{..._0x372bd5,'direction':'in','category':'step'})),_0x485998['push'](col(_0x5b1ffa(0x21b)+_0xd5e463+'_'+_0x25f239,{..._0x372bd5,'direction':_0x5b1ffa(0x20d),'category':_0x5b1ffa(0x1fd)}));if(_0x3d2ca4[_0x5b1ffa(0x25a)]==='DecisionPoint'&&_0x3d2ca4[_0x5b1ffa(0x228)])for(const _0x410a12 of _0x3d2ca4[_0x5b1ffa(0x228)]){_0x410a12[_0x5b1ffa(0x238)]&&_0x485998[_0x5b1ffa(0x264)](col(_0x5b1ffa(0x225)+_0xd5e463+'_'+_0x25f239+'_'+_0x410a12[_0x5b1ffa(0x238)],{..._0x372bd5,'direction':'in','category':_0x5b1ffa(0x244),'detail':_0x410a12[_0x5b1ffa(0x209)]||(_0x410a12[_0x5b1ffa(0x267)]?_0x5b1ffa(0x1f2):null)}));}if((_0x3d2ca4[_0x5b1ffa(0x25a)]==='AbTest'||_0x3d2ca4['type']===_0x5b1ffa(0x1ec))&&_0x3d2ca4[_0x5b1ffa(0x229)])for(const _0x255184 of _0x3d2ca4[_0x5b1ffa(0x229)]){_0x255184['id']&&_0x485998[_0x5b1ffa(0x264)](col('intime_stage_'+_0xd5e463+'_'+_0x25f239+_0x5b1ffa(0x1e4)+convertToColumnId(_0x255184['id']),{..._0x372bd5,'direction':'in','category':_0x5b1ffa(0x208),'detail':_0x255184[_0x5b1ffa(0x209)]||null}));}if(_0x3d2ca4[_0x5b1ffa(0x25a)]===_0x5b1ffa(0x1e0)||_0x3d2ca4[_0x5b1ffa(0x25a)]==='Wait'){const _0x1aa716=[];if(_0x3d2ca4[_0x5b1ffa(0x243)])_0x1aa716[_0x5b1ffa(0x264)](_0x3d2ca4['conditionSegmentId']);else{if(Array[_0x5b1ffa(0x266)](_0x3d2ca4[_0x5b1ffa(0x259)]))for(const _0x1681fb of _0x3d2ca4['conditions']){_0x1681fb[_0x5b1ffa(0x238)]&&!_0x1681fb[_0x5b1ffa(0x26d)]&&_0x1aa716[_0x5b1ffa(0x264)](_0x1681fb[_0x5b1ffa(0x238)]);}else _0x3d2ca4[_0x5b1ffa(0x1e2)]?.['segmentId']&&_0x1aa716['push'](_0x3d2ca4[_0x5b1ffa(0x1e2)][_0x5b1ffa(0x238)]);}for(const _0x1f2420 of _0x1aa716){_0x485998['push'](col('intime_stage_'+_0xd5e463+'_'+_0x25f239+'_'+_0x1f2420,{..._0x372bd5,'direction':'in','category':_0x5b1ffa(0x244)}));}}}}return _0x485998['push'](col(_0x5b1ffa(0x257))),_0x485998;}export function aggregateJourneyHistory(_0x2143e9){const _0x41c7a7=a108_0x59a83f,_0x40d2ad=_0x2143e9[_0x41c7a7(0x21d)]((_0x49feb6,_0x132975)=>_0x49feb6+(_0x132975[_0x41c7a7(0x21f)]??0x0),0x0),_0x552f8d=_0x2143e9[_0x41c7a7(0x21d)]((_0x1e3f05,_0x2a6f3b)=>_0x1e3f05+(_0x2a6f3b['goalInflux']??0x0),0x0),_0x3527a7=_0x2143e9[_0x41c7a7(0x21d)]((_0x1865fd,_0x1c5bc7)=>_0x1865fd+((_0x1c5bc7[_0x41c7a7(0x1e8)]??0x0)+(_0x1c5bc7['jumpInflux']??0x0)),0x0),_0x4f422f=_0x2143e9[_0x2143e9[_0x41c7a7(0x25d)]-0x1];return{'size':_0x4f422f?.[_0x41c7a7(0x24e)]??0x0,'entered':_0x40d2ad,'goal_achieved':_0x552f8d,'completion_rate':_0x552f8d&&_0x40d2ad?_0x552f8d/_0x40d2ad*0x64:0x0,'exit_or_jump':_0x3527a7,'exit_or_jump_rate':_0x3527a7&&_0x40d2ad?_0x3527a7/_0x40d2ad*0x64:0x0};}export function aggregateStageHistory(_0x5e852e){const _0x3948b0=a108_0x59a83f,_0x527eeb=_0x5e852e[_0x3948b0(0x21d)]((_0x1e0f40,_0x130423)=>_0x1e0f40+(_0x130423['entryInflux']??0x0),0x0),_0x1e5e97=_0x5e852e['reduce']((_0x2bd036,_0x59cba0)=>_0x2bd036+(_0x59cba0[_0x3948b0(0x1e3)]??0x0),0x0),_0x24a688=_0x5e852e[_0x3948b0(0x21d)]((_0xc16eae,_0x32d162)=>_0xc16eae+((_0x32d162[_0x3948b0(0x1e8)]??0x0)+(_0x32d162[_0x3948b0(0x1ee)]??0x0)),0x0),_0x454045=_0x5e852e[_0x5e852e[_0x3948b0(0x25d)]-0x1];return{'size':_0x454045?.[_0x3948b0(0x24e)]??0x0,'entered':_0x527eeb,'milestone':_0x1e5e97,'milestone_rate':_0x1e5e97&&_0x527eeb?_0x1e5e97/_0x527eeb*0x64:0x0,'exit_or_jump':_0x24a688,'exit_or_jump_rate':_0x24a688&&_0x527eeb?_0x24a688/_0x527eeb*0x64:0x0};}export function assembleJourneyStats(_0x28f5d2,_0x38ff6a){const _0xc09566=a108_0x59a83f,_0x215296=!!(_0x38ff6a?.['from']||_0x38ff6a?.['to'])&&!!_0x28f5d2['history']?.[_0xc09566(0x25d)];if(_0x215296){const _0x3cf0b2=aggregateJourneyHistory(_0x28f5d2['history']),_0x39769={'journey_id':_0x28f5d2[_0xc09566(0x25c)],..._0x38ff6a?.[_0xc09566(0x1ea)]&&{'from':_0x38ff6a[_0xc09566(0x1ea)]},..._0x38ff6a?.['to']&&{'to':_0x38ff6a['to']},..._0x3cf0b2};return _0x38ff6a?.[_0xc09566(0x21a)]&&(_0x39769[_0xc09566(0x247)]=_0x28f5d2['history']),_0x39769;}return{'journey_id':_0x28f5d2[_0xc09566(0x25c)],'size':_0x28f5d2[_0xc09566(0x24e)],'entered':_0x28f5d2[_0xc09566(0x24a)],'goal_achieved':_0x28f5d2[_0xc09566(0x245)],'completion_rate':_0x28f5d2[_0xc09566(0x269)],'exit_or_jump':_0x28f5d2[_0xc09566(0x1ef)],'exit_or_jump_rate':_0x28f5d2[_0xc09566(0x25f)]};}export function formatVersionsFromBundle(_0x1d71a6){const _0x333ed5=a108_0x59a83f,_0x1c80fd=_0x1d71a6[_0x333ed5(0x248)][_0x333ed5(0x252)](_0x363db8=>({'journeyId':_0x363db8['id'],'versionNumber':_0x363db8[_0x333ed5(0x23d)]['versionNumber']??0x0,'name':_0x363db8['attributes'][_0x333ed5(0x209)],'state':_0x363db8[_0x333ed5(0x23d)][_0x333ed5(0x24f)],'paused':_0x363db8[_0x333ed5(0x23d)][_0x333ed5(0x1eb)],'createdAt':_0x363db8[_0x333ed5(0x23d)][_0x333ed5(0x1f9)],'updatedAt':_0x363db8[_0x333ed5(0x23d)][_0x333ed5(0x242)]}));return _0x1c80fd['sort']((_0x2cf537,_0xedecbd)=>_0x2cf537['versionNumber']-_0xedecbd[_0x333ed5(0x22f)]),_0x1c80fd;}export function synthesizePreBundleVersion(_0x40118c){const _0x1bb524=a108_0x59a83f;return{'journeyId':_0x40118c['id'],'versionNumber':0x1,'name':_0x40118c[_0x1bb524(0x23d)]['name'],'state':_0x40118c[_0x1bb524(0x23d)][_0x1bb524(0x24f)],'paused':_0x40118c[_0x1bb524(0x23d)][_0x1bb524(0x1eb)],'createdAt':_0x40118c[_0x1bb524(0x23d)][_0x1bb524(0x1f9)],'updatedAt':_0x40118c[_0x1bb524(0x23d)]['updatedAt']};}export function buildStageNameMap(_0x35ecf0){const _0x26cccb=a108_0x59a83f;return new Map(_0x35ecf0[_0x26cccb(0x23d)][_0x26cccb(0x215)]?.[_0x26cccb(0x252)](_0x16a2a7=>[_0x16a2a7['id'],_0x16a2a7[_0x26cccb(0x209)]])??[]);}export class JourneySDK{[a108_0x59a83f(0x1e7)];constructor(_0x11168e){const _0x91e588=a108_0x59a83f;this[_0x91e588(0x1e7)]=new CDPApiClient(_0x11168e);}[a108_0x59a83f(0x265)](_0x33f0ff,_0x1f1514){return _0x1f1514?_0x33f0ff:deduplicateJourneysByBundle(_0x33f0ff);}async['listJourneysWithDetails'](_0x38b36f,_0x18217b){const _0x363c79=a108_0x59a83f;try{const _0x12c2b2=await this['client']['listJourneysWithDetails'](_0x38b36f);return{'journeys':this[_0x363c79(0x265)](_0x12c2b2[_0x363c79(0x248)],_0x18217b),'activationStepsById':_0x12c2b2[_0x363c79(0x1f6)]};}catch(_0xdb5354){if(isHttp404Error(_0xdb5354))return{'journeys':[],'activationStepsById':new Map()};throw _0xdb5354;}}async[a108_0x59a83f(0x1ed)](_0x1f0f73,_0x4f146f,_0x27a4b0){const _0x4b13a7=a108_0x59a83f;let _0x3e6a14=_0x4f146f;if(!_0x3e6a14)try{const _0x3f0cf8=await this[_0x4b13a7(0x1e7)][_0x4b13a7(0x223)](_0x1f0f73);_0x3e6a14=_0x3f0cf8[_0x4b13a7(0x20c)]??undefined;}catch(_0x2b8aef){if(isHttp404Error(_0x2b8aef))return[];throw _0x2b8aef;}if(!_0x3e6a14)return[];let _0x1546b1;if(_0x27a4b0?.['includeAllVersions']){const _0x1f3c2a=await this[_0x4b13a7(0x1e7)][_0x4b13a7(0x1de)](_0x1f0f73),_0x138622=_0x1f3c2a[_0x4b13a7(0x252)](_0x30a9e9=>this['client'][_0x4b13a7(0x23c)](_0x30a9e9['id'])),_0x25d737=await Promise['all'](_0x138622),_0x2975cf=new Set();_0x1546b1=_0x25d737[_0x4b13a7(0x1e5)]()[_0x4b13a7(0x25b)](_0x38b8a9=>{const _0x2517e5=_0x4b13a7;if(_0x2975cf[_0x2517e5(0x240)](_0x38b8a9['id']))return![];return _0x2975cf[_0x2517e5(0x258)](_0x38b8a9['id']),!![];});}else{const _0x3e0730=await this[_0x4b13a7(0x1e7)][_0x4b13a7(0x234)](_0x3e6a14,0x20,![]),_0x52d69d=_0x3e0730[_0x4b13a7(0x207)],_0x3273de=_0x52d69d[_0x4b13a7(0x25b)](_0x11fa37=>_0x11fa37[_0x4b13a7(0x25a)]==='journey');_0x1546b1=_0x3273de[_0x4b13a7(0x252)](_0x4ad601=>entityToJourneyListItem(_0x4ad601,_0x1f0f73));}return this['applyVersionDeduplication'](_0x1546b1,_0x27a4b0?.['includeAllVersions']);}async['listJourneysWithFolders'](_0x32dd3e,_0x1bad89,_0x959aba){const _0x3bea83=a108_0x59a83f;if(!_0x1bad89)return{'journeys':[],'folders':[]};const _0x568184=await this[_0x3bea83(0x1e7)]['listEntitiesByFolder'](_0x1bad89,0x20,![]),_0x59c639=_0x568184[_0x3bea83(0x207)],_0xa398b7=_0x59c639['filter'](_0x3a5a41=>_0x3a5a41[_0x3bea83(0x25a)]===_0x3bea83(0x218)&&_0x3a5a41['id']!==_0x1bad89),_0x30f09=_0xa398b7['map'](_0x2bf99f=>({'id':_0x2bf99f['id'],'name':_0x2bf99f[_0x3bea83(0x23d)][_0x3bea83(0x209)]})),_0x113a36=_0x59c639['filter'](_0x456f82=>_0x456f82[_0x3bea83(0x25a)]==='journey'),_0x810a18=_0x113a36[_0x3bea83(0x252)](_0x2539cb=>entityToJourneyListItem(_0x2539cb,_0x32dd3e));return{'journeys':this[_0x3bea83(0x265)](_0x810a18,_0x959aba?.[_0x3bea83(0x22e)]),'folders':_0x30f09};}async[a108_0x59a83f(0x203)](_0x312d19,_0xf7dd17){const _0x4e740d=a108_0x59a83f;let _0x597c82;try{_0x597c82=await this['client'][_0x4e740d(0x1de)](_0x312d19);}catch(_0x338645){if(isHttp404Error(_0x338645))return{'journeys':[],'activationStepsById':new Map()};throw _0x338645;}const _0x226507=_0x597c82[_0x4e740d(0x252)](async _0x44e618=>{const _0x4a8f28=_0x4e740d;return await this[_0x4a8f28(0x1ff)](_0x44e618['id'],_0xf7dd17?.[_0x4a8f28(0x22e)]);}),_0x368684=await Promise[_0x4e740d(0x1dd)](_0x226507),_0x5165fd=new Map(),_0x4b8366=[];for(const _0x5cd318 of _0x368684){_0x4b8366[_0x4e740d(0x264)](..._0x5cd318['journeys']);for(const [_0x122819,_0x1eeca6]of _0x5cd318['activationStepsById']){_0x5165fd[_0x4e740d(0x250)](_0x122819,_0x1eeca6);}}const _0x14c0ce=new Set(),_0x57274b=_0x4b8366[_0x4e740d(0x25b)](_0x514dfb=>{const _0x123e2d=_0x4e740d;if(_0x14c0ce[_0x123e2d(0x240)](_0x514dfb['id']))return![];return _0x14c0ce[_0x123e2d(0x258)](_0x514dfb['id']),!![];});return{'journeys':this[_0x4e740d(0x265)](_0x57274b,_0xf7dd17?.[_0x4e740d(0x22e)]),'activationStepsById':_0x5165fd};}async['getJourney'](_0x416567){const _0x3fe0f1=a108_0x59a83f;try{return await this[_0x3fe0f1(0x1e7)][_0x3fe0f1(0x22d)](_0x416567);}catch(_0x45f02c){if(isHttp404Error(_0x45f02c))throw new SDKError(ErrorCode[_0x3fe0f1(0x241)],_0x3fe0f1(0x251)+_0x416567,_0x45f02c);throw _0x45f02c;}}async[a108_0x59a83f(0x206)](_0x3e9d92,_0x19c62a){const _0x36421e=a108_0x59a83f,_0xbfcaa0=await this[_0x36421e(0x1ed)](_0x3e9d92),_0x174f7a=_0xbfcaa0[_0x36421e(0x231)](_0x38b048=>_0x38b048[_0x36421e(0x261)][_0x36421e(0x230)]()===_0x19c62a[_0x36421e(0x230)]());if(!_0x174f7a)throw new SDKError(ErrorCode[_0x36421e(0x241)],_0x36421e(0x251)+_0x19c62a,undefined,{'helpText':'Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys'});return _0x174f7a['id'];}async[a108_0x59a83f(0x221)](_0x3da0b1,_0x4851bb){const _0x4b5a9b=a108_0x59a83f;try{return await this[_0x4b5a9b(0x1e7)][_0x4b5a9b(0x1fb)](_0x3da0b1,_0x4851bb);}catch(_0x8804a4){if(isHttp404Error(_0x8804a4))throw new SDKError(ErrorCode[_0x4b5a9b(0x241)],_0x4b5a9b(0x251)+_0x3da0b1,_0x8804a4);throw _0x8804a4;}}async['getTrafficData'](_0x23f520,_0x1559fc){const _0x4b5df5=a108_0x59a83f,_0x4da975={'from':_0x1559fc?.[_0x4b5df5(0x1ea)],'to':_0x1559fc?.['to'],'limit':_0x1559fc?.[_0x4b5df5(0x202)]},_0x5d4b7f=_0x1559fc?.[_0x4b5df5(0x25a)]!=='conversion';try{const [_0x42bbd1,_0x23c5a9]=await Promise[_0x4b5df5(0x1dd)]([this[_0x4b5df5(0x233)](_0x23f520,_0x1559fc?.['type'],_0x4da975),_0x5d4b7f?this[_0x4b5df5(0x22d)](_0x23f520):undefined]);if(_0x42bbd1[_0x4b5df5(0x20a)]&&_0x23c5a9){const _0x13977a=buildStageNameMap(_0x23c5a9);_0x42bbd1[_0x4b5df5(0x20a)]=_0x42bbd1[_0x4b5df5(0x20a)][_0x4b5df5(0x252)](_0x374ff2=>({..._0x374ff2,'journeyStageName':_0x13977a[_0x4b5df5(0x1e1)](_0x374ff2[_0x4b5df5(0x263)])??_0x374ff2[_0x4b5df5(0x263)]}));}return _0x42bbd1;}catch(_0x32c8f4){if(isHttp404Error(_0x32c8f4))throw new SDKError(ErrorCode[_0x4b5df5(0x241)],_0x4b5df5(0x251)+_0x23f520,_0x32c8f4);throw _0x32c8f4;}}async[a108_0x59a83f(0x233)](_0x28b26a,_0x4c90ae,_0x297a4f){const _0x15be99=a108_0x59a83f;if(_0x4c90ae===_0x15be99(0x201)){const _0x54941e=await this[_0x15be99(0x1e7)][_0x15be99(0x22b)](_0x28b26a,_0x297a4f);return{'conversion':_0x54941e};}if(_0x4c90ae===_0x15be99(0x20a)){const _0x2702b8=await this['client']['getActivationSankeyChart'](_0x28b26a,_0x297a4f);return{'activation':_0x2702b8};}const [_0x1e9ce1,_0x512bdb]=await Promise[_0x15be99(0x1dd)]([this['client'][_0x15be99(0x22b)](_0x28b26a,_0x297a4f),this[_0x15be99(0x1e7)][_0x15be99(0x246)](_0x28b26a,_0x297a4f)]);return{'conversion':_0x1e9ce1,'activation':_0x512bdb};}async[a108_0x59a83f(0x24d)](_0x9c340f){const _0x387f9c=a108_0x59a83f;try{return await this['client'][_0x387f9c(0x227)](_0x9c340f);}catch(_0x50cf08){if(isHttp404Error(_0x50cf08))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x387f9c(0x251)+_0x9c340f,_0x50cf08);throw _0x50cf08;}}async[a108_0x59a83f(0x200)](_0x5e2a94){const _0x35134c=a108_0x59a83f;try{return await this['client'][_0x35134c(0x254)](_0x5e2a94);}catch(_0xa6798a){if(isHttp404Error(_0xa6798a))throw new SDKError(ErrorCode[_0x35134c(0x241)],_0x35134c(0x251)+_0x5e2a94,_0xa6798a);throw _0xa6798a;}}async[a108_0x59a83f(0x214)](_0x2dd5c1){const _0x39961e=a108_0x59a83f;return await this[_0x39961e(0x1e7)][_0x39961e(0x20b)](_0x2dd5c1);}async[a108_0x59a83f(0x1fe)](_0x16eb60,_0x3a6ed7){const _0x5702f2=a108_0x59a83f;try{return await this[_0x5702f2(0x1e7)][_0x5702f2(0x237)](_0x16eb60,_0x3a6ed7);}catch(_0x39eb81){if(isHttp404Error(_0x39eb81))throw new SDKError(ErrorCode[_0x5702f2(0x241)],_0x5702f2(0x251)+_0x16eb60,_0x39eb81);throw _0x39eb81;}}async[a108_0x59a83f(0x24c)](_0x18ebc5,_0xf28e61){const _0x198807=a108_0x59a83f;try{return await this['client'][_0x198807(0x1f4)](_0x18ebc5,_0xf28e61);}catch(_0x488b35){if(isHttp404Error(_0x488b35))throw new SDKError(ErrorCode['NOT_FOUND'],_0x198807(0x26b)+_0xf28e61+_0x198807(0x24b)+_0x18ebc5,_0x488b35);throw _0x488b35;}}async[a108_0x59a83f(0x213)](_0x403e2b){const _0x47b091=a108_0x59a83f;try{return await this[_0x47b091(0x1e7)][_0x47b091(0x211)](_0x403e2b);}catch(_0x5235be){if(isHttp404Error(_0x5235be))return[];throw _0x5235be;}}async[a108_0x59a83f(0x26a)](_0x5b9d5b){const _0x2a0d94=a108_0x59a83f,_0xa13789=await this[_0x2a0d94(0x213)](_0x5b9d5b);return _0xa13789['map'](flattenJourneyActivation);}async['createActivation'](_0x469515,_0x5d8f2c){return await this['client']['createJourneyActivation'](_0x469515,_0x5d8f2c);}async[a108_0x59a83f(0x1f0)](_0xfe5177){const _0x52ae9f=a108_0x59a83f,_0x719c29=await this[_0x52ae9f(0x22d)](_0xfe5177),_0x656cce=generateColumnMapping(_0x719c29);return{'journeyId':_0x719c29['id'],'journeyName':_0x719c29[_0x52ae9f(0x23d)][_0x52ae9f(0x209)],'database':_0x52ae9f(0x1fc)+_0x719c29['attributes']['audienceId'],'table':_0x52ae9f(0x255)+_0x719c29['id'],'columns':_0x656cce};}async[a108_0x59a83f(0x219)](_0x2d9ba1){const _0x2a8267=a108_0x59a83f;return this[_0x2a8267(0x1e7)][_0x2a8267(0x220)](_0x2d9ba1);}async[a108_0x59a83f(0x22a)](_0x2674c9){const _0x5e20c4=a108_0x59a83f;if(!_0x2674c9)return undefined;try{const _0x491505=await this[_0x5e20c4(0x219)](_0x2674c9);return _0x491505['latestJourneyId'];}catch{return undefined;}}async[a108_0x59a83f(0x268)](_0x410e71){const _0x47cccb=a108_0x59a83f,_0x26f03a=await this[_0x47cccb(0x22d)](_0x410e71),_0x39f3e0=_0x26f03a['attributes'][_0x47cccb(0x210)];if(!_0x39f3e0)return{'bundleId':'','bundleName':_0x26f03a['attributes'][_0x47cccb(0x209)],'bundleDescription':_0x26f03a[_0x47cccb(0x23d)][_0x47cccb(0x212)]??null,'latestJourneyId':_0x26f03a['id'],'versions':[synthesizePreBundleVersion(_0x26f03a)]};const _0x348df5=await this['getBundle'](_0x39f3e0);return{'bundleId':_0x39f3e0,'bundleName':_0x348df5['name'],'bundleDescription':_0x348df5[_0x47cccb(0x212)]??null,'latestJourneyId':_0x348df5['latestJourneyId'],'versions':formatVersionsFromBundle(_0x348df5)};}async[a108_0x59a83f(0x226)](_0x74df0d){const _0x4f0e9b=a108_0x59a83f,_0x2c1f66=await this[_0x4f0e9b(0x22d)](_0x74df0d),_0x2436f5=_0x2c1f66[_0x4f0e9b(0x23d)][_0x4f0e9b(0x210)];if(!_0x2436f5)throw new SDKError(ErrorCode[_0x4f0e9b(0x236)],'Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle');await this[_0x4f0e9b(0x1e7)][_0x4f0e9b(0x1df)](_0x2436f5);const _0x5c14fa=await this[_0x4f0e9b(0x1e7)][_0x4f0e9b(0x220)](_0x2436f5),_0x12aebb=_0x5c14fa[_0x4f0e9b(0x209)]+'\x20v'+(_0x5c14fa[_0x4f0e9b(0x20e)]+0x1);return this[_0x4f0e9b(0x1e7)][_0x4f0e9b(0x222)](_0x2436f5,{'sourceId':_0x74df0d,'attributes':{'name':_0x12aebb}});}}
1
+ const a108_0x4687f6=a108_0x283c;(function(_0xe09e3e,_0x2ee51a){const _0x4f4634=a108_0x283c,_0x3788a5=_0xe09e3e();while(!![]){try{const _0x1159c3=-parseInt(_0x4f4634(0x1bb))/0x1*(-parseInt(_0x4f4634(0x1cb))/0x2)+parseInt(_0x4f4634(0x20a))/0x3+parseInt(_0x4f4634(0x1d5))/0x4*(parseInt(_0x4f4634(0x1fb))/0x5)+-parseInt(_0x4f4634(0x1ee))/0x6+-parseInt(_0x4f4634(0x1d0))/0x7+-parseInt(_0x4f4634(0x1f4))/0x8+-parseInt(_0x4f4634(0x1f1))/0x9*(-parseInt(_0x4f4634(0x1ec))/0xa);if(_0x1159c3===_0x2ee51a)break;else _0x3788a5['push'](_0x3788a5['shift']());}catch(_0x2c6906){_0x3788a5['push'](_0x3788a5['shift']());}}}(a108_0xedab,0x5267d));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x113196){const _0x12548b=a108_0x283c;return _0x113196[_0x12548b(0x1e5)]??_0x113196[_0x12548b(0x22a)]?.[_0x12548b(0x1e5)]??undefined;}function getVersionNumber(_0x13642e){const _0x29b6d7=a108_0x283c;return _0x13642e[_0x29b6d7(0x227)]??_0x13642e['attributes']?.['versionNumber']??0x0;}export function deduplicateJourneysByBundle(_0x14572f){const _0x5341f0=a108_0x283c,_0x191d9e=new Map();let _0x54e8af=0x0;for(const _0x26bc68 of _0x14572f){const _0x47b47a=getBundleId(_0x26bc68);if(!_0x47b47a){const _0x35c2fe=_0x5341f0(0x22b)+(_0x26bc68['id']??_0x5341f0(0x1f8)+_0x54e8af++);_0x191d9e[_0x5341f0(0x1ce)](_0x35c2fe,_0x26bc68);continue;}const _0x30197b=_0x191d9e[_0x5341f0(0x23b)](_0x47b47a);if(!_0x30197b)_0x191d9e[_0x5341f0(0x1ce)](_0x47b47a,_0x26bc68);else{const _0x1cf34d=getVersionNumber(_0x30197b),_0x1c66b4=getVersionNumber(_0x26bc68);_0x1c66b4>_0x1cf34d&&_0x191d9e['set'](_0x47b47a,_0x26bc68);}}return Array[_0x5341f0(0x1cf)](_0x191d9e['values']());}const VALID_JOURNEY_STATES=new Set([a108_0x4687f6(0x20d),a108_0x4687f6(0x1d4),'launched']);export function parseJourneyState(_0xa46ad8){const _0xd7681=a108_0x4687f6;if(typeof _0xa46ad8===_0xd7681(0x1df)&&VALID_JOURNEY_STATES[_0xd7681(0x231)](_0xa46ad8))return _0xa46ad8;return _0xd7681(0x20d);}export function entityToJourneyListItem(_0x401d03,_0x15f657){const _0x308536=a108_0x4687f6,_0x4b1b6e=_0x401d03[_0x308536(0x22a)];return{'id':_0x401d03['id'],'name':_0x4b1b6e[_0x308536(0x1c9)]??'','journeyBundleName':_0x4b1b6e[_0x308536(0x215)]??_0x4b1b6e[_0x308536(0x1c9)]??'','journeyBundleId':_0x4b1b6e[_0x308536(0x1e5)]??'','versionNumber':_0x4b1b6e[_0x308536(0x227)],'description':_0x4b1b6e[_0x308536(0x205)]??null,'state':parseJourneyState(_0x4b1b6e[_0x308536(0x1ff)]),'paused':_0x4b1b6e[_0x308536(0x1d6)]??![],'audienceId':_0x15f657,'folderId':_0x4b1b6e[_0x308536(0x1b9)]??_0x401d03[_0x308536(0x230)]?.[_0x308536(0x239)]?.[_0x308536(0x1e1)]?.['id']??null,'createdAt':_0x4b1b6e['createdAt']??'','updatedAt':_0x4b1b6e[_0x308536(0x1d2)]??''};}function convertToColumnId(_0x3cefe2){return _0x3cefe2['replace'](/-/g,'_');}function getStepEntries(_0x5295f0){const _0x2ddfc3=a108_0x4687f6;if(!_0x5295f0)return[];if(Array['isArray'](_0x5295f0))return _0x5295f0[_0x2ddfc3(0x1e2)](_0x76c782=>[_0x76c782['id'],_0x76c782]);return Object['entries'](_0x5295f0);}export function flattenJourneyActivation(_0x11f61e){const _0x400ea2=a108_0x4687f6,{activationParams:_0x57d2f1,activationId:_0x546f31,runAfterJourneyRefresh:_0x2c9fdc}=_0x11f61e[_0x400ea2(0x22a)];return{'id':_0x11f61e['id'],'activationId':_0x546f31,'runAfterJourneyRefresh':_0x2c9fdc,..._0x57d2f1};}function a108_0xedab(){const _0x44af33=['size','289680iMVRXF','timedOutPath','audienceId','limit','idx-','listJourneyActivations','exitCriterias','5025rMxxzz','getColumnMapping','listSegmentFolders','goalInflux','state','enteredSize','exitOrJumpSize','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','_exit_','client','description','activationStepsById','find','push','history','31257DOUGvL','listJourneysWithDetailsFromParentSegment','_variant_','draft','type','getActivationSankeyChart','branches','_milestone','cdp_customer_id','createdAt','journeyStageId','journeyBundleName','filter','branch','conditionSegmentId','variants','conversion','getTrafficData','milestoneInflux','createVersion','waitCondition','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','listJourneysFromParentSegment','getStatistics','WaitStep','createJourneyActivation','entryInflux','folder-segment','includeAllVersions','versionNumber','latestJourneyId','exitOrJumpRate','attributes','no-bundle-','fetchTrafficRaw','listActivations','checkJourneyAppendable','steps','relationships','has','all','AbTest','Journey\x20activation\x20step\x20not\x20found:\x20','Journey\x20not\x20found:\x20','stage','conditions','journeys','parentFolder','getJourney','get','listJourneysWithDetails','goal','update','Wait','NOT_FOUND','segmentFolderId','listEntitiesByFolder','84457bJzxbC','outtime_stage_','goalSize','includeHistory','exit_criteria','journey_','step','isArray','journey','journeyStages','JOURNEY_NOT_FOUND','getConversionSankeyChart','applyVersionDeduplication','resumeJourney','name','listJourneys','4kQYPeZ','getBundle','variant','set','from','4121915qmnFNK','intime_goal','updatedAt','activation','simulation','2312dOXFve','paused','createJourneyVersion','cdp_audience_','intime_stage_','segmentId','fixed','pause','getLatestJourneyId','jumpInflux','string','getActivation','data','map','time','journeyId','journeyBundleId','out','reduce','entryCriteria','add','milestone','createJourney','57650iGUgsj','create','1310880LUuTJn','Excluded\x20profiles','length','657gDaNna','exitInflux'];a108_0xedab=function(){return _0x44af33;};return a108_0xedab();}function col(_0x2e0ea9,_0x48a31e={}){const _0x3fa59a=a108_0x4687f6;return{'column':_0x2e0ea9,'direction':null,'stageIndex':null,'stageName':null,'category':_0x3fa59a(0x1db),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x48a31e};}export function generateColumnMapping(_0x5c84e3){const _0x17955f=a108_0x4687f6,_0xcc9363=[];_0xcc9363[_0x17955f(0x208)](col(_0x17955f(0x212))),_0xcc9363[_0x17955f(0x208)](col('intime_journey',{'direction':'in','category':_0x17955f(0x1c3)})),_0xcc9363[_0x17955f(0x208)](col('outtime_journey',{'direction':_0x17955f(0x1e6),'category':_0x17955f(0x1c3)}));_0x5c84e3['attributes'][_0x17955f(0x1b5)]&&_0xcc9363[_0x17955f(0x208)](col(_0x17955f(0x1d1),{'direction':'in','category':_0x17955f(0x1b5),'detail':_0x5c84e3[_0x17955f(0x22a)][_0x17955f(0x1b5)][_0x17955f(0x1c9)]||null}));const _0xa5b44=_0x5c84e3['attributes'][_0x17955f(0x1c4)]||[];for(let _0x2ce9b1=0x0;_0x2ce9b1<_0xa5b44[_0x17955f(0x1f0)];_0x2ce9b1++){const _0x1ece4b=_0xa5b44[_0x2ce9b1],_0x4ffc58=_0x1ece4b[_0x17955f(0x1c9)],_0x4e7098={'stageIndex':_0x2ce9b1,'stageName':_0x4ffc58},_0x22a23c=_0x1ece4b[_0x17955f(0x1e8)]?.[_0x17955f(0x1c9)]||null;_0xcc9363[_0x17955f(0x208)](col(_0x17955f(0x1d9)+_0x2ce9b1,{..._0x4e7098,'direction':'in','category':'stage','detail':_0x22a23c})),_0xcc9363[_0x17955f(0x208)](col(_0x17955f(0x1bc)+_0x2ce9b1,{..._0x4e7098,'direction':_0x17955f(0x1e6),'category':_0x17955f(0x236),'detail':_0x22a23c}));_0x1ece4b[_0x17955f(0x1ea)]&&_0xcc9363['push'](col(_0x17955f(0x1d9)+_0x2ce9b1+_0x17955f(0x211),{..._0x4e7098,'direction':'in','category':'milestone','detail':_0x1ece4b[_0x17955f(0x1ea)][_0x17955f(0x1c9)]||null}));const _0x194268=_0x1ece4b[_0x17955f(0x1fa)]||_0x1ece4b['exitCriteria']||[];for(let _0x4ed180=0x0;_0x4ed180<_0x194268[_0x17955f(0x1f0)];_0x4ed180++){_0xcc9363[_0x17955f(0x208)](col(_0x17955f(0x1d9)+_0x2ce9b1+_0x17955f(0x203)+_0x4ed180,{..._0x4e7098,'direction':'in','category':_0x17955f(0x1bf),'detail':_0x194268[_0x4ed180]['name']||null}));}const _0x41d899=getStepEntries(_0x1ece4b[_0x17955f(0x22f)]);for(const [_0x13842d,_0xcebc72]of _0x41d899){const _0x426d1b=convertToColumnId(_0x13842d),_0x4533ce=_0xcebc72['type']||null,_0x4292d6=_0xcebc72[_0x17955f(0x1c9)]||null,_0x2ff9e9={..._0x4e7098,'stepType':_0x4533ce,'stepName':_0x4292d6,'stepId':_0x13842d};_0xcc9363[_0x17955f(0x208)](col(_0x17955f(0x1d9)+_0x2ce9b1+'_'+_0x426d1b,{..._0x2ff9e9,'direction':'in','category':_0x17955f(0x1c1)})),_0xcc9363[_0x17955f(0x208)](col(_0x17955f(0x1bc)+_0x2ce9b1+'_'+_0x426d1b,{..._0x2ff9e9,'direction':_0x17955f(0x1e6),'category':_0x17955f(0x1c1)}));if(_0xcebc72[_0x17955f(0x20e)]==='DecisionPoint'&&_0xcebc72[_0x17955f(0x210)])for(const _0x145d1d of _0xcebc72[_0x17955f(0x210)]){_0x145d1d[_0x17955f(0x1da)]&&_0xcc9363[_0x17955f(0x208)](col('intime_stage_'+_0x2ce9b1+'_'+_0x426d1b+'_'+_0x145d1d[_0x17955f(0x1da)],{..._0x2ff9e9,'direction':'in','category':_0x17955f(0x217),'detail':_0x145d1d[_0x17955f(0x1c9)]||(_0x145d1d['excluded']?_0x17955f(0x1ef):null)}));}if((_0xcebc72['type']===_0x17955f(0x233)||_0xcebc72[_0x17955f(0x20e)]==='ABTest')&&_0xcebc72[_0x17955f(0x219)])for(const _0x5ea85e of _0xcebc72[_0x17955f(0x219)]){_0x5ea85e['id']&&_0xcc9363[_0x17955f(0x208)](col('intime_stage_'+_0x2ce9b1+'_'+_0x426d1b+_0x17955f(0x20c)+convertToColumnId(_0x5ea85e['id']),{..._0x2ff9e9,'direction':'in','category':_0x17955f(0x1cd),'detail':_0x5ea85e[_0x17955f(0x1c9)]||null}));}if(_0xcebc72[_0x17955f(0x20e)]===_0x17955f(0x222)||_0xcebc72[_0x17955f(0x20e)]===_0x17955f(0x1b7)){const _0x1358fd=[];if(_0xcebc72[_0x17955f(0x218)])_0x1358fd[_0x17955f(0x208)](_0xcebc72['conditionSegmentId']);else{if(Array[_0x17955f(0x1c2)](_0xcebc72[_0x17955f(0x237)]))for(const _0x41a884 of _0xcebc72['conditions']){_0x41a884['segmentId']&&!_0x41a884[_0x17955f(0x1f5)]&&_0x1358fd[_0x17955f(0x208)](_0x41a884['segmentId']);}else _0xcebc72[_0x17955f(0x21e)]?.['segmentId']&&_0x1358fd[_0x17955f(0x208)](_0xcebc72['waitCondition'][_0x17955f(0x1da)]);}for(const _0x21d21a of _0x1358fd){_0xcc9363[_0x17955f(0x208)](col('intime_stage_'+_0x2ce9b1+'_'+_0x426d1b+'_'+_0x21d21a,{..._0x2ff9e9,'direction':'in','category':_0x17955f(0x217)}));}}}}return _0xcc9363[_0x17955f(0x208)](col(_0x17955f(0x1e3))),_0xcc9363;}export function aggregateJourneyHistory(_0x320802){const _0x29db8b=a108_0x4687f6,_0x4a8300=_0x320802[_0x29db8b(0x1e7)]((_0x1ffa29,_0x272a02)=>_0x1ffa29+(_0x272a02[_0x29db8b(0x224)]??0x0),0x0),_0x1ad4b8=_0x320802[_0x29db8b(0x1e7)]((_0x2d81a7,_0x38d6ab)=>_0x2d81a7+(_0x38d6ab[_0x29db8b(0x1fe)]??0x0),0x0),_0x5a82fc=_0x320802[_0x29db8b(0x1e7)]((_0x39651c,_0x2f9e29)=>_0x39651c+((_0x2f9e29[_0x29db8b(0x1f2)]??0x0)+(_0x2f9e29[_0x29db8b(0x1de)]??0x0)),0x0),_0x51d9d4=_0x320802[_0x320802[_0x29db8b(0x1f0)]-0x1];return{'size':_0x51d9d4?.[_0x29db8b(0x1f3)]??0x0,'entered':_0x4a8300,'goal_achieved':_0x1ad4b8,'completion_rate':_0x1ad4b8&&_0x4a8300?_0x1ad4b8/_0x4a8300*0x64:0x0,'exit_or_jump':_0x5a82fc,'exit_or_jump_rate':_0x5a82fc&&_0x4a8300?_0x5a82fc/_0x4a8300*0x64:0x0};}export function aggregateStageHistory(_0x1f5dcf){const _0x995fb1=a108_0x4687f6,_0x548baf=_0x1f5dcf['reduce']((_0x2390f5,_0x54ba20)=>_0x2390f5+(_0x54ba20[_0x995fb1(0x224)]??0x0),0x0),_0x40cd94=_0x1f5dcf[_0x995fb1(0x1e7)]((_0x3c5649,_0x39ceb4)=>_0x3c5649+(_0x39ceb4[_0x995fb1(0x21c)]??0x0),0x0),_0x1cd3f5=_0x1f5dcf['reduce']((_0x4b8e71,_0x3b23f8)=>_0x4b8e71+((_0x3b23f8[_0x995fb1(0x1f2)]??0x0)+(_0x3b23f8[_0x995fb1(0x1de)]??0x0)),0x0),_0x39e0ab=_0x1f5dcf[_0x1f5dcf[_0x995fb1(0x1f0)]-0x1];return{'size':_0x39e0ab?.[_0x995fb1(0x1f3)]??0x0,'entered':_0x548baf,'milestone':_0x40cd94,'milestone_rate':_0x40cd94&&_0x548baf?_0x40cd94/_0x548baf*0x64:0x0,'exit_or_jump':_0x1cd3f5,'exit_or_jump_rate':_0x1cd3f5&&_0x548baf?_0x1cd3f5/_0x548baf*0x64:0x0};}export function assembleJourneyStats(_0x232085,_0x3d03db){const _0x21586b=a108_0x4687f6,_0x3e3e97=!!(_0x3d03db?.[_0x21586b(0x1cf)]||_0x3d03db?.['to'])&&!!_0x232085['history']?.[_0x21586b(0x1f0)];if(_0x3e3e97){const _0x122511=aggregateJourneyHistory(_0x232085[_0x21586b(0x209)]),_0x57411a={'journey_id':_0x232085[_0x21586b(0x1e4)],..._0x3d03db?.[_0x21586b(0x1cf)]&&{'from':_0x3d03db['from']},..._0x3d03db?.['to']&&{'to':_0x3d03db['to']},..._0x122511};return _0x3d03db?.[_0x21586b(0x1be)]&&(_0x57411a['history']=_0x232085['history']),_0x57411a;}return{'journey_id':_0x232085['journeyId'],'size':_0x232085[_0x21586b(0x1f3)],'entered':_0x232085[_0x21586b(0x200)],'goal_achieved':_0x232085[_0x21586b(0x1bd)],'completion_rate':_0x232085['completionRate'],'exit_or_jump':_0x232085[_0x21586b(0x201)],'exit_or_jump_rate':_0x232085[_0x21586b(0x229)]};}export function formatVersionsFromBundle(_0xeb3fd3){const _0x26989d=a108_0x4687f6,_0x481571=_0xeb3fd3['journeys']['map'](_0x348702=>({'journeyId':_0x348702['id'],'versionNumber':_0x348702[_0x26989d(0x22a)]['versionNumber']??0x0,'name':_0x348702['attributes'][_0x26989d(0x1c9)],'state':_0x348702[_0x26989d(0x22a)][_0x26989d(0x1ff)],'paused':_0x348702['attributes'][_0x26989d(0x1d6)],'createdAt':_0x348702[_0x26989d(0x22a)][_0x26989d(0x213)],'updatedAt':_0x348702[_0x26989d(0x22a)][_0x26989d(0x1d2)]}));return _0x481571['sort']((_0x49295a,_0x5904dd)=>_0x49295a['versionNumber']-_0x5904dd[_0x26989d(0x227)]),_0x481571;}export function synthesizePreBundleVersion(_0x4aaffc){const _0x5c0579=a108_0x4687f6;return{'journeyId':_0x4aaffc['id'],'versionNumber':0x1,'name':_0x4aaffc[_0x5c0579(0x22a)][_0x5c0579(0x1c9)],'state':_0x4aaffc[_0x5c0579(0x22a)][_0x5c0579(0x1ff)],'paused':_0x4aaffc[_0x5c0579(0x22a)][_0x5c0579(0x1d6)],'createdAt':_0x4aaffc[_0x5c0579(0x22a)]['createdAt'],'updatedAt':_0x4aaffc['attributes'][_0x5c0579(0x1d2)]};}export function buildStageNameMap(_0x169e80){const _0x2a16cb=a108_0x4687f6;return new Map(_0x169e80[_0x2a16cb(0x22a)][_0x2a16cb(0x1c4)]?.[_0x2a16cb(0x1e2)](_0x1fbdb7=>[_0x1fbdb7['id'],_0x1fbdb7['name']])??[]);}function a108_0x283c(_0x45a9a7,_0x149e89){_0x45a9a7=_0x45a9a7-0x1b5;const _0xedabf8=a108_0xedab();let _0x283c93=_0xedabf8[_0x45a9a7];return _0x283c93;}export class JourneySDK{[a108_0x4687f6(0x204)];constructor(_0x167104){const _0x4e39d4=a108_0x4687f6;this[_0x4e39d4(0x204)]=new CDPApiClient(_0x167104);}['applyVersionDeduplication'](_0x2f0b3f,_0xe3e224){return _0xe3e224?_0x2f0b3f:deduplicateJourneysByBundle(_0x2f0b3f);}async[a108_0x4687f6(0x23c)](_0x1b2003,_0x50a067){const _0xc80c0b=a108_0x4687f6;try{const _0x38372a=await this[_0xc80c0b(0x204)][_0xc80c0b(0x23c)](_0x1b2003);return{'journeys':this['applyVersionDeduplication'](_0x38372a['journeys'],_0x50a067),'activationStepsById':_0x38372a[_0xc80c0b(0x206)]};}catch(_0x2a5811){if(isHttp404Error(_0x2a5811))return{'journeys':[],'activationStepsById':new Map()};throw _0x2a5811;}}async[a108_0x4687f6(0x220)](_0x427cb4,_0xcefce0,_0x2b69f9){const _0x17a2fa=a108_0x4687f6;let _0x5ed32b=_0xcefce0;if(!_0x5ed32b)try{const _0x58971b=await this[_0x17a2fa(0x204)]['getParentSegmentFull'](_0x427cb4);_0x5ed32b=_0x58971b['rootFolderId']??undefined;}catch(_0x24bd7b){if(isHttp404Error(_0x24bd7b))return[];throw _0x24bd7b;}if(!_0x5ed32b)return[];let _0x381610;if(_0x2b69f9?.[_0x17a2fa(0x226)]){const _0x30fecb=await this[_0x17a2fa(0x204)][_0x17a2fa(0x1fd)](_0x427cb4),_0x2ab372=_0x30fecb[_0x17a2fa(0x1e2)](_0x131de6=>this['client'][_0x17a2fa(0x1ca)](_0x131de6['id'])),_0x2af25e=await Promise[_0x17a2fa(0x232)](_0x2ab372),_0x149ccc=new Set();_0x381610=_0x2af25e['flat']()[_0x17a2fa(0x216)](_0x53b1bc=>{const _0x559258=_0x17a2fa;if(_0x149ccc[_0x559258(0x231)](_0x53b1bc['id']))return![];return _0x149ccc[_0x559258(0x1e9)](_0x53b1bc['id']),!![];});}else{const _0x422a6c=await this[_0x17a2fa(0x204)][_0x17a2fa(0x1ba)](_0x5ed32b,0x20,![]),_0x19f708=_0x422a6c[_0x17a2fa(0x1e1)],_0x2b36bc=_0x19f708[_0x17a2fa(0x216)](_0x1b6e95=>_0x1b6e95[_0x17a2fa(0x20e)]===_0x17a2fa(0x1c3));_0x381610=_0x2b36bc['map'](_0x73a34e=>entityToJourneyListItem(_0x73a34e,_0x427cb4));}return this[_0x17a2fa(0x1c7)](_0x381610,_0x2b69f9?.[_0x17a2fa(0x226)]);}async['listJourneysWithFolders'](_0x5c295b,_0x2c5703,_0x138689){const _0x973feb=a108_0x4687f6;if(!_0x2c5703)return{'journeys':[],'folders':[]};const _0x332128=await this['client'][_0x973feb(0x1ba)](_0x2c5703,0x20,![]),_0xeef91e=_0x332128[_0x973feb(0x1e1)],_0x2028dc=_0xeef91e[_0x973feb(0x216)](_0x584cd8=>_0x584cd8['type']===_0x973feb(0x225)&&_0x584cd8['id']!==_0x2c5703),_0x3372f8=_0x2028dc[_0x973feb(0x1e2)](_0x403a66=>({'id':_0x403a66['id'],'name':_0x403a66[_0x973feb(0x22a)]['name']})),_0x5c959a=_0xeef91e[_0x973feb(0x216)](_0x5e4188=>_0x5e4188[_0x973feb(0x20e)]==='journey'),_0x50a00f=_0x5c959a[_0x973feb(0x1e2)](_0x2131c1=>entityToJourneyListItem(_0x2131c1,_0x5c295b));return{'journeys':this['applyVersionDeduplication'](_0x50a00f,_0x138689?.[_0x973feb(0x226)]),'folders':_0x3372f8};}async[a108_0x4687f6(0x20b)](_0x5eb4e2,_0x103ba0){const _0x2ba859=a108_0x4687f6;let _0x1e97ea;try{_0x1e97ea=await this[_0x2ba859(0x204)][_0x2ba859(0x1fd)](_0x5eb4e2);}catch(_0x837bad){if(isHttp404Error(_0x837bad))return{'journeys':[],'activationStepsById':new Map()};throw _0x837bad;}const _0x31de29=_0x1e97ea[_0x2ba859(0x1e2)](async _0x216f3b=>{const _0x20ab5c=_0x2ba859;return await this[_0x20ab5c(0x23c)](_0x216f3b['id'],_0x103ba0?.['includeAllVersions']);}),_0x22dc9f=await Promise[_0x2ba859(0x232)](_0x31de29),_0x5b4f38=new Map(),_0x166c7c=[];for(const _0x4878c0 of _0x22dc9f){_0x166c7c[_0x2ba859(0x208)](..._0x4878c0[_0x2ba859(0x238)]);for(const [_0x371400,_0x2bb0e0]of _0x4878c0[_0x2ba859(0x206)]){_0x5b4f38['set'](_0x371400,_0x2bb0e0);}}const _0x2db931=new Set(),_0x47a8b0=_0x166c7c['filter'](_0x34c73b=>{const _0x5ee57f=_0x2ba859;if(_0x2db931[_0x5ee57f(0x231)](_0x34c73b['id']))return![];return _0x2db931[_0x5ee57f(0x1e9)](_0x34c73b['id']),!![];});return{'journeys':this[_0x2ba859(0x1c7)](_0x47a8b0,_0x103ba0?.['includeAllVersions']),'activationStepsById':_0x5b4f38};}async[a108_0x4687f6(0x23a)](_0x388f51){const _0x139f77=a108_0x4687f6;try{return await this[_0x139f77(0x204)][_0x139f77(0x23a)](_0x388f51);}catch(_0x2b1222){if(isHttp404Error(_0x2b1222))throw new SDKError(ErrorCode[_0x139f77(0x1c5)],_0x139f77(0x235)+_0x388f51,_0x2b1222);throw _0x2b1222;}}async['resolveJourneyId'](_0x2e9fb6,_0x3af77e){const _0x45fd26=a108_0x4687f6,_0x1a8f71=await this[_0x45fd26(0x220)](_0x2e9fb6),_0x491305=_0x1a8f71[_0x45fd26(0x207)](_0x48d709=>_0x48d709[_0x45fd26(0x215)]['toLowerCase']()===_0x3af77e['toLowerCase']());if(!_0x491305)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x45fd26(0x235)+_0x3af77e,undefined,{'helpText':_0x45fd26(0x202)});return _0x491305['id'];}async[a108_0x4687f6(0x221)](_0x93105f,_0x2f25ec){const _0x26e81e=a108_0x4687f6;try{return await this[_0x26e81e(0x204)]['getJourneyStatistics'](_0x93105f,_0x2f25ec);}catch(_0x1a22ad){if(isHttp404Error(_0x1a22ad))throw new SDKError(ErrorCode[_0x26e81e(0x1c5)],_0x26e81e(0x235)+_0x93105f,_0x1a22ad);throw _0x1a22ad;}}async[a108_0x4687f6(0x21b)](_0x112833,_0xf0dc81){const _0x39530f=a108_0x4687f6,_0xe6da90={'from':_0xf0dc81?.[_0x39530f(0x1cf)],'to':_0xf0dc81?.['to'],'limit':_0xf0dc81?.[_0x39530f(0x1f7)]},_0x48af03=_0xf0dc81?.['type']!==_0x39530f(0x21a);try{const [_0x44b592,_0x15c6db]=await Promise[_0x39530f(0x232)]([this[_0x39530f(0x22c)](_0x112833,_0xf0dc81?.[_0x39530f(0x20e)],_0xe6da90),_0x48af03?this[_0x39530f(0x23a)](_0x112833):undefined]);if(_0x44b592[_0x39530f(0x1d3)]&&_0x15c6db){const _0x49ddf4=buildStageNameMap(_0x15c6db);_0x44b592[_0x39530f(0x1d3)]=_0x44b592['activation'][_0x39530f(0x1e2)](_0x4ad4ca=>({..._0x4ad4ca,'journeyStageName':_0x49ddf4[_0x39530f(0x23b)](_0x4ad4ca['journeyStageId'])??_0x4ad4ca[_0x39530f(0x214)]}));}return _0x44b592;}catch(_0x339c75){if(isHttp404Error(_0x339c75))throw new SDKError(ErrorCode[_0x39530f(0x1c5)],_0x39530f(0x235)+_0x112833,_0x339c75);throw _0x339c75;}}async['fetchTrafficRaw'](_0x1e89c1,_0x39bd2f,_0x52b254){const _0x4de64b=a108_0x4687f6;if(_0x39bd2f==='conversion'){const _0x37553e=await this['client'][_0x4de64b(0x1c6)](_0x1e89c1,_0x52b254);return{'conversion':_0x37553e};}if(_0x39bd2f==='activation'){const _0x1a009c=await this['client']['getActivationSankeyChart'](_0x1e89c1,_0x52b254);return{'activation':_0x1a009c};}const [_0x269b52,_0x494eae]=await Promise['all']([this[_0x4de64b(0x204)][_0x4de64b(0x1c6)](_0x1e89c1,_0x52b254),this['client'][_0x4de64b(0x20f)](_0x1e89c1,_0x52b254)]);return{'conversion':_0x269b52,'activation':_0x494eae};}async[a108_0x4687f6(0x1dc)](_0x88d22d){const _0xc5c9c3=a108_0x4687f6;try{return await this['client']['pauseJourney'](_0x88d22d);}catch(_0x5494bf){if(isHttp404Error(_0x5494bf))throw new SDKError(ErrorCode[_0xc5c9c3(0x1c5)],_0xc5c9c3(0x235)+_0x88d22d,_0x5494bf);throw _0x5494bf;}}async['resume'](_0xf22008){const _0x40afec=a108_0x4687f6;try{return await this['client'][_0x40afec(0x1c8)](_0xf22008);}catch(_0x5bbd10){if(isHttp404Error(_0x5bbd10))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0xf22008,_0x5bbd10);throw _0x5bbd10;}}async[a108_0x4687f6(0x1ed)](_0x562f17){const _0x2463ae=a108_0x4687f6;return await this[_0x2463ae(0x204)][_0x2463ae(0x1eb)](_0x562f17);}async[a108_0x4687f6(0x1b6)](_0x493c9f,_0x5118a1){const _0x5727dc=a108_0x4687f6;try{return await this['client']['updateJourney'](_0x493c9f,_0x5118a1);}catch(_0x21e0fa){if(isHttp404Error(_0x21e0fa))throw new SDKError(ErrorCode[_0x5727dc(0x1c5)],'Journey\x20not\x20found:\x20'+_0x493c9f,_0x21e0fa);throw _0x21e0fa;}}async[a108_0x4687f6(0x1e0)](_0x22312a,_0x42f7ef){const _0x24b3cc=a108_0x4687f6;try{return await this['client']['getJourneyActivation'](_0x22312a,_0x42f7ef);}catch(_0x3d0026){if(isHttp404Error(_0x3d0026))throw new SDKError(ErrorCode[_0x24b3cc(0x1b8)],_0x24b3cc(0x234)+_0x42f7ef+'\x20in\x20journey\x20'+_0x22312a,_0x3d0026);throw _0x3d0026;}}async[a108_0x4687f6(0x22d)](_0x147e55){const _0xe49b16=a108_0x4687f6;try{return await this[_0xe49b16(0x204)][_0xe49b16(0x1f9)](_0x147e55);}catch(_0x28ca9f){if(isHttp404Error(_0x28ca9f))return[];throw _0x28ca9f;}}async['listActivationsFlat'](_0x3dcdba){const _0x3104a9=a108_0x4687f6,_0x4f4af2=await this[_0x3104a9(0x22d)](_0x3dcdba);return _0x4f4af2[_0x3104a9(0x1e2)](flattenJourneyActivation);}async['createActivation'](_0xfbcfd4,_0x270908){const _0x3a01a6=a108_0x4687f6;return await this['client'][_0x3a01a6(0x223)](_0xfbcfd4,_0x270908);}async[a108_0x4687f6(0x1fc)](_0x53c83f){const _0x253607=a108_0x4687f6,_0x2f7c29=await this[_0x253607(0x23a)](_0x53c83f),_0x1012a8=generateColumnMapping(_0x2f7c29);return{'journeyId':_0x2f7c29['id'],'journeyName':_0x2f7c29['attributes'][_0x253607(0x1c9)],'database':_0x253607(0x1d8)+_0x2f7c29[_0x253607(0x22a)][_0x253607(0x1f6)],'table':_0x253607(0x1c0)+_0x2f7c29['id'],'columns':_0x1012a8};}async[a108_0x4687f6(0x1cc)](_0x4ee1cd){const _0x3c9766=a108_0x4687f6;return this[_0x3c9766(0x204)]['getJourneyBundle'](_0x4ee1cd);}async[a108_0x4687f6(0x1dd)](_0x196a3d){const _0xa806a9=a108_0x4687f6;if(!_0x196a3d)return undefined;try{const _0x31e792=await this[_0xa806a9(0x1cc)](_0x196a3d);return _0x31e792['latestJourneyId'];}catch{return undefined;}}async['listVersions'](_0x1aa038){const _0x3290c1=a108_0x4687f6,_0x13ee02=await this[_0x3290c1(0x23a)](_0x1aa038),_0x508b90=_0x13ee02[_0x3290c1(0x22a)][_0x3290c1(0x1e5)];if(!_0x508b90)return{'bundleId':'','bundleName':_0x13ee02['attributes'][_0x3290c1(0x1c9)],'bundleDescription':_0x13ee02[_0x3290c1(0x22a)]['description']??null,'latestJourneyId':_0x13ee02['id'],'versions':[synthesizePreBundleVersion(_0x13ee02)]};const _0x30344e=await this[_0x3290c1(0x1cc)](_0x508b90);return{'bundleId':_0x508b90,'bundleName':_0x30344e[_0x3290c1(0x1c9)],'bundleDescription':_0x30344e[_0x3290c1(0x205)]??null,'latestJourneyId':_0x30344e[_0x3290c1(0x228)],'versions':formatVersionsFromBundle(_0x30344e)};}async[a108_0x4687f6(0x21d)](_0x176365){const _0x300038=a108_0x4687f6,_0x1162cc=await this[_0x300038(0x23a)](_0x176365),_0x224eb7=_0x1162cc[_0x300038(0x22a)]['journeyBundleId'];if(!_0x224eb7)throw new SDKError(ErrorCode['INVALID_ARGUMENT'],_0x300038(0x21f));await this['client'][_0x300038(0x22e)](_0x224eb7);const _0x924b89=await this['client']['getJourneyBundle'](_0x224eb7),_0x190436=_0x924b89[_0x300038(0x1c9)]+'\x20v'+(_0x924b89['lastVersionNumber']+0x1);return this['client'][_0x300038(0x1d7)](_0x224eb7,{'sourceId':_0x176365,'attributes':{'name':_0x190436}});}}
@@ -1 +1 @@
1
- (function(_0x2771af,_0x53a6d5){const _0x7c5333=a109_0x1759,_0x32d4f7=_0x2771af();while(!![]){try{const _0x997951=-parseInt(_0x7c5333(0x165))/0x1+parseInt(_0x7c5333(0x166))/0x2+parseInt(_0x7c5333(0x169))/0x3+parseInt(_0x7c5333(0x16b))/0x4+-parseInt(_0x7c5333(0x167))/0x5*(-parseInt(_0x7c5333(0x16a))/0x6)+parseInt(_0x7c5333(0x160))/0x7*(-parseInt(_0x7c5333(0x16c))/0x8)+-parseInt(_0x7c5333(0x163))/0x9*(parseInt(_0x7c5333(0x168))/0xa);if(_0x997951===_0x53a6d5)break;else _0x32d4f7['push'](_0x32d4f7['shift']());}catch(_0x576ac3){_0x32d4f7['push'](_0x32d4f7['shift']());}}}(a109_0x3b1f,0x95c2d));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache('last_chat_id','llm/chat');export function saveLastChatId(_0x1870e8){const _0xabf7bb=a109_0x1759;chatIdCache[_0xabf7bb(0x164)](_0x1870e8);}function a109_0x1759(_0x283729,_0x4edd22){_0x283729=_0x283729-0x160;const _0x3b1ffd=a109_0x3b1f();let _0x1759d7=_0x3b1ffd[_0x283729];return _0x1759d7;}export function loadLastChatId(){const _0x4879c8=a109_0x1759;return chatIdCache[_0x4879c8(0x162)]();}export function clearLastChatId(){const _0x461a92=a109_0x1759;chatIdCache[_0x461a92(0x161)]();}function a109_0x3b1f(){const _0x754ec6=['2309632fGjgTR','8HnkfxO','6397153mSoRpb','clear','read','3654333KGPVrx','write','767973MddGNz','1582564OwCpwI','4517875qDwbyN','10RUSHfs','1287135uYucpX','6JVGCPT'];a109_0x3b1f=function(){return _0x754ec6;};return a109_0x3b1f();}
1
+ const a109_0x38d665=a109_0x3214;function a109_0x3214(_0x85940f,_0x5a295d){_0x85940f=_0x85940f-0x186;const _0x23ba84=a109_0x23ba();let _0x321418=_0x23ba84[_0x85940f];return _0x321418;}(function(_0xcf1c25,_0x47feae){const _0x3d71f3=a109_0x3214,_0x777434=_0xcf1c25();while(!![]){try{const _0x54fe18=-parseInt(_0x3d71f3(0x18d))/0x1*(parseInt(_0x3d71f3(0x194))/0x2)+-parseInt(_0x3d71f3(0x186))/0x3*(-parseInt(_0x3d71f3(0x187))/0x4)+-parseInt(_0x3d71f3(0x190))/0x5+-parseInt(_0x3d71f3(0x18a))/0x6+parseInt(_0x3d71f3(0x18b))/0x7+-parseInt(_0x3d71f3(0x189))/0x8+-parseInt(_0x3d71f3(0x18e))/0x9*(-parseInt(_0x3d71f3(0x18c))/0xa);if(_0x54fe18===_0x47feae)break;else _0x777434['push'](_0x777434['shift']());}catch(_0x4bb81c){_0x777434['push'](_0x777434['shift']());}}}(a109_0x23ba,0x8dda6));import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a109_0x38d665(0x191),a109_0x38d665(0x188));export function saveLastChatId(_0x25e3c2){const _0x5d765c=a109_0x38d665;chatIdCache[_0x5d765c(0x193)](_0x25e3c2);}export function loadLastChatId(){const _0x1d012c=a109_0x38d665;return chatIdCache[_0x1d012c(0x18f)]();}export function clearLastChatId(){const _0x11c722=a109_0x38d665;chatIdCache[_0x11c722(0x192)]();}function a109_0x23ba(){const _0x215766=['read','108640VVyCFa','last_chat_id','clear','write','2ChGfro','3EUMshe','1354796wjwoJE','llm/chat','2601232ixJGXz','6085182PkUTsf','5846855xWKsZV','40spQRlE','54331fOyjEI','1850571BIHQzt'];a109_0x23ba=function(){return _0x215766;};return a109_0x23ba();}