@treasuredata/tdx 2026.3.43 → 2026.3.45
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/auth-login-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/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.d.ts +4 -1
- package/dist/sdk/segment/child-segment-yaml.d.ts.map +1 -1
- package/dist/sdk/segment/child-segment-yaml.js +1 -1
- package/dist/sdk/segment/child-segment-yaml.js.map +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
|
-
const a131_0x32e8f2=a131_0x53e2;(function(_0x1b8d98,_0x77a628){const _0x2ae1cd=a131_0x53e2,_0x3527f2=_0x1b8d98();while(!![]){try{const _0x4bbd9a=parseInt(_0x2ae1cd(0x24f))/0x1*(parseInt(_0x2ae1cd(0x232))/0x2)+parseInt(_0x2ae1cd(0x1ea))/0x3*(-parseInt(_0x2ae1cd(0x22b))/0x4)+-parseInt(_0x2ae1cd(0x1ec))/0x5*(parseInt(_0x2ae1cd(0x238))/0x6)+parseInt(_0x2ae1cd(0x220))/0x7+-parseInt(_0x2ae1cd(0x1fe))/0x8*(parseInt(_0x2ae1cd(0x1d2))/0x9)+-parseInt(_0x2ae1cd(0x1f3))/0xa+-parseInt(_0x2ae1cd(0x21a))/0xb*(-parseInt(_0x2ae1cd(0x1fa))/0xc);if(_0x4bbd9a===_0x77a628)break;else _0x3527f2['push'](_0x3527f2['shift']());}catch(_0x4a2344){_0x3527f2['push'](_0x3527f2['shift']());}}}(a131_0x26e7,0x80596));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x50f39c){const _0x48e932=a131_0x53e2;return _0x50f39c[_0x48e932(0x23d)]??_0x50f39c[_0x48e932(0x1e4)]?.[_0x48e932(0x23d)]??undefined;}function getVersionNumber(_0x18d9fe){const _0x34f6a1=a131_0x53e2;return _0x18d9fe['versionNumber']??_0x18d9fe[_0x34f6a1(0x1e4)]?.['versionNumber']??0x0;}function getState(_0x306695){const _0x5d344d=a131_0x53e2;return _0x306695[_0x5d344d(0x1d4)]??_0x306695['attributes']?.['state'];}export function deduplicateJourneysByBundle(_0x124cbc){const _0x29b800=a131_0x53e2,_0x1f3d7b=new Map();let _0x39208e=0x0;for(const _0x5823d2 of _0x124cbc){const _0x30ff01=getBundleId(_0x5823d2);if(!_0x30ff01){const _0x21efc1='no-bundle-'+(_0x5823d2['id']??_0x29b800(0x253)+_0x39208e++);_0x1f3d7b['set'](_0x21efc1,_0x5823d2);continue;}const _0x55f336=_0x1f3d7b[_0x29b800(0x231)](_0x30ff01);if(!_0x55f336)_0x1f3d7b['set'](_0x30ff01,_0x5823d2);else{const _0xd781cb=getState(_0x55f336)===_0x29b800(0x255),_0x355e89=getState(_0x5823d2)===_0x29b800(0x255);if(_0x355e89&&!_0xd781cb)_0x1f3d7b[_0x29b800(0x22f)](_0x30ff01,_0x5823d2);else{if(!_0x355e89&&_0xd781cb){}else{const _0x521201=getVersionNumber(_0x55f336),_0x32d485=getVersionNumber(_0x5823d2);_0x32d485>_0x521201&&_0x1f3d7b[_0x29b800(0x22f)](_0x30ff01,_0x5823d2);}}}}return Array[_0x29b800(0x1d3)](_0x1f3d7b[_0x29b800(0x1c8)]());}const VALID_JOURNEY_STATES=new Set([a131_0x32e8f2(0x1c7),a131_0x32e8f2(0x20d),'launched']);export function parseJourneyState(_0x1d8605){const _0x29f581=a131_0x32e8f2;if(typeof _0x1d8605===_0x29f581(0x1e1)&&VALID_JOURNEY_STATES[_0x29f581(0x21c)](_0x1d8605))return _0x1d8605;return _0x29f581(0x1c7);}export function entityToJourneyListItem(_0x480fec,_0x5e8ead){const _0x3da042=a131_0x32e8f2,_0x4f2d8a=_0x480fec[_0x3da042(0x1e4)];return{'id':_0x480fec['id'],'name':_0x4f2d8a[_0x3da042(0x256)]??'','journeyBundleName':_0x4f2d8a[_0x3da042(0x1fc)]??_0x4f2d8a[_0x3da042(0x256)]??'','journeyBundleId':_0x4f2d8a['journeyBundleId']??'','versionNumber':_0x4f2d8a[_0x3da042(0x249)],'description':_0x4f2d8a[_0x3da042(0x207)]??null,'state':parseJourneyState(_0x4f2d8a[_0x3da042(0x1d4)]),'paused':_0x4f2d8a[_0x3da042(0x24a)]??![],'audienceId':_0x5e8ead,'folderId':_0x4f2d8a[_0x3da042(0x1cf)]??_0x480fec[_0x3da042(0x1f8)]?.[_0x3da042(0x1c4)]?.[_0x3da042(0x240)]?.['id']??null,'createdAt':_0x4f2d8a['createdAt']??'','updatedAt':_0x4f2d8a[_0x3da042(0x217)]??''};}function convertToColumnId(_0x299688){const _0x38a655=a131_0x32e8f2;return _0x299688[_0x38a655(0x1db)](/-/g,'_');}function getStepEntries(_0x321ad6){const _0x163a2b=a131_0x32e8f2;if(!_0x321ad6)return[];if(Array[_0x163a2b(0x236)](_0x321ad6))return _0x321ad6['map'](_0x3f820a=>[_0x3f820a['id'],_0x3f820a]);return Object['entries'](_0x321ad6);}export function flattenJourneyActivation(_0x4e6572){const _0x55203f=a131_0x32e8f2,{activationParams:_0x78b065,activationId:_0x5eba31,runAfterJourneyRefresh:_0x51f925}=_0x4e6572[_0x55203f(0x1e4)];return{'id':_0x4e6572['id'],'activationId':_0x5eba31,'runAfterJourneyRefresh':_0x51f925,..._0x78b065};}function col(_0xfd00cf,_0x388e2a={}){const _0x2becf9=a131_0x32e8f2;return{'column':_0xfd00cf,'direction':null,'stageIndex':null,'stageName':null,'category':_0x2becf9(0x1dc),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x388e2a};}export function generateColumnMapping(_0xeaa17b){const _0x133bb6=a131_0x32e8f2,_0x83a2a0=[];_0x83a2a0[_0x133bb6(0x243)](col('cdp_customer_id')),_0x83a2a0[_0x133bb6(0x243)](col('intime_journey',{'direction':'in','category':'journey'})),_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x201),{'direction':'out','category':'journey'}));_0xeaa17b[_0x133bb6(0x1e4)][_0x133bb6(0x206)]&&_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1d9),{'direction':'in','category':_0x133bb6(0x206),'detail':_0xeaa17b[_0x133bb6(0x1e4)]['goal']['name']||null}));const _0x4063d3=_0xeaa17b[_0x133bb6(0x1e4)][_0x133bb6(0x213)]||[];for(let _0x4655b1=0x0;_0x4655b1<_0x4063d3[_0x133bb6(0x1ee)];_0x4655b1++){const _0x1d6708=_0x4063d3[_0x4655b1],_0x1ef1ac=_0x1d6708[_0x133bb6(0x256)],_0x611dfc={'stageIndex':_0x4655b1,'stageName':_0x1ef1ac},_0x19804a=_0x1d6708['entryCriteria']?.[_0x133bb6(0x256)]||null;_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cb)+_0x4655b1,{..._0x611dfc,'direction':'in','category':_0x133bb6(0x1f2),'detail':_0x19804a})),_0x83a2a0[_0x133bb6(0x243)](col('outtime_stage_'+_0x4655b1,{..._0x611dfc,'direction':_0x133bb6(0x1e8),'category':_0x133bb6(0x1f2),'detail':_0x19804a}));_0x1d6708[_0x133bb6(0x23e)]&&_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cb)+_0x4655b1+_0x133bb6(0x216),{..._0x611dfc,'direction':'in','category':_0x133bb6(0x23e),'detail':_0x1d6708[_0x133bb6(0x23e)][_0x133bb6(0x256)]||null}));const _0x57d3cb=_0x1d6708[_0x133bb6(0x225)]||_0x1d6708[_0x133bb6(0x235)]||[];for(let _0x593036=0x0;_0x593036<_0x57d3cb[_0x133bb6(0x1ee)];_0x593036++){_0x83a2a0[_0x133bb6(0x243)](col('intime_stage_'+_0x4655b1+'_exit_'+_0x593036,{..._0x611dfc,'direction':'in','category':'exit_criteria','detail':_0x57d3cb[_0x593036]['name']||null}));}const _0x57481f=getStepEntries(_0x1d6708[_0x133bb6(0x20c)]);for(const [_0x516ddb,_0x14d2de]of _0x57481f){const _0x3f63ec=convertToColumnId(_0x516ddb),_0x296d3f=_0x14d2de[_0x133bb6(0x1ed)]||null,_0x7f8cd6=_0x14d2de[_0x133bb6(0x256)]||null,_0x26cb5b={..._0x611dfc,'stepType':_0x296d3f,'stepName':_0x7f8cd6,'stepId':_0x516ddb};_0x83a2a0['push'](col('intime_stage_'+_0x4655b1+'_'+_0x3f63ec,{..._0x26cb5b,'direction':'in','category':'step'})),_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cc)+_0x4655b1+'_'+_0x3f63ec,{..._0x26cb5b,'direction':_0x133bb6(0x1e8),'category':_0x133bb6(0x21b)}));if(_0x14d2de[_0x133bb6(0x1ed)]===_0x133bb6(0x1df)&&_0x14d2de[_0x133bb6(0x1d0)])for(const _0x617565 of _0x14d2de[_0x133bb6(0x1d0)]){_0x617565['segmentId']&&_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cb)+_0x4655b1+'_'+_0x3f63ec+'_'+_0x617565[_0x133bb6(0x22c)],{..._0x26cb5b,'direction':'in','category':_0x133bb6(0x212),'detail':_0x617565[_0x133bb6(0x256)]||(_0x617565[_0x133bb6(0x24b)]?_0x133bb6(0x1d7):null)}));}if((_0x14d2de[_0x133bb6(0x1ed)]===_0x133bb6(0x23b)||_0x14d2de[_0x133bb6(0x1ed)]==='ABTest')&&_0x14d2de[_0x133bb6(0x1c6)])for(const _0x130ceb of _0x14d2de['variants']){_0x130ceb['id']&&_0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x1cb)+_0x4655b1+'_'+_0x3f63ec+_0x133bb6(0x1f4)+convertToColumnId(_0x130ceb['id']),{..._0x26cb5b,'direction':'in','category':_0x133bb6(0x239),'detail':_0x130ceb[_0x133bb6(0x256)]||null}));}if(_0x14d2de[_0x133bb6(0x1ed)]===_0x133bb6(0x1d8)||_0x14d2de[_0x133bb6(0x1ed)]===_0x133bb6(0x1f0)){const _0x1253b9=[];if(_0x14d2de[_0x133bb6(0x21d)])_0x1253b9['push'](_0x14d2de[_0x133bb6(0x21d)]);else{if(Array['isArray'](_0x14d2de[_0x133bb6(0x1fd)]))for(const _0x3a13aa of _0x14d2de[_0x133bb6(0x1fd)]){_0x3a13aa['segmentId']&&!_0x3a13aa[_0x133bb6(0x1fb)]&&_0x1253b9[_0x133bb6(0x243)](_0x3a13aa['segmentId']);}else _0x14d2de[_0x133bb6(0x1e3)]?.[_0x133bb6(0x22c)]&&_0x1253b9[_0x133bb6(0x243)](_0x14d2de['waitCondition'][_0x133bb6(0x22c)]);}for(const _0x1e3c95 of _0x1253b9){_0x83a2a0['push'](col(_0x133bb6(0x1cb)+_0x4655b1+'_'+_0x3f63ec+'_'+_0x1e3c95,{..._0x26cb5b,'direction':'in','category':_0x133bb6(0x212)}));}}}}return _0x83a2a0[_0x133bb6(0x243)](col(_0x133bb6(0x237))),_0x83a2a0;}export function aggregateJourneyHistory(_0x52c55a){const _0x193300=a131_0x32e8f2,_0x9e8a13=_0x52c55a[_0x193300(0x248)]((_0x5e091a,_0x2a5958)=>_0x5e091a+(_0x2a5958[_0x193300(0x234)]??0x0),0x0),_0x1c5490=_0x52c55a['reduce']((_0x4e38a6,_0x111752)=>_0x4e38a6+(_0x111752[_0x193300(0x211)]??0x0),0x0),_0x1ad0e8=_0x52c55a[_0x193300(0x248)]((_0x3e9cab,_0x32af73)=>_0x3e9cab+((_0x32af73['exitInflux']??0x0)+(_0x32af73[_0x193300(0x202)]??0x0)),0x0),_0x166354=_0x52c55a[_0x52c55a[_0x193300(0x1ee)]-0x1];return{'size':_0x166354?.[_0x193300(0x257)]??0x0,'entered':_0x9e8a13,'goal_achieved':_0x1c5490,'completion_rate':_0x1c5490&&_0x9e8a13?_0x1c5490/_0x9e8a13*0x64:0x0,'exit_or_jump':_0x1ad0e8,'exit_or_jump_rate':_0x1ad0e8&&_0x9e8a13?_0x1ad0e8/_0x9e8a13*0x64:0x0};}export function aggregateStageHistory(_0x367db3){const _0x4b5b9a=a131_0x32e8f2,_0xffab6b=_0x367db3[_0x4b5b9a(0x248)]((_0x284ec3,_0x3f5251)=>_0x284ec3+(_0x3f5251[_0x4b5b9a(0x234)]??0x0),0x0),_0x4dbf00=_0x367db3[_0x4b5b9a(0x248)]((_0x5c900d,_0x573b22)=>_0x5c900d+(_0x573b22[_0x4b5b9a(0x241)]??0x0),0x0),_0x481150=_0x367db3[_0x4b5b9a(0x248)]((_0x2a3529,_0xe51190)=>_0x2a3529+((_0xe51190['exitInflux']??0x0)+(_0xe51190[_0x4b5b9a(0x202)]??0x0)),0x0),_0x4347f5=_0x367db3[_0x367db3[_0x4b5b9a(0x1ee)]-0x1];return{'size':_0x4347f5?.['size']??0x0,'entered':_0xffab6b,'milestone':_0x4dbf00,'milestone_rate':_0x4dbf00&&_0xffab6b?_0x4dbf00/_0xffab6b*0x64:0x0,'exit_or_jump':_0x481150,'exit_or_jump_rate':_0x481150&&_0xffab6b?_0x481150/_0xffab6b*0x64:0x0};}export function assembleJourneyStats(_0x2d62b5,_0x1deeed){const _0x4a5ce9=a131_0x32e8f2,_0x47319a=!!(_0x1deeed?.[_0x4a5ce9(0x1d3)]||_0x1deeed?.['to'])&&!!_0x2d62b5[_0x4a5ce9(0x228)]?.[_0x4a5ce9(0x1ee)];if(_0x47319a){const _0x52e87a=aggregateJourneyHistory(_0x2d62b5[_0x4a5ce9(0x228)]),_0x61e69b={'journey_id':_0x2d62b5[_0x4a5ce9(0x214)],..._0x1deeed?.[_0x4a5ce9(0x1d3)]&&{'from':_0x1deeed[_0x4a5ce9(0x1d3)]},..._0x1deeed?.['to']&&{'to':_0x1deeed['to']},..._0x52e87a};return _0x1deeed?.['includeHistory']&&(_0x61e69b['history']=_0x2d62b5[_0x4a5ce9(0x228)]),_0x61e69b;}return{'journey_id':_0x2d62b5[_0x4a5ce9(0x214)],'size':_0x2d62b5[_0x4a5ce9(0x257)],'entered':_0x2d62b5[_0x4a5ce9(0x24e)],'goal_achieved':_0x2d62b5[_0x4a5ce9(0x22e)],'completion_rate':_0x2d62b5[_0x4a5ce9(0x23f)],'exit_or_jump':_0x2d62b5[_0x4a5ce9(0x1f1)],'exit_or_jump_rate':_0x2d62b5[_0x4a5ce9(0x208)]};}export function formatVersionsFromBundle(_0x9868ca){const _0x19764e=a131_0x32e8f2,_0x102398=_0x9868ca[_0x19764e(0x1e2)][_0x19764e(0x209)](_0x176063=>({'journeyId':_0x176063['id'],'versionNumber':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x249)]??0x0,'name':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x256)],'state':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x1d4)],'paused':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x24a)],'createdAt':_0x176063[_0x19764e(0x1e4)]['createdAt'],'updatedAt':_0x176063[_0x19764e(0x1e4)][_0x19764e(0x217)]}));return _0x102398[_0x19764e(0x20e)]((_0x1c3fcd,_0x36bfbe)=>_0x1c3fcd['versionNumber']-_0x36bfbe[_0x19764e(0x249)]),_0x102398;}function a131_0x26e7(){const _0x386f4d=['resumeJourney','journey','segmentFolderId','branches','getActivation','108XKqnUy','from','state','pause','getConversionSankeyChart','Excluded\x20profiles','WaitStep','intime_goal','createVersion','replace','fixed','JOURNEY_NOT_FOUND','all','DecisionPoint','add','string','journeys','waitCondition','attributes','includeAllVersions','activation','listJourneys','out','getActivationSankeyChart','1365123QyetGd','listJourneysWithFolders','115kZsfQU','type','length','create','Wait','exitOrJumpSize','stage','2220630IidvXi','_variant_','getTrafficData','listVersions','filter','relationships','folder-segment','12oLvGMV','timedOutPath','journeyBundleName','conditions','77336NwBPOG','listSegmentFolders','getJourneyActivation','outtime_journey','jumpInflux','listJourneysFromParentSegment','applyVersionDeduplication','listActivations','goal','description','exitOrJumpRate','map','activationStepsById','INVALID_ARGUMENT','steps','simulation','sort','createJourney','getJourneyStatistics','goalInflux','branch','journeyStages','journeyId','pauseJourney','_milestone','updatedAt','getLatestJourneyId','listActivationsFlat','9214579UAliOG','step','has','conditionSegmentId','latestJourneyId','getJourneyBundle','497042euswHJ','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','conversion','rootFolderId','listJourneysWithDetails','exitCriterias','cdp_audience_','lastVersionNumber','history','limit','audienceId','4RHolCM','segmentId','listEntitiesByFolder','goalSize','set','\x20in\x20journey\x20','get','8wcMYEk','createJourneyVersion','entryInflux','exitCriteria','isArray','time','146994dOxxCr','variant','journeyStageId','AbTest','resume','journeyBundleId','milestone','completionRate','data','milestoneInflux','getColumnMapping','push','toLowerCase','getBundle','Journey\x20not\x20found:\x20','updateJourney','reduce','versionNumber','paused','excluded','flat','journey_','enteredSize','243402SYjQho','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','NOT_FOUND','client','idx-','fetchTrafficRaw','launched','name','size','parentFolder','createdAt','variants','draft','values','getJourney','checkJourneyAppendable','intime_stage_','outtime_stage_'];a131_0x26e7=function(){return _0x386f4d;};return a131_0x26e7();}function a131_0x53e2(_0x21902d,_0x3d02c9){_0x21902d=_0x21902d-0x1c4;const _0x26e76e=a131_0x26e7();let _0x53e2a9=_0x26e76e[_0x21902d];return _0x53e2a9;}export function synthesizePreBundleVersion(_0x373ff0){const _0x112ddb=a131_0x32e8f2;return{'journeyId':_0x373ff0['id'],'versionNumber':0x1,'name':_0x373ff0[_0x112ddb(0x1e4)]['name'],'state':_0x373ff0['attributes'][_0x112ddb(0x1d4)],'paused':_0x373ff0['attributes'][_0x112ddb(0x24a)],'createdAt':_0x373ff0[_0x112ddb(0x1e4)][_0x112ddb(0x1c5)],'updatedAt':_0x373ff0[_0x112ddb(0x1e4)][_0x112ddb(0x217)]};}export function buildStageNameMap(_0x479ab8){const _0x4be349=a131_0x32e8f2;return new Map(_0x479ab8['attributes'][_0x4be349(0x213)]?.[_0x4be349(0x209)](_0x4edcee=>[_0x4edcee['id'],_0x4edcee[_0x4be349(0x256)]])??[]);}export class JourneySDK{[a131_0x32e8f2(0x252)];constructor(_0x2a5268){const _0x5d1310=a131_0x32e8f2;this[_0x5d1310(0x252)]=new CDPApiClient(_0x2a5268);}['applyVersionDeduplication'](_0x51b4c3,_0x5ca9c3){return _0x5ca9c3?_0x51b4c3:deduplicateJourneysByBundle(_0x51b4c3);}async[a131_0x32e8f2(0x224)](_0x42c991,_0x5e286c){const _0x2ee6b3=a131_0x32e8f2;try{const _0x3b397f=await this['client'][_0x2ee6b3(0x224)](_0x42c991);return{'journeys':this[_0x2ee6b3(0x204)](_0x3b397f['journeys'],_0x5e286c),'activationStepsById':_0x3b397f[_0x2ee6b3(0x20a)]};}catch(_0x5ddac1){if(isHttp404Error(_0x5ddac1))return{'journeys':[],'activationStepsById':new Map()};throw _0x5ddac1;}}async[a131_0x32e8f2(0x203)](_0xe5c958,_0x2e5e33,_0x19df30){const _0x334529=a131_0x32e8f2;let _0x1892d7=_0x2e5e33;if(!_0x1892d7)try{const _0xe2470a=await this['client']['getParentSegmentFull'](_0xe5c958);_0x1892d7=_0xe2470a[_0x334529(0x223)]??undefined;}catch(_0x18c815){if(isHttp404Error(_0x18c815))return[];throw _0x18c815;}if(!_0x1892d7)return[];let _0x451069;if(_0x19df30?.[_0x334529(0x1e5)]){const _0x3c8ec2=await this[_0x334529(0x252)][_0x334529(0x1ff)](_0xe5c958),_0x3ec865=_0x3c8ec2[_0x334529(0x209)](_0x4a9df6=>this[_0x334529(0x252)][_0x334529(0x1e7)](_0x4a9df6['id'])),_0x43cbb3=await Promise[_0x334529(0x1de)](_0x3ec865),_0x2d6253=new Set();_0x451069=_0x43cbb3[_0x334529(0x24c)]()['filter'](_0x54b29f=>{const _0x2a526c=_0x334529;if(_0x2d6253['has'](_0x54b29f['id']))return![];return _0x2d6253[_0x2a526c(0x1e0)](_0x54b29f['id']),!![];});}else{const _0x2def16=await this[_0x334529(0x252)]['listEntitiesByFolder'](_0x1892d7,0x20,![]),_0x5b8993=_0x2def16[_0x334529(0x240)],_0xfd3af7=_0x5b8993[_0x334529(0x1f7)](_0xf52bb8=>_0xf52bb8[_0x334529(0x1ed)]===_0x334529(0x1ce));_0x451069=_0xfd3af7[_0x334529(0x209)](_0x2dc516=>entityToJourneyListItem(_0x2dc516,_0xe5c958));}return this[_0x334529(0x204)](_0x451069,_0x19df30?.[_0x334529(0x1e5)]);}async[a131_0x32e8f2(0x1eb)](_0xdd6874,_0x53ec12,_0x3273c2){const _0x9a8c75=a131_0x32e8f2;if(!_0x53ec12)return{'journeys':[],'folders':[]};const _0x4eaba6=await this[_0x9a8c75(0x252)][_0x9a8c75(0x22d)](_0x53ec12,0x20,![]),_0x3bddcf=_0x4eaba6[_0x9a8c75(0x240)],_0x421525=_0x3bddcf['filter'](_0x2545fd=>_0x2545fd['type']===_0x9a8c75(0x1f9)&&_0x2545fd['id']!==_0x53ec12),_0x2b777d=_0x421525[_0x9a8c75(0x209)](_0x576468=>({'id':_0x576468['id'],'name':_0x576468['attributes'][_0x9a8c75(0x256)]})),_0x57f694=_0x3bddcf[_0x9a8c75(0x1f7)](_0x18b0a7=>_0x18b0a7[_0x9a8c75(0x1ed)]===_0x9a8c75(0x1ce)),_0x54558b=_0x57f694[_0x9a8c75(0x209)](_0x38fb0f=>entityToJourneyListItem(_0x38fb0f,_0xdd6874));return{'journeys':this['applyVersionDeduplication'](_0x54558b,_0x3273c2?.[_0x9a8c75(0x1e5)]),'folders':_0x2b777d};}async['listJourneysWithDetailsFromParentSegment'](_0x2b2f56,_0x373f50){const _0x46dd9d=a131_0x32e8f2;let _0x17725c;try{_0x17725c=await this[_0x46dd9d(0x252)]['listSegmentFolders'](_0x2b2f56);}catch(_0x5c194d){if(isHttp404Error(_0x5c194d))return{'journeys':[],'activationStepsById':new Map()};throw _0x5c194d;}const _0x11cb19=_0x17725c['map'](async _0x47f904=>{const _0x1e3153=_0x46dd9d;return await this[_0x1e3153(0x224)](_0x47f904['id'],_0x373f50?.[_0x1e3153(0x1e5)]);}),_0xa893fb=await Promise[_0x46dd9d(0x1de)](_0x11cb19),_0x4bfc5b=new Map(),_0x1c081b=[];for(const _0xa6ba9c of _0xa893fb){_0x1c081b[_0x46dd9d(0x243)](..._0xa6ba9c[_0x46dd9d(0x1e2)]);for(const [_0x504f0f,_0x19c3c7]of _0xa6ba9c[_0x46dd9d(0x20a)]){_0x4bfc5b[_0x46dd9d(0x22f)](_0x504f0f,_0x19c3c7);}}const _0x5f43f1=new Set(),_0x375135=_0x1c081b['filter'](_0xb9791=>{const _0x4d711d=_0x46dd9d;if(_0x5f43f1[_0x4d711d(0x21c)](_0xb9791['id']))return![];return _0x5f43f1['add'](_0xb9791['id']),!![];});return{'journeys':this['applyVersionDeduplication'](_0x375135,_0x373f50?.[_0x46dd9d(0x1e5)]),'activationStepsById':_0x4bfc5b};}async[a131_0x32e8f2(0x1c9)](_0x46cce0){const _0x19fbc4=a131_0x32e8f2;try{return await this[_0x19fbc4(0x252)][_0x19fbc4(0x1c9)](_0x46cce0);}catch(_0x404c2b){if(isHttp404Error(_0x404c2b))throw new SDKError(ErrorCode[_0x19fbc4(0x1dd)],_0x19fbc4(0x246)+_0x46cce0,_0x404c2b);throw _0x404c2b;}}async['resolveJourneyId'](_0x499a5b,_0x480286){const _0x471f97=a131_0x32e8f2,_0x1d6b28=await this['listJourneysFromParentSegment'](_0x499a5b),_0x336cb5=_0x1d6b28['find'](_0x4dd002=>_0x4dd002[_0x471f97(0x1fc)][_0x471f97(0x244)]()===_0x480286['toLowerCase']());if(!_0x336cb5)throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x471f97(0x246)+_0x480286,undefined,{'helpText':_0x471f97(0x250)});return _0x336cb5['id'];}async['getStatistics'](_0x432403,_0x237e49){const _0x4ae775=a131_0x32e8f2;try{return await this['client'][_0x4ae775(0x210)](_0x432403,_0x237e49);}catch(_0x36328d){if(isHttp404Error(_0x36328d))throw new SDKError(ErrorCode[_0x4ae775(0x1dd)],'Journey\x20not\x20found:\x20'+_0x432403,_0x36328d);throw _0x36328d;}}async[a131_0x32e8f2(0x1f5)](_0xcefd4c,_0x13b35f){const _0x5598b4=a131_0x32e8f2,_0x592d4f={'from':_0x13b35f?.[_0x5598b4(0x1d3)],'to':_0x13b35f?.['to'],'limit':_0x13b35f?.[_0x5598b4(0x229)]},_0x1eff3e=_0x13b35f?.[_0x5598b4(0x1ed)]!==_0x5598b4(0x222);try{const [_0x42d665,_0x625e8d]=await Promise[_0x5598b4(0x1de)]([this[_0x5598b4(0x254)](_0xcefd4c,_0x13b35f?.[_0x5598b4(0x1ed)],_0x592d4f),_0x1eff3e?this[_0x5598b4(0x1c9)](_0xcefd4c):undefined]);if(_0x42d665['activation']&&_0x625e8d){const _0x997038=buildStageNameMap(_0x625e8d);_0x42d665['activation']=_0x42d665['activation']['map'](_0x42e8d7=>({..._0x42e8d7,'journeyStageName':_0x997038[_0x5598b4(0x231)](_0x42e8d7[_0x5598b4(0x23a)])??_0x42e8d7[_0x5598b4(0x23a)]}));}return _0x42d665;}catch(_0x2f5c34){if(isHttp404Error(_0x2f5c34))throw new SDKError(ErrorCode[_0x5598b4(0x1dd)],_0x5598b4(0x246)+_0xcefd4c,_0x2f5c34);throw _0x2f5c34;}}async['fetchTrafficRaw'](_0x4df39c,_0x33899c,_0x426c2d){const _0x1199eb=a131_0x32e8f2;if(_0x33899c==='conversion'){const _0x237aeb=await this[_0x1199eb(0x252)]['getConversionSankeyChart'](_0x4df39c,_0x426c2d);return{'conversion':_0x237aeb};}if(_0x33899c===_0x1199eb(0x1e6)){const _0x522671=await this[_0x1199eb(0x252)][_0x1199eb(0x1e9)](_0x4df39c,_0x426c2d);return{'activation':_0x522671};}const [_0x1fe2ba,_0x340895]=await Promise[_0x1199eb(0x1de)]([this[_0x1199eb(0x252)][_0x1199eb(0x1d6)](_0x4df39c,_0x426c2d),this[_0x1199eb(0x252)][_0x1199eb(0x1e9)](_0x4df39c,_0x426c2d)]);return{'conversion':_0x1fe2ba,'activation':_0x340895};}async[a131_0x32e8f2(0x1d5)](_0x5105ee){const _0x333370=a131_0x32e8f2;try{return await this[_0x333370(0x252)][_0x333370(0x215)](_0x5105ee);}catch(_0x4a50ea){if(isHttp404Error(_0x4a50ea))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x333370(0x246)+_0x5105ee,_0x4a50ea);throw _0x4a50ea;}}async[a131_0x32e8f2(0x23c)](_0x478b9e){const _0x27af78=a131_0x32e8f2;try{return await this[_0x27af78(0x252)][_0x27af78(0x1cd)](_0x478b9e);}catch(_0x208750){if(isHttp404Error(_0x208750))throw new SDKError(ErrorCode[_0x27af78(0x1dd)],_0x27af78(0x246)+_0x478b9e,_0x208750);throw _0x208750;}}async[a131_0x32e8f2(0x1ef)](_0xa93a3c){const _0x5dba73=a131_0x32e8f2;return await this[_0x5dba73(0x252)][_0x5dba73(0x20f)](_0xa93a3c);}async['update'](_0x2b9e17,_0xb86bf8){const _0xe1d5a5=a131_0x32e8f2;try{return await this[_0xe1d5a5(0x252)][_0xe1d5a5(0x247)](_0x2b9e17,_0xb86bf8);}catch(_0xeb5608){if(isHttp404Error(_0xeb5608))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0xe1d5a5(0x246)+_0x2b9e17,_0xeb5608);throw _0xeb5608;}}async[a131_0x32e8f2(0x1d1)](_0x13a7cf,_0x23f9dd){const _0xdbfd5e=a131_0x32e8f2;try{return await this['client'][_0xdbfd5e(0x200)](_0x13a7cf,_0x23f9dd);}catch(_0x1a4da4){if(isHttp404Error(_0x1a4da4))throw new SDKError(ErrorCode[_0xdbfd5e(0x251)],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x23f9dd+_0xdbfd5e(0x230)+_0x13a7cf,_0x1a4da4);throw _0x1a4da4;}}async[a131_0x32e8f2(0x205)](_0x11f44f){const _0x50de23=a131_0x32e8f2;try{return await this[_0x50de23(0x252)]['listJourneyActivations'](_0x11f44f);}catch(_0x433e37){if(isHttp404Error(_0x433e37))return[];throw _0x433e37;}}async[a131_0x32e8f2(0x219)](_0xc581a8){const _0x63d56=a131_0x32e8f2,_0x25ed06=await this[_0x63d56(0x205)](_0xc581a8);return _0x25ed06[_0x63d56(0x209)](flattenJourneyActivation);}async['createActivation'](_0x68615,_0x42f608){return await this['client']['createJourneyActivation'](_0x68615,_0x42f608);}async[a131_0x32e8f2(0x242)](_0xb95ba4){const _0xe265a9=a131_0x32e8f2,_0x2ccf25=await this['getJourney'](_0xb95ba4),_0x359e86=generateColumnMapping(_0x2ccf25);return{'journeyId':_0x2ccf25['id'],'journeyName':_0x2ccf25[_0xe265a9(0x1e4)]['name'],'database':_0xe265a9(0x226)+_0x2ccf25['attributes'][_0xe265a9(0x22a)],'table':_0xe265a9(0x24d)+_0x2ccf25['id'],'columns':_0x359e86};}async[a131_0x32e8f2(0x245)](_0x12c28e){const _0x45fc45=a131_0x32e8f2;return this[_0x45fc45(0x252)][_0x45fc45(0x21f)](_0x12c28e);}async[a131_0x32e8f2(0x218)](_0xa2c03d){if(!_0xa2c03d)return undefined;try{const _0x37298e=await this['getBundle'](_0xa2c03d);return _0x37298e['latestJourneyId'];}catch{return undefined;}}async[a131_0x32e8f2(0x1f6)](_0x43643c){const _0x3b9289=a131_0x32e8f2,_0x47ed7e=await this[_0x3b9289(0x1c9)](_0x43643c),_0x43f023=_0x47ed7e[_0x3b9289(0x1e4)]['journeyBundleId'];if(!_0x43f023)return{'bundleId':'','bundleName':_0x47ed7e[_0x3b9289(0x1e4)][_0x3b9289(0x256)],'bundleDescription':_0x47ed7e[_0x3b9289(0x1e4)][_0x3b9289(0x207)]??null,'latestJourneyId':_0x47ed7e['id'],'versions':[synthesizePreBundleVersion(_0x47ed7e)]};const _0x477a2e=await this[_0x3b9289(0x245)](_0x43f023);return{'bundleId':_0x43f023,'bundleName':_0x477a2e['name'],'bundleDescription':_0x477a2e['description']??null,'latestJourneyId':_0x477a2e[_0x3b9289(0x21e)],'versions':formatVersionsFromBundle(_0x477a2e)};}async[a131_0x32e8f2(0x1da)](_0x4ac9ef){const _0x500e75=a131_0x32e8f2,_0x133dbc=await this[_0x500e75(0x1c9)](_0x4ac9ef),_0x235b71=_0x133dbc['attributes']['journeyBundleId'];if(!_0x235b71)throw new SDKError(ErrorCode[_0x500e75(0x20b)],_0x500e75(0x221));await this[_0x500e75(0x252)][_0x500e75(0x1ca)](_0x235b71);const _0x5e96f4=await this[_0x500e75(0x252)]['getJourneyBundle'](_0x235b71),_0x23db49=_0x5e96f4[_0x500e75(0x256)]+'\x20v'+(_0x5e96f4[_0x500e75(0x227)]+0x1);return this[_0x500e75(0x252)][_0x500e75(0x233)](_0x235b71,{'sourceId':_0x4ac9ef,'attributes':{'name':_0x23db49}});}}
|
|
1
|
+
const a131_0x3db142=a131_0x524b;(function(_0x152378,_0x40d8b1){const _0x511fd9=a131_0x524b,_0x29a3d9=_0x152378();while(!![]){try{const _0x4ab45c=parseInt(_0x511fd9(0xfd))/0x1*(-parseInt(_0x511fd9(0xe1))/0x2)+parseInt(_0x511fd9(0xfc))/0x3+parseInt(_0x511fd9(0xc2))/0x4+parseInt(_0x511fd9(0x9f))/0x5*(parseInt(_0x511fd9(0xd6))/0x6)+-parseInt(_0x511fd9(0xba))/0x7*(parseInt(_0x511fd9(0x108))/0x8)+-parseInt(_0x511fd9(0xde))/0x9*(parseInt(_0x511fd9(0xce))/0xa)+parseInt(_0x511fd9(0x117))/0xb*(parseInt(_0x511fd9(0xd8))/0xc);if(_0x4ab45c===_0x40d8b1)break;else _0x29a3d9['push'](_0x29a3d9['shift']());}catch(_0x481624){_0x29a3d9['push'](_0x29a3d9['shift']());}}}(a131_0x18ae,0xc2dd1));import{CDPApiClient}from'./client/cdp-api-client.js';import{SDKError,ErrorCode,isHttp404Error}from'./errors.js';function getBundleId(_0x3f0531){const _0x3cffab=a131_0x524b;return _0x3f0531[_0x3cffab(0xd9)]??_0x3f0531[_0x3cffab(0x10f)]?.['journeyBundleId']??undefined;}function getVersionNumber(_0x11b2ad){const _0x364277=a131_0x524b;return _0x11b2ad[_0x364277(0xf4)]??_0x11b2ad[_0x364277(0x10f)]?.[_0x364277(0xf4)]??0x0;}function a131_0x524b(_0x152acd,_0x43172e){_0x152acd=_0x152acd-0x92;const _0x18aed4=a131_0x18ae();let _0x524be3=_0x18aed4[_0x152acd];return _0x524be3;}function getState(_0x278018){const _0x2704a7=a131_0x524b;return _0x278018['state']??_0x278018[_0x2704a7(0x10f)]?.[_0x2704a7(0xd2)];}export function deduplicateJourneysByBundle(_0x32b9a2){const _0x101f56=a131_0x524b,_0x546fd5=new Map();let _0x22caa9=0x0;for(const _0x8d2b08 of _0x32b9a2){const _0x400b2b=getBundleId(_0x8d2b08);if(!_0x400b2b){const _0x2ba195=_0x101f56(0x9c)+(_0x8d2b08['id']??'idx-'+_0x22caa9++);_0x546fd5[_0x101f56(0xaf)](_0x2ba195,_0x8d2b08);continue;}const _0x210909=_0x546fd5['get'](_0x400b2b);if(!_0x210909)_0x546fd5['set'](_0x400b2b,_0x8d2b08);else{const _0x25f18d=getState(_0x210909)===_0x101f56(0xf9),_0x115cb3=getState(_0x8d2b08)===_0x101f56(0xf9);if(_0x115cb3&&!_0x25f18d)_0x546fd5['set'](_0x400b2b,_0x8d2b08);else{if(!_0x115cb3&&_0x25f18d){}else{const _0x2abaed=getVersionNumber(_0x210909),_0x2e594e=getVersionNumber(_0x8d2b08);_0x2e594e>_0x2abaed&&_0x546fd5[_0x101f56(0xaf)](_0x400b2b,_0x8d2b08);}}}}return Array[_0x101f56(0xcf)](_0x546fd5['values']());}const VALID_JOURNEY_STATES=new Set(['draft',a131_0x3db142(0x126),a131_0x3db142(0xf9)]);export function parseJourneyState(_0x2c1d15){const _0x499521=a131_0x3db142;if(typeof _0x2c1d15===_0x499521(0x97)&&VALID_JOURNEY_STATES[_0x499521(0xa9)](_0x2c1d15))return _0x2c1d15;return _0x499521(0x110);}export function entityToJourneyListItem(_0x671992,_0x1d797c){const _0x432f0f=a131_0x3db142,_0x597f5c=_0x671992[_0x432f0f(0x10f)];return{'id':_0x671992['id'],'name':_0x597f5c['name']??'','journeyBundleName':_0x597f5c['journeyBundleName']??_0x597f5c['name']??'','journeyBundleId':_0x597f5c['journeyBundleId']??'','versionNumber':_0x597f5c['versionNumber'],'description':_0x597f5c[_0x432f0f(0xf1)]??null,'state':parseJourneyState(_0x597f5c[_0x432f0f(0xd2)]),'paused':_0x597f5c[_0x432f0f(0x101)]??![],'audienceId':_0x1d797c,'folderId':_0x597f5c[_0x432f0f(0x125)]??_0x671992[_0x432f0f(0xfe)]?.[_0x432f0f(0xdb)]?.[_0x432f0f(0xa4)]?.['id']??null,'createdAt':_0x597f5c[_0x432f0f(0x119)]??'','updatedAt':_0x597f5c[_0x432f0f(0x11e)]??''};}function convertToColumnId(_0x32c04d){return _0x32c04d['replace'](/-/g,'_');}function getStepEntries(_0x246878){const _0x3b337c=a131_0x3db142;if(!_0x246878)return[];if(Array[_0x3b337c(0xa0)](_0x246878))return _0x246878[_0x3b337c(0xe9)](_0x2797db=>[_0x2797db['id'],_0x2797db]);return Object[_0x3b337c(0xb7)](_0x246878);}export function flattenJourneyActivation(_0x500114){const _0x6deef1=a131_0x3db142,{activationParams:_0x3d1d82,activationId:_0x514e9e,runAfterJourneyRefresh:_0x512341}=_0x500114[_0x6deef1(0x10f)];return{'id':_0x500114['id'],'activationId':_0x514e9e,'runAfterJourneyRefresh':_0x512341,..._0x3d1d82};}function col(_0x465906,_0x24285f={}){const _0x151c3c=a131_0x3db142;return{'column':_0x465906,'direction':null,'stageIndex':null,'stageName':null,'category':_0x151c3c(0x92),'stepType':null,'stepName':null,'stepId':null,'detail':null,..._0x24285f};}export function generateColumnMapping(_0x515b77){const _0xc55ccb=a131_0x3db142,_0x598ba0=[];_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0xb9))),_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0x93),{'direction':'in','category':_0xc55ccb(0x95)})),_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0xb6),{'direction':'out','category':_0xc55ccb(0x95)}));_0x515b77[_0xc55ccb(0x10f)][_0xc55ccb(0x103)]&&_0x598ba0['push'](col(_0xc55ccb(0x106),{'direction':'in','category':'goal','detail':_0x515b77[_0xc55ccb(0x10f)][_0xc55ccb(0x103)][_0xc55ccb(0x10d)]||null}));const _0xa97833=_0x515b77[_0xc55ccb(0x10f)][_0xc55ccb(0xc0)]||[];for(let _0x32b5a3=0x0;_0x32b5a3<_0xa97833[_0xc55ccb(0x9a)];_0x32b5a3++){const _0x560f82=_0xa97833[_0x32b5a3],_0x31a89b=_0x560f82[_0xc55ccb(0x10d)],_0x11957b={'stageIndex':_0x32b5a3,'stageName':_0x31a89b},_0x488e7f=_0x560f82[_0xc55ccb(0x116)]?.[_0xc55ccb(0x10d)]||null;_0x598ba0['push'](col('intime_stage_'+_0x32b5a3,{..._0x11957b,'direction':'in','category':_0xc55ccb(0xbc),'detail':_0x488e7f})),_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0xb3)+_0x32b5a3,{..._0x11957b,'direction':_0xc55ccb(0xea),'category':_0xc55ccb(0xbc),'detail':_0x488e7f}));_0x560f82[_0xc55ccb(0xc5)]&&_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0x9e)+_0x32b5a3+'_milestone',{..._0x11957b,'direction':'in','category':'milestone','detail':_0x560f82[_0xc55ccb(0xc5)][_0xc55ccb(0x10d)]||null}));const _0x27dc87=_0x560f82[_0xc55ccb(0xb0)]||_0x560f82[_0xc55ccb(0xd4)]||[];for(let _0x126647=0x0;_0x126647<_0x27dc87[_0xc55ccb(0x9a)];_0x126647++){_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0x9e)+_0x32b5a3+'_exit_'+_0x126647,{..._0x11957b,'direction':'in','category':_0xc55ccb(0xf6),'detail':_0x27dc87[_0x126647][_0xc55ccb(0x10d)]||null}));}const _0x5b2fa5=getStepEntries(_0x560f82[_0xc55ccb(0xbb)]);for(const [_0xd1405c,_0x4715ee]of _0x5b2fa5){const _0x1717fe=convertToColumnId(_0xd1405c),_0x56e31e=_0x4715ee[_0xc55ccb(0x113)]||null,_0x5dd9f9=_0x4715ee[_0xc55ccb(0x10d)]||null,_0x4a8cff={..._0x11957b,'stepType':_0x56e31e,'stepName':_0x5dd9f9,'stepId':_0xd1405c};_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0x9e)+_0x32b5a3+'_'+_0x1717fe,{..._0x4a8cff,'direction':'in','category':'step'})),_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0xb3)+_0x32b5a3+'_'+_0x1717fe,{..._0x4a8cff,'direction':_0xc55ccb(0xea),'category':_0xc55ccb(0xd7)}));if(_0x4715ee[_0xc55ccb(0x113)]===_0xc55ccb(0x99)&&_0x4715ee[_0xc55ccb(0x9d)])for(const _0x493c89 of _0x4715ee[_0xc55ccb(0x9d)]){_0x493c89['segmentId']&&_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0x9e)+_0x32b5a3+'_'+_0x1717fe+'_'+_0x493c89[_0xc55ccb(0x122)],{..._0x4a8cff,'direction':'in','category':_0xc55ccb(0x10c),'detail':_0x493c89[_0xc55ccb(0x10d)]||(_0x493c89[_0xc55ccb(0x11a)]?_0xc55ccb(0xe2):null)}));}if((_0x4715ee[_0xc55ccb(0x113)]===_0xc55ccb(0xad)||_0x4715ee[_0xc55ccb(0x113)]===_0xc55ccb(0xa7))&&_0x4715ee[_0xc55ccb(0xc4)])for(const _0x24f9d5 of _0x4715ee[_0xc55ccb(0xc4)]){_0x24f9d5['id']&&_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0x9e)+_0x32b5a3+'_'+_0x1717fe+'_variant_'+convertToColumnId(_0x24f9d5['id']),{..._0x4a8cff,'direction':'in','category':'variant','detail':_0x24f9d5[_0xc55ccb(0x10d)]||null}));}if(_0x4715ee[_0xc55ccb(0x113)]===_0xc55ccb(0xa5)||_0x4715ee[_0xc55ccb(0x113)]===_0xc55ccb(0xdc)){const _0x222e9d=[];if(_0x4715ee['conditionSegmentId'])_0x222e9d[_0xc55ccb(0xbd)](_0x4715ee[_0xc55ccb(0xa1)]);else{if(Array[_0xc55ccb(0xa0)](_0x4715ee[_0xc55ccb(0xd3)]))for(const _0x501fb9 of _0x4715ee[_0xc55ccb(0xd3)]){_0x501fb9[_0xc55ccb(0x122)]&&!_0x501fb9[_0xc55ccb(0x10e)]&&_0x222e9d[_0xc55ccb(0xbd)](_0x501fb9['segmentId']);}else _0x4715ee[_0xc55ccb(0x102)]?.[_0xc55ccb(0x122)]&&_0x222e9d['push'](_0x4715ee[_0xc55ccb(0x102)][_0xc55ccb(0x122)]);}for(const _0x59ccc1 of _0x222e9d){_0x598ba0[_0xc55ccb(0xbd)](col(_0xc55ccb(0x9e)+_0x32b5a3+'_'+_0x1717fe+'_'+_0x59ccc1,{..._0x4a8cff,'direction':'in','category':_0xc55ccb(0x10c)}));}}}}return _0x598ba0['push'](col(_0xc55ccb(0x10b))),_0x598ba0;}function a131_0x18ae(){const _0x3caf74=['intime_journey','fetchTrafficRaw','journey','\x20in\x20journey\x20','string','getTrafficData','DecisionPoint','length','add','no-bundle-','branches','intime_stage_','172460vDGmKg','isArray','conditionSegmentId','goalSize','getStatistics','data','WaitStep','createJourneyVersion','ABTest','listJourneysWithDetailsFromParentSegment','has','getColumnMapping','jumpInflux','sort','AbTest','filter','set','exitCriterias','getActivationSankeyChart','journeyBundleName','outtime_stage_','activation','journeyStageId','outtime_journey','entries','create','cdp_customer_id','98ayYePD','steps','stage','push','applyVersionDeduplication','exitOrJumpSize','journeyStages','limit','3700472jjsqXz','getBundle','variants','milestone','Cannot\x20create\x20a\x20new\x20version:\x20this\x20journey\x20does\x20not\x20belong\x20to\x20a\x20bundle','milestoneInflux','NOT_FOUND','createJourney','includeAllVersions','listEntitiesByFolder','find','history','10xuvXMM','from','goalInflux','conversion','state','conditions','exitCriteria','getParentSegmentFull','192RTIGQL','step','477876pzFSZP','journeyBundleId','resolveJourneyId','parentFolder','Wait','listActivationsFlat','9851778ptlWci','size','Journey\x20not\x20found:\x20','584244BVypgp','Excluded\x20profiles','listSegmentFolders','all','getLatestJourneyId','listJourneysFromParentSegment','entryInflux','JOURNEY_NOT_FOUND','map','out','listActivations','includeHistory','listVersions','pause','listJourneysWithDetails','checkJourneyAppendable','description','activationStepsById','reduce','versionNumber','client','exit_criteria','getJourneyActivation','update','launched','journeys','journey_','1705527FGcETx','5Kvruvn','relationships','toLowerCase','Use\x20\x22tdx\x20journey\x20list\x22\x20to\x20see\x20available\x20journeys','paused','waitCondition','goal','cdp_audience_','get','intime_goal','enteredSize','296168MxWxmu','exitInflux','audienceId','time','branch','name','timedOutPath','attributes','draft','updateJourney','flat','type','listJourneys','lastVersionNumber','entryCriteria','352ULcGwK','createJourneyActivation','createdAt','excluded','INVALID_ARGUMENT','rootFolderId','latestJourneyId','updatedAt','journeyId','getJourney','getConversionSankeyChart','segmentId','folder-segment','pauseJourney','segmentFolderId','simulation','fixed'];a131_0x18ae=function(){return _0x3caf74;};return a131_0x18ae();}export function aggregateJourneyHistory(_0x54f313){const _0x2d8af1=a131_0x3db142,_0x8a4364=_0x54f313[_0x2d8af1(0xf3)]((_0x13b766,_0x309bd6)=>_0x13b766+(_0x309bd6[_0x2d8af1(0xe7)]??0x0),0x0),_0x59bd9f=_0x54f313[_0x2d8af1(0xf3)]((_0x59b004,_0x4c4699)=>_0x59b004+(_0x4c4699[_0x2d8af1(0xd0)]??0x0),0x0),_0x4003b0=_0x54f313['reduce']((_0x5c8ce0,_0x24fece)=>_0x5c8ce0+((_0x24fece[_0x2d8af1(0x109)]??0x0)+(_0x24fece[_0x2d8af1(0xab)]??0x0)),0x0),_0xb47378=_0x54f313[_0x54f313['length']-0x1];return{'size':_0xb47378?.[_0x2d8af1(0xdf)]??0x0,'entered':_0x8a4364,'goal_achieved':_0x59bd9f,'completion_rate':_0x59bd9f&&_0x8a4364?_0x59bd9f/_0x8a4364*0x64:0x0,'exit_or_jump':_0x4003b0,'exit_or_jump_rate':_0x4003b0&&_0x8a4364?_0x4003b0/_0x8a4364*0x64:0x0};}export function aggregateStageHistory(_0x386f9a){const _0x5958ac=a131_0x3db142,_0x14cb8d=_0x386f9a[_0x5958ac(0xf3)]((_0xec3f96,_0x5c8bf2)=>_0xec3f96+(_0x5c8bf2[_0x5958ac(0xe7)]??0x0),0x0),_0x14f819=_0x386f9a[_0x5958ac(0xf3)]((_0x2af5a1,_0x5040af)=>_0x2af5a1+(_0x5040af[_0x5958ac(0xc7)]??0x0),0x0),_0x15af3d=_0x386f9a['reduce']((_0x5c00d0,_0x559dd6)=>_0x5c00d0+((_0x559dd6[_0x5958ac(0x109)]??0x0)+(_0x559dd6[_0x5958ac(0xab)]??0x0)),0x0),_0x102553=_0x386f9a[_0x386f9a[_0x5958ac(0x9a)]-0x1];return{'size':_0x102553?.[_0x5958ac(0xdf)]??0x0,'entered':_0x14cb8d,'milestone':_0x14f819,'milestone_rate':_0x14f819&&_0x14cb8d?_0x14f819/_0x14cb8d*0x64:0x0,'exit_or_jump':_0x15af3d,'exit_or_jump_rate':_0x15af3d&&_0x14cb8d?_0x15af3d/_0x14cb8d*0x64:0x0};}export function assembleJourneyStats(_0x54c964,_0x50d14c){const _0x3e4658=a131_0x3db142,_0x51a357=!!(_0x50d14c?.[_0x3e4658(0xcf)]||_0x50d14c?.['to'])&&!!_0x54c964[_0x3e4658(0xcd)]?.[_0x3e4658(0x9a)];if(_0x51a357){const _0x3c9181=aggregateJourneyHistory(_0x54c964[_0x3e4658(0xcd)]),_0x3ab93c={'journey_id':_0x54c964[_0x3e4658(0x11f)],..._0x50d14c?.[_0x3e4658(0xcf)]&&{'from':_0x50d14c[_0x3e4658(0xcf)]},..._0x50d14c?.['to']&&{'to':_0x50d14c['to']},..._0x3c9181};return _0x50d14c?.[_0x3e4658(0xec)]&&(_0x3ab93c[_0x3e4658(0xcd)]=_0x54c964[_0x3e4658(0xcd)]),_0x3ab93c;}return{'journey_id':_0x54c964[_0x3e4658(0x11f)],'size':_0x54c964[_0x3e4658(0xdf)],'entered':_0x54c964[_0x3e4658(0x107)],'goal_achieved':_0x54c964[_0x3e4658(0xa2)],'completion_rate':_0x54c964['completionRate'],'exit_or_jump':_0x54c964[_0x3e4658(0xbf)],'exit_or_jump_rate':_0x54c964['exitOrJumpRate']};}export function formatVersionsFromBundle(_0x3a2eb8){const _0x210529=a131_0x3db142,_0x4faf2d=_0x3a2eb8[_0x210529(0xfa)][_0x210529(0xe9)](_0x5b0480=>({'journeyId':_0x5b0480['id'],'versionNumber':_0x5b0480['attributes'][_0x210529(0xf4)]??0x0,'name':_0x5b0480[_0x210529(0x10f)][_0x210529(0x10d)],'state':_0x5b0480[_0x210529(0x10f)][_0x210529(0xd2)],'paused':_0x5b0480['attributes'][_0x210529(0x101)],'createdAt':_0x5b0480[_0x210529(0x10f)][_0x210529(0x119)],'updatedAt':_0x5b0480['attributes']['updatedAt']}));return _0x4faf2d[_0x210529(0xac)]((_0x368f4f,_0x4844d4)=>_0x368f4f[_0x210529(0xf4)]-_0x4844d4['versionNumber']),_0x4faf2d;}export function synthesizePreBundleVersion(_0x333d79){const _0x586a94=a131_0x3db142;return{'journeyId':_0x333d79['id'],'versionNumber':0x1,'name':_0x333d79['attributes'][_0x586a94(0x10d)],'state':_0x333d79[_0x586a94(0x10f)][_0x586a94(0xd2)],'paused':_0x333d79[_0x586a94(0x10f)][_0x586a94(0x101)],'createdAt':_0x333d79[_0x586a94(0x10f)][_0x586a94(0x119)],'updatedAt':_0x333d79['attributes']['updatedAt']};}export function buildStageNameMap(_0x16f233){const _0x36bdab=a131_0x3db142;return new Map(_0x16f233[_0x36bdab(0x10f)][_0x36bdab(0xc0)]?.['map'](_0x379168=>[_0x379168['id'],_0x379168[_0x36bdab(0x10d)]])??[]);}export class JourneySDK{[a131_0x3db142(0xf5)];constructor(_0x284774){const _0x4abf9e=a131_0x3db142;this[_0x4abf9e(0xf5)]=new CDPApiClient(_0x284774);}[a131_0x3db142(0xbe)](_0x35b2b8,_0x463d92){return _0x463d92?_0x35b2b8:deduplicateJourneysByBundle(_0x35b2b8);}async['listJourneysWithDetails'](_0x59a829,_0x5df40b){const _0x47da0b=a131_0x3db142;try{const _0x271132=await this[_0x47da0b(0xf5)][_0x47da0b(0xef)](_0x59a829);return{'journeys':this[_0x47da0b(0xbe)](_0x271132['journeys'],_0x5df40b),'activationStepsById':_0x271132[_0x47da0b(0xf2)]};}catch(_0x1457a7){if(isHttp404Error(_0x1457a7))return{'journeys':[],'activationStepsById':new Map()};throw _0x1457a7;}}async[a131_0x3db142(0xe6)](_0x5a837b,_0x238b8e,_0x43f989){const _0x4d8a88=a131_0x3db142;let _0x8b747e=_0x238b8e;if(!_0x8b747e)try{const _0x576aa4=await this[_0x4d8a88(0xf5)][_0x4d8a88(0xd5)](_0x5a837b);_0x8b747e=_0x576aa4[_0x4d8a88(0x11c)]??undefined;}catch(_0x2d955d){if(isHttp404Error(_0x2d955d))return[];throw _0x2d955d;}if(!_0x8b747e)return[];let _0x17d999;if(_0x43f989?.[_0x4d8a88(0xca)]){const _0x41d6e8=await this[_0x4d8a88(0xf5)]['listSegmentFolders'](_0x5a837b),_0x340580=_0x41d6e8[_0x4d8a88(0xe9)](_0x564825=>this[_0x4d8a88(0xf5)][_0x4d8a88(0x114)](_0x564825['id'])),_0x44686f=await Promise[_0x4d8a88(0xe4)](_0x340580),_0x550834=new Set();_0x17d999=_0x44686f[_0x4d8a88(0x112)]()[_0x4d8a88(0xae)](_0x235fe0=>{const _0x2c5c52=_0x4d8a88;if(_0x550834['has'](_0x235fe0['id']))return![];return _0x550834[_0x2c5c52(0x9b)](_0x235fe0['id']),!![];});}else{const _0x57dd9d=await this[_0x4d8a88(0xf5)][_0x4d8a88(0xcb)](_0x8b747e,0x20,![]),_0x20e051=_0x57dd9d[_0x4d8a88(0xa4)],_0x2e848f=_0x20e051[_0x4d8a88(0xae)](_0xfa9dd0=>_0xfa9dd0[_0x4d8a88(0x113)]===_0x4d8a88(0x95));_0x17d999=_0x2e848f[_0x4d8a88(0xe9)](_0x3f909e=>entityToJourneyListItem(_0x3f909e,_0x5a837b));}return this[_0x4d8a88(0xbe)](_0x17d999,_0x43f989?.[_0x4d8a88(0xca)]);}async['listJourneysWithFolders'](_0x5cb578,_0x3c624e,_0x259ddd){const _0x549a1a=a131_0x3db142;if(!_0x3c624e)return{'journeys':[],'folders':[]};const _0x4d19b8=await this['client'][_0x549a1a(0xcb)](_0x3c624e,0x20,![]),_0x6b59ba=_0x4d19b8[_0x549a1a(0xa4)],_0x3d7a4f=_0x6b59ba[_0x549a1a(0xae)](_0x15c8d1=>_0x15c8d1['type']===_0x549a1a(0x123)&&_0x15c8d1['id']!==_0x3c624e),_0x376965=_0x3d7a4f[_0x549a1a(0xe9)](_0x31eda2=>({'id':_0x31eda2['id'],'name':_0x31eda2['attributes'][_0x549a1a(0x10d)]})),_0xea1be2=_0x6b59ba[_0x549a1a(0xae)](_0x59b10a=>_0x59b10a[_0x549a1a(0x113)]===_0x549a1a(0x95)),_0x30c99b=_0xea1be2[_0x549a1a(0xe9)](_0x46dce4=>entityToJourneyListItem(_0x46dce4,_0x5cb578));return{'journeys':this[_0x549a1a(0xbe)](_0x30c99b,_0x259ddd?.['includeAllVersions']),'folders':_0x376965};}async[a131_0x3db142(0xa8)](_0x2ed8f0,_0x4c967c){const _0x36aa88=a131_0x3db142;let _0x3e463c;try{_0x3e463c=await this[_0x36aa88(0xf5)][_0x36aa88(0xe3)](_0x2ed8f0);}catch(_0x149b2a){if(isHttp404Error(_0x149b2a))return{'journeys':[],'activationStepsById':new Map()};throw _0x149b2a;}const _0x5c5854=_0x3e463c[_0x36aa88(0xe9)](async _0x30e643=>{const _0x2f5474=_0x36aa88;return await this[_0x2f5474(0xef)](_0x30e643['id'],_0x4c967c?.['includeAllVersions']);}),_0x2f2b39=await Promise[_0x36aa88(0xe4)](_0x5c5854),_0x15bef2=new Map(),_0x47bc9d=[];for(const _0x4721a7 of _0x2f2b39){_0x47bc9d[_0x36aa88(0xbd)](..._0x4721a7[_0x36aa88(0xfa)]);for(const [_0x410cee,_0x4b533d]of _0x4721a7['activationStepsById']){_0x15bef2[_0x36aa88(0xaf)](_0x410cee,_0x4b533d);}}const _0x96cd68=new Set(),_0x58893d=_0x47bc9d['filter'](_0x49822e=>{const _0x4363f7=_0x36aa88;if(_0x96cd68[_0x4363f7(0xa9)](_0x49822e['id']))return![];return _0x96cd68[_0x4363f7(0x9b)](_0x49822e['id']),!![];});return{'journeys':this[_0x36aa88(0xbe)](_0x58893d,_0x4c967c?.[_0x36aa88(0xca)]),'activationStepsById':_0x15bef2};}async[a131_0x3db142(0x120)](_0x3ee308){const _0xa7f728=a131_0x3db142;try{return await this[_0xa7f728(0xf5)][_0xa7f728(0x120)](_0x3ee308);}catch(_0x3c50f6){if(isHttp404Error(_0x3c50f6))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0xa7f728(0xe0)+_0x3ee308,_0x3c50f6);throw _0x3c50f6;}}async[a131_0x3db142(0xda)](_0x35baf8,_0x29b704){const _0x140850=a131_0x3db142,_0x51759b=await this[_0x140850(0xe6)](_0x35baf8),_0x2b357f=_0x51759b[_0x140850(0xcc)](_0x5ed7e9=>_0x5ed7e9[_0x140850(0xb2)][_0x140850(0xff)]()===_0x29b704['toLowerCase']());if(!_0x2b357f)throw new SDKError(ErrorCode[_0x140850(0xe8)],'Journey\x20not\x20found:\x20'+_0x29b704,undefined,{'helpText':_0x140850(0x100)});return _0x2b357f['id'];}async[a131_0x3db142(0xa3)](_0x3f81b2,_0x1b6f5e){const _0x47ee27=a131_0x3db142;try{return await this[_0x47ee27(0xf5)]['getJourneyStatistics'](_0x3f81b2,_0x1b6f5e);}catch(_0x524fc3){if(isHttp404Error(_0x524fc3))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],_0x47ee27(0xe0)+_0x3f81b2,_0x524fc3);throw _0x524fc3;}}async[a131_0x3db142(0x98)](_0x52aa2a,_0xbeba77){const _0x2161b1=a131_0x3db142,_0x26f93f={'from':_0xbeba77?.['from'],'to':_0xbeba77?.['to'],'limit':_0xbeba77?.[_0x2161b1(0xc1)]},_0x2da77d=_0xbeba77?.[_0x2161b1(0x113)]!==_0x2161b1(0xd1);try{const [_0x19bfb9,_0x89033f]=await Promise[_0x2161b1(0xe4)]([this[_0x2161b1(0x94)](_0x52aa2a,_0xbeba77?.['type'],_0x26f93f),_0x2da77d?this[_0x2161b1(0x120)](_0x52aa2a):undefined]);if(_0x19bfb9[_0x2161b1(0xb4)]&&_0x89033f){const _0x5647e2=buildStageNameMap(_0x89033f);_0x19bfb9[_0x2161b1(0xb4)]=_0x19bfb9['activation'][_0x2161b1(0xe9)](_0x5d2fc5=>({..._0x5d2fc5,'journeyStageName':_0x5647e2[_0x2161b1(0x105)](_0x5d2fc5['journeyStageId'])??_0x5d2fc5[_0x2161b1(0xb5)]}));}return _0x19bfb9;}catch(_0x399fa5){if(isHttp404Error(_0x399fa5))throw new SDKError(ErrorCode[_0x2161b1(0xe8)],_0x2161b1(0xe0)+_0x52aa2a,_0x399fa5);throw _0x399fa5;}}async['fetchTrafficRaw'](_0x2bbe55,_0x39f234,_0x46a10e){const _0x20ec50=a131_0x3db142;if(_0x39f234===_0x20ec50(0xd1)){const _0x5c0247=await this[_0x20ec50(0xf5)][_0x20ec50(0x121)](_0x2bbe55,_0x46a10e);return{'conversion':_0x5c0247};}if(_0x39f234===_0x20ec50(0xb4)){const _0x25b360=await this[_0x20ec50(0xf5)][_0x20ec50(0xb1)](_0x2bbe55,_0x46a10e);return{'activation':_0x25b360};}const [_0x15f673,_0x326989]=await Promise[_0x20ec50(0xe4)]([this['client']['getConversionSankeyChart'](_0x2bbe55,_0x46a10e),this['client'][_0x20ec50(0xb1)](_0x2bbe55,_0x46a10e)]);return{'conversion':_0x15f673,'activation':_0x326989};}async[a131_0x3db142(0xee)](_0x125c6d){const _0x366276=a131_0x3db142;try{return await this[_0x366276(0xf5)][_0x366276(0x124)](_0x125c6d);}catch(_0x939732){if(isHttp404Error(_0x939732))throw new SDKError(ErrorCode[_0x366276(0xe8)],'Journey\x20not\x20found:\x20'+_0x125c6d,_0x939732);throw _0x939732;}}async['resume'](_0x3006b6){const _0x53feeb=a131_0x3db142;try{return await this[_0x53feeb(0xf5)]['resumeJourney'](_0x3006b6);}catch(_0x517459){if(isHttp404Error(_0x517459))throw new SDKError(ErrorCode[_0x53feeb(0xe8)],_0x53feeb(0xe0)+_0x3006b6,_0x517459);throw _0x517459;}}async[a131_0x3db142(0xb8)](_0xaf8ec3){const _0x59d751=a131_0x3db142;return await this[_0x59d751(0xf5)][_0x59d751(0xc9)](_0xaf8ec3);}async[a131_0x3db142(0xf8)](_0x33bc33,_0x4cf2e4){const _0x1f3a66=a131_0x3db142;try{return await this[_0x1f3a66(0xf5)][_0x1f3a66(0x111)](_0x33bc33,_0x4cf2e4);}catch(_0x19b489){if(isHttp404Error(_0x19b489))throw new SDKError(ErrorCode['JOURNEY_NOT_FOUND'],'Journey\x20not\x20found:\x20'+_0x33bc33,_0x19b489);throw _0x19b489;}}async['getActivation'](_0x5a951f,_0x480523){const _0x63c0ca=a131_0x3db142;try{return await this[_0x63c0ca(0xf5)][_0x63c0ca(0xf7)](_0x5a951f,_0x480523);}catch(_0x2a8d3d){if(isHttp404Error(_0x2a8d3d))throw new SDKError(ErrorCode[_0x63c0ca(0xc8)],'Journey\x20activation\x20step\x20not\x20found:\x20'+_0x480523+_0x63c0ca(0x96)+_0x5a951f,_0x2a8d3d);throw _0x2a8d3d;}}async['listActivations'](_0x59eba9){const _0x4174df=a131_0x3db142;try{return await this[_0x4174df(0xf5)]['listJourneyActivations'](_0x59eba9);}catch(_0xf91236){if(isHttp404Error(_0xf91236))return[];throw _0xf91236;}}async[a131_0x3db142(0xdd)](_0x3b505e){const _0x13bae2=a131_0x3db142,_0x4934fe=await this[_0x13bae2(0xeb)](_0x3b505e);return _0x4934fe[_0x13bae2(0xe9)](flattenJourneyActivation);}async['createActivation'](_0x305c34,_0x458a52){const _0x168b56=a131_0x3db142;return await this[_0x168b56(0xf5)][_0x168b56(0x118)](_0x305c34,_0x458a52);}async[a131_0x3db142(0xaa)](_0xb5a9f7){const _0x326fb8=a131_0x3db142,_0xd5001a=await this[_0x326fb8(0x120)](_0xb5a9f7),_0x2715cb=generateColumnMapping(_0xd5001a);return{'journeyId':_0xd5001a['id'],'journeyName':_0xd5001a[_0x326fb8(0x10f)][_0x326fb8(0x10d)],'database':_0x326fb8(0x104)+_0xd5001a[_0x326fb8(0x10f)][_0x326fb8(0x10a)],'table':_0x326fb8(0xfb)+_0xd5001a['id'],'columns':_0x2715cb};}async[a131_0x3db142(0xc3)](_0x2b1d29){return this['client']['getJourneyBundle'](_0x2b1d29);}async[a131_0x3db142(0xe5)](_0x1342cc){const _0xe8c43=a131_0x3db142;if(!_0x1342cc)return undefined;try{const _0x39bd4b=await this[_0xe8c43(0xc3)](_0x1342cc);return _0x39bd4b[_0xe8c43(0x11d)];}catch{return undefined;}}async[a131_0x3db142(0xed)](_0x2c3586){const _0x4a5b81=a131_0x3db142,_0x55b417=await this[_0x4a5b81(0x120)](_0x2c3586),_0x3de7e0=_0x55b417[_0x4a5b81(0x10f)][_0x4a5b81(0xd9)];if(!_0x3de7e0)return{'bundleId':'','bundleName':_0x55b417[_0x4a5b81(0x10f)][_0x4a5b81(0x10d)],'bundleDescription':_0x55b417[_0x4a5b81(0x10f)][_0x4a5b81(0xf1)]??null,'latestJourneyId':_0x55b417['id'],'versions':[synthesizePreBundleVersion(_0x55b417)]};const _0x470ea7=await this[_0x4a5b81(0xc3)](_0x3de7e0);return{'bundleId':_0x3de7e0,'bundleName':_0x470ea7[_0x4a5b81(0x10d)],'bundleDescription':_0x470ea7[_0x4a5b81(0xf1)]??null,'latestJourneyId':_0x470ea7[_0x4a5b81(0x11d)],'versions':formatVersionsFromBundle(_0x470ea7)};}async['createVersion'](_0xed01a){const _0x47bcb0=a131_0x3db142,_0x44b33c=await this['getJourney'](_0xed01a),_0x591a69=_0x44b33c[_0x47bcb0(0x10f)][_0x47bcb0(0xd9)];if(!_0x591a69)throw new SDKError(ErrorCode[_0x47bcb0(0x11b)],_0x47bcb0(0xc6));await this[_0x47bcb0(0xf5)][_0x47bcb0(0xf0)](_0x591a69);const _0x2c6b35=await this[_0x47bcb0(0xf5)]['getJourneyBundle'](_0x591a69),_0x4eeb17=_0x2c6b35[_0x47bcb0(0x10d)]+'\x20v'+(_0x2c6b35[_0x47bcb0(0x115)]+0x1);return this['client'][_0x47bcb0(0xa6)](_0x591a69,{'sourceId':_0xed01a,'attributes':{'name':_0x4eeb17}});}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a132_0x245d1b=a132_0x40dd;(function(_0x341fef,_0x144c6c){const _0x490e59=a132_0x40dd,_0x4cba11=_0x341fef();while(!![]){try{const _0x56ca29=parseInt(_0x490e59(0x17a))/0x1*(parseInt(_0x490e59(0x180))/0x2)+-parseInt(_0x490e59(0x17d))/0x3+-parseInt(_0x490e59(0x176))/0x4*(parseInt(_0x490e59(0x17e))/0x5)+-parseInt(_0x490e59(0x179))/0x6*(-parseInt(_0x490e59(0x177))/0x7)+parseInt(_0x490e59(0x182))/0x8*(parseInt(_0x490e59(0x17f))/0x9)+parseInt(_0x490e59(0x178))/0xa+-parseInt(_0x490e59(0x181))/0xb;if(_0x56ca29===_0x144c6c)break;else _0x4cba11['push'](_0x4cba11['shift']());}catch(_0x38087e){_0x4cba11['push'](_0x4cba11['shift']());}}}(a132_0x25ed,0xb57bd));function a132_0x25ed(){const _0x2e2bde=['68ldxmUd','7lmdAbW','6089120ifxsWD','2066076zQnqeJ','111SLorlk','llm/chat','last_chat_id','2042823SSyDHj','100795cxGrxH','252SYrpPt','13636uTtsJV','10415713LwMnXC','286808HuyAEJ','clear'];a132_0x25ed=function(){return _0x2e2bde;};return a132_0x25ed();}import{createTextCache}from'../../utils/local-cache.js';const chatIdCache=createTextCache(a132_0x245d1b(0x17c),a132_0x245d1b(0x17b));export function saveLastChatId(_0xc4a796){chatIdCache['write'](_0xc4a796);}export function loadLastChatId(){return chatIdCache['read']();}function a132_0x40dd(_0x4146fe,_0x41e3cf){_0x4146fe=_0x4146fe-0x175;const _0x25ed91=a132_0x25ed();let _0x40ddc8=_0x25ed91[_0x4146fe];return _0x40ddc8;}export function clearLastChatId(){const _0x14f452=a132_0x245d1b;chatIdCache[_0x14f452(0x175)]();}
|