@treasuredata/tdx 2026.3.53 → 2026.3.54
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.
- package/dist/bin.js +1 -1
- package/dist/build-info.json +3 -3
- package/dist/cli-categories.js +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/activations.js +1 -1
- package/dist/commands/agent-command.js +1 -1
- package/dist/commands/agent-test-command.js +1 -1
- package/dist/commands/api-command.js +1 -1
- package/dist/commands/auth-command.js +1 -1
- package/dist/commands/cas-command.js +1 -1
- package/dist/commands/cas-segment-command.js +1 -1
- package/dist/commands/chat-command.js +1 -1
- package/dist/commands/claude-command.js +1 -1
- package/dist/commands/claude-statusline-command.js +1 -1
- package/dist/commands/claude-usage-command.js +1 -1
- package/dist/commands/command.js +1 -1
- package/dist/commands/connection-command.js +1 -1
- package/dist/commands/databases.js +1 -1
- package/dist/commands/delivery-command.js +1 -1
- package/dist/commands/describe.js +1 -1
- package/dist/commands/engage-campaign-pull-command.js +1 -1
- package/dist/commands/engage-campaign-push-command.js +1 -1
- package/dist/commands/engage-campaign-validate-command.js +1 -1
- package/dist/commands/engage-command.js +1 -1
- package/dist/commands/engage-template-pull-command.js +1 -1
- package/dist/commands/engage-template-push-command.js +1 -1
- package/dist/commands/engage-template-validate-command.js +1 -1
- package/dist/commands/job-command.js +1 -1
- package/dist/commands/journey-command.js +1 -1
- package/dist/commands/journey-validate-command.js +1 -1
- package/dist/commands/llm-command.js +1 -1
- package/dist/commands/mcp-command.js +1 -1
- package/dist/commands/parent-segment-command.js +1 -1
- package/dist/commands/policy-command.js +1 -1
- package/dist/commands/profile-command.js +1 -1
- package/dist/commands/profiles-command.js +1 -1
- package/dist/commands/query-command.js +1 -1
- package/dist/commands/schedule-command.js +1 -1
- package/dist/commands/segment-command.js +1 -1
- package/dist/commands/segment-create-command.js +1 -1
- package/dist/commands/segment-fields-command.js +1 -1
- package/dist/commands/segment-pull-command.js +1 -1
- package/dist/commands/segment-push-command.js +1 -1
- package/dist/commands/segment-update-command.js +1 -1
- package/dist/commands/segment-use-command.js +1 -1
- package/dist/commands/segment-validate-command.js +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/show.js +1 -1
- package/dist/commands/status-command.js +1 -1
- package/dist/commands/tables.js +1 -1
- package/dist/commands/unset-command.js +1 -1
- package/dist/commands/upgrade-command.js +1 -1
- package/dist/commands/use-command.js +1 -1
- package/dist/commands/user-command.js +1 -1
- package/dist/commands/work-command.js +1 -1
- package/dist/commands/workflow-command.js +1 -1
- package/dist/core/auth.js +1 -1
- package/dist/core/command-output.js +1 -1
- package/dist/core/config.js +1 -1
- package/dist/core/connection-cache.js +1 -1
- package/dist/core/constants.js +1 -1
- package/dist/core/credential-cache.js +1 -1
- package/dist/core/global-context.js +1 -1
- package/dist/core/keychain.js +1 -1
- package/dist/core/oauth-keychain.js +1 -1
- package/dist/core/oauth.js +1 -1
- package/dist/core/profile.js +1 -1
- package/dist/core/project-config.js +1 -1
- package/dist/core/session.js +1 -1
- package/dist/core/user-cache.js +1 -1
- package/dist/core/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp/server.js +1 -1
- package/dist/mcp/tools/index.js +1 -1
- package/dist/mcp/tools/tdx-run.js +1 -1
- package/dist/mcp/tools/tdx-search.js +1 -1
- package/dist/mcp/tools/work-create-item.js +1 -1
- package/dist/mcp/utils.js +1 -1
- package/dist/proxy/claude-usage-tracker.js +1 -1
- package/dist/proxy/passthrough-server.js +1 -1
- package/dist/proxy/sse-usage-parser.js +1 -1
- package/dist/sdk/agent/agent-config.js +1 -1
- package/dist/sdk/agent/agent-ref-parser.js +1 -1
- package/dist/sdk/agent/agent-yaml.js +1 -1
- package/dist/sdk/agent/test/evaluator.js +1 -1
- package/dist/sdk/agent/test/executor.js +1 -1
- package/dist/sdk/agent/test/index.js +1 -1
- package/dist/sdk/agent/test/output.js +1 -1
- package/dist/sdk/agent/test/parser.js +1 -1
- package/dist/sdk/agent/tool-target-registry.js +1 -1
- package/dist/sdk/api.js +1 -1
- package/dist/sdk/cas/cas-api-client.js +1 -1
- package/dist/sdk/cas/cas-audience-yaml.js +1 -1
- package/dist/sdk/cas/cas-segment-yaml.js +1 -1
- package/dist/sdk/cas/index.js +1 -1
- package/dist/sdk/cas/pull-workflow.js +1 -1
- package/dist/sdk/cas/push-workflow.js +1 -1
- package/dist/sdk/client/cdp-api-client.js +1 -1
- package/dist/sdk/client/delivery-api-client.js +1 -1
- package/dist/sdk/client/endpoints.js +1 -1
- package/dist/sdk/client/engage-api-client.js +1 -1
- package/dist/sdk/client/http-client.js +1 -1
- package/dist/sdk/client/llm-api-client.js +1 -1
- package/dist/sdk/client/oauth-refresh.js +1 -1
- package/dist/sdk/client/rate-limiter.js +1 -1
- package/dist/sdk/client/td-api-client.js +1 -1
- package/dist/sdk/client/trino-api-client.js +1 -1
- package/dist/sdk/client/workflow-client.js +1 -1
- package/dist/sdk/connection-validator.js +1 -1
- package/dist/sdk/connection.js +1 -1
- package/dist/sdk/delivery.js +1 -1
- package/dist/sdk/engage/campaign-pull.js +1 -1
- package/dist/sdk/engage/campaign-push.js +1 -1
- package/dist/sdk/engage/campaign-validator.js +1 -1
- package/dist/sdk/engage/campaign-yaml.js +1 -1
- package/dist/sdk/engage/template-pull.js +1 -1
- package/dist/sdk/engage/template-push.js +1 -1
- package/dist/sdk/engage/template-validator.js +1 -1
- package/dist/sdk/engage/template-yaml.js +1 -1
- package/dist/sdk/engage/types/campaign-def.js +1 -1
- package/dist/sdk/engage/types/campaign-schema.js +1 -1
- package/dist/sdk/engage/types/template-schema.js +1 -1
- package/dist/sdk/engage.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/io/index.js +1 -1
- package/dist/sdk/io/node-filesystem.js +1 -1
- package/dist/sdk/job.js +1 -1
- package/dist/sdk/journey.js +1 -1
- package/dist/sdk/llm/chat-cache.js +1 -1
- package/dist/sdk/llm/index.js +1 -1
- package/dist/sdk/llm/llm-backup-utils.js +1 -1
- package/dist/sdk/llm/model-factors.js +1 -1
- package/dist/sdk/personalization.js +1 -1
- package/dist/sdk/policy.js +1 -1
- package/dist/sdk/query/index.js +1 -1
- package/dist/sdk/query/sql-parser.js +1 -1
- package/dist/sdk/realtime.js +1 -1
- package/dist/sdk/schedule.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/fields-display.js +1 -1
- package/dist/sdk/segment/file-discovery.js +1 -1
- package/dist/sdk/segment/journey-utils.js +1 -1
- package/dist/sdk/segment/journey-validator.js +1 -1
- package/dist/sdk/segment/journey-yaml.js +1 -1
- package/dist/sdk/segment/parent-segment-preview.js +1 -1
- package/dist/sdk/segment/parent-segment-yaml.js +1 -1
- package/dist/sdk/segment/pull-workflow.js +1 -1
- package/dist/sdk/segment/push-recovery.js +1 -1
- package/dist/sdk/segment/push-workflow.js +1 -1
- package/dist/sdk/segment/resolution-context.js +1 -1
- package/dist/sdk/segment/segment-path-parser.js +1 -1
- package/dist/sdk/segment/segment-ref-parser.js +1 -1
- package/dist/sdk/segment/segment-validator.js +1 -1
- package/dist/sdk/segment/target-resolution.js +1 -1
- package/dist/sdk/segment/tdx-config.js +1 -1
- package/dist/sdk/segment/types/activation-schema.js +1 -1
- package/dist/sdk/segment/types/journey-def.js +1 -1
- package/dist/sdk/segment/types/journey-schema.js +1 -1
- package/dist/sdk/segment/types/segment-def.js +1 -1
- package/dist/sdk/segment/types/segment-schema.js +1 -1
- package/dist/sdk/segment/validate-files.js +1 -1
- package/dist/sdk/segment/yaml-validator.js +1 -1
- package/dist/sdk/segment.js +1 -1
- package/dist/sdk/types/index.js +1 -1
- package/dist/sdk/types/progress.js +1 -1
- package/dist/sdk/types/workspace.js +1 -1
- package/dist/sdk/user.js +1 -1
- package/dist/sdk/util/format-detector.js +1 -1
- package/dist/sdk/util/formatters.js +1 -1
- package/dist/sdk/util/index.js +1 -1
- package/dist/sdk/util/paginate.js +1 -1
- package/dist/sdk/util/tree-formatter.js +1 -1
- package/dist/sdk/workflow/archive-validation.js +1 -1
- package/dist/sdk/workflow/clone-workflow.js +1 -1
- package/dist/sdk/workflow/index.js +1 -1
- package/dist/sdk/workflow/pull-workflow.js +1 -1
- package/dist/sdk/workflow/push-workflow.js +1 -1
- package/dist/sdk/workflow/tdx-config.js +1 -1
- package/dist/sdk/workflow/workflow-utils.js +1 -1
- package/dist/sdk/workspace/frontmatter.js +1 -1
- package/dist/sdk/workspace/git.js +1 -1
- package/dist/sdk/workspace/index.js +1 -1
- package/dist/sdk/workspace/templates.js +1 -1
- package/dist/sdk/workspace/weekly.js +1 -1
- package/dist/sdk/workspace/wikilinks.js +1 -1
- package/dist/test-utils/command-runner.js +1 -1
- package/dist/test-utils/factories.js +1 -1
- package/dist/test-utils/fixtures.js +1 -1
- package/dist/test-utils/http-mock.js +1 -1
- package/dist/test-utils/index.js +1 -1
- package/dist/utils/async.js +1 -1
- package/dist/utils/colors.js +1 -1
- package/dist/utils/diff.js +1 -1
- package/dist/utils/file-permissions.js +1 -1
- package/dist/utils/file-reader.js +1 -1
- package/dist/utils/github-releases.js +1 -1
- package/dist/utils/global-cache.js +1 -1
- package/dist/utils/json-loader.js +1 -1
- package/dist/utils/local-cache.js +1 -1
- package/dist/utils/logger/formatters/default-formatter.js +1 -1
- package/dist/utils/logger/formatters/index.js +1 -1
- package/dist/utils/logger/handlers/console-handler.js +1 -1
- package/dist/utils/logger/handlers/file-handler.js +1 -1
- package/dist/utils/logger/handlers/index.js +1 -1
- package/dist/utils/logger/handlers/null-handler.js +1 -1
- package/dist/utils/logger/index.js +1 -1
- package/dist/utils/logger/logger.js +1 -1
- package/dist/utils/logger/types.js +1 -1
- package/dist/utils/option-validation.js +1 -1
- package/dist/utils/process.js +1 -1
- package/dist/utils/prompt.js +1 -1
- package/dist/utils/spinner.js +1 -1
- package/dist/utils/sse-parser.js +1 -1
- package/dist/utils/string-utils.js +1 -1
- package/dist/utils/table-ref-parser.js +1 -1
- package/dist/utils/tdx-logger.js +1 -1
- package/dist/utils/version-check.js +1 -1
- package/package.json +1 -1
package/dist/sdk/journey.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function a131_0x3e31(_0x58e43c,_0x39f2f5){_0x58e43c=_0x58e43c-0xdc;const _0x52d306=a131_0x52d3();let _0x3e315d=_0x52d306[_0x58e43c];return _0x3e315d;}const a131_0x25c503=a131_0x3e31;(function(_0x24918d,_0xc1c0cd){const _0x2757a4=a131_0x3e31,_0x262758=_0x24918d();while(!![]){try{const _0x20300e=parseInt(_0x2757a4(0x157))/0x1+-parseInt(_0x2757a4(0x161))/0x2*(parseInt(_0x2757a4(0x110))/0x3)+parseInt(_0x2757a4(0x15f))/0x4*(-parseInt(_0x2757a4(0x118))/0x5)+-parseInt(_0x2757a4(0x154))/0x6*(parseInt(_0x2757a4(0x13b))/0x7)+-parseInt(_0x2757a4(0xec))/0x8+-parseInt(_0x2757a4(0xe8))/0x9+parseInt(_0x2757a4(0xeb))/0xa;if(_0x20300e===_0xc1c0cd)break;else _0x262758['push'](_0x262758['shift']());}catch(_0x4f1039){_0x262758['push'](_0x262758['shift']());}}}(a131_0x52d3,0xdbe8d));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x218352){const _0x4d7020=a131_0x3e31;return _0x218352[_0x4d7020(0x168)]??_0x218352[_0x4d7020(0x108)]?.['journeyBundleId']??undefined;}function getVersionNumber(_0xa5517b){const _0x212833=a131_0x3e31;return _0xa5517b[_0x212833(0x16a)]??_0xa5517b['attributes']?.[_0x212833(0x16a)]??0x0;}function getState(_0x19f934){const _0x19f9e5=a131_0x3e31;return _0x19f934['state']??_0x19f934[_0x19f9e5(0x108)]?.[_0x19f9e5(0xf3)];}export function deduplicateJourneysByBundle(_0x649d9e){const _0x43cf34=a131_0x3e31,_0x2fe19=new Map();let _0xdfdbff=0x0;for(const _0x21ef8f of _0x649d9e){const _0x5de31c=getBundleId(_0x21ef8f);if(!_0x5de31c){const _0xab72a9=_0x43cf34(0x158)+(_0x21ef8f['id']??_0x43cf34(0x122)+_0xdfdbff++);_0x2fe19['set'](_0xab72a9,_0x21ef8f);continue;}const _0x4ae7d6=_0x2fe19['get'](_0x5de31c);if(!_0x4ae7d6)_0x2fe19[_0x43cf34(0xfc)](_0x5de31c,_0x21ef8f);else{const _0x1bddd8=getState(_0x4ae7d6)===_0x43cf34(0x125),_0x2a9a6c=getState(_0x21ef8f)===_0x43cf34(0x125);if(_0x2a9a6c&&!_0x1bddd8)_0x2fe19[_0x43cf34(0xfc)](_0x5de31c,_0x21ef8f);else{if(!_0x2a9a6c&&_0x1bddd8){}else{const _0x5cbc3f=getVersionNumber(_0x4ae7d6),_0x458a3b=getVersionNumber(_0x21ef8f);_0x458a3b>_0x5cbc3f&&_0x2fe19['set'](_0x5de31c,_0x21ef8f);}}}}return Array[_0x43cf34(0xfe)](_0x2fe19[_0x43cf34(0x137)]());}const VALID_JOURNEY_STATES=new Set([a131_0x25c503(0xdd),a131_0x25c503(0xf2),'launched']);export function parseJourneyState(_0x249812){const _0x50db07=a131_0x25c503;if(typeof _0x249812===_0x50db07(0x14e)&&VALID_JOURNEY_STATES['has'](_0x249812))return _0x249812;return _0x50db07(0xdd);}export function entityToJourneyListItem(_0x11186b,_0x5f2717){const _0x3757b2=a131_0x25c503,_0x5b7528=_0x11186b[_0x3757b2(0x108)];return{'id':_0x11186b['id'],'name':_0x5b7528['name']??'','journeyBundleName':_0x5b7528[_0x3757b2(0xfd)]??_0x5b7528[_0x3757b2(0x142)]??'','journeyBundleId':_0x5b7528[_0x3757b2(0x168)]??'','versionNumber':_0x5b7528['versionNumber'],'description':_0x5b7528[_0x3757b2(0xdf)]??null,'state':parseJourneyState(_0x5b7528[_0x3757b2(0xf3)]),'paused':_0x5b7528['paused']??![],'audienceId':_0x5f2717,'folderId':_0x5b7528['segmentFolderId']??_0x11186b['relationships']?.[_0x3757b2(0x14f)]?.['data']?.['id']??null,'createdAt':_0x5b7528[_0x3757b2(0x15a)]??'','updatedAt':_0x5b7528[_0x3757b2(0xe7)]??''};}function convertToColumnId(_0x54cd70){const _0x4721b2=a131_0x25c503;return _0x54cd70[_0x4721b2(0x13a)](/-/g,'_');}function getStepEntries(_0x2a52c8){const _0x5c6322=a131_0x25c503;if(!_0x2a52c8)return[];if(Array[_0x5c6322(0xf5)](_0x2a52c8))return _0x2a52c8[_0x5c6322(0x166)](_0x4c7f3d=>[_0x4c7f3d['id'],_0x4c7f3d]);return Object[_0x5c6322(0x134)](_0x2a52c8);}export function flattenJourneyActivation(_0x8005f1){const _0x3258b4=a131_0x25c503,{activationParams:_0x3dcaf9,activationId:_0x1a5327,runAfterJourneyRefresh:_0x59c131}=_0x8005f1[_0x3258b4(0x108)];return{'id':_0x8005f1['id'],'activationId':_0x1a5327,'runAfterJourneyRefresh':_0x59c131,..._0x3dcaf9};}function col(_0x223f68,_0x2010ca={}){const _0x34756a=a131_0x25c503;return{'column':_0x223f68,'direction':null,'stageIndex':null,'stageName':null,'category':_0x34756a(0x11d),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x2010ca};}export function generateColumnMapping(_0x48c032){const _0x4b3a92=a131_0x25c503,_0x2fed46=[];_0x2fed46[_0x4b3a92(0x119)](col(_0x4b3a92(0xe4))),_0x2fed46[_0x4b3a92(0x119)](col(_0x4b3a92(0xf1),{'direction':'in','category':_0x4b3a92(0x131)})),_0x2fed46[_0x4b3a92(0x119)](col('outtime_journey',{'direction':_0x4b3a92(0x140),'category':_0x4b3a92(0x131)}));_0x48c032[_0x4b3a92(0x108)][_0x4b3a92(0x156)]&&_0x2fed46[_0x4b3a92(0x119)](col(_0x4b3a92(0x103),{'direction':'in','category':_0x4b3a92(0x156),'detail':_0x48c032[_0x4b3a92(0x108)][_0x4b3a92(0x156)]['name']||null}));const _0x56432f=_0x48c032[_0x4b3a92(0x108)]['journeyStages']||[];for(let _0x28de5c=0x0;_0x28de5c<_0x56432f[_0x4b3a92(0x139)];_0x28de5c++){const _0x526140=_0x56432f[_0x28de5c],_0x437769=_0x526140[_0x4b3a92(0x142)],_0x212f4b={'stageIndex':_0x28de5c,'stageName':_0x437769},_0x4924f0=_0x526140[_0x4b3a92(0x120)]?.[_0x4b3a92(0x142)]||null;_0x2fed46[_0x4b3a92(0x119)](col('intime_stage_'+_0x28de5c,{..._0x212f4b,'direction':'in','category':'stage','detail':_0x4924f0})),_0x2fed46['push'](col(_0x4b3a92(0x109)+_0x28de5c,{..._0x212f4b,'direction':_0x4b3a92(0x140),'category':_0x4b3a92(0x149),'detail':_0x4924f0}));_0x526140[_0x4b3a92(0x12b)]&&_0x2fed46[_0x4b3a92(0x119)](col(_0x4b3a92(0x11e)+_0x28de5c+_0x4b3a92(0xee),{..._0x212f4b,'direction':'in','category':'milestone','detail':_0x526140[_0x4b3a92(0x12b)]['name']||null}));const _0xb23728=_0x526140[_0x4b3a92(0x130)]||_0x526140['exitCriteria']||[];for(let _0xe7ada1=0x0;_0xe7ada1<_0xb23728[_0x4b3a92(0x139)];_0xe7ada1++){_0x2fed46[_0x4b3a92(0x119)](col('intime_stage_'+_0x28de5c+_0x4b3a92(0x113)+_0xe7ada1,{..._0x212f4b,'direction':'in','category':'exit_criteria','detail':_0xb23728[_0xe7ada1][_0x4b3a92(0x142)]||null}));}const _0x3bf7ed=getStepEntries(_0x526140[_0x4b3a92(0x136)]);for(const [_0x6789de,_0x32cbab]of _0x3bf7ed){const _0x53193f=convertToColumnId(_0x6789de),_0x5254f4=_0x32cbab[_0x4b3a92(0xff)]||null,_0x379164=_0x32cbab[_0x4b3a92(0x142)]||null,_0x2cc6fa={..._0x212f4b,'stepType':_0x5254f4,'stepName':_0x379164,'stepId':_0x6789de};_0x2fed46['push'](col(_0x4b3a92(0x11e)+_0x28de5c+'_'+_0x53193f,{..._0x2cc6fa,'direction':'in','category':'step'})),_0x2fed46[_0x4b3a92(0x119)](col(_0x4b3a92(0x109)+_0x28de5c+'_'+_0x53193f,{..._0x2cc6fa,'direction':_0x4b3a92(0x140),'category':'step'}));if(_0x32cbab[_0x4b3a92(0xff)]===_0x4b3a92(0xe0)&&_0x32cbab[_0x4b3a92(0xfb)])for(const _0x236183 of _0x32cbab[_0x4b3a92(0xfb)]){_0x236183[_0x4b3a92(0x15d)]&&_0x2fed46['push'](col(_0x4b3a92(0x11e)+_0x28de5c+'_'+_0x53193f+'_'+_0x236183[_0x4b3a92(0x15d)],{..._0x2cc6fa,'direction':'in','category':_0x4b3a92(0x106),'detail':_0x236183[_0x4b3a92(0x142)]||(_0x236183[_0x4b3a92(0x151)]?'Excluded\x20profiles':null)}));}if((_0x32cbab[_0x4b3a92(0xff)]===_0x4b3a92(0x124)||_0x32cbab[_0x4b3a92(0xff)]==='ABTest')&&_0x32cbab['variants'])for(const _0x231672 of _0x32cbab[_0x4b3a92(0x169)]){_0x231672['id']&&_0x2fed46['push'](col(_0x4b3a92(0x11e)+_0x28de5c+'_'+_0x53193f+_0x4b3a92(0x10d)+convertToColumnId(_0x231672['id']),{..._0x2cc6fa,'direction':'in','category':'variant','detail':_0x231672[_0x4b3a92(0x142)]||null}));}if(_0x32cbab['type']==='WaitStep'||_0x32cbab[_0x4b3a92(0xff)]==='Wait'){const _0x26b5c2=[];if(_0x32cbab['conditionSegmentId'])_0x26b5c2[_0x4b3a92(0x119)](_0x32cbab['conditionSegmentId']);else{if(Array[_0x4b3a92(0xf5)](_0x32cbab['conditions']))for(const _0x259880 of _0x32cbab[_0x4b3a92(0x144)]){_0x259880[_0x4b3a92(0x15d)]&&!_0x259880[_0x4b3a92(0x148)]&&_0x26b5c2['push'](_0x259880[_0x4b3a92(0x15d)]);}else _0x32cbab[_0x4b3a92(0x141)]?.['segmentId']&&_0x26b5c2[_0x4b3a92(0x119)](_0x32cbab[_0x4b3a92(0x141)][_0x4b3a92(0x15d)]);}for(const _0x17abcd of _0x26b5c2){_0x2fed46['push'](col(_0x4b3a92(0x11e)+_0x28de5c+'_'+_0x53193f+'_'+_0x17abcd,{..._0x2cc6fa,'direction':'in','category':_0x4b3a92(0x106)}));}}}}return _0x2fed46[_0x4b3a92(0x119)](col(_0x4b3a92(0xea))),_0x2fed46;}export function aggregateJourneyHistory(_0x590f3f){const _0x1dd276=a131_0x25c503,_0x1ebdb3=_0x590f3f[_0x1dd276(0x135)]((_0x4eab5c,_0x2dcbdd)=>_0x4eab5c+(_0x2dcbdd[_0x1dd276(0xe6)]??0x0),0x0),_0x48e22a=_0x590f3f['reduce']((_0x2b9a57,_0x36ce99)=>_0x2b9a57+(_0x36ce99[_0x1dd276(0x167)]??0x0),0x0),_0x377477=_0x590f3f[_0x1dd276(0x135)]((_0x590f09,_0x5b1a1c)=>_0x590f09+((_0x5b1a1c[_0x1dd276(0x10e)]??0x0)+(_0x5b1a1c[_0x1dd276(0xe3)]??0x0)),0x0),_0x262ca0=_0x590f3f[_0x590f3f['length']-0x1];return{'size':_0x262ca0?.[_0x1dd276(0x117)]??0x0,'entered':_0x1ebdb3,'goal_achieved':_0x48e22a,'completion_rate':_0x48e22a&&_0x1ebdb3?_0x48e22a/_0x1ebdb3*0x64:0x0,'exit_or_jump':_0x377477,'exit_or_jump_rate':_0x377477&&_0x1ebdb3?_0x377477/_0x1ebdb3*0x64:0x0};}function a131_0x52d3(){const _0x49fda8=['milestoneInflux','isArray','lastVersionNumber','goalSize','exitOrJumpSize','activation','client','branches','set','journeyBundleName','from','type','find','activationStepsById','conversion','intime_goal','journeyStages','listJourneysWithFolders','branch','limit','attributes','outtime_stage_','exitOrJumpRate','listJourneys','getActivationSankeyChart','_variant_','exitInflux','toLowerCase','1263rRGlDD','listJourneyActivations','journeyStageId','_exit_','createVersion','createJourneyActivation','listJourneysWithDetailsFromParentSegment','size','10SFHsFs','push','includeHistory','applyVersionDeduplication','getJourneyBundle','fixed','intime_stage_','pauseJourney','entryCriteria','checkJourneyAppendable','idx-','resumeJourney','AbTest','launched','listJourneysFromParentSegment','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','folder-segment','getLatestJourneyId','journey_','milestone','getJourneyActivation','latestJourneyId','getStatistics','\x20in\x20journey\x20','exitCriterias','journey','audienceId','getJourney','entries','reduce','steps','values','filter','length','replace','5165965rEjYbd','paused','completionRate','createJourneyVersion','cdp_audience_','out','waitCondition','name','getColumnMapping','conditions','history','journeyId','includeAllVersions','timedOutPath','stage','data','listVersions','journeys','Journey\x20not\x20found:\x20','string','parentFolder','flat','excluded','rootFolderId','sort','6RqgDIf','listActivationsFlat','goal','1423521oSCIWN','no-bundle-','listActivations','createdAt','listEntitiesByFolder','create','segmentId','listSegmentFolders','747060ePxLxa','add','7846fjhDIs','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','getConversionSankeyChart','resolveJourneyId','getParentSegmentFull','map','goalInflux','journeyBundleId','variants','versionNumber','listJourneysWithDetails','JOURNEY_NOT_FOUND','draft','pause','description','DecisionPoint','getBundle','get','jumpInflux','cdp_customer_id','Journey\x20activation\x20step\x20not\x20found:\x20','entryInflux','updatedAt','4159737ywwWtx','INVALID_ARGUMENT','time','41804460BKIrWw','11823336qtmhwq','NOT_FOUND','_milestone','all','getActivation','intime_journey','simulation','state'];a131_0x52d3=function(){return _0x49fda8;};return a131_0x52d3();}export function aggregateStageHistory(_0x30e920){const _0x39c6c7=a131_0x25c503,_0x1640f4=_0x30e920[_0x39c6c7(0x135)]((_0x1498e8,_0x41087b)=>_0x1498e8+(_0x41087b[_0x39c6c7(0xe6)]??0x0),0x0),_0x672f6c=_0x30e920['reduce']((_0xe9753d,_0x467c43)=>_0xe9753d+(_0x467c43[_0x39c6c7(0xf4)]??0x0),0x0),_0x2a739c=_0x30e920['reduce']((_0x4280c3,_0x4a6875)=>_0x4280c3+((_0x4a6875[_0x39c6c7(0x10e)]??0x0)+(_0x4a6875[_0x39c6c7(0xe3)]??0x0)),0x0),_0x35ff49=_0x30e920[_0x30e920[_0x39c6c7(0x139)]-0x1];return{'size':_0x35ff49?.[_0x39c6c7(0x117)]??0x0,'entered':_0x1640f4,'milestone':_0x672f6c,'milestone_rate':_0x672f6c&&_0x1640f4?_0x672f6c/_0x1640f4*0x64:0x0,'exit_or_jump':_0x2a739c,'exit_or_jump_rate':_0x2a739c&&_0x1640f4?_0x2a739c/_0x1640f4*0x64:0x0};}export function assembleJourneyStats(_0x32d052,_0x2725a7){const _0x53e52c=a131_0x25c503,_0x1db1f5=!!(_0x2725a7?.[_0x53e52c(0xfe)]||_0x2725a7?.['to'])&&!!_0x32d052['history']?.[_0x53e52c(0x139)];if(_0x1db1f5){const _0x2fe0bc=aggregateJourneyHistory(_0x32d052[_0x53e52c(0x145)]),_0x1154b9={'journey_id':_0x32d052[_0x53e52c(0x146)],..._0x2725a7?.[_0x53e52c(0xfe)]&&{'from':_0x2725a7[_0x53e52c(0xfe)]},..._0x2725a7?.['to']&&{'to':_0x2725a7['to']},..._0x2fe0bc};return _0x2725a7?.[_0x53e52c(0x11a)]&&(_0x1154b9[_0x53e52c(0x145)]=_0x32d052[_0x53e52c(0x145)]),_0x1154b9;}return{'journey_id':_0x32d052[_0x53e52c(0x146)],'size':_0x32d052[_0x53e52c(0x117)],'entered':_0x32d052['enteredSize'],'goal_achieved':_0x32d052[_0x53e52c(0xf7)],'completion_rate':_0x32d052[_0x53e52c(0x13d)],'exit_or_jump':_0x32d052[_0x53e52c(0xf8)],'exit_or_jump_rate':_0x32d052[_0x53e52c(0x10a)]};}export function formatVersionsFromBundle(_0x180860){const _0x4fb7ad=a131_0x25c503,_0x205740=_0x180860['journeys'][_0x4fb7ad(0x166)](_0x25394b=>({'journeyId':_0x25394b['id'],'versionNumber':_0x25394b['attributes']['versionNumber']??0x0,'name':_0x25394b[_0x4fb7ad(0x108)][_0x4fb7ad(0x142)],'state':_0x25394b[_0x4fb7ad(0x108)]['state'],'paused':_0x25394b[_0x4fb7ad(0x108)][_0x4fb7ad(0x13c)],'createdAt':_0x25394b[_0x4fb7ad(0x108)][_0x4fb7ad(0x15a)],'updatedAt':_0x25394b[_0x4fb7ad(0x108)][_0x4fb7ad(0xe7)]}));return _0x205740[_0x4fb7ad(0x153)]((_0x3ed31e,_0x2f8f81)=>_0x3ed31e[_0x4fb7ad(0x16a)]-_0x2f8f81[_0x4fb7ad(0x16a)]),_0x205740;}export function synthesizePreBundleVersion(_0xf0694){const _0x3796fb=a131_0x25c503;return{'journeyId':_0xf0694['id'],'versionNumber':0x1,'name':_0xf0694[_0x3796fb(0x108)][_0x3796fb(0x142)],'state':_0xf0694[_0x3796fb(0x108)][_0x3796fb(0xf3)],'paused':_0xf0694['attributes']['paused'],'createdAt':_0xf0694[_0x3796fb(0x108)][_0x3796fb(0x15a)],'updatedAt':_0xf0694['attributes'][_0x3796fb(0xe7)]};}export function buildStageNameMap(_0x368004){const _0x5eabdd=a131_0x25c503;return new Map(_0x368004[_0x5eabdd(0x108)][_0x5eabdd(0x104)]?.[_0x5eabdd(0x166)](_0x956bfe=>[_0x956bfe['id'],_0x956bfe['name']])??[]);}export class JourneySDK{[a131_0x25c503(0xfa)];constructor(_0x1107f2){const _0x19aacf=a131_0x25c503;this[_0x19aacf(0xfa)]=new CDPApiClient(_0x1107f2);}[a131_0x25c503(0x11b)](_0x497908,_0x132ad9){return _0x132ad9?_0x497908:deduplicateJourneysByBundle(_0x497908);}async['listJourneysWithDetails'](_0x520ad3,_0xaa0dcd){const _0x9b2ef6=a131_0x25c503;try{const _0x24c28f=await this['client'][_0x9b2ef6(0x16b)](_0x520ad3);return{'journeys':this['applyVersionDeduplication'](_0x24c28f[_0x9b2ef6(0x14c)],_0xaa0dcd),'activationStepsById':_0x24c28f[_0x9b2ef6(0x101)]};}catch(_0x3ae527){if(isHttp404Error(_0x3ae527))return{'journeys':[],'activationStepsById':new Map()};throw _0x3ae527;}}async[a131_0x25c503(0x126)](_0x3f6309,_0x162543,_0x559314){const _0x43f233=a131_0x25c503;let _0x57d5db=_0x162543;if(!_0x57d5db)try{const _0x350e56=await this[_0x43f233(0xfa)][_0x43f233(0x165)](_0x3f6309);_0x57d5db=_0x350e56[_0x43f233(0x152)]??undefined;}catch(_0x4972d6){if(isHttp404Error(_0x4972d6))return[];throw _0x4972d6;}if(!_0x57d5db)return[];let _0x761024;if(_0x559314?.[_0x43f233(0x147)]){const _0x1b75c9=await this['client'][_0x43f233(0x15e)](_0x3f6309),_0x2960a2=_0x1b75c9['map'](_0x4a9363=>this[_0x43f233(0xfa)][_0x43f233(0x10b)](_0x4a9363['id'])),_0x3731e3=await Promise[_0x43f233(0xef)](_0x2960a2),_0x1db137=new Set();_0x761024=_0x3731e3[_0x43f233(0x150)]()['filter'](_0x3dc8e9=>{const _0x44c2a9=_0x43f233;if(_0x1db137['has'](_0x3dc8e9['id']))return![];return _0x1db137[_0x44c2a9(0x160)](_0x3dc8e9['id']),!![];});}else{const _0x588d85=await this[_0x43f233(0xfa)]['listEntitiesByFolder'](_0x57d5db,0x20,![]),_0x1e2af6=_0x588d85[_0x43f233(0x14a)],_0x5ad48c=_0x1e2af6[_0x43f233(0x138)](_0x1cf71c=>_0x1cf71c[_0x43f233(0xff)]===_0x43f233(0x131));_0x761024=_0x5ad48c[_0x43f233(0x166)](_0x462b3f=>entityToJourneyListItem(_0x462b3f,_0x3f6309));}return this['applyVersionDeduplication'](_0x761024,_0x559314?.[_0x43f233(0x147)]);}async[a131_0x25c503(0x105)](_0x377c6b,_0xb4edb3,_0x5a9f89){const _0x18db39=a131_0x25c503;if(!_0xb4edb3)return{'journeys':[],'folders':[]};const _0x2a6842=await this[_0x18db39(0xfa)][_0x18db39(0x15b)](_0xb4edb3,0x20,![]),_0x173a93=_0x2a6842[_0x18db39(0x14a)],_0x542cac=_0x173a93['filter'](_0x2bcb7e=>_0x2bcb7e[_0x18db39(0xff)]===_0x18db39(0x128)&&_0x2bcb7e['id']!==_0xb4edb3),_0x4b7f1c=_0x542cac[_0x18db39(0x166)](_0x31ca5b=>({'id':_0x31ca5b['id'],'name':_0x31ca5b[_0x18db39(0x108)][_0x18db39(0x142)]})),_0x51239d=_0x173a93[_0x18db39(0x138)](_0xfd48f=>_0xfd48f[_0x18db39(0xff)]==='journey'),_0x347679=_0x51239d[_0x18db39(0x166)](_0x30d3fd=>entityToJourneyListItem(_0x30d3fd,_0x377c6b));return{'journeys':this['applyVersionDeduplication'](_0x347679,_0x5a9f89?.[_0x18db39(0x147)]),'folders':_0x4b7f1c};}async[a131_0x25c503(0x116)](_0x18faa9,_0x5cab22){const _0x1b0c79=a131_0x25c503;let _0x173c69;try{_0x173c69=await this[_0x1b0c79(0xfa)][_0x1b0c79(0x15e)](_0x18faa9);}catch(_0x153156){if(isHttp404Error(_0x153156))return{'journeys':[],'activationStepsById':new Map()};throw _0x153156;}const _0x378796=_0x173c69['map'](async _0x519827=>{const _0x55f519=_0x1b0c79;return await this[_0x55f519(0x16b)](_0x519827['id'],_0x5cab22?.['includeAllVersions']);}),_0xd2eee1=await Promise[_0x1b0c79(0xef)](_0x378796),_0x48825a=new Map(),_0x2b9a13=[];for(const _0x4b6372 of _0xd2eee1){_0x2b9a13['push'](..._0x4b6372['journeys']);for(const [_0x5505cf,_0x3f60ff]of _0x4b6372['activationStepsById']){_0x48825a[_0x1b0c79(0xfc)](_0x5505cf,_0x3f60ff);}}const _0x4ef3d0=new Set(),_0x3eb420=_0x2b9a13['filter'](_0xc484c8=>{const _0x25a2ed=_0x1b0c79;if(_0x4ef3d0['has'](_0xc484c8['id']))return![];return _0x4ef3d0[_0x25a2ed(0x160)](_0xc484c8['id']),!![];});return{'journeys':this[_0x1b0c79(0x11b)](_0x3eb420,_0x5cab22?.[_0x1b0c79(0x147)]),'activationStepsById':_0x48825a};}async[a131_0x25c503(0x133)](_0x3d33b4){const _0x10ea6=a131_0x25c503;try{return await this[_0x10ea6(0xfa)][_0x10ea6(0x133)](_0x3d33b4);}catch(_0x3a838a){if(isHttp404Error(_0x3a838a))throw new SDKError(ErrorCode[_0x10ea6(0xdc)],_0x10ea6(0x14d)+_0x3d33b4,_0x3a838a);throw _0x3a838a;}}async[a131_0x25c503(0x164)](_0x1b423c,_0x3c0fce){const _0x1e8655=a131_0x25c503,_0x2c7331=await this[_0x1e8655(0x126)](_0x1b423c),_0x137b76=_0x2c7331[_0x1e8655(0x100)](_0x3399ba=>_0x3399ba[_0x1e8655(0xfd)][_0x1e8655(0x10f)]()===_0x3c0fce[_0x1e8655(0x10f)]());if(!_0x137b76)throw new SDKError(ErrorCode[_0x1e8655(0xdc)],_0x1e8655(0x14d)+_0x3c0fce,undefined,{'helpText':_0x1e8655(0x127)});return _0x137b76['id'];}async[a131_0x25c503(0x12e)](_0xfe24f9,_0x238233){const _0xc75810=a131_0x25c503;try{return await this[_0xc75810(0xfa)]['getJourneyStatistics'](_0xfe24f9,_0x238233);}catch(_0x50209d){if(isHttp404Error(_0x50209d))throw new SDKError(ErrorCode[_0xc75810(0xdc)],_0xc75810(0x14d)+_0xfe24f9,_0x50209d);throw _0x50209d;}}async['getTrafficData'](_0x4c3df8,_0x57f9dd){const _0x2dff1b=a131_0x25c503,_0x1a4901={'from':_0x57f9dd?.['from'],'to':_0x57f9dd?.['to'],'limit':_0x57f9dd?.[_0x2dff1b(0x107)]},_0x29ef7b=_0x57f9dd?.['type']!==_0x2dff1b(0x102);try{const [_0x4cf7b3,_0x426e49]=await Promise[_0x2dff1b(0xef)]([this['fetchTrafficRaw'](_0x4c3df8,_0x57f9dd?.[_0x2dff1b(0xff)],_0x1a4901),_0x29ef7b?this[_0x2dff1b(0x133)](_0x4c3df8):undefined]);if(_0x4cf7b3[_0x2dff1b(0xf9)]&&_0x426e49){const _0x24654f=buildStageNameMap(_0x426e49);_0x4cf7b3[_0x2dff1b(0xf9)]=_0x4cf7b3[_0x2dff1b(0xf9)][_0x2dff1b(0x166)](_0x5da5bf=>({..._0x5da5bf,'journeyStageName':_0x24654f[_0x2dff1b(0xe2)](_0x5da5bf[_0x2dff1b(0x112)])??_0x5da5bf['journeyStageId']}));}return _0x4cf7b3;}catch(_0x24433a){if(isHttp404Error(_0x24433a))throw new SDKError(ErrorCode[_0x2dff1b(0xdc)],_0x2dff1b(0x14d)+_0x4c3df8,_0x24433a);throw _0x24433a;}}async['fetchTrafficRaw'](_0x21f3d2,_0x53ce4b,_0x51b747){const _0x46bf50=a131_0x25c503;if(_0x53ce4b===_0x46bf50(0x102)){const _0x22834d=await this[_0x46bf50(0xfa)][_0x46bf50(0x163)](_0x21f3d2,_0x51b747);return{'conversion':_0x22834d};}if(_0x53ce4b===_0x46bf50(0xf9)){const _0x4ed3c4=await this[_0x46bf50(0xfa)][_0x46bf50(0x10c)](_0x21f3d2,_0x51b747);return{'activation':_0x4ed3c4};}const [_0x158276,_0x64550d]=await Promise[_0x46bf50(0xef)]([this[_0x46bf50(0xfa)][_0x46bf50(0x163)](_0x21f3d2,_0x51b747),this[_0x46bf50(0xfa)][_0x46bf50(0x10c)](_0x21f3d2,_0x51b747)]);return{'conversion':_0x158276,'activation':_0x64550d};}async[a131_0x25c503(0xde)](_0x475567){const _0x332759=a131_0x25c503;try{return await this[_0x332759(0xfa)][_0x332759(0x11f)](_0x475567);}catch(_0x1a0c86){if(isHttp404Error(_0x1a0c86))throw new SDKError(ErrorCode[_0x332759(0xdc)],'Journey\x20not\x20found:\x20'+_0x475567,_0x1a0c86);throw _0x1a0c86;}}async['resume'](_0x4bd318){const _0x48f5d6=a131_0x25c503;try{return await this['client'][_0x48f5d6(0x123)](_0x4bd318);}catch(_0x1ad9b0){if(isHttp404Error(_0x1ad9b0))throw new SDKError(ErrorCode[_0x48f5d6(0xdc)],_0x48f5d6(0x14d)+_0x4bd318,_0x1ad9b0);throw _0x1ad9b0;}}async[a131_0x25c503(0x15c)](_0x4ad3c1){const _0x50e83d=a131_0x25c503;return await this[_0x50e83d(0xfa)]['createJourney'](_0x4ad3c1);}async['update'](_0x5545ef,_0x5dfad4){const _0x3a836a=a131_0x25c503;try{return await this['client']['updateJourney'](_0x5545ef,_0x5dfad4);}catch(_0x25152b){if(isHttp404Error(_0x25152b))throw new SDKError(ErrorCode[_0x3a836a(0xdc)],_0x3a836a(0x14d)+_0x5545ef,_0x25152b);throw _0x25152b;}}async[a131_0x25c503(0xf0)](_0x12e48c,_0x386683){const _0x106eec=a131_0x25c503;try{return await this[_0x106eec(0xfa)][_0x106eec(0x12c)](_0x12e48c,_0x386683);}catch(_0xdcfe02){if(isHttp404Error(_0xdcfe02))throw new SDKError(ErrorCode[_0x106eec(0xed)],_0x106eec(0xe5)+_0x386683+_0x106eec(0x12f)+_0x12e48c,_0xdcfe02);throw _0xdcfe02;}}async['listActivations'](_0x46a523){const _0x5bd11a=a131_0x25c503;try{return await this[_0x5bd11a(0xfa)][_0x5bd11a(0x111)](_0x46a523);}catch(_0x5bb0ec){if(isHttp404Error(_0x5bb0ec))return[];throw _0x5bb0ec;}}async[a131_0x25c503(0x155)](_0x38e23e){const _0x43bf18=a131_0x25c503,_0x5aa095=await this[_0x43bf18(0x159)](_0x38e23e);return _0x5aa095[_0x43bf18(0x166)](flattenJourneyActivation);}async['createActivation'](_0x3e8378,_0x2f49bc){const _0x222ce7=a131_0x25c503;return await this[_0x222ce7(0xfa)][_0x222ce7(0x115)](_0x3e8378,_0x2f49bc);}async[a131_0x25c503(0x143)](_0x261db1){const _0x2f0de3=a131_0x25c503,_0x54fcef=await this[_0x2f0de3(0x133)](_0x261db1),_0x391ad9=generateColumnMapping(_0x54fcef);return{'journeyId':_0x54fcef['id'],'journeyName':_0x54fcef[_0x2f0de3(0x108)][_0x2f0de3(0x142)],'database':_0x2f0de3(0x13f)+_0x54fcef[_0x2f0de3(0x108)][_0x2f0de3(0x132)],'table':_0x2f0de3(0x12a)+_0x54fcef['id'],'columns':_0x391ad9};}async[a131_0x25c503(0xe1)](_0x2c9e0d){const _0x34c24e=a131_0x25c503;return this[_0x34c24e(0xfa)][_0x34c24e(0x11c)](_0x2c9e0d);}async[a131_0x25c503(0x129)](_0x2b6766){const _0x412668=a131_0x25c503;if(!_0x2b6766)return undefined;try{const _0x5eff52=await this[_0x412668(0xe1)](_0x2b6766);return _0x5eff52['latestJourneyId'];}catch{return undefined;}}async[a131_0x25c503(0x14b)](_0x334514){const _0x141758=a131_0x25c503,_0x522806=await this['getJourney'](_0x334514),_0x18a17a=_0x522806[_0x141758(0x108)][_0x141758(0x168)];if(!_0x18a17a)return{'bundleId':'','bundleName':_0x522806['attributes'][_0x141758(0x142)],'bundleDescription':_0x522806[_0x141758(0x108)][_0x141758(0xdf)]??null,'latestJourneyId':_0x522806['id'],'versions':[synthesizePreBundleVersion(_0x522806)]};const _0x371c7b=await this[_0x141758(0xe1)](_0x18a17a);return{'bundleId':_0x18a17a,'bundleName':_0x371c7b[_0x141758(0x142)],'bundleDescription':_0x371c7b[_0x141758(0xdf)]??null,'latestJourneyId':_0x371c7b[_0x141758(0x12d)],'versions':formatVersionsFromBundle(_0x371c7b)};}async[a131_0x25c503(0x114)](_0x48903a){const _0x5311c9=a131_0x25c503,_0x50d350=await this['getJourney'](_0x48903a),_0x40386c=_0x50d350['attributes'][_0x5311c9(0x168)];if(!_0x40386c)throw new SDKError(ErrorCode[_0x5311c9(0xe9)],_0x5311c9(0x162));await this[_0x5311c9(0xfa)][_0x5311c9(0x121)](_0x40386c);const _0x20a60f=await this[_0x5311c9(0xfa)]['getJourneyBundle'](_0x40386c),_0xda8d20=_0x20a60f[_0x5311c9(0x142)]+'\x20v'+(_0x20a60f[_0x5311c9(0xf6)]+0x1);return this[_0x5311c9(0xfa)][_0x5311c9(0x13e)](_0x40386c,{'sourceId':_0x48903a,'attributes':{'name':_0xda8d20}});}}
|
|
1
|
+
const a131_0x494dd8=a131_0x2aee;(function(_0x240a7c,_0x1aebc0){const _0x15fb46=a131_0x2aee,_0x14c946=_0x240a7c();while(!![]){try{const _0x10ff71=-parseInt(_0x15fb46(0x22a))/0x1*(parseInt(_0x15fb46(0x246))/0x2)+-parseInt(_0x15fb46(0x1d0))/0x3+parseInt(_0x15fb46(0x1d2))/0x4+parseInt(_0x15fb46(0x228))/0x5*(parseInt(_0x15fb46(0x225))/0x6)+-parseInt(_0x15fb46(0x211))/0x7*(parseInt(_0x15fb46(0x1fd))/0x8)+parseInt(_0x15fb46(0x1ef))/0x9+parseInt(_0x15fb46(0x257))/0xa;if(_0x10ff71===_0x1aebc0)break;else _0x14c946['push'](_0x14c946['shift']());}catch(_0x5855d4){_0x14c946['push'](_0x14c946['shift']());}}}(a131_0x2af5,0x2414f));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x2670fb){const _0x126622=a131_0x2aee;return _0x2670fb[_0x126622(0x1f9)]??_0x2670fb[_0x126622(0x20a)]?.[_0x126622(0x1f9)]??undefined;}function a131_0x2af5(){const _0x168948=['data','pauseJourney','createdAt','journeyBundleId','getParentSegmentFull','Journey\x20activation\x20step\x20not\x20found:\x20','journey','16uZXRGC','segmentFolderId','filter','resume','length','listEntitiesByFolder','createJourneyVersion','waitCondition','history','includeHistory','relationships','getJourneyActivation','ABTest','attributes','paused','JOURNEY_NOT_FOUND','entryCriteria','has','toLowerCase','pause','311731TdCawA','updateJourney','Wait','getJourneyBundle','NOT_FOUND','reduce','listVersions','type','milestone','listJourneysWithDetails','set','conditionSegmentId','all','values','DecisionPoint','isArray','string','goalInflux','branches','listActivations','5142WIopto','update','stage','380wGQben','draft','71Qwsruq','intime_stage_','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','out','journeys','createActivation','activation','create','entries','exitCriterias','jumpInflux','exitInflux','getConversionSankeyChart','entryInflux','segmentId','listJourneysWithDetailsFromParentSegment','AbTest','_variant_','conditions','Journey\x20not\x20found:\x20','journeyId','completionRate','description','cdp_customer_id','launched','exitOrJumpRate','listSegmentFolders','getJourney','7814tCsKpz','INVALID_ARGUMENT','getBundle','milestoneInflux','journeyBundleName','journeyStageId','Excluded\x20profiles','includeAllVersions','state','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','latestJourneyId','intime_goal','steps','getStatistics','createJourneyActivation','name','time','2023340apeABs','lastVersionNumber','46737YJyceF','updatedAt','1026804XuxFTh','variants','getActivationSankeyChart','idx-','get','resumeJourney','journeyStages','add','outtime_stage_','size','excluded','map','from','simulation','step','WaitStep','enteredSize','goal','folder-segment','listJourneys','fixed','applyVersionDeduplication','createJourney','rootFolderId','activationStepsById','no-bundle-','goalSize','client','push','50994hBzNra','branch','createVersion','listJourneyActivations','parentFolder','exit_criteria','versionNumber'];a131_0x2af5=function(){return _0x168948;};return a131_0x2af5();}function getVersionNumber(_0x9ceefe){const _0x44f886=a131_0x2aee;return _0x9ceefe[_0x44f886(0x1f5)]??_0x9ceefe[_0x44f886(0x20a)]?.[_0x44f886(0x1f5)]??0x0;}function getState(_0x538b92){const _0x184a00=a131_0x2aee;return _0x538b92[_0x184a00(0x24e)]??_0x538b92[_0x184a00(0x20a)]?.[_0x184a00(0x24e)];}export function deduplicateJourneysByBundle(_0x4ded43){const _0x57430a=a131_0x2aee,_0x3dd180=new Map();let _0x17f8cd=0x0;for(const _0xfa9198 of _0x4ded43){const _0x3e2d97=getBundleId(_0xfa9198);if(!_0x3e2d97){const _0x3d9890=_0x57430a(0x1eb)+(_0xfa9198['id']??_0x57430a(0x1d5)+_0x17f8cd++);_0x3dd180['set'](_0x3d9890,_0xfa9198);continue;}const _0x249ea6=_0x3dd180['get'](_0x3e2d97);if(!_0x249ea6)_0x3dd180[_0x57430a(0x21b)](_0x3e2d97,_0xfa9198);else{const _0x3c2164=getState(_0x249ea6)==='launched',_0x1d92ec=getState(_0xfa9198)===_0x57430a(0x242);if(_0x1d92ec&&!_0x3c2164)_0x3dd180[_0x57430a(0x21b)](_0x3e2d97,_0xfa9198);else{if(!_0x1d92ec&&_0x3c2164){}else{const _0x40235e=getVersionNumber(_0x249ea6),_0x33d2ca=getVersionNumber(_0xfa9198);_0x33d2ca>_0x40235e&&_0x3dd180[_0x57430a(0x21b)](_0x3e2d97,_0xfa9198);}}}}return Array['from'](_0x3dd180[_0x57430a(0x21e)]());}const VALID_JOURNEY_STATES=new Set([a131_0x494dd8(0x229),a131_0x494dd8(0x1df),a131_0x494dd8(0x242)]);export function parseJourneyState(_0x1cefc6){const _0x543ce3=a131_0x494dd8;if(typeof _0x1cefc6===_0x543ce3(0x221)&&VALID_JOURNEY_STATES[_0x543ce3(0x20e)](_0x1cefc6))return _0x1cefc6;return _0x543ce3(0x229);}export function entityToJourneyListItem(_0x5ad7b0,_0x19a275){const _0x50d9f0=a131_0x494dd8,_0x4e494a=_0x5ad7b0[_0x50d9f0(0x20a)];return{'id':_0x5ad7b0['id'],'name':_0x4e494a[_0x50d9f0(0x255)]??'','journeyBundleName':_0x4e494a['journeyBundleName']??_0x4e494a[_0x50d9f0(0x255)]??'','journeyBundleId':_0x4e494a[_0x50d9f0(0x1f9)]??'','versionNumber':_0x4e494a[_0x50d9f0(0x1f5)],'description':_0x4e494a[_0x50d9f0(0x240)]??null,'state':parseJourneyState(_0x4e494a[_0x50d9f0(0x24e)]),'paused':_0x4e494a[_0x50d9f0(0x20b)]??![],'audienceId':_0x19a275,'folderId':_0x4e494a[_0x50d9f0(0x1fe)]??_0x5ad7b0[_0x50d9f0(0x207)]?.[_0x50d9f0(0x1f3)]?.['data']?.['id']??null,'createdAt':_0x4e494a[_0x50d9f0(0x1f8)]??'','updatedAt':_0x4e494a['updatedAt']??''};}function convertToColumnId(_0xbab33a){return _0xbab33a['replace'](/-/g,'_');}function getStepEntries(_0x464d7c){const _0x43a2b6=a131_0x494dd8;if(!_0x464d7c)return[];if(Array['isArray'](_0x464d7c))return _0x464d7c['map'](_0xd8ae89=>[_0xd8ae89['id'],_0xd8ae89]);return Object[_0x43a2b6(0x232)](_0x464d7c);}export function flattenJourneyActivation(_0x26e37b){const _0x3c07ff=a131_0x494dd8,{activationParams:_0x4d80bc,activationId:_0x50844c,runAfterJourneyRefresh:_0x3d06c9}=_0x26e37b[_0x3c07ff(0x20a)];return{'id':_0x26e37b['id'],'activationId':_0x50844c,'runAfterJourneyRefresh':_0x3d06c9,..._0x4d80bc};}function col(_0x1854d0,_0x277904={}){const _0x11b5b8=a131_0x494dd8;return{'column':_0x1854d0,'direction':null,'stageIndex':null,'stageName':null,'category':_0x11b5b8(0x1e6),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x277904};}export function generateColumnMapping(_0x1f0460){const _0x2b191b=a131_0x494dd8,_0x89cf51=[];_0x89cf51[_0x2b191b(0x1ee)](col(_0x2b191b(0x241))),_0x89cf51[_0x2b191b(0x1ee)](col('intime_journey',{'direction':'in','category':_0x2b191b(0x1fc)})),_0x89cf51[_0x2b191b(0x1ee)](col('outtime_journey',{'direction':_0x2b191b(0x22d),'category':_0x2b191b(0x1fc)}));_0x1f0460['attributes'][_0x2b191b(0x1e3)]&&_0x89cf51['push'](col(_0x2b191b(0x251),{'direction':'in','category':_0x2b191b(0x1e3),'detail':_0x1f0460[_0x2b191b(0x20a)][_0x2b191b(0x1e3)][_0x2b191b(0x255)]||null}));const _0x524950=_0x1f0460[_0x2b191b(0x20a)][_0x2b191b(0x1d8)]||[];for(let _0x32262d=0x0;_0x32262d<_0x524950[_0x2b191b(0x201)];_0x32262d++){const _0x93d8d5=_0x524950[_0x32262d],_0x32450e=_0x93d8d5[_0x2b191b(0x255)],_0x212e51={'stageIndex':_0x32262d,'stageName':_0x32450e},_0x49231c=_0x93d8d5[_0x2b191b(0x20d)]?.[_0x2b191b(0x255)]||null;_0x89cf51[_0x2b191b(0x1ee)](col(_0x2b191b(0x22b)+_0x32262d,{..._0x212e51,'direction':'in','category':_0x2b191b(0x227),'detail':_0x49231c})),_0x89cf51[_0x2b191b(0x1ee)](col(_0x2b191b(0x1da)+_0x32262d,{..._0x212e51,'direction':'out','category':_0x2b191b(0x227),'detail':_0x49231c}));_0x93d8d5[_0x2b191b(0x219)]&&_0x89cf51[_0x2b191b(0x1ee)](col(_0x2b191b(0x22b)+_0x32262d+'_milestone',{..._0x212e51,'direction':'in','category':_0x2b191b(0x219),'detail':_0x93d8d5['milestone'][_0x2b191b(0x255)]||null}));const _0x2e9164=_0x93d8d5[_0x2b191b(0x233)]||_0x93d8d5['exitCriteria']||[];for(let _0x78a510=0x0;_0x78a510<_0x2e9164[_0x2b191b(0x201)];_0x78a510++){_0x89cf51['push'](col(_0x2b191b(0x22b)+_0x32262d+'_exit_'+_0x78a510,{..._0x212e51,'direction':'in','category':_0x2b191b(0x1f4),'detail':_0x2e9164[_0x78a510][_0x2b191b(0x255)]||null}));}const _0x409d82=getStepEntries(_0x93d8d5[_0x2b191b(0x252)]);for(const [_0x167aa3,_0xe8cc0e]of _0x409d82){const _0x4ab9dd=convertToColumnId(_0x167aa3),_0x507406=_0xe8cc0e[_0x2b191b(0x218)]||null,_0x5bb188=_0xe8cc0e[_0x2b191b(0x255)]||null,_0x381e3b={..._0x212e51,'stepType':_0x507406,'stepName':_0x5bb188,'stepId':_0x167aa3};_0x89cf51['push'](col(_0x2b191b(0x22b)+_0x32262d+'_'+_0x4ab9dd,{..._0x381e3b,'direction':'in','category':_0x2b191b(0x1e0)})),_0x89cf51['push'](col(_0x2b191b(0x1da)+_0x32262d+'_'+_0x4ab9dd,{..._0x381e3b,'direction':_0x2b191b(0x22d),'category':_0x2b191b(0x1e0)}));if(_0xe8cc0e['type']===_0x2b191b(0x21f)&&_0xe8cc0e['branches'])for(const _0x58734c of _0xe8cc0e[_0x2b191b(0x223)]){_0x58734c[_0x2b191b(0x238)]&&_0x89cf51[_0x2b191b(0x1ee)](col(_0x2b191b(0x22b)+_0x32262d+'_'+_0x4ab9dd+'_'+_0x58734c[_0x2b191b(0x238)],{..._0x381e3b,'direction':'in','category':_0x2b191b(0x1f0),'detail':_0x58734c[_0x2b191b(0x255)]||(_0x58734c[_0x2b191b(0x1dc)]?_0x2b191b(0x24c):null)}));}if((_0xe8cc0e[_0x2b191b(0x218)]===_0x2b191b(0x23a)||_0xe8cc0e['type']===_0x2b191b(0x209))&&_0xe8cc0e[_0x2b191b(0x1d3)])for(const _0x585a2a of _0xe8cc0e[_0x2b191b(0x1d3)]){_0x585a2a['id']&&_0x89cf51['push'](col(_0x2b191b(0x22b)+_0x32262d+'_'+_0x4ab9dd+_0x2b191b(0x23b)+convertToColumnId(_0x585a2a['id']),{..._0x381e3b,'direction':'in','category':'variant','detail':_0x585a2a[_0x2b191b(0x255)]||null}));}if(_0xe8cc0e[_0x2b191b(0x218)]===_0x2b191b(0x1e1)||_0xe8cc0e[_0x2b191b(0x218)]===_0x2b191b(0x213)){const _0x18158f=[];if(_0xe8cc0e[_0x2b191b(0x21c)])_0x18158f[_0x2b191b(0x1ee)](_0xe8cc0e[_0x2b191b(0x21c)]);else{if(Array[_0x2b191b(0x220)](_0xe8cc0e[_0x2b191b(0x23c)]))for(const _0x228f90 of _0xe8cc0e[_0x2b191b(0x23c)]){_0x228f90[_0x2b191b(0x238)]&&!_0x228f90['timedOutPath']&&_0x18158f[_0x2b191b(0x1ee)](_0x228f90['segmentId']);}else _0xe8cc0e[_0x2b191b(0x204)]?.[_0x2b191b(0x238)]&&_0x18158f[_0x2b191b(0x1ee)](_0xe8cc0e[_0x2b191b(0x204)]['segmentId']);}for(const _0x40c651 of _0x18158f){_0x89cf51[_0x2b191b(0x1ee)](col(_0x2b191b(0x22b)+_0x32262d+'_'+_0x4ab9dd+'_'+_0x40c651,{..._0x381e3b,'direction':'in','category':'branch'}));}}}}return _0x89cf51['push'](col(_0x2b191b(0x256))),_0x89cf51;}export function aggregateJourneyHistory(_0x402904){const _0x3a91d9=a131_0x494dd8,_0x28bc04=_0x402904[_0x3a91d9(0x216)]((_0x27140d,_0x5a0b49)=>_0x27140d+(_0x5a0b49[_0x3a91d9(0x237)]??0x0),0x0),_0x22350d=_0x402904[_0x3a91d9(0x216)]((_0xe5032e,_0x1bfd08)=>_0xe5032e+(_0x1bfd08[_0x3a91d9(0x222)]??0x0),0x0),_0x3bf318=_0x402904[_0x3a91d9(0x216)]((_0x1fe670,_0x2d4045)=>_0x1fe670+((_0x2d4045[_0x3a91d9(0x235)]??0x0)+(_0x2d4045[_0x3a91d9(0x234)]??0x0)),0x0),_0x1f8cfd=_0x402904[_0x402904[_0x3a91d9(0x201)]-0x1];return{'size':_0x1f8cfd?.[_0x3a91d9(0x1db)]??0x0,'entered':_0x28bc04,'goal_achieved':_0x22350d,'completion_rate':_0x22350d&&_0x28bc04?_0x22350d/_0x28bc04*0x64:0x0,'exit_or_jump':_0x3bf318,'exit_or_jump_rate':_0x3bf318&&_0x28bc04?_0x3bf318/_0x28bc04*0x64:0x0};}export function aggregateStageHistory(_0x2bc5c3){const _0x50c2c9=a131_0x494dd8,_0x3c919a=_0x2bc5c3['reduce']((_0x4731e7,_0x3bcddf)=>_0x4731e7+(_0x3bcddf[_0x50c2c9(0x237)]??0x0),0x0),_0xe887dd=_0x2bc5c3[_0x50c2c9(0x216)]((_0x22a3dd,_0x1299c2)=>_0x22a3dd+(_0x1299c2[_0x50c2c9(0x249)]??0x0),0x0),_0x9773d9=_0x2bc5c3[_0x50c2c9(0x216)]((_0x220356,_0x4a7aad)=>_0x220356+((_0x4a7aad[_0x50c2c9(0x235)]??0x0)+(_0x4a7aad[_0x50c2c9(0x234)]??0x0)),0x0),_0xd1313d=_0x2bc5c3[_0x2bc5c3[_0x50c2c9(0x201)]-0x1];return{'size':_0xd1313d?.['size']??0x0,'entered':_0x3c919a,'milestone':_0xe887dd,'milestone_rate':_0xe887dd&&_0x3c919a?_0xe887dd/_0x3c919a*0x64:0x0,'exit_or_jump':_0x9773d9,'exit_or_jump_rate':_0x9773d9&&_0x3c919a?_0x9773d9/_0x3c919a*0x64:0x0};}export function assembleJourneyStats(_0x1469db,_0x116651){const _0x390f2b=a131_0x494dd8,_0x5b94c6=!!(_0x116651?.[_0x390f2b(0x1de)]||_0x116651?.['to'])&&!!_0x1469db[_0x390f2b(0x205)]?.['length'];if(_0x5b94c6){const _0x21af0c=aggregateJourneyHistory(_0x1469db['history']),_0x530665={'journey_id':_0x1469db[_0x390f2b(0x23e)],..._0x116651?.['from']&&{'from':_0x116651['from']},..._0x116651?.['to']&&{'to':_0x116651['to']},..._0x21af0c};return _0x116651?.[_0x390f2b(0x206)]&&(_0x530665[_0x390f2b(0x205)]=_0x1469db[_0x390f2b(0x205)]),_0x530665;}return{'journey_id':_0x1469db[_0x390f2b(0x23e)],'size':_0x1469db[_0x390f2b(0x1db)],'entered':_0x1469db[_0x390f2b(0x1e2)],'goal_achieved':_0x1469db[_0x390f2b(0x1ec)],'completion_rate':_0x1469db[_0x390f2b(0x23f)],'exit_or_jump':_0x1469db['exitOrJumpSize'],'exit_or_jump_rate':_0x1469db[_0x390f2b(0x243)]};}export function formatVersionsFromBundle(_0x2ec20f){const _0x3db9fe=a131_0x494dd8,_0x12e450=_0x2ec20f[_0x3db9fe(0x22e)][_0x3db9fe(0x1dd)](_0x538d5c=>({'journeyId':_0x538d5c['id'],'versionNumber':_0x538d5c[_0x3db9fe(0x20a)][_0x3db9fe(0x1f5)]??0x0,'name':_0x538d5c[_0x3db9fe(0x20a)][_0x3db9fe(0x255)],'state':_0x538d5c[_0x3db9fe(0x20a)]['state'],'paused':_0x538d5c[_0x3db9fe(0x20a)]['paused'],'createdAt':_0x538d5c[_0x3db9fe(0x20a)][_0x3db9fe(0x1f8)],'updatedAt':_0x538d5c[_0x3db9fe(0x20a)][_0x3db9fe(0x1d1)]}));return _0x12e450['sort']((_0x2d65d6,_0x1764ec)=>_0x2d65d6[_0x3db9fe(0x1f5)]-_0x1764ec[_0x3db9fe(0x1f5)]),_0x12e450;}export function synthesizePreBundleVersion(_0x407f57){const _0x3f6982=a131_0x494dd8;return{'journeyId':_0x407f57['id'],'versionNumber':0x1,'name':_0x407f57['attributes']['name'],'state':_0x407f57['attributes'][_0x3f6982(0x24e)],'paused':_0x407f57['attributes'][_0x3f6982(0x20b)],'createdAt':_0x407f57[_0x3f6982(0x20a)][_0x3f6982(0x1f8)],'updatedAt':_0x407f57['attributes'][_0x3f6982(0x1d1)]};}export function buildStageNameMap(_0x42b396){const _0x51e1aa=a131_0x494dd8;return new Map(_0x42b396['attributes'][_0x51e1aa(0x1d8)]?.[_0x51e1aa(0x1dd)](_0x5e6ff7=>[_0x5e6ff7['id'],_0x5e6ff7[_0x51e1aa(0x255)]])??[]);}function a131_0x2aee(_0x4ff491,_0x234516){_0x4ff491=_0x4ff491-0x1d0;const _0x2af549=a131_0x2af5();let _0x2aee14=_0x2af549[_0x4ff491];return _0x2aee14;}export class JourneySDK{[a131_0x494dd8(0x1ed)];constructor(_0x2f321d){this['client']=new CDPApiClient(_0x2f321d);}[a131_0x494dd8(0x1e7)](_0x417654,_0x83437f){return _0x83437f?_0x417654:deduplicateJourneysByBundle(_0x417654);}async[a131_0x494dd8(0x21a)](_0x25704b,_0x138473){const _0x151a41=a131_0x494dd8;try{const _0x2d15df=await this[_0x151a41(0x1ed)][_0x151a41(0x21a)](_0x25704b);return{'journeys':this[_0x151a41(0x1e7)](_0x2d15df[_0x151a41(0x22e)],_0x138473),'activationStepsById':_0x2d15df[_0x151a41(0x1ea)]};}catch(_0x59415f){if(isHttp404Error(_0x59415f))return{'journeys':[],'activationStepsById':new Map()};throw _0x59415f;}}async['listJourneysFromParentSegment'](_0x177077,_0x55e4c8,_0x242b19){const _0x4d96c2=a131_0x494dd8;let _0x5a655b=_0x55e4c8;if(!_0x5a655b)try{const _0x348dc4=await this[_0x4d96c2(0x1ed)][_0x4d96c2(0x1fa)](_0x177077);_0x5a655b=_0x348dc4[_0x4d96c2(0x1e9)]??undefined;}catch(_0x4b0a06){if(isHttp404Error(_0x4b0a06))return[];throw _0x4b0a06;}if(!_0x5a655b)return[];let _0x22f027;if(_0x242b19?.[_0x4d96c2(0x24d)]){const _0x10b9fb=await this[_0x4d96c2(0x1ed)][_0x4d96c2(0x244)](_0x177077),_0x50f719=_0x10b9fb[_0x4d96c2(0x1dd)](_0x29f820=>this[_0x4d96c2(0x1ed)][_0x4d96c2(0x1e5)](_0x29f820['id'])),_0x34ffa3=await Promise[_0x4d96c2(0x21d)](_0x50f719),_0x4d94aa=new Set();_0x22f027=_0x34ffa3['flat']()[_0x4d96c2(0x1ff)](_0x389e80=>{const _0xa866c=_0x4d96c2;if(_0x4d94aa[_0xa866c(0x20e)](_0x389e80['id']))return![];return _0x4d94aa[_0xa866c(0x1d9)](_0x389e80['id']),!![];});}else{const _0x225a46=await this[_0x4d96c2(0x1ed)][_0x4d96c2(0x202)](_0x5a655b,0x20,![]),_0x378e06=_0x225a46['data'],_0x19fa74=_0x378e06['filter'](_0x2e5975=>_0x2e5975['type']===_0x4d96c2(0x1fc));_0x22f027=_0x19fa74[_0x4d96c2(0x1dd)](_0x3147be=>entityToJourneyListItem(_0x3147be,_0x177077));}return this[_0x4d96c2(0x1e7)](_0x22f027,_0x242b19?.[_0x4d96c2(0x24d)]);}async['listJourneysWithFolders'](_0x38f203,_0x127470,_0x44b2d4){const _0x33e2fe=a131_0x494dd8;if(!_0x127470)return{'journeys':[],'folders':[]};const _0x2b6486=await this[_0x33e2fe(0x1ed)][_0x33e2fe(0x202)](_0x127470,0x20,![]),_0x3ce1fc=_0x2b6486[_0x33e2fe(0x1f6)],_0x526b66=_0x3ce1fc[_0x33e2fe(0x1ff)](_0x1476dd=>_0x1476dd[_0x33e2fe(0x218)]===_0x33e2fe(0x1e4)&&_0x1476dd['id']!==_0x127470),_0x3be889=_0x526b66[_0x33e2fe(0x1dd)](_0x3da282=>({'id':_0x3da282['id'],'name':_0x3da282[_0x33e2fe(0x20a)][_0x33e2fe(0x255)]})),_0x42eeef=_0x3ce1fc['filter'](_0x3f5362=>_0x3f5362[_0x33e2fe(0x218)]===_0x33e2fe(0x1fc)),_0x591f4f=_0x42eeef['map'](_0x44accd=>entityToJourneyListItem(_0x44accd,_0x38f203));return{'journeys':this[_0x33e2fe(0x1e7)](_0x591f4f,_0x44b2d4?.[_0x33e2fe(0x24d)]),'folders':_0x3be889};}async[a131_0x494dd8(0x239)](_0x3bf4f8,_0x4fe31f){const _0x4da7c9=a131_0x494dd8;let _0x4f5db2;try{_0x4f5db2=await this[_0x4da7c9(0x1ed)][_0x4da7c9(0x244)](_0x3bf4f8);}catch(_0x429cf7){if(isHttp404Error(_0x429cf7))return{'journeys':[],'activationStepsById':new Map()};throw _0x429cf7;}const _0x22ff02=_0x4f5db2['map'](async _0x128cd3=>{const _0x12d372=_0x4da7c9;return await this[_0x12d372(0x21a)](_0x128cd3['id'],_0x4fe31f?.[_0x12d372(0x24d)]);}),_0x5e9191=await Promise[_0x4da7c9(0x21d)](_0x22ff02),_0x6bd635=new Map(),_0x3417dd=[];for(const _0x400f77 of _0x5e9191){_0x3417dd[_0x4da7c9(0x1ee)](..._0x400f77[_0x4da7c9(0x22e)]);for(const [_0xba7627,_0x3de13f]of _0x400f77[_0x4da7c9(0x1ea)]){_0x6bd635['set'](_0xba7627,_0x3de13f);}}const _0x49bc1a=new Set(),_0x12ce95=_0x3417dd['filter'](_0x5d0178=>{const _0x2e8b98=_0x4da7c9;if(_0x49bc1a[_0x2e8b98(0x20e)](_0x5d0178['id']))return![];return _0x49bc1a[_0x2e8b98(0x1d9)](_0x5d0178['id']),!![];});return{'journeys':this[_0x4da7c9(0x1e7)](_0x12ce95,_0x4fe31f?.[_0x4da7c9(0x24d)]),'activationStepsById':_0x6bd635};}async[a131_0x494dd8(0x245)](_0x5f015e){const _0x3b0589=a131_0x494dd8;try{return await this[_0x3b0589(0x1ed)][_0x3b0589(0x245)](_0x5f015e);}catch(_0x33c768){if(isHttp404Error(_0x33c768))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x5f015e,_0x33c768);throw _0x33c768;}}async['resolveJourneyId'](_0x2c0542,_0x392cc3){const _0x59ad9d=a131_0x494dd8,_0x1bf92e=await this['listJourneysFromParentSegment'](_0x2c0542),_0x5e52db=_0x1bf92e['find'](_0x41224e=>_0x41224e[_0x59ad9d(0x24a)]['toLowerCase']()===_0x392cc3[_0x59ad9d(0x20f)]());if(!_0x5e52db)throw new SDKError(ErrorCode[_0x59ad9d(0x20c)],_0x59ad9d(0x23d)+_0x392cc3,undefined,{'helpText':_0x59ad9d(0x22c)});return _0x5e52db['id'];}async[a131_0x494dd8(0x253)](_0x13e283,_0xf827ea){const _0x2aac48=a131_0x494dd8;try{return await this[_0x2aac48(0x1ed)]['getJourneyStatistics'](_0x13e283,_0xf827ea);}catch(_0x282851){if(isHttp404Error(_0x282851))throw new SDKError(ErrorCode[_0x2aac48(0x20c)],'Journey\x20not\x20found:\x20'+_0x13e283,_0x282851);throw _0x282851;}}async['getTrafficData'](_0x2dd4e0,_0xa524ae){const _0x9fba63=a131_0x494dd8,_0x43140a={'from':_0xa524ae?.[_0x9fba63(0x1de)],'to':_0xa524ae?.['to'],'limit':_0xa524ae?.['limit']},_0x271f05=_0xa524ae?.['type']!=='conversion';try{const [_0x2a1f8e,_0x413910]=await Promise[_0x9fba63(0x21d)]([this['fetchTrafficRaw'](_0x2dd4e0,_0xa524ae?.[_0x9fba63(0x218)],_0x43140a),_0x271f05?this[_0x9fba63(0x245)](_0x2dd4e0):undefined]);if(_0x2a1f8e['activation']&&_0x413910){const _0x41af55=buildStageNameMap(_0x413910);_0x2a1f8e[_0x9fba63(0x230)]=_0x2a1f8e[_0x9fba63(0x230)][_0x9fba63(0x1dd)](_0x4e3545=>({..._0x4e3545,'journeyStageName':_0x41af55[_0x9fba63(0x1d6)](_0x4e3545['journeyStageId'])??_0x4e3545[_0x9fba63(0x24b)]}));}return _0x2a1f8e;}catch(_0x1ed331){if(isHttp404Error(_0x1ed331))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x2dd4e0,_0x1ed331);throw _0x1ed331;}}async['fetchTrafficRaw'](_0x350a50,_0x5c175d,_0xfd195e){const _0x5ae46c=a131_0x494dd8;if(_0x5c175d==='conversion'){const _0x1a366b=await this[_0x5ae46c(0x1ed)][_0x5ae46c(0x236)](_0x350a50,_0xfd195e);return{'conversion':_0x1a366b};}if(_0x5c175d===_0x5ae46c(0x230)){const _0x370f67=await this[_0x5ae46c(0x1ed)]['getActivationSankeyChart'](_0x350a50,_0xfd195e);return{'activation':_0x370f67};}const [_0x3a7857,_0x262f3d]=await Promise['all']([this['client'][_0x5ae46c(0x236)](_0x350a50,_0xfd195e),this[_0x5ae46c(0x1ed)][_0x5ae46c(0x1d4)](_0x350a50,_0xfd195e)]);return{'conversion':_0x3a7857,'activation':_0x262f3d};}async[a131_0x494dd8(0x210)](_0x34de5f){const _0x75771d=a131_0x494dd8;try{return await this['client'][_0x75771d(0x1f7)](_0x34de5f);}catch(_0x215234){if(isHttp404Error(_0x215234))throw new SDKError(ErrorCode[_0x75771d(0x20c)],_0x75771d(0x23d)+_0x34de5f,_0x215234);throw _0x215234;}}async[a131_0x494dd8(0x200)](_0x586c4a){const _0x15e2e9=a131_0x494dd8;try{return await this[_0x15e2e9(0x1ed)][_0x15e2e9(0x1d7)](_0x586c4a);}catch(_0x38a63d){if(isHttp404Error(_0x38a63d))throw new SDKError(ErrorCode[_0x15e2e9(0x20c)],_0x15e2e9(0x23d)+_0x586c4a,_0x38a63d);throw _0x38a63d;}}async[a131_0x494dd8(0x231)](_0x5a8d3e){const _0x79505=a131_0x494dd8;return await this[_0x79505(0x1ed)][_0x79505(0x1e8)](_0x5a8d3e);}async[a131_0x494dd8(0x226)](_0x1a7d9f,_0xb58125){const _0x458231=a131_0x494dd8;try{return await this[_0x458231(0x1ed)][_0x458231(0x212)](_0x1a7d9f,_0xb58125);}catch(_0x4e5b2b){if(isHttp404Error(_0x4e5b2b))throw new SDKError(ErrorCode[_0x458231(0x20c)],_0x458231(0x23d)+_0x1a7d9f,_0x4e5b2b);throw _0x4e5b2b;}}async['getActivation'](_0x2b1a5f,_0x30cbb9){const _0x184ffc=a131_0x494dd8;try{return await this['client'][_0x184ffc(0x208)](_0x2b1a5f,_0x30cbb9);}catch(_0x1b9338){if(isHttp404Error(_0x1b9338))throw new SDKError(ErrorCode[_0x184ffc(0x215)],_0x184ffc(0x1fb)+_0x30cbb9+'\x20in\x20journey\x20'+_0x2b1a5f,_0x1b9338);throw _0x1b9338;}}async[a131_0x494dd8(0x224)](_0x34e23d){const _0x2c4bd0=a131_0x494dd8;try{return await this[_0x2c4bd0(0x1ed)][_0x2c4bd0(0x1f2)](_0x34e23d);}catch(_0x530dda){if(isHttp404Error(_0x530dda))return[];throw _0x530dda;}}async['listActivationsFlat'](_0x2e351c){const _0x5dae20=a131_0x494dd8,_0x1e98dd=await this[_0x5dae20(0x224)](_0x2e351c);return _0x1e98dd[_0x5dae20(0x1dd)](flattenJourneyActivation);}async[a131_0x494dd8(0x22f)](_0x2f44de,_0x3634bc){const _0x1bb06f=a131_0x494dd8;return await this[_0x1bb06f(0x1ed)][_0x1bb06f(0x254)](_0x2f44de,_0x3634bc);}async['getColumnMapping'](_0x3341f8){const _0x1e12cd=a131_0x494dd8,_0x9bef39=await this[_0x1e12cd(0x245)](_0x3341f8),_0x20b706=generateColumnMapping(_0x9bef39);return{'journeyId':_0x9bef39['id'],'journeyName':_0x9bef39['attributes'][_0x1e12cd(0x255)],'database':'cdp_audience_'+_0x9bef39[_0x1e12cd(0x20a)]['audienceId'],'table':'journey_'+_0x9bef39['id'],'columns':_0x20b706};}async[a131_0x494dd8(0x248)](_0x45c152){const _0x4eb188=a131_0x494dd8;return this[_0x4eb188(0x1ed)][_0x4eb188(0x214)](_0x45c152);}async['getLatestJourneyId'](_0x349ea1){const _0x4c8ecc=a131_0x494dd8;if(!_0x349ea1)return undefined;try{const _0x37401f=await this['getBundle'](_0x349ea1);return _0x37401f[_0x4c8ecc(0x250)];}catch{return undefined;}}async[a131_0x494dd8(0x217)](_0x25752d){const _0x3cbe53=a131_0x494dd8,_0x979583=await this['getJourney'](_0x25752d),_0x5df559=_0x979583[_0x3cbe53(0x20a)][_0x3cbe53(0x1f9)];if(!_0x5df559)return{'bundleId':'','bundleName':_0x979583['attributes'][_0x3cbe53(0x255)],'bundleDescription':_0x979583['attributes'][_0x3cbe53(0x240)]??null,'latestJourneyId':_0x979583['id'],'versions':[synthesizePreBundleVersion(_0x979583)]};const _0x475dd8=await this[_0x3cbe53(0x248)](_0x5df559);return{'bundleId':_0x5df559,'bundleName':_0x475dd8[_0x3cbe53(0x255)],'bundleDescription':_0x475dd8[_0x3cbe53(0x240)]??null,'latestJourneyId':_0x475dd8[_0x3cbe53(0x250)],'versions':formatVersionsFromBundle(_0x475dd8)};}async[a131_0x494dd8(0x1f1)](_0x563c42){const _0x31845f=a131_0x494dd8,_0x3009ae=await this[_0x31845f(0x245)](_0x563c42),_0x1495f8=_0x3009ae[_0x31845f(0x20a)][_0x31845f(0x1f9)];if(!_0x1495f8)throw new SDKError(ErrorCode[_0x31845f(0x247)],_0x31845f(0x24f));await this[_0x31845f(0x1ed)]['checkJourneyAppendable'](_0x1495f8);const _0x1b4f85=await this[_0x31845f(0x1ed)][_0x31845f(0x214)](_0x1495f8),_0x4de2c8=_0x1b4f85['name']+'\x20v'+(_0x1b4f85[_0x31845f(0x258)]+0x1);return this[_0x31845f(0x1ed)][_0x31845f(0x203)](_0x1495f8,{'sourceId':_0x563c42,'attributes':{'name':_0x4de2c8}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x49d824=a132_0x3eb5;(function(_0x1478d3,_0x3955c3){const _0x26b7c9=a132_0x3eb5,_0x403fd6=_0x1478d3();while(!![]){try{const _0x5c12cb=parseInt(_0x26b7c9(0x78))/0x1+parseInt(_0x26b7c9(0x76))/0x2+-parseInt(_0x26b7c9(0x79))/0x3*(parseInt(_0x26b7c9(0x74))/0x4)+parseInt(_0x26b7c9(0x75))/0x5*(-parseInt(_0x26b7c9(0x7a))/0x6)+parseInt(_0x26b7c9(0x73))/0x7+-parseInt(_0x26b7c9(0x77))/0x8*(parseInt(_0x26b7c9(0x7d))/0x9)+parseInt(_0x26b7c9(0x7c))/0xa;if(_0x5c12cb===_0x3955c3)break;else _0x403fd6['push'](_0x403fd6['shift']());}catch(_0x13e877){_0x403fd6['push'](_0x403fd6['shift']());}}}(a132_0x2fa8,0xbc9b1));import{createTextCache}from'../../utils/local-cache.js';function a132_0x2fa8(){const _0x54f2e6=['5HTkpTJ','1153546wXKzGx','16NpFMXe','1313693xJiOay','25851sqryqk','4842174MwwTJv','clear','5502390zwmCGZ','6629454ulJLXi','read','last_chat_id','6757534wnXtLe','164jzRWTJ'];a132_0x2fa8=function(){return _0x54f2e6;};return a132_0x2fa8();}const chatIdCache=createTextCache(a132_0x49d824(0x7f),'llm/chat');export function saveLastChatId(_0xd9245){chatIdCache['write'](_0xd9245);}function a132_0x3eb5(_0x385ac1,_0x1af959){_0x385ac1=_0x385ac1-0x73;const _0x2fa8be=a132_0x2fa8();let _0x3eb579=_0x2fa8be[_0x385ac1];return _0x3eb579;}export function loadLastChatId(){const _0x5f4cba=a132_0x49d824;return chatIdCache[_0x5f4cba(0x7e)]();}export function clearLastChatId(){const _0x41753a=a132_0x49d824;chatIdCache[_0x41753a(0x7b)]();}
|