..r}=t,n=(0,c.Ay)(r);return await e((0,s.apiCall)({method:"workflows.ai.create",args:n,reason:t.reason}))}catch(e){throw n.error(Error(`API call to workflows.ai.create
					with reason ${t.reason} failed, initiated by generated fetcher`)),e}});o.meta={name:"workflowsAiCreateFetcher",key:"createFetcherWorkflowsAiCreateFetcher",description:"Create workflow and trigger from generated ai preview"};let d=(0,n.Ay)("Create workflow and trigger from an AI generated preview",async(e,a,{workflowPreview:t,triggerPreview:n,workflowId:s,previewId:c})=>{let d=(0,r.default)({getState:a,label:i.Ev});try{let a=await e(o({workflow:t,trigger:n,reason:s?"create-workflow-from-ai":"update-workflow-with-ai",workflowId:s}));return e((0,l.OQ)({workflowId:a.decorated_workflow.id,previewId:c})),a}catch(e){throw d.error(Error(`Error creating a workflow from an AI preview: ${e}`)),e}});d.meta={name:"createWorkflowAndTriggerFromAiPreview",key:"createThunkCreateWorkflowAndTriggerFromAiPreview",description:"Create workflow and trigger from an AI generated preview"}},0x3e980aae:(e,a,t)=>{"use strict";t.d(a,{D:()=>TriggerPreview});var r=t(0xbad225b5),n=t(0x120c268ad),l=t.n(n),i=t(0x1e4ad58a2),s=t(0x1ee57b3a0),c=t(0x20482ad21),o=t(0x2501a2cee),d=t(0x165862063),m=t(0x61c95b1b),u=t(0x1d9a37519),p=t(0x210501b8f),_=t(0x1aedf305b),h=t.n(_);let w=new c.Ay("data_sources"),TriggerIcon=({trigger:e})=>{if("external"===e.type)return r.createElement("img",{alt:w.t("Salesforce Icon"),className:"c-icon",src:p});if("service"===e.type)return"service"===e.type&&void 0!==e.service?null:r.createElement(u.z,{appId:e.service_config.function.app_id,size:24});let{name:a}=(e=>{switch(e.type){case"webhook":return{name:"code",size:"20"};case"scheduled":return{name:"clock",size:"20"};case"event":return(e=>{let{event_type:a}=(0,d.VP)(e)?e.event:e;switch(a){case m.$.ReactionAdded:return{name:"emoji",size:"20"};case m.$.UserJoinedChannel:return{name:"user-add",size:"20"};case m.$.ChannelCreated:return{name:"channel",size:"20"};case m.$.ListRecordCreated:case m.$.ListRecordUpdated:return{name:"bulleted-list",size:"20"};default:return{name:"user",size:"20"}}})(e);default:return{name:"link",size:"20"}}})(e);return r.createElement("div",{className:l()(h().iconContainer,"preview-icon"),"data-qa":"preview-icon"},r.createElement(o.Ah,{name:a,size:"20"}))};TriggerIcon.displayName="TriggerIcon";var f=t(0xe9c32bb),y=t(0x339b339c);let b={small:80,medium:120,large:"100%"},TriggerPreviewLoading=()=>r.createElement(i.A,{className:h().cardContainer,"data-qa":"loading-preview"},r.createElement("div",{className:l()(h().headerHasBottomRadius,h().cardHeader,h().headerNoBorderBottom)},r.createElement("div",{className:h().headerInfo},r.createElement(y.A,{className:h().loadingText,size:"small",subtler:!0}),r.createElement("div",{className:h().headerText},r.createElement(f.nB,{element:"h2",weight:"bold",className:h().title},r.createElement(y.A,{className:h().loadingText,size:"large",sizes:b,subtler:!0}))))));TriggerPreviewLoading.displayName="TriggerPreviewLoading";let g=new c.Ay("workflow_builder"),ExternalTriggerSummary=()=>{let e=g.t("Starts with a Salesforce event");return r.createElement("span",{className:"name"},e)};ExternalTriggerSummary.displayName="ExternalTriggerSummary";var x=t(0x4bdf0df6),v=t(0x124d99cb0),S=t(0xdfa9cb32),k=t(0x1c7cb6e50),E=t(0x1ccef1c6f),A=t(0x226892387);let HermesScheduledTriggerSummary=({trigger:e})=>{let a=(0,A.d4)(e=>(0,E.ty)(e,"time24")),t=x.vp,n=e.schedule?{...(0,k.t)(e.schedule),timezone:e.schedule.timezone??t}:{startTime:(0,v.rJ)(null,"iso"),timezone:t};return r.createElement("span",null,(0,S.M)(n,{do24hrTime:a}))};HermesScheduledTriggerSummary.displayName="HermesScheduledTriggerSummary";var T=t(0x856b6254),N=t.n(T);let C=new c.Ay("workflow_builder"),ShortcutSummary=()=>r.createElement("div",{className:N().shortcut_summary_header},C.t("Starts from a link in Slack"));ShortcutSummary.displayName="ShortcutSummary";var I=t(0xbdef910d),P=t(0x145d46a61);let W=new c.Ay("workflow_builder"),ChannelCreatedSummary=({trigger:e})=>{let a=(0,A.d4)(P.EA),t=(0,I.yo)(e),n=(0,I.kv)(t);return n?r.createElement(r.Fragment,null,a?W.rt('Starts when a channel containing "{channelSubstring}" is created',{channelSubstring:n}):`Starts when a channel containing "${n}" is created`):r.createElement(r.Fragment,null,a?W.t("Starts when a channel is created"):"Starts when a channel is created")};var L=t(0x408bdeff),R=t(0x3796a18c),F=t(0xd5a46e59),z=t.n(F);let H=new c.Ay("workflow_builder"),ListRecordCreatedSummary=({trigger:e})=>{let a=(0,I.yo)(e);return a.listId?r.createElement("span",{className:z().inline__title},H.rt("Starts when an item is created in {list}",{list:r.createElement(L.A,{id:a.listId,detailType:R.s.NONE,className:z().inline__file_entity}),fallbackHash:"8bddb4cc8b3a58cca34cd47fcd074c0330af08d3"})):r.createElement(r.Fragment,null,H.t("Starts when a list item is created",{fallbackHash:"8bddb4cc8b3a58cca34cd47fcd074c0330af08d3"}))};ListRecordCreatedSummary.displayName="ListRecordCreatedSummary";let D=new c.Ay("workflow_builder"),ListRecordUpdatedSummary=({trigger:e})=>{let a=(0,I.yo)(e);return a.listId?r.createElement("span",{className:z().inline__title},D.rt("Starts when an item is updated in {list}",{list:r.createElement(L.A,{id:a.listId,detailType:R.s.NONE,className:z().inline__file_entity}),fallbackHash:"8bddb4cc8b3a58cca34cd47fcd074c0330af08d3"})):r.createElement(r.Fragment,null,D.t("Starts when a list item is updated",{fallbackHash:"8bddb4cc8b3a58cca34cd47fcd074c0330af08d3"}))};ListRecordUpdatedSummary.displayName="ListRecordUpdatedSummary";var M=t(0x1e864b930),U=t(0x1e74dc307),B=t(0x247cf31a2),q=t(0x1b3ecb90f),O=t(0x16ed1b0dc);let V=new c.Ay("workflow_builder"),ReactionAddedSummary=({trigger:e})=>{let a=(0,I.yo)(e),t=(0,I.zP)(a),n=(0,d.VP)(e)?e.event.channel_ids:e.channel_ids;return!t.length||!n?.length||n.every(O.A)?r.createElement(r.Fragment,null,V.t("Starts when an emoji reaction is used")):r.createElement(r.Fragment,null,V.rt("Starts when someone reacts with {emoji} in {channel}",{emoji:(0,M.A)(t.map(e=>r.createElement(q.Ay,{key:`emoji-${e}`,text:e,emojiSize:"small"})),{conj:"or",keyPrefix:"emoji"}),channel:(0,M.A)(n.map(e=>r.createElement(U.A,{channelId:e,key:`channel-${e}`},r.createElement(B.A,{channelId:e}))),{conj:"or",keyPrefix:"channel"})}))};ReactionAddedSummary.displayName="ReactionAddedSummary";let $=new c.Ay("workflow_builder"),UserJoinedChannelSummary=({trigger:e})=>{let a=(0,d.VP)(e)?e.event.channel_ids:e.channel_ids;return a?.length?r.createElement(r.Fragment,null,$.rt("Starts when a person joins {channel}",{channel:(0,M.A)(a.map(e=>r.createElement(U.A,{channelId:e,key:`channel-${e}`},r.createElement(B.A,{channelId:e}))),{conj:"or",keyPrefix:"channel"})})):r.createElement(r.Fragment,null,$.t("Starts when a person joins a channel"))};UserJoinedChannelSummary.displayName="UserJoinedChannelSummary";let SlackEventTriggerSummary=({trigger:e})=>{switch((0,d.VP)(e)?e.event.event_type:e.event_type){case m.$.ReactionAdded:return r.createElement(ReactionAddedSummary,{trigger:e});case m.$.UserJoinedChannel:return r.createElement(UserJoinedChannelSummary,{trigger:e});case m.$.ListRecordCreated:return r.createElement(ListRecordCreatedSummary,{trigger:e});case m.$.ListRecordUpdated:return r.createElement(ListRecordUpdatedSummary,{trigger:e});case m.$.ChannelCreated:return r.createElement(ChannelCreatedSummary,{trigger:e});default:return r.createElement("span",null,e.name??"")}};SlackEventTriggerSummary.displayName="SlackEventTriggerSummary";let j=new c.Ay("workflow_builder"),HermesWebhookTriggerSummary=()=>r.createElement("span",null,j.t("Starts with a webhook"));function TriggerSummary({trigger:e}){switch(e.type){case"external":return r.createElement(ExternalTriggerSummary,null);case"event":return r.createElement(SlackEventTriggerSummary,{trigger:e});case"shortcut":return r.createElement(ShortcutSummary,null);case"webhook":return r.createElement(HermesWebhookTriggerSummary,null);case"scheduled":return r.createElement(HermesScheduledTriggerSummary,{trigger:e});default:return null}}HermesWebhookTriggerSummary.displayName="HermesWebhookTriggerSummary",TriggerSummary.displayName="TriggerSummary";let TriggerPreviewLoaded=({trigger:e})=>r.createElement(i.A,{className:h().cardContainer,"data-qa":"trigger-preview"},r.createElement(s.A,{className:l()(h().headerHasBottomRadius,h().cardHeader,h().headerNoBorderBottom)},r.createElement("div",{className:h().headerInfo},r.createElement(TriggerIcon,{trigger:e}),r.createElement("div",{className:h().headerText},r.createElement(f.nB,{element:"h2",weight:"bold",className:h().title},r.createElement(TriggerSummary,{trigger:e}))))));TriggerPreviewLoaded.displayName="TriggerPreviewLoaded";let TriggerPreview=({trigger:e})=>e?r.createElement(TriggerPreviewLoaded,{trigger:e}):r.createElement(TriggerPreviewLoading,null);TriggerPreview.displayName="TriggerPreview"},0x246e13aff:(e,a,t)=>{"use strict";t.d(a,{d:()=>StepPreview});var r=t(0xbad225b5),n=t(0x120c268ad),l=t.n(n),i=t(0x1e4ad58a2),s=t(0x1ee57b3a0),c=t(0x1fa67866c),o=t(0x2501a2cee),d=t(0x1903d373d),m=t(0x1cf0d97e1),u=t(0x3b8174d2);let p=(0,m.Ay)((e,a)=>{let t=(0,d.YG)(a)&&(0,d.lK)(a);return t?a.wrapped_function??(0,u.hj)(e,t):void 0});p.meta={name:"selectWrappedFunctionDetails",key:"createSelectorSelectWrappedFunctionDetails",description:(e,a)=>{let t=(0,d.YG)(a)&&(0,d.lK)(a);return t?a.wrapped_function??(0,u.hj)(e,t):void 0}};var _=t(0x226892387);let useWrappedFunctionDetails=e=>(0,_.d4)(a=>p(a,e));var h=t(0x210b99e76),w=t(0x1e9a6d1d),f=t(0x1d9a37519),y=t(0x1aedf305b),b=t.n(y);let StepIcon=({step:e})=>{let a,t=useWrappedFunctionDetails(e);if(t?.app_id)return r.createElement(f.z,{appId:t.app_id,size:24});if(e.function?.type!==w.A.BuiltIn&&e.function?.app_id)return r.createElement(f.z,{appId:e.function.app_id,size:24});let{name:n}=(a={name:"slack-logo",size:"20"},e.function?.type===w.A.BuiltIn&&(a.name=(0,h.m)(e.function.callback_id)),a);return r.createElement("div",{className:l()(b().iconContainer,"preview-icon"),"data-qa":"preview-icon"},r.createElement(o.Ah,{name:n,size:"20"}))};StepIcon.displayName="StepIcon";var g=t(0x339b339c);let x={small:80,medium:120,large:"100%"},StepPreviewLoading=()=>r.createElement("div",{className:b().stepSpace,"data-qa":"loading-preview"},r.createElement(i.A,{className:b().cardContainer},r.createElement(s.A,{className:l()(b().headerNoBottomRadius,b().cardHeader)},r.createElement("div",{className:b().headerInfo},r.createElement(g.A,{className:b().loadingText,size:"small",subtler:!0}),r.createElement("div",{className:b().headerText},r.createElement(g.A,{className:b().loadingText,size:"large",sizes:x,subtler:!0})))),r.createElement(c.A,{className:b().cardSection},r.createElement(g.A,{className:b().loadingText,sizes:x,size:"large",subtler:!0}))));StepPreviewLoading.displayName="StepPreviewLoading";var v=t(0x19ab26691),S=t(0x68e1de73);let SlackFunctionFormStepPreview=({step:e})=>r.createElement(S.B,{dialogTitle:(0,v.F$)(e),questions:(0,v.yS)(e),showTitle:!0});SlackFunctionFormStepPreview.displayName="SlackFunctionFormStepPreview";var k=t(0xe55ea96c),E=t(0x1795d8821);let showFunctionStepPreview=e=>{if(!e?.function)return!1;switch(e.function.callback_id){case E.oW.ReplyInThread:case E.oW.SendDm:case E.oW.SendMessage:case E.oW.SendToMySalesHome:case E.oW.SendToSalesHome:case E.oW.SendToMySalesforceApp:case E.oW.SendToSalesforceApp:case E.oW.SendSummaryToMySalesHome:case E.oW.SendSummaryToSalesHome:case E.oW.SendEphemeralMessage:return!0;default:return!1}},SlackFunctionStepPreview=({step:e,variables:a,workflow:t})=>showFunctionStepPreview(e)?r.createElement(k.k,{step:e,variables:a,workflow:t}):null;SlackFunctionStepPreview.displayName="SlackFunctionStepPreview";var A=t(0xbe0b63ff),T=t(0x20482ad21);let N=new T.Ay("workflow_builder");function DelaySummary({step:e}){let a=e.inputs,t=a.minutes_to_delay?.value;return r.createElement("span",null,t?N.rt("Delay for {delayDisplay} {delayNumber, plural, =1 {minute} other {minutes}}",{delayDisplay:t.toLocaleString(),delayNumber:parseInt(t,10)}):"")}DelaySummary.displayName="DelaySummary";var C=t(0x15fb82076),I=t(0x1c09d8c36),P=t(0xc4548bcd),W=t(0x3f600f93),L=t.n(W);let R=new T.Ay("workflow_builder");function GoogleSheetsSummary({step:e}){let a=e.function,t=e.function?.callback_id,n=e.inputs,l=n.spreadsheet_id?.value,i=`${I.BF}/${l}`,s=n.spreadsheet_id?.label,c=(0,r.useCallback)(e=>{e.stopPropagation(),(0,P.A)(i)},[i]);if(!i||!s||"string"!=typeof l)return r.createElement("span",null,a?.title);let d=s[l],getSummaryLabel=()=>{switch(t){case E.Zk.AddSpreadsheetRow:return R.t("Add to");case E.Zk.SelectSpreadsheetRow:return R.t("Select from");case E.Zk.UpdateSpreadsheetRow:return R.t("Update");case E.Zk.DeleteSpreadsheetRow:return R.t("Delete from");default:return r.createElement("span",null,a?.title)}};return getSummaryLabel.displayName="getSummaryLabel",r.createElement("span",null,r.createElement("span",{className:L().title},getSummaryLabel()),r.createElement(C.A,{onClick:c},r.createElement("span",null,d),r.createElement("span",{className:L().icon},r.createElement(o.Ah,{name:"new-window",inline:!0,size:"20"}))))}GoogleSheetsSummary.displayName="GoogleSheetsSummary";var F=t(0x12321ecbc);let z=new T.Ay("workflow_builder");function InviteToChannelSummary({step:e,variables:a}){let t=e.inputs;if(!t.user_ids?.value||!t.channel_ids?.value)return r.createElement("span",null,z.rt("Invite to channel",{fallbackHash:"9a409d1a0f27bcc7944c5c19495e584fb26964d3",fallbackHashNs:"huddles"}));let n=[t.channel_ids?.value].flat(),l=[t.user_ids?.value].flat(),i=(0,F.k)(l,a),s=(0,F.E)(n,a);return r.createElement("span",null,z.rt("Invite {userLabel} to {channelLabel}",{userLabel:i,channelLabel:s,fallbackHash:"9a409d1a0f27bcc7944c5c19495e584fb26964d3",fallbackHashNs:"huddles"}))}InviteToChannelSummary.displayName="InviteToChannelSummary";var H=t(0x1e74dc307),D=t(0x668181b3),M=t(0x2772625d),U=t(0x247cf31a2),B=t(0xf4097f62),q=t(0x1461e71d1),O=t.n(q);let V=new T.Ay("workflow_builder");function SendEphemeralMessageSummary({step:e,variables:a}){let t=e.inputs,n=t.channel_id?.value,l=t.user_id?.value,i=e.function;if("string"==typeof n&&"string"==typeof l){let e=(0,M.cn)(n),t=(0,M.cn)(l),i=e?(0,D.x)(a,n):null,s=t?(0,D.x)(a,l):null,c=i&&!i.isTombstone?i.label:V.t("Missing Data"),d=s&&!s.isTombstone?s.label:V.t("Missing Data"),m=t?r.createElement("span",{className:O().variable_container},r.createElement(o.Ah,{inline:!0,size:"inherit",name:"css"}),d):r.createElement(B.A,{id:l}),u=e?r.createElement("span",{className:O().variable_container},r.createElement(o.Ah,{inline:!0,size:"inherit",name:"css"}),c):r.createElement(H.A,{channelId:n},r.createElement(U.A,{channelId:n}));return r.createElement("span",null,V.rt('Send an "only visible to you" message to {user} in {channel}',{user:m,channel:u,fallbackHash:"2826a04933908bf2bc4143809f09f387840708b8"}))}return r.createElement("span",null,i?.title)}SendEphemeralMessageSummary.displayName="SendEphemeralMessageSummary";var $=t(0x1e5781b84),j=t(0x238ee6f5d);let G=new T.Ay("workflow_builder");function SendMessageSummary({step:e,variables:a,hasErrors:t=!1}){let n=e.inputs,l=n.channel_id?.value,i=n.user_id?.value,s=e.function;if(l){if((0,M.cn)(l)){let e=(0,D.x)(a,l),t=e&&!e.isTombstone?e.label:G.t("Missing Data");return e&&t?r.createElement("span",null,G.rt("Send a message to <span>{dynamic_channel_label}</span>",{dynamic_channel_label:t},({text:e})=>r.createElement("span",{className:O().variable_container},r.createElement(o.Ah,{inline:!0,name:"css"})," ",e))):r.createElement("span",null,G.t("Sends a message to a channel"))}return r.createElement("span",null,G.rt("Send a message to {channel}",{channel:r.createElement(H.A,{channelId:l},r.createElement(U.A,{channelId:l,truncate:!0}))}))}if(i){if((0,M.cn)(i)){let e=(0,D.x)(a,i),t=e&&!e.isTombstone?e.label:G.t("Missing Data");return e&&t?r.createElement("span",null,G.rt("Send a message to <span>{dynamic_user_label}</span>",{dynamic_user_label:t},({text:e})=>r.createElement("span",{className:O().variable_container},r.createElement(o.Ah,{inline:!0,name:"css"})," ",e))):r.createElement("span",null,G.t("Sends a message to a user"))}return r.createElement("span",null,G.rt("Send a message to @{user}",{user:r.createElement($.A,{id:i})}))}return t?r.createElement("span",null,G.rt("Send a message to {error}",{error:r.createElement(j.A,{type:"unknown"})})):r.createElement("span",null,s?.title)}SendMessageSummary.displayName="SendMessageSummary";let Q=new T.Ay("workflow_builder"),ChannelLabel=({channelId:e,variables:a})=>{if(!e)return null;if((0,M.cn)(e)){let t=(0,D.x)(a,e);return r.createElement("span",{className:O().variable_container},r.createElement(o.Ah,{inline:!0,name:"css",size:"inherit"}),t?.label)}return r.createElement(H.A,{channelId:e},r.createElement(U.A,{channelId:e,truncate:!0}))};function SummarizeChannelSummary({step:e,variables:a}){let t=e.inputs.channel_ids?.value,n=e.inputs.days?.value,l=Array.isArray(t)?t[0]:t;return Array.isArray(t)&&t.length>1?r.createElement("span",null,Q.rt("Summarize channels",{fallbackHash:"1b8962f14007d162f0dc43de8d265d059787b34a",fallbackHashNs:"assistant"})):"string"!=typeof l||"string"!=typeof n&&"number"!=typeof n||"string"==typeof n&&(0,M.cn)(n)?r.createElement("span",null,Q.rt("Summarize channel")):r.createElement("span",null,Q.rt("Summarize the last {dayCount} {dayCount, plural, =1 {day} other {days}} of {channelLabel}",{channelLabel:r.createElement(ChannelLabel,{channelId:l,variables:a}),dayCount:Number(n)}))}ChannelLabel.displayName="ChannelLabel",SummarizeChannelSummary.displayName="SummarizeChannelSummary";var J=t(0x135b7b386);let SlackFunctionSummary=({step:e,variables:a,hasErrors:t=!1})=>{let n=useWrappedFunctionDetails(e),l=n??e.function,i=e.function?.callback_id,s=e.function?.app_id;if(n&&(0,A.GU)(n))return r.createElement(g.A,{size:"large"});if(s===J.wo)return r.createElement(GoogleSheetsSummary,{step:e});switch(i){case E.oW.SendDm:case E.oW.SendMessage:case E.oW.SendToMySalesHome:case E.oW.SendToSalesHome:case E.oW.SendToMySalesforceApp:case E.oW.SendToSalesforceApp:case E.oW.SendSummaryToMySalesHome:case E.oW.SendSummaryToSalesHome:case E.oW.ReplyInThread:return r.createElement(SendMessageSummary,{step:e,hasErrors:t,variables:a});case E.oW.SendEphemeralMessage:return r.createElement(SendEphemeralMessageSummary,{step:e,variables:a});case E.oW.Delay:return r.createElement(DelaySummary,{step:e});case E.oW.InviteUserToChannel:return r.createElement(InviteToChannelSummary,{step:e,variables:a});case E.oW.SummarizeChannel:return r.createElement(SummarizeChannelSummary,{step:e,variables:a});default:return r.createElement("span",null,l?.title)}};SlackFunctionSummary.displayName="SlackFunctionSummary";var Y=t(0xe9c32bb),K=t(0x1b3b89b97),X=t(0x1262418fd);function useExistingStepVariables(e,a,t,n){let l=(0,X.PL)(n,t,a),i=e.id,s=(0,r.useMemo)(()=>l.map(e=>({...e,isAvailable:e.isAvailableTo?.includes(i)??!1})),[i,l]);return(0,K.O)(s)}let LoadedStepPreview=({step:e,workflow:a,trigger:t,availableData:n,hideStepPreview:o=!1})=>{let m=useExistingStepVariables(e,a,t,n),u=(0,d.j3)(e),p=u?r.createElement(SlackFunctionFormStepPreview,{step:e}):r.createElement(SlackFunctionStepPreview,{step:e,variables:m,workflow:a}),_=showFunctionStepPreview(e)||u;return r.createElement("div",null,r.createElement(i.A,{className:b().cardContainer},r.createElement(s.A,{className:l()(b().cardHeader,{[b().headerNoBottomRadius]:!!_,[b().headerHasBottomRadius]:!_})},r.createElement("div",{className:b().headerInfo},r.createElement(StepIcon,{step:e}),r.createElement("div",{className:b().headerText},r.createElement(Y.nB,{element:"h2",weight:"bold",className:b().title},r.createElement(SlackFunctionSummary,{step:e,hasErrors:!1,variables:m}))))),!o&&_&&r.createElement(c.A,{className:b().cardSection},p)))};LoadedStepPreview.displayName="LoadedStepPreview";let StepPreview=({step:e,workflow:a,trigger:t,availableData:n,hideStepPreview:l})=>e&&a&&t&&n?r.createElement(LoadedStepPreview,{step:e,workflow:a,trigger:t,availableData:n,hideStepPreview:l}):r.createElement(StepPreviewLoading,null);StepPreview.displayName="StepPreview"},0xf581986b:(e,a,t)=>{"use strict";t.d(a,{d:()=>WorkflowPreviewResult});var r=t(0xbad225b5),n=t(0xbe5e39b6),l=t(0x40c0d834),i=t(0x20482ad21),s=t(0x11a296110),c=t(0x344bb842),o=t(0x2501a2cee),d=t(0x3e980aae),m=t(0x246e13aff),u=t(0x1aedf305b),p=t.n(u);let WorkflowPreview=({workflow:e,trigger:a,availableData:t})=>r.createElement("div",{className:"full_width"},r.createElement("div",{className:p().itemPreview},r.createElement(d.D,{trigger:a})),r.createElement("div",{className:p().arrowDown},r.createElement(o.Ah,{name:"arrow-down",size:"20"})),r.createElement("div",{className:p().itemPreview},e.steps.map((n,l)=>r.createElement("div",{key:n.id,className:e.steps.length-1!==l?"padding_bottom_100":""},r.createElement(m.d,{workflow:e,trigger:a,availableData:t,step:n})))));WorkflowPreview.displayName="WorkflowPreview";var _=t(0xe9c32bb),h=t(0x18ef1d9e1),w=t(0x3711e82d);let f=new i.Ay("workflow_builder"),y={onClick:{enableClogAction:!0},elementName:"create_workflow_btn"},b={onClick:{enableClogAction:!0},elementName:"regenerate_workflow_btn"},WorkflowPreviewResult=({workflow:e,trigger:a,availableData:t,disableCreate:i=!1,onGenerateWorkflowClick:d,onCreateWorkflowClick:m})=>{let u=(0,h.A)(),[g,x]=(0,r.useState)(!1),v=(0,r.useCallback)(async()=>{x(!0),await m(),x(!1)},[m]);return r.createElement(l.A,{clogImpression:!0,uiComponentName:w.UiComponentName.WORKFLOW_AI_RESULT_PREVIEW},r.createElement("div",{className:"full_width"},r.createElement("div",{className:"margin_bottom_175"},r.createElement("div",{className:"display_flex justify_content_between align_items_center"},r.createElement("div",{className:p().title},r.createElement(_.nB,{element:"h2",weight:"bold",className:p().title},e.title)),r.createElement("div",{className:"display_flex"},r.createElement(c.A,{"aria-label":f.t("Try Again"),onClick:d,className:"margin_right_25",backgroundStyle:u===n.Sx.Light?n.Sx.Light:n.Sx.Dark,outline:!0,autoClogProps:b},r.createElement(o.Ah,{name:"refresh"})),r.createElement(s.lV,{onClick:v,autoClogProps:y,loading:g,disabled:i,"aria-label":f.t("Set Up")},f.t("Set Up"))))),r.createElement(WorkflowPreview,{workflow:e,trigger:a,availableData:t})))};WorkflowPreviewResult.displayName="WorkflowPreviewResult"},0x68e1de73:(e,a,t)=>{"use strict";t.d(a,{B:()=>QuestionPreviewList});var r=t(0xbad225b5),n=t(0x2501a2cee),l=t(0xc62077ca),i=t(0xe9c32bb),s=t(0x15a4ffb05),c=t(0xeddc23dd),o=t.n(c);let QuestionPreviewList=({dialogTitle:e,questions:a,showArrow:t=!1,showTitle:c=!1})=>r.createElement(r.Fragment,null,t&&r.createElement("span",{className:o().icon},r.createElement(n.Ah,{name:"arrow-down",inline:!0,size:"20"})),c&&r.createElement(i.nB,{className:o().title,weight:"bold"},r.createElement(s.A,{text:e})),r.createElement("ul",{className:o().list},a.map(e=>r.createElement(l.B,{key:e.name,question:e}))))},0xc62077ca:(e,a,t)=>{"use strict";t.d(a,{B:()=>QuestionPreview,s:()=>getQuestionTypeDef});var r=t(0xbad225b5),n=t(0x2501a2cee),l=t(0x38bda683),i=t(0x23465d793),s=t(0x1795d8821),c=t(0x23efb3294),o=t.n(c);let d={[l.xi.Text]:{questionType:l.xi.Text,baseType:"text",icon:"text-snippet"},[l.xi.Boolean]:{questionType:l.xi.Text,baseType:"boolean",icon:"radio-button"},[l.xi.Integer]:{questionType:l.xi.Integer,baseType:"integer",icon:"number"},[l.xi.Number]:{questionType:l.xi.Number,baseType:"number",icon:"number"},[l.xi.Textarea]:{questionType:l.xi.Textarea,baseType:"textarea",icon:"text-snippet"},[l.xi.RichText]:{questionType:l.xi.RichText,baseType:s.TE.SlackTypesRichText,icon:"formatting"},[l.xi.SelectStatic]:{questionType:l.xi.SelectStatic,baseType:"select",icon:"caret-dropdown"},[l.xi.SelectUser]:{questionType:l.xi.SelectUser,baseType:"select",icon:"user"},[l.xi.SelectConversation]:{questionType:l.xi.SelectConversation,baseType:"select",icon:"channel"},[l.xi.Date]:{questionType:l.xi.Date,baseType:s.TE.SlackTypesDate,icon:"calendar"},[l.xi.DateTime]:{questionType:l.xi.DateTime,baseType:s.TE.SlackTypesTimestamp,icon:"calendar"},[l.xi.ShortText]:{questionType:l.xi.ShortText,baseType:"string",icon:"text-snippet"},[l.xi.LongText]:{questionType:l.xi.LongText,baseType:"string",icon:"text-snippet"},[l.xi.SelectPerson]:{questionType:l.xi.SelectPerson,baseType:s.TE.SlackTypesUserId,icon:"user"},[l.xi.SelectChannel]:{questionType:l.xi.SelectChannel,baseType:s.TE.SlackTypesChannelId,icon:"channel"},[l.xi.Dropdown]:{questionType:l.xi.Dropdown,baseType:s.TE.SlackTypesLimitedRichText,icon:"caret-dropdown"},[l.xi.StaticMultiSelect]:{questionType:l.xi.StaticMultiSelect,baseType:"array",icon:"radio-button"},[l.xi.StaticMultiSelectWithCheckboxes]:{questionType:l.xi.StaticMultiSelectWithCheckboxes,baseType:"array",icon:"checkbox"},[l.xi.UserMultiSelect]:{questionType:l.xi.UserMultiSelect,baseType:"array",icon:"user-groups"},[l.xi.ChannelMultiSelect]:{questionType:l.xi.ChannelMultiSelect,baseType:"array",icon:"channel"},[l.xi.File]:{questionType:l.xi.File,baseType:"array",icon:"file"}},getQuestionTypeDef=e=>d[e]||{},QuestionPreview=({question:e})=>{let a=(0,i.l)(e),{icon:t}=a?getQuestionTypeDef(a):{icon:"text-snippet"};return r.createElement("li",{className:o().container},r.createElement("span",{className:o().icon},r.createElement(n.Ah,{inline:!0,name:t,size:"inherit"})),r.createElement("span",{className:o().label},e.label??e.title))};QuestionPreview.displayName="QuestionPreview"},0x210b99e76:(e,a,t)=>{"use strict";t.d(a,{m:()=>getStepIcon});let r=new Map([["open_form","form"],["send_message","message"],["reply_in_thread","threads"],["send_ephemeral_message","message"],["update_channel_topic","channel"],["create_channel","channel"],["invite_user_to_channel","channel"],["channel start message","channel"],["delay","hourglass"],["archive_channel","channel"],["unarchive_channel","channel"],["create_usergroup","user-groups"],["add_user_to_usergroup","user-groups"],["add_pin","channel"],["remove_pin","channel"],["remove_user_from_usergroup","user-groups"],["send_dm","message"],["create_channel_section","channel"],["add_channel_to_channel_section","channel"],["find_channels_by_keywords","channel"],["add_channel_list_to_section","channel"],["select_channels","channel"],["add_bookmark","bookmark"],["add_channel_manager","channel"],["create_list","lists"],["lists_fetch_columns","lists"],["list_add_record","lists"],["add_list_record","lists"],["share_list_users","lists"],["share_list_channels","lists"],["share_list","lists"],["read_list_record","lists"],["delete_list_record","lists"],["update_list_record","lists"],["copy_list","lists"],["lists_activity_feed","lists"],["send_task_list_alert","lists"],["create_items_due_summary","lists"],["canvas_create","canvas"],["canvas_update_content","canvas"],["canvas_update_content_v2","canvas"],["channel_canvas_create","canvas"],["add_canvas_to_channel_tab","canvas"],["share_canvas","canvas"],["share_canvas_in_thread","canvas"],["find_dm_or_mpdm_channel_canvas","canvas"],["canvas_copy","canvas"],["canvas_fetch_variables","canvas"],["canvas_update_variables","canvas"],["canvas_fetch_header_sections","canvas"],["send_to_sales_home","sales"],["send_to_my_sales_home","sales"],["send_summary_to_sales_home","sales"],["send_summary_to_my_sales_home","sales"],["send_to_record_channel","sales"],["create_record_channel","sales"],["lookup_record_channel","sales"],["lookup_channel_record","sales"],["send_to_salesforce_app","notifications"],["send_to_my_salesforce_app","notifications"],["add_reaction","emoji"],["remove_reaction","emoji"],["summarize_channel","ai-summary"],["search_summary","ai-summary"],["read_message","message"],["share_message","share-message"],["switch_step","branch"],["case_step","add-branch"],["loop_step","refresh"],["ask_agentforce","agentforce-filled"],["add_agent_to_channel","agentforce-filled"],["ai_answer","ai-sparkle"],["lookup_entities","search"],["lookup_from_list","search-files"]]),n=new Set(["send_to_record_channel","create_record_channel","lookup_record_channel","lookup_channel_record"]);function getStepIcon(e){let a=e?r.get(e):void 0;return e&&n.has(e)?"sf-record":a??"slack-logo"}},0x12321ecbc:(e,a,t)=>{"use strict";t.d(a,{E:()=>getChannelLabel,k:()=>getUserLabel});var r=t(0xbad225b5),n=t(0x20482ad21),l=t(0x2501a2cee),i=t(0x1e74dc307),s=t(0x668181b3),c=t(0x2772625d),o=t(0x247cf31a2),d=t(0xf4097f62),m=t(0x1461e71d1),u=t.n(m);let p=new n.Ay("workflow_builder"),DynamicItemLabel=({label:e})=>r.createElement("span",{className:u().variable_container},r.createElement(l.Ah,{inline:!0,size:"inherit",name:"css"})," ",e??p.t("Missing Data"));DynamicItemLabel.displayName="DynamicItemLabel";let getUserLabel=(e,a)=>{if(e.length>1)return p.t("{qty} people",{qty:e.length,fallbackHash:"b37554f695b15005fd23907b9488e0a8ad4bca5f"});let t=e[0];return(0,c.cn)(t)?r.createElement(DynamicItemLabel,{label:(0,s.x)(a,t)?.label}):p.rt("@{user}",{user:r.createElement(d.A,{id:t,truncate:!0}),fallbackHash:"457d64a8b6c031bbf97653abb1689cab35c6261c"})};getUserLabel.displayName="getUserLabel";let getChannelLabel=(e,a)=>{if(e.length>1)return p.t("{qty} channels",{qty:e.length,fallbackHash:"18e03e2a37ba37df713f9665ef752fb8b40fc1e8"});let t=e[0];return(0,c.cn)(t)?r.createElement(DynamicItemLabel,{label:(0,s.x)(a,t)?.label}):r.createElement(i.A,{channelId:t},r.createElement(o.A,{channelId:t,truncate:!0}))};getChannelLabel.displayName="getChannelLabel"},0x24430233d:(e,a,t)=>{"use strict";t.d(a,{o:()=>getScheduleFrequencySummary});var r=t(0x20482ad21),n=t(0x1e864b930),l=t(0x124d99cb0),i=t(0x118af79e8);let s=new r.Ay("workflow_builder"),getScheduleFrequencySummary=e=>{let a,t=(0,l.lP)(e.startTime,e.timezone),r=(0,i.k)(e),c=t.isoWeekday();switch(r){case"daily":a=s.t("and repeats daily");break;case"weekdays":a=s.t("and repeats every weekday");break;case"weekly_same_day":a=s.t("and repeats weekly on {dayOfWeek}",{dayOfWeek:(0,l.au)(c,!0)});break;case"monthly_nth_day":a=(0,l.U7)((0,l.nA)(t,!0))(c);break;case"monthly":case"yearly":case"custom":a=(e=>{let a;if(!e.frequency)return"";let t=(0,l.lP)(e.startTime,e.timezone),{type:r,repeatsEvery:i=1,onDays:c,onWeekNum:o}=e.frequency,d=t.format("YYYY-MM-DD"),m=(0,l.Bz)(d),u=o??m,p=u?(0,l.fd)(u)?.(!0):(0,l.nA)(t,!0),_=(0,l.au)(t.isoWeekday(),!1),h=c?.map(e=>(0,l.U6)(e,!1));switch(r){case"hourly":a=1===i?s.t("and repeats hourly"):s.t("and repeats every {repeatsEvery, plural, =1 {hour} other {# hours}}",{repeatsEvery:i});break;case"daily":a=1===i?s.t("and repeats daily"):s.t("and repeats every {repeatsEvery, plural, =1 {day} other {# days}}",{repeatsEvery:i});break;case"weekly":a=h?s.t("and repeats every {repeatsEvery, plural, =1 {week} other {# weeks}} on {daysOfWeekList}",{repeatsEvery:i,daysOfWeekList:(0,n.A)(h).join("")}):s.t("and repeats on a custom schedule");break;case"monthly":a=c||o?s.t("and repeats every {repeatsEvery, plural, =1 {month} other {# months}} on the {dayOfWeekOrdinal} {dayOfWeek}",{repeatsEvery:i,dayOfWeekOrdinal:p,dayOfWeek:_}):1===i?s.t("and repeats monthly"):s.t("and repeats every {repeatsEvery, plural, =1 {month} other {# months}}",{repeatsEvery:i});break;case"yearly":a=1===i?s.t("and repeats annually"):s.t("and repeats every {repeatsEvery, plural, =1 {year} other {# years}}",{repeatsEvery:i});break;default:a=s.t("and repeats on a custom schedule")}return a})(e);break;default:a=""}return a}},0xdfa9cb32:(e,a,t)=>{"use strict";t.d(a,{M:()=>getScheduleSummary});var r=t(0x20482ad21),n=t(0x124d99cb0),l=t(0x24430233d),i=t(0x6960d8b9);let s=new r.Ay("workflow_builder"),getScheduleSummary=(e,a={})=>{let{do24hrTime:t}=a,r=(0,n.lP)(e.startTime,e.timezone),c=(0,i.Od)(r,{excludeYear:!0,uncapitalizedRelativeDay:!0}),o=(0,i.xe)(r,{do24hrTime:t}),d=(0,l.o)(e);return s.t("Starts {humanReadableDate} at {humanReadableTime}{repeat}",{humanReadableDate:c,humanReadableTime:o,repeat:d?` ${d}`:d,fallbackHash:"457f9c0427f3b60305b95dc44d845dc00aa06724"})}},0x135b7b386:(e,a,t)=>{"use strict";t.d(a,{EG:()=>l,Id:()=>c,Nn:()=>o,YE:()=>n,wo:()=>i,y:()=>s});var r=t(0x18dac2b8e);let n="A014GBNBJ59",l="A04MG80N5CY",i=(0,r.Cu)()?n:l,s=(0,r.Cu)()?"A0150E985M0":"A05P4475DFY",c=(0,r.Cu)()?"A014LHD2ATV":"A050C90PUF5",o=(0,r.Cu)()?"A0154SFF675":"A05UG04QC4X"},0x1e64417cd:(e,a,t)=>{"use strict";e.exports=t.p+"bell-cb0c35b.svg"},0x22547506:(e,a,t)=>{"use strict";e.exports=t.p+"clock-706161b.svg"},0x12e3c1a83:(e,a,t)=>{"use strict";e.exports=t.p+"profile-fdc0be3.svg"},0x111c9011b:(e,a,t)=>{"use strict";e.exports=t.p+"smile-star-638e676.svg"}}]);
//# sourceMappingURL=https://slack.com/source-maps/bv1-13/gantry-v2-async-client-assistant-home-view.7a5ba2bedd1367622731.min.js.mapØA
—Eoúô